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
gambar Supermarket di click
public void clickSchool(View view){ Intent i = new Intent(this,School.class); startActivity(i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_hitam);\n TampilGambar.startAnimation(animScale);\n suara12.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_g);\n TampilGambar.startAnimation(animScale);\n suaraG.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_abu);\n TampilGambar.startAnimation(animScale);\n suara0.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_k);\n TampilGambar.startAnimation(animScale);\n suaraK.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_oren);\n TampilGambar.startAnimation(animScale);\n suara8.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_coklat);\n TampilGambar.startAnimation(animScale);\n suara11.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_b);\n TampilGambar.startAnimation(animScale);\n suaraB.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_z);\n TampilGambar.startAnimation(animScale);\n suaraZ.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_a);\n TampilGambar.startAnimation(animScale);\n suaraA.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_e);\n TampilGambar.startAnimation(animScale);\n suaraE.start();\n }", "public void click(ToddEthottGame game);", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_nila);\n TampilGambar.startAnimation(animScale);\n suara5.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_c);\n TampilGambar.startAnimation(animScale);\n suaraC.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_j);\n TampilGambar.startAnimation(animScale);\n suaraJ.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_pink);\n TampilGambar.startAnimation(animScale);\n suara6.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_n);\n TampilGambar.startAnimation(animScale);\n suaraN.start();\n }", "public void act() \n {\n if (Greenfoot.mouseClicked(this))\n {\n Peter.lb=2; \n Greenfoot.playSound(\"click.mp3\");\n Greenfoot.setWorld(new StartEngleza());\n };\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_m);\n TampilGambar.startAnimation(animScale);\n suaraM.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_t);\n TampilGambar.startAnimation(animScale);\n suaraT.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_x);\n TampilGambar.startAnimation(animScale);\n suaraX.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_s);\n TampilGambar.startAnimation(animScale);\n suaraS.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_kuning);\n TampilGambar.startAnimation(animScale);\n suara2.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_biru);\n TampilGambar.startAnimation(animScale);\n suara4.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_birutua);\n TampilGambar.startAnimation(animScale);\n suara9.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_h);\n TampilGambar.startAnimation(animScale);\n suaraH.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_u);\n TampilGambar.startAnimation(animScale);\n suaraU.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_y);\n TampilGambar.startAnimation(animScale);\n suaraY.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_hijau);\n TampilGambar.startAnimation(animScale);\n suara3.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_f);\n TampilGambar.startAnimation(animScale);\n suaraF.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_ungu);\n TampilGambar.startAnimation(animScale);\n suara7.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_l);\n TampilGambar.startAnimation(animScale);\n suaraL.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_i);\n TampilGambar.startAnimation(animScale);\n suaraI.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_merah);\n TampilGambar.startAnimation(animScale);\n suara1.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_p);\n TampilGambar.startAnimation(animScale);\n suaraP.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_w);\n TampilGambar.startAnimation(animScale);\n suaraW.start();\n }", "public void cariGambar(View view) {\n Intent i = new Intent(this, CariGambar.class);\n //memulai activity cari gambar\n startActivity(i);\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_o);\n TampilGambar.startAnimation(animScale);\n suaraO.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_v);\n TampilGambar.startAnimation(animScale);\n suaraV.start();\n }", "public void act() \n {\n if(Greenfoot.mouseClicked(this)){\n storeMenu.getLastPressed(this,item,cost);\n changeImage();\n } \n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_d);\n TampilGambar.startAnimation(animScale);\n suaraD.start();\n }", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_r);\n TampilGambar.startAnimation(animScale);\n suaraR.start();\n }", "public void mouseClicked() {\n\t\tswitch(screen) {\n\t\t\n\t\t// Pantalla Home\n\t\tcase 0:\n\t\t\tif((mouseX > 529 && mouseY > 691) && (mouseX < 966 & mouseY < 867)) {\n\t\t\t\t//si hace click adentro del boton de jugar\n\t\t\t\tscreen = 1;\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t// Pantalla Instrucciones\n\t\tcase 1:\n\t\t\t//si hace click adentro de la pantalla\n\t\t\tscreen = 2;\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n TampilGambar.setImageResource(R.drawable.pop_q);\n TampilGambar.startAnimation(animScale);\n suaraQ.start();\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tIntent i = new Intent(MainActivity.this, OgleAksam.class);\n\t\t\ti.putExtra(\"GosterimTipi\", 2);\n\t\t\tstartActivity(i);\n\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"vai ficar clikando ai a toa? PATETA\");\n\t\t\t\t\n\t\t\t}", "public void clickExplode() {\n\t\tsetBorder(UNLOCKED_BORDER);\n\t\tsetIcon(HIT_MINE_PIC);\n\t\tsetBackground(Color.RED);\n\t\tunlocked = true;\n\t}", "public void OnclickGrabar(View v) {\n if (grabando) {\n\n nograbar(v);\n } else {\n\n grabar(v);\n }\n grabando = !grabando;\n\n\n }", "public void click() {\n this.lastActive = System.nanoTime();\n }", "@Override\n public void clicked(InputEvent event, float x, float y) {\n audioManager.playEvilBunnieGod();\n audioManager.setNewState(State.IDLE);\n manager.setScreen(new GameplayScreen(manager, 1));\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tIntent i = new Intent(MainActivity.this, OgleAksam.class);\n\t\t\ti.putExtra(\"GosterimTipi\", 1); //sonraki activity'e yemeklerin gosterim seklini aktariyor\n\t\t\tstartActivity(i);\n\t\t}", "void use(ATile clickedTile, GodSim g);", "public void mouseClicked(MouseEvent arg0) {\n\t\tint aimr=(arg0.getY()+GOBJECT.Map.movey)/GOBJECT.Map.space;\n\t\tint aimc=(arg0.getX()+GOBJECT.Map.movex)/GOBJECT.Map.space;\n\t\tint startr=(GOBJECT.hero.rect.y+GOBJECT.Map.movey)/GOBJECT.Map.space;\n\t\tint startc=(GOBJECT.hero.rect.x+GOBJECT.Map.movex)/GOBJECT.Map.space;\n\t\tsmart.bfs(GOBJECT.Map.maptable[0], GOBJECT.Map.maxr, GOBJECT.Map.maxc, startr, startc, aimr, aimc);\n\t\tsmart.getRoad();\n\t\tthis.GOBJECT.mouseAn.getLive();\n\t}", "public void click_on(){\n float x = mouseX;\n float y = mouseY;\n //if(dela>0)dela--;\n if(overRect(x, y, 570, 50, btn_ext.width, btn_ext.height)){sfx(4);\n clicked(btn_ext.get(), 570, 50, btn_ext.width, btn_ext.height, INVERT);\n qq = -1;\n }else if(overRect(x, y, 190, 50, btn_tip.width, btn_tip.height)&&!level_pick){sfx(4);\n sm = k;\n sp = 5;\n qq = 6;\n qqTmp = 2;\n }else if(level_pick){\n if(overRect(x, y, 190, 50, btn_back.width, btn_back.height)){sfx(4);\n clicked(btn_back.get(), 190, 50, btn_back.width, btn_back.height, INVERT);\n level_pick = false;\n }else{\n for(int i=0;i<7;i++){\n float xx = 252.5f;\n float yy = 130;\n if(i>3){\n xx = -45;\n yy = 215;\n }\n if(User.getInt((char)('A'+k)+str(i+1))!=-1){\n if(overRect(x, y, xx+85*i, yy, level_on.width, level_on.height)){sfx(4);\n sl = i;\n _1.setLevel();\n _1.initGame();\n pp = 1;qq = -1;\n }\n }\n }\n }\n }else{\n if(overRect(x, y, 540, height/2, btn_next.width, btn_next.height)){sfx(4);\n clicked(btn_next.get(), 540, height/2, btn_next.width, btn_next.height, INVERT);\n k=(k+1)%3;\n }\n else if(overRect(x, y, 220, height/2, btn_prev.width, btn_prev.height)){sfx(4);\n clicked(btn_prev.get(), 220, height/2, btn_prev.width, btn_prev.height, INVERT);\n k--;\n if(k<0)k=2;\n }else if(overRect(x, y, width/2, height/2, latar[k].width, latar[k].height)){sfx(4);\n level_pick = true;\n sm = k;\n }\n }\n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tif(e.getButton()==MouseEvent.BUTTON1)\n\t\t\t\t{\n\t\t\t\t\tif(Conf.isbegin==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tConf.isbegin=0;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tConf.isbegin=1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(e.getButton()==MouseEvent.BUTTON3)\n\t\t\t\t{\n\t\t\t\t\tif(Conf.isreplay==1)\t\n\t\t\t\t\t{\n\t\t\t\t\t\tConf.isreplay=0;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tConf.isreplay=1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tintent.putExtra(\"key\", gamesdata.get(para.get(position)+1).getAmazonkey());\n\t\t\t\t\t\t\tc.startActivity(intent);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "void clickFmFromMenu();", "public void theGameMenuClicked() {\n System.out.println(\"THE GAME (you just lost it)\");\n }", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\tif(this.chance==1)\r\n\t\t{\r\n\t\t\tmouseX = arg0.getX();\r\n\t\t\tmouseY= arg0.getY();\r\n\t\t\tclick=1;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void onClick(View arg0) {\n\t\tParticleSystem ps = new ParticleSystem(this, 100, R.drawable.star_pink, 800);\n\t\tps.setScaleRange(0.7f, 1.3f);\n\t\tps.setSpeedRange(0.1f, 0.25f);\n\t\tps.setAcceleration(0.0001f, 90);\n\t\tps.setRotationSpeedRange(90, 180);\n\t\tps.setFadeOut(200, new AccelerateInterpolator());\n\t\tps.oneShot(arg0, 100);\n\t}", "private void cs1() {\n\t\t\tctx.mouse.click(675,481,true);\n\t\t\t\n\t\t}", "void clickAmFromMenu();", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tClickAutoGrease();\n\t\t\t}", "public void act()\n {\n if (Greenfoot.mouseClicked(this))\n Greenfoot.playSound(\"fanfare.wav\");\n }", "public void clickMarket(View view) {\n Intent i = new Intent(this,Swalayan.class);\n startActivity(i);\n }", "@Override\n\tprotected void OnClick() {\n\t\t\n\t}", "@Override\n public void mousePressed(MouseEvent e){\n String boton = W.detClick( e.getButton() );\n \n //System.out.println(\"->Mouse: Presionando Click \" + boton );\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tClickFineModulation();\n\t\t\t}", "@Override\n\tpublic void onClick(ClickEvent arg0) {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\txgGrzlTj();\r\n\t\t\t}", "public void onBuyGoldButtonClicked(View arg0) {\n\t\tLog.d(TAG, \"Buy gas button clicked.\");\n\n\t\t// if (mSubscribedToInfiniteGas) {\n\t\t// complain(\"No need! You're subscribed to infinite gas. Isn't that awesome?\");\n\t\t// return;\n\t\t// }\n\t\t//\n\t\t// if (mTank >= TANK_MAX) {\n\t\t// complain(\"Your tank is full. Drive around a bit!\");\n\t\t// return;\n\t\t// }\n\n\t\t// launch the gas purchase UI flow.\n\t\t// We will be notified of completion via mPurchaseFinishedListener\n\t\tsetWaitScreen(true);\n\t\tLog.d(TAG, \"Launching purchase flow for gas.\");\n\n\t\t/*\n\t\t * TODO: for security, generate your payload here for verification. See\n\t\t * the comments on verifyDeveloperPayload() for more info. Since this is\n\t\t * a SAMPLE, we just use an empty string, but on a production app you\n\t\t * should carefully generate this.\n\t\t */\n//\t\tString payload = \"\";\n\n//\t\tmHelper.launchPurchaseFlow(GameRenderer.mStart, SKU_350000, RC_REQUEST,mPurchaseFinishedListener, payload);\n\t}", "public void buttonClicked() {\n mSanitizorGame.buttonClicked();\n }", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface arg0,\n\t\t\t\t\t\t\tint arg1) {\n\t\t\t\t\t\tIntent i = new Intent(getActivity().getApplicationContext(),InGame.class);\n\t\t\t\t\t\tBille bille= Bille.getBille();\n\t\t\t\t\t\tchrono.reset();\n\t\t\t\t\t\tbille.setVies(8);\n\t\t\t\t\t\ti.putExtra(\"lvl\", InGame.getlvl()+1);\n\t\t\t\t\t\tgetActivity().startActivity(i);\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface arg0,\n\t\t\t\t\t\t\tint arg1) {\n\t\t\t\t\t\tIntent i = new Intent(getActivity().getApplicationContext(),InGame.class);\n\t\t\t\t\t\tBille bille= Bille.getBille();\n\t\t\t\t\t\tchrono.reset();\n\t\t\t\t\t\tbille.setVies(8);\n\t\t\t\t\t\ti.putExtra(\"lvl\", InGame.getlvl());\n\t\t\t\t\t\tgetActivity().startActivity(i);\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tToast.makeText(c, \"No Current Updates\", Toast.LENGTH_SHORT).show();\n\t\t\t/*\tIntent i = new Intent(SingleShop.this, Gallery.class);\n\t\t\t\tstartActivity(i);\n\t\t\t\t*///\tFragmentTransaction ft =\t((ActionBarActivity)context).getSupportFragmentManager().beginTransaction().replace(R.id.frame_container, ft).commit();;\n\n\t\t\t\t\n\t\t\t}", "private void checkClicked()\n {\n if (Greenfoot.mouseClicked(this))\n {\n if (musicPlaying == true)\n {\n setImage(\"volumeOn.png\");\n GreenfootImage volumeOn = getImage();\n volumeOn.scale(70,70);\n setImage(volumeOn); \n soundtrack.playLoop();\n musicPlaying = false;\n }\n else if (musicPlaying == false)\n {\n setImage(\"volumeOff.png\");\n GreenfootImage volumeOff = getImage();\n volumeOff.scale(70,70);\n soundtrack.stop();\n musicPlaying = true;\n }\n }\n }", "public void act() \n {\n // Add your action code here.\n if (Greenfoot.mouseClicked(this)){\n Greenfoot.playSound(\"Bridge.wav\");\n }\n }", "public void act() \n {\n GreenfootImage img = new GreenfootImage(200,200); \n img.setFont(new Font(font, false, true,28));\n img.setColor(color);\n img.drawString(text,50,50);\n setImage(img);\n blink();\n //blink(); \n //if(Greenfoot.mouseClicked(this))\n \n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tCursurIndex = 1;\n\t\t\t\tHandleCursurDisplay.sendMessage(HandleCursurDisplay.obtainMessage(CursurIndex));\n\t\t\t\tClickAverageInitial();\n\t\t\t}", "public void mouseClicked (MouseEvent e)\r\n\t{\r\n\t\tx = e.getX ();\r\n\t\ty = e.getY ();\r\n\t\t//Rules screen photo button 'PLAY'\r\n\t\tif ((screen == 0 || screen == 4 || screen == 5) && (x > 250 && x < 320) && (y > 360 && y < 395)){ \r\n\t\t\tscreen = 1;\r\n\t\t\trepaint();\r\n\t\t}\r\n\t\t//Game screen photo button 'Press to Start'\r\n\t\telse if (screen == 1 || screen == 2 || screen == 3){ \r\n\t\t\tif ((x > 10 && x < 180) && (y > 80 && y < 105)) \r\n\t\t\t\tnewGame();\r\n\t\t\tanimateButtons ();\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "@Override\n public void onClick(View v) {\n if (!vKenalan()){\n dialog.show();\n berbicara.play(\"it seems like we haven't met yet, don't know it then don't love, let's know you first\");\n return;\n }\n // untuk toogle\n if (diam){\n bolehMendengarkan();\n diam = false;\n }else {\n tidakBolehMendengarkan();\n diam = true;\n }\n }", "@Override\r\n\tpublic void mouseClicked(MouseEvent e)\r\n\t{\r\n\t\tjump();\r\n\t}", "public void mouseClicked(MouseEvent click) {\r\n\t\tif (click.getButton() == 1 && (gameState == 3)) {\r\n\t\t\ttry {\r\n\t\t\t\tstartButtonSound();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tif (canPlay) {\r\n\t\t\t\tplay = true;\r\n\t\t\t}else if (canStart) {\r\n\t\t\t\tstart = true;\r\n\t\t\t}else if (canIncreaseWeapon) {\r\n\t\t\t\tincreaseWeapon = true;\r\n\t\t\t}else if (canDecreaseWeapon) {\r\n\t\t\t\tdecreaseWeapon = true;\r\n\t\t\t}else if (canIncreaseDifficulty) {\r\n\t\t\t\tincreaseDifficulty = true;\r\n\t\t\t}else if (canDecreaseDifficulty) {\r\n\t\t\t\tdecreaseDifficulty = true;\r\n\t\t\t}else if (canDecreaseAI) {\r\n\t\t\t\tdecreaseAI = true;\r\n\t\t\t}else if (canIncreaseAI) {\r\n\t\t\t\tincreaseAI = true;\r\n\t\t\t}else if (canChangePlayer) {\r\n\t\t\t\tchangePlayer = true;\r\n\t\t\t}\r\n\t\t}else if (gameState == 1) {\r\n\t\t\tif (canPlayOptions) {\r\n\t\t\t\tplayOptions = true;\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tstartButtonSound();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void mouseClicked(MouseEvent e){\n String boton = W.detClick( e.getButton() );\n \n System.out.println(\" Mouse: Click \" + boton ); \n }", "@Override\n public void clicked(InputEvent event, float x, float y) {\n selecionado.play();\n ((Game) Gdx.app.getApplicationListener()).setScreen(new PlayScreen(game, level));\n dispose();\n }", "@Override\n\tpublic void mouseClicked(MouseEvent me) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent me) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void pressNewGame() {\n }", "public void act() \r\n {\n if(getOneIntersectingObject(Player.class)!=null)\r\n {\r\n if(MenuWorld.gamemode == 1)\r\n //marcheaza regenerarea labirintului(trecere la nivelul urmator in Modul Contra Timp)\r\n TAworld.shouldRegen=true;\r\n else\r\n { \r\n //reseteaza variabilele care tin de modul de joc\r\n MenuWorld.gamemode=-1;\r\n MenuWorld.isPlaying=false;\r\n for(int i=0;i<4;i++)\r\n ItemCounter.gems_taken[i]=0;\r\n \r\n //arata fereastra de castig \r\n PMworld.shouldShowVictoryWindow=true;\r\n }\r\n \r\n }\r\n \r\n }", "public void act() \n {\n checkClicked();\n }", "public void mouseClicked(MouseEvent me) {\r\n\t\tint x_coordinate = me.getX();\r\n\t\tint y_coordinate = me.getY();\r\n\t\tString name;\r\n\t\tString out;\r\n\r\n\t\tif (risk.getState() == RiskGameModel.NEW_GAME) { // 0\r\n\t\t\t// startup\r\n\t\t\tSystem.out.println(\"status \" + risk.getState());\r\n\t\t\trisk.gamePhaseSetup(x_coordinate, y_coordinate);\r\n\t\t\tname = risk.curPlayer.getName();\r\n\t\t\tstatusLabel.setText(\"Place an army on a unoccupied territory\");\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.INITIAL_REINFORCE) { // 1\r\n\t\t\t// startup\r\n\t\t\tSystem.out.println(\"status \" + risk.getState());\r\n\t\t\trisk.gamePhaseSetup(x_coordinate, y_coordinate);\r\n\t\t\tname = risk.curPlayer.getName();\r\n\t\t\tstatusLabel.setText(\"Place an army on a territory you occupy\");\r\n\t\t\tUtility.writeLog(\"initial reinforcement stage\");\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.ATTACK) {\r\n\t\t\trisk.notifyPhaseViewChange();\r\n\t\t\tname = risk.curPlayer.getName();\r\n\t\t\t\r\n\t\t\tout = risk.gamePhaseActive(x_coordinate, y_coordinate);\r\n\t\t\trisk.notifyPhaseViewChange();\r\n\r\n\t\t}\r\n\t\tif (risk.getState() == RiskGameModel.START_TURN) {\r\n\t\t\trisk.gamePhaseActive(x_coordinate, y_coordinate);\r\n\t\t\trisk.active = risk.curPlayer;\r\n\t\t\tname = risk.curPlayer.getName();\r\n\t\t\tstatusLabel.setText(\"Recieved a bonus of \" + risk.curPlayer.getNumberOfArmies());\r\n\t\t\tUtility.writeLog(name + \" got bonus armies\");\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.REINFORCE) {\r\n\r\n\t\t\tname = risk.curPlayer.getName();\r\n\t\t\trisk.gamePhaseActive(x_coordinate, y_coordinate);\r\n\t\t\trisk.notifyPhaseViewChange();\r\n\t\t\tUtility.writeLog(name + \" got\" + risk.curPlayer.getNumberOfArmies() + \" left to place\");\r\n\t\t\tstatusLabel.setText(\"You have \" + risk.curPlayer.getNumberOfArmies() + \" left to place\");\r\n\t\t\tif (risk.curPlayer.getNumberOfArmies() == 0) {\r\n\t\t\t\trisk.setState(RiskGameModel.ACTIVE_TURN);\r\n\t\t\t\tUtility.writeLog(name + \" entered active turn\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.START_TURN) {\r\n\t\t\trisk.gamePhaseActive(x_coordinate, y_coordinate);\r\n\t\t\trisk.active = risk.curPlayer;\r\n\t\t\tname = risk.curPlayer.getName();\r\n\t\t\tstatusLabel.setText(\"Recieved a bonus of \" + risk.curPlayer.getNumberOfArmies());\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.ACTIVE_TURN) {\r\n\t\t\tname = risk.curPlayer.getName();\r\n\t\t\tstatusLabel.setText(\"What would you like to do?\");\r\n\t\t\tEndButton.setVisible(true);\r\n\t\t\tFortifyButton.setVisible(true);\r\n\t\t\tAttackButton.setText(\"Attack\");\r\n\r\n\t\t\tAttackButton.setVisible(true);\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.ATTACKING) {\r\n\t\t\tname = risk.curPlayer.getName();\r\n\t\t\tAttackButton.setText(\"Retreat\");\r\n\t\t\tstatusLabel.setText(\"Select an opposing territory\");\r\n\t\t\tout = risk.gamePhaseActive(x_coordinate, y_coordinate);\r\n\t\t\tUtility.writeLog(name + \" entered attacking phase.\");\r\n\t\t\t// System.out.println(out);\r\n\t\t\trisk.notifyPhaseViewChange();\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.ATTACK_PHASE) {\r\n\t\t\t// jInternalFrame1.setVisible(true);\r\n\t\t\tint attackArmies = risk.aTerritory.getArmies();\r\n\t\t\tint defenseArmies = risk.defenseTerritory.getArmies();\r\n\t\t\tint numofatt = 0;\r\n\t\t\t// If attackers turn\r\n\t\t\tif (risk.active == risk.curPlayer) {\r\n\t\t\t\tif (attackArmies > 3) {\r\n\t\t\t\t\tif (y_coordinate > 250 && y_coordinate < 280) {// if in\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// y_coordinate\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// coord\r\n\t\t\t\t\t\tif (x_coordinate > 420 && x_coordinate < 460) // If dice\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// one\r\n\t\t\t\t\t\t\tnumofatt = 1;\r\n\t\t\t\t\t\tif (x_coordinate > 480 && x_coordinate < 520) // if dice\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// two\r\n\t\t\t\t\t\t\tnumofatt = 2;\r\n\t\t\t\t\t\tif (x_coordinate > 540 && x_coordinate < 580)\r\n\t\t\t\t\t\t\tnumofatt = 3;\r\n\t\t\t\t\t} // in y_coordinate coord\r\n\t\t\t\t} // if attcking with 3\r\n\t\t\t\tif (attackArmies == 3) {// if attakking with two\r\n\t\t\t\t\tif (y_coordinate > 250 && y_coordinate < 280) {\r\n\t\t\t\t\t\tif (x_coordinate > 460 && x_coordinate < 500)\r\n\t\t\t\t\t\t\tnumofatt = 1;\r\n\t\t\t\t\t\tif (x_coordinate > 510 && x_coordinate < 550)\r\n\t\t\t\t\t\t\tnumofatt = 2;\r\n\t\t\t\t\t} // in y_coordinate coord\r\n\t\t\t\t} // end if can attack with two\r\n\r\n\t\t\t\tif (attackArmies == 2) {// can only attack with one\r\n\t\t\t\t\tif (y_coordinate > 250 && y_coordinate < 280) {\r\n\t\t\t\t\t\tif (x_coordinate > 480 && x_coordinate < 520)\r\n\t\t\t\t\t\t\tnumofatt = 1;\r\n\t\t\t\t\t} // in y_coordinate\r\n\t\t\t\t} // end only attack with one\r\n\r\n\t\t\t\tif (numofatt != 0) {// change player is num is selected\r\n\t\t\t\t\trisk.active = risk.defender;\r\n\t\t\t\t\trisk.setAttack(numofatt);\r\n\t\t\t\t\tUtility.writeLog(risk.getCurrentPlayer().getName() + \" has \" + attackArmies + \" armies\");\r\n\t\t\t\t\tUtility.writeLog(risk.getCurrentPlayer().getName() + \" attacking with \" + numofatt + \" armies\");\r\n\t\t\t\t}\r\n\r\n\t\t\t} // end attackers turn\r\n\r\n\t\t\t// If defenders turn\r\n\t\t\telse if (risk.active == risk.defender) {\r\n\t\t\t\tif (defenseArmies > 1 && risk.attackNum > 1) {\r\n\t\t\t\t\tif (y_coordinate > 250 && y_coordinate < 280) {\r\n\t\t\t\t\t\tif (x_coordinate > 460 && x_coordinate < 500)\r\n\t\t\t\t\t\t\tnumofatt = 1;\r\n\t\t\t\t\t\tif (x_coordinate > 510 && x_coordinate < 550)\r\n\t\t\t\t\t\t\tnumofatt = 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (y_coordinate > 250 && y_coordinate < 280) {\r\n\t\t\t\t\t\tif (x_coordinate > 480 && x_coordinate < 520)\r\n\t\t\t\t\t\t\tnumofatt = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\trisk.notifyPhaseViewChange();\r\n\t\t\t\tif (numofatt > 0) {\r\n\t\t\t\t\trisk.setDefend(numofatt);\r\n\t\t\t\t\trisk.engageBattle();\r\n\t\t\t\t\tif (defenseArmies - risk.defenseTerritory.getArmies() == 1) {\r\n\t\t\t\t\t\tstatusLabel.setText(risk.curPlayer.getName() + \" has destroyed an army\");\r\n\t\t\t\t\t\tUtility.writeLog(risk.curPlayer.getName() + \" has destroyed an army\");\r\n\t\t\t\t\t} else if (defenseArmies - risk.defenseTerritory.getArmies() == 2) {\r\n\t\t\t\t\t\tstatusLabel.setText(risk.curPlayer.getName() + \" has destroyed two armies\");\r\n\t\t\t\t\t\tUtility.writeLog(risk.curPlayer.getName() + \" has destroyed two armies\");\r\n\t\t\t\t\t} else if (attackArmies - risk.aTerritory.getArmies() == 1) {\r\n\t\t\t\t\t\tstatusLabel.setText(risk.curPlayer.getName() + \" has lost an army\");\r\n\t\t\t\t\t\tUtility.writeLog(risk.curPlayer.getName() + \" has lost an army\");\r\n\t\t\t\t\t} else if (attackArmies - risk.aTerritory.getArmies() == 2) {\r\n\t\t\t\t\t\tstatusLabel.setText(risk.curPlayer.getName() + \" has lost two armies\");\r\n\t\t\t\t\t\tUtility.writeLog(risk.curPlayer.getName() + \" has lost two armies\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (risk.aTerritory.getArmies() == 1) {\r\n\t\t\t\t\t\trisk.setState(RiskGameModel.ACTIVE_TURN);\r\n\t\t\t\t\t\tstatusLabel.setText(risk.curPlayer.getName() + \" has lost the battle\");\r\n\t\t\t\t\t\tAttackButton.setText(\"Attack\");\r\n\t\t\t\t\t\tFortifyButton.setVisible(true);\r\n\t\t\t\t\t\tEndButton.setVisible(true);\r\n\t\t\t\t\t\trisk.defenseNum = 0;\r\n\t\t\t\t\t\trisk.attackNum = 0;\r\n\t\t\t\t\t\trisk.defenseTerritory = null;\r\n\t\t\t\t\t\trisk.aTerritory = null;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t} /// end if defenders turn\r\n\r\n\t\t} // End attackPhase\r\n\r\n\t\tif (risk.getState() == RiskGameModel.DEFEATED) {\r\n\t\t\tsetState(RiskGameModel.ACTIVE_TURN);\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.CAPTURE) {\r\n\t\t\tstatusLabel.setText(\"Select number of armies to move to \" + risk.defenseTerritory.getName());\r\n\t\t\tAttackButton.setVisible(false);\r\n\t\t\tAttackButton.setText(\"Attack\");\r\n\t\t\tint max = risk.aTerritory.getArmies() - 1;\r\n\t\t\tint min = risk.attackNum;\r\n\t\t\tif (y_coordinate > 230 && y_coordinate < 257) {// if y_coordinate is\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// correct\r\n\t\t\t\tif (x_coordinate > 600 && x_coordinate < 650)// if max\r\n\t\t\t\t\trisk.defenseNum = risk.aTerritory.getArmies() - 1; // max\r\n\t\t\t\tif (x_coordinate > 520 && x_coordinate < 570) { // if inc\r\n\t\t\t\t\tif (risk.defenseNum < max)\r\n\t\t\t\t\t\trisk.defenseNum++;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tstatusLabel.setText(\"Maximum units already selected\");\r\n\t\t\t\t} // end if sub\r\n\t\t\t\tif (x_coordinate > 440 && x_coordinate < 490) {// if dec\r\n\t\t\t\t\tif (risk.defenseNum > min)\r\n\t\t\t\t\t\trisk.defenseNum--;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tstatusLabel.setText(\"Minimum units already selected\");\r\n\t\t\t\t} // end if add\r\n\t\t\t\tif (x_coordinate > 360 && x_coordinate < 410)// min\r\n\t\t\t\t\trisk.defenseNum = min;\r\n\t\t\t} // end if y_coordinate coord\r\n\r\n\t\t\tif (x_coordinate > 460 && x_coordinate < 545) {// move has ben\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// clicked\r\n\t\t\t\tif (y_coordinate > 325 && y_coordinate < 355) {// then occupy\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the territory\r\n\t\t\t\t\tAttackButton.setVisible(true);\r\n\t\t\t\t\tif (risk.defenseNum == 1)\r\n\t\t\t\t\t\tstatusLabel.setText(\"1 army moved to \" + risk.defenseTerritory.getName());\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tstatusLabel.setText(risk.defenseNum + \" armies moved to \" + risk.defenseTerritory.getName());\r\n\r\n\t\t\t\t\trisk.notifyPhaseViewChange();\r\n\t\t\t\t\trisk.setAttackDieArray(new Integer[] {0,0,0});\r\n\t\t\t\t\trisk.setDefenceDieArray(new Integer[] {0,0,0});\r\n\t\t\t\t\tUtility.writeLog(risk.getCurrentPlayer().getName() + \" has \" + risk.defenseNum + \" armies moved to \"\r\n\t\t\t\t\t\t\t+ risk.defenseTerritory.getName());\r\n\t\t\t\t\tEndButton.setVisible(true);\r\n\t\t\t\t\tFortifyButton.setVisible(true);\r\n\t\t\t\t\tif (risk.capture()) {\r\n\t\t\t\t\t\tAttackButton.setVisible(false);\r\n\t\t\t\t\t\tFortifyButton.setVisible(false);\r\n\t\t\t\t\t\tCardButton.setVisible(false);\r\n\t\t\t\t\t\tEndButton.setVisible(false);\r\n\t\t\t\t\t\tstatusLabel.setText(risk.getCurrentPlayer().getName() + \" has won the game\");\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, risk.getCurrentPlayer().getName() + \" has won the game\",\r\n\t\t\t\t\t\t\t\t\"Alert\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// risk.notifyPhaseViewChange();\r\n\t\t} // end capturing\r\n\r\n\t\tif (risk.getState() == RiskGameModel.FORTIFY) {\r\n\t\t\trisk.gamePhaseActive(x_coordinate, y_coordinate);\r\n\t\t\tstatusLabel.setText(\"Select a country to move armies too\");\r\n\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.FORTIFYING) {\r\n\t\t\trisk.gamePhaseActive(x_coordinate, y_coordinate);\r\n\t\t}\r\n\r\n\t\tif (risk.getState() == RiskGameModel.FORTIFY_PHASE) {\r\n\t\t\tint from = risk.aTerritory.getArmies();\r\n\r\n\t\t\tif (y_coordinate > 230 && y_coordinate < 257) {// if y_coordinate is\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// correct\r\n\t\t\t\tif (x_coordinate > 600 && x_coordinate < 650)// if max\r\n\t\t\t\t\tif (risk.defenseNum == (from - 1))\r\n\t\t\t\t\t\tstatusLabel.setText(\"Maximum units already selected\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\trisk.defenseNum = (from - 1);// all but one\r\n\t\t\t\tif (x_coordinate > 520 && x_coordinate < 570) { // if inc\r\n\t\t\t\t\tif (risk.defenseNum < (from - 1))\r\n\t\t\t\t\t\trisk.defenseNum++;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tstatusLabel.setText(\"Maximum units already selected\");\r\n\t\t\t\t} // end if inc\r\n\t\t\t\tif (x_coordinate > 440 && x_coordinate < 490) {// if dec\r\n\t\t\t\t\tif (risk.defenseNum > (from - 1))\r\n\t\t\t\t\t\trisk.defenseNum--;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tstatusLabel.setText(\"Minimum units already selected\");\r\n\t\t\t\t} // end if add\r\n\t\t\t\tif (x_coordinate > 360 && x_coordinate < 410)// min\r\n\t\t\t\t\tif (risk.defenseNum == 0)\r\n\t\t\t\t\t\tstatusLabel.setText(\"Minimum units already selected\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\trisk.defenseNum = 0;\r\n\t\t\t} // end if y_coordinate coord\r\n\r\n\t\t\tif (x_coordinate > 460 && x_coordinate < 545) {// move has ben\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// clicked\r\n\t\t\t\tif (y_coordinate > 325 && y_coordinate < 355) {// then occupy\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the territory\r\n\t\t\t\t\tAttackButton.setVisible(false);\r\n\t\t\t\t\tif (risk.defenseNum == 1)\r\n\t\t\t\t\t\tstatusLabel.setText(\"1 army moved to \" + risk.defenseTerritory.getName());\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tstatusLabel.setText(risk.defenseNum + \" armies moved to \" + risk.defenseTerritory.getName());\r\n\t\t\t\t\trisk.notifyPhaseViewChange();\r\n\t\t\t\t\tUtility.writeLog(risk.getCurrentPlayer().getName() + \" has \" + risk.defenseNum + \" armies moved to \"\r\n\t\t\t\t\t\t\t+ risk.defenseTerritory.getName());\r\n\t\t\t\t\tEndButton.setVisible(true);\r\n\t\t\t\t\tFortifyButton.setVisible(false);\r\n\t\t\t\t\trisk.aTerritory.looseArmies(risk.defenseNum);\r\n\t\t\t\t\trisk.defenseTerritory.addArmies(risk.defenseNum);\r\n\t\t\t\t\trisk.setState(RiskGameModel.ACTIVE_TURN);\r\n\t\t\t\t} // end y_coordinate\r\n\t\t\t} // end x_coordinate for movwe\r\n\t\t} // ..fortify phase\r\n\r\n\t\tif (risk.getState() == RiskGameModel.TRADE_CARDS) {\r\n\t\t\tif (y_coordinate > 350 && y_coordinate < 380) {\r\n\t\t\t\tif (x_coordinate > 475 && x_coordinate < 525) { // if exxti\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// button pushed\r\n\t\t\t\t\trisk.setState(RiskGameModel.ACTIVE_TURN);\r\n\t\t\t\t\tSystem.out.println(\"exit\");\r\n\t\t\t\t}\r\n\t\t\t} // end exit\r\n\t\t\trisk.notifyPhaseViewChange();\r\n\t\t} // end trade cards\r\n\r\n\t\tSystem.out.println(\"(\" + x_coordinate + \", \" + y_coordinate + \")\");\r\n\r\n\t\tjPanel1.repaint();\r\n\t\tjPanel3.repaint();\r\n\r\n\t}", "@Override\n public void mouseClicked(MouseEvent e) {\n System.out.println(\"MouseClicked\");\n //kwadrat.clicked();\n trojkat.clicked();\n //kolo.clicked();\n //square.clicked();\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tintent.putExtra(\"key\", gamesdata.get(para.get(position)).getAmazonkey());\n\t\t\t\t\t\t\tc.startActivity(intent);\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tintent.putExtra(\"key\", gamesdata.get(para.get(position)).getAmazonkey());\n\t\t\t\t\t\t\tc.startActivity(intent);\n\t\t\t\t\t\t}", "@Override\n public void onIconClick(View icon, float iconXPose, float iconYPose) {\n Intent intent = new Intent(context, MainActivity.class);\n intent.putExtra(Constants.FEED_ME, true);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\n context.startActivity(intent);\n mMagnet.destroy();\n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}" ]
[ "0.6754238", "0.66831404", "0.6663127", "0.66572326", "0.6633718", "0.66142946", "0.6607162", "0.6595508", "0.6592756", "0.65897536", "0.6586985", "0.65860796", "0.6576396", "0.65740097", "0.65557694", "0.65447015", "0.6544489", "0.6542156", "0.65403444", "0.6536802", "0.6534898", "0.65336996", "0.6533488", "0.6533376", "0.6532229", "0.6525225", "0.65221894", "0.6518887", "0.6516784", "0.6512915", "0.6512348", "0.65103364", "0.65060216", "0.65055114", "0.6502821", "0.64970803", "0.6492658", "0.6476678", "0.64705336", "0.6469616", "0.6461791", "0.6449828", "0.6426202", "0.64221203", "0.6413229", "0.6411569", "0.6378895", "0.630621", "0.62951094", "0.6289526", "0.6234451", "0.62197244", "0.612096", "0.61026996", "0.6034097", "0.60245544", "0.59944576", "0.59840584", "0.59818804", "0.59813875", "0.5981221", "0.5976176", "0.5971492", "0.5964946", "0.59623027", "0.59569013", "0.5955421", "0.5938362", "0.5936563", "0.59326583", "0.5921061", "0.5917901", "0.5916021", "0.5907711", "0.5906024", "0.5904551", "0.5904407", "0.5902801", "0.59003985", "0.589884", "0.5891823", "0.58841884", "0.5870174", "0.5869807", "0.5869426", "0.5869426", "0.5868689", "0.5868689", "0.5866647", "0.5859115", "0.58581316", "0.5856621", "0.5852264", "0.5851897", "0.5851897", "0.58518845", "0.5848557", "0.5848557", "0.5848557", "0.5848557", "0.5848557" ]
0.0
-1
Creates new form TeacherSignUP
public ViewTeacherSignUP() { initComponents(); this.setLocationRelativeTo(null); // for centering form on screen this.setDefaultCloseOperation(DISPOSE_ON_CLOSE); //does not close app on exit of window }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addTeacher() {\n\t\t\n\t\tString lastName = tLastNameTF.getText();\n\t\tString firstName = tFirstNameTF.getText();\n\t\tString schoolName = tSchoolNameTF.getText();\n\t\tString userName = tUsernameTF.getText();\n\t\tchar[] password = tPasswordPF1.getPassword();\n\t\tString sA1 = tSecurityQ1TF.getText();\n\t\tString sQ1 = (String)tSecurityList1.getSelectedItem();\n\t\tString sA2 = tSecurityQ2TF.getText();\n\t\tString sQ2 = (String)tSecurityList2.getSelectedItem();\n\t\t\n\t\tteacher = new Teacher(lastName, firstName, schoolName, userName, password, sA1, sQ1, sA2, sQ2);\n\t\t\n\t\t//Add teacher to database \n\t\t\n\t}", "@Override\n public void onClick(View v) {\n TeacherClass t = new TeacherClass();\n //grab text from first name text input and apply to teacher first name\n t.firstName = txtFirstName.getText().toString().trim();\n //grab text from last name text input and apply to teacher last name\n t.lastName = txtLastName.getText().toString().trim();\n //grab text from username text input and and apply to teacher username\n t.username = txtUsername.getText().toString().trim();\n //grab text from password text input and apply to teacher password\n t.password = txtPassword.getText().toString().trim();\n //grab text from password confirm text input and create string variable\n String confirm = txtConfirm.getText().toString().trim();\n t.daycareID = adminDaycare; //admin can only create a user within their own daycare\n //isAdmin - set to true if admin radio button is selected\n if(admin.isChecked()) {\n t.isAdmin = true;\n }\n //verify that all information has been provided and is correct\n if(VerifyInfo(t.firstName, t.lastName, t.username, t.password, confirm)) {\n PasswordHash hash = new PasswordHash();\n t.password = hash.generatedPassword(t.password);\n\n InsertTeacher(t.firstName, t.lastName, t.username, t.password, t.daycareID, t.isAdmin);\n }\n }", "public TeacherPage fill() {\n setNameTextField(\"TeacherName\");\n setSurnameTextField(\"TeacherSurname\");\n setEmailEmailField(\"[email protected]\");\n return this;\n }", "@RequestMapping(\n method = {RequestMethod.POST },\n consumes = MediaType.APPLICATION_JSON_VALUE\n )\n public Teacher createUser(@Valid @RequestBody Teacher teacher) {\n return teachersRep.save(teacher);\n }", "public TeacherForm() {\n initComponents();\n }", "public Teacher() {}", "public Teacher() {\n initComponents();\n \n }", "public addteacher() {\n initComponents();\n }", "public TeacherPage submit() {\n clickSaveButton();\n return this;\n }", "private void onCreateSuccessTeacher(){\n // Go to teacher page\n Log.d(TAG, \"Teacher created (from onCreateSuccessTeacher\");\n Intent intent = new Intent(this, ClubHubTeacherActivity.class);\n startActivity(intent);\n }", "private void createLocalTeacherUserData(FirebaseUser user){\n String name = usernameTextView.getText().toString();\n TeacherManager.createTeacher(name, user.getUid(), newSchoolID);\n }", "public TeacherP() {\n initComponents();\n }", "public static Teacher addTeacher() {\n\n\n Teacher newTeacher = new Teacher();\n\n //create a Scanner object to let user make an input\n\n Scanner s = new Scanner(System.in);\n System.out.println(\"Enter the first name\");\n String firstname = s.nextLine();\n newTeacher.setFirstName(firstname);\n\n\n System.out.println(\"Enter the last name\");\n String lastName = s.nextLine();\n newTeacher.setLastName(lastName);\n\n\n System.out.println(\"Enter your email\");\n String yourEmail = s.nextLine();\n newTeacher.seteMail(yourEmail);\n\n\n System.out.println(\"Enter your ID number\");\n String yourID = s.nextLine();\n newTeacher.setNumberID(yourID);\n\n System.out.println(\"Enter the class that teacher teaches\");\n String teaches = s.nextLine();\n// newTeacher.setTeaches(teaches);\n\n\n return newTeacher;\n\n }", "public static void creaDocente(Teacher doc) {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.CREATE_USER;\n\t\t\trp.userType = UserType.TEACHER;\n\t\t\trp.parameters = new Object[] { doc };\n\t\t\tsend(rp);\n\t\t} catch (Exception e) {\n\n\t\t}\n\t}", "@Override\n\tpublic void create(Teacher teacher) {\n\t\tdao.create(teacher);\n\t}", "public void add(Teacher teacher) {\n Session session = sessionFactory.getCurrentSession();\n Transaction transaction = session.beginTransaction();\n session.save(teacher);\n transaction.commit();\n }", "private void updateTeacherProfileInfo() {\n\t\t\n\t\tteacher.setLastName(tLastNameTF.getText());\n\t\tteacher.setFirstName(tFirstNameTF.getText());\n\t\tteacher.setSchoolName(tSchoolNameTF.getText());\n\t\t\n\t\t//Update Teacher profile information in database\n\t\t\n\t}", "@Test\n public void newTeacher() {\n driver.get(\"http://localhost:3000/teacher\");\n log.info(() -> \"Successfully enter the localhost:3000/teacher for adding a new teacher. time: \" + LocalDateTime.now());\n\n //Button for opening teacher form\n WebElement buttonPlus = driver.findElement(By.xpath(\"/html/body/div/div/main/div[2]/button\"));\n buttonPlus.click();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n TeacherForm teacherForm = new TeacherForm(driver);\n Assertions.assertTrue(teacherForm.isInitialized());\n log.info(() -> \"Teacher form is initialized! time: \" + LocalDateTime.now());\n //I found save button with xpath\n teacherForm.setSaveButton(\"/html/body/div/div/main/div[2]/div[2]/form/div[4]/button[1]\");\n teacherForm.newTeacher(\"Mirko\",\"Vukovic\", \"[email protected]\");\n\n ReceiptPage newTeacherForm = teacherForm.submitSave();\n log.info(() -> \"Submit new teacher was successfully! time: \" + LocalDateTime.now());\n Assertions.assertTrue(newTeacherForm.isInitialized());\n }", "private void verifyTeacher() {\n\t\t\n\t\tchar[] password1 = tPasswordPF1.getPassword();\n\t\tchar[] password2 = tPasswordPF2.getPassword();\n\t\t\n\t\tif (newTeacher || tUpdateProfile) {\n\t\t\t\n\t\t\t//Teacher: FirstName\n\t\t\tif (tFirstNameTF.getText().isEmpty()) { \n\t\t\t\tJOptionPane.showMessageDialog(this,\"Blank Field: First\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\ttFirstNameTF.setBackground(Color.LIGHT_GRAY);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (!tFirstNameTF.getText().isEmpty() && tFirstNameTF.getBackground() == Color.LIGHT_GRAY) { \n\t\t\t\ttFirstNameTF.setBackground(Color.WHITE);\n\t\t\t}\n\t\t\t\n\t\t\t//Teacher: LastName\n\t\t\tif (tLastNameTF.getText().isEmpty()) {\n\t\t\t\tJOptionPane.showMessageDialog(this,\"Blank Field: Last\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\ttLastNameTF.setBackground(Color.LIGHT_GRAY);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (!tLastNameTF.getText().isEmpty() && tLastNameTF.getBackground() == Color.LIGHT_GRAY) { \n\t\t\t\ttLastNameTF.setBackground(Color.WHITE);\n\t\t\t}\n\t\t\t\n\t\t\t//Teacher: SchoolName\n\t\t\tif (tSchoolNameTF.getText().isEmpty()) {\n\t\t\t\tJOptionPane.showMessageDialog(this,\"Blank Field: School\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\ttSchoolNameTF.setBackground(Color.LIGHT_GRAY);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (!tSchoolNameTF.getText().isEmpty() && tSchoolNameTF.getBackground() == Color.LIGHT_GRAY) { \n\t\t\t\ttSchoolNameTF.setBackground(Color.WHITE);\n\t\t\t}\n\t\t\t\n\t\t\t//Teacher: Username\n\t\t\tif (tUsernameTF.getText().isEmpty()) {\n\t\t\t\tJOptionPane.showMessageDialog(this,\"Blank Field: Username\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\ttUsernameTF.setBackground(Color.LIGHT_GRAY);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (!tUsernameTF.getText().isEmpty() && tUsernameTF.getBackground() == Color.LIGHT_GRAY) { \n\t\t\t\ttUsernameTF.setBackground(Color.WHITE);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (newTeacher || tUpdateSecurity) {\n\t\t\t\n\t\t\t//Teacher: Password\n\t\t\tif (tPasswordPF1.getPassword().length == 0) {\n\t\t\t\tif (newTeacher) {\n\t\t\t\t\tJOptionPane.showMessageDialog(this,\"Blank Field: Password\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttPasswordPF1.setBackground(Color.LIGHT_GRAY);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t//Teacher: New Password\n\t\t\t\telse if (tUpdateSecurity) {\n\t\t\t\t\tJOptionPane.showMessageDialog(this,\"Blank Field: New Password\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttPasswordPF1.setBackground(Color.LIGHT_GRAY);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tPasswordPF1.getPassword().length != 0 && tPasswordPF1.getBackground() == Color.LIGHT_GRAY) { \n\t\t\t\ttPasswordPF1.setBackground(Color.WHITE);\n\t\t\t}\n\t\t\t//Teacher: Re-enter Password\n\t\t\tif (tPasswordPF2.getPassword().length == 0) {\n\t\t\t\tif (newTeacher) {\n\t\t\t\t\tJOptionPane.showMessageDialog(this,\"Blank Field: Re-enter Password\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttPasswordPF2.setBackground(Color.LIGHT_GRAY);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t//Teacher: Re-enter New Password\n\t\t\t\telse if (tUpdateSecurity) {\n\t\t\t\t\tJOptionPane.showMessageDialog(this,\"Blank Field: Re-enter New Password\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttPasswordPF2.setBackground(Color.LIGHT_GRAY);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tPasswordPF2.getPassword().length != 0 && tPasswordPF2.getBackground() == Color.LIGHT_GRAY) { \n\t\t\t\ttPasswordPF2.setBackground(Color.WHITE);\n\t\t\t}\n\t\t\t\n\t\t\t//Teacher: Security Question 1\n\t\t\tif (tSecurityQ1TF.getText().isEmpty()) {\n\t\t\t\tJOptionPane.showMessageDialog(this,\"Blank Field: Security Question 1\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\ttSecurityQ1TF.setBackground(Color.LIGHT_GRAY);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (!tSecurityQ1TF.getText().isEmpty() && tSecurityQ1TF.getBackground() == Color.LIGHT_GRAY) { \n\t\t\t\ttSecurityQ1TF.setBackground(Color.WHITE);\n\t\t\t}\n\t\t\t\n\t\t\t//Teacher: Security Question 2\n\t\t\tif (tSecurityQ2TF.getText().isEmpty()) {\n\t\t\t\tJOptionPane.showMessageDialog(this,\"Blank Field: Security Question 2\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\ttSecurityQ2TF.setBackground(Color.LIGHT_GRAY);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (!tSecurityQ2TF.getText().isEmpty() && tSecurityQ2TF.getBackground() == Color.LIGHT_GRAY) { \n\t\t\t\ttSecurityQ2TF.setBackground(Color.WHITE);\n\t\t\t}\n\t\t\t\n\t\t\t//Teacher: Password Equivalency\n\t\t\tif (isPasswordCorrect(password1, password2) != true) {\n\t\t\t\tif (newTeacher) {\n\t\t\t\t\tJOptionPane.showMessageDialog(this,\"Passwords do not match!\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttPasswordPF1.setText(\"\");\n\t\t\t\t\ttPasswordPF2.setText(\"\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t//Teacher: New Password Equivalency\n\t\t\t\telse if (tUpdateSecurity) {\n\t\t\t\t\tJOptionPane.showMessageDialog(this,\"New passwords do not match!\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttPasswordPF1.setText(\"\");\n\t\t\t\t\ttPasswordPF2.setText(\"\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Teacher: Old Password Equivalency\n\t\t\tif (tUpdateSecurity) {\n\t\t\t\t\n\t\t\t\tchar[] oldPassword1 = teacher.getPassword();\n\t\t\t\tchar[] oldPassword2 = tOldPasswordPF.getPassword();\n\t\t\t\t\n\t\t\t\tif (isPasswordCorrect(oldPassword1, oldPassword2) != true) {\n\t\t\t\t\tJOptionPane.showMessageDialog(this,\"Old passwords do not match!\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\ttOldPasswordPF.setText(\"\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (login == true && tUpdateProfile == false && tUpdateSecurity == false) {\n\t\t\treturn;\n\t\t} \n\t\t//Teacher: Update Profile Actions\n\t\telse if (tUpdateProfile) {\n\t\t\ttUpdateProfile = false;\n\t\t\tupdateTeacherProfileInfo();\n\t\t\tupdateTeacherPWindow.dispose();\n\t\t\ttPortalWindow.dispose();\n\t\t\tteacherPortalScreen();\n\t\t}\n\t\t//Teacher: Update Security Actions\n\t\telse if (tUpdateSecurity) {\n\t\t\ttUpdateSecurity = false;\n\t\t\tupdateTeacherSecurityInfo();\n\t\t\tupdateTeacherSWindow.dispose();\n\t\t\ttPortalWindow.dispose();\n\t\t\tteacherPortalScreen();\n\t\t}\n\t\t//Teacher: New User Actions\n\t\telse {\n\t\t\tnewTeacherWindow.dispose();\n\t\t\taddTeacher();\n\t\t\tcreateTempData();\n\t\t\tteacherPortalScreen();\n\t\t}\n\t}", "@Override\n\tpublic User createUser(String username, String password, String role) throws InvalidRegistrationException {\n\t\tUser user = new TeacherUser();\n\t\tsetUserAttributes(user, username, password, role);\n\t\tif (!(\"teacher\".equalsIgnoreCase(user.getRole()))){\n\t\t\tthrow new InvalidRegistrationException();\n\t\t}\n\t\treturn user;\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic int saveTeacher(Teacher teacher) {\n\t\tString username = UserNameUtil.createUsername(teacher.getFirstName());\r\n\t\tSystem.out.println(username);\r\n\t\tList<String> roles = new ArrayList<String>();\r\n\t\troles.add(RoleConstants.TEACHER);\r\n\t\tint id = commonDao.createUserAndSetRoles(username, roles);\r\n\t\tSystem.out.println(\"user id : \"+ id );\r\n\t\tteacher.setTeacherId(id);\r\n\t\tint status = schoolDao.saveTeacher(teacher);\r\n\t\treturn status;\r\n\t}", "public SignUpForm(Context ctx) {\n super(ctx);\n init();\n }", "public TeacherPage clickAddButton() {\n addButton.click();\n return this;\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 jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n tn = new javax.swing.JTextField();\n tp = new javax.swing.JTextField();\n yr = new javax.swing.JComboBox<>();\n br = new javax.swing.JComboBox<>();\n lec = new javax.swing.JComboBox<>();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n sal = new javax.swing.JComboBox<>();\n tid = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n subj = new javax.swing.JComboBox<>();\n jButton4 = new javax.swing.JButton();\n jButton5 = new javax.swing.JButton();\n jLabel8 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n setTitle(\"Add Teacher\");\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowActivated(java.awt.event.WindowEvent evt) {\n formWindowActivated(evt);\n }\n public void windowClosing(java.awt.event.WindowEvent evt) {\n formWindowClosing(evt);\n }\n public void windowOpened(java.awt.event.WindowEvent evt) {\n formWindowOpened(evt);\n }\n });\n\n jPanel1.setBackground(new java.awt.Color(153, 0, 153));\n\n jLabel1.setText(\"Teacher ID:\");\n\n jLabel2.setText(\"Teacher Name:\");\n\n jLabel3.setText(\"Password\");\n\n jLabel4.setText(\"Lectures per week:\");\n\n jLabel5.setText(\"Year\");\n\n jLabel6.setText(\"Branch\");\n\n tn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tnActionPerformed(evt);\n }\n });\n\n tp.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tpActionPerformed(evt);\n }\n });\n\n yr.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Choose Year\" }));\n\n br.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Choose Branch\" }));\n\n lec.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"6\", \"5\", \"4\", \"3\", \"2\", \"1\" }));\n\n jButton1.setText(\"Add\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Clear\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton3.setText(\"Back\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n sal.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Dr.\", \"Mr.\", \"Mrs.\" }));\n sal.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n salActionPerformed(evt);\n }\n });\n\n jLabel7.setText(\"Subjects\");\n\n subj.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Choose Subject\" }));\n\n jButton4.setText(\"Load Subjects\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n\n jButton5.setText(\"Load Branch\");\n jButton5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton5ActionPerformed(evt);\n }\n });\n\n jLabel8.setFont(new java.awt.Font(\"Calibri\", 1, 18)); // NOI18N\n jLabel8.setText(\"Add Teacher\");\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 .addGap(32, 32, 32)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jLabel6)\n .addComponent(jLabel5)\n .addComponent(jLabel3)\n .addComponent(jLabel1)\n .addComponent(jLabel7)\n .addComponent(jLabel4))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 95, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(tp, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(sal, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(tn, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(tid, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(yr, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(br, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(subj, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton4)\n .addComponent(jButton5)))\n .addComponent(lec, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(6, 6, 6))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(110, 110, 110)\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(159, 159, 159)\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(33, 33, 33)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 19, Short.MAX_VALUE)\n .addComponent(tid, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(tn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(sal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(tp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(yr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton5))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel6)\n .addComponent(br, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton4))\n .addGap(4, 4, 4)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7)\n .addComponent(subj, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(lec, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 76, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2)\n .addComponent(jButton3))\n .addGap(26, 26, 26))\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.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "private void jbt_addTeacherActionPerformed(java.awt.event.ActionEvent evt) {\n String name = jtf_TeacherName.getText();\n //Teachers t = new Teachers(name);\n TeacherList.add(name);\n\n listdisplay.addElement(name);\n\n jlist_teacher.setModel(listdisplay);\n\n }", "public void addteacher(Teacher Te){\n this.tlist.add(Te);\n }", "@Test(groups = { \"android\", \"ios\", \"web\", \"BVT04\" })\n\tpublic void P0Pass_4_testSignUpAsATeacher_ChildCareRoom() throws Exception {\n\t\tSystem.out.println(\"P0Pass_1_testSignUpAsATeacher_BoysScout\");\n\t\tString sEmail = \"test_ChildCareRoom\" + getTimeStamp().replaceAll(\"-\", \"_\") + \"@test.com\";\n\t\tSystem.out.println(sEmail);\n\t\tLandingPage.getLandingPage(browser).clickOnCreateAccount().clickOnCreateNewClassGroup().clickOnChildCareRoomGroup()\n\t\t.enterFirstName(\"test\").enterLastName(\"ChildCare Room\")\n\t\t.enterEmailId(sEmail).enterPassword(\"bloomz999\")\n\t\t.clickOnSignUpButton().thenVerifyCreateButtonShouldBeDisplayed().thenVerifyProfileName(\"test ChildCare Room\")\n\t\t.thenVerifyWelcomeScreenTroop(\"Create a Childcare Room\").clickOnSettingButton().clickOnAccountSettingsButton()\n\t\t.clickOnDeleteAccountButton().selectReasonForDeleteButton().selectReasonAsOthersButton()\n\t\t.enterPassword().clickDeletePermanentButton().clickOnYesButton().thenVerifyConfirmMessage().clickOnOkButton()\n\t\t.thenVerifySignInAndCreateButtonsShouldBeDisplayed();\n\t}", "public Teacher(final String id) {\n this._id = id;\n \n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.create_account_gui);\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"MyPref\", 0); // 0 - for private mode\n final int adminDaycare = pref.getInt(\"daycare\", 0); //pull admin's daycare id from shared pref\n //submit button\n Button btnSubmit = findViewById(R.id.btnSubmit);\n //back button\n Button btnBack = findViewById(R.id.buttonCreateBack);\n final RadioButton admin = findViewById(R.id.rdoAdmin);\n final EditText txtFirstName = findViewById(R.id.txtFirstName);\n final EditText txtLastName = findViewById(R.id.txtLastName);\n final EditText txtUsername = findViewById(R.id.txtUsername);\n final EditText txtPassword = findViewById(R.id.txtPassword);\n final EditText txtConfirm = findViewById(R.id.editText5);\n\n btnBack.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent startIntent = new Intent(getApplicationContext(), AdminOptions.class);\n startActivity(startIntent);\n }\n });\n btnSubmit.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n //create instance of the TeacherClass\n TeacherClass t = new TeacherClass();\n //grab text from first name text input and apply to teacher first name\n t.firstName = txtFirstName.getText().toString().trim();\n //grab text from last name text input and apply to teacher last name\n t.lastName = txtLastName.getText().toString().trim();\n //grab text from username text input and and apply to teacher username\n t.username = txtUsername.getText().toString().trim();\n //grab text from password text input and apply to teacher password\n t.password = txtPassword.getText().toString().trim();\n //grab text from password confirm text input and create string variable\n String confirm = txtConfirm.getText().toString().trim();\n t.daycareID = adminDaycare; //admin can only create a user within their own daycare\n //isAdmin - set to true if admin radio button is selected\n if(admin.isChecked()) {\n t.isAdmin = true;\n }\n //verify that all information has been provided and is correct\n if(VerifyInfo(t.firstName, t.lastName, t.username, t.password, confirm)) {\n PasswordHash hash = new PasswordHash();\n t.password = hash.generatedPassword(t.password);\n\n InsertTeacher(t.firstName, t.lastName, t.username, t.password, t.daycareID, t.isAdmin);\n }\n }//end of onClick\n });\n }", "@Test(groups = { \"android\", \"ios\", \"web\", \"BVT01\" })\n\tpublic void P0Pass_1_testSignUpAsATeacher_GirlScout() throws Exception {\n\t\tSystem.out.println(\"P0Pass_1_testSignUpAsATeacher_BoysScout\");\n\t\tString sEmail = \"test_GirlScouts\" + getTimeStamp().replaceAll(\"-\", \"_\") + \"@test.com\";\n\t\tSystem.out.println(sEmail);\n\t\tLandingPage.getLandingPage(browser).clickOnCreateAccount().clickOnCreateNewClassGroup().clickOnGirlScoutsGroup()\n\t\t.enterFirstName(\"test\").enterLastName(\"Girl Scouts\")\n\t\t.enterEmailId(sEmail).enterPassword(\"bloomz999\")\n\t\t.clickOnSignUpButton().thenVerifyCreateButtonShouldBeDisplayed().thenVerifyProfileName(\"test Girl Scouts\")\n\t\t.thenVerifyWelcomeScreenTroop(\"Create a Troop\").clickOnSettingButton().clickOnAccountSettingsButton()\n\t\t.clickOnDeleteAccountButton().selectReasonForDeleteButton().selectReasonAsOthersButton()\n\t\t.enterPassword().clickDeletePermanentButton().clickOnYesButton().thenVerifyConfirmMessage().clickOnOkButton()\n\t\t.thenVerifySignInAndCreateButtonsShouldBeDisplayed();\n\t}", "public signup() {\n initComponents();\n }", "public TeacherPage clickSaveButton() {\n save.click();\n return this;\n }", "@Override\r\n\tpublic void insertTea(Teacher teacher) {\n\r\n\t}", "private void createNewUser() {\n ContentValues contentValues = new ContentValues();\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.GENDER, getSelectedGender());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.PIN, edtConfirmPin.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.LAST_NAME, edtLastName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.FIRST_NAME, edtFirstName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.STATUS, spnStatus.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.DATE_OF_BIRTH, edtDateOfBirth.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.BLOOD_GROUP, spnBloodGroup.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.IS_DELETED, \"N\");\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.MOBILE_NUMBER, edtMobileNumber.getText().toString());\n contentValues.put(DataBaseConstants.Constants_TBL_CATEGORIES.CREATE_DATE, Utils.getCurrentDateTime(Utils.DD_MM_YYYY));\n\n dataBaseHelper.saveToLocalTable(DataBaseConstants.TableNames.TBL_PATIENTS, contentValues);\n context.startActivity(new Intent(CreatePinActivity.this, LoginActivity.class));\n }", "@Override\n\tpublic long create(Teacher teacher) {\n\t\treturn 0;\n\t}", "private void fillTeachers() {\n for(Teacher t : MainFrame.etablissement.getTeachers()) {\n principalTeacher.addItem(t);\n }\n }", "public Person TeacherPerson(String name, String gender, String assumptionDate)\n {\n this._name =new String(name);\n this._gender = new String(gender);\n this._assumptionDate = new String(assumptionDate);\n this._userType = new String(\"Teacher\");\n\n return this;\n }", "public void addNewAssingment() throws IOException {\r\n\t\tconnectionmain.showTeacherGUIAssWindow();\r\n\t}", "public void setupUserProfile(TutorMeProfile tutorProfile) {\n\n //Grab views from screen\n LinearLayout layout = (LinearLayout) findViewById(R.id.subjectList);\n Button b = (Button) findViewById(R.id.addSubjButton);\n EditText bioField = (EditText) findViewById(R.id.BioField);\n\n //Set views appropriately\n if (tutorProfile != null) {\n if (tutorProfile.getSubjects() != null) {\n subjectList = tutorProfile.getSubjects();\n }\n\n if (tutorProfile.getDescription() != null) {\n bioField.setText(tutorProfile.getDescription());\n }\n\n TextView gradeField = (TextView) findViewById(R.id.GradeLevelField);\n if (tutorProfile.getGradeLevels() != null) {\n for (String s : tutorProfile.getGradeLevels()) {\n gradeField.setText(s + \", \");\n }\n }\n\n\n // Getting fields and setting test\n layout.removeView(findViewById(R.id.addSubjButton));\n if (subjectList != null) {\n for (String subject : subjectList) {\n Button newSkill = new Button(findViewById(R.id.subjectList).getContext());\n newSkill.setText(subjectList.get(0));\n\n //Add functionality to button\n newSkill.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n removeSkill(view);\n }\n });\n subjectButtons.add(newSkill);\n layout.addView(newSkill);\n disableSkillButtons();\n }\n }\n //Have the add button stay at the bottom\n layout.addView(b);\n }\n\n }", "public EditTeacher() {\n initComponents();\n// TeacherList.add(\"林颖\");\n// TeacherList.add(\"刘畅\");\n// TeacherList.add(\"王媛\");\n// TeacherList.add(\"李发金\");\n\n }", "private void createBtnActionPerformed(java.awt.event.ActionEvent evt) {\n\n staff.setName(regName.getText());\n staff.setID(regID.getText());\n staff.setPassword(regPwd.getText());\n staff.setPosition(regPos.getSelectedItem().toString());\n staff.setGender(regGender.getSelectedItem().toString());\n staff.setEmail(regEmail.getText());\n staff.setPhoneNo(regPhone.getText());\n staff.addStaff();\n if (staff.getPosition().equals(\"Vet\")) {\n Vet vet = new Vet();\n vet.setExpertise(regExp.getSelectedItem().toString());\n vet.setExpertise_2(regExp2.getSelectedItem().toString());\n vet.addExpertise(staff.getID());\n }\n JOptionPane.showMessageDialog(null, \"User added to database\");\n updateJTable();\n }", "@PostMapping\n\tpublic ResponseEntity<?> addTeacherDetails(@RequestBody TeacherDetails t)\n\t{\n\t\tSystem.out.println(\"in addTeacherDetails\"+ t );\n\t\ttry {\n\t\t\tTeacherDetails savedTeacherDetails= service.addTeacherDetails(t);\n\t\t\treturn new ResponseEntity<>(savedTeacherDetails, HttpStatus.OK);\n\t\t\n\t\t}catch (RuntimeException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR );\n\t\t}\n\t}", "@Override\n\tpublic ResponseEntity<?> postPutTeacher(UTeacherEntity teacher, UserDTO newTeacher) {\n\t\tif (newTeacher.getTeacherTitle() == null) {\n\t\t\treturn new ResponseEntity<RestError>(new RestError(2, \"Title must be provided\"), HttpStatus.BAD_REQUEST);\n\t\t}\n\t\tif (newTeacher.getTeacherNoOfLicence() == null) {\n\t\t\treturn new ResponseEntity<RestError>(new RestError(2, \"Teacher number of licence must be provided\"),\n\t\t\t\t\tHttpStatus.BAD_REQUEST);\n\t\t}\n\t\tteacher.setName(newTeacher.getName());\n\t\tteacher.setLastName(newTeacher.getLastName());\n\t\tteacher.setEmail(newTeacher.getEmail());\n\t\tteacher.setTitle(newTeacher.getTeacherTitle());\n\t\tteacher.setNoOfLicence(newTeacher.getTeacherNoOfLicence());\n\t\tteacherRepo.save(teacher);\n\t\tlogger.error(\"Error occured while creating tgs\");\n\t\tlogger.info(\"Admin (email: \" + AuthController.getEmail() + \") added new/updated teacher \" + teacher);\n\n\t\treturn new ResponseEntity<UTeacherEntity>(teacher, HttpStatus.OK);\n\t}", "private void addorUpdteTeacher(HttpServletRequest req, HttpServletResponse resp,boolean update) throws ServletException, IOException {\n\t\tString url=\"/listTeacher.jsp\";\n\t\tTeacher teacher=new Teacher();\n\t\tString firstName=req.getParameter(\"firstName\");\n\t\tString lastName=req.getParameter(\"lastName\");\n\t\tString designation=req.getParameter(\"designation\");\n\t\tteacher.setFirstName(firstName);\n\t\tteacher.setLastName(lastName);\n\t\tteacher.setDesignation(designation);\n\t\t\n\t\t\ttry {\n\t\t\t\tif(!update) {\n\t\t\t\tteacherDAO.addTeacher(teacher);\n\t\t\t\t}else {\n\t\t\t\t\tint id=Integer.parseInt(req.getParameter(\"teacherid\"));\n\t\t\t\t\tteacher.setId(id);\n\t\t\t\t\tteacherDAO.updateTeacher(teacher);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\treq.setAttribute(\"message\", e.getMessage());\n\t\t\t\tif(!update)\n\t\t\t\t\turl=\"/addTeacher.jsp\";\n\t\t\t\telse \n\t\t\t\t\turl=\"/updateTeacher.jsp\";\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t\n\t\t\n\t\treq.getRequestDispatcher(url)\n\t\t.forward(req, resp);;\n\t\t\n\n\t}", "@Override\n\tpublic int insertTeacher(Sy05 record) {\n\t\treturn 0;\n\t}", "public SignUp() {\n initComponents();\n }", "public SignUp() {\n initComponents();\n }", "@POST\n @Path(\"TeacherGuestLogin\")\n @Deprecated\n public void teacherGuestLogin(AuthenticationInformation authInfo) {\n User user = userFacade.guestLogin();\n try {\n user.addRole(roleFacade.findByName(\"Scenarist\"));\n } catch (WegasNoResultException ex) {\n throw WegasErrorMessage.error(\"Teacher mode is not available\");\n }\n }", "public Sign_Up() {\n initComponents();\n }", "public Sign_up() {\n initComponents();\n }", "public Signup() {\n initComponents();\n }", "private void register() {\r\n if (mName.getText().length() == 0) {\r\n mName.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mEmail.getText().length() == 0) {\r\n mEmail.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mPassword.getText().length() == 0) {\r\n mPassword.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mPassword.getText().length() < 6) {\r\n mPassword.setError(\"password must have at least 6 characters\");\r\n return;\r\n }\r\n\r\n\r\n final String email = mEmail.getText().toString();\r\n final String password = mPassword.getText().toString();\r\n final String name = mName.getText().toString();\r\n\r\n FirebaseAuth.getInstance().createUserWithEmailAndPassword(email, password).addOnCompleteListener(getActivity(), new OnCompleteListener<AuthResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\r\n if (!task.isSuccessful()) {\r\n Snackbar.make(view.findViewById(R.id.layout), \"sign up error\", Snackbar.LENGTH_SHORT).show();\r\n } else {\r\n String uid = FirebaseAuth.getInstance().getCurrentUser().getUid();\r\n\r\n //Saves the user's info in the database\r\n Map<String, Object> mNewUserMap = new HashMap<>();\r\n mNewUserMap.put(\"email\", email);\r\n mNewUserMap.put(\"name\", name);\r\n\r\n FirebaseDatabase.getInstance().getReference().child(\"users\").child(uid).updateChildren(mNewUserMap);\r\n }\r\n }\r\n });\r\n\r\n }", "public void addTeacher(Teacher teacher) {\n\t\tteachersRepository.save(teacher);\r\n\t\t//teachersList.add(teacher);\r\n\t}", "public void register(View view) {\n if(radioGroup.getCheckedRadioButtonId() == -1){\n Snackbar.make(getCurrentFocus(),\"Please select one of the Options: Student or Professor\",Snackbar.LENGTH_LONG).show();\n return;\n }\n if (usn.getText().toString().trim().equals(\"\")){\n usn.setError(\"This field cannot be empty\");\n return;\n } else if (password.getText().toString().trim().equals(\"\")){\n password.setError(\"This field cannot be empty\");\n return;\n } else if(password.getText().toString().trim().length() < 8){\n password.setError(\"Password too short.\");\n return;\n } else if(confirmPassword.getText().toString().trim().equals(\"\")){\n confirmPassword.setError(\"This field cannot be empty\");\n return;\n } else if(!(password.getText().toString().trim()\n .equals(confirmPassword.getText().toString().trim()))){\n password.setError(\"Passwords do not match\");\n confirmPassword.setError(\"Passwords do not match\");\n return;\n }\n progressBar.setVisibility(View.VISIBLE);\n mAuth.signInAnonymously().addOnSuccessListener(authResult -> myRef.child(usn.getText().toString().trim()).addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n try {\n String username = dataSnapshot.child(\"emailId\").getValue().toString();\n String password = confirmPassword.getText().toString().trim();\n System.out.println(username);\n mAuth.createUserWithEmailAndPassword(username,password)\n .addOnCompleteListener(RegisterActivity.this,task -> {\n Log.d(\"TAG\",\"Created User:\"+task.isSuccessful());\n if(!task.isSuccessful()){\n Toast.makeText(RegisterActivity.this, \"Error occurred.\" +\n \" Could not create user. Please \" +\n \"check your internet connection\", Toast.LENGTH_LONG).show();\n return;\n }\n else {\n startActivity(new Intent(RegisterActivity.this,LoginActivity.class));\n finish();\n }\n });\n\n }catch (NullPointerException e){\n usn.setError(\"Invalid USN. Please check your input or contact\" +\n \" your department for help\");\n progressBar.setVisibility(View.INVISIBLE);\n }\n }\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n }))\n .addOnFailureListener(e -> {\n progressBar.setVisibility(View.INVISIBLE);\n Snackbar.make(view,\"Something went wrong.Please check if you have an internet connection or that the details\" +\n \"entered are valid\",Snackbar.LENGTH_LONG).show();\n });\n }", "public TeacherPage setNameTextField() {\n return setNameTextField(data.get(\"NAME\"));\n }", "@Test(groups = { \"android\", \"ios\", \"web\", \"BVT03\" })\n\tpublic void P0Pass_3_testSignUpAsATeacher_SportsTeam() throws Exception {\n\t\tSystem.out.println(\"P0Pass_1_testSignUpAsATeacher_BoysScout\");\n\t\tString sEmail = \"test_SportsTeam\" + getTimeStamp().replaceAll(\"-\", \"_\") + \"@test.com\";\n\t\tSystem.out.println(sEmail);\n\t\tLandingPage.getLandingPage(browser).clickOnCreateAccount().clickOnCreateNewClassGroup().clickOnSportsTeamGroup()\n\t\t.enterFirstName(\"test\").enterLastName(\"Sports Team\")\n\t\t.enterEmailId(sEmail).enterPassword(\"bloomz999\")\n\t\t.clickOnSignUpButton().thenVerifyCreateButtonShouldBeDisplayed().thenVerifyProfileName(\"test Sports Team\")\n\t\t.thenVerifyWelcomeScreenTroop(\"Create a Sports Team\").clickOnSettingButton().clickOnAccountSettingsButton()\n\t\t.clickOnDeleteAccountButton().selectReasonForDeleteButton().selectReasonAsOthersButton()\n\t\t.enterPassword().clickDeletePermanentButton().clickOnYesButton().thenVerifyConfirmMessage().clickOnOkButton()\n\t\t.thenVerifySignInAndCreateButtonsShouldBeDisplayed();\n\t}", "public Teacher() {\n// coursesTaught = new ArrayList<Course>();\n }", "private void saveData(){\n databaseReference.setValue(new Teacher(0, \"\", 0.0));\n }", "TeacherRecord createTeacherRecord(String firstName, String lastName, String address, String phone,\n\t\t\tCourseType specialization, String location, String clientId) throws Exception;", "public void signup(View view){\r\n if(editText1.getText().toString().isEmpty()||editText2.getText().toString().isEmpty()||editText3.getText().toString().isEmpty()\r\n ||editText4.getText().toString().isEmpty()||editText5.getText().toString().isEmpty()){\r\n Toast.makeText(this, \"Παρακαλώ εισάγετε όλα τα απαραίτητα πεδία προκειμένου να εγγραφείτε.\", Toast.LENGTH_SHORT).show();\r\n }\r\n else{\r\n mAuth.createUserWithEmailAndPassword(editText1.getText().toString(), editText2.getText().toString())\r\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\r\n\r\n if (task.isSuccessful()) {\r\n new_user = mAuth.getCurrentUser();\r\n create_users_list(new_user.getUid());\r\n String userid=new_user.getUid();\r\n String firstname=editText3.getText().toString();\r\n String lastname=editText4.getText().toString();\r\n String address=editText5.getText().toString();\r\n SharedPreferences.Editor editor=pref.edit();\r\n editor.putString(userid+\"firstname\",firstname);\r\n editor.putString(userid+\"lastname\",lastname);\r\n editor.putString(userid+\"address\",address);\r\n editor.apply();\r\n Intent intent = new Intent(getApplicationContext(), MainActivity3.class);\r\n intent.putExtra(\"userid\", new_user.getUid());\r\n\r\n startActivity(intent);\r\n\r\n\r\n } else {\r\n Toast.makeText(getApplicationContext(), task.getException().getMessage(),\r\n Toast.LENGTH_SHORT).show();\r\n\r\n }\r\n }\r\n }\r\n );}}", "void save(Teacher teacher);", "@RequestMapping(value = \"/teacher\", method = RequestMethod.POST)\n public ModelAndView addTeacher(HttpServletRequest request,\n @RequestParam(name = \"fio\") String fio,\n @RequestParam(name = \"priority\") String priority) {\n\n return new ModelAndView(\"teacher\");\n }", "@Test(groups = { \"android\", \"ios\", \"web\", \"BVT02\" })\n\tpublic void P0Pass_2_testSignUpAsATeacher_BoysScout() throws Exception {\n\t\tSystem.out.println(\"P0Pass_1_testSignUpAsATeacher_BoysScout\");\n\t\tString sEmail = \"test_BoyScouts\" + getTimeStamp().replaceAll(\"-\", \"_\") + \"@test.com\";\n\t\tSystem.out.println(sEmail);\n\t\tLandingPage.getLandingPage(browser).clickOnCreateAccount().clickOnCreateNewClassGroup().clickOnBoyScoutsGroup()\n\t\t.enterFirstName(\"test\").enterLastName(\"Boy Scouts\")\n\t\t.enterEmailId(sEmail).enterPassword(\"bloomz999\")\n\t\t.clickOnSignUpButton().thenVerifyCreateButtonShouldBeDisplayed().thenVerifyProfileName(\"test Boy Scouts\")\n\t\t.thenVerifyWelcomeScreenTroop(\"Create a Troop\").clickOnSettingButton().clickOnAccountSettingsButton()\n\t\t.clickOnDeleteAccountButton().selectReasonForDeleteButton().selectReasonAsOthersButton()\n\t\t.enterPassword().clickDeletePermanentButton().clickOnYesButton().thenVerifyConfirmMessage().clickOnOkButton()\n\t\t.thenVerifySignInAndCreateButtonsShouldBeDisplayed();\n\t}", "public TeacherInsertDialog(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents();\n }", "public void setCourseTeacher(String courseTeacher) {\n this.courseTeacher = courseTeacher;\n }", "public void insert(Teacher o) throws SQLException {\n\t\t\r\n\t}", "public TeacherPage(WebDriver driver) {\n super(driver);\n }", "public sign_up_page() {\n initComponents();\n }", "@Override\n public void onClick(View v) {\n firstName = etFirstName.getText().toString().trim();\n lastName = etLastName.getText().toString().trim();\n username = etUsername.getText().toString().trim();\n password = etPassword.getText().toString().trim();\n confirmPassword = etConfirmPassword.getText().toString().trim();\n email = etEmail.getText().toString().trim();\n major=etMajor.getText().toString().trim();\n university=etUniversity.getText().toString().trim();\n isTutor = tutorCheckBox.isChecked();\n\n if (validateInputs()) {\n registerUser();\n }\n\n }", "public Admin_SignUp() {\n initComponents();\n }", "public SignUP() {\n initComponents();\n }", "@Override\n public void onClick(View view) {\n\n int genderselecter = signupgenderbuttongroup.getCheckedRadioButtonId();\n genderbutton = (RadioButton) findViewById(genderselecter);\n\n\n // UserType radio button selector\n\n int usertypeselector = signupusertypebuttongroup.getCheckedRadioButtonId();\n usertypebutton = (RadioButton) findViewById(usertypeselector);\n\n\n if (validate()){\n // cloud upload data into database\n\n final String fullname = signupfullnameet.getText().toString().trim();\n final String emailid = signupemailet.getText().toString().trim();\n final String mobileno = signupmobilenoet.getText().toString().trim();\n final String mfgender = genderbutton.getText().toString();\n final String hpassword = signuppasswordet.getText().toString().trim();\n final String usertype = usertypebutton.getText().toString();\n\n\n mAuth.createUserWithEmailAndPassword(emailid,hpassword)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n\n // Send Verification Link\n\n final FirebaseUser emailverify = mAuth.getCurrentUser();\n emailverify.sendEmailVerification().addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(SignUpActivity.this, \"Varification Email has been send\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.e(\"Email not send !\", \"===>\" + e.getMessage());\n }\n\n });\n Toast.makeText(SignUpActivity.this, \"Registered Succesfully\", Toast.LENGTH_SHORT).show();\n\n // Store Realtime database storedata\n\n rootNode = FirebaseDatabase.getInstance();\n reference = rootNode.getReference(\"User\");\n\n String user_id = null;\n UserHalper userHalper = new UserHalper(fullname, emailid, mobileno, mfgender, hpassword, usertype, user_id);\n reference.child(mobileno).setValue(userHalper);\n\n // Store in Cloude Database\n user_id = FirebaseAuth.getInstance().getCurrentUser().getUid();\n\n Map<String, String> userinfo = new HashMap<>();\n userinfo.put(\"Email ID\", emailid);\n userinfo.put(\"Full Name\", fullname);\n userinfo.put(\"Mobile Number\", mobileno);\n userinfo.put(\"Gender\", mfgender);\n userinfo.put(\"User-Type\", usertype);\n userinfo.put(\"Password\", hpassword);\n userinfo.put(\"User_ID\", user_id);\n\n database = FirebaseFirestore.getInstance();\n database.collection(\"User\").document(user_id)\n .set(userinfo)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n finish();\n startActivity(new Intent(getApplicationContext(), LoginActivity.class));\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(), \"Something went's Wrong !\", Toast.LENGTH_SHORT).show();\n }\n });\n }\n }\n });\n mprogress.setMessage(\"Please wait...\");\n mprogress.show();\n }\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_admin_register_team);\n getSupportActionBar().setTitle(\"Team Registration\");\n edUserName = (EditText)findViewById(R.id.edx1_username);\n edPassword = (EditText)findViewById(R.id.edx2_pw);\n edCollegeName = (EditText)findViewById(R.id.ed3_college_name);\n edParticipant1 = (EditText)findViewById(R.id.edx_p1);\n edParticipant2 = (EditText)findViewById(R.id.edx_p2);\n edParticipant3 = (EditText)findViewById(R.id.edx_p3);\n edParticipant4 = (EditText)findViewById(R.id.edx_p4);\n edPartcipant5= (EditText)findViewById(R.id.edx_p5);\n registerButton = (Button)findViewById(R.id.button_register_team);\n lottieAnimationView = findViewById(R.id.xxxlottie);\n lottieAnimationView.setVisibility(View.INVISIBLE);\n registerButton.setOnClickListener(this);\n\n\n\n }", "public String getTeacherName() {\n return teacherName;\n }", "public String getTeacherName() {\n/* 31 */ return this.teacherName;\n/* */ }", "public void setTeacher(Student s) {\n // TODO implement here\n \tthis.teacher = s;\n }", "private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }", "boolean insertUser(SchoolSubject schoolSubject);", "public SignUpForm(Context ctx, AttributeSet attrs) {\n super(ctx, attrs);\n init();\n }", "@Override\n public Teacher getModel() {\n return teacher;\n }", "public CreateProfile() {\n initComponents();\n }", "public void createUser(SignUpDto signupdto) {\n\t\tUser user = new User();\r\n\t\t\r\n\t\tuser.setId(signupdto.getId());\r\n\t\tuser.setPw(signupdto.getPw());\r\n\t\tuser.setNickname(signupdto.getNickname());\r\n\t\t\r\n\t\tuserRepository.save(user);\t\r\n\t}", "public void signUp() {\n presenter.signup(username.getText().toString(), password.getText().toString());\n }", "public void setTeacherLogin(String newTeacherLogin) {\n\t\tthis.teacherLogin = newTeacherLogin;\n\t}", "public void edit(Teacher teacher) {\n Session session = sessionFactory.getCurrentSession();\n Teacher existingTeacher = (Teacher) session.get(Teacher.class, teacher.getEmail());\n Transaction transaction = session.beginTransaction();\n\n existingTeacher.setName(teacher.getName());\n existingTeacher.setCountry(teacher.getCountry());\n existingTeacher.setInfo(teacher.getInfo());\n existingTeacher.setPicture(teacher.getPicture());\n existingTeacher.setBirthDate(teacher.getBirthDate());\n existingTeacher.setUniversity(teacher.getUniversity());\n existingTeacher.setPost(teacher.getPost());\n existingTeacher.setDegree(teacher.getDegree());\n\n session.save(existingTeacher);\n transaction.commit();\n }", "public frm_tutor_subida_prueba() {\n }", "private void createSubject(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n // Formulareingaben prüfen\n String name = request.getParameter(\"name\");\n\n Subject subject = new Subject(name);\n List<String> errors = this.validationBean.validate(subject);\n\n // Neue Kategorie anlegen\n if (errors.isEmpty()) {\n this.subjectBean.saveNew(subject);\n }\n\n // Browser auffordern, die Seite neuzuladen\n if (!errors.isEmpty()) {\n FormValues formValues = new FormValues();\n formValues.setValues(request.getParameterMap());\n formValues.setErrors(errors);\n\n HttpSession session = request.getSession();\n session.setAttribute(\"subjects_form\", formValues);\n }\n\n response.sendRedirect(request.getRequestURI());\n }", "private void setupFirebase(){\n FirebaseAuth firebaseAuth = FirebaseAuth.getInstance();\n FirebaseUser user = firebaseAuth.getCurrentUser();\n\n FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();\n if (user!=null){\n databaseReference = firebaseDatabase.getReference(\"Users\").child(user.getUid()).child(\"teacher\");\n }\n }", "private void onSignUpPressed(View view) {\n Intent intent = new Intent(LoginActivity.this, CreateAccountActivity.class);\n startActivity(intent);\n }", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "private void addStudent() {\n\t\t\n\t\tString lastName = sLastNameTF.getText();\n\t\tString firstName = sFirstNameTF.getText();\n\t\tString schoolName = sSchoolNameTF.getText();\n\t\tchar[] password = sPasswordPF1.getPassword();\n\t\tString sA1 = sSecurityQ1TF.getText();\n\t\tString sQ1 = (String)sSecurityList1.getSelectedItem();\n\t\tString sA2 = sSecurityQ2TF.getText();\n\t\tString sQ2 = (String)sSecurityList2.getSelectedItem();\n\t\tString grade = (String)sGradeList.getSelectedItem();\n\t\t\n\t\tstudent = new Student(lastName, firstName, schoolName, password, sA1, sQ1, sA2, sQ2, grade);\n\t\t\n\t\t//Add student to database\n\t\t\n\t}", "@Override\n public ApiResponse createUser(SignupDto signupDto){\n var userRole = this.roleDAO.findByName(RoleEnum.USER);\n Set<Role> userRoles = new HashSet<Role>(Collections.singletonList(userRole.get()));\n\n Person newPerson = new Person();\n newPerson.setEmail(signupDto.getUsername());\n newPerson.setFirstName(signupDto.getFirstName());\n newPerson.setLastName(signupDto.getLastName());\n newPerson.setRoles(userRoles);\n\n // Encriptamos la contraseña que nos mando el usuario\n var encryptedPassword = this.passwordEncoder.encode(signupDto.getPassword());\n newPerson.setPassword(encryptedPassword);\n\n this.personDAO.save(newPerson);\n\n return new ApiResponse(true, \"Usuario creado\");\n\n }", "private void submitNewUser() {\n\t\tboolean validationFlag = true;\n\t\tArrayList<HashMap<String, String>> signUpFields = new ArrayList<HashMap<String, String>>();\n\t\tint size = lnr_form.getChildCount();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tLinearLayout v = (LinearLayout) lnr_form.getChildAt(i);\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tHashMap<String, String> field = (HashMap<String, String>) v.getTag();\n\n\t\t\tIjoomerEditText edtValue = null;\n\t\t\tSpinner spnrValue = null;\n\n\t\t\tif (field != null) {\n\t\t\t\tif (field.get(TYPE).equals(TEXT)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEdit)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(TEXTAREA)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditArea)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(PASSWORD)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrPassword)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(MAP)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditMap)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(\"type\").equals(LABEL)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrLabel)).findViewById(R.id.txtValue);\n\t\t\t\t} else if (field.get(TYPE).equals(DATE)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\n\t\t\t\t\tif (edtValue.getText().toString().trim().length() > 0) {\n\t\t\t\t\t\tif (!IjoomerUtilities.birthdateValidator(edtValue.getText().toString().trim())) {\n\t\t\t\t\t\t\tedtValue.setFocusable(true);\n\t\t\t\t\t\t\tedtValue.setError(getString(R.string.validation_invalid_birth_date));\n\t\t\t\t\t\t\tvalidationFlag = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (field.get(TYPE).equals(MULTIPLESELECT)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\t\t\t\t}\n\t\t\t\tif (field.get(TYPE).equals(TIME)) {\n\t\t\t\t\tedtValue = (IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrEditClickable)).findViewById(R.id.txtValue);\n\t\t\t\t}\n\n\t\t\t\tif (field.get(TYPE).equals(SELECT)) {\n\t\t\t\t\tspnrValue = (Spinner) ((LinearLayout) v.findViewById(R.id.lnrSpin)).findViewById(R.id.txtValue);\n\t\t\t\t\tfield.put(VALUE, spnrValue.getSelectedItem().toString());\n\t\t\t\t\tsignUpFields.add(field);\n\t\t\t\t} else if (field.get(TYPE).equals(PASSWORD) && field.get(NAME).equals(\"Retype Password\")) {\n\t\t\t\t\tint len = lnr_form.getChildCount();\n\t\t\t\t\tfor (int j = 0; j < len; j++) {\n\t\t\t\t\t\tLinearLayout view = (LinearLayout) lnr_form.getChildAt(i);\n\t\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\t\tHashMap<String, String> row = (HashMap<String, String>) view.getTag();\n\t\t\t\t\t\tif (row.get(TYPE).equals(PASSWORD) && field.get(NAME).equals(\"Password\")) {\n\t\t\t\t\t\t\tString password = ((IjoomerEditText) ((LinearLayout) v.findViewById(R.id.lnrPassword)).findViewById(R.id.txtValue)).getText().toString();\n\t\t\t\t\t\t\tif (password.equals(edtValue.getText().toString())) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tedtValue.setError(getString(R.string.validation_password_not_match));\n\t\t\t\t\t\t\t\tvalidationFlag = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (edtValue != null && edtValue.getText().toString().trim().length() <= 0 && (field.get(REQUIRED).equals(\"1\"))) {\n\t\t\t\t\tedtValue.setError(getString(R.string.validation_value_required));\n\t\t\t\t\tvalidationFlag = false;\n\t\t\t\t} else {\n\t\t\t\t\tfield.put(VALUE, edtValue.getText().toString().trim());\n\t\t\t\t\tsignUpFields.add(field);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (validationFlag) {\n\t\t\tfinal SeekBar proSeekBar = IjoomerUtilities.getLoadingDialog(getString(R.string.dialog_loading_register_newuser));\n\t\t\tnew IjoomerRegistration(this).submitNewUser(signUpFields, new WebCallListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onProgressUpdate(int progressCount) {\n\t\t\t\t\tproSeekBar.setProgress(progressCount);\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onCallComplete(final int responseCode, String errorMessage, ArrayList<HashMap<String, String>> data1, Object data2) {\n\t\t\t\t\tif (responseCode == 200) {\n\t\t\t\t\t\tIjoomerUtilities.getCustomOkDialog(getString(R.string.dialog_loading_profile), getString(R.string.registration_successfully), getString(R.string.ok),\n\t\t\t\t\t\t\t\tR.layout.ijoomer_ok_dialog, new CustomAlertNeutral() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void NeutralMethod() {\n\n\t\t\t\t\t\t\t\t\t\tIntent intent = new Intent(\"clearStackActivity\");\n\t\t\t\t\t\t\t\t\t\tintent.setType(\"text/plain\");\n\t\t\t\t\t\t\t\t\t\tsendBroadcast(intent);\n\t\t\t\t\t\t\t\t\t\tIjoomerWebService.cookies = null;\n\n\t\t\t\t\t\t\t\t\t\tloadNew(IjoomerLoginActivity.class, IPropertyRegistrationActivity.this, true);\n\t\t\t\t\t\t\t\t\t\tfinish();\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} else {\n\t\t\t\t\t\tIjoomerUtilities.getCustomOkDialog(getString(R.string.dialog_loading_profile),\n\t\t\t\t\t\t\t\tgetString(getResources().getIdentifier(\"code\" + responseCode, \"string\", getPackageName())), getString(R.string.ok), R.layout.ijoomer_ok_dialog,\n\t\t\t\t\t\t\t\tnew CustomAlertNeutral() {\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void NeutralMethod() {\n\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}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "public void onSignUpClick() {\n\t\tString uid = regview.getUsername();\n\t\tString pw = regview.getPassword();\n\t\tString na = regview.getName();\n\t\tString em = regview.getEmail();\n\t\tString text = \"\";\n\t\tif(uid.equals(\"\") || pw.equals(\"\") || na.equals(\"\")|| em.equals(\"\")){\n\t\t\ttext = \"Please fill out all fields!\";\n\t\t} else if(regview.findUser(uid)!=User.NULL_USER){\n\t\t\ttext = \"The username already exsit, please try another one!\";\n\t\t} else {\n\t\t\tregview.addUser(new User(uid,pw,na,em));\n\t\t\tregview.goLoginPage();\n\t\t}\n\t\tregview.setRegisterText(text);\n\t}", "@Override\n public void onClick(View v) {\n if (edtUsername.getText().toString().isEmpty() || edtEmail.getText().toString().isEmpty()\n || edtPass.getText().toString().isEmpty() || edtConfirmPW.getText().toString().isEmpty() || (!radioDr.isChecked() && !radioUser.isChecked())) {\n if (radioDr.isChecked()) {\n if (edtLisence.getText().toString().isEmpty() || edtWork_place.getText().toString().isEmpty()) {\n Toast.makeText(RegisterActivity.this, \"All fields are required\", Toast.LENGTH_SHORT).show();\n }\n }\n Toast.makeText(RegisterActivity.this, \"All fields are required\", Toast.LENGTH_SHORT).show();\n } else if (edtPass.getText().toString().length() < 6) {\n Toast.makeText(RegisterActivity.this, \"Password must be least 6 characters\", Toast.LENGTH_SHORT).show();\n } else {\n String rl = checkRole(role);\n if (edtAllergy.getText().toString().isEmpty()) {\n String allergy = DEFAULT;\n registerNewUser(edtUsername.getText().toString(), edtEmail.getText().toString(), edtPass.getText().toString(), rl,\n edtWork_place.getText().toString(), edtLisence.getText().toString(), specialist, status, allergy);\n }\n }\n }", "public void onClickSignUp(View view) {\r\n\t\tcheckRegistationValidation();\r\n\t}", "private void updateTeacherSecurityInfo() {\n\t\t\n\t\tteacher.setPassword(tOldPasswordPF.getPassword());\n\t\tteacher.setSecuirtyAnswer1(tSecurityQ1TF.getText());\n\t\tteacher.setSecurityQuestion1((String)tSecurityList1.getSelectedItem());\n\t\tteacher.setSecurityAnswer2(tSecurityQ2TF.getText());\n\t\tteacher.setSecurityQuestion2((String)tSecurityList1.getSelectedItem());\n\t\t\n\t\t//Update Teacher security information in database\n\t\t\n\t}", "public void onClick(View view) {\n if(validate_info()){\n create_user();\n user = FirebaseAuth.getInstance().getCurrentUser();\n if (user != null) {\n submit_profile(user);\n }\n }\n else{\n return;\n\n\n }\n }", "public void addClassToTeacher(Classes teacher_class) {\n db.addClassToTeacher(teacher_class);\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}" ]
[ "0.7547138", "0.72069365", "0.70299226", "0.6940697", "0.69229704", "0.6754126", "0.6616964", "0.6572236", "0.64318955", "0.6333145", "0.63162297", "0.6239156", "0.6233265", "0.61469173", "0.61058474", "0.6008204", "0.5953523", "0.5953146", "0.59461087", "0.5884362", "0.5867915", "0.5859251", "0.58274937", "0.5809586", "0.5789449", "0.5787588", "0.5739051", "0.5712935", "0.57009435", "0.5683339", "0.5675985", "0.567168", "0.56440043", "0.5605352", "0.558836", "0.5575227", "0.5569094", "0.55553895", "0.55507356", "0.55408096", "0.5530053", "0.5507178", "0.5504868", "0.54807174", "0.54687524", "0.5460071", "0.5460071", "0.5432508", "0.5416993", "0.5402811", "0.53998095", "0.5381257", "0.53788537", "0.53760624", "0.5366342", "0.5363209", "0.5344693", "0.5341549", "0.53415465", "0.53390175", "0.53351694", "0.53228444", "0.53215533", "0.5306496", "0.53040695", "0.5303524", "0.53030413", "0.53020555", "0.52966756", "0.52755034", "0.5266261", "0.5261953", "0.5253575", "0.52513933", "0.5238445", "0.52379113", "0.52143323", "0.5212583", "0.5204186", "0.51890296", "0.51806355", "0.5170469", "0.51680344", "0.5164677", "0.5153393", "0.5150975", "0.51446706", "0.5141434", "0.5138258", "0.5131089", "0.5128917", "0.51289004", "0.5104251", "0.5103317", "0.5098875", "0.5095244", "0.5078506", "0.50777364", "0.5067996", "0.50610363" ]
0.5812795
23
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() { jTextField3 = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); tf_cc = new javax.swing.JTextField(); tf_name = new javax.swing.JTextField(); tf_pass = new javax.swing.JTextField(); btnSignUp = new javax.swing.JButton(); jButton1 = new javax.swing.JButton(); jLabel4 = new javax.swing.JLabel(); jTextField3.setText("jTextField1"); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setBounds(new java.awt.Rectangle(100, 500, 770, 522)); setPreferredSize(new java.awt.Dimension(770, 522)); getContentPane().setLayout(null); jLabel1.setFont(new java.awt.Font(".AppleSystemUIFont", 1, 18)); // NOI18N jLabel1.setForeground(new java.awt.Color(255, 255, 255)); jLabel1.setText("Enter Your Name"); getContentPane().add(jLabel1); jLabel1.setBounds(177, 84, 169, 54); jLabel2.setFont(new java.awt.Font(".AppleSystemUIFont", 1, 18)); // NOI18N jLabel2.setForeground(new java.awt.Color(255, 255, 255)); jLabel2.setText("Enter Course Code"); getContentPane().add(jLabel2); jLabel2.setBounds(177, 229, 204, 49); jLabel3.setFont(new java.awt.Font(".AppleSystemUIFont", 1, 18)); // NOI18N jLabel3.setForeground(new java.awt.Color(255, 255, 255)); jLabel3.setText("Enter Your Password"); getContentPane().add(jLabel3); jLabel3.setBounds(177, 162, 204, 52); getContentPane().add(tf_cc); tf_cc.setBounds(404, 231, 266, 49); tf_name.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { tf_nameActionPerformed(evt); } }); getContentPane().add(tf_name); tf_name.setBounds(404, 89, 266, 49); getContentPane().add(tf_pass); tf_pass.setBounds(404, 166, 266, 49); btnSignUp.setFont(new java.awt.Font(".AppleSystemUIFont", 1, 18)); // NOI18N btnSignUp.setForeground(new java.awt.Color(255, 255, 255)); btnSignUp.setText("Sign Up"); btnSignUp.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); btnSignUp.setContentAreaFilled(false); btnSignUp.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSignUpActionPerformed(evt); } }); getContentPane().add(btnSignUp); btnSignUp.setBounds(287, 334, 199, 64); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/examb/examb_images/backarrow copy.png"))); // NOI18N jButton1.setText("jButton1"); jButton1.setBorderPainted(false); jButton1.setContentAreaFilled(false); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); getContentPane().add(jButton1); jButton1.setBounds(40, 370, 120, 50); jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/examb/examb_images/bg.jpg"))); // NOI18N jLabel4.setMaximumSize(new java.awt.Dimension(5169, 3200)); jLabel4.setMinimumSize(new java.awt.Dimension(5169, 3200)); jLabel4.setPreferredSize(new java.awt.Dimension(5169, 3200)); getContentPane().add(jLabel4); jLabel4.setBounds(-5, -4, 820, 510); 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 myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\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 vpemesanan1() {\n initComponents();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@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 IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\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 JFrmPrincipal() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\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.7319573", "0.72908455", "0.72908455", "0.72908455", "0.7286827", "0.7248724", "0.7213511", "0.7208325", "0.7195998", "0.7190202", "0.7184771", "0.7158966", "0.7147921", "0.7093225", "0.7080275", "0.7057302", "0.69875276", "0.6977057", "0.6955658", "0.6953942", "0.69454855", "0.6942884", "0.6935925", "0.69316167", "0.692865", "0.6925198", "0.69251573", "0.69119257", "0.6911172", "0.68930143", "0.68928415", "0.6890789", "0.6890435", "0.68890977", "0.68831456", "0.6881887", "0.68808997", "0.6878897", "0.6876147", "0.68747145", "0.6872147", "0.6859808", "0.6856282", "0.6855344", "0.68553185", "0.685469", "0.6853377", "0.68523794", "0.68523794", "0.68436074", "0.68373406", "0.6837167", "0.68286663", "0.68283236", "0.6826517", "0.682448", "0.6823606", "0.68170947", "0.6817084", "0.681006", "0.6809135", "0.68087894", "0.68084186", "0.68076634", "0.6802823", "0.6795054", "0.67939687", "0.67926705", "0.6791137", "0.6789317", "0.6788968", "0.6788417", "0.6782546", "0.67662394", "0.67658025", "0.6765246", "0.6756509", "0.67557156", "0.6752202", "0.6750687", "0.6742804", "0.6739344", "0.6736661", "0.67360824", "0.67333126", "0.6727312", "0.67265683", "0.6720307", "0.67165637", "0.67146873", "0.6714614", "0.67091054", "0.67075574", "0.6704629", "0.6700793", "0.6700504", "0.6699442", "0.6697844", "0.66946405", "0.66912174", "0.6690615" ]
0.0
-1
sets scene emission light
public Geometry setEmission(Color emission) { _emission = emission; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLight1(){\n }", "public void\nsetAmbientElt( SbColor color )\n\n{\n this.coinstate.ambient.copyFrom(color);\n}", "private void updateLight() {\r\n\t}", "public void setLighting(GL3 gl) {\n\t\t // Set the lighting properties\n\t\t\n\t\t// get sunlight vector coords\n\t\tfloat xSun = terrain.getSunlight().getX();\n\t\tfloat ySun = terrain.getSunlight().getY();\n\t\tfloat zSun = terrain.getSunlight().getZ();\n\t\t\n/*\t\t// check fps\n\t\tPoint3D torchPos;\n\t\tif (camera.getPerson().isFps()) {\n\t\t\ttorchPos = new Point3D(camera.getGlobalPosition().getX(), camera.getGlobalPosition().getY(), camera.getGlobalPosition().getZ());\n*/\n\t\tPoint3D torchPos;\n\t\t// check fps\n\t\tif (person.isFps()) {\n\t\t\ttorchPos = new Point3D(person.getCamera().getGlobalPosition().getX(),\n\t\t\t\t\tperson.getCamera().getGlobalPosition().getY(),\n\t\t\t\t\tperson.getCamera().getGlobalPosition().getZ());\n\t\t} else { \n\t\t\ttorchPos = new Point3D(person.getGlobalPosition().getX(),\n\t\t\t\t\tperson.getGlobalPosition().getY() + 0.2f, \n\t\t\t\t\tperson.getGlobalPosition().getZ());\n\t\t}\n\t\t\n Shader.setPoint3D(gl, \"sunlight\", new Point3D(xSun,ySun,zSun)); // set sunlight vector to passed in vector \n Shader.setColor(gl, \"lightIntensity\", Color.WHITE);\n \n // Set the material properties\n Shader.setColor(gl, \"ambientCoeff\", Color.WHITE);\n Shader.setColor(gl, \"diffuseCoeff\", new Color(0.5f, 0.5f, 0.5f));\n Shader.setFloat(gl, \"phongExp\", 16f);\n \n // for torch light\n Shader.setFloat(gl, \"cutoff\", 90f); // in degrees\n Shader.setPoint3D(gl, \"posTorch\", torchPos);\n Shader.setFloat(gl, \"attenuationFactor\", 40f); \n Shader.setColor(gl, \"lightIntensityTorch\", Color.YELLOW); \n \n if (day) {\n \t// light properties for day\n Shader.setColor(gl, \"specularCoeff\", new Color(0.8f, 0.8f, 0.8f));\n \tShader.setColor(gl, \"ambientIntensity\", new Color(0.2f, 0.2f, 0.2f));\n Shader.setPoint3D(gl, \"dirTorch\", new Point3D(0,0,0)); // set torchDir vector \n } else { \n \t// light properties for night \n Shader.setColor(gl, \"specularCoeff\", new Color(0.5f, 0.5f, 0.5f));\n \tShader.setColor(gl, \"ambientIntensity\", new Color(0.01f, 0.01f, 0.01f));\n Shader.setPoint3D(gl, \"dirTorch\", new Point3D(0,0,1)); // set torchDir vector \n }\n\t}", "public void setAmbientLightIntensity(float i) {\n ambientLightIntensity = i;\n }", "public void setStaticLight(boolean staticLight);", "public void setIntakeLights(){\n \tintakeLights.set(true);\n }", "private void toggleLight(){\n\t\tmyGLView.queueEvent(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tmRenderer.toggleLight();\n\t\t\t}\n\t\t});\n\t\t\n\t}", "public void updateAmbient(AmbientLight amb) {\r\n ambientLight = amb;\r\n }", "void setupLights() {\n\n lightGroup = new Group();\n\n // Set up the ambient light\n lightAmbient = new AmbientLight(darkGrey);\n lightAmbient.setInfluencingBounds(infiniteBounds);\n lightAmbient.setCapability(Light.ALLOW_STATE_WRITE);\n lightAmbient.setEnable(true);\n lightGroup.addChild(lightAmbient);\n\n // Set up the directional light\n Vector3f lightDirection = new Vector3f(0.65f, -0.65f, -0.40f);\n lightDirectional = new DirectionalLight(white, lightDirection);\n lightDirectional.setInfluencingBounds(infiniteBounds);\n lightDirectional.setEnable(true);\n lightDirectional.setCapability(Light.ALLOW_STATE_WRITE);\n lightGroup.addChild(lightDirectional);\n\n // Set up the point light\n Point3f lightPosition = new Point3f(-1.0f, 1.0f, 0.6f);\n lightPoint = new PointLight(white, lightPosition, attenuation);\n lightPoint.setInfluencingBounds(infiniteBounds);\n lightPoint.setEnable(false);\n lightPoint.setCapability(Light.ALLOW_STATE_WRITE);\n lightPoint.setCapability(PointLight.ALLOW_ATTENUATION_WRITE);\n lightGroup.addChild(lightPoint);\n\n // Set up the spot light\n // Point the light back at the origin\n lightSpot = new SpotLight(white, lightPosition, attenuation,\n lightDirection, (float) Math.toRadians(spotSpreadAngle),\n spotConcentration);\n lightSpot.setInfluencingBounds(infiniteBounds);\n lightSpot.setEnable(false);\n lightSpot.setCapability(Light.ALLOW_STATE_WRITE);\n lightSpot.setCapability(PointLight.ALLOW_ATTENUATION_WRITE);\n lightSpot.setCapability(SpotLight.ALLOW_CONCENTRATION_WRITE);\n lightSpot.setCapability(SpotLight.ALLOW_SPREAD_ANGLE_WRITE);\n lightGroup.addChild(lightSpot);\n }", "public void\nsetSpecularElt( SbColor color )\n//\n{\n this.coinstate.specular.copyFrom(color);\n}", "public void switchLight(){\r\n _switchedOn = !_switchedOn;\r\n }", "public void\n\t setColorMaterialElt( boolean value )\n\t \n\t {\n//\t if (ivState.lightModel == LightModel.BASE_COLOR.getValue()) value = false;\n//\t ivState.colorMaterial = value;\n\t }", "protected static void setLightUniform(@NotNull Shape shape) {\n\t\tshape.shaderProgram.setUniform2f(\"resolution\", Display.getSizeF());\n\t\tshape.shaderProgram.setUniform3f(\"ambient\", Lights.ambient);\n\n\t\tfor (int i = 0; i < 100; i++) {\n\t\t\tif (i >= Lights.lights.size()) break;\n\n\t\t\tLight l = Lights.lights.get(i);\n\t\t\tshape.shaderProgram.setUniform2f(\"lights[\"+i+\"].position\", l.getPosition());\n\t\t\tshape.shaderProgram.setUniform3f(\"lights[\"+i+\"].color\", l.getColor());\n\t\t\tshape.shaderProgram.setUniform1f(\"lights[\"+i+\"].intensity\", l.getIntensity());\n\t\t}\n\t}", "void animate( LightCondition lights );", "public void turnOn( ) {\n\t\t\t\tSystem.out.println(\"Light is on \");\n\t\t}", "private void addLights() {\n \t\tLight light = new DirectionalLight(\n \t\t\t\tnew Color3f(1f, 1f, 1f), new Vector3f(-1f, -1f, -1f));\n \t\t\n \t\tlight.setInfluencingBounds(\n \t\t\t\tnew BoundingSphere(new Point3d(0, 0, 0), 10));\n \t\t\n \t\tmyScene.addChild(light);\n \t\t\n \t\tlight = new DirectionalLight(\n \t\t\t\tnew Color3f(0.3f, 0.1f, 0.1f), new Vector3f(1f, 0f, 0f));\n \t\t\n \t\tlight.setInfluencingBounds(\n \t\t\t\tnew BoundingSphere(new Point3d(0, 0, 0), 10));\n \t\t\n \t\tmyScene.addChild(light);\n \t}", "public void setLights(boolean lights) {\n \tthis.lightsAreOn = lights;\n }", "public void toggleLightSpheres() {\r\n\t\tmodel.control(AbstractModel.TOGGLE_LIGHT_SPHERES, null);\r\n\t}", "@FXML\n\tprivate void desligarLuz(){\n\t boxEntity.setEffect(new Lighting()); \n\t\t\n\t\t\n\t\t\n\t}", "public void setLEDLights(int lightID);", "public void lighting(boolean onOrOff)\r\n {\r\n \tint i;\r\n \tfor (i=0;i<LightSet.size();i++) {\r\n \t\t((Light)LightSet.elementAt(i)).setState(onOrOff);\r\n \t}\r\n }", "private void initLighting() {\n\t\t\n\t\t\n\t\tfloat lmodel_ambient[] = { 1f, 1f, 1f, 1.0f };\n\t\t// Hintergrundbeleuchtung definieren\n\t\tglLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);\n\n\t\t// Eine weitere Lichtquellen definieren\n\t\t\n\t\tglEnable(GL_LIGHTING);\n\n\t\tspotLight.turnLightOn();\n\t\tpointLight.turnLightOn();\n\t}", "public void setMaterial(Material mat)\r\n\t{\r\n\t\tgl.glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, mat.ambient);\r\n\t\tgl.glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mat.diffuse);\r\n\t\tgl.glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat.specular);\r\n\t\tgl.glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 0.8F);\r\n\t\tgl.glColor3f(mat.diffuse[0],mat.diffuse[1],mat.diffuse[2]);\r\n\t}", "@Override\n public void simpleInitApp() {\n cam.setLocation(new Vector3f(-2.336393f, 11.91392f, -7.139601f));\n cam.setRotation(new Quaternion(0.23602544f, 0.11321983f, -0.027698677f, 0.96473104f));\n\n Material mat = new Material(assetManager,\"Common/MatDefs/Light/Lighting.j3md\");\n mat.setFloat(\"Shininess\", 15f);\n mat.setBoolean(\"UseMaterialColors\", true);\n mat.setColor(\"Ambient\", ColorRGBA.Yellow.mult(0.2f));\n mat.setColor(\"Diffuse\", ColorRGBA.Yellow.mult(0.2f));\n mat.setColor(\"Specular\", ColorRGBA.Yellow.mult(0.8f));\n\n Material matSoil = new Material(assetManager,\"Common/MatDefs/Light/Lighting.j3md\");\n matSoil.setFloat(\"Shininess\", 15f);\n matSoil.setBoolean(\"UseMaterialColors\", true);\n matSoil.setColor(\"Ambient\", ColorRGBA.Gray);\n matSoil.setColor(\"Diffuse\", ColorRGBA.Black);\n matSoil.setColor(\"Specular\", ColorRGBA.Gray);\n\n Spatial teapot = assetManager.loadModel(\"Models/Teapot/Teapot.obj\");\n teapot.setLocalTranslation(0,0,10);\n\n teapot.setMaterial(mat);\n teapot.setShadowMode(ShadowMode.CastAndReceive);\n teapot.setLocalScale(10.0f);\n rootNode.attachChild(teapot);\n\n Geometry soil = new Geometry(\"soil\", new Box(800, 10, 700));\n soil.setLocalTranslation(0, -13, 550);\n soil.setMaterial(matSoil);\n soil.setShadowMode(ShadowMode.CastAndReceive);\n rootNode.attachChild(soil);\n\n DirectionalLight light=new DirectionalLight();\n light.setDirection(new Vector3f(-1, -1, -1).normalizeLocal());\n light.setColor(ColorRGBA.White.mult(1.5f));\n rootNode.addLight(light);\n\n // load sky\n Spatial sky = SkyFactory.createSky(assetManager, \"Textures/Sky/Bright/FullskiesBlueClear03.dds\", SkyFactory.EnvMapType.CubeMap);\n sky.setCullHint(Spatial.CullHint.Never);\n rootNode.attachChild(sky);\n\n FilterPostProcessor fpp = new FilterPostProcessor(assetManager);\n int numSamples = getContext().getSettings().getSamples();\n if (numSamples > 0) {\n fpp.setNumSamples(numSamples);\n }\n pf = new PosterizationFilter();\n fpp.addFilter(pf);\n\n viewPort.addProcessor(fpp);\n initInputs();\n\n }", "private void lightOn(Map<Light, Matrix4f> lights) {\n numLight = 0;\n GL3 gl = glContext.getGL().getGL3();\n FloatBuffer fb4 = Buffers.newDirectFloatBuffer(4);\n LightLocation lightLoc = new LightLocation();\n for (Entry<Light, Matrix4f> entry : lights.entrySet()) {\n Light light = entry.getKey();\n Matrix4f lightTransForm = entry.getValue();\n Vector4f lightPosition = lightTransForm.transform(new Vector4f(light.getPosition()));\n Vector4f lightDirection = lightTransForm.transform(new Vector4f(light.getSpotDirection()));\n String lightName = \"light[\" + numLight + \"]\";\n lightLoc.position = shaderLocations.getLocation(lightName + \".position\");\n lightLoc.ambient = shaderLocations.getLocation(lightName + \".ambient\");\n lightLoc.diffuse = shaderLocations.getLocation(lightName + \".diffuse\");\n lightLoc.specular = shaderLocations.getLocation(lightName + \".specular\");\n lightLoc.direction = shaderLocations.getLocation(lightName + \".direction\");\n lightLoc.cutOff = shaderLocations.getLocation(lightName + \".cutOff\");\n\n gl.glUniform4fv(lightLoc.position, 1, lightPosition.get(fb4));\n gl.glUniform3fv(lightLoc.ambient, 1, light.getAmbient().get(fb4));\n gl.glUniform3fv(lightLoc.diffuse, 1, light.getDiffuse().get(fb4));\n gl.glUniform3fv(lightLoc.specular, 1, light.getSpecular().get(fb4));\n gl.glUniform4fv(lightLoc.direction, 1, lightDirection.get(fb4));\n gl.glUniform1f(lightLoc.cutOff, light.getSpotCutoff());\n numLight++;\n }\n gl.glUniform1i(shaderLocations.getLocation(\"numLights\"), numLight);\n }", "public void setgearClawLights(){\n \tgearClawLights.set(true);\n }", "public void setHasLight(boolean hasLight) {\n\t\tthis.hasLight = hasLight;\n\t}", "Light getEWlight();", "public void setColor()\n {\n if(eyeL != null) // only if it's painted already...\n {\n eyeL.changeColor(\"yellow\");\n eyeR.changeColor(\"yellow\");\n nose.changeColor(\"green\");\n mouthM.changeColor(\"red\");\n mouthL.changeColor(\"red\");\n mouthR.changeColor(\"red\");\n }\n }", "public void\n\t setLightModelElt(SoState state, int model)\n\t \n\t {\n\t SoShapeStyleElement.setLightModel(state, model);\n\t \tthis.coinstate.lightmodel = model;\n\t // also set the shapestyle version of this:\n\t //if (model == LightModel.BASE_COLOR.getValue()) setColorMaterialElt(false);\n\t }", "public static void setGlobal_light_values(Color4f global_light_values) {\n\t\tSceneLight.global_light_values = global_light_values;\n\t\tGlobalValuesHaveChanged=true;\n\t}", "private void toggle_light() {\n\t\ttry {\n\t\t\tif (!light_on) {\n\t\t\t\tlightButton.setBackgroundResource(R.drawable.light_selected);\n\t\t\t\tif (handler != null) {\n\t\t\t\t\thandler.quitSynchronously();\n\t\t\t\t\thandler = null;\n\t\t\t\t}\n//\t\t\t\tCameraManager.get().closeDriver();\n\t\t\t\tgetCameraManager().closeDriver();\n\t\t\t\tinitCamera(surfaceHolder);\n\t\t\t\tgetCameraManager().getFramingRect();\n//\t\t\t\tCameraManager.get().turn_onFlash();\n\t\t\t\tgetCameraManager().setTorch(true);\n\n\t\t\t} else {\n\t\t\t\tlightButton.setBackgroundResource(R.drawable.light);\n\t\t\t\tif (handler != null) {\n\t\t\t\t\thandler.quitSynchronously();\n\t\t\t\t\thandler = null;\n\t\t\t\t}\n//\t\t\t\tCameraManager.get().closeDriver();\n\t\t\t\tgetCameraManager().closeDriver();\n\t\t\t\tinitCamera(surfaceHolder);\n//\t\t\t\tCameraManager.get().turn_offFlash();\n\t\t\t\tgetCameraManager().setTorch(false);\n\n\t\t\t}\n\t\t\tlight_on = !light_on;\n\t\t} catch (Exception oEx) {\n\n\t\t}\n\t}", "private static void turnFlashlightOn() {\n Parameters p = cam.getParameters();\n p.setFlashMode(Parameters.FLASH_MODE_TORCH);\n cam.setParameters(p);\n }", "public Light(Color color){\n this.color = color;\n this.castsShadows = false;\n }", "private void adjustLightFixture(World world, int i, int j, int k, Block block)\n\t{\n\t\tTessellator tess = Tessellator.instance;\n float brightness = block.getLightValue(world, i, j, k);\n int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0);\n int modulousModifier = skyLight % 65536;\n int divModifier = skyLight / 65536;\n tess.setColorOpaque_F(brightness, brightness, brightness);\n OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) modulousModifier, divModifier);\n\t}", "public void changeLight(int pos) {\r\n if (pos < lightsArray.size()) {\r\n Light li = lightsArray.get(pos);\r\n li.switchLight();\r\n System.out.println(\"Light \" + (pos + 1) + \" \" + li.toString());\r\n }\r\n }", "@Override\n public void updateScene() {\n scene.backgroundColor().setAll(new Color4(224, 237, 246, 255));\n\n if (!object3DConfigured || !sensor.validValue())\n return;\n\n IotSensor.Value value = sensor.getValue();\n object3D.rotation().x = value.getRoll();\n object3D.rotation().y = value.getYaw();\n object3D.rotation().z = value.getPitch();\n }", "private void updateSpotLight() {\n\t\tfloat light0_position[] = { player.getPosition().x, 16.0f, player.getPosition().z, 1.0f }; // x,y,z,1\n\t\tfloat light0_diff_spec[] = { 1f, 1f, 1f, 1.0f };\n\t\tfloat light0_direction[] = {-(float)Math.sin(Math.toRadians(player.getRotY())),0,-(float)Math.cos(Math.toRadians(player.getRotY())), 1f};\n\t\t// Eine weitere Lichtquellen definieren\n\t\tspotLight.setPosition(light0_position);\n\t\tspotLight.setCutoff(45.f);\n\t\tspotLight.setDirection(light0_direction);\n\t\tspotLight.setDiffAndSpek(light0_diff_spec);\n\t\t\n\t\tglEnable(GL_LIGHTING);\n\t}", "public void setIsLight(boolean blight){\n\t\tm_bLight = blight;\n\t\tinitPaint();\n\t}", "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 }", "private void turnOnLights(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_turnOnLights\n\n this.selectedTrain.setLights(1); // turn on lights\n this.operatingLogbook.add(\"Lights on.\");\n this.printOperatingLogs();\n }", "@Override\n\tpublic void on() {\n\t\tSystem.out.println(\"turn on the \"+name+\" Light\");\n\t}", "public void updateConeLight() {\n if (coneLight.isActive()) {\n coneLight.setDirection((float)(getBody().getAngle()*180 / Math.PI));\n }\n }", "private void setLightColor(final Light theLight) {\n switch (theLight) {\n case GREEN:\n myLightColor = Color.GREEN.darker();\n break;\n\n case RED:\n myLightColor = Color.RED.darker();\n break;\n\n case YELLOW:\n myLightColor = Color.YELLOW;\n break;\n\n default:\n }\n }", "public void setSkyLight( int x, int y, int z, int value ) {\r\n \t\tputNybble(skyLightData, blockIndex(x,y,z), value);\r\n \t}", "public void\nsetEmissiveElt( SbColor color )\n\n{\n coinstate.emissive.copyFrom(color);\n}", "public static void lightOn(Window window) {\n\t\tWindowManager.LayoutParams lp = window.getAttributes();\r\n\t\tlp.alpha = 1.0f;\r\n\t\twindow.setAttributes(lp);\r\n\t}", "void setColor(){\n this.objectColour = new Color(rValue,gValue,bValue,timeToLive).brighter();\n }", "public void turnLightsOn()\n {\n set(Relay.Value.kForward);\n }", "private void updatePointLight() {\n\t\tfloat light1_position[] = { player.getPosition().x, 0.0f, player.getPosition().z, 1.0f }; // x,y,z,1\n\t\tfloat light1_diff_spec[] = { 1f, 1f, 1f, 1.0f };\n\t\t\n\t\t// Eine weitere Lichtquellen definieren\n\t\tpointLight.setPosition(light1_position);\n\t\tpointLight.setDiffAndSpek(light1_diff_spec);\n\t\t\n\t\tglEnable(GL_LIGHTING);\n\t}", "public void setgearExtendLights(){\n \tgearExtendLights.set(true);\n }", "private void setLightStatus() {\n if (mCmd.equals(MSG_ON)) {\n setLighIsOn(true);\n } else {\n setLighIsOn(false);\n }\n }", "public void initLight(GL10 gl)\n\t{\n\t\tgl.glEnable(GL10.GL_LIGHT0);// 打开0号光源\n\n\t\t// 环境光设置\n\t\tfloat[] ambientParams =\n\t\t{ 0.46f, 0.21f, 0.05f, 1.0f };// 光参数 RGBA\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_AMBIENT, ambientParams, 0);\n\n\t\t// 散射光设置\n\t\tfloat[] diffuseParams =\n\t\t{ 0.46f, 0.21f, 0.05f, 1.0f };\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_DIFFUSE, diffuseParams, 0);\n\n\t\t// 镜面光设置\n\t\tfloat[] specularParams =\n\t\t{ 0.46f, 0.21f, 0.05f, 1.0f };\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_SPECULAR, specularParams, 0);\n\n\t\t// 指定光源位置\n\t\tfloat[] directionParams =\n\t\t{ -1f, 1f, 1f, 0 };// 定向光\n\t\tgl.glLightfv(GL10.GL_LIGHT0, GL10.GL_POSITION, directionParams, 0);\n\t}", "public void renderWorld(boolean renderWithLight);", "protected SoftwareLight() {\r\n ambient = new Color3f(0.0f, 0.0f, 0.0f);\r\n diffuse = new Color3f(0.0f, 0.0f, 0.0f);\r\n specular = new Color3f(0.0f, 0.0f, 0.0f);\r\n intensity = 0.0f;\r\n on = false;\r\n\r\n // no attenuation\r\n m_fAttenuate = 1.0f;\r\n m_fSpot = 1.0f;\r\n }", "private void renderLights() {\n\t\t\n\t}", "public void changeLightIntensity(Light l, float value){\r\n float valor;\r\n for (Light li:lights){\r\n if(li.getIntensity()==l.getIntensity())\r\n li.setIntensity(value);\r\n } \r\n }", "void setCor(Color cor);", "public void updateLighting() {\n\t\tint k;\n\t\tint i;\n\n\t\tfor (k=0; k<num_vobjects;k++) {\t\t\t// Loop through all the objects to be illuminated \n\t\t\t\n\t\t\tif ((vobject[k].potentially_visible) && (vobject[k].needs_lighting) ) {\n\t\t\t\tvobject[k].resetLighting();\n\t\t\t\tfor (i=0; i<num_vobjects;i++) {\t// Loop through all the light sources that can illuminate this object\n\t\t\t\t\tif (vobject[i].light_source) {\n\t\t\t\t\t\tvobject[k].addLightSource(vobject[i].abs_x_pos, vobject[i].abs_y_pos, vobject[i].abs_z_pos, vobject[i].light_red, vobject[i].light_green, vobject[i].light_blue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tvobject[k].calculateAverageLighting();\n\t\t\t\tvobject[k].needs_lighting=false;\n\t\t\t}\n\t\t}\n\t}", "public abstract Color3f traceLight(Vector3f pos, Vector3f normal,\n\t Material m, List<Shape> objects);", "public void flash(){\n phoneCam.setFlashlightEnabled(!flash);\n flash = !flash;\n }", "public void setLightAbsorptionCoefficient(double gamma){\n this.gamma = gamma;\n }", "@Override\n public void onSensorChanged(SensorEvent sensorEvent) {\n shukiShade.setAlpha(sensorEvent.values[0] / 500);\n }", "public void addLight(Light light) { LightSet.addElement(light); }", "public void setGlowing ( boolean flag ) {\n\t\texecute ( handle -> handle.setGlowing ( flag ) );\n\t}", "public float getAmbientLightIntensity() {\n return ambientLightIntensity;\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlightOn = !lightOn;\n\t\t\t\tactiveLightSource(lightOn);\n\t\t\t\tlightButton.setLabel(lightOn ? \"Light off\" : \"Light On\");\n\t\t\t}", "@Override\n protected void initialize() {\n //Robot.limelight.setLiveStream(0);\n Robot.limelight.setLEDMode(3);\n }", "public LightOnCommand(Light light) {\n this.light = light;\n }", "public void setHasLightSource(Creature creature, @Nullable Item lightSource) {\n/* 5438 */ if (lightSource != null && lightSource.getTemplateId() == 1243)\n/* */ return; \n/* 5440 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 5444 */ if (lightSource == null) {\n/* */ \n/* 5446 */ if (vz.getWatcher().getWurmId() == creature.getWurmId()) {\n/* 5447 */ vz.sendRemoveEffect(-1L, (byte)0);\n/* */ } else {\n/* 5449 */ vz.sendRemoveEffect(creature.getWurmId(), (byte)0);\n/* */ }\n/* */ \n/* */ }\n/* 5453 */ else if (vz.getWatcher().getWurmId() == creature.getWurmId()) {\n/* */ \n/* 5455 */ if (lightSource.getColor() != -1) {\n/* */ \n/* 5457 */ int lightStrength = Math.max(WurmColor.getColorRed(lightSource.color), \n/* 5458 */ WurmColor.getColorGreen(lightSource.color));\n/* 5459 */ lightStrength = Math.max(lightStrength, WurmColor.getColorBlue(lightSource.color));\n/* 5460 */ byte r = (byte)(WurmColor.getColorRed(lightSource.color) * 128 / lightStrength);\n/* 5461 */ byte g = (byte)(WurmColor.getColorGreen(lightSource.color) * 128 / lightStrength);\n/* 5462 */ byte b = (byte)(WurmColor.getColorBlue(lightSource.color) * 128 / lightStrength);\n/* */ \n/* 5464 */ vz.sendAttachCreatureEffect(null, (byte)0, r, g, b, lightSource\n/* 5465 */ .getRadius());\n/* */ \n/* */ \n/* */ }\n/* 5469 */ else if (lightSource.isLightBright()) {\n/* */ \n/* 5471 */ int lightStrength = (int)(80.0F + lightSource.getCurrentQualityLevel() / 100.0F * 40.0F);\n/* 5472 */ vz.sendAttachCreatureEffect(null, (byte)0, \n/* 5473 */ Item.getRLight(lightStrength), Item.getGLight(lightStrength), \n/* 5474 */ Item.getBLight(lightStrength), lightSource.getRadius());\n/* */ } else {\n/* */ \n/* 5477 */ vz.sendAttachCreatureEffect(null, (byte)0, \n/* 5478 */ Item.getRLight(80), Item.getGLight(80), Item.getBLight(80), lightSource.getRadius());\n/* */ \n/* */ }\n/* */ \n/* */ }\n/* 5483 */ else if (lightSource.getColor() != -1) {\n/* */ \n/* 5485 */ int lightStrength = Math.max(WurmColor.getColorRed(lightSource.color), \n/* 5486 */ WurmColor.getColorGreen(lightSource.color));\n/* 5487 */ lightStrength = Math.max(lightStrength, WurmColor.getColorBlue(lightSource.color));\n/* 5488 */ byte r = (byte)(WurmColor.getColorRed(lightSource.color) * 128 / lightStrength);\n/* 5489 */ byte g = (byte)(WurmColor.getColorGreen(lightSource.color) * 128 / lightStrength);\n/* 5490 */ byte b = (byte)(WurmColor.getColorBlue(lightSource.color) * 128 / lightStrength);\n/* */ \n/* 5492 */ vz.sendAttachCreatureEffect(creature, (byte)0, r, g, b, lightSource\n/* 5493 */ .getRadius());\n/* */ \n/* */ \n/* */ }\n/* 5497 */ else if (lightSource.isLightBright()) {\n/* */ \n/* 5499 */ int lightStrength = (int)(80.0F + lightSource.getCurrentQualityLevel() / 100.0F * 40.0F);\n/* 5500 */ vz.sendAttachCreatureEffect(creature, (byte)0, \n/* 5501 */ Item.getRLight(lightStrength), Item.getGLight(lightStrength), \n/* 5502 */ Item.getBLight(lightStrength), lightSource.getRadius());\n/* */ } else {\n/* */ \n/* 5505 */ vz.sendAttachCreatureEffect(creature, (byte)0, \n/* 5506 */ Item.getRLight(80), Item.getGLight(80), Item.getBLight(80), lightSource.getRadius());\n/* */ \n/* */ }\n/* */ \n/* */ }\n/* 5511 */ catch (Exception e) {\n/* */ \n/* 5513 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ }", "public void setLightLocation(double x, double y){\n\t\tlightSource[0] = x * lightScale;\n\t\tlightSource[1] = y * lightScale;\n\t}", "public Light(){\n this(0.0, 0.0, 0.0);\n }", "public void setHasLightSource(Creature creature, byte colorRed, byte colorGreen, byte colorBlue, byte radius) {\n/* 5521 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 5525 */ if (vz.getWatcher().getWurmId() == creature.getWurmId())\n/* */ {\n/* 5527 */ vz.sendAttachCreatureEffect(null, (byte)0, colorRed, colorGreen, colorBlue, radius);\n/* */ \n/* */ }\n/* */ else\n/* */ {\n/* 5532 */ vz.sendAttachCreatureEffect(creature, (byte)0, colorRed, colorGreen, colorBlue, radius);\n/* */ }\n/* */ \n/* */ }\n/* 5536 */ catch (Exception e) {\n/* */ \n/* 5538 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ }", "@Override\n\tpublic void setAmbientColor(Color3f ambientColor) {\n\t\t\n\t}", "@Override\n public void initScene()\n {\n myLight.position.setAll(300,150,150);\n\n myLight = new Light();\n myLight.type(LightType.DIRECTIONAL);\n\n scene.lights().add(myLight);\n scene.backgroundColor().setAll(255,255,255,1);\n\n IParser myParser = Parser.createParser(Parser.Type.MAX_3DS, getResources(), \"min3d.sampleProject1:raw/squared_robot_3ds\", false);\n myParser.parse();\n\n androidRobot3DObject = myParser.getParsedObject();\n androidRobot3DObject.position().x = androidRobot3DObject.position().y = androidRobot3DObject.position().z = 0;\n\n\n // We scale the robot, check this value if you want to target another scale\n androidRobot3DObject.scale().x = androidRobot3DObject.scale().y = androidRobot3DObject.scale().z = 1f;\n scene.addChild(androidRobot3DObject);\n\n // Preloading the textures with the textureManager()\n Bitmap b;\n b = Utils.makeBitmapFromResourceId(R.drawable.squared_robot_body_business);\n Shared.textureManager().addTextureId(b, \"squared_robot_body_business\");\n b.recycle();\n\n b = Utils.makeBitmapFromResourceId(R.drawable.squared_robot_body);\n Shared.textureManager().addTextureId(b, \"squared_robot_body\");\n b.recycle();\n\n\n b = Utils.makeBitmapFromResourceId(R.drawable.squared_robot_arm);\n Shared.textureManager().addTextureId(b,\"squared_robot_arm\");\n b.recycle();\n\n b = Utils.makeBitmapFromResourceId(R.drawable.squared_robot_foot);\n Shared.textureManager().addTextureId(b,\"squared_robot_foot\");\n b.recycle();\n\n\n b = Utils.makeBitmapFromResourceId(R.drawable.squared_robot_antenna);\n Shared.textureManager().addTextureId(b,\"squared_robot_antenna\");\n b.recycle();\n\n b = Utils.makeBitmapFromResourceId(R.drawable.squared_robot_head);\n Shared.textureManager().addTextureId(b,\"squared_robot_head\");\n b.recycle();\n\n b = Utils.makeBitmapFromResourceId(R.drawable.squared_robot_head_business);\n Shared.textureManager().addTextureId(b,\"squared_robot_head_business\");\n b.recycle();\n\n loadAllTextures();\n\n }", "private void materialSetup(GL gl)\n {\n\tfloat white[] = { 1.0f, 1.0f, 1.0f, 1.0f };\n\tfloat black[] = { 0.0f, 0.0f, 0.0f, 1.0f };\n\tfloat dim[] = { 0.1f, 0.1f, 0.1f, 1.0f };\n\t\n\t// Set up material and light\n\tgl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT, dim, 0);\n\tgl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_DIFFUSE, white, 0);\n\tgl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_SPECULAR, dim, 0);\n\tgl.glMaterialf(GL.GL_FRONT_AND_BACK, GL.GL_SHININESS, 5);\n\n\t// Set light color\n \tgl.glLightfv(GL.GL_LIGHT0, GL.GL_AMBIENT, dim, 0);\n \tgl.glLightfv(GL.GL_LIGHT0, GL.GL_DIFFUSE, white, 0);\n \tgl.glLightfv(GL.GL_LIGHT0, GL.GL_SPECULAR, black, 0);\n\n\t// Turn on light and lighting\n\tgl.glEnable(GL.GL_LIGHT0);\n\tgl.glEnable(GL.GL_LIGHTING);\n\n\t// Allow glColor() to affect current diffuse material\n\tgl.glColorMaterial(GL.GL_FRONT_AND_BACK, GL.GL_DIFFUSE);\n\tgl.glEnable(GL.GL_COLOR_MATERIAL);\n }", "public void setLightSource(PointLight3D lightSource) {\n this.lightSource = lightSource;\n }", "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}", "protected void initLight(GL10 gl) {\n\t\tgl.glEnable(GL10.GL_LIGHTING);\n\t\tgl.glEnable(GL10.GL_LIGHT0);\n\t\tgl.glEnable(GL10.GL_LIGHT1);\n\t\tgl.glShadeModel(GL10.GL_SMOOTH);\n\t\tthis.mLight = new Light();\n\t\tthis.mLight.initAmbient(-0.2f, -0.2f, -0.2f, 1.0f);\n\t\tthis.mLight.initDiffuse(1.f, 1.0f, 1.0f, 1f);\n\t\tthis.mLight.initSpecular(1.0f, 1.0f, 1.0f, 1.0f);\n\t\tthis.mLight.initPosition(0.0f, 3f, 20f, 0.0f);\n\t\tthis.mLight.setLight(gl, GL10.GL_LIGHT0);\n\t\t\n\t\tthis.mLight2 = new Light();\n\t\tthis.mLight2.initAmbient(-0.1f, -0.1f, -0.1f, 1.0f);\n\t\tthis.mLight2.initDiffuse(1f, 1f, 1f, 1f);\n\t\tthis.mLight2.initSpecular(1f, 1f, 1f, 1f);\n\t\tthis.mLight2.initPosition(0f, 2f, 13.5f, 0.0f);\n\t\tthis.mLight2.setLight(gl, GL10.GL_LIGHT1);\n//\t\tgl.glDisable(GL10.GL_LIGHT1);\n\t}", "public void renderLights()\r\n\t{\r\n\t\tlightHandler.render();\r\n\t}", "public static void setLightInfo()\n {\n for(int i = 0; i <= 19; i++)\n {\n lights.add(new Light());\n }\n\n //-----set position for all 15 lights-----\\\n //light1 -- middle light\n lights.get(0).setX(475);\n lights.get(0).setY(585);\n\n //--- left side --- \\\\\n\n //light2 - -\n lights.get(1).setX(350);\n lights.get(1).setY(570);\n\n //light3 - -\n lights.get(2).setX(230);\n lights.get(2).setY(530);\n\n //light4 - -\n lights.get(3).setX(130);\n lights.get(3).setY(470);\n\n //light5 - -\n lights.get(4).setX(110);\n lights.get(4).setY(410);\n\n //light6 - -\n lights.get(5).setX(165);\n lights.get(5).setY(370);\n\n //light7 - -\n lights.get(6).setX(230);\n lights.get(6).setY(350);\n\n //light8 - -\n lights.get(7).setX(290);\n lights.get(7).setY(340);\n\n //light9 - -\n lights.get(8).setX(355);\n lights.get(8).setY(337);\n\n //light10 - -\n lights.get(9).setX(420);\n lights.get(9).setY(336);\n\n\n //---- middle ----\\\\\n\n //light11 -\n lights.get(10).setX(485);\n lights.get(10).setY(335);\n\n //---- Right side of circle ----\\\\\n\n //light12 -\n lights.get(11).setX(540);\n lights.get(11).setY(336);\n\n //light13 -\n lights.get(12).setX(595);\n lights.get(12).setY(337);\n\n //light14 -\n lights.get(13).setX(655);\n lights.get(13).setY(340);\n\n //light15 -\n lights.get(14).setX(720);\n lights.get(14).setY(350);\n\n //light16 -\n lights.get(15).setX(785);\n lights.get(15).setY(370);\n\n //light17 -\n lights.get(16).setX(840);\n lights.get(16).setY(410);\n\n //light18 -\n lights.get(17).setX(820);\n lights.get(17).setY(470);\n\n //light19 -\n lights.get(18).setX(720);\n lights.get(18).setY(530);\n\n //light20 -\n lights.get(19).setX(600);\n lights.get(19).setY(570);\n\n }", "private void initSun(){\n sun = new DirectionalLight();\n sun.setDirection(lightDir);\n sun.setColor(ColorRGBA.White.clone().multLocal(1.7f));\n rootNode.addLight(sun);\n \n }", "public void setAmbientAlpha(float alpha) {\n\t\tambientColor.a = alpha;\n\t\trayHandler.setAmbientLight(ambientColor);\n\t}", "public void setScene(Scene scene){\n this.scene = scene;\n }", "public void addLight(int id) {\n\tif(!lights.containsKey(id)) {\n\t lights.put(id, true);\n\t GL11.glEnable(id);\n\t}\n }", "public void registerBeamEffect(World world, Vector3D origin, Vector3D dest, float r, float g, float b, int lifespan){}", "public Light(boolean isOn) {\n\t\tthis.isOn = isOn;\n\t}", "@Override\n public void init() {\n //no initialization, event are only created when car get into intersection\n if (!trafficLights.isEmpty()) {\n getSimEngine().addEvent(new ChangeColorEvent(trafficLights.get(current_traffic_light_index), getSimEngine().getCurrentSimTime()));\n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \tapp.toggleLightMode();\n \tisDark = !isDark;\n }", "protected void doMoreLight() {\r\n\t\talpha = Math.min(1f, alpha + 0.05f);;\r\n\t\tsetAlphaOnTiles();\r\n\t\trepaint();\r\n\t}", "public void setLightColor(int lightColor) {\n if (lightColor != this.lightColor) {\n int oldLightColor = this.lightColor;\n this.lightColor = lightColor;\n this.propertyChangeSupport.firePropertyChange(Property.LIGHT_COLOR.name(), oldLightColor, lightColor);\n }\n }", "public static void \nsetColorMaterial(SoState state, boolean value)\n{\n// SoLazyElement curElt = SoLazyElement.getInstance(state);\n// if (value != curElt.ivState.colorMaterial)\n// getWInstance(state).setColorMaterialElt(value);\n// else if (state.isCacheOpen())\n// curElt.registerRedundantSet(state, masks.COLOR_MATERIAL_MASK.getValue());\n}", "public void disablecameraLights(){\n \tcamLights.set(true);\n }", "private void generateLights(Universe universe) throws SAXException {\n ArrayList<SceneLight> lights = universe.getScene().getLightArray();\n for (int i = 0; i < lights.size(); i++) {\n saver.addAttribute(\"type\", XmlSaver.CDATA, lights.get(i).getLightType().name());\n saver.startTag(\"light\");\n Color3f color = new Color3f(lights.get(i).getColor());\n saver.startTag(\"color\", Converter.tuple3fToString(color));\n switch(lights.get(i).getLightType()){\n// case ambient:\n case point:\n Point3f position = lights.get(i).getPosition();\n saver.startTag(\"position\", Converter.tuple3fToString(position));\n Point3f attenuation = lights.get(i).getAttenuation();\n saver.startTag(\"attenuation\", Converter.tuple3fToString(attenuation));\n break;\n case directional:\n Vector3f direction = lights.get(i).getDirection();\n saver.startTag(\"direction\", Converter.tuple3fToString(direction));\n break;\n }\n saver.closeTag(\"light\");\n }\n }", "public Pj3dLight Light()\r\n\t{\r\n\t\tPj3dLight light = new Pj3dLight(this);\r\n\t\treturn light;\r\n\t}", "public Light(Color color, boolean castsShadows){\n this.color = color;\n this.castsShadows = castsShadows;\n }", "@Override\n public void lightOn(INode root, Stack<Matrix4f> modelView) {\n Stack<Matrix4f> mvCopy = new Stack<>();\n for (Matrix4f mv : modelView) {\n mvCopy.push(new Matrix4f(mv));\n }\n Map<Light, Matrix4f> lights = root.getLights(mvCopy);\n this.lightOn(lights);\n }", "public LightShot(AbstractGame world) {\n super(world);\n innerColor = Color.WHITE;\n myCircle = new Circle(3);\n myCircle.setCenterX(0);\n myCircle.setCenterY(0);\n myCircle.setFill(innerColor);\n myShape = myCircle;\n speed = 10;\n GaussianBlur blur = new GaussianBlur();\n blur.setRadius(5);\n myShape.setEffect(blur);\n FadeTransition fadeOut = new FadeTransition(Duration.seconds(2), myShape);\n fadeOut.setFromValue(1);\n fadeOut.setToValue(0);\n fadeOut.playFromStart();\n // new AudioClipPlayer(AudioClipPlayer.HEARTBEAT).start();\n }" ]
[ "0.6866087", "0.67894435", "0.668132", "0.6529228", "0.6495712", "0.64843124", "0.64521", "0.6394323", "0.6332246", "0.62785095", "0.6139839", "0.6138344", "0.6133619", "0.6110902", "0.6109851", "0.60384065", "0.6018428", "0.597309", "0.59620416", "0.5952832", "0.59392744", "0.59124875", "0.5896704", "0.5890841", "0.5873465", "0.58551455", "0.58499706", "0.5848278", "0.5842755", "0.5831735", "0.5824759", "0.58229446", "0.58209884", "0.5808202", "0.5807426", "0.5805141", "0.5800698", "0.5767937", "0.5762615", "0.57604176", "0.57590264", "0.5748259", "0.5746649", "0.57461935", "0.57424176", "0.5741031", "0.5740484", "0.57290745", "0.5721588", "0.57141596", "0.5705765", "0.57051045", "0.5702814", "0.57004166", "0.5694263", "0.569073", "0.56819", "0.5666856", "0.5639798", "0.5635949", "0.56343067", "0.5615632", "0.5589533", "0.55806106", "0.5576218", "0.55487794", "0.5544345", "0.55256945", "0.5520154", "0.5510719", "0.5506507", "0.5500575", "0.5484533", "0.54812026", "0.5480707", "0.54796755", "0.5463552", "0.5462179", "0.5445735", "0.5435145", "0.5429587", "0.54224855", "0.54028755", "0.54027003", "0.5396712", "0.5396015", "0.5385047", "0.5383578", "0.5383169", "0.5382783", "0.5376891", "0.5375864", "0.53635466", "0.53605866", "0.5349413", "0.5347657", "0.5347437", "0.5345194", "0.534382", "0.5335474" ]
0.5547859
66
This test will create deadlocks. Deadlocks would be much less of a problem if they could be resolved programmatically. As they cannot the order of these tests is very important. This means there is one master test method with three sub methods.
public void testItAll() throws Exception { while (ManagementFactory.getThreadMXBean().findMonitorDeadlockedThreads() != null) { fail("Started with thread already in deadlock: " + Arrays.toString(ManagementFactory.getThreadMXBean().findMonitorDeadlockedThreads())); } noDeadlock(); createDeadlock(); deadlock(); deadlockMonitoringOff(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testTryLockAndRelockAndPass() {\n\n\t\tinstance.lock();\n\n\t\tassertTrue(instance.tryLock());\n\t}", "@Test(groups = { \"lock\", \"nightly\" }, enabled=false)\n public void testMultipleWorkflowsWithLocks() {\n RaptureURI workflowRepo = helper.getRandomAuthority(Scheme.WORKFLOW);\n HttpDecisionApi decisionApi = helper.getDecisionApi();\n HttpScriptApi scriptApi = helper.getScriptApi();\n List<Step> thirtyNine = new ArrayList<Step>();\n String scriptUri = RaptureURI.builder(helper.getRandomAuthority(Scheme.SCRIPT)).docPath(\"sleep\").asString();\n long scriptSleepTime=10000;\n long timeoutValueSeconds=2;\n int numWorkflows=15;\n \n if (!scriptApi.doesScriptExist(scriptUri)) {\n @SuppressWarnings(\"unused\")\n RaptureScript executable = scriptApi.createScript(scriptUri, RaptureScriptLanguage.REFLEX, RaptureScriptPurpose.PROGRAM,\n \"println(\\\"Thread sleeping\\\");\\nsleep(\"+scriptSleepTime+\");\\nreturn 'next';\");\n }\n\n Step s1 = new Step();\n s1.setName(\"first\");\n s1.setExecutable(scriptUri);\n s1.setDescription(\"first sleep step\");\n\n Transition trans1 = new Transition();\n trans1.setName(\"next\");\n trans1.setTargetStep(\"$RETURN\");\n\n Transition error = new Transition();\n error.setName(\"error\");\n error.setTargetStep(\"$FAIL\");\n\n s1.setTransitions(ImmutableList.of(trans1, error));\n thirtyNine.add(s1);\n\n String semaphoreConfig = \"{\\\"maxAllowed\\\":1, \\\"timeout\\\":\"+timeoutValueSeconds+\" }\";\n\n // Begin by creating a couple of workflows.\n // In the real world these would be created by two different threads/users/applications,\n // so they use the same URI and semaphore config.\n\n Workflow flow = new Workflow();\n flow.setStartStep(\"first\");\n flow.setSteps(thirtyNine);\n String flowUri = RaptureURI.builder(workflowRepo).docPath(\"lockTest\").asString();\n flow.setWorkflowURI(flowUri);\n flow.setSemaphoreType(SemaphoreType.WORKFLOW_BASED);\n flow.setSemaphoreConfig(semaphoreConfig);\n decisionApi.putWorkflow(flow);\n\n \n RaptureURI lockUri = RaptureURI.builder(helper.getRandomAuthority(Scheme.DOCUMENT)).build();\n\t\tRaptureLockConfig lockConfig = lockApi.createLockManager(lockUri.toString(), \"LOCKING USING ZOOKEEPER {}\", \"\");\n // Start the first workflow. It will sleep for 5s then exit\n Map<String, String> params = new HashMap<String, String>();\n CreateResponse orderUri = decisionApi.createWorkOrderP(flow.getWorkflowURI(), params, null);\n assertNotNull(orderUri);\n\n List<String>woList = new ArrayList<String> ();\n for (int woCount =0; woCount<=numWorkflows; woCount++) {\n \tCreateResponse woUri = decisionApi.createWorkOrderP(flow.getWorkflowURI(), params, null);\n \t\n \ttry {\n \t\tThread.sleep(225);\n } catch (InterruptedException e) {\n }\n \tReporter.log(\"Checking work order attempt \"+woCount,true);\n \tlong successfulWoNumber=scriptSleepTime/(timeoutValueSeconds*1000);\n \tif (woCount % successfulWoNumber ==0 && woCount >0) {\n \t\tAssert.assertNotNull(woUri.getUri());\n \t\twoList.add(woUri.getUri());\n \t}\n \telse\n \t\tAssert.assertNull(woUri.getUri());\n \t\n }\n try {\n \tThread.sleep(10000);\n } catch (Exception e) {}\n for (String wo : woList) {\n \tReporter.log (\"Checking status of \"+wo,true);\n \tAssert.assertEquals(decisionApi.getWorkOrderStatus(wo).getStatus(),WorkOrderExecutionState.FINISHED);\n }\n }", "public static void main( String[] args )\n {\n LockTest test = new LockTest();\n new LockRun(test).start();\n new LockRun3(test).start();\n new LockRun2(test).start();\n new LockRun(test).start();\n new LockRun3(test).start();\n //1\n \n //2\n //Test the Reentrant Lock implementation\n ReentrantLockTest test1 = new ReentrantLockTest();\n new ReentrantLockRun(test1).start();\n new ReentrantLockRun(test1).start();\n //2\n \n //3\n //Test the Fair Lock implementation\n FairLockTest test2 = new FairLockTest();\n new FairLockRun (test2).start();\n new FairLockRun2 (test2).start();\n new FairLockRun3(test2).start();\n new FairLockRun (test2).start();\n new FairLockRun2 (test2).start();\n //3\n \n //4\n //Test the Thread Pool implementation\n ThreadPool m = new ThreadPool (2);\n for (int i =0; i<8;i++) {\n m.execute(new Task(i));\n }\n m.shutDown();\n //4\n }", "@Test\n public void testTaskLockCRUD() throws Exception {\n \n ThreadManager mgr = WebloggerFactory.getWeblogger().getThreadManager();\n \n // need a test task to play with\n TestTask task = new TestTask();\n task.init();\n \n // try to acquire a lock\n assertTrue(mgr.registerLease(task), \"Failed to acquire lease.\");\n // We don't flush here because registerLease should flush on its own\n TestUtils.endSession(false);\n \n // make sure task is locked\n assertFalse(mgr.registerLease(task),\"Acquired lease a second time when we shouldn't have been able to.\");\n TestUtils.endSession(false);\n \n // try to release a lock\n assertTrue(mgr.unregisterLease(task), \"Release of lease failed.\");\n // We don't flush here because unregisterLease should flush on its own\n TestUtils.endSession(false);\n\n // Current unregisterLease semantics are idempotent. Double release should\n // actually succeed.\n assertTrue( mgr.unregisterLease(task), \"Second release failed.\");\n TestUtils.endSession(false);\n }", "@Test(expected = LockUnavilableException.class)\r\n\tpublic void testRunAllFail() throws Exception {\n\t\tRandom randomGen = Mockito.mock(Random.class);\r\n\t\twhen(randomGen.nextInt(2)).thenReturn(0);\r\n\t\tReflectionTestUtils.setField(semaphoreGatedRunner, \"randomGen\", randomGen);\r\n\t\tsemaphoreGatedRunner.setMaxNumberRunners(2);\r\n\r\n\t\twhen(mockSemaphoreDao.attemptToAcquireLock(semaphoreKey + \"-1\", timeoutMS)).thenReturn(null);\r\n\t\twhen(mockSemaphoreDao.attemptToAcquireLock(semaphoreKey + \"-0\", timeoutMS)).thenReturn(null);\r\n\t\t// run\r\n\t\tCallable<Void> call = Mockito.mock(Callable.class);\r\n\t\ttry {\r\n\t\t\tsemaphoreGatedRunner.attemptToRunAllSlots(call, null);\r\n\t\t} finally {\r\n\t\t\tverify(call, never()).call();\r\n\t\t\tverify(mockSemaphoreDao).attemptToAcquireLock(semaphoreKey + \"-1\", timeoutMS);\r\n\t\t\tverify(mockSemaphoreDao).attemptToAcquireLock(semaphoreKey + \"-0\", timeoutMS);\r\n\t\t\tverify(mockSemaphoreDao, never()).releaseLock(anyString(), anyString());\r\n\t\t\tverifyNoMoreInteractions(mockSemaphoreDao);\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testRunIndependent() throws Exception {\n\t\tRandom randomGen = Mockito.mock(Random.class);\r\n\t\twhen(randomGen.nextInt(2)).thenReturn(0);\r\n\t\tReflectionTestUtils.setField(semaphoreGatedRunner, \"randomGen\", randomGen);\r\n\t\tsemaphoreGatedRunner.setMaxNumberRunners(2);\r\n\r\n\t\twhen(mockSemaphoreDao.attemptToAcquireLock(semaphoreKey + \"-yy\" + \"-0\", timeoutMS)).thenReturn(null);\r\n\t\twhen(mockSemaphoreDao.attemptToAcquireLock(semaphoreKey + \"-yy\" + \"-1\", timeoutMS)).thenReturn(null);\r\n\t\twhen(mockSemaphoreDao.attemptToAcquireLock(semaphoreKey + \"-xx\" + \"-1\", timeoutMS)).thenReturn(null);\r\n\t\tString token = \"someToken\";\r\n\t\twhen(mockSemaphoreDao.attemptToAcquireLock(semaphoreKey + \"-xx\" + \"-0\", timeoutMS)).thenReturn(token);\r\n\t\t// run\r\n\t\tCallable<Void> call1 = Mockito.mock(Callable.class);\r\n\t\tCallable<Void> call2 = Mockito.mock(Callable.class);\r\n\t\tsemaphoreGatedRunner.attemptToRunAllSlots(call1, \"xx\");\r\n\t\ttry {\r\n\t\t\tsemaphoreGatedRunner.attemptToRunAllSlots(call2, \"yy\");\r\n\t\t\tfail(\"Should have failed\");\r\n\t\t} catch (LockUnavilableException e) {\r\n\t\t}\r\n\t\tverify(call1).call();\r\n\t\tverify(call2, never()).call();\r\n\t\tverify(mockSemaphoreDao).attemptToAcquireLock(semaphoreKey + \"-yy\" + \"-1\", timeoutMS);\r\n\t\tverify(mockSemaphoreDao).attemptToAcquireLock(semaphoreKey + \"-yy\" + \"-0\", timeoutMS);\r\n\t\tverify(mockSemaphoreDao).attemptToAcquireLock(semaphoreKey + \"-xx\" + \"-1\", timeoutMS);\r\n\t\tverify(mockSemaphoreDao).attemptToAcquireLock(semaphoreKey + \"-xx\" + \"-0\", timeoutMS);\r\n\t\tverify(mockSemaphoreDao).releaseLock(semaphoreKey + \"-xx\" + \"-0\", token);\r\n\t\tverify(mockSemaphoreDao, never()).releaseLock(eq(semaphoreKey + \"-xx\" + \"-1\"), anyString());\r\n\t\tverify(mockSemaphoreDao, never()).releaseLock(eq(semaphoreKey + \"-yy\" + \"-1\"), anyString());\r\n\t\tverifyNoMoreInteractions(mockSemaphoreDao);\r\n\t}", "@Test(timeout=60000)\n\tpublic void testEscenarioBase() {\n\n\t\tcb= new CyclicBarrier(21);\n\t\tprincipal(3, 5, 2, 10); \n\t\tExecutorService executor = Executors.newFixedThreadPool(21);\t\t \n\t\tfor ( int i = 0; i < totalEmpleados; i++ ){\n\t\t\tTelefono c =new Telefono( dispatcher,cb,1);\n\t\t\texecutor.execute(c);\n\t\t}\n\t\tfor ( int i = 0; i < totalClientes; i++ ){\n\t\t\tCliente p= new Cliente(dispatcher,cb,1);\n\t\t\texecutor.execute(p);\n\t\t}\n\n\t\ttry {\n\t\t\tcb.await();\n\t\t\tcb.await();\n\t\t\tassertEquals(0, dispatcher.getnProductores());\n\t\t\tassertEquals(0, dispatcher.getLLamadas().size());\n\n\t\t} catch (BrokenBarrierException e) {\n\t\t\te.printStackTrace();\n\t\t}catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Test\r\n\tpublic void testRunAllSucceedSecond() throws Exception {\n\t\tRandom randomGen = Mockito.mock(Random.class);\r\n\t\twhen(randomGen.nextInt(2)).thenReturn(0);\r\n\t\tReflectionTestUtils.setField(semaphoreGatedRunner, \"randomGen\", randomGen);\r\n\t\tsemaphoreGatedRunner.setMaxNumberRunners(2);\r\n\r\n\t\twhen(mockSemaphoreDao.attemptToAcquireLock(semaphoreKey + \"-1\", timeoutMS)).thenReturn(null);\r\n\t\tString token = \"someToken\";\r\n\t\twhen(mockSemaphoreDao.attemptToAcquireLock(semaphoreKey + \"-0\", timeoutMS)).thenReturn(token);\r\n\t\t// run\r\n\t\tCallable<Void> call = Mockito.mock(Callable.class);\r\n\t\tsemaphoreGatedRunner.attemptToRunAllSlots(call, null);\r\n\t\tverify(call).call();\r\n\t\tverify(mockSemaphoreDao).attemptToAcquireLock(semaphoreKey + \"-1\", timeoutMS);\r\n\t\tverify(mockSemaphoreDao).attemptToAcquireLock(semaphoreKey + \"-0\", timeoutMS);\r\n\t\tverify(mockSemaphoreDao).releaseLock(semaphoreKey + \"-0\", token);\r\n\t\tverify(mockSemaphoreDao, never()).releaseLock(eq(semaphoreKey + \"-1\"), anyString());\r\n\t\tverifyNoMoreInteractions(mockSemaphoreDao);\r\n\t}", "@TestFor(issues = \"TW-48463\")\n public void concurrent_commit() throws Exception {\n RepositoryStateData s1 = RepositoryStateData.createVersionState(\"refs/heads/master\", map(\n \"refs/heads/master\", \"f727882267df4f8fe0bc58c18559591918aefc54\"));\n RepositoryStateData s2 = RepositoryStateData.createVersionState(\"refs/heads/master\", map(\n \"refs/heads/master\", \"f727882267df4f8fe0bc58c18559591918aefc54\",\n \"refs/heads/topic2\", \"cc69c22bd5d25779e58ad91008e685cbbe7f700a\"));\n myGit.getCollectChangesPolicy().collectChanges(myRoot, s1, s2, CheckoutRules.DEFAULT);\n\n RepositoryStateData state1 = myGit.getCurrentState(myRoot);\n\n CountDownLatch latch = new CountDownLatch(1);\n CountDownLatch t1Ready = new CountDownLatch(1);\n CountDownLatch t2Ready = new CountDownLatch(1);\n AtomicReference<VcsException> error1 = new AtomicReference<>();\n AtomicReference<VcsException> error2 = new AtomicReference<>();\n Thread t1 = new Thread(() -> {\n CommitPatchBuilder patchBuilder = null;\n try {\n patchBuilder = myCommitSupport.getCommitPatchBuilder(myRoot);\n patchBuilder.createFile(\"file-to-commit\", new ByteArrayInputStream(\"content1\".getBytes()));\n t1Ready.countDown();\n latch.await();\n patchBuilder.commit(new CommitSettingsImpl(\"user\", \"Commit1\"));\n } catch (VcsException e) {\n error1.set(e);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (patchBuilder != null)\n patchBuilder.dispose();\n }\n });\n t1.start();\n Thread t2 = new Thread(() -> {\n CommitPatchBuilder patchBuilder = null;\n try {\n patchBuilder = myCommitSupport.getCommitPatchBuilder(myRoot);\n patchBuilder.createFile(\"file-to-commit\", new ByteArrayInputStream(\"content2\".getBytes()));\n t2Ready.countDown();\n latch.await();\n patchBuilder.commit(new CommitSettingsImpl(\"user\", \"Commit2\"));\n } catch (VcsException e) {\n error2.set(e);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (patchBuilder != null)\n patchBuilder.dispose();\n }\n });\n t2.start();\n t1Ready.await();\n t2Ready.await();\n latch.countDown();\n t1.join();\n t2.join();\n\n RepositoryStateData state2 = myGit.getCurrentState(myRoot);\n\n List<ModificationData> changes = myGit.getCollectChangesPolicy().collectChanges(myRoot, state1, state2, CheckoutRules.DEFAULT);\n\n then(changes.size() == 2 || (error1.get() != null || error2.get() != null)) //either both commits succeeds, or one finishes with an error\n .overridingErrorMessage(\"Non-fast-forward push succeeds\")\n .isTrue();\n }", "@Test\r\n\tpublic void testRunAllSucceedFirst() throws Exception {\n\t\tRandom randomGen = Mockito.mock(Random.class);\r\n\t\twhen(randomGen.nextInt(2)).thenReturn(0);\r\n\t\tReflectionTestUtils.setField(semaphoreGatedRunner, \"randomGen\", randomGen);\r\n\t\tsemaphoreGatedRunner.setMaxNumberRunners(2);\r\n\r\n\t\tString token = \"someToken\";\r\n\t\twhen(mockSemaphoreDao.attemptToAcquireLock(semaphoreKey + \"-1\", timeoutMS)).thenReturn(token);\r\n\t\t// run\r\n\t\tCallable<Void> call = Mockito.mock(Callable.class);\r\n\t\tsemaphoreGatedRunner.attemptToRunAllSlots(call, null);\r\n\t\tverify(call).call();\r\n\t\tverify(mockSemaphoreDao).attemptToAcquireLock(semaphoreKey + \"-1\", timeoutMS);\r\n\t\tverify(mockSemaphoreDao).releaseLock(semaphoreKey + \"-1\", token);\r\n\t\tverifyNoMoreInteractions(mockSemaphoreDao);\r\n\t}", "@Test\n @Transactional\n public void test_pessimistic_lock__separate_transactions__forUpdate_doesnot_update() throws InterruptedException {\n AtomicLong waited = new AtomicLong(-1);\n AtomicBoolean expectedValueFound = new AtomicBoolean(false);\n URI atomURI = newAtomURI();\n executeInSeparateThreadAndWaitForResult(() -> {\n Atom atom = new Atom();\n atom.setAtomURI(atomURI);\n atom.setState(AtomState.ACTIVE);\n AtomMessageContainer container = new AtomMessageContainer(atom, atom.getAtomURI());\n atom = atomRepository.save(atom);\n });\n Thread parallelThread1 = new Thread(() -> helper.doInSeparateTransaction(() -> {\n Optional<Atom> b = atomRepository.findOneByAtomURIForUpdate(atomURI);\n logger.debug(\"read in other thread: \" + b);\n }));\n parallelThread1.start();\n Thread.sleep(100);\n Thread parallelThread2 = new Thread(() -> helper.doInSeparateTransaction(() -> {\n Optional<Atom> a = atomRepository.findOneByAtomURIForUpdate(atomURI);\n logger.debug(\"read in yet another thread: \" + a);\n logger.debug(\"blocking...\");\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n a.get().setCreationDate(new Date(1));\n atomRepository.save(a.get());\n }));\n parallelThread2.start();\n Thread.sleep(100);\n Thread parallelThread3 = new Thread(() -> helper.doInSeparateTransaction(() -> {\n Optional<Atom> b = atomRepository.findOneByAtomURI(atomURI);\n logger.debug(\"acquiring exclusive lock...\");\n long now = System.currentTimeMillis();\n b = atomRepository.findOneByAtomURIForUpdate(atomURI);\n logger.debug(\"read in the third thread: \" + b);\n logger.debug(\"waited: \" + (System.currentTimeMillis() - now));\n waited.set(System.currentTimeMillis() - now);\n expectedValueFound.set(b.get().getCreationDate().getTime() != 1);\n }));\n parallelThread3.start();\n logger.debug(\"waiting for parallel threads to finish\");\n parallelThread1.join();\n parallelThread2.join();\n parallelThread3.join();\n Assert.assertTrue(\"thread should have been blocked at least 500ms\", waited.get() > 500);\n Assert.assertTrue(\"thread3 did not get update by thread2\", expectedValueFound.get());\n }", "@Test public void testTransactionExclusion5() throws Exception {\n server.start(THREAD1, XID1, XAResource.TMNOFLAGS, 100,false);\n server.start(THREAD2, XID2, XAResource.TMNOFLAGS, 100,false);\n server.end(THREAD2, XID2, XAResource.TMSUCCESS,false);\n\n try {\n server.start(THREAD1, XID2, XAResource.TMJOIN, 100,false);\n fail(\"exception expected\"); //$NON-NLS-1$\n } catch (XATransactionException ex) {\n assertEquals(\"TEIID30517 Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.\", //$NON-NLS-1$\n ex.getMessage());\n }\n }", "@Test (timeout=180000)\n public void testParallelHbck() throws Exception {\n final ExecutorService service;\n final Future<HBaseFsck> hbck1,hbck2;\n\n class RunHbck implements Callable<HBaseFsck>{\n boolean fail = true;\n @Override\n public HBaseFsck call(){\n Configuration c = new Configuration(conf);\n c.setInt(\"hbase.hbck.lockfile.attempts\", 1);\n // HBASE-13574 found that in HADOOP-2.6 and later, the create file would internally retry.\n // To avoid flakiness of the test, set low max wait time.\n c.setInt(\"hbase.hbck.lockfile.maxwaittime\", 3);\n try{\n return doFsck(c, true); // Exclusive hbck only when fixing\n } catch(Exception e){\n if (e.getMessage().contains(\"Duplicate hbck\")) {\n fail = false;\n }\n }\n // If we reach here, then an exception was caught\n if (fail) fail();\n return null;\n }\n }\n service = Executors.newFixedThreadPool(2);\n hbck1 = service.submit(new RunHbck());\n hbck2 = service.submit(new RunHbck());\n service.shutdown();\n //wait for 15 seconds, for both hbck calls finish\n service.awaitTermination(15, TimeUnit.SECONDS);\n HBaseFsck h1 = hbck1.get();\n HBaseFsck h2 = hbck2.get();\n // Make sure only one of the calls was successful\n assert(h1 == null || h2 == null);\n if (h1 != null) {\n assert(h1.getRetCode() >= 0);\n }\n if (h2 != null) {\n assert(h2.getRetCode() >= 0);\n }\n }", "@Test\n public void testAddToWaitList() throws Exception {\n }", "public void lock() {\n/* 254 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void testMetaBlocks() throws Exception {\n metablocks(\"none\");\n metablocks(\"gz\");\n }", "@Test\n public void updateBlock() throws Exception {\n\n }", "@Test\r\n\tvoid testReentrant() throws Exception\r\n\t{\r\n\t\tfinal PageAccessSynchronizer sync = new PageAccessSynchronizer(Duration.ofSeconds(5));\r\n\t\tsync.lockPage(0);\r\n\t\tsync.lockPage(0);\r\n\t}", "public static void main(String[] args) {\n\n\t\t// Declare two strings which will be used to cause the deadlock\n\t\tString lockOne = \"I'm about to lock this!\";\n\t\tString lockTwo = \"And I'm going to cause a deadlock!\";\n\t\t\n\t\t// Declare first thread as runnable\n\t\tThread threadOne = new Thread(new Runnable() {\n\t\t\t\n\t\t\t// Cause first lock\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tsynchronized(lockOne) {\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\tsynchronized (lockTwo) {\n\t\t\t\t\t\t\tSystem.out.println(\"Thread 1 is running with 2 locks\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\t// Declare second thread as runnable\n\t\tThread threadTwo = new Thread(new Runnable() {\n\t\t\t\n\t\t\t// Cause second lock\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tsynchronized(lockTwo) {\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\tsynchronized (lockOne) {\n\t\t\t\t\t\t\tSystem.out.println(\"Thread 2 is running with 2 locks\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Create threads for each runnable thread and start, causing deadlock\n\t\tthreadOne.start();\n\t\tthreadTwo.start();\n\t}", "@Test(timeout=60000)\n\tpublic void testLlamadasenLineaBase() {\n\t\tcb= new CyclicBarrier(21);\n\t\tprincipal(5, 3, 2, 10); \n\t\tExecutorService executor = Executors.newFixedThreadPool(21);\t\t \n\t\tfor ( int i = 0; i < totalEmpleados; i++ ){\n\t\t\tTelefono c =new Telefono( dispatcher,cb,0);\n\t\t\texecutor.execute(c);\n\t\t}\n\t\tfor ( int i = 0; i < totalClientes; i++ ){\n\t\t\tCliente p= new Cliente(dispatcher,cb,0);\n\t\t\texecutor.execute(p);\n\t\t}\n\n\t\ttry {\n\t\t\tcb.await();\n\t\t\tassertEquals(0, dispatcher.getnProductores());\n\t\t\tassertEquals(0, dispatcher.getLLamadas().size());\n\n\t\t} catch (BrokenBarrierException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test public void testTransactionExclusion4() throws Exception {\n server.begin(THREAD1);\n\n try {\n server.begin(THREAD1);\n fail(\"exception expected\"); //$NON-NLS-1$\n } catch (XATransactionException ex) {\n assertEquals(\"TEIID30517 Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.\", //$NON-NLS-1$\n ex.getMessage());\n }\n }", "@Test (timeout=180000)\n public void testHbckThreadpooling() throws Exception {\n TableName table =\n TableName.valueOf(\"tableDupeStartKey\");\n try {\n // Create table with 4 regions\n setupTable(table);\n\n // limit number of threads to 1.\n Configuration newconf = new Configuration(conf);\n newconf.setInt(\"hbasefsck.numthreads\", 1);\n assertNoErrors(doFsck(newconf, false));\n\n // We should pass without triggering a RejectedExecutionException\n } finally {\n cleanupTable(table);\n }\n }", "@Test\n public void writeTryLockFailedTest() throws InterruptedException {\n final TestUse testUse = new TestUse();\n int threadNum = 2;\n final CountDownLatch countDownLatch = new CountDownLatch(threadNum);\n for (int i = 0; i < threadNum; i++) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n testUse.minusCountAndSleepInWriteTryLock(2000);\n countDownLatch.countDown();\n }\n }).start();\n }\n countDownLatch.await();\n boolean result = false;\n if (testUse.count == 1000 || testUse.count == 999) {\n result = true;\n }\n Assert.assertTrue(result);\n }", "@Test\n public void testNextWaiting() {\n }", "@Test\n public void testUnblock() {\n System.out.println(\"unblock\"); \n //instance.unblock();\n \n }", "public TestJSR88Concurrency() {\n }", "@Test\n public void testPessimisticLocking()\n {\n Employee employee = new EmployeeBuilder().withAge(30).withName(\"Hans\").withSurename(\"Mueller\").build();\n\n // saving Employee\n em.getTransaction().begin();\n em.persist(employee);\n em.getTransaction().commit();\n\n // fresh start\n em = emf.createEntityManager();\n EntityManager em2 = emf.createEntityManager();\n\n em.getTransaction().begin();\n Employee reloadedEmployeInstance1 = em.find(Employee.class, employee.getId());\n\n // Enable to get a deadlock\n// em.lock(reloadedEmployeInstance1, LockModeType.READ);\n\n em2.getTransaction().begin();\n Employee reloadedEmployeInstance2 = em2.find(Employee.class, employee.getId());\n reloadedEmployeInstance2.setAge(99);\n em2.persist(reloadedEmployeInstance2);\n em2.getTransaction().commit();\n\n\n em.getTransaction().commit();\n }", "@Test\n public void run() {\n Frame f = new TestUtil().parseTestFile(\"smalldata/junit/syn_2659x1049.csv.gz\");\n // Create two lockable frames in KV store\n Frame fr1 = new Frame(Key.<Frame>make(), f.names(), f.vecs());\n Frame fr2 = new Frame(Key.<Frame>make(), f.names(), f.vecs());\n // Lock the frames against writes\n fr1.delete_and_lock();\n fr2.delete_and_lock();\n int i = 0;\n try {\n // try to delete the write-locked frames -> will throw an exception\n fr1.delete();\n fr2.delete(); // won't be reached\n } catch (Throwable t) {\n Log.info(\"Correctly unable to delete (was locked): \" + t.getClass()); //either AssertionError if local or DistributedException if remote\n i++;\n } finally {\n // second attempt: will unlock and delete properly\n new UnlockTask().doAllNodes(); // without this line, there will be a leak (and assertion won't be shown)\n fr1.delete();\n fr2.delete();\n f.delete();\n Log.info(\"Able to delete after unlocking.\");\n }\n Assert.assertTrue(i == 1);\n }", "@Test(timeout = 30000)\n public void testConcurrentModifications() throws Exception {\n assertFalse(\"Something is wrong\", CurrentUnitOfWork.isStarted());\n final UUID aggregateId = UUID.randomUUID();\n commandBus.dispatch(asCommandMessage(new CreateStubAggregateCommand(aggregateId)));\n ExecutorService service = Executors.newFixedThreadPool(THREAD_COUNT);\n final AtomicLong counter = new AtomicLong(0);\n List<Future<?>> results = new LinkedList<>();\n for (int t = 0; t < 30; t++) {\n results.add(service.submit(() -> {\n try {\n commandBus.dispatch(asCommandMessage(new UpdateStubAggregateCommand(aggregateId)));\n commandBus.dispatch(asCommandMessage(new ProblematicCommand(aggregateId)),\n SilentCallback.INSTANCE);\n commandBus.dispatch(asCommandMessage(new LoopingCommand(aggregateId)));\n counter.incrementAndGet();\n } catch (Exception ex) {\n throw new RuntimeException(ex);\n }\n }));\n }\n service.shutdown();\n while (!service.awaitTermination(3, TimeUnit.SECONDS)) {\n System.out.println(\"Did \" + counter.get() + \" batches\");\n }\n\n for (Future<?> result : results) {\n if (result.isDone()) {\n result.get();\n }\n }\n assertEquals(91, registeringEventHandler.getCapturedEvents().size());\n validateDispatchingOrder();\n }", "@Test\n public void testB1() throws InterruptedException {\n\n System.out.println();\n System.out.println(\"Test B1\");\n System.out.println();\n\n // Zeitmessung starten\n c.tick();\n\n // 2 Wissenschaftlerthreads erzeugen und starten\n final Thread[] startAll = m.startAll(2, 1, 500, 500, 0, AlgorithmType.B, null);\n\n Assert.assertEquals(\"Es wurden nicht alle Threads erzeugt\", 2, startAll.length);\n\n // Warten bis sich alle 2 Wissenschaftlerthreads beenden\n for (Thread t : startAll) {\n t.join();\n System.out.println(\"Joined: \" + t.getName());\n }\n\n // Zeit nochmals messen\n c.tick();\n\n // Timing sicherstellen (mit Toleranz durch assertTiming-Methode)\n assertTiming(1500);\n }", "@Test\n\tpublic void test_synchronization() throws InterruptedException, ExecutionException {\n\t\t\n\t\tIkanowV1SyncService_LibraryJars s1 = new IkanowV1SyncService_LibraryJars(BeanTemplateUtils.clone(_service_config).with(\"v1_enabled\", true).done(), \n\t\t\t\t_service_context);\n\t\tIkanowV1SyncService_LibraryJars s2 = new IkanowV1SyncService_LibraryJars(BeanTemplateUtils.clone(_service_config).with(\"v1_enabled\", true).done(), \n\t\t\t\t_service_context);\n\t\tIkanowV1SyncService_LibraryJars s3 = new IkanowV1SyncService_LibraryJars(BeanTemplateUtils.clone(_service_config).with(\"v1_enabled\", true).done(), \n\t\t\t\t_service_context);\n\t\t\n\t\tint old = IkanowV1SyncService_LibraryJars._num_leader_changes;\n\t\t\n\t\ts1.start(); s2.start(); s3.start();\n\t\tfor (int i = 0; i < 4; ++i) {\n\t\t\ttry { Thread.sleep(1000); } catch (Exception e) {}\n\t\t}\n\t\ts1.stop(); s2.stop(); s3.stop();\n\t\t\n\t\tassertEquals(old + 1, IkanowV1SyncService_LibraryJars._num_leader_changes);\n\t\t\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tfinal ICrudService<JsonNode> v1_config_db = _service_context.getCoreManagementDbService().getUnderlyingPlatformDriver(ICrudService.class, Optional.of(\"social.share\")).get();\t\t\t\t\n\t\t\n\t\tassertTrue(\"Query optimized\", v1_config_db.deregisterOptimizedQuery(Arrays.asList(\"title\")));\n\t\t\n\t}", "@Test\n public void testLockBatchParticipantsUpdate() throws Exception {\n final String rgnName = getUniqueName();\n Region rgn = getCache().createRegion(rgnName, getRegionAttributes());\n rgn.create(\"key\", null);\n\n Host host = Host.getHost(0);\n VM vm0 = host.getVM(0);\n VM vm1 = host.getVM(1);\n VM vm2 = host.getVM(2);\n SerializableRunnable initRegions =\n new SerializableRunnable(\"testLockBatchParticipantsUpdate: initial configuration\") {\n @Override\n public void run() {\n try {\n Region rgn1 = getCache().createRegion(rgnName, getRegionAttributes());\n rgn1.create(\"key\", null);\n } catch (CacheException e) {\n Assert.fail(\"While creating region\", e);\n }\n }\n };\n vm0.invoke(initRegions);\n vm1.invoke(initRegions);\n rgn.put(\"key\", \"val1\");\n\n // Connect vm2 also since it may have been shutdown when logPerTest\n // is turned on\n vm2.invoke(new SerializableRunnable(\"connect vm2 if not connected\") {\n @Override\n public void run() {\n getCache();\n }\n });\n\n // Make VM0 the Grantor\n vm0.invoke(new SerializableRunnable(\"testLockBatchParticipantsUpdate: remote grantor init\") {\n @Override\n public void run() {\n try {\n Region rgn1 = getCache().getRegion(rgnName);\n final CacheTransactionManager txMgr2 = getCache().getCacheTransactionManager();\n assertEquals(\"val1\", rgn1.getEntry(\"key\").getValue());\n txMgr2.begin();\n rgn1.put(\"key\", \"val2\");\n txMgr2.commit();\n assertNotNull(TXLockService.getDTLS());\n assertTrue(TXLockService.getDTLS().isLockGrantor());\n } catch (CacheException e) {\n fail(\"While performing first transaction\");\n }\n }\n });\n\n // fix for bug 38843 causes the DTLS to be created in every TX participant\n assertNotNull(TXLockService.getDTLS());\n assertFalse(TXLockService.getDTLS().isLockGrantor());\n assertEquals(\"val2\", rgn.getEntry(\"key\").getValue());\n\n // Build sets of System Ids and set them up on VM0 for future batch member checks\n HashSet txMembers = new HashSet(4);\n txMembers.add(getSystemId());\n txMembers.add(vm0.invoke(TXDistributedDUnitTest::getSystemId));\n vm0.invoke(() -> TXDistributedDUnitTest.setPreTXSystemIds(txMembers));\n txMembers.add(vm2.invoke(TXDistributedDUnitTest::getSystemId));\n vm0.invoke(() -> TXDistributedDUnitTest.setPostTXSystemIds(txMembers));\n\n // Don't include the tx host in the batch member set(s)\n Serializable vm1HostId = vm1.invoke(TXDistributedDUnitTest::getSystemId);\n vm0.invoke(() -> TXDistributedDUnitTest.setTXHostSystemId(vm1HostId));\n\n // Create a TX on VM1 (such that it will ask for locks on VM0) that uses the callbacks\n // to pause and give us time to start a GII process on another VM\n vm1.invoke(new SerializableRunnable(\n \"testLockBatchParticipantsUpdate: slow tx (one that detects new member)\") {\n @Override\n public void run() {\n // fix for bug 38843 causes the DTLS to be created in every TX participant\n assertNotNull(TXLockService.getDTLS());\n assertFalse(TXLockService.getDTLS().isLockGrantor());\n\n PausibleTX pauseTXRunnable = new PausibleTX();\n pauseTXRunnable.rgnName = rgnName;\n pauseTXRunnable.myCache = getCache();\n pauseTXRunnable.key = \"key\";\n pauseTXRunnable.value = \"val3\";\n new Thread(pauseTXRunnable, \"PausibleTX Thread\").start();\n synchronized (PausibleTX.class) {\n while (!pauseTXRunnable.getIsRunning()) {\n try {\n PausibleTX.class.wait();\n } catch (InterruptedException ie) {\n fail(\"Did not expect \" + ie);\n }\n }\n }\n }\n });\n\n // Verify that the lock batch exists VM0 and has the size we expect\n vm0.invoke(new SerializableRunnable(\n \"testLockBatchParticipantsUpdate: Verify lock batch exists on VM0 with expected size\") {\n @Override\n public void run() {\n getCache().getRegion(rgnName);\n TXLockServiceImpl dtls = (TXLockServiceImpl) TXLockService.getDTLS();\n assertNotNull(dtls);\n assertTrue(dtls.isLockGrantor());\n DLockService dLockSvc = dtls.getInternalDistributedLockService();\n assertNotNull(TXDistributedDUnitTest.txHostId);\n DLockBatch[] batches = dLockSvc.getGrantor()\n .getLockBatches((InternalDistributedMember) TXDistributedDUnitTest.txHostId);\n assertEquals(batches.length, 1);\n TXLockBatch txLockBatch = (TXLockBatch) batches[0];\n assertNotNull(txLockBatch);\n assertNotNull(TXDistributedDUnitTest.preTXSystemIds);\n assertTrue(\n \"Members in lock batch \" + txLockBatch.getParticipants() + \" not the same as \"\n + TXDistributedDUnitTest.preTXSystemIds,\n txLockBatch.getParticipants().equals(TXDistributedDUnitTest.preTXSystemIds));\n }\n });\n\n // Start a GII process on VM2\n vm2.invoke(new SerializableRunnable(\"testLockBatchParticipantsUpdate: start GII\") {\n @Override\n public void run() {\n try {\n AttributesFactory factory = new AttributesFactory();\n factory.setScope(Scope.DISTRIBUTED_ACK);\n factory.setEarlyAck(false);\n factory.setDataPolicy(DataPolicy.REPLICATE);\n getCache().createRegion(rgnName, factory.create());\n } catch (CacheException e) {\n Assert.fail(\"While creating region\", e);\n }\n }\n });\n\n // Notify TX on VM1 so that it can continue\n vm1.invoke(\n new SerializableRunnable(\"testLockBatchParticipantsUpdate: Notfiy VM1 TX to continue\") {\n @Override\n public void run() {\n synchronized (PausibleTX.class) {\n // Notify VM1 that it should proceed to the TX send\n PausibleTX.class.notifyAll();\n // Wait until VM1 has sent the TX\n try {\n PausibleTX.class.wait();\n } catch (InterruptedException ie) {\n fail(\"Did not expect \" + ie);\n }\n }\n }\n });\n\n // Verify that the batch on VM0 has added VM2 into the set\n vm0.invoke(new SerializableRunnable(\n \"testLockBatchParticipantsUpdate: Verify lock batch contains VM2\") {\n @Override\n public void run() {\n getCache().getRegion(rgnName);\n TXLockServiceImpl dtls = (TXLockServiceImpl) TXLockService.getDTLS();\n assertNotNull(dtls);\n assertTrue(dtls.isLockGrantor());\n DLockService dLockSvc = dtls.getInternalDistributedLockService();\n assertNotNull(TXDistributedDUnitTest.txHostId);\n DLockBatch[] batches = dLockSvc.getGrantor()\n .getLockBatches((InternalDistributedMember) TXDistributedDUnitTest.txHostId);\n assertEquals(batches.length, 1);\n TXLockBatch txLockBatch = (TXLockBatch) batches[0];\n assertNotNull(txLockBatch);\n assertNotNull(TXDistributedDUnitTest.preTXSystemIds);\n assertTrue(\n \"Members in lock batch \" + txLockBatch.getParticipants() + \" not the same as \"\n + TXDistributedDUnitTest.postTXSystemIds,\n txLockBatch.getParticipants().equals(TXDistributedDUnitTest.postTXSystemIds));\n }\n });\n // fix for bug 38843 causes the DTLS to be created in every TX participant\n assertNotNull(TXLockService.getDTLS());\n assertFalse(TXLockService.getDTLS().isLockGrantor());\n assertEquals(\"val3\", rgn.getEntry(\"key\").getValue());\n\n\n // Notify TX on VM1 that it can go ahead and complete the TX\n vm1.invoke(\n new SerializableRunnable(\"testLockBatchParticipantsUpdate: Notfiy VM1 TX to finish\") {\n @Override\n public void run() {\n synchronized (PausibleTX.class) {\n // Notify VM1 that it should finish the TX\n PausibleTX.class.notifyAll();\n }\n }\n });\n\n\n rgn.destroyRegion();\n }", "@Test\n public void testUnfreezeDelegatedBalanceForBandwidthSameTokenNameClose() {\n UnfreezeBalanceActuatorTest.dbManager.getDynamicPropertiesStore().saveAllowDelegateResource(0);\n long now = System.currentTimeMillis();\n UnfreezeBalanceActuatorTest.dbManager.getDynamicPropertiesStore().saveLatestBlockHeaderTimestamp(now);\n AccountCapsule owner = UnfreezeBalanceActuatorTest.dbManager.getAccountStore().get(ByteArray.fromHexString(UnfreezeBalanceActuatorTest.OWNER_ADDRESS));\n owner.setDelegatedFrozenBalanceForBandwidth(UnfreezeBalanceActuatorTest.frozenBalance);\n Assert.assertEquals(UnfreezeBalanceActuatorTest.frozenBalance, owner.getTronPower());\n AccountCapsule receiver = UnfreezeBalanceActuatorTest.dbManager.getAccountStore().get(ByteArray.fromHexString(UnfreezeBalanceActuatorTest.RECEIVER_ADDRESS));\n receiver.setAcquiredDelegatedFrozenBalanceForBandwidth(UnfreezeBalanceActuatorTest.frozenBalance);\n Assert.assertEquals(0L, receiver.getTronPower());\n UnfreezeBalanceActuatorTest.dbManager.getAccountStore().put(owner.createDbKey(), owner);\n UnfreezeBalanceActuatorTest.dbManager.getAccountStore().put(receiver.createDbKey(), receiver);\n // init DelegatedResourceCapsule\n DelegatedResourceCapsule delegatedResourceCapsule = new DelegatedResourceCapsule(owner.getAddress(), receiver.getAddress());\n delegatedResourceCapsule.setFrozenBalanceForBandwidth(UnfreezeBalanceActuatorTest.frozenBalance, (now - 100L));\n UnfreezeBalanceActuatorTest.dbManager.getDelegatedResourceStore().put(DelegatedResourceCapsule.createDbKey(ByteArray.fromHexString(UnfreezeBalanceActuatorTest.OWNER_ADDRESS), ByteArray.fromHexString(UnfreezeBalanceActuatorTest.RECEIVER_ADDRESS)), delegatedResourceCapsule);\n // init DelegatedResourceAccountIndex\n {\n DelegatedResourceAccountIndexCapsule delegatedResourceAccountIndex = new DelegatedResourceAccountIndexCapsule(owner.getAddress());\n delegatedResourceAccountIndex.addToAccount(ByteString.copyFrom(ByteArray.fromHexString(UnfreezeBalanceActuatorTest.RECEIVER_ADDRESS)));\n UnfreezeBalanceActuatorTest.dbManager.getDelegatedResourceAccountIndexStore().put(ByteArray.fromHexString(UnfreezeBalanceActuatorTest.OWNER_ADDRESS), delegatedResourceAccountIndex);\n }\n {\n DelegatedResourceAccountIndexCapsule delegatedResourceAccountIndex = new DelegatedResourceAccountIndexCapsule(receiver.getAddress());\n delegatedResourceAccountIndex.addFromAccount(ByteString.copyFrom(ByteArray.fromHexString(UnfreezeBalanceActuatorTest.OWNER_ADDRESS)));\n UnfreezeBalanceActuatorTest.dbManager.getDelegatedResourceAccountIndexStore().put(ByteArray.fromHexString(UnfreezeBalanceActuatorTest.RECEIVER_ADDRESS), delegatedResourceAccountIndex);\n }\n UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator(getDelegatedContractForBandwidth(UnfreezeBalanceActuatorTest.OWNER_ADDRESS, UnfreezeBalanceActuatorTest.RECEIVER_ADDRESS), UnfreezeBalanceActuatorTest.dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n try {\n actuator.validate();\n actuator.execute(ret);\n TestCase.fail(\"cannot run here.\");\n } catch (ContractValidateException e) {\n Assert.assertTrue((e instanceof ContractValidateException));\n Assert.assertEquals(\"no frozenBalance(BANDWIDTH)\", e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertTrue((e instanceof ContractExeException));\n }\n }", "@Test\n public void testFailLock() {\n if (getConnection().isNis()) {\n // TODO Workaround on Solaris NIS: there doesn't seem to be a way\n // how to handle user locks on NIS.\n log.info(\"skipping test 'testLock', as LOCK attribute is not supported by the connector on NIS.\");\n return;\n }\n try {\n getFacade().update(ObjectClass.ACCOUNT, new Uid(getUsername()),\n CollectionUtil.newSet(AttributeBuilder.build(AccountAttribute.LOCK.getName())),\n null);\n AssertJUnit\n .fail(\"passing null option to Lock should cause failure. It must have a boolean value.\");\n } catch (Exception ex) {\n // OK\n }\n try {\n getFacade().create(\n ObjectClass.ACCOUNT,\n CollectionUtil.newSet(AttributeBuilder.build(Name.NAME, \"fooconn\"),\n AttributeBuilder.buildPassword(\"foo134\".toCharArray()),\n AttributeBuilder.build(AccountAttribute.LOCK.getName())), null);\n AssertJUnit\n .fail(\"passing null option to Lock should cause failure. It must have a boolean value.\");\n } catch (Exception ex) {\n // OK\n } finally {\n try {\n getFacade().delete(ObjectClass.ACCOUNT, new Uid(\"foo134\"), null);\n } catch (Exception ex) {\n // OK\n }\n }\n }", "protected void checkDeadLock()\r\n/* 303: */ {\r\n/* 304:389 */ EventExecutor e = executor();\r\n/* 305:390 */ if ((e != null) && (e.inEventLoop())) {\r\n/* 306:391 */ throw new BlockingOperationException(toString());\r\n/* 307: */ }\r\n/* 308: */ }", "@Test (timeout=180000)\n public void testParallelWithRetriesHbck() throws Exception {\n final ExecutorService service;\n final Future<HBaseFsck> hbck1,hbck2;\n\n // With the ExponentialBackoffPolicyWithLimit (starting with 200 milliseconds sleep time, and\n // max sleep time of 5 seconds), we can retry around 15 times within 80 seconds before bail out.\n //\n // Note: the reason to use 80 seconds is that in HADOOP-2.6 and later, the create file would\n // retry up to HdfsConstants.LEASE_SOFTLIMIT_PERIOD (60 seconds). See HBASE-13574 for more\n // details.\n final int timeoutInSeconds = 80;\n final int sleepIntervalInMilliseconds = 200;\n final int maxSleepTimeInMilliseconds = 6000;\n final int maxRetryAttempts = 15;\n\n class RunHbck implements Callable<HBaseFsck>{\n\n @Override\n public HBaseFsck call() throws Exception {\n // Increase retry attempts to make sure the non-active hbck doesn't get starved\n Configuration c = new Configuration(conf);\n c.setInt(\"hbase.hbck.lockfile.maxwaittime\", timeoutInSeconds);\n c.setInt(\"hbase.hbck.lockfile.attempt.sleep.interval\", sleepIntervalInMilliseconds);\n c.setInt(\"hbase.hbck.lockfile.attempt.maxsleeptime\", maxSleepTimeInMilliseconds);\n c.setInt(\"hbase.hbck.lockfile.attempts\", maxRetryAttempts);\n return doFsck(c, false);\n }\n }\n\n service = Executors.newFixedThreadPool(2);\n hbck1 = service.submit(new RunHbck());\n hbck2 = service.submit(new RunHbck());\n service.shutdown();\n //wait for some time, for both hbck calls finish\n service.awaitTermination(timeoutInSeconds * 2, TimeUnit.SECONDS);\n HBaseFsck h1 = hbck1.get();\n HBaseFsck h2 = hbck2.get();\n // Both should be successful\n assertNotNull(h1);\n assertNotNull(h2);\n assert(h1.getRetCode() >= 0);\n assert(h2.getRetCode() >= 0);\n\n }", "@Test public void testTransactionExclusion3() throws Exception {\n server.start(THREAD1, XID1, XAResource.TMNOFLAGS, 100,false);\n\n try {\n server.start(THREAD1, XID2, XAResource.TMNOFLAGS, 100,false);\n fail(\"exception expected\"); //$NON-NLS-1$\n } catch (XATransactionException ex) {\n assertEquals(\"TEIID30517 Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.\", //$NON-NLS-1$\n ex.getMessage());\n }\n }", "@Test\n @Issue(\"JENKINS-41685\")\n public void testParallelsWithDuplicateEvents() throws Exception {\n //https://gist.github.com/vivek/ccf3a4ef25fbff267c76c962d265041d\n WorkflowJob job = r.jenkins.createProject(WorkflowJob.class, \"ParallelInsanity\");\n job.setDefinition(new CpsFlowDefinition(\"\" +\n \"echo 'first stage'\\n\" +\n \"parallel left : {\\n\" +\n \" echo 'run a bit'\\n\" +\n \" echo 'run a bit more'\\n\" +\n \" semaphore 'wait1'\\n\" +\n \"}, right : {\\n\" +\n \" echo 'wozzle'\\n\" +\n \" semaphore 'wait2'\\n\" +\n \"}\\n\" +\n \"echo 'last stage'\\n\" +\n \"echo \\\"last done\\\"\\n\",\n true));\n ForkScanner scan = new ForkScanner();\n ChunkFinder labelFinder = new NoOpChunkFinder();\n WorkflowRun run = job.scheduleBuild2(0).getStartCondition().get();\n SemaphoreStep.waitForStart(\"wait1/1\", run);\n SemaphoreStep.waitForStart(\"wait2/1\", run);\n\n TestVisitor test = new TestVisitor();\n List<FlowNode> heads = run.getExecution().getCurrentHeads();\n scan.setup(heads);\n scan.visitSimpleChunks(test, labelFinder);\n\n SemaphoreStep.success(\"wait1\"+\"/1\", null);\n SemaphoreStep.success(\"wait2\"+\"/1\", null);\n r.waitForCompletion(run);\n\n int atomEventCount = 0;\n int parallelBranchEndCount = 0;\n int parallelStartCount = 0;\n for (TestVisitor.CallEntry ce : test.calls) {\n switch (ce.type) {\n case ATOM_NODE:\n atomEventCount++;\n break;\n case PARALLEL_BRANCH_END:\n parallelBranchEndCount++;\n break;\n case PARALLEL_START:\n parallelStartCount++;\n break;\n default:\n break;\n }\n }\n\n sanityTestIterationAndVisiter(heads);\n Assert.assertEquals(10, atomEventCount);\n Assert.assertEquals(1, parallelStartCount);\n Assert.assertEquals(2, parallelBranchEndCount);\n }", "@Test\n public void testBlock() {\n System.out.println(\"block\");\n //instance.block();\n }", "public static void main(String... a) throws Exception {\n TestBase test = TestBase.createCaller().init();\n test.config.lockTimeout = 120000;\n test.config.memory = true;\n test.test();\n }", "@Test\n\tpublic void orphanBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//ORPHAN BLOCK\n\t\tblock.orphan(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), transaction.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1000)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(0)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), new byte[0]));\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(genesisBlock.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "@Test\n public void testActorByMockingInsideActorMultiThreaded(@Capturing final Logger LOGGER) throws InterruptedException {\n final TestKit childActor1 = new TestKit(system);\n final TestKit scheduledChildActor = new TestKit(system);\n final TestKit genericActor = new TestKit(system);\n new Expectations() {{\n new MockUp<Router>() {\n @Mock\n private ActorRef createChildIfNull() {\n return childActor1.testActor();\n }\n\n @Mock\n private ActorRef createScheduledChildIfNull() {\n return scheduledChildActor.testActor();\n }\n };\n }};\n new TestKit(system) {{\n RouterState routerInitialState = new RouterState(0);\n ActorRefCreatorFactory factory = new ActorRefCreatorFactory();\n ActorRef router = system.actorOf(Router.props(routerInitialState, factory), \"router\");\n router.tell(new CommunicateWithActorMessage(4), router);\n childActor1.expectMsg(new ChildActor1Message(11111));\n scheduledChildActor.expectMsg(new StartSchedulerMessage(0));\n }};\n }", "@Test\n\tpublic void test(){\n\t\n\t\tThread.yield();\n\t\t\n\t\tlog.info(\"done\");\n\t}", "@Test\n public void testReportForDutyWithMasterChange() throws Exception {\n // Start a master and wait for it to become the active/primary master.\n // Use a random unique port\n cluster.getConfiguration().setInt(MASTER_PORT, HBaseTestingUtility.randomFreePort());\n // master has a rs. defaultMinToStart = 2\n boolean tablesOnMaster = LoadBalancer.isTablesOnMaster(testUtil.getConfiguration());\n cluster.getConfiguration().setInt(WAIT_ON_REGIONSERVERS_MINTOSTART, (tablesOnMaster ? 2 : 1));\n cluster.getConfiguration().setInt(WAIT_ON_REGIONSERVERS_MAXTOSTART, (tablesOnMaster ? 2 : 1));\n master = cluster.addMaster();\n rs = cluster.addRegionServer();\n TestRegionServerReportForDuty.LOG.debug((\"Starting master: \" + (master.getMaster().getServerName())));\n master.start();\n rs.start();\n waitForClusterOnline(master);\n // Add a 2nd region server\n cluster.getConfiguration().set(REGION_SERVER_IMPL, TestRegionServerReportForDuty.MyRegionServer.class.getName());\n rs2 = cluster.addRegionServer();\n // Start the region server. This region server will refresh RPC connection\n // from the current active master to the next active master before completing\n // reportForDuty\n TestRegionServerReportForDuty.LOG.debug((\"Starting 2nd region server: \" + (rs2.getRegionServer().getServerName())));\n rs2.start();\n waitForSecondRsStarted();\n // Stop the current master.\n master.getMaster().stop(\"Stopping master\");\n // Start a new master and use another random unique port\n // Also let it wait for exactly 2 region severs to report in.\n cluster.getConfiguration().setInt(MASTER_PORT, HBaseTestingUtility.randomFreePort());\n cluster.getConfiguration().setInt(WAIT_ON_REGIONSERVERS_MINTOSTART, (tablesOnMaster ? 3 : 2));\n cluster.getConfiguration().setInt(WAIT_ON_REGIONSERVERS_MAXTOSTART, (tablesOnMaster ? 3 : 2));\n backupMaster = cluster.addMaster();\n TestRegionServerReportForDuty.LOG.debug((\"Starting new master: \" + (backupMaster.getMaster().getServerName())));\n backupMaster.start();\n waitForClusterOnline(backupMaster);\n // Do some checking/asserts here.\n Assert.assertTrue(backupMaster.getMaster().isActiveMaster());\n Assert.assertTrue(backupMaster.getMaster().isInitialized());\n Assert.assertEquals(backupMaster.getMaster().getServerManager().getOnlineServersList().size(), (tablesOnMaster ? 3 : 2));\n }", "@Test\n void notSafe() throws InterruptedException {\n Queue<String> queue = new LinkedList<>();\n\n CountDownLatch consumer1CountDownLatch = new CountDownLatch(1);\n CountDownLatch consumer2CountDownLatch = new CountDownLatch(1);\n CountDownLatch endCountDown = new CountDownLatch(1);\n\n Thread consumer1 = new Thread(\n () -> {\n try {\n synchronized (queue) {\n System.out.println(\"consumer1 in sync block \");\n\n if (queue.isEmpty()) {\n System.out.println(\"consumer1 waiting \");\n consumer1CountDownLatch.countDown();\n queue.wait();\n System.out.println(\"consumer1 wake up\");\n }\n System.out.println(\"consumer1 remove item\");\n\n assertThatThrownBy(queue::remove)\n .isInstanceOf(NoSuchElementException.class);\n endCountDown.countDown();\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n );\n Thread consumer2 = new Thread(\n () -> {\n try {\n synchronized (queue) {\n System.out.println(\"consumer2 in sync block \");\n if (queue.isEmpty()) {\n System.out.println(\"consumer2 waiting \");\n consumer2CountDownLatch.countDown();\n queue.wait();\n System.out.println(\"consumer2 wake up\");\n }\n System.out.println(\"consumer2 remove item\");\n queue.remove();\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n );\n\n Thread provider = new Thread(\n () -> {\n try {\n synchronized (queue) {\n System.out.println(\"provider in sync block \");\n System.out.println(\"provider add item \");\n queue.add(\"SOME THING\");\n System.out.println(\"provider notifyAll\");\n queue.notifyAll();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n );\n\n consumer1.start();\n consumer1CountDownLatch.await();\n\n consumer2.start();\n consumer2CountDownLatch.await();\n\n provider.start();\n endCountDown.await();\n\n assertThat(endCountDown.getCount()).isEqualTo(0);\n }", "@Test public void testTransactionExclusion1() throws Exception {\n server.start(THREAD1, XID1, XAResource.TMNOFLAGS, 100, false);\n\n try {\n server.begin(THREAD1);\n fail(\"exception expected\"); //$NON-NLS-1$\n } catch (XATransactionException ex) {\n assertEquals(\"TEIID30517 Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.\", //$NON-NLS-1$\n ex.getMessage());\n }\n }", "protected void checkDeadLock()\r\n/* 134: */ {\r\n/* 135:165 */ if (channel().isRegistered()) {\r\n/* 136:166 */ super.checkDeadLock();\r\n/* 137: */ }\r\n/* 138: */ }", "@Test\n public void testMultipleTimeWindowRetriesBeforeClosingCircuit() {\n try {\n int sleepWindow = 200;\n HystrixCommandProperties.Setter properties = HystrixCommandPropertiesTest.getUnitTestPropertiesSetter().withCircuitBreakerSleepWindowInMilliseconds(sleepWindow);\n HystrixCommandMetrics metrics = getMetrics(properties);\n HystrixCircuitBreaker cb = getCircuitBreaker(key, CommandOwnerForUnitTest.OWNER_TWO, metrics, properties);\n\n // fail\n metrics.markFailure(1000);\n metrics.markFailure(1000);\n metrics.markFailure(1000);\n metrics.markFailure(1000);\n\n // everything has failed in the test window so we should return false now\n assertFalse(cb.allowRequest());\n assertTrue(cb.isOpen());\n\n // wait for sleepWindow to pass\n Thread.sleep(sleepWindow + 50);\n\n // we should now allow 1 request\n assertTrue(cb.allowRequest());\n // but the circuit should still be open\n assertTrue(cb.isOpen());\n // and further requests are still blocked\n assertFalse(cb.allowRequest());\n\n // the 'singleTest' fails so it should go back to sleep and not allow any requests again until another 'singleTest' after the sleep\n metrics.markFailure(1000);\n\n assertFalse(cb.allowRequest());\n assertFalse(cb.allowRequest());\n assertFalse(cb.allowRequest());\n\n // wait for sleepWindow to pass\n Thread.sleep(sleepWindow + 50);\n\n // we should now allow 1 request\n assertTrue(cb.allowRequest());\n // but the circuit should still be open\n assertTrue(cb.isOpen());\n // and further requests are still blocked\n assertFalse(cb.allowRequest());\n\n // the 'singleTest' fails again so it should go back to sleep and not allow any requests again until another 'singleTest' after the sleep\n metrics.markFailure(1000);\n\n assertFalse(cb.allowRequest());\n assertFalse(cb.allowRequest());\n assertFalse(cb.allowRequest());\n\n // wait for sleepWindow to pass\n Thread.sleep(sleepWindow + 50);\n\n // we should now allow 1 request\n assertTrue(cb.allowRequest());\n // but the circuit should still be open\n assertTrue(cb.isOpen());\n // and further requests are still blocked\n assertFalse(cb.allowRequest());\n\n // now it finally succeeds\n metrics.markSuccess(200);\n cb.markSuccess();\n\n // all requests should be open again\n assertTrue(cb.allowRequest());\n assertTrue(cb.allowRequest());\n assertTrue(cb.allowRequest());\n // and the circuit should be closed again\n assertFalse(cb.isOpen());\n\n } catch (Exception e) {\n e.printStackTrace();\n fail(\"Error occurred: \" + e.getMessage());\n }\n }", "@Test\n public void testTransactional() throws Throwable {\n final List<MagicKey> keys = init();\n final CountDownLatch l = new CountDownLatch(1);\n final AtomicBoolean rollback = new AtomicBoolean(false);\n\n Future<Void> future = fork(() -> {\n try {\n // start a transaction on c1.\n TransactionManager t1 = TestingUtil.getTransactionManager(c1);\n t1.begin();\n c1.put(keys.get(0), \"transactionally_replaced\");\n Transaction tx = t1.getTransaction();\n tx.enlistResource(new XAResourceAdapter() {\n public int prepare(Xid id) {\n // this would be called *after* the cache prepares.\n try {\n log.debug(\"Unblocking commit\");\n l.await();\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n return XAResource.XA_OK;\n }\n });\n t1.commit();\n } catch (Exception e) {\n log.error(\"Error committing transaction\", e);\n rollback.set(true);\n throw new RuntimeException(e);\n }\n });\n\n log.info(\"Invoking rehash event\");\n performRehashEvent(true);\n l.countDown();\n future.get(30, TimeUnit.SECONDS);\n\n //ownership can only be verified after the rehashing has completed\n waitForRehashCompletion();\n log.info(\"Rehash complete\");\n\n //only check for these values if tx was not rolled back\n if (!rollback.get()) {\n // the ownership of k1 might change during the tx and a cache might end up with it in L1\n assertOwnershipAndNonOwnership(keys.get(0), true);\n assertOwnershipAndNonOwnership(keys.get(1), false);\n assertOwnershipAndNonOwnership(keys.get(2), false);\n assertOwnershipAndNonOwnership(keys.get(3), false);\n\n // checking the values will bring the keys to L1, so we want to do it after checking ownership\n assertOnAllCaches(keys.get(0), \"transactionally_replaced\");\n assertOnAllCaches(keys.get(1), \"v0\");\n assertOnAllCaches(keys.get(2), \"v0\");\n assertOnAllCaches(keys.get(3), \"v0\");\n }\n }", "@Test(timeout = 30000)\n public void testConcurrentWriteAndDeleteBlock() throws Exception {\n final int numBlocks = 1000;\n final int threadCount = 10;\n // Generate data blocks.\n ExecutorService pool = Executors.newFixedThreadPool(threadCount);\n List<Future<?>> futureList = new ArrayList<>();\n Random random = new Random();\n // Random write block and delete half of them.\n for (int i = 0; i < threadCount; i++) {\n Thread thread = new Thread() {\n @Override\n public void run() {\n try {\n String bpid = BLOCK_POOL_IDS[random.nextInt(BLOCK_POOL_IDS.length)];\n for (int blockId = 0; blockId < numBlocks; blockId++) {\n ExtendedBlock eb = new ExtendedBlock(bpid, blockId);\n ReplicaHandler replica = null;\n try {\n replica = dataset.createRbw(StorageType.DEFAULT, null, eb,\n false);\n if (blockId % 2 > 0) {\n dataset.invalidate(bpid, new Block[]{eb.getLocalBlock()});\n }\n } finally {\n if (replica != null) {\n replica.close();\n }\n }\n }\n // Just keep final consistency no need to care exception.\n } catch (Exception ignore) {}\n }\n };\n thread.setName(\"AddBlock\" + i);\n futureList.add(pool.submit(thread));\n }\n // Wait for data generation\n for (Future<?> f : futureList) {\n f.get();\n }\n // Wait for the async deletion task finish.\n GenericTestUtils.waitFor(() -> dataset.asyncDiskService.countPendingDeletions() == 0,\n 100, 10000);\n for (String bpid : dataset.volumeMap.getBlockPoolList()) {\n assertEquals(numBlocks / 2, dataset.volumeMap.size(bpid));\n }\n }", "@Test(timeout=60000)\n\tpublic void testMayorLlamadasenLinea() {\n\t\tcb= new CyclicBarrier(31);\n\t\tprincipal(5, 3, 2, 20); \n\t\tExecutorService executor = Executors.newFixedThreadPool(31);\t\t \n\t\tfor ( int i = 0; i < totalEmpleados; i++ ){\n\t\t\tTelefono c =new Telefono( dispatcher,cb,0);\n\t\t\texecutor.execute(c);\n\t\t}\n\t\tfor ( int i = 0; i < totalClientes; i++ ){\n\t\t\tCliente p= new Cliente(dispatcher,cb,0);\n\t\t\texecutor.execute(p);\n\t\t}\n\t\ttry {\n\t\t\tcb.await();\n\t\t\tassertEquals(0, dispatcher.getnProductores());\n\t\t\tassertEquals(0, dispatcher.getLLamadas().size());\n\n\t\t} catch (BrokenBarrierException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\t\tpublic Boolean call() throws Exception {\n\t\t\tint count = 10;\r\n\t\t\tint deadlockCount = 0;\r\n\t\t\twhile (count > 0) {\r\n\t\t\t\tassertTrue(\"Too many deadlock exceptions\", deadlockCount < 10);\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// Replace the annotations\r\n\t\t\t\t\tdboAnnotationsDao.replaceAnnotations(annos);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// Deadlock is the only acceptable exception here, just retry\r\n\t\t\t\t\tif (e.getMessage().indexOf(\"Deadlock found when trying to get lock\") > -1) {\r\n\t\t\t\t\t\tdeadlockCount++;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthrow e;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcount--;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}", "@Test\n /*\n * Test that checks that concurrent requests to RefreshingOAuth2CredentialsInterceptor refresh\n * logic doesn't cause hanging behavior. Specifically, when an Expired condition occurs it\n * triggers a call to syncRefresh() which potentially waits for refresh that was initiated\n * from another thread either through syncRefresh() or asyncRefresh(). This test case simulates\n * that condition.\n */\n public void testRefreshDoesntHang() throws Exception {\n long start = HeaderCacheElement.TOKEN_STALENESS_MS * 10;\n setTimeInMillieconds(start);\n\n // RefreshingOAuth2CredentialsInterceptor will show that the access token is stale.\n final long expiration = start + HeaderCacheElement.TOKEN_EXPIRES_MS + 1;\n\n // Create a mechanism that will allow us to control when the accessToken is returned.\n // credentials.refreshAccessToken() will get called asynchronously and will wait until the\n // lock is notified before returning. That will allow us to set up multiple concurrent calls\n final Object lock = new Object();\n Mockito.when(credentials.refreshAccessToken()).thenAnswer(new Answer<AccessToken>() {\n @Override\n public AccessToken answer(InvocationOnMock invocation) throws Throwable {\n synchronized (lock) {\n lock.wait();\n }\n return new AccessToken(\"\", new Date(expiration));\n }\n });\n\n // Force a synchronous refresh. This ought to wait until a refresh happening in another thread\n // completes.\n Callable<Void> syncRefreshCallable = new Callable<Void>() {\n @Override\n public Void call() throws Exception {\n underTest.syncRefresh();\n return null;\n }\n };\n\n underTest =\n new RefreshingOAuth2CredentialsInterceptor(executorService, credentials);\n underTest.rateLimiter.setRate(100000);\n\n // At this point, the access token wasn't retrieved yet. The\n // RefreshingOAuth2CredentialsInterceptor considers null to be Expired.\n Assert.assertEquals(CacheState.Expired, underTest.headerCache.getCacheState());\n\n syncCall(lock, syncRefreshCallable);\n\n // Check to make sure that the AccessToken was retrieved.\n Assert.assertEquals(CacheState.Stale, underTest.headerCache.getCacheState());\n\n // Check to make sure we're no longer refreshing.\n synchronized (underTest.lock) {\n Assert.assertFalse(underTest.isRefreshing);\n }\n\n // Kick off a couple of asynchronous refreshes. Kicking off more than one shouldn't be\n // necessary, but also should not be harmful, since there are likely to be multiple concurrent\n // requests that call asyncRefresh() when the token turns stale.\n underTest.asyncRefresh();\n underTest.asyncRefresh();\n underTest.asyncRefresh();\n\n syncCall(lock, syncRefreshCallable);\n Assert.assertFalse(underTest.isRefreshing);\n }", "@Test(invocationCount = 20, dataProvider = \"diskSize\")\n public void testAllWritesShouldFailAfterFirstWriteFailure(int diskSpace) throws Exception\n {\n AtomicInteger disk = new AtomicInteger(0);\n Disk check = contentSize -> {\n if (disk.addAndGet(contentSize) > diskSpace) {\n throw new IOException(OUT_OF_SPACE);\n }\n };\n final Options rawOptions = new Options();\n\n final DbImpl db = new DbImpl(rawOptions, \"leveldb\", new MyEnv(check));\n //simulate concurrent work with random batch side, this will stimulate multi write grouping into one batch\n //inside the DB\n final int threads = 4;\n final ExecutorService executorService = Executors.newFixedThreadPool(threads);\n try {\n Future<Exception>[] fut = new Future[threads];\n for (int i = 0; i < threads; i++) {\n //at some point all thread should fail due to out of space exception\n fut[i] = executorService.submit(() -> {\n final Random rand = new Random(Thread.currentThread().getId());\n try {\n while (true) {\n writeRadomBatch(db, rand);\n }\n }\n catch (Exception e) {\n return e;\n }\n });\n }\n //wait for all thread\n //all threads should fail because of continuous write.\n for (Future<Exception> exceptionFuture : fut) {\n final Exception exception = exceptionFuture.get(1, TimeUnit.MINUTES);\n final Throwable rootCause = Throwables.getRootCause(exception);\n assertNotNull(rootCause, \"Route cause is expected in thrown exception\" + exception);\n exception.printStackTrace();\n assertTrue(rootCause.getMessage().equals(\"Out of space\"), \"Out of space exception is expected as route cause of failure in \" + exception);\n }\n\n //DB should be failed with background failure, so any new write should fail with background exception cause\n //last check to verify that if we try to write additional records to DB we get same route cause twice\n final Assert.ThrowingRunnable shouldFail = () -> {\n try (WriteBatchImpl updates = new WriteBatchImpl()) {\n updates.put(new byte[] {1, 2, 3, 5}, new byte[] {45, 5, 6, 7});\n db.write(updates);\n Assert.fail(\"expected to fail\");\n }\n };\n Throwable t1 = Throwables.getRootCause(Assert.expectThrows(Exception.class, shouldFail));\n Throwable t2 = Throwables.getRootCause(Assert.expectThrows(Exception.class, shouldFail));\n assertSame(t1, t2);\n assertNotNull(t1, \"Route cause is expected in thrown exception\" + t1);\n assertTrue(t1.getMessage().equals(OUT_OF_SPACE), \"Out of space exception is expected as route cause of failure in \" + t1);\n }\n finally {\n executorService.shutdown();\n }\n }", "static void test1() {\n\n System.out.println( \"Begin test1. ===============================\\n\" );\n\n Thread init = Thread.currentThread(); // init spawns the Mogwais\n\n // Create a GremlinsBridge of capacity 3.\n GremlinsBridge gBridge = new GremlinsBridge( 3 );\n\n int delay = 1000;\n\n // Create the Mogwais and store them in an array.\n Thread peds[] = {\n new Mogwai( \"Al\", 3, SIDE_ONE, gBridge ),\n new Mogwai( \"Bob\", 2, SIDE_ONE, gBridge ),\n new Mogwai( \"Cathy\", 2, SIDE_TWO, gBridge ),\n new Mogwai( \"Doris\", 3, SIDE_TWO, gBridge ),\n new Mogwai( \"Edith\", 3, SIDE_ONE, gBridge ),\n new Mogwai( \"Fred\", 2, SIDE_TWO, gBridge ),\n };\n\n for ( int j = 0; j < peds.length; ++j ) {\n // Run them by calling their start() method.\n try {\n peds[j].start();\n init.sleep( delay ); // delay start of next mogwai\n }\n catch ( InterruptedException e ) {\n System.err.println( \"Abort. Unexpected thread interruption.\" );\n }\n }\n // Now, the test must give the mogwai time to finish their crossings.\n for ( int j = 0; j < peds.length; ++j ) {\n try {\n peds[j].join(); // wait for next mogwai to finish\n }\n catch ( InterruptedException e ) {\n System.err.println( \"Abort. Unexpected thread interruption.\" );\n }\n }\n\n System.out.println( \"\\n=============================== End test1.\" );\n }", "@Test\n public void testSynchronizedPreAuthed() throws AuthException, IOException {\n presenter.synchronize();\n try {\n presenter.syncingThread.join();\n } catch (InterruptedException e) {}\n presenter.synchronize();\n try {\n presenter.syncingThread.join();\n } catch (InterruptedException e) {}\n assertEquals(SyncStatusEnum.AUTHED, presenter.status);\n }", "@Test\n public void testSimulaneousChildRegionCreation() throws Throwable {\n createCacheInAllVms();\n\n // add a listener for region recovery\n dataStore1.invoke(new SerializableRunnable(\"Add recovery listener\") {\n @Override\n public void run() {\n InternalResourceManager.setResourceObserver(new MyResourceObserver());\n }\n });\n\n // add a listener for region recovery\n dataStore2.invoke(new SerializableRunnable(\"Add recovery listener\") {\n @Override\n public void run() {\n InternalResourceManager.setResourceObserver(new MyResourceObserver());\n }\n });\n\n redundancy = 1;\n localMaxmemory = 50;\n totalNumBuckets = 60;\n // Create Customer PartitionedRegion in Data store 1\n regionName = CustomerPartitionedRegionName;\n colocatedWith = null;\n isPartitionResolver = Boolean.FALSE;\n Object[] attributeObjects1 = new Object[] {regionName, redundancy, localMaxmemory,\n totalNumBuckets, colocatedWith, isPartitionResolver};\n\n dataStore1.invoke(PRColocationDUnitTest.class, \"createPR\", attributeObjects1);\n dataStore2.invoke(PRColocationDUnitTest.class, \"createPR\", attributeObjects1);\n\n // create a few buckets in dataStore1\n dataStore1.invoke(new SerializableRunnable(\"put data in region\") {\n @Override\n public void run() {\n Region region1 = basicGetCache().getRegion(CustomerPartitionedRegionName);\n for (int i = 0; i < 50; i++) {\n region1.put(i, \"A\");\n }\n }\n });\n\n // Create Order PartitionedRegion in Data store 1\n regionName = OrderPartitionedRegionName;\n colocatedWith = CustomerPartitionedRegionName;\n isPartitionResolver = Boolean.FALSE;\n Object[] attributeObjects2 = new Object[] {regionName, redundancy, localMaxmemory,\n totalNumBuckets, colocatedWith, isPartitionResolver};\n\n AsyncInvocation<Void> async1 =\n dataStore1.invokeAsync(PRColocationDUnitTest.class, \"createPR\", attributeObjects2);\n AsyncInvocation<Void> async2 =\n dataStore2.invokeAsync(PRColocationDUnitTest.class, \"createPR\", attributeObjects2);\n\n async1.join();\n if (async1.exceptionOccurred()) {\n throw async1.getException();\n }\n\n async2.join();\n if (async2.exceptionOccurred()) {\n throw async2.getException();\n }\n\n Wait.pause(5000);\n SerializableRunnable checkForBuckets_ForOrder = new SerializableRunnable(\"check for buckets\") {\n @Override\n public void run() {\n PartitionedRegion region =\n (PartitionedRegion) basicGetCache().getRegion(OrderPartitionedRegionName);\n MyResourceObserver observer =\n (MyResourceObserver) InternalResourceManager.getResourceObserver();\n try {\n observer.waitForRegion(region, 60 * 1000);\n } catch (InterruptedException e) {\n throw new RuntimeException(e);\n }\n assertEquals(50, region.getDataStore().getAllLocalBucketIds().size());\n assertEquals(25, region.getDataStore().getAllLocalPrimaryBucketIds().size());\n }\n };\n\n dataStore1.invoke(checkForBuckets_ForOrder);\n dataStore2.invoke(checkForBuckets_ForOrder);\n }", "@Test\n public void testGetTotalTime() throws Exception {\n HeterogeneousComputingEnv envTest = nestedDependency();\n\n ScheduleChromosome chromosomeTest = new ScheduleChromosome(envTest);\n\n // Guarantee that task 0 and 2 are in the same core and 1 in the other\n chromosomeTest.toSeq().get(0).mutate(ScheduleAllele.of(envTest, 0, 0));\n chromosomeTest.toSeq().get(1).mutate(ScheduleAllele.of(envTest, 1, 1));\n chromosomeTest.toSeq().get(2).mutate(ScheduleAllele.of(envTest, 2, 0));\n\n // Create the factory\n StatsFactory statsFact = new StatsFactory(envTest, fitnessCalc);\n Stats stat = statsFact.ofChromosome(chromosomeTest);\n\n assertEquals(5, stat.getTotalTime(), EPSILON);\n\n // Test case 2 - last 2 tasks in parallel\n envTest = oneRootTwoDepenendantTasks();\n\n chromosomeTest = new ScheduleChromosome(envTest);\n\n // Guarantee that task 0 and 2 are in the same core and 1 in the other\n chromosomeTest.toSeq().get(0).mutate(ScheduleAllele.of(envTest, 0, 0));\n chromosomeTest.toSeq().get(1).mutate(ScheduleAllele.of(envTest, 1, 1));\n chromosomeTest.toSeq().get(2).mutate(ScheduleAllele.of(envTest, 2, 0));\n\n // Create the factory\n statsFact = new StatsFactory(envTest, fitnessCalc);\n stat = statsFact.ofChromosome(chromosomeTest);\n\n assertEquals(3, stat.getTotalTime(), EPSILON);\n\n // Test case 3 - chained tasks in same processor\n envTest = chaindedDependency();\n\n chromosomeTest = new ScheduleChromosome(envTest);\n\n // Create the factory\n statsFact = new StatsFactory(envTest, fitnessCalc);\n stat = statsFact.ofChromosome(chromosomeTest);\n\n assertEquals(3, stat.getTotalTime(), EPSILON);\n\n // Test case 4 - independent tasks\n envTest = independentTasks();\n\n chromosomeTest = new ScheduleChromosome(envTest);\n\n // Guarantee that task 0 and 2 are in the same core and 1 in the other\n chromosomeTest.toSeq().get(0).mutate(ScheduleAllele.of(envTest, 0, 0));\n chromosomeTest.toSeq().get(1).mutate(ScheduleAllele.of(envTest, 1, 1));\n chromosomeTest.toSeq().get(2).mutate(ScheduleAllele.of(envTest, 2, 0));\n\n // Create the factory\n statsFact = new StatsFactory(envTest, fitnessCalc);\n stat = statsFact.ofChromosome(chromosomeTest);\n\n assertEquals(2, stat.getTotalTime(), EPSILON);\n\n }", "@Test\n public void writeLockIsolationTest() throws InterruptedException {\n final TestUse testUse = new TestUse();\n final ConcurrentHashMap concurrentHashMap = new ConcurrentHashMap();\n int threadNum = 50;\n final CountDownLatch countDownLatch = new CountDownLatch(threadNum);\n for (int i = 0; i < threadNum; i++) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n concurrentHashMap.put(testUse.minusCountInWriteLock(), \"value\");\n countDownLatch.countDown();\n }\n }).start();\n }\n countDownLatch.await();\n Assert.assertEquals(950, testUse.count);\n }", "@Test\n\tpublic void processBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\t\t\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock block = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//FORK\n\t\tDBSet fork = databaseSet.fork();\n\t\t\n\t\t//GENERATE PAYMENT 1\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = block.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment1 = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tpayment1.process(fork);\n\t\tblock.addTransaction(payment1);\t\n\t\t\n\t\t//GENERATE PAYMENT 2\n\t\tAccount recipient2 = new Account(\"XLPYYfxKEiDcybCkFA7jXcxSdePMMoyZLt\");\n\t\tsignature = PaymentTransaction.generateSignature(fork, generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment2 = new PaymentTransaction(generator, recipient2, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(fork), signature);\n\t\tblock.addTransaction(payment2);\t\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = blockGenerator.calculateTransactionsSignature(block, generator);\n\t\tblock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID\n\t\tassertEquals(true, block.isSignatureValid());\n\t\tassertEquals(true, block.isValid(databaseSet));\n\t\t\n\t\t//PROCESS BLOCK\n\t\tblock.process(databaseSet);\n\t\t\n\t\t//CHECK BALANCE GENERATOR\n\t\tassertEquals(true, generator.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(800)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE GENERATOR\n\t\tassertEquals(true, Arrays.equals(generator.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT\n\t\tassertEquals(true, recipient.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(1100)) == 0);\n\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(false, Arrays.equals(recipient.getLastReference(databaseSet), payment1.getSignature()));\n\t\t\n\t\t//CHECK BALANCE RECIPIENT2\n\t\tassertEquals(true, recipient2.getConfirmedBalance(databaseSet).compareTo(BigDecimal.valueOf(100)) == 0);\n\t\t\t\t\n\t\t//CHECK LAST REFERENCE RECIPIENT\n\t\tassertEquals(true, Arrays.equals(recipient2.getLastReference(databaseSet), payment2.getSignature()));\n\t\t\n\t\t//CHECK TOTAL FEE\n\t\tassertEquals(true, block.getTotalFee().compareTo(BigDecimal.valueOf(2)) == 0);\n\t\t\n\t\t//CHECK TOTAL TRANSACTIONS\n\t\tassertEquals(2, block.getTransactionCount());\n\t\t\n\t\t//CHECK LAST BLOCK\n\t\tassertEquals(true, Arrays.equals(block.getSignature(), databaseSet.getBlockMap().getLastBlock().getSignature()));\n\t}", "@Test\n @ConditionalIgnoreRule.ConditionalIgnore(condition = RunningOnGithubAction.class)\n public void testSuccess() throws Exception {\n int concurrency = 10;\n ExecutorService executorService = Executors.newFixedThreadPool(10);\n List<Future<?>> futures = new ArrayList<>();\n // create 10 threads, each open a connection and submit a query\n // after sleeping 15 seconds\n for (int idx = 0; idx < concurrency; idx++) {\n logger.fine(\"open a new connection and submit query \" + idx);\n final int queryIdx = idx;\n futures.add(\n executorService.submit(\n () -> {\n try {\n submitQuery(true, queryIdx);\n } catch (SQLException | InterruptedException e) {\n throw new IllegalStateException(\"task interrupted\", e);\n }\n }));\n }\n executorService.shutdown();\n for (int idx = 0; idx < concurrency; idx++) futures.get(idx).get();\n }", "@Test(timeout = 30000)\n public void testMoveBlockFailure() {\n // Test copy\n testMoveBlockFailure(conf);\n // Test hardlink\n conf.setBoolean(DFSConfigKeys\n .DFS_DATANODE_ALLOW_SAME_DISK_TIERING, true);\n conf.setDouble(DFSConfigKeys\n .DFS_DATANODE_RESERVE_FOR_ARCHIVE_DEFAULT_PERCENTAGE, 0.5);\n testMoveBlockFailure(conf);\n }", "@Test\n public void tryToExecuteTasksWhenAllLeasesAreAlreadyReserved() throws Exception {\n DateTime timeSlice = dateTimeService.getTimeSlice(now().minusMinutes(1), standardMinutes(1));\n String tenantId = \"test1\";\n String type1 = \"test1\";\n int interval = 5;\n int window = 15;\n int segment0 = 0;\n int segment1 = 1;\n int segmentOffset = 0;\n\n TaskExecutionHistory executionHistory = new TaskExecutionHistory();\n TaskType taskType1 = new TaskType().setName(type1).setSegments(5).setSegmentOffsets(1);\n\n session.execute(queries.createTask.bind(type1, tenantId, timeSlice.toDate(), segment0, \"test1.metric1.5min\",\n ImmutableSet.of(\"test1.metric1\"), interval, window));\n session.execute(queries.createTask.bind(type1, tenantId, timeSlice.toDate(), segment1, \"test1.metric2.5min\",\n ImmutableSet.of(\"test1.metric2\"), interval, window));\n session.execute(queries.createLease.bind(timeSlice.toDate(), type1, segmentOffset));\n\n String owner = \"host2\";\n Lease lease = new Lease(timeSlice, type1, segmentOffset, owner, false);\n boolean acquired = leaseService.acquire(lease).toBlocking().first();\n assertTrue(acquired, \"Should have acquired lease\");\n\n LeaseService leaseService = new LeaseService(rxSession, queries);\n TaskServiceImpl taskService = new TaskServiceImpl(rxSession, queries, leaseService, singletonList(taskType1));\n taskService.subscribe(taskType1, task -> executionHistory.add(task.getTarget()));\n\n Thread t1 = new Thread(() -> taskService.executeTasks(timeSlice));\n t1.start();\n\n AtomicReference<Exception> executionErrorRef = new AtomicReference<>();\n Runnable executeTasks = () -> {\n try {\n Thread.sleep(1000);\n session.execute(queries.deleteTasks.bind(lease.getTaskType(), lease.getTimeSlice().toDate(), segment0));\n session.execute(queries.deleteTasks.bind(lease.getTaskType(), lease.getTimeSlice().toDate(), segment1));\n leaseService.finish(lease).toBlocking().first();\n } catch (Exception e) {\n executionErrorRef.set(e);\n }\n };\n Thread t2 = new Thread(executeTasks);\n t2.start();\n\n t2.join(10000);\n t1.join(10000);\n\n assertNull(executionErrorRef.get(), \"Did not expect an exception to be thrown from other client, but \" +\n \"got: \" + executionErrorRef.get());\n\n assertTrue(executionHistory.getExecutedTasks().isEmpty(), \"Did not expect this task service to execute any \" +\n \"tasks but it executed \" + executionHistory.getExecutedTasks());\n assertTasksPartitionDeleted(type1, timeSlice, segment0);\n assertTasksPartitionDeleted(type1, timeSlice, segment1);\n assertLeasePartitionDeleted(timeSlice);\n\n // We do not need to verify that tasks are rescheduled or that new leases are\n // created since the \"other\" clients would be doing that.\n }", "@Test\n public void sameOwnerLevelClosesFirstConsumer() throws InterruptedException {\n // Arrange\n final Semaphore semaphore = new Semaphore(1);\n\n final String lastPartition = \"2\";\n final EventPosition position = EventPosition.fromEnqueuedTime(Instant.now());\n final ReceiveOptions firstReceive = new ReceiveOptions().setOwnerLevel(1L);\n final ReceiveOptions secondReceive = new ReceiveOptions().setOwnerLevel(2L);\n final EventHubConsumerAsyncClient consumer = toClose(builder.prefetchCount(1).buildAsyncConsumerClient());\n\n final AtomicBoolean isActive = new AtomicBoolean(true);\n\n final EventHubProducerAsyncClient producer = toClose(builder.buildAsyncProducerClient());\n toClose(getEvents(isActive)\n .flatMap(event -> producer.send(event, new SendOptions().setPartitionId(lastPartition)))\n .subscribe(sent -> logger.info(\"Event sent.\"),\n error -> {\n logger.error(\"Error sending event\", error);\n Assertions.fail(\"Should not have failed to publish event.\");\n }));\n\n // Act\n logger.info(\"STARTED CONSUMING FROM PARTITION 1\");\n semaphore.acquire();\n\n toClose(consumer.receiveFromPartition(lastPartition, position, firstReceive)\n .filter(event -> TestUtils.isMatchingEvent(event, MESSAGE_TRACKING_ID))\n .subscribe(\n event -> logger.info(\"C1:\\tReceived event sequence: {}\", event.getData().getSequenceNumber()),\n ex -> {\n logger.error(\"C1:\\tERROR\", ex);\n semaphore.release();\n }, () -> {\n logger.info(\"C1:\\tCompleted.\");\n Assertions.fail(\"Should not be hitting this. An error should occur instead.\");\n }));\n\n Thread.sleep(2000);\n\n logger.info(\"STARTED CONSUMING FROM PARTITION 1 with C3\");\n final EventHubConsumerAsyncClient consumer2 = builder.buildAsyncConsumerClient();\n toClose(consumer2);\n toClose(consumer2.receiveFromPartition(lastPartition, position, secondReceive)\n .filter(event -> TestUtils.isMatchingEvent(event, MESSAGE_TRACKING_ID))\n .subscribe(\n event -> logger.info(\"C3:\\tReceived event sequence: {}\", event.getData().getSequenceNumber()),\n ex -> {\n logger.error(\"C3:\\tERROR\", ex);\n Assertions.fail(\"Should not error here\");\n },\n () -> logger.info(\"C3:\\tCompleted.\")));\n\n // Assert\n try {\n Assertions.assertTrue(semaphore.tryAcquire(15, TimeUnit.SECONDS),\n \"The EventHubConsumer was not closed after one with a higher epoch number started.\");\n } finally {\n isActive.set(false);\n }\n }", "private void testPrimaryChange(ExceptionRunnable topologyChange) throws Exception {\n MagicKey backupKey = new MagicKey(cache(0), cache(1));\n MagicKey nonOwnerKey = new MagicKey(cache(0), cache(2));\n\n // node0 is the primary owner\n assertPrimaryOwner(backupKey, 0);\n tm(0).begin();\n cache(0).put(backupKey, \"value-0\");\n Transaction tx0 = tm(0).suspend();\n\n tm(0).begin();\n advancedCache(0).lock(nonOwnerKey);\n Transaction tx1 = tm(0).suspend();\n\n // expect keys to be locked on primary owner\n assertLocked(0, backupKey);\n assertLocked(0, nonOwnerKey);\n\n // switch primary owner: node1\n factory.setOwnerIndexes(new int[][]{{1, 0}, {1, 0}});\n\n topologyChange.run();\n\n assertPrimaryOwner(backupKey, 1);\n assertPrimaryOwner(nonOwnerKey, 1);\n\n AdvancedCache<Object, Object> zeroTimeoutCache1 = advancedCache(1).withFlags(Flag.ZERO_LOCK_ACQUISITION_TIMEOUT);\n assertPutTimeout(backupKey, zeroTimeoutCache1);\n assertLockTimeout(backupKey, zeroTimeoutCache1);\n assertPutTimeout(nonOwnerKey, zeroTimeoutCache1);\n assertLockTimeout(nonOwnerKey, zeroTimeoutCache1);\n\n tm(0).resume(tx0);\n tm(0).commit();\n\n tm(0).resume(tx1);\n tm(0).commit();\n\n assertEquals(\"value-0\", cache(0).get(backupKey));\n assertEquals(\"value-0\", cache(1).get(backupKey));\n assertNull(cache(0).get(nonOwnerKey));\n assertNull(cache(1).get(nonOwnerKey));\n }", "private void testMethod(){jnkkjnknk\n //Jocke\n //jocke2\n //pew\n //testcommit\n\n }", "final public Lock test_get_lock() {\r\n\t\treturn lock_;\r\n\t}", "@Test\n public void testCollisions(){\n }", "@Test\n public void testColibriMultiThreading()\n throws Exception\n {\n ProviderListener providerListener\n = new ProviderListener(FocusBundleActivator.bundleContext);\n\n MockProtocolProvider mockProvider\n = (MockProtocolProvider) providerListener.obtainProvider(1000);\n\n MockColibriOpSet colibriOpSet = mockProvider.getMockColibriOpSet();\n\n String mockBridgeJid = \"some.mock.bridge.com\";\n\n MockVideobridge mockBridge\n = new MockVideobridge(\n mockProvider.getMockXmppConnection(),\n mockBridgeJid);\n\n mockBridge.start(osgi.bc);\n\n AllocThreadingTestColibriConference colibriConf\n = colibriOpSet.createAllocThreadingConf();\n\n colibriConf.setJitsiVideobridge(mockBridgeJid);\n\n colibriConf.blockConferenceCreator(true);\n colibriConf.blockResponseReceive(true);\n\n MockPeerAllocator[] allocators = new MockPeerAllocator[20];\n\n List<String> endpointList = new ArrayList<String>(allocators.length);\n\n for (int i=0; i < allocators.length; i++)\n {\n String endpointName = \"peer\" + i;\n allocators[i] = new MockPeerAllocator(endpointName, colibriConf);\n endpointList.add(endpointName);\n\n allocators[i].runChannelAllocation();\n }\n\n MockPeerAllocator creator\n = findCreator(\n colibriConf, Arrays.asList(allocators));\n\n assertNotNull(creator);\n assertEquals(0, colibriConf.allocRequestsSentCount());\n\n colibriConf.resumeConferenceCreate();\n\n\n creator.join();\n // At this point conference should be created\n assertEquals(1, mockBridge.getConferenceCount());\n\n // All responses are blocked - here we make sure that all threads have\n // sent their requests\n List<String> requestsToBeSent = new ArrayList<String>(endpointList);\n while (!requestsToBeSent.isEmpty())\n {\n String endpoint = colibriConf.nextRequestSent(5);\n if (endpoint == null)\n {\n fail(\"Endpoints that have failed to \" +\n \"send their request: \" + requestsToBeSent);\n }\n else\n {\n requestsToBeSent.remove(endpoint);\n }\n }\n\n colibriConf.resumeResponses();\n\n // Now wait for all responses to be received\n List<String> responsesToReceive = new ArrayList<String>(endpointList);\n while (!responsesToReceive.isEmpty())\n {\n String endpoint = colibriConf.nextResponseReceived(5);\n if (endpoint == null)\n {\n fail(\"Endpoints that have failed to \" +\n \"send their request: \" + requestsToBeSent);\n }\n else\n {\n responsesToReceive.remove(endpoint);\n }\n }\n\n // Wait for all to finish\n for (MockPeerAllocator allocator : allocators)\n {\n allocator.join();\n }\n\n assertEquals(1, mockBridge.getConferenceCount());\n assertEquals(\n allocators.length,\n mockBridge.getChannelCountByContent(\"audio\"));\n assertEquals(\n allocators.length,\n mockBridge.getChannelCountByContent(\"video\"));\n assertEquals(\n allocators.length,\n mockBridge.getChannelCountByContent(\"data\"));\n\n mockBridge.stop(osgi.bc);\n }", "@Test(groups = { \"Interactive\" })\n public void testIsolation() {\n String defaultBlocks = \"[[1,1,1,\\\"Green\\\",[\\\"S\\\"]],[1,1,2,\\\"Green\\\",[]],[1,1,3,\\\"Green\\\",[]],[1,1,4,\\\"Green\\\",[]]]\";\n ContextValue context = getContext(defaultBlocks);\n LogInfo.begin_track(\"testIsolation\");\n runFormula(executor, \"(:isolate (:loop (number 4) (: add red top)))\", context, x -> x.allItems.size() == 5);\n runFormula(executor, \"(:isolate (:loop (number 2) (: add red top)))\", context, x -> x.allItems.size() == 4);\n runFormula(executor, \"(:isolate (:loop (number 5) (: add red top)))\", context, x -> x.allItems.size() == 6);\n runFormula(executor, \"(:s (:isolate (:loop (number 5) (: add red top))) (: select (color red)))\", context,\n selectedSize(5));\n LogInfo.end_track();\n }", "@Test\n public void repairMultipleTables()\n {\n long startTime = System.currentTimeMillis();\n\n TableReference tableReference = myTableReferenceFactory.forTable(\"test\", \"table1\");\n TableReference tableReference2 = myTableReferenceFactory.forTable(\"test\", \"table2\");\n\n injectRepairHistory(tableReference, System.currentTimeMillis() - TimeUnit.HOURS.toMillis(2));\n injectRepairHistory(tableReference2, System.currentTimeMillis() - TimeUnit.HOURS.toMillis(4));\n\n schedule(tableReference);\n schedule(tableReference2);\n\n await().pollInterval(1, TimeUnit.SECONDS).atMost(90, TimeUnit.SECONDS)\n .until(() -> isRepairedSince(tableReference, startTime));\n await().pollInterval(1, TimeUnit.SECONDS).atMost(90, TimeUnit.SECONDS)\n .until(() -> isRepairedSince(tableReference2, startTime));\n\n verifyTableRepairedSince(tableReference, startTime);\n verifyTableRepairedSince(tableReference2, startTime);\n verify(mockFaultReporter, never())\n .raise(any(RepairFaultReporter.FaultCode.class), anyMap());\n }", "@Test\n public void startedSenderReceivingEventsWhileStartingShouldDrainQueues()\n throws Exception {\n Integer lnPort = vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(2));\n Integer nyPort = vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(1, lnPort));\n\n createCacheInVMs(lnPort, vm2, vm4);\n createReceiverInVMs(vm2, vm4);\n createCacheInVMs(nyPort, vm3, vm5);\n createReceiverInVMs(vm3, vm5);\n\n vm2.invoke(() -> WANTestBase.createSender(\"ny\", 1, true, 100, 10, false, false, null, true));\n vm4.invoke(() -> WANTestBase.createSender(\"ny\", 1, true, 100, 10, false, false, null, true));\n\n vm3.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, true));\n vm5.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, true));\n\n vm2.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 1, 100,\n isOffHeap()));\n vm4.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 1, 100,\n isOffHeap()));\n\n vm3.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 1, 100,\n isOffHeap()));\n vm5.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 1, 100,\n isOffHeap()));\n\n AsyncInvocation<Void> inv =\n vm2.invokeAsync(() -> WANTestBase.doPuts(getTestMethodName() + \"_PR\", 1000));\n startSenderInVMsAsync(\"ny\", vm2, vm4);\n inv.await();\n\n vm2.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n vm4.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n\n vm2.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained(\"ny\"));\n vm4.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained(\"ny\"));\n }", "@Test\n public void testRun_Fork_With_Actions_With_Different_Delays_IN_FN_A1_A2_JN_FN() {\n // Final node creation (id #6)\n final Node fn = NodeFactory.createNode(\"#6\", NodeType.FINAL);\n\n // Join node creation (id #5) and flow to final node\n final Node jn = NodeFactory.createNode(\"#5\", NodeType.JOIN);\n ((SingleControlFlowNode) jn).setFlow(fn);\n\n // Action node 2 creation (id #4) and flow to join node\n final String A2_ID = \"#4\";\n final Node an2 = NodeFactory.createNode(A2_ID, NodeType.ACTION);\n final DelayableActionMock objAn2 = DelayableActionMock.create(A2_ID, 20);\n ((ContextExecutable) an2).setObject(objAn2);\n ((ContextExecutable) an2).setMethod(objAn2.getDelayExecutionMethod());\n ((SingleControlFlowNode) an2).setFlow(jn);\n\n // Action node 1 creation (id #3) and flow to join node\n final String A1_ID = \"#3\";\n final Node an1 = NodeFactory.createNode(A1_ID, NodeType.ACTION);\n final DelayableActionMock objAn1 = DelayableActionMock.create(A1_ID, 100);\n ((ContextExecutable) an1).setObject(objAn1);\n ((ContextExecutable) an1).setMethod(objAn1.getDelayExecutionMethod());\n ((SingleControlFlowNode) an1).setFlow(jn);\n\n // Fork creation (id #2) and flow to actions node\n final Node fk = NodeFactory.createNode(\"#2\", NodeType.FORK);\n final Set<Node> flows = new HashSet<>(2);\n flows.add(an1);\n flows.add(an2);\n ((MultipleControlFlowNode) fk).setFlows(flows);\n\n // Initial node (id #1) creation and flow to action node 1\n final Node in = NodeFactory.createNode(\"#1\", NodeType.INITIAL);\n ((SingleControlFlowNode) in).setFlow(fk);\n\n final Jk4flowWorkflow wf = Jk4flowWorkflow.create(in);\n\n ENGINE.run(wf);\n\n final Date a1Date = (Date) wf.getContext().get(A1_ID);\n final Date a2Date = (Date) wf.getContext().get(A2_ID);\n\n Assert.assertTrue(a1Date.after(a2Date));\n }", "@Override\n public void testTwoRequiredGroups() {\n }", "@Override\n public void testTwoRequiredGroups() {\n }", "@Test\n public void testLateRootAndChildTask() throws InterruptedException {\n final String rootTaskId = \"rootTaskId\";\n final String[] childTaskIds = new String[]{\"childTaskId1\", \"childTaskId2\", \"childTaskId3\", \"childTaskId4\",\n \"childTaskId5\", \"childTaskId6\", \"childTaskId7\"};\n final AtomicInteger numMsgs = new AtomicInteger(0);\n\n final EStage<GroupCommunicationMessage> senderStage =\n new SyncStage<>(new EventHandler<GroupCommunicationMessage>() {\n @Override\n public void onNext(final GroupCommunicationMessage msg) {\n numMsgs.getAndIncrement();\n }\n });\n\n final CommunicationGroupDriverImpl communicationGroupDriver = new CommunicationGroupDriverImpl(\n GroupName.class, new AvroConfigurationSerializer(), senderStage,\n new BroadcastingEventHandler<RunningTask>(), new BroadcastingEventHandler<FailedTask>(),\n new BroadcastingEventHandler<FailedEvaluator>(), new BroadcastingEventHandler<GroupCommunicationMessage>(),\n \"DriverId\", 8, 2);\n\n communicationGroupDriver\n .addBroadcast(BroadcastOperatorName.class,\n BroadcastOperatorSpec.newBuilder().setSenderId(rootTaskId).build())\n .addReduce(ReduceOperatorName.class,\n ReduceOperatorSpec.newBuilder().setReceiverId(rootTaskId).build());\n\n final ExecutorService pool = Executors.newFixedThreadPool(8);\n final CountDownLatch countDownLatch = new CountDownLatch(8);\n\n // first add two child tasks and start them up\n for (int index = 0; index < 2; index++) {\n final String childId = childTaskIds[index];\n pool.submit(new Runnable() {\n @Override\n public void run() {\n final Configuration childTaskConf = TaskConfiguration.CONF\n .set(TaskConfiguration.IDENTIFIER, childId)\n .set(TaskConfiguration.TASK, DummyTask.class)\n .build();\n communicationGroupDriver.addTask(childTaskConf);\n communicationGroupDriver.runTask(childId);\n countDownLatch.countDown();\n }\n });\n }\n\n // next add the root task\n pool.submit(new Runnable() {\n @Override\n public void run() {\n try {\n // purposely delay the addition of the root task\n Thread.sleep(3000);\n } catch (final InterruptedException e) {\n throw new RuntimeException(e);\n }\n final Configuration rootTaskConf = TaskConfiguration.CONF\n .set(TaskConfiguration.IDENTIFIER, rootTaskId)\n .set(TaskConfiguration.TASK, DummyTask.class)\n .build();\n\n communicationGroupDriver.addTask(rootTaskConf);\n communicationGroupDriver.runTask(rootTaskId);\n countDownLatch.countDown();\n }\n });\n\n // then add 5 child tasks and start them up\n for (int index = 2; index < 7; index++) {\n final String childId = childTaskIds[index];\n pool.submit(new Runnable() {\n @Override\n public void run() {\n try {\n // purposely delay the addition of the child task\n Thread.sleep(6000);\n } catch (final InterruptedException e) {\n throw new RuntimeException(e);\n }\n final Configuration childTaskConf = TaskConfiguration.CONF\n .set(TaskConfiguration.IDENTIFIER, childId)\n .set(TaskConfiguration.TASK, DummyTask.class)\n .build();\n communicationGroupDriver.addTask(childTaskConf);\n communicationGroupDriver.runTask(childId);\n countDownLatch.countDown();\n }\n });\n }\n\n pool.shutdown();\n final boolean allThreadsFinished = countDownLatch.await(10, TimeUnit.SECONDS);\n assertTrue(\"all threads finished\", allThreadsFinished);\n\n // 7 connections between 8 tasks\n // 2 messages per connection\n // 2 operations (broadcast & reduce)\n // this gives us a total of 7*2*2 = 28 messages\n assertEquals(\"number of messages sent from driver\", 28, numMsgs.get());\n\n }", "public void testAddLockToken() {\n \n String lock = \"some lock\";\n session.addLockToken(lock);\n \n sessionControl.replay();\n sfControl.replay();\n \n jt.addLockToken(lock);\n \n }", "@Test\n public void testUserAndFlowGroupQuotaMultipleUsersAdd() throws Exception {\n Dag<JobExecutionPlan> dag1 = DagManagerTest.buildDag(\"1\", System.currentTimeMillis(),DagManager.FailureOption.FINISH_ALL_POSSIBLE.name(),\n 1, \"user5\", ConfigFactory.empty().withValue(ConfigurationKeys.FLOW_GROUP_KEY, ConfigValueFactory.fromAnyRef(\"group2\")));\n Dag<JobExecutionPlan> dag2 = DagManagerTest.buildDag(\"2\", System.currentTimeMillis(),DagManager.FailureOption.FINISH_ALL_POSSIBLE.name(),\n 1, \"user6\", ConfigFactory.empty().withValue(ConfigurationKeys.FLOW_GROUP_KEY, ConfigValueFactory.fromAnyRef(\"group2\")));\n Dag<JobExecutionPlan> dag3 = DagManagerTest.buildDag(\"3\", System.currentTimeMillis(),DagManager.FailureOption.FINISH_ALL_POSSIBLE.name(),\n 1, \"user6\", ConfigFactory.empty().withValue(ConfigurationKeys.FLOW_GROUP_KEY, ConfigValueFactory.fromAnyRef(\"group3\")));\n Dag<JobExecutionPlan> dag4 = DagManagerTest.buildDag(\"4\", System.currentTimeMillis(),DagManager.FailureOption.FINISH_ALL_POSSIBLE.name(),\n 1, \"user5\", ConfigFactory.empty().withValue(ConfigurationKeys.FLOW_GROUP_KEY, ConfigValueFactory.fromAnyRef(\"group2\")));\n // Ensure that the current attempt is 1, normally done by DagManager\n dag1.getNodes().get(0).getValue().setCurrentAttempts(1);\n dag2.getNodes().get(0).getValue().setCurrentAttempts(1);\n dag3.getNodes().get(0).getValue().setCurrentAttempts(1);\n dag4.getNodes().get(0).getValue().setCurrentAttempts(1);\n\n this._quotaManager.checkQuota(Collections.singleton(dag1.getNodes().get(0)));\n this._quotaManager.checkQuota(Collections.singleton(dag2.getNodes().get(0)));\n\n // Should fail due to user quota\n Assert.assertThrows(IOException.class, () -> {\n this._quotaManager.checkQuota(Collections.singleton(dag3.getNodes().get(0)));\n });\n // Should fail due to flowgroup quota\n Assert.assertThrows(IOException.class, () -> {\n this._quotaManager.checkQuota(Collections.singleton(dag4.getNodes().get(0)));\n });\n // should pass due to quota being released\n this._quotaManager.releaseQuota(dag2.getNodes().get(0));\n this._quotaManager.checkQuota(Collections.singleton(dag3.getNodes().get(0)));\n this._quotaManager.checkQuota(Collections.singleton(dag4.getNodes().get(0)));\n }", "@Test\n public void writeTryLockSuccessTest() throws InterruptedException {\n final TestUse testUse = new TestUse();\n final ConcurrentHashMap concurrentHashMap = new ConcurrentHashMap();\n int threadNum = 5;\n final CountDownLatch countDownLatch = new CountDownLatch(threadNum);\n for (int i = 0; i < threadNum; i++) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n testUse.minusCountInWriteTryLock();\n countDownLatch.countDown();\n }\n }).start();\n }\n countDownLatch.await();\n Assert.assertNotSame(1000, testUse.count);\n }", "public void runBare() throws Throwable {\n Throwable exception= null;\n setUp();\n try {\n runTest();\n } catch (Throwable running) {\n exception= running;\n }\n finally {\n try {\n tearDown();\n } catch (Throwable tearingDown) {\n if (exception == null) exception= tearingDown;\n }\n }\n if (exception != null) throw exception;\n }", "@Test\n\tpublic void testSelfHealingTx() throws InterruptedException {\n\t\tMFDataSetDefinitionMongo ddl = DataAccessCommitAndRollbackIT.insert(service, txManager, false, 0);\n\t\t// at this point we have data and everything has been commited. Now we\n\t\t// need to simulate that there are some pending transactions\n\t\tDB db = service.getMongoConnection();\n\t\tTransaction tx = txManager.startTransaction(db, ddl, OPERATION.INSERT);\n\n\t\t// access directly to the databag to simulate that some data were\n\t\t// neither commit nor rollback\n\t\tDBCollection col = db.getCollection(DataDefinitionService.getCollectionOfMetadataRef(ddl.getMetaDataRef()));\n\t\tint numberOfPendingData = 2;\n\t\tDBCursor cursor = col.find();\n\t\tint i = 0;\n\t\twhile (cursor.hasNext() && i < numberOfPendingData) {\n\t\t\tDBObject obj = cursor.next();\n\t\t\tDataContainer data = new DataContainer();\n\t\t\tdata.fromMongo(obj);\n\t\t\tdata.setTx(tx.getId());\n\t\t\tdata.setTxState(TX_STATE.PENDING);\n\t\t\tcol.update(obj, data.toMongo());\n\t\t\ti++;\n\t\t}\n\t\tList<MFManagedData> rows = service.listAllData(ddl.getMetaDataRef(), ddl.getVersion(), null);\n\t\t// the expected number of data is the total data inserted minus the\n\t\t// number of data that we have marked as \"pending\"\n\t\tint numberOfInsertedData = DataAccessCommitAndRollbackIT.numberOfData();\n\t\tint expectedNumberOfData = numberOfInsertedData - numberOfPendingData;\n\t\tAssert.assertEquals(expectedNumberOfData, rows.size());\n\n\t\t// Although the data was not returned by calling the method listAllData\n\t\t// we check with the following query that the rows are in the mongo DB\n\t\tint dataBagSize = col.find().count();\n\t\tAssert.assertEquals(numberOfInsertedData, dataBagSize);\n\n\t\t// commit what needs to be commited or rollback. In this case it will be\n\t\t// rolled back\n\t\ttxManager.processActiveTransactions(db);\n\n\t\t// check that the data non commited data are not comming (same as\n\t\t// before)\n\t\trows = service.listAllData(ddl.getMetaDataRef(), ddl.getVersion(), null);\n\t\tAssert.assertEquals(expectedNumberOfData, rows.size());\n\n\t\t// Note that the data on the databag doesn't longer exist.\n\t\tdataBagSize = col.find().count();\n\t\tAssert.assertEquals(expectedNumberOfData, dataBagSize);\n\n\t}", "static void test0() {\n\n System.out.println( \"Begin test0. ===============================\\n\" );\n\n Thread init = Thread.currentThread(); // init spawns the Mogwais\n\n // Create a GremlinsBridge of capacity 3.\n GremlinsBridge gremlinBridge = new GremlinsBridge( 3 );\n\n // Set an optional, test delay to stagger the start of each mogwai.\n int delay = 4000;\n\n // Create the Mogwais and store them in an array.\n Thread peds[] = {\n new Mogwai( \"Al\", 3, SIDE_ONE, gremlinBridge ),\n new Mogwai( \"Bob\", 4, SIDE_TWO, gremlinBridge ),\n };\n\n for ( int j = 0; j < peds.length; ++j ) {\n // Run them by calling their start() method.\n try {\n peds[j].start();\n init.sleep( delay );\n }\n catch ( InterruptedException e ) {\n System.err.println( \"Abort. Unexpected thread interruption.\" );\n break;\n }\n }\n // Now, the test must give the mogwai time to finish their crossings.\n for ( int j = 0; j < peds.length; ++j ) {\n try {\n peds[j].join();\n }\n catch ( InterruptedException e ) {\n System.err.println( \"Abort. Unexpected thread interruption.\" );\n break;\n }\n }\n System.out.println( \"\\n=============================== End test0.\" );\n return;\n }", "@Test\n public void processTransactionManagerCaseE() throws InterruptedException\n {\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n trans_mang.processTransaction(acc.get_Account_Number(),acc2.get_Account_Number(),30);\n\n Thread.sleep(15000);\n\n Assert.assertEquals(true,trans_mang.processTransaction(acc.get_Account_Number(),acc2.get_Account_Number(),30));\n }", "public void unlock() {\n/* 246 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void testNonTransactional() throws Throwable {\n List<MagicKey> keys = init();\n\n log.info(\"Invoking rehash event\");\n performRehashEvent(false);\n\n waitForRehashCompletion();\n log.info(\"Rehash complete\");\n\n for (MagicKey key : keys) assertOnAllCachesAndOwnership(key, \"v0\");\n }", "@Test\n\tpublic void testDuringAddConsistency() throws InterruptedException {\n\n\t\tfinal AtomicInteger finishedCount = new AtomicInteger(0);\n\n\t\tcontroller.addNewNodes(1);\n\t\tfinal SignalNode first = controller.getNodesToTest().getFirst();\n\t\tfinal Signal sig = src.next();\n\n\t\tcontroller.addSignalsToNode(first, 1000);\n\n\t\tCountDownLatch newNodeAwaitLatch = new CountDownLatch(1);\n\n\t\tcontroller.getListener().setNewNodeLatch(newNodeAwaitLatch);\n\n\t\tfinal AtomicBoolean mustQuit = new AtomicBoolean(false);\n\n\t\tThread t = new Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult last = null;\n\t\t\t\twhile (!mustQuit.get()) {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tResult newResult = first.findSimilarTo(sig);\n\t\t\t\t\t\tif (last != null && !mustQuit.get()) {\n\t\t\t\t\t\t\tAssert.assertEquals(last, newResult);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlast = newResult;\n\n\t\t\t\t\t} catch (RemoteException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfinishedCount.incrementAndGet();\n\t\t\t}\n\t\t});\n\n\t\tt.start();\n\n\t\tSignalNode node = controller.getNewSignalNode();\n\t\tfinal SignalNode lastNode = node;\n\t\ttry {\n\t\t\tnode.join(controller.getChannelName());\n\t\t\tcontroller.getNodesToTest().add(node);\n\t\t} catch (RemoteException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tThread t2 = new Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tResult last = null;\n\t\t\t\twhile (!mustQuit.get()) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tResult newResult = lastNode.findSimilarTo(sig);\n\t\t\t\t\t\tif (last != null && !mustQuit.get()) {\n\t\t\t\t\t\t\tAssert.assertEquals(last, newResult);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlast = newResult;\n\n\t\t\t\t\t} catch (RemoteException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfinishedCount.incrementAndGet();\n\t\t\t}\n\t\t});\n\n\t\tt2.start();\n\n\t\ttry {\n\t\t\tif (!newNodeAwaitLatch.await(120, TimeUnit.SECONDS)) {\n\t\t\t\tthrow new InterruptedException();\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t\tthrow new RuntimeException(\"Something didn't sync right\");\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tThread.sleep(5 * 1000);\n\t\t\t\tcontroller.addNewNodes(1);\n\t\t\t\tThread.sleep(5 * 1000);\n\t\t\t\tcontroller.addNewNodes(1);\n\t\t\t\tThread.sleep(5 * 1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"DONE!!! Interrumpting threads! Might show exceptions\");\n\t\t\t\tmustQuit.set(true);\n\t\t\t\tt.interrupt();\n\t\t\t\tt2.interrupt();\n\t\t\t}\n\t\t}\n\n\t\tt.join();\n\t\tt2.join();\n\t\tAssert.assertEquals(2, finishedCount.get());\n\t}", "@Test\n\tvoid contextLoads() throws InterruptedException {\n\t\t\n\t\tSystem.out.println(\"Starting method 1\");\n\t\t\n\t\tCompletableFuture<Void> x1 = CompletableFuture.runAsync(() -> this.completableFutureService.method(1));\t\t\n\t\t\n\t\tThread.sleep(1000);\n\t\t\n\t\tSystem.out.println(\"Starting method 2\");\n\t\t\n\t\tCompletableFuture<Void> x2 = CompletableFuture.runAsync(() -> this.completableFutureService.method(2));\t\t\n\t\t\n\t\tThread.sleep(500);\n\t\t\n\t\tSystem.out.println(\"Starting method 3\");\n\t\t\n\t\tCompletableFuture<Void> x3 = CompletableFuture.runAsync(() -> this.completableFutureService.method(3));\t\t\n\t\t\n\t\tSystem.out.println(\"Pass from three methods... \");\n\t\t\n\t\tVoid combinedResults = CompletableFuture.allOf(x1, x2, x3).join();\n\t\t\n\t\tassertTrue(x1.isDone());\n\t\tassertTrue(x2.isDone());\n\t\tassertTrue(x3.isDone());\n\t\t\n\t}", "@Test\n public void test4() {\n class mini_tests {\n public void test4_1() {\n try {\n tester.testOnInheritanceTree(null, testClass);\n Assert.fail();\n }\n catch (IllegalArgumentException e) {\n Assert.assertTrue(true);\n }\n catch (Throwable e) {\n Assert.fail();\n }\n }\n public void test4_2() {\n try {\n tester.testOnInheritanceTree(Story3, null);\n Assert.fail();\n }\n catch (IllegalArgumentException e) {\n Assert.assertTrue(true);\n }\n catch (Throwable e) {\n Assert.fail();\n }\n }\n public void test4_3() {\n try {\n tester.testOnInheritanceTree(null, null);\n Assert.fail();\n } catch (IllegalArgumentException e) {\n Assert.assertTrue(true);\n } catch (Throwable e) {\n Assert.fail();\n }\n }\n }\n mini_tests t = new mini_tests();\n t.test4_1();\n t.test4_2();\n t.test4_3();\n }", "@Test(timeout=20000)\n public void testWithReplicationFactorAsOne() throws Exception {\n Configuration conf = new HdfsConfiguration();\n conf.setLong(DFSConfigKeys.DFS_BLOCKREPORT_INTERVAL_MSEC_KEY, 1000L);\n conf.set(DFSConfigKeys.DFS_NAMENODE_RECONSTRUCTION_PENDING_TIMEOUT_SEC_KEY, Integer.toString(2));\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(2).build();\n FileSystem fs = cluster.getFileSystem();\n final FSNamesystem namesystem = cluster.getNamesystem();\n\n try {\n final Path fileName = new Path(\"/foo1\");\n DFSTestUtil.createFile(fs, fileName, 2, (short) 2, 0L);\n DFSTestUtil.waitReplication(fs, fileName, (short) 2);\n\n ExtendedBlock block = DFSTestUtil.getFirstBlock(fs, fileName);\n corruptBlock(cluster, fs, fileName, 0, block);\n\n DFSTestUtil.waitReplication(fs, fileName, (short) 1);\n\n assertEquals(1, countReplicas(namesystem, block).liveReplicas());\n assertEquals(1, countReplicas(namesystem, block).corruptReplicas());\n\n namesystem.setReplication(fileName.toString(), (short) 1);\n\n // wait for 3 seconds so that all block reports are processed.\n for (int i = 0; i < 10; i++) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException ignored) {\n }\n if (countReplicas(namesystem, block).corruptReplicas() == 0) {\n break;\n }\n }\n\n assertEquals(1, countReplicas(namesystem, block).liveReplicas());\n assertEquals(0, countReplicas(namesystem, block).corruptReplicas());\n\n } finally {\n cluster.shutdown();\n }\n }", "@Test(timeout=60000)\n\tpublic void testMayorNumeroLLamadas() {\n\t\tcb= new CyclicBarrier(31);\n\t\tprincipal(5, 3, 2, 20); \n\t\tExecutorService executor = Executors.newFixedThreadPool(31);\t\t \n\t\tfor ( int i = 0; i < totalEmpleados; i++ ){\n\t\t\tTelefono c =new Telefono( dispatcher,cb,1);\n\t\t\texecutor.execute(c);\n\t\t}\n\t\tfor ( int i = 0; i < totalClientes; i++ ){\n\t\t\tCliente p= new Cliente(dispatcher,cb,1);\n\t\t\texecutor.execute(p);\n\t\t}\n\n\t\ttry {\n\t\t\tcb.await();\n\t\t\tcb.await();\n\t\t\tassertEquals(0, dispatcher.getnProductores());\n\t\t\tassertEquals(0, dispatcher.getLLamadas().size());\n\n\t\t} catch (BrokenBarrierException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test\n public void testSynchronizedSync() throws AuthException, IOException {\n presenter.synchronize();\n try {\n presenter.syncingThread.join();\n } catch (InterruptedException e) {}\n assertEquals(SyncStatusEnum.PREAUTHED, presenter.status);\n presenter.synchronize();\n try {\n presenter.syncingThread.join();\n } catch (InterruptedException e) {}\n assertEquals(SyncStatusEnum.AUTHED, presenter.status);\n presenter.synchronize();\n try {\n presenter.syncingThread.join();\n } catch (InterruptedException e) {}\n assertEquals(SyncStatusEnum.SYNCED, presenter.status);\n }", "@Override\n protected void callCorps() throws Exception {\n\n ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();\n long[] idThread = threadMXBean.findDeadlockedThreads();\n\n\n if (idThread != null) {\n for (int i = 0; i < idThread.length; i++) {\n long l = idThread[i];\n logger.error(\"Il semble qu'il y ait un deadLock Thread ID : \" + l);\n\n }\n }\n }", "@Test\n public void runOutOfOrderConcurrencyTest() {\n ExecutorService tp = Executors.newFixedThreadPool(20);\n List<Throwable> errors = TestHelper.trackPluginErrors();\n try {\n SerializedObserverTest.TestConcurrencySubscriber tw = new SerializedObserverTest.TestConcurrencySubscriber();\n // we need Synchronized + SafeObserver to handle synchronization plus life-cycle\n Observer<String> w = serializedObserver(new SafeObserver<String>(tw));\n Future<?> f1 = tp.submit(new SerializedObserverTest.OnNextThread(w, 12000));\n Future<?> f2 = tp.submit(new SerializedObserverTest.OnNextThread(w, 5000));\n Future<?> f3 = tp.submit(new SerializedObserverTest.OnNextThread(w, 75000));\n Future<?> f4 = tp.submit(new SerializedObserverTest.OnNextThread(w, 13500));\n Future<?> f5 = tp.submit(new SerializedObserverTest.OnNextThread(w, 22000));\n Future<?> f6 = tp.submit(new SerializedObserverTest.OnNextThread(w, 15000));\n Future<?> f7 = tp.submit(new SerializedObserverTest.OnNextThread(w, 7500));\n Future<?> f8 = tp.submit(new SerializedObserverTest.OnNextThread(w, 23500));\n Future<?> f10 = tp.submit(new SerializedObserverTest.CompletionThread(w, SerializedObserverTest.TestConcurrencySubscriberEvent.onComplete, f1, f2, f3, f4));\n try {\n Thread.sleep(1);\n } catch (InterruptedException e) {\n // ignore\n }\n Future<?> f11 = tp.submit(new SerializedObserverTest.CompletionThread(w, SerializedObserverTest.TestConcurrencySubscriberEvent.onComplete, f4, f6, f7));\n Future<?> f12 = tp.submit(new SerializedObserverTest.CompletionThread(w, SerializedObserverTest.TestConcurrencySubscriberEvent.onComplete, f4, f6, f7));\n Future<?> f13 = tp.submit(new SerializedObserverTest.CompletionThread(w, SerializedObserverTest.TestConcurrencySubscriberEvent.onComplete, f4, f6, f7));\n Future<?> f14 = tp.submit(new SerializedObserverTest.CompletionThread(w, SerializedObserverTest.TestConcurrencySubscriberEvent.onComplete, f4, f6, f7));\n // // the next 4 onError events should wait on same as f10\n Future<?> f15 = tp.submit(new SerializedObserverTest.CompletionThread(w, SerializedObserverTest.TestConcurrencySubscriberEvent.onError, f1, f2, f3, f4));\n Future<?> f16 = tp.submit(new SerializedObserverTest.CompletionThread(w, SerializedObserverTest.TestConcurrencySubscriberEvent.onError, f1, f2, f3, f4));\n Future<?> f17 = tp.submit(new SerializedObserverTest.CompletionThread(w, SerializedObserverTest.TestConcurrencySubscriberEvent.onError, f1, f2, f3, f4));\n Future<?> f18 = tp.submit(new SerializedObserverTest.CompletionThread(w, SerializedObserverTest.TestConcurrencySubscriberEvent.onError, f1, f2, f3, f4));\n SerializedObserverTest.waitOnThreads(f1, f2, f3, f4, f5, f6, f7, f8, f10, f11, f12, f13, f14, f15, f16, f17, f18);\n @SuppressWarnings(\"unused\")\n int numNextEvents = tw.assertEvents(null);// no check of type since we don't want to test barging results here, just interleaving behavior\n\n // System.out.println(\"Number of events executed: \" + numNextEvents);\n for (int i = 0; i < (errors.size()); i++) {\n TestHelper.assertUndeliverable(errors, i, RuntimeException.class);\n }\n } catch (Throwable e) {\n Assert.fail((\"Concurrency test failed: \" + (e.getMessage())));\n e.printStackTrace();\n } finally {\n tp.shutdown();\n try {\n tp.awaitTermination(5000, TimeUnit.MILLISECONDS);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n RxJavaPlugins.reset();\n }\n }", "@Test\n public void testWithAllCorruptReplicas() throws Exception {\n Configuration conf = new HdfsConfiguration();\n conf.setLong(DFSConfigKeys.DFS_BLOCKREPORT_INTERVAL_MSEC_KEY, 1000L);\n conf.set(DFSConfigKeys.DFS_NAMENODE_RECONSTRUCTION_PENDING_TIMEOUT_SEC_KEY, Integer.toString(2));\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(3).build();\n FileSystem fs = cluster.getFileSystem();\n final FSNamesystem namesystem = cluster.getNamesystem();\n\n try {\n final Path fileName = new Path(\"/foo1\");\n DFSTestUtil.createFile(fs, fileName, 2, (short) 3, 0L);\n DFSTestUtil.waitReplication(fs, fileName, (short) 3);\n\n ExtendedBlock block = DFSTestUtil.getFirstBlock(fs, fileName);\n corruptBlock(cluster, fs, fileName, 0, block);\n\n corruptBlock(cluster, fs, fileName, 1, block);\n\n corruptBlock(cluster, fs, fileName, 2, block);\n\n // wait for 3 seconds so that all block reports are processed.\n try {\n Thread.sleep(3000);\n } catch (InterruptedException ignored) {\n }\n\n assertEquals(0, countReplicas(namesystem, block).liveReplicas());\n assertEquals(3, countReplicas(namesystem, block).corruptReplicas());\n\n namesystem.setReplication(fileName.toString(), (short) 1);\n\n // wait for 3 seconds so that all block reports are processed.\n try {\n Thread.sleep(3000);\n } catch (InterruptedException ignored) {\n }\n\n assertEquals(0, countReplicas(namesystem, block).liveReplicas());\n assertEquals(3, countReplicas(namesystem, block).corruptReplicas());\n\n } finally {\n cluster.shutdown();\n }\n }", "@Test\n void highConcurrencyOnSingleConnection() {\n SingleConnection singleConnection =\n options.getSingleConnectionFactory().apply(\"localhost\", server.httpPort());\n assumeTrue(singleConnection != null);\n\n int count = 50;\n String method = \"GET\";\n String path = \"/success\";\n URI uri = resolveAddress(path);\n\n CountDownLatch latch = new CountDownLatch(1);\n ExecutorService pool = Executors.newFixedThreadPool(4);\n for (int i = 0; i < count; i++) {\n int index = i;\n Runnable job =\n () -> {\n try {\n latch.await();\n } catch (InterruptedException e) {\n throw new AssertionError(e);\n }\n try {\n Integer result =\n testing.runWithSpan(\n \"Parent span \" + index,\n () -> {\n Span.current().setAttribute(\"test.request.id\", index);\n return singleConnection.doRequest(\n path,\n Collections.singletonMap(\"test-request-id\", String.valueOf(index)));\n });\n assertThat(result).isEqualTo(200);\n } catch (Throwable throwable) {\n if (throwable instanceof AssertionError) {\n throw (AssertionError) throwable;\n }\n throw new AssertionError(throwable);\n }\n };\n pool.submit(job);\n }\n latch.countDown();\n\n List<Consumer<TraceAssert>> assertions = new ArrayList<>();\n for (int i = 0; i < count; i++) {\n assertions.add(\n trace -> {\n SpanData rootSpan = trace.getSpan(0);\n // Traces can be in arbitrary order, let us find out the request id of the current one\n int requestId = Integer.parseInt(rootSpan.getName().substring(\"Parent span \".length()));\n\n trace.hasSpansSatisfyingExactly(\n span ->\n span.hasName(rootSpan.getName())\n .hasKind(SpanKind.INTERNAL)\n .hasNoParent()\n .hasAttributesSatisfyingExactly(\n equalTo(AttributeKey.longKey(\"test.request.id\"), requestId)),\n span -> assertClientSpan(span, uri, method, 200, null).hasParent(rootSpan),\n span ->\n assertServerSpan(span)\n .hasParent(trace.getSpan(1))\n .hasAttributesSatisfyingExactly(\n equalTo(AttributeKey.longKey(\"test.request.id\"), requestId)));\n });\n }\n\n testing.waitAndAssertTraces(assertions);\n\n pool.shutdown();\n }", "public static void test1() {\n\t\ttestIfThisCallBlocks();\n\t\tSystem.out.println(\"Done\");\n\t\tsleep(3000);\n\t\tSystem.out.println(\"Ending\");\n\t}", "@Test public void testTransactionExclusion() throws Exception {\n server.begin(THREAD1);\n\n try {\n server.start(THREAD1, XID1, XAResource.TMNOFLAGS, 100, false);\n fail(\"exception expected\"); //$NON-NLS-1$\n } catch (XATransactionException ex) {\n assertEquals(\"TEIID30517 Client thread already involved in a transaction. Transaction nesting is not supported. The current transaction must be completed first.\", //$NON-NLS-1$\n ex.getMessage());\n }\n }", "@Test\n public void readTryLockInTimeFailedTest() throws InterruptedException {\n final TestUse testUse = new TestUse();\n final CountDownLatch countDownLatch = new CountDownLatch(2);\n final List<Integer> result = new ArrayList<Integer>();\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n testUse.minusCountAndSleepInWriteLock(2000);\n countDownLatch.countDown();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }).start();\n Thread.sleep(10);\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n Integer r = testUse.getCountInReadTryLock(1000);\n if(r !=null){\n result.add(r);\n }\n countDownLatch.countDown();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }).start();\n countDownLatch.await();\n Assert.assertEquals(0, result.size());\n }", "@Test\n public void stoppedPrimarySenderShouldNotAddEventsToTmpDroppedEventsButStillDrainQueuesWhenStarted() {\n Integer lnPort = vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(2));\n Integer nyPort = vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(1, lnPort));\n\n createCacheInVMs(lnPort, vm2, vm4);\n createReceiverInVMs(vm2, vm4);\n createCacheInVMs(nyPort, vm3, vm5);\n createReceiverInVMs(vm3, vm5);\n\n vm2.invoke(() -> WANTestBase.createSender(\"ny\", 1, true, 100, 10, false, false, null, false));\n vm4.invoke(() -> WANTestBase.createSender(\"ny\", 1, true, 100, 10, false, false, null, false));\n\n vm3.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, false));\n vm5.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, false));\n\n vm2.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 1, 100,\n isOffHeap()));\n vm4.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 1, 100,\n isOffHeap()));\n\n vm3.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 1, 100,\n isOffHeap()));\n vm5.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 1, 100,\n isOffHeap()));\n\n stopSenderInVMsAsync(\"ny\", vm2);\n\n vm2.invoke(() -> WANTestBase.doPutsFrom(getTestMethodName() + \"_PR\", 0, 100));\n\n // verify tmpDroppedEvents is 0 at site-ny\n vm2.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n vm4.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n\n vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 100));\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 100));\n\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 50));\n vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 50));\n\n startSenderInVMsAsync(\"ny\", vm2);\n\n vm2.invoke(() -> WANTestBase.doPutsFrom(getTestMethodName() + \"_PR\", 100, 1000));\n\n vm2.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n vm4.invoke(() -> WANTestBase.verifyTmpDroppedEventSize(\"ny\", 0));\n\n vm2.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 1000));\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 1000));\n\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 950));\n vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 950));\n\n // verify the secondary's queues are drained at site-ny\n vm2.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained(\"ny\"));\n vm4.invoke(() -> WANTestBase.validateParallelSenderQueueAllBucketsDrained(\"ny\"));\n }", "@Test\n public void testAdd() throws Exception {\n runTX(new Callable<Void>() {\n public Void call() throws Exception {\n doTestAdd();\n return null;\n }\n });\n runTX(new Callable<Void>() {\n public Void call() throws Exception {\n doTestAddCheck();\n return null;\n }\n });\n }" ]
[ "0.6615418", "0.64281297", "0.6411281", "0.636857", "0.6345063", "0.6275254", "0.6145899", "0.6140416", "0.607597", "0.60406685", "0.6021973", "0.6018057", "0.60163975", "0.59322774", "0.5906114", "0.58719206", "0.5861943", "0.58410096", "0.58348924", "0.5826391", "0.58244205", "0.5818408", "0.5809683", "0.57947487", "0.5790064", "0.57868", "0.5784717", "0.5776184", "0.57296354", "0.57236737", "0.5712525", "0.57003385", "0.56916946", "0.56802744", "0.5673848", "0.56677943", "0.5661991", "0.56616163", "0.5631433", "0.5625695", "0.56241536", "0.56229174", "0.55962974", "0.55833894", "0.55827075", "0.5579119", "0.5572366", "0.5558657", "0.55525976", "0.554444", "0.55425465", "0.5532867", "0.55280364", "0.552456", "0.55137104", "0.5503567", "0.54903376", "0.54881775", "0.54872215", "0.54866207", "0.547084", "0.5469628", "0.54694915", "0.5458686", "0.545295", "0.5451521", "0.54514754", "0.5441357", "0.54398614", "0.5438871", "0.54347086", "0.5433211", "0.54165804", "0.54162115", "0.54162115", "0.5410506", "0.5408513", "0.54040205", "0.53888875", "0.5383528", "0.5383238", "0.5381371", "0.5379233", "0.537665", "0.5373952", "0.5373176", "0.53721577", "0.53688437", "0.5367682", "0.5365515", "0.53614", "0.5344991", "0.53398734", "0.5335951", "0.5331263", "0.5324266", "0.53230566", "0.5321585", "0.53185546", "0.53165764" ]
0.7730841
0
TODO Autogenerated method stub
@Override public String unparse() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public String toString() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
TODO Autogenerated method stub
@Override public int hashCode() { 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
@Override public boolean equals(Object obj) { 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}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
Author: demo Created on 2018/7/16
public interface IMainActivityContract { interface View extends BaseContract.BaseView { } interface Presenter extends BaseContract.BasePresenter<View> { void isBackApp(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void demo() {\n\t\tlab_2_2_5();\n\n\t}", "public static void thisDemo() {\n\t}", "public Demo() {\n\t\t\n\t}", "@Override\n public void setup() {\n\n }", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "private void presentShowcaseSequence() {\n }", "@Override\n public void setup() {\n }", "@Override\n public void setup() {\n }", "public static void main(String[] args) {\n \n \n \n \n }", "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n protected void setup() {\n }", "@Override\n protected void initialize() {\n\n \n }", "void pramitiTechTutorials() {\n\t\n}", "public void init(){\n \n }", "Sample start();", "Petunia() {\r\n\t\t}", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "protected void previewStarted() {\n\n }", "@Override\n public void init() {\n\n }", "private static void cajas() {\n\t\t\n\t}", "public static void example1() {\n // moved to edu.jas.application.Examples\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n void init() {\n }", "private Main() {\n\n super();\n }", "public static void main() {\n \n }", "public void themesa()\n {\n \n \n \n \n }", "private void addSampleData() {\r\n }", "public void init() {\n \n }", "default void show1() {\n\t\t\n\t\t\n\t}", "protected static void demoMethod( ) {\n System.out.println(\"demoMethod for singleton\");\n }", "public static void main(String[] args) {demo6();\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args) {\n \n \n }", "@Override\n public void init() {\n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private void init() {\n\n\n\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public Main() {\n \n \n }", "private void init() {\n\n\t}", "@Override\n public void onPostInit()\n {\n\n }", "@Override\n public void delta() {\n \n }", "public void setup() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "public void mo4359a() {\n }", "public void autoDetails() {\n\t\t\r\n\t}", "public void setup() {\r\n\r\n\t}", "@Override\n public void show() {\n \n }", "private void initialData() {\n\n }", "private FXDealHistory() {}", "public void show(){\n System.out.println(\"Welcome to Edureka's Tutorial\");\n }", "public static void main(String[] args) {\n ArrayList<String> tab = new ArrayList<>();\n tab.add(\"First\");\n tab.add(\"Hello\");\n tab.add(\"Last\");\n //Creation du modele\n LeModele leModele = new LeModele(tab);\n\n //Creation du controleur\n LeControleur leControleur = new LeControleur(leModele);\n\n //Creation de la vue\n LaVue laVue = new LaVue(leControleur);\n\n\n //Test\n\n\n }", "private void test() {\n\n\t}", "public static void main(String[]args) {\n\t\n\t\t\n\n}", "@Override\n public void memoria() {\n \n }", "@Override\n public void initialize() {\n \n }", "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 void beforeStart() {\n \n }", "@Override\n public void onStart() {\n \n }", "@Override\n public void onStart() {\n \n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n public void feedingHerb() {\n\n }", "public void startDemo() {\n // Welcoming display\n this.view.displayMenu();\n\n // State of the inventory and the users\n this.view.displaySystem(this.system);\n\n this.view.displayExampleMessage();\n\n // Example with a student\n Student s = this.system.getStudents().get(0);\n\n Calendar startDate = Calendar.getInstance();\n Calendar endDate = Calendar.getInstance();\n endDate.setTimeInMillis(endDate.getTimeInMillis() + 6*24*60*60*1000);\n\n Loan l = s.book(Model.IPAD3, new Period(startDate, endDate));\n this.system.checkLoan(l);\n\n this.view.displayBorrow(s, l);\n this.system.putAway(l);\n this.view.displayReturn(s, l);\n\n // Example with a teacher\n\n Teacher t = this.system.getTeachers().get(0);\n\n Loan l2 = s.book(Model.XPERIAZ, new Period(startDate, endDate));\n this.system.checkLoan(l2);\n\n this.view.displayBorrow(t, l2);\n this.system.putAway(l2);\n this.view.displayReturn(t, l2);\n\n }", "@Override\r\n\tpublic void carDashboar() {\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n\tpublic void view() {\n\t\t\n\t}", "@Override\n\tprotected void postRun() {\n\n\t}", "public void mo38117a() {\n }", "@Override\n public void init() {}", "public static void show() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "private void init() {\n }", "public void working()\n {\n \n \n }", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\n protected void init() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private void start() {\n\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public static void main(String[] args) {\n \n //GUI START\n DecoratorPatternDemo decoratorPatternDemo = new DecoratorPatternDemo();\n //GUI END\n\n \n }", "@Override\r\n\tprotected void initData() {\n\r\n\t}" ]
[ "0.5647035", "0.5541465", "0.5376678", "0.53338957", "0.5318234", "0.5278881", "0.5260936", "0.5260936", "0.52601165", "0.5257082", "0.5253514", "0.5233929", "0.5186595", "0.5184693", "0.5182624", "0.5178098", "0.51531327", "0.51449853", "0.51424664", "0.51361173", "0.51335037", "0.5130616", "0.5109837", "0.51053846", "0.510026", "0.5089545", "0.50656897", "0.50555086", "0.50540155", "0.50509006", "0.5045284", "0.5044184", "0.50353944", "0.50342536", "0.50342536", "0.50187445", "0.5016406", "0.5016406", "0.5016406", "0.5016406", "0.5016406", "0.5016406", "0.5015252", "0.5013731", "0.5009591", "0.5009591", "0.5009591", "0.5009591", "0.5009591", "0.5009591", "0.5007959", "0.5004016", "0.50032175", "0.4998336", "0.499058", "0.4988318", "0.49829134", "0.49829134", "0.49813956", "0.49781704", "0.4970409", "0.49694294", "0.4967493", "0.4962287", "0.49536216", "0.49496147", "0.49466708", "0.4946539", "0.4944098", "0.49429828", "0.49382612", "0.4929537", "0.49292028", "0.49292028", "0.49269402", "0.49269402", "0.49235883", "0.49235883", "0.49228528", "0.49139467", "0.4905447", "0.4900709", "0.48959988", "0.48884037", "0.48873663", "0.4886526", "0.488449", "0.48818922", "0.48818922", "0.48818922", "0.48818922", "0.48818922", "0.4880389", "0.48755825", "0.48747754", "0.48730582", "0.4872456", "0.48684195", "0.4864569", "0.48635957", "0.4862193" ]
0.0
-1
Common interface for all mutation operators.
public interface IMutationOperator extends IDescriptable, Opcodes { /** * Gets all possible points in given class (bytecode) where different * mutants can be produced. * * @param bytecode bytecode to be analyzed * @return list of mutation points witihn given class (bytecode) */ List<IMutationPoint> getMutationPoints(byte[] bytecode); /** * Mutate given bytecode to create mutants with given mutation points. * * @param bytecode bytecode to be mutated * @param mutationPoint mutation point in given class (bytecode) * @return list of mutants created within given point */ List<IMutantBytecode> mutate(byte[] bytecode, IMutationPoint mutationPoint); /** * @param bytecode bytecode to be mutated * @param mutationPointIndex mutation point in given class (bytecode) * @param mutantIndex specific mutant index within given point * @return mutated bytecode - mutant */ IMutantBytecode mutate(byte[] bytecode, int mutationPointIndex, int mutantIndex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void mutate();", "@API.Public\npublic interface DocumentMutation extends Iterable<MutationOp> {\n\n /**\n * Empties this Mutation object.\n */\n public DocumentMutation empty();\n\n /**\n * Sets the value of given field to the specified value. If the value of\n * given field name doesn't exist in the existing document on the server\n * then new field will be created.\n *\n * If the value for the given field name exists in the existing document\n * on server and its of the same type as the new value then existing value\n * will be replaced by new value.\n *\n * If the value of given field name exists and it is not same type as the\n * type of newly set value then mutation will fail.\n *\n * @param path path of the field that needs to be updated\n * @return this Mutation object\n */\n public DocumentMutation setNull(String path);\n\n public DocumentMutation setNull(FieldPath path);\n\n public DocumentMutation set(String path, Value v);\n\n public DocumentMutation set(FieldPath path, Value v);\n\n public DocumentMutation set(String path, boolean b);\n\n public DocumentMutation set(FieldPath path, boolean b);\n\n public DocumentMutation set(String path, short s);\n\n public DocumentMutation set(FieldPath path, short s);\n\n public DocumentMutation set(String path, byte b);\n\n public DocumentMutation set(FieldPath path, byte b);\n\n public DocumentMutation set(String path, int i);\n\n public DocumentMutation set(FieldPath path, int i);\n\n public DocumentMutation set(String path, long l);\n\n public DocumentMutation set(FieldPath path, long l);\n\n public DocumentMutation set(String path, float f);\n\n public DocumentMutation set(FieldPath path, float f);\n\n public DocumentMutation set(String path, double d);\n\n public DocumentMutation set(FieldPath path, double d);\n\n public DocumentMutation set(String path, String value);\n\n public DocumentMutation set(FieldPath path, String value);\n\n public DocumentMutation set(String path, BigDecimal bd);\n\n public DocumentMutation set(FieldPath path, BigDecimal bd);\n\n public DocumentMutation set(String path, Time t);\n\n public DocumentMutation set(FieldPath path, Time t);\n\n public DocumentMutation set(String path, Timestamp t);\n\n public DocumentMutation set(FieldPath path, Timestamp t);\n\n public DocumentMutation set(String path, Date d);\n\n public DocumentMutation set(FieldPath path, Date d);\n\n public DocumentMutation set(String path, List<? extends Object> value);\n\n public DocumentMutation set(FieldPath path, List<? extends Object> value);\n\n public DocumentMutation set(String path, Interval intv);\n\n public DocumentMutation set(FieldPath path, Interval intv);\n\n public DocumentMutation set(String path, ByteBuffer bb);\n\n public DocumentMutation set(FieldPath path, ByteBuffer bb);\n\n public DocumentMutation set(String path, Map<String, ? extends Object> value);\n\n public DocumentMutation set(FieldPath path, Map<String, ? extends Object> value);\n\n public DocumentMutation set(String path, Document value);\n\n public DocumentMutation set(FieldPath path, Document value);\n\n\n /**\n * Sets or replaces the value of a given field with the new value given in the API.\n * This is a fast API that doesn't require a read on the server to validate\n * the path or type.\n *\n * If any element in the specified field path doesn't exist then that element\n * will be created on the server.\n * Example : Field is \"a.b.c\" and value is int 10.\n * Suppose the server has only the field \"a\" of type map, then a setOrReplace of \"a.b.c\"\n * will create element \"b\" of type map inside \"a\". It will also create an element\n * named \"c\" of type integer inside map \"b\".\n *\n * If any element specified in the field path is of a different type\n * than the existing field element on the server, it will be deleted and replaced by\n * a new element.\n * Example : Field is \"a.b.c\" and value is int 10.\n * Suppose on the server, there is a field \"a\" of type array. This operation\n * will delete \"a\", create new element \"a\" of type map, and insert \"b.c\" in it.\n *\n * @param path path of the field that needs to be updated\n * @return this Mutation object\n */\n public DocumentMutation setOrReplace(String path, Value v);\n\n public DocumentMutation setOrReplace(FieldPath path, Value v);\n\n public DocumentMutation setOrReplaceNull(String path);\n\n public DocumentMutation setOrReplaceNull(FieldPath path);\n\n public DocumentMutation setOrReplace(String path, boolean b);\n\n public DocumentMutation setOrReplace(FieldPath path, boolean b);\n\n public DocumentMutation setOrReplace(String path, short s);\n\n public DocumentMutation setOrReplace(FieldPath path, short s);\n\n public DocumentMutation setOrReplace(String path, byte b);\n\n public DocumentMutation setOrReplace(FieldPath path, byte b);\n\n public DocumentMutation setOrReplace(String path, int i);\n\n public DocumentMutation setOrReplace(FieldPath path, int i);\n\n public DocumentMutation setOrReplace(String path, long l);\n\n public DocumentMutation setOrReplace(FieldPath path, long l);\n\n public DocumentMutation setOrReplace(String path, float f);\n\n public DocumentMutation setOrReplace(FieldPath path, float f);\n\n public DocumentMutation setOrReplace(String path, double d);\n\n public DocumentMutation setOrReplace(FieldPath path, double d);\n\n public DocumentMutation setOrReplace(String path, String value);\n\n public DocumentMutation setOrReplace(FieldPath path, String value);\n\n public DocumentMutation setOrReplace(String path, BigDecimal bd);\n\n public DocumentMutation setOrReplace(FieldPath path, BigDecimal bd);\n\n public DocumentMutation setOrReplace(String path, Time t);\n\n public DocumentMutation setOrReplace(FieldPath path, Time t);\n\n public DocumentMutation setOrReplace(String path, Timestamp t);\n\n public DocumentMutation setOrReplace(FieldPath path, Timestamp t);\n\n public DocumentMutation setOrReplace(String path, Date d);\n\n public DocumentMutation setOrReplace(FieldPath path, Date d);\n\n public DocumentMutation setOrReplace(String path, List<? extends Object> value);\n\n public DocumentMutation setOrReplace(FieldPath path, List<? extends Object> value);\n\n public DocumentMutation setOrReplace(String path, Interval intv);\n\n public DocumentMutation setOrReplace(FieldPath path, Interval intv);\n\n public DocumentMutation setOrReplace(String path, ByteBuffer bb);\n\n public DocumentMutation setOrReplace(FieldPath path, ByteBuffer bb);\n\n public DocumentMutation setOrReplace(String path, Map<String, ? extends Object> value);\n\n public DocumentMutation setOrReplace(FieldPath path,\n Map<String, ? extends Object> value);\n\n public DocumentMutation setOrReplace(String path, Document value);\n\n public DocumentMutation setOrReplace(FieldPath path, Document value);\n\n /**\n * Appends elements to an existing array. If the field doesn't exist on server,\n * it will be created and this operation proceeds. If the field already exists,\n * this operation will validate that the existing field is of the array type.\n * If it is of a different type, then this operation will fail.\n */\n public DocumentMutation append(String path, List<? extends Object> value);\n\n public DocumentMutation append(FieldPath path, List<? extends Object> value);\n\n /**\n * Appends elements to an existing string. This operation will first\n * validate on the server that the field specified by the given path\n * exists and is of the string type. If the field doesn't exist or is\n * of a different type, then the operation will fail.\n */\n public DocumentMutation append(String path, String value);\n\n public DocumentMutation append(FieldPath path, String value);\n\n /**\n * Appends a given byte array to the existing binary data stored on the server\n * on the given path. This operation will fail if the given field on the server is not of the\n * BINARY type. If the field path specified for append doesn't\n * exist on a server record, then this operation will create a new element at the\n * append path. This new element will be of BINARY type and its value will be\n * as specified in the parameter.\n *\n * This operation will fail if any type of the intermediate path elements specified\n * in the append field path doesn't match the type of the corresponding field in the\n * record stored on server. For example, an operation on field \"a.b.c\" will fail if,\n * on the server, the record a itself is an array or integer.\n *\n * This operation will perform read-modify-write on the server.\n *\n * @param path field path\n * @param value byte array value\n * @param offset offset in byte array\n * @param len length in byte array\n * @return this Mutation Object\n */\n public DocumentMutation append(String path, byte[] value, int offset, int len);\n\n public DocumentMutation append(FieldPath path, byte[] value, int offset, int len);\n\n public DocumentMutation append(String path, byte[] value);\n\n public DocumentMutation append(FieldPath path, byte[] value);\n\n public DocumentMutation append(String path, ByteBuffer value);\n\n public DocumentMutation append(FieldPath path, ByteBuffer value);\n\n /**\n * Merges the existing value on the server for the given field path with the new map\n * provided in the input. This operation will first validate that the entry with the\n * given field name exists on the server and is of the MAP type.\n *\n * If the entry is of a type other than MAP, then the operation will fail.\n * If the field path specified for merge doesn't\n * exist in the record on the server, then this operation will create a new element at the\n * given path. This new element will be of the MAP type and its value will be\n * as specified in the parameter.\n *\n * This operation will fail if any type of intermediate path elements specified\n * in the append field path doesn't match the type of the corresponding field in the\n * record stored on the server. For example, an operation on field \"a.b.c\" will fail if,\n * on the server, record a itself is an array or integer.\n *\n * @param path field path\n * @param value the value to be merged with existing value of a field on the server\n * @return this record mutation\n */\n public DocumentMutation merge(String path, Document value);\n\n public DocumentMutation merge(FieldPath path, Document value);\n\n public DocumentMutation merge(String path, Map<String, Object> value);\n\n public DocumentMutation merge(FieldPath path, Map<String, Object> value);\n\n /**\n * Atomically applies an increment to a given field (in dot separated notation)\n * of the given row id.\n *\n * If the field path specified for the incremental change doesn't\n * exist in the server record then this operation will create a new element at the\n * given path. This new element will be of same type as the value specified\n * in the parameter.\n *\n * This operation will fail if the type of any intermediate path elements specified\n * in the append field path doesn't match the type of the corresponding field in the\n * record stored on the server. For example, an operation on field \"a.b.c\" will fail\n * if, on the server, record a itself is an array or integer.\n *\n * If the field doesn't exist on\n * the server then it will be created with the type of given incremental value.\n * An increment operation can be applied on any of the numeric types\n * of a field, such as byte, short, int, long, float, double, or decimal.\n * The operation will fail if the increment is applied to a field\n * that is of a non-numeric type.\n *\n * The increment operation won't change the type of the existing value stored in\n * the given field for the row. The resultant value of the field will be\n * truncated based on the original type of the field.\n *\n * For example, field 'score' is of type int and contains 60. The increment\n * '5.675', a double, is applied. The resultant value of the field\n * will be 65 (65.675 will be truncated to 65).\n *\n * @param path field name in dot separated notation\n * @param inc increment to apply to a field - can be positive or negative\n */\n public DocumentMutation increment(FieldPath path, byte inc);\n\n public DocumentMutation increment(String path, byte inc);\n\n public DocumentMutation increment(FieldPath path, short inc);\n\n public DocumentMutation increment(String path, short inc);\n\n public DocumentMutation increment(String path, int inc);\n\n public DocumentMutation increment(FieldPath path, int inc);\n\n public DocumentMutation increment(FieldPath path, long inc);\n\n public DocumentMutation increment(String path, long inc);\n\n public DocumentMutation increment(String path, float inc);\n\n public DocumentMutation increment(FieldPath path, float inc);\n\n public DocumentMutation increment(String path, double inc);\n\n public DocumentMutation increment(FieldPath path, double inc);\n\n public DocumentMutation increment(String path, BigDecimal inc);\n\n public DocumentMutation increment(FieldPath path, BigDecimal inc);\n\n /**\n * Deletes the field at the given path.\n * If the field does not exist, this method silently returns without doing anything.\n * For example, if a delete operation is attempted on a.b.c, and a.b is an array on the\n * server, then a.b.c will not be deleted.\n */\n public DocumentMutation delete(String path);\n\n public DocumentMutation delete(FieldPath path);\n\n}", "public interface Mutation {\n void apply(Collection<PartType> parts);\n}", "MutateNda<V> getMut();", "private void introduceMutations() {\n }", "public interface Mutator {\n\n /**\n * Applies this mutation to the given graph.\n *\n * @param graph The graph to be mutated\n * @throws IllegalArgumentException If the given graph is null\n */\n void apply(GraphOfPixels graph) throws IllegalArgumentException;\n\n /**\n * Represents a filter applied to sharpen a pixel.\n */\n class SharpenFilter extends AbstractFilter {\n\n private static final Matrix kernel =\n new MatrixImpl(new ArrayList<Double>(Arrays.asList(\n -0.125, -0.125, -0.125, -0.125, -0.125,\n -0.125, 0.25, 0.25, 0.25, -0.125,\n -0.125, 0.25, 1.0, 0.25, -0.125,\n -0.125, 0.25, 0.25, 0.25, -0.125,\n -0.125, -0.125, -0.125, -0.125, -0.125)),\n 5, 5);\n\n\n @Override\n protected PixelAsColors applyToPixel(Node n) throws IllegalArgumentException {\n if (n == null) {\n throw new IllegalArgumentException(\"Given node is null.\");\n }\n\n double newRed = 0.0;\n double newGreen = 0.0;\n double newBlue = 0.0;\n\n for (int i = -2; i <= 2; i += 1) {\n for (int j = 2; j >= -2; j -= 1) {\n double kernelValue = kernel.getValue(i + 2, Math.abs(j - 2));\n newRed += kernelValue * n.getNearby(i, j).getRed();\n newGreen += kernelValue * n.getNearby(i, j).getGreen();\n newBlue += kernelValue * n.getNearby(i, j).getBlue();\n }\n }\n\n return new SimplePixel(Utils.roundDouble(newRed), Utils.roundDouble(newGreen),\n Utils.roundDouble(newBlue));\n }\n }\n\n /**\n * Represents a filter which can be applied to a graph of pixels to alter an image.\n */\n interface Filter extends Mutator {\n\n }\n\n /**\n * Represents a filter applied to blur a pixel.\n */\n class BlurFilter extends AbstractFilter {\n\n private static final Matrix kernel =\n new MatrixImpl(new ArrayList<Double>(Arrays.asList(\n 0.0625, 0.125, 0.0625,\n 0.125, 0.25, 0.125,\n 0.0625, 0.125, 0.0625)),\n 3, 3);\n\n\n @Override\n protected PixelAsColors applyToPixel(Node n) throws IllegalArgumentException {\n if (n == null) {\n throw new IllegalArgumentException(\"Given node is null.\");\n }\n\n double newRed = 0.0;\n double newGreen = 0.0;\n double newBlue = 0.0;\n\n for (int i = -1; i <= 1; i += 1) {\n for (int j = 1; j >= -1; j -= 1) {\n double kernelValue = kernel.getValue(i + 1, Math.abs(j - 1));\n newRed += kernelValue * n.getNearby(i, j).getRed();\n newGreen += kernelValue * n.getNearby(i, j).getGreen();\n newBlue += kernelValue * n.getNearby(i, j).getBlue();\n }\n }\n\n return new SimplePixel(Utils.roundDouble(newRed), Utils.roundDouble(newGreen),\n Utils.roundDouble(newBlue));\n }\n }\n\n /**\n * Represents an abstraction of a image filter.\n */\n abstract class AbstractFilter implements Filter {\n\n /**\n * Applies this filter to the given pixel.\n *\n * @param n represents a node in the graph for an image in a pixel\n * @return PixelAsColors representing new color of pixel\n * @throws IllegalArgumentException if node given is null\n */\n protected abstract PixelAsColors applyToPixel(Node n) throws IllegalArgumentException;\n\n @Override\n public void apply(GraphOfPixels graph) throws IllegalArgumentException {\n if (graph == null) {\n throw new IllegalArgumentException(\"Null graph given.\");\n }\n\n ArrayList<PixelAsColors> updatedColors = new ArrayList<PixelAsColors>();\n\n for (Node n : graph) {\n updatedColors.add(this.applyToPixel(n));\n }\n\n int counter = 0;\n for (Node n : graph) {\n n.updateColors(updatedColors.get(counter));\n counter += 1;\n }\n }\n }\n\n /**\n * Represents a color transformation to Sepia tone.\n */\n class SepiaTransform extends AbstractColorTransformation {\n\n private static final Matrix baseMatrix =\n new MatrixImpl(new ArrayList<Double>(Arrays.asList(\n 0.393, 0.769, 0.189,\n 0.349, 0.686, 0.168,\n 0.272, 0.534, 0.131)),\n 3, 3);\n\n @Override\n protected Matrix generateNewColorMatrix(Matrix rgb) throws IllegalArgumentException {\n return baseMatrix.matrixMultiply(rgb);\n }\n\n }\n\n /**\n * Represents a color transformation to Greyscale.\n */\n class GreyscaleTransform extends AbstractColorTransformation {\n\n private static final Matrix baseMatrix =\n new MatrixImpl(new ArrayList<Double>(Arrays.asList(\n 0.2126, 0.7152, 0.0722,\n 0.2126, 0.7152, 0.0722,\n 0.2126, 0.7152, 0.0722)),\n 3, 3);\n\n @Override\n protected Matrix generateNewColorMatrix(Matrix rgb) throws IllegalArgumentException {\n return baseMatrix.matrixMultiply(rgb);\n }\n }\n\n /**\n * Represents an abstraction of possible color transformations.\n */\n abstract class AbstractColorTransformation implements ColorTransformation {\n\n /**\n * Gets a new Matrix representing the new transformed colors of a pixel.\n *\n * @param rgb represents the original colors of the pixel\n * @return the transformed colors of the pixel\n * @throws IllegalArgumentException if rgb is null.\n */\n protected abstract Matrix generateNewColorMatrix(Matrix rgb) throws IllegalArgumentException;\n\n /**\n * Applies this color transformation to the given pixel.\n *\n * @param n represents a node in the graph for an image in a pixel\n */\n protected void applyToPixel(Node n) throws IllegalArgumentException {\n if (n == null) {\n throw new IllegalArgumentException(\"Null node given.\");\n }\n ArrayList<Double> nodeRGB = new ArrayList<Double>(\n Arrays.asList(n.getRed() + 0.0, n.getGreen() + 0.0, n.getBlue() + 0.0));\n Matrix ogRGB = new MatrixImpl(nodeRGB, 1, 3);\n\n Matrix newRGB = this.generateNewColorMatrix(ogRGB);\n\n n.updateColors(new SimplePixel(\n Utils.roundDouble(newRGB.getValue(0, 0)),\n Utils.roundDouble(newRGB.getValue(0, 1)),\n Utils.roundDouble(newRGB.getValue(0, 2))));\n }\n\n @Override\n public void apply(GraphOfPixels graph) throws IllegalArgumentException {\n if (graph == null) {\n throw new IllegalArgumentException(\"Null graph given.\");\n }\n\n for (Node n : graph) {\n this.applyToPixel(n);\n }\n }\n }\n\n /**\n * Represents a color transformation to mutate an image.\n */\n interface ColorTransformation extends Mutator {\n\n }\n}", "default MutateNda<V> mut() { return getMut(); }", "public abstract Chromosome mutation(Chromosome child);", "void visitOperatorImpl(OperatorImpl operator);", "public interface MutationListener {\n void accept(Mutation mutation);\n }", "interface Filter extends Mutator {\n\n }", "private interface OperationOverNodes {\n\t\tvoid operate(Node node);\n\t}", "@Override\n\tpublic void VisitUnaryNode(UnaryOperatorNode Node) {\n\n\t}", "@Override\n public Operator visitCopy(Copy operator)\n {\n throw new AssertionError();\n }", "public void visit(Operator operator);", "public interface Operator {\n\t\n\tpublic ArrayList<LeafValue> readOneTuple(); // Read one row at a time.\n\tpublic ArrayList<Column> getSchema(); // Get the current schema after \"N\" operations.\n\tpublic void reset(); // Reset the iteration pointer.\n\tpublic void dump(); // Print all the rows.\n}", "@Override\n public Operator visitAssign(Assign operator)\n {\n throw new AssertionError();\n }", "public interface VectorOperations extends MatrixOperations\n{\n /**\n * \n * Multiplies the vectors in a specific way, not sure of the term\n * \n * @param a\n * @param b\n * @return\n */\n public static Vector tensorProduct( final Vector a , final Vector b)\n {\n return a.tensorProduct(b);\n }\n \n /**\n * \n * Makes the tensor product of this and a\n * \n * @param a\n * @return\n */\n public Vector tensorProduct( final Vector a);\n \n /**\n * \n * Pretty much like List.sublist\n * \n * @param indexFrom\n * @param indexTo\n * @return\n */\n public Vector get( final int indexFrom, final int indexTo );\n \n /**\n * \n * @return size of the vector\n */\n public int size();\n}", "public interface Operator {\n public Object operate(List<LispStatement> operands);\n\n}", "Operator operator();", "public interface BasicOperator {\n public double compute(double... args);\n}", "public abstract void operation();", "public interface MutableIVData extends DataManipulator<MutableIVData, ImmutableIVData> {\n\n Value<Integer> hpIVS();\n Value<Integer> attackIVS();\n Value<Integer> defenseIVS();\n Value<Integer> spAttackIVS();\n Value<Integer> spDefenseIVS();\n Value<Integer> speedIVS();\n\n}", "private void mutateHelper() {\n\t\tsynchronized (this) {\n\t\t\tRandom rand = new Random();\n\t\t\tint mutateType = rand.nextInt(5);\n\t\t\tif (rules.size() >= 14) {\n\t\t\t\tmutateType = rand.nextInt(6);\n\t\t\t}\n\t\t\tint index = rand.nextInt(rules.size());\n\t\t\tMutation m = null;\n\t\t\tswitch (mutateType) {\n\t\t\tcase 0:\n\t\t\t\tm = MutationFactory.getDuplicate();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tm = MutationFactory.getInsert();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tm = MutationFactory.getRemove();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tm = MutationFactory.getReplace();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tm = MutationFactory.getSwap();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tm = MutationFactory.getTransform();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public IMutateExprTree getBaseOp() \r\n\t{\r\n\t\treturn baseOp;\r\n\t}", "S op(final S a, final S b);", "public interface Operation {\n\tdouble evaluate(double x, double y);\n}", "interface Update {}", "@Override\n\tpublic Object visit(ASTEquality node, Object data)\n\t{\n\t\treturn visitOperatorNode(node, data);\n\t}", "public interface Operator<Downstream, Upstream> extends Function<Subscriber<? super Downstream>, Subscriber<? super Upstream>> {\n\n }", "public interface IMul {\n Var mul(Var var);\n\n}", "@Override\n\tpublic void applyMutation(int index, double a_percentage) {\n\n\t}", "public interface UniMathOp {\n public double run(double a);\n}", "private Object mutation(Individual child){\n\t\treturn problem.improve(child.getId());\r\n\t}", "public void setMutationMethod(Mutation m){\n mutationType = m;\n }", "public interface Operation<T> {\n\t\tvoid apply(final T parameter);\n\t}", "@Override\n public boolean isMutable() {\n return true;\n }", "public interface Operation {\n int operate(int args1, int args2);\n}", "public interface Operation<S> extends Function<Pair<S, S>, S> {\n\n /**\n * Application of the operation.\n * @param a first element\n * @param b second element\n * @return <code>a op b</code>\n */\n S op(final S a, final S b);\n\n /**\n * Is the operation associative?\n * @return true if associative.\n */\n boolean isAssociative();\n\n /**\n * Is the operation commutative.\n * @return true if commutative\n */\n boolean isCommutative();\n\n /**\n * Test if the specified element is an identity for the operation.\n * @param e element to test\n * @return true if element is an identity\n */\n boolean isIdentity(final S e);\n}", "public Integer mutate(int index);", "public interface OperatorInterface {\n public Object call(Engine engine, List<?> args);\n}", "@Test\n\tpublic void testMutationTypes() {\n\t\tfinal IntrospectionResult introspection = getIntrospection();\n\t\t// MutationType\n\t\tfinal IntrospectionFullType mutationType = getFullType(introspection, schemaConfig.getMutationTypeName());\n\n\t\t// - check all mutations are available\n\t\tfinal List<String> mutationNames = new ArrayList<>();\n\t\tArrays.asList(Entity1.class, Entity2.class, Entity3.class, Entity4.class).stream().forEach(clazz -> {\n\t\t\tmutationNames.add(schemaConfig.getMutationSavePrefix() + clazz.getSimpleName());\n\t\t\tmutationNames.add(schemaConfig.getMutationDeletePrefix() + clazz.getSimpleName());\n\t\t});\n\t\tmutationNames.forEach(mutationName -> Assert.assertTrue(mutationType.getFields().stream()\n\t\t\t\t.map(IntrospectionTypeField::getName).collect(Collectors.toList()).contains(mutationName)));\n\n\t\t// - check one 'save' mutation (other ones are built the same way)\n\t\tfinal IntrospectionTypeField saveEntity1 = assertField(mutationType, mutationNames.get(0),\n\t\t\t\tIntrospectionTypeKindEnum.OBJECT, Entity1.class);\n\t\tAssert.assertEquals(1, saveEntity1.getArgs().size());\n\t\tassertArg(saveEntity1, \"data\", IntrospectionTypeKindEnum.NON_NULL, IntrospectionTypeKindEnum.INPUT_OBJECT,\n\t\t\t\tEntity1.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\n\t\t// - check one 'delete' mutation (other ones are built the same way)\n\t\tfinal IntrospectionTypeField deleteEntity1 = assertField(mutationType, mutationNames.get(1),\n\t\t\t\tIntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tschemaConfig.getOutputDeleteResultTypeNamePrefix() + schemaConfig.getOutputTypeNameSuffix());\n\t\tAssert.assertEquals(1, deleteEntity1.getArgs().size());\n\t\tassertArg(deleteEntity1, \"id\", IntrospectionTypeKindEnum.NON_NULL, IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLID.getName());\n\t}", "void visitOperatorFunction(OperatorFunction operator);", "@Override\n\tpublic List<MutantCtElement> execute(CtElement toMutate) {\n\t\tList<MutantCtElement> result = new ArrayList<MutantCtElement>();\n\n\t\tif (toMutate instanceof CtUnaryOperator<?>) {\n\t\t\tCtUnaryOperator<?> unary = (CtUnaryOperator<?>) toMutate;\n\t\t\tif (unary.getKind() == UnaryOperatorKind.NOT) {\n\t\t\t\tCtExpression expIF = factory.Core().clone(unary.getOperand());\n\t\t\t\tMutantCtElement mutatn = new MutantCtElement(expIF,0.3);\n\t\t\t\t//result.add(expIF);\n\t\t\t\tresult.add(mutatn);\n\t\t\t}\n\t\t} else {\n\t\t\tif (toMutate instanceof CtTypedElement<?>) {\n\t\t\t\tCtExpression<?> inv = (CtExpression<?>) toMutate;\n\t\t\t\tif (inv.getType()!= null && inv.getType().getSimpleName().equals(boolean.class.getSimpleName())) {\n\t\t\t\t\tCtExpression<?> invClone = factory.Core().clone(inv);\n\t\t\t\t\tCtUnaryOperator unary = factory.Core().createUnaryOperator();\n\t\t\t\t\tunary.setOperand(invClone);\n\t\t\t\t\tunary.setKind(UnaryOperatorKind.NOT);\n\t\t\t\t\t//result.add(unary);\n\t\t\t\t\tMutantCtElement mutatn = new MutantCtElement(unary,3);\n\t\t\t\t\t//result.add(expIF);\n\t\t\t\t\tresult.add(mutatn);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "@Override\n public boolean visit(JsBinaryOperation x, JsContext<JsExpression> ctx) {\n return !x.getOperator().isAssignment()\n || !(x.getArg1() instanceof JsStringLiteral);\n }", "@Override\n\tpublic void VisitBinaryNode(BinaryOperatorNode Node) {\n\n\t}", "protected abstract VerifiableSensorOperation doClone();", "public interface Unary extends Expr \n{\n /** Unary expression operator. */\n public static enum Operator {\n BIT_NOT (\"~\", true),\n NEG (\"-\", true),\n POST_INC (\"++\", false),\n POST_DEC (\"--\", false),\n PRE_INC (\"++\", true),\n PRE_DEC (\"--\", true),\n POS (\"+\", true),\n NOT (\"!\", true),\n CARET (\"^\", true),\n BAR (\"|\", true),\n AMPERSAND(\"&\", true),\n STAR (\"*\", true),\n SLASH (\"/\", true),\n PERCENT (\"%\", true);\n\n protected boolean prefix;\n protected String name;\n\n private Operator(String name, boolean prefix) {\n this.name = name;\n this.prefix = prefix;\n }\n\n /** Returns true of the operator is a prefix operator, false if\n * postfix. */\n public boolean isPrefix() { return prefix; }\n\n @Override public String toString() { return name; }\n }\n\n public static final Operator BIT_NOT = Operator.BIT_NOT;\n public static final Operator NEG = Operator.NEG;\n public static final Operator POST_INC = Operator.POST_INC;\n public static final Operator POST_DEC = Operator.POST_DEC;\n public static final Operator PRE_INC = Operator.PRE_INC;\n public static final Operator PRE_DEC = Operator.PRE_DEC;\n public static final Operator POS = Operator.POS;\n public static final Operator NOT = Operator.NOT;\n public static final Operator CARET = Operator.CARET;\n public static final Operator BAR = Operator.BAR;\n public static final Operator AMPERSAND = Operator.AMPERSAND;\n public static final Operator STAR = Operator.STAR;\n public static final Operator SLASH = Operator.SLASH;\n public static final Operator PERCENT = Operator.PERCENT;\n\n /** The sub-expression on that to apply the operator. */\n Expr expr();\n /** Set the sub-expression on that to apply the operator. */\n Unary expr(Expr e);\n\n /** The operator to apply on the sub-expression. */\n Operator operator();\n /** Set the operator to apply on the sub-expression. */\n Unary operator(Operator o);\n}", "@Override\n\tpublic void update(UpdateVisitor visitor) {\n\t}", "private void storeMutantShared(BlockStmt original, BlockStmt modified)\n {\n if (modified.equals(original))\n return;\n\n // Add Mutant\n addMutant(new ASTMutant(\n this.getOriginal().getCompilationUnit(),\n original,\n modified,\n this.getType()\n ));\n\n }", "public interface ArithmeticOperation {\n\n /**\n * Operation to be performed on two arguments\n *\n * @param argument1 first operand\n * @param argument2 second operand\n * @return result of the operation\n */\n double performeOperation(double argument1, double argument2);\n}", "public interface ShapeOperations {\n\n /**\n * Computes the difference between this Shape and the input Shape <code>s</code> and puts the\n * result back into this Shape. The difference is the points that are in this Shape but not in\n * the input Shape.\n * \n * @param s the Shape to compute the difference from.\n */\n public void difference(Shape s);\n\n /**\n * Computes the intersection between this Shape and the input Shape <code>s</code> and puts the\n * result back into this Shape. The intersection is the points that are in both this Shape and\n * in the input Shape.\n * \n * @param s the Shape to compute the intersection from.\n */\n public void intersect(Shape s);\n\n /**\n * Computes the union between this Shape and the input Shape <code>s</code> and puts the result\n * back into this Shape. The union is the points that are in either this Shape or in the input\n * Shape.\n * \n * @param s the Shape to compute the union from.\n */\n public void union(Shape s);\n\n}", "@Override\n public boolean isMutable()\n {\n return true;\n }", "protected ContainerValueOperationEvaluator(ContainerValueOperation op) {\r\n this.op = op;\r\n }", "public void visit(Operand operand);", "public interface Visitor {\r\n \r\n /**\r\n * Visits an Operand and performs the action given when overriding\r\n * this method.\r\n * @param operand An Operand this Visitor has visited\r\n * @return \r\n * @see Operand\r\n */\r\n public void visit(Operand operand);\r\n \r\n /**\r\n * Visits an Operator and performs the action given when overriding\r\n * this method.\r\n * @param operator An Operator this Visitor has visited.\r\n * @see Operator\r\n */\r\n public void visit(Operator operator);\r\n \r\n}", "public interface ModifyStatement extends Statement<ModifyStatement, Result> {\n /**\n * Add/replace the order specification for this statement.\n * \n * @param sortFields\n * sort expression\n * @return {@link ModifyStatement}\n */\n ModifyStatement sort(String... sortFields);\n\n /**\n * Add/replace the document limit for this statement.\n * \n * @param numberOfRows\n * limit\n * @return {@link ModifyStatement}\n */\n ModifyStatement limit(long numberOfRows);\n\n /**\n * Add an update to the statement setting the field as the document path to the given value for all documents matching the search criteria.\n * \n * @param docPath\n * document path to the given value\n * @param value\n * value to set\n * @return {@link ModifyStatement}\n */\n ModifyStatement set(String docPath, Object value);\n\n /**\n * Add an update to the statement setting the field, if it exists at the document path, to the given value.\n * \n * @param docPath\n * document path to the given value\n * @param value\n * value to set\n * @return {@link ModifyStatement}\n */\n ModifyStatement change(String docPath, Object value);\n\n /**\n * Nullify the given fields.\n * \n * @param fields\n * one or more field names\n * @return {@link ModifyStatement}\n */\n ModifyStatement unset(String... fields);\n\n /**\n * Takes in a patch object and applies it on all documents matching the modify() filter, using the JSON_MERGE_PATCH() function.\n * Please note that {@link DbDoc} does not support expressions as a field values, please use {@link #patch(String)} method if you need\n * such functionality.\n * \n * @param document\n * patch object\n * @return {@link ModifyStatement}\n */\n ModifyStatement patch(DbDoc document);\n\n /**\n * Takes in a document patch and applies it on all documents matching the modify() filter, using the JSON_MERGE_PATCH() function.\n * A document patch is similar to a JSON object, with the key difference that document field values can be nested expressions in addition to literal values.\n * <br>\n * Example:<br>\n * collection.modify(\"_id = :id\")<br>\n * .patch(\"{\\\"zip\\\": address.zip-300000, \\\"street\\\": CONCAT($.name, '''s street: ', $.address.street)}\")<br>\n * .bind(\"id\", \"2\").execute();\n * \n * @param document\n * patch object\n * @return {@link ModifyStatement}\n */\n ModifyStatement patch(String document);\n\n /**\n * Insert a value into the specified array.\n * \n * @param field\n * document path to the array field\n * @param value\n * value to insert\n * @return {@link ModifyStatement}\n */\n ModifyStatement arrayInsert(String field, Object value);\n\n /**\n * Append a value to the specified array.\n * \n * @param field\n * document path to the array field\n * @param value\n * value to append\n * @return {@link ModifyStatement}\n */\n ModifyStatement arrayAppend(String field, Object value);\n}", "assign_op getAssign_op();", "interface WriteExecutor<R> {\n /**\n * Execute previously defined operation\n */\n R execute();\n }", "public interface Operator {\n /**\n * String literal to enter operator\n * @return\n */\n String getKey();\n\n void execute(EvaluatedParameters evaluatedParameters) throws ProcessorException;\n}", "public interface ModelAddRemove extends ClosableIterable<Statement>,\r\n\t\tModelWriter, Lockable {\r\n\r\n\t// ////////////\r\n\t// diffing\r\n\r\n\t/**\r\n\t * Apply the changes given by this diff <emph>in one atomic operation</emph>\r\n\t * \r\n\t * Implementations must check that all statements to be removed are still in\r\n\t * the Model. Otherwise an exception is thrown.\r\n\t * \r\n\t * First all triples to be removed are removed, then triples to be added are\r\n\t * added.\r\n\t * \r\n\t * @param diff\r\n\t * @throws ModelRuntimeException\r\n\t */\r\n\tvoid update(DiffReader diff) throws ModelRuntimeException;\r\n\r\n\t/**\r\n\t * @param statements\r\n\t * @return a Diff between this model and the statements given in the\r\n\t * iterator\r\n\t * @throws ModelRuntimeException\r\n\t */\r\n\tDiff getDiff(Iterator<? extends Statement> statements)\r\n\t\t\tthrows ModelRuntimeException;\r\n\r\n\t/**\r\n\t * Removes all statements from this model.\r\n\t * \r\n\t * @throws ModelRuntimeException\r\n\t */\r\n\tvoid removeAll() throws ModelRuntimeException;\r\n\r\n\t/**\r\n\t * Removes all statements contained in 'other' from this model =\r\n\t * 'difference'\r\n\t * \r\n\t * @param other\r\n\t * another RDF2GO model\r\n\t * @throws ModelRuntimeException\r\n\t */\r\n\tvoid removeAll(Iterator<? extends Statement> statements)\r\n\t\t\tthrows ModelRuntimeException;\r\n\r\n\t// /////////////////\r\n\t// remove\r\n\r\n\t/**\r\n\t * remove a (subject, property ,object)-statement from the model\r\n\t * \r\n\t * @param subject\r\n\t * URI or Object (= blankNode)\r\n\t * @param predicate\r\n\t * @param object\r\n\t * URI or String (=plainLiteral) or BlankNode (=blankNode) or\r\n\t * TypedLiteral or LanguageTagLiteral\r\n\t * @throws ModelRuntimeException\r\n\t */\r\n\tvoid removeStatement(Resource subject, URI predicate, Node object)\r\n\t\t\tthrows ModelRuntimeException;\r\n\r\n\tvoid removeStatement(Resource subject, URI predicate, String literal)\r\n\t\t\tthrows ModelRuntimeException;\r\n\r\n\t/**\r\n\t * remove a (subject, property ,literal, language tag)-statement from the\r\n\t * model\r\n\t * \r\n\t * @param subject\r\n\t * @param predicate\r\n\t * @param literal\r\n\t * @param languageTag\r\n\t * @throws ModelRuntimeException\r\n\t */\r\n\tvoid removeStatement(Resource subject, URI predicate, String literal,\r\n\t\t\tString languageTag) throws ModelRuntimeException;\r\n\r\n\t/**\r\n\t * remove a (subject, property ,literal, datatype)-statement from the model\r\n\t * \r\n\t * datatype often is an uri for a xml schema datatype (xsd)\r\n\t * \r\n\t * @param subject\r\n\t * @param predicate\r\n\t * @param literal\r\n\t * @param datatypeURI\r\n\t * @throws ModelRuntimeException\r\n\t */\r\n\tvoid removeStatement(Resource subject, URI predicate, String literal,\r\n\t\t\tURI datatypeURI) throws ModelRuntimeException;\r\n\r\n\t/**\r\n\t * remove a rdf2go-statement from the model\r\n\t * \r\n\t * @param statement\r\n\t * @throws ModelRuntimeException\r\n\t */\r\n\tvoid removeStatement(Statement statement) throws ModelRuntimeException;\r\n\r\n\tvoid removeStatement(String subjectURIString, URI predicate, String literal)\r\n\t\t\tthrows ModelRuntimeException;\r\n\r\n\t/**\r\n\t * remove a (subject, property ,literal, language tag)-statement from the\r\n\t * model\r\n\t * \r\n\t * @param subject\r\n\t * @param predicate\r\n\t * @param literal\r\n\t * @param languageTag\r\n\t * @throws ModelRuntimeException\r\n\t */\r\n\tvoid removeStatement(String subjectURIString, URI predicate,\r\n\t\t\tString literal, String languageTag) throws ModelRuntimeException;\r\n\r\n\t/**\r\n\t * remove a (subject, property ,literal, datatype)-statement from the model\r\n\t * \r\n\t * datatype often is an uri for a xml schema datatype (xsd)\r\n\t * \r\n\t * @param subject\r\n\t * @param predicate\r\n\t * @param literal\r\n\t * @param datatypeURI\r\n\t * @throws ModelRuntimeException\r\n\t */\r\n\tvoid removeStatement(String subjectURIString, URI predicate,\r\n\t\t\tString literal, URI datatypeURI) throws ModelRuntimeException;\r\n\r\n}", "public static double getMutationProbability() { return mutationProbability; }", "interface ColorTransformation extends Mutator {\n\n }", "public interface CommonExpression<T> extends TripleExpression<T> {\n}", "protected Container2OperationEvaluator(Container2Operation op) {\r\n this.op = op;\r\n }", "Unary operator(Operator o);", "@Override\n\t\t\tpublic Ast binaryOp(BinaryOp ast, Void arg) {\n\t\t\t\tsuper.binaryOp(ast, arg);\n\n\t\t\t\ttry {\n\t\t\t\t\tExpr left = ast.left();\n\t\t\t\t\tExpr right = ast.right();\n\t\t\t\t\tInteger intValue = null;\n\t\t\t\t\tBoolean boolValue = null;\n\n\t\t\t\t\tswitch (ast.operator) {\n\t\t\t\t\tcase B_TIMES:\n\t\t\t\t\t\tintValue = asInt(left) * asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_DIV:\n\t\t\t\t\t\tintValue = asInt(left) / asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_MOD:\n\t\t\t\t\t\tintValue = asInt(left) % asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_PLUS:\n\t\t\t\t\t\tintValue = asInt(left) + asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_MINUS:\n\t\t\t\t\t\tintValue = asInt(left) - asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_AND:\n\t\t\t\t\t\tboolValue = asBool(left) && asBool(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_OR:\n\t\t\t\t\t\tboolValue = asBool(left) || asBool(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_LESS_THAN:\n\t\t\t\t\t\tboolValue = asInt(left) < asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_LESS_OR_EQUAL:\n\t\t\t\t\t\tboolValue = asInt(left) <= asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_GREATER_THAN:\n\t\t\t\t\t\tboolValue = asInt(left) > asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_GREATER_OR_EQUAL:\n\t\t\t\t\t\tboolValue = asInt(left) >= asInt(right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_EQUAL:\n\t\t\t\t\t\tboolValue = areEqual(left, right);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase B_NOT_EQUAL:\n\t\t\t\t\t\tboolValue = areEqual(left, right);\n\t\t\t\t\t\tif (boolValue != null)\n\t\t\t\t\t\t\tboolValue = !boolValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn replace(ast, intValue, boolValue);\n\t\t\t\t} catch (NotConstantException exc) {\n\t\t\t\t\t// non-constant operands: make no change.\n\t\t\t\t\treturn ast;\n\t\t\t\t} catch (ArithmeticException exc) {\n\t\t\t\t\t// division by zero etc: make no change.\n\t\t\t\t\treturn ast;\n\t\t\t\t}\n\t\t\t}", "public interface UpdateT extends Update {\n}", "public interface Product {\n\n void methodSame();\n\n void methodDiff();\n}", "public abstract LambdaTerm deepCopy();", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/DebugInfoMetadata.h\", line = 783,\n FQN=\"llvm::DICompositeType::mutate\", NM=\"_ZN4llvm15DICompositeType6mutateEjjjyyyj\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/DebugInfoMetadata.cpp -nm=_ZN4llvm15DICompositeType6mutateEjjjyyyj\")\n //</editor-fold>\n private void mutate(/*uint*/int Tag, /*uint*/int Line, /*uint*/int RuntimeLang,\n long/*uint64_t*/ SizeInBits, long/*uint64_t*/ AlignInBits, long/*uint64_t*/ OffsetInBits,\n /*uint*/int Flags) {\n assert (isDistinct()) : \"Only distinct nodes can mutate\";\n assert ((getRawIdentifier() != null)) : \"Only ODR-uniqued nodes should mutate\";\n this.RuntimeLang = RuntimeLang;\n super.mutate(Tag, Line, SizeInBits, AlignInBits, OffsetInBits, Flags);\n }", "public interface CellPropertyOperatorInterface<CP extends CellProperty>\n extends Serializable\n{\n\n /**\n * Apply a simulation step to the provided cell properties .\n * \n * @param pBeginId\n * @param pEndId\n * @param pTissueDynamics\n * @param pCellProperty\n */\n void apply(int pBeginId,\n int pEndId,\n TissueDynamics pTissueDynamics,\n @SuppressWarnings(\"unchecked\") CP... pCellProperty);\n\n}", "com.google.spanner.v1.Mutation.Write getUpdate();", "Operations operations();", "@Override\n\t public Node apply(Node gen) {\n\t\t gen = gen.clone(null);\n\t\t int n = gen.weight();\n\t\t int m = (int)(Math.random()*n);\n\t\t Node mutate_node = gen.get(m);\n\t\t int x = (int)(Math.random()*codes.length);\n\t\t mutate_node.oper = codes[x];\n\t\t return gen;\n\t }", "interface Container2Operation {\r\n \r\n /**\r\n * Evaluates the specific function on two container values possibly modifying <code>result</code>.\r\n * \r\n * @param c1 the first container (must not be modified)\r\n * @param c2 the second container (must not be modified)\r\n * @param result the result (to be modified as a side effect)\r\n */\r\n public void evaluate(ContainerValue c1, ContainerValue c2, List<Value> result);\r\n }", "protected abstract void mutate(HazelcastInstance hazelcastInstance);", "public interface Command<T>\n{\n /**\n * Subclasses determine how to update the given object\n */\n public void execute (T target);\n}", "public long getMutationIndex() {\n return mutationIndex;\n }", "public interface AssignmentNode extends StackOperationNode {\n\n TemporaryVariableName getValueName();\n\n}", "@Override\n public void visit(final OpDiff opDiff) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpDiff\");\n }\n final OpRewriter rewriter = new OpRewriter(securityEvaluator, graphIRI);\n addOp(OpDiff.create(rewriteOp2(opDiff, rewriter), rewriter.getResult()));\n }", "@Override\n\tpublic void visit(JsonOperator arg0) {\n\t\t\n\t}", "com.google.spanner.v1.Mutation.Write getReplace();", "@Override\npublic double executar(double a, double b) {\n\treturn a + b;\n}", "@Override\n\tpublic float multiplicar(float op1, float op2) {\n\t\treturn op1 * op2;\n\t}", "public interface Operation {\n}", "public interface AstIncreUnaryExpression extends AstUnaryExpression {\r\n}", "@Override\npublic void mul(int a, int b) {\n\t\n}", "@ZenCodeType.Operator(ZenCodeType.OperatorType.MUL)\n default IData mul(IData other) {\n \n return notSupportedOperator(OperatorType.MUL);\n }", "void assignOperators(Object rgID, List<Object> operIDs);", "public SO_Mutation(HashMap<String, Object> parameters) {\n super(parameters);\n if (parameters.get(\"probability\") != null)\n mutationProbability_ = (Double) parameters.get(\"probability\");\n }", "public double getUniformMutationRatio(){\n return delta;\n }", "@ZenCodeType.Operator(ZenCodeType.OperatorType.MOD)\n default IData mod(IData other) {\n \n return notSupportedOperator(OperatorType.MOD);\n }", "@Test\n public void syntheticSimple() {\n ConfigurableOperator cnb = new ConfigurableOperator(OpProps.prototype(1, Long.MAX_VALUE).cloneWithMemoryExpensive(true).cloneWithBound(false).cloneWithMemoryFactor(2.0d), ARBTRIARY_LEAF);\n ConfigurableOperator cb = new ConfigurableOperator(OpProps.prototype(1, Long.MAX_VALUE).cloneWithMemoryExpensive(true).cloneWithBound(true).cloneWithMemoryFactor(1.0d), cnb);\n Fragment f1 = new Fragment();\n f1.addOperator(cb);\n Wrapper w1 = new Wrapper(f1, 0);\n w1.overrideEndpoints(Collections.singletonList(N1));\n\n MemoryAllocationUtilities.setMemory(options, ImmutableMap.of(f1, w1), 10 + adjustReserve);\n assertEquals(Long.MAX_VALUE, cnb.getProps().getMemLimit());\n assertEquals(3, cb.getProps().getMemLimit());\n }", "interface ContainerValueOperation {\r\n\r\n /**\r\n * Evaluates the specific function on a container and a value possibly modifying <code>result</code>.\r\n * \r\n * @param cont the container (must not be modified)\r\n * @param value the value \r\n * @param result the result (to be modified as a side effect)\r\n */\r\n public void evaluate(ContainerValue cont, Value value, List<Value> result);\r\n }", "public interface XoverOpIntf {\r\n /**\r\n * the operation accepts 2 chromosomes (not DGAIndividual objects, not\r\n * FunctionIntf() arguments), and combines them so as to produce two new\r\n * such chromosomes that are returned in a Pair object. The operation may\r\n * throw if any of the produced children are infeasible, assuming the operator\r\n * has enough knowledge of that fact.\r\n * @param chromosome1 Object\r\n * @param chromosome2 Object\r\n * @param params HashMap \r\n * @throws OptimizerException\r\n * @return Pair\r\n */\r\n public Pair doXover(Object chromosome1, Object chromosome2, HashMap params) throws OptimizerException;\r\n}", "@Override\n public void visit(final OpDistinct opDistinct) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpDistinct\");\n }\n addOp(new OpDistinct(rewriteOp1(opDistinct)));\n }", "public interface BFOperatorInterface extends NodeInterface, BFNodeInterface {\n\n /**\n * Initiates the operator state.\n * Is called before any of the other functions.\n *\n * @param frame\n */\n void open(VirtualFrame frame);\n\n /**\n * Executes the operator for one input record.\n * Is called multiple times.\n *\n * @param frame\n */\n void execute(VirtualFrame frame);\n\n /**\n * Terminates this operator.\n * Is called exactly once.\n *\n * @param frame\n */\n void close(VirtualFrame frame);\n\n\n}", "interface Update {\n\n }", "public interface Duplo<T> {\n default Merge<T> merge() {\n return Merge.empty();\n }\n\n /** return the element stored in this instance; */\n T self();\n\n /**\n * do not override\n *\n * @return a stream representation of the element stored in this instance\n */\n default Stream<T> selfStream() {\n return self() == null ? Stream.empty() : Stream.of(self());\n }\n\n /**\n * return a stream of elements encapsulated by in this instance\n *\n * @return a stream representation of the element stored in this instance\n */\n default Stream<T> fullStream() {\n return Stream.empty();\n }\n\n /**\n * A {@link Duplo} which has no neighbors\n *\n * @param <T>\n * @author Yossi Gil\n * @since 2017-03-30\n */\n interface Atomic<T> extends Duplo<T> {\n @Override default Stream<T> fullStream() {\n return selfStream();\n }\n }\n\n interface Compound<T> extends Duplo<T> {\n Iterable<? extends Duplo<T>> components();\n\n @Override default Stream<T> fullStream() {\n return merge().append(self(), components());\n }\n }\n\n @FunctionalInterface interface Merge<T> {\n static <T> Merge<T> empty() {\n return (self, others) -> Stream.empty();\n }\n\n Stream<T> append(T self, Iterable<? extends Duplo<T>> others);\n }\n}" ]
[ "0.6660014", "0.6463165", "0.61593556", "0.6151728", "0.59929603", "0.5954237", "0.58902466", "0.58102214", "0.56348246", "0.5604095", "0.5573608", "0.55661684", "0.5549914", "0.5487509", "0.5455459", "0.54385775", "0.54344827", "0.5430419", "0.5414268", "0.53566945", "0.53507453", "0.53440595", "0.53306556", "0.53267586", "0.5311325", "0.5278399", "0.5273878", "0.5257074", "0.5244448", "0.5234704", "0.5228111", "0.52239734", "0.52221733", "0.52135134", "0.5194456", "0.51618266", "0.51399106", "0.51293737", "0.5129253", "0.5120108", "0.5115745", "0.51149124", "0.5104825", "0.5103198", "0.5099123", "0.5093579", "0.50852704", "0.50846064", "0.50818914", "0.50794536", "0.5076707", "0.5065592", "0.5064349", "0.50282234", "0.5027474", "0.50212955", "0.5009974", "0.5005923", "0.5000631", "0.4996762", "0.49951538", "0.4982704", "0.49747136", "0.49634498", "0.49549234", "0.49549106", "0.49477783", "0.49323082", "0.49279872", "0.4915445", "0.49151564", "0.49135298", "0.49109906", "0.49078995", "0.49044877", "0.49030188", "0.49010867", "0.48905486", "0.48839992", "0.4882064", "0.48772562", "0.48772353", "0.48706448", "0.48624083", "0.48584518", "0.48533937", "0.48497903", "0.48375273", "0.48374456", "0.4832791", "0.4828125", "0.4824174", "0.48198134", "0.48157334", "0.4811044", "0.48102698", "0.48093188", "0.48044086", "0.48023993", "0.48010182" ]
0.725931
0
Gets all possible points in given class (bytecode) where different mutants can be produced.
List<IMutationPoint> getMutationPoints(byte[] bytecode);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<IMutantBytecode> mutate(byte[] bytecode, IMutationPoint mutationPoint);", "public void compileMutants() {\n\tif (classOp != null && classOp.length > 0) {\n\t Debug.println(\"* Compiling class mutants into bytecode\");\n\t MutationSystem.MUTANT_PATH = MutationSystem.CLASS_MUTANT_PATH;\n\t super.compileMutants();\n\t}\n }", "void genMutants() {\n\tif (comp_unit == null) {\n\t System.err.println(original_file + \" is skipped.\");\n\t}\n\tClassDeclarationList cdecls = comp_unit.getClassDeclarations();\n\n\tif (cdecls == null || cdecls.size() == 0)\n\t return;\n\n\tif (classOp != null && classOp.length > 0) {\n\t Debug.println(\"* Generating class mutants\");\n\t MutationSystem.clearPreviousClassMutants();\n\t MutationSystem.MUTANT_PATH = MutationSystem.CLASS_MUTANT_PATH;\n\t CodeChangeLog.openLogFile();\n\t genClassMutants(cdecls);\n\t CodeChangeLog.closeLogFile();\n\t}\n }", "void genClassMutants2(ClassDeclarationList cdecls) {\n\tfor (int j = 0; j < cdecls.size(); ++j) {\n\t ClassDeclaration cdecl = cdecls.get(j);\n\t if (cdecl.getName().equals(MutationSystem.CLASS_NAME)) {\n\t\tDeclAnalyzer mutant_op;\n\n\t\tif (hasOperator(classOp, \"IHD\")) {\n\t\t Debug.println(\" Applying IHD ... ... \");\n\t\t mutant_op = new IHD(file_env, null, cdecl);\n\t\t generateMutant(mutant_op);\n\n\t\t if (((IHD) mutant_op).getTotal() > 0)\n\t\t\texistIHD = true;\n\t\t}\n\n\t\tif (hasOperator(classOp, \"IHI\")) {\n\t\t Debug.println(\" Applying IHI ... ... \");\n\t\t mutant_op = new IHI(file_env, null, cdecl);\n\t\t generateMutant(mutant_op);\n\t\t}\n\n\t\tif (hasOperator(classOp, \"IOD\")) {\n\t\t Debug.println(\" Applying IOD ... ... \");\n\t\t mutant_op = new IOD(file_env, null, cdecl);\n\t\t generateMutant(mutant_op);\n\t\t}\n\n\t\tif (hasOperator(classOp, \"OMR\")) {\n\t\t Debug.println(\" Applying OMR ... ... \");\n\t\t mutant_op = new OMR(file_env, null, cdecl);\n\t\t generateMutant(mutant_op);\n\t\t}\n\n\t\tif (hasOperator(classOp, \"OMD\")) {\n\t\t Debug.println(\" Applying OMD ... ... \");\n\t\t mutant_op = new OMD(file_env, null, cdecl);\n\t\t generateMutant(mutant_op);\n\t\t}\n\n\t\tif (hasOperator(classOp, \"JDC\")) {\n\t\t Debug.println(\" Applying JDC ... ... \");\n\t\t mutant_op = new JDC(file_env, null, cdecl);\n\t\t generateMutant(mutant_op);\n\t\t}\n\t }\n\t}\n }", "void genClassMutants(ClassDeclarationList cdecls) {\n\tgenClassMutants1(cdecls);\n\tgenClassMutants2(cdecls);\n }", "protected Set<Element> getMembersFromJavaSource(final String clazzname, final ElementUtilities.ElementAcceptor acceptor) {\n final Set<Element> ret = new LinkedHashSet<>();\n JavaSource javaSource = getJavaSourceForClass(clazzname);\n if (javaSource != null) {\n try {\n javaSource.runUserActionTask(new Task<CompilationController>() {\n @Override\n public void run(CompilationController controller) throws IOException {\n controller.toPhase(JavaSource.Phase.ELEMENTS_RESOLVED);\n TypeElement classElem = controller.getElements().getTypeElement(clazzname);\n if (classElem == null) {\n return;\n }\n ElementUtilities eu = controller.getElementUtilities();\n\n Iterable<? extends Element> members = eu.getMembers(classElem.asType(), acceptor);\n for (Element e : members) {\n ret.add(e);\n }\n }\n }, false);\n }\n catch (IOException ioe) {\n Exceptions.printStackTrace(ioe);\n }\n }\n return ret;\n }", "public HashSet<Point> getValidMoves(){\n HashSet<Point> set = new HashSet<Point>();\n if(this.validMove(this.x() + 2, this.y() + 1)){\n set.add(new Point(this.x() + 2, this.y() + 1));\n }\n if(this.validMove(this.x() + 2, this.y() - 1)){\n set.add(new Point(this.x() + 2, this.y() - 1));\n }\n if(this.validMove(this.x() - 2, this.y() + 1)){\n set.add(new Point(this.x() - 2, this.y() + 1));\n }\n if(this.validMove(this.x() - 2, this.y() - 1)){\n set.add(new Point(this.x() - 2, this.y() - 1));\n }\n if(this.validMove(this.x() + 1, this.y() + 2)){\n set.add(new Point(this.x() + 1, this.y() + 2));\n }\n if(this.validMove(this.x() + 1, this.y() - 2)){\n set.add(new Point(this.x() + 1, this.y() - 2));\n }\n if(this.validMove(this.x() - 1, this.y() + 2)){\n set.add(new Point(this.x() - 1, this.y() + 2));\n }\n if(this.validMove(this.x() - 1, this.y() - 2)){\n set.add(new Point(this.x() - 1, this.y() - 2));\n }\n return set;\n }", "private List<BlockPoint> getReachablePositions(BlockType[][] chunk, List<BlockPoint> topPlattforms) throws\n\t IllegalStateException {\n\tList<BlockPoint> reachablePositions = new ArrayList<>();\n\t// For every upmost position find all reachable positions\n\tfor(BlockPoint pos : topPlattforms){\n\t // Transpose the highest position point into chunks coordinate system by placing\n\t // directly below the start of chunk.\n\t BlockPoint highPos = new BlockPoint(pos.x, -pos.y - 1);\n\t for(int c = 0; c < boardWidth; c++){\n\t\tfor(int r = 0; r < chunk.length; r++){\n\t\t BlockPoint pointInChunk = new BlockPoint(c,r);\n\t\t if(pointInChunk.distanceTo(highPos) <= MAX_DISTANCE && pointInChunk.distanceTo(highPos) >= minDistance){\n\t\t reachablePositions.add(pointInChunk);\n\t\t }\n\t\t}\n\t }\n\t}\n\tif(reachablePositions.isEmpty()){\n\t throw new IllegalStateException(\"No reachable positions exists\");\n\t}\n\treturn reachablePositions;\n }", "public static void main(String[] args) {\n\t\tPermuatation2 p2 = new Permuatation2();\n\t\tSystem.out.println(p2.combinations(\"abc\"));\n\t}", "public List<Point> getPossibleNeighbours() {\n List<Point> points = new ArrayList<>();\n int x = point.getX();\n int y = point.getY();\n Arrays.asList(x - 1, x, x + 1).forEach(i -> {\n Arrays.asList(y - 1, y, y + 1).forEach(j -> {\n points.add(new Point(i, j));\n });\n });\n // remove self\n points.remove(new Point(x, y));\n return points;\n }", "public byte[] getPermutation() {\n byte[] p = new byte[48];\n for(int i = 0; i < 24; i+=3) {\n int k = co[i/3];\n if(k == 0) {}\n else if(k == 1) {k=2;}\n else {k=1;}\n int r = cp[i/3] * 3 + k;\n p[i] = (byte) r;\n p[i+1] = (byte) (((r-r/3*3+1)%3)+r/3*3);\n p[i+2] = (byte) (((r-r/3*3+2)%3)+r/3*3);\n }\n for(int i = 24; i < 48; i +=2) {\n int r = ep[(i-24)/2]*2 + eo[(i-24)/2];\n p[i] = (byte) (r + 24);\n p[i+1] = (byte) ((r-r/2*2+1)%2 + r/2*2 + 24);\n }\n return p;\n }", "Collection<MCodeMember> getAllCodeMembers();", "public abstract Class<?>[] getCoClasses();", "private static HashSet<Class<?>> getInstrumentedAncestors(Class<?> cls) {\n HashSet<Class<?>> ancestors = new HashSet<>();\n\n for (Method m : cls.getDeclaredMethods()) {\n if (m.getName().startsWith(\"yGet_\")) {\n ancestors.add(cls);\n // If the current class is instrumented, check for its super classes.\n ancestors.addAll(getInstrumentedAncestors(cls.getSuperclass()));\n return ancestors;\n }\n }\n\n return ancestors;\n }", "void genClassMutants1(ClassDeclarationList cdecls) {\n\n\tfor (int j = 0; j < cdecls.size(); ++j) {\n\t ClassDeclaration cdecl = cdecls.get(j);\n\n\t if (cdecl.getName().equals(MutationSystem.CLASS_NAME)) {\n\t\tString qname = file_env.toQualifiedName(cdecl.getName());\n\t\ttry {\n\t\t mujava.op.util.Mutator mutant_op;\n\n\t\t if (hasOperator(classOp, \"AMC\")) {\n\t\t\tDebug.println(\" Applying AMC ... ... \");\n\t\t\tmutant_op = new AMC(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"IOR\")) {\n\t\t\tDebug.println(\" Applying IOR ... ... \");\n\t\t\ttry {\n\t\t\t Class parent_class = Class.forName(qname).getSuperclass();\n\t\t\t if (!(parent_class.getName().equals(\"java.lang.Object\"))) {\n\t\t\t\tString temp_str = parent_class.getName();\n\t\t\t\tString result_str = \"\";\n\n\t\t\t\tfor (int k = 0; k < temp_str.length(); k++) {\n\t\t\t\t char c = temp_str.charAt(k);\n\t\t\t\t if (c == '.') {\n\t\t\t\t\tresult_str = result_str + \"/\";\n\t\t\t\t } else {\n\t\t\t\t\tresult_str = result_str + c;\n\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\tFile f = new File(MutationSystem.SRC_PATH, result_str + \".java\");\n\t\t\t\tif (f.exists()) {\n\t\t\t\t CompilationUnit[] parent_comp_unit = new CompilationUnit[1];\n\t\t\t\t FileEnvironment[] parent_file_env = new FileEnvironment[1];\n\t\t\t\t this.generateParseTree(f, parent_comp_unit, parent_file_env);\n\t\t\t\t this.initParseTree(parent_comp_unit, parent_file_env);\n\t\t\t\t mutant_op = new IOR(file_env, cdecl, comp_unit);\n\t\t\t\t ((IOR) mutant_op).setParentEnv(parent_file_env[0], parent_comp_unit[0]);\n\t\t\t\t comp_unit.accept(mutant_op);\n\t\t\t\t}\n\t\t\t }\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t System.out\n\t\t\t\t .println(\" Exception at generating IOR mutant. file : AllMutantsGenerator.java \");\n\t\t\t} catch (NullPointerException e1) {\n\t\t\t System.out.print(\" IOP ^^; \");\n\t\t\t}\n\t\t }\n\n\t\t if (hasOperator(classOp, \"ISD\")) {\n\t\t\tDebug.println(\" Applying ISD ... ... \");\n\t\t\tmutant_op = new ISD(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"IOP\")) {\n\t\t\tDebug.println(\" Applying IOP ... ... \");\n\t\t\tmutant_op = new IOP(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"IPC\")) {\n\t\t\tDebug.println(\" Applying IPC ... ... \");\n\t\t\tmutant_op = new IPC(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PNC\")) {\n\t\t\tDebug.println(\" Applying PNC ... ... \");\n\t\t\tmutant_op = new PNC(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PMD\")) {\n\t\t\tDebug.println(\" Applying PMD ... ... \");\n\t\t\t// if(existIHD){\n\t\t\tmutant_op = new PMD(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t\t// }\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PPD\")) {\n\t\t\tDebug.println(\" Applying PPD ... ... \");\n\t\t\t// if(existIHD){\n\t\t\tmutant_op = new PPD(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t\t// }\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PRV\")) {\n\t\t\tDebug.println(\" Applying PRV ... ... \");\n\t\t\tmutant_op = new PRV(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PCI\")) {\n\t\t\tDebug.println(\" Applying PCI ... ... \");\n\t\t\tmutant_op = new PCI(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PCC\")) {\n\t\t\tDebug.println(\" Applying PCC ... ... \");\n\t\t\tmutant_op = new PCC(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PCD\")) {\n\t\t\tDebug.println(\" Applying PCD ... ... \");\n\t\t\tmutant_op = new PCD(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"JSD\")) {\n\t\t\tDebug.println(\" Applying JSC ... ... \");\n\t\t\tmutant_op = new JSD(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"JSI\")) {\n\t\t\tDebug.println(\" Applying JSI ... ... \");\n\t\t\tmutant_op = new JSI(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"JTD\")) {\n\t\t\tDebug.println(\" Applying JTD ... ... \");\n\t\t\tmutant_op = new JTD(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"JTI\")) {\n\t\t\tDebug.println(\" Applying JTI ... ... \");\n\t\t\tmutant_op = new JTI(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"JID\")) {\n\t\t\tDebug.println(\" Applying JID ... ... \");\n\t\t\tmutant_op = new JID(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"OAN\")) {\n\t\t\tDebug.println(\" Applying OAN ... ... \");\n\t\t\tmutant_op = new OAN(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"EOA\")) {\n\t\t\tDebug.println(\" Applying EOA ... ... \");\n\t\t\tmutant_op = new EOA(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"EOC\")) {\n\t\t\tDebug.println(\" Applying EOC ... ... \");\n\t\t\tmutant_op = new EOC(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"EAM\")) {\n\t\t\tDebug.println(\" Applying EAM ... ... \");\n\t\t\tmutant_op = new EAM(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"EMM\")) {\n\t\t\tDebug.println(\" Applying EMM ... ... \");\n\t\t\tmutant_op = new EMM(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t} catch (ParseTreeException e) {\n\t\t System.err.println(\"Encountered errors during generating mutants.\");\n\t\t e.printStackTrace();\n\t\t}\n\t }\n\t}\n }", "Collection<Generalization> getPowertypeRanges();", "abstract public Point[] getCheminDeplacement(Coup c);", "public List<Point> generatePointList(){\r\n\t\t//Can move up to 3 squares horizontally or vertically, but cannot move diagonally.\r\n List<Point> pointList = new ArrayList<>();\r\n int pointCount = 0;\r\n int px = (int)getCoordinate().getX();\r\n int py = (int)getCoordinate().getY();\r\n\r\n for (int i=px-3;i<=px+3;i++){\r\n for(int j=py-3;j<=py+3;j++){\r\n if((i>=0) && (i<9) && (j>=0) && (j<9) && ((i!=px)||(j!=py))){\r\n if ((i==px)||(j==py)){\r\n pointList.add(pointCount, new Point(i,j));\r\n pointCount+=1;\r\n } \r\n }\r\n }\r\n }\r\n return pointList;\r\n }", "private static Iterable<String> calcClosure(List<String> classes) {\n Set<String> ret = new HashSet<String>();\n\n List<String> newClasses = new ArrayList<String>();\n for (String cName : classes) {\n newClasses.add(cName);\n ret.add(cName);\n }\n\n boolean updating = true;\n while (updating) {\n updating = false;\n classes = newClasses;\n newClasses = new ArrayList<String>();\n for (String cName : classes) {\n Set<String> nC = new HashSet<String>();\n Analysis as = new Analysis() {\n @Override\n public ClassVisitor getClassVisitor() {\n return new ReachingClassAnalysis(Opcodes.ASM5, null, nC);\n }\n };\n\n try {\n as.analyze(cName);\n } catch (IOException ex) {\n System.err.println(\"WARNING: IOError handling: \" + cName);\n System.err.println(ex);\n }\n\n for (String cn : nC) {\n if (!ret.contains(cn) &&\n !cn.startsWith(\"[\")) {\n ret.add(cn);\n newClasses.add(cn);\n updating = true;\n }\n }\n }\n }\n\n System.err.println(\"Identified \" + ret.size() +\n \" potentially reachable classes\");\n\n return ret;\n }", "protected Set<Integer> getToReplace() {\r\n \r\n Set<Integer> toReplace = new HashSet<>();\r\n double distance;\r\n Individual a, b;\r\n \r\n for(int i = 0; i < this.P.size()-1; i++) {\r\n \r\n a = this.P.get(i);\r\n \r\n for(int j = i+1; j < this.P.size(); j++) {\r\n \r\n b = this.P.get(j);\r\n \r\n distance = this.getSquaredEuclideanDistance(a.vector, b.vector);\r\n \r\n if(distance < this.minDifference) {\r\n \r\n if(a.fitness < b.fitness) {\r\n toReplace.add(j);\r\n } else {\r\n toReplace.add(i);\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n \r\n return toReplace;\r\n \r\n }", "public PairVector getCCs(){\r\n\t\treturn mccabe.getCCs(javaclass);\r\n\t}", "private Set<IntVector2D> canAttackFromDestination() {\n\t\tif(activePath == null || !pf.isValidPath(activePath))\n\t\t\treturn new HashSet<>();\n\t\tGameCharacter gc = getUnitAt(activePath.get(0)).getEnclosed();\n\t\tboolean ranged = gc.isRanged();\n\t\tboolean melee = gc.isMelee();\n\t\tAlignment atkSide = gc.getSide();\n\t\tSet<IntVector2D> attackable = new HashSet<>();\n\t\tint x = activePath.get(activePath.size() - 1).getX();\n\t\tint y = activePath.get(activePath.size() - 1).getY();\n\t\tif(ranged) {\n\t\t\tList<IntVector2D> arr = new LinkedList<>();\n\t\t\tarr.add(new IntVector2D(x + 2, y));\n\t\t\tarr.add(new IntVector2D(x - 2, y));\n\t\t\tarr.add(new IntVector2D(x, y + 2));\n\t\t\tarr.add(new IntVector2D(x, y - 2));\n\t\t\tarr.add(new IntVector2D(x + 1, y + 1));\n\t\t\tarr.add(new IntVector2D(x - 1, y + 1));\n\t\t\tarr.add(new IntVector2D(x + 1, y - 1));\n\t\t\tarr.add(new IntVector2D(x - 1, y - 1));\n\t\t\tattackable.addAll(arr.stream()\n\t\t\t\t\t.filter((vec) -> (\n\t\t\t\t\t\t\tisTileOnMap(vec) // not sure why this is necessary\n\t\t\t\t\t\t\t&& getTileAt(vec).isOccupied()\n\t\t\t\t\t\t\t&& Alignment.areOpposed(atkSide, getUnitAt(vec).getSide())))\n\t\t\t\t\t.collect(Collectors.toList()));\n\t\t}\n\t\tif(melee) {\n\t\t\tList<IntVector2D> arr = new LinkedList<>();\n\t\t\tarr.add(new IntVector2D(x + 1, y));\n\t\t\tarr.add(new IntVector2D(x - 1, y));\n\t\t\tarr.add(new IntVector2D(x, y + 1));\n\t\t\tarr.add(new IntVector2D(x, y - 1));\n\t\t\tattackable.addAll(arr.stream()\n\t\t\t\t\t.filter((vec) -> (\n\t\t\t\t\t\t\tisTileOnMap(vec) // not sure why this is necessary\n\t\t\t\t\t\t\t&& getTileAt(vec).isOccupied()\n\t\t\t\t\t\t\t&& Alignment.areOpposed(atkSide, getUnitAt(vec).getSide())))\n\t\t\t\t\t.collect(Collectors.toList()));\n\t\t}\n\t\treturn attackable;\n\t}", "public List<T> getSolution() throws InstantiationException, IllegalAccessException,\n\t\t\tInvocationTargetException, NoSuchMethodException {\n\t\t\n\t\tPopulation<T, K> pop = initializePopulation(populationSize, clazz);\n\t\t// Evolve our population until we reach an optimum solution\n\t\tint generationCount = 0;\n\n\t\tK fittest = pop.getFittest();\n\t\twhile (fittest.getFitness() < fitnessCalc.getMaxFitness() && generationCount < maxNumberOfGeneration) {\n\t\t\tgenerationCount++;\n\t\t\tpop = evolutionAlgorithm.evolvePopulation(pop);\n\t\t\tfittest = pop.getFittest();\n\t\t}\n\t\treturn new LinkedList<>(fittest.getChromosome());\n\t}", "public abstract HashSet<Location> getPossibleMovements(GameBoard board);", "protected abstract int[][] getPossiblePositions();", "public interface IMutationOperator extends IDescriptable, Opcodes {\n\t/**\n\t * Gets all possible points in given class (bytecode) where different\n\t * mutants can be produced.\n\t *\n\t * @param bytecode bytecode to be analyzed\n\t * @return list of mutation points witihn given class (bytecode)\n\t */\n\tList<IMutationPoint> getMutationPoints(byte[] bytecode);\n\n\t/**\n\t * Mutate given bytecode to create mutants with given mutation points.\n\t *\n\t * @param bytecode bytecode to be mutated\n\t * @param mutationPoint mutation point in given class (bytecode)\n\t * @return list of mutants created within given point\n\t */\n\tList<IMutantBytecode> mutate(byte[] bytecode, IMutationPoint mutationPoint);\n\n\t/**\n\t * @param bytecode bytecode to be mutated\n\t * @param mutationPointIndex mutation point in given class (bytecode)\n\t * @param mutantIndex specific mutant index within given point\n\t * @return mutated bytecode - mutant\n\t */\n\tIMutantBytecode mutate(byte[] bytecode, int mutationPointIndex, int mutantIndex);\n}", "Set<V> patternOtherComponents() {\n\t\treturn new HashSet<V>();\n\t}", "public class_34[] method_626() {\n return class_289.method_677(this.field_393);\n }", "private void generateMutants(BlockStmt blockStmt)\n {\n List<BlockStmt> targets = new ArrayList<>();\n blockStmt.walk(Node.TreeTraversal.BREADTHFIRST, n -> loadTargets(n, targets));\n if (targets.isEmpty())\n return;\n\n // Generate mutants\n for (BlockStmt t : targets)\n {\n generateMutant(blockStmt, t);\n }\n }", "public static <A,B> List<Map<A,B>> generateAllPossibilities(Map<A,Set<B>> input){\n\t\tList<Pair<A,Set<B>>> in = new ArrayList<Pair<A,Set<B>>>();\n\t\t\n\t\tfor(Entry<A,Set<B>> entry : input.entrySet()){\n\t\t\tin.add(new Pair<A,Set<B>>(entry.getKey(),entry.getValue()));\n\t\t}\n\t\t\n\t\treturn generateAllPossibilities(in);\n\t}", "public List getPossibleCreatures(EnumCreatureType type, int x, int y, int z)\n\t{\n\t\t//BiomeGenBase biomegenbase = worldObj.getBiomeGenForCoords(x, z);\n\t\t//return type == EnumCreatureType.monster && scatteredFeatureGenerator.func_143030_a(x, y, z) ? scatteredFeatureGenerator.getScatteredFeatureSpawnList() : biomegenbase.getSpawnableList(type);\n\t\treturn new ArrayList();\n\t}", "public abstract Set<Tile> getNeighbors(Tile tile);", "public int[] findAnyPairIndexesCoprime() {\n return findAnyPairIndexesCoprime(seq);\n }", "public static void main(String[] args) throws ArrayIndexOutOfBoundsException{\n\n A aB = new B();\n A aC = new C();\n B bB= new B();\n B bC= new C();\n C cC = new C();\n\n\n if ( aC.summ(1,1)==2) {\n System.out.println(\"true\");\n }\n if ( bC.diff(1,2) ==1) {\n System.out.println(\"true\");\n }\n\n System.out.println(bB.pp);\n System.out.println(bB.pr);\n\n System.out.println(cC.pp);\n System.out.println(cC.pr);\n\n\n int[] i = {};\n Class<?> cl = Integer.class;\n System.out.println(cl);\n\n System.out.println(2|1);\n System.out.println(3^1);\n\n\n int[] array = new int[] {1, 2, 3};\n\n for(int a: array) {\n System.out.print(a + \" \");\n }\n\n\n List<Integer> intList = new ArrayList<Integer>();\n for (int index = 0; index < array.length; index++)\n {\n intList.add(array[index]);\n }\n\n for(int a: intList) {\n System.out.print(a + \" \");\n }\n\n\n\n\n // int u = -1;\n // VM -ea\n //assert (u > 0): \"U < 0\";\n\n }", "private void scan() {\n if (classRefs != null)\n return;\n // Store ids rather than names to avoid multiple name building.\n Set classIDs = new HashSet();\n Set methodIDs = new HashSet();\n\n codePaths = 1; // there has to be at least one...\n\n offset = 0;\n int max = codeBytes.length;\n\twhile (offset < max) {\n\t int bcode = at(0);\n\t if (bcode == bc_wide) {\n\t\tbcode = at(1);\n\t\tint arg = shortAt(2);\n\t\tswitch (bcode) {\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret:\n\t\t\toffset += 4;\n\t\t\tbreak;\n\n\t\t case bc_iinc:\n\t\t\toffset += 6;\n\t\t\tbreak;\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t } else {\n\t\tswitch (bcode) {\n // These bcodes have CONSTANT_Class arguments\n case bc_instanceof: \n case bc_checkcast: case bc_new:\n {\n\t\t\tint index = shortAt(1);\n classIDs.add(new Integer(index));\n\t\t\toffset += 3;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_putstatic: case bc_getstatic:\n case bc_putfield: case bc_getfield: {\n\t\t\tint index = shortAt(1);\n CPFieldInfo fi = (CPFieldInfo)cpool.get(index);\n classIDs.add(new Integer(fi.getClassID()));\n\t\t\toffset += 3;\n\t\t\tbreak;\n }\n\n // These bcodes have CONSTANT_MethodRef_info arguments\n\t\t case bc_invokevirtual: case bc_invokespecial:\n case bc_invokestatic:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_jsr_w:\n\t\t case bc_invokeinterface:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n // Branch instructions\n\t\t case bc_ifeq: case bc_ifge: case bc_ifgt:\n\t\t case bc_ifle: case bc_iflt: case bc_ifne:\n\t\t case bc_if_icmpeq: case bc_if_icmpne: case bc_if_icmpge:\n\t\t case bc_if_icmpgt: case bc_if_icmple: case bc_if_icmplt:\n\t\t case bc_if_acmpeq: case bc_if_acmpne:\n\t\t case bc_ifnull: case bc_ifnonnull:\n\t\t case bc_jsr:\n codePaths++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n case bc_lcmp: case bc_fcmpl: case bc_fcmpg:\n case bc_dcmpl: case bc_dcmpg:\n codePaths++;\n\t\t\toffset++;\n break;\n\n\t\t case bc_tableswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tlong low = intAt(tbl, 1);\n\t\t\tlong high = intAt(tbl, 2);\n\t\t\ttbl += 3 << 2; \t\t\t// three int header\n\n // Find number of unique table addresses.\n // The default path is skipped so we find the\n // number of alternative paths here.\n Set set = new HashSet();\n int length = (int)(high - low + 1);\n for (int i = 0; i < length; i++) {\n int jumpAddr = (int)intAt (tbl, i) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n\n\t\t\toffset = tbl + (int)((high - low + 1) << 2);\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_lookupswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tint npairs = (int)intAt(tbl, 1);\n\t\t\tint nints = npairs * 2;\n\t\t\ttbl += 2 << 2; \t\t\t// two int header\n\n // Find number of unique table addresses\n Set set = new HashSet();\n for (int i = 0; i < nints; i += 2) {\n // use the address half of each pair\n int jumpAddr = (int)intAt (tbl, i + 1) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n \n\t\t\toffset = tbl + (nints << 2);\n\t\t\tbreak;\n\t\t }\n\n // Ignore other bcodes.\n\t\t case bc_anewarray: \n offset += 3;\n break;\n\n\t\t case bc_multianewarray: {\n\t\t\toffset += 4;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret: case bc_newarray:\n\t\t case bc_bipush: case bc_ldc:\n\t\t\toffset += 2;\n\t\t\tbreak;\n\t\t \n\t\t case bc_iinc: case bc_sipush:\n\t\t case bc_ldc_w: case bc_ldc2_w:\n\t\t case bc_goto:\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_goto_w:\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t }\n\t}\n classRefs = expandClassNames(classIDs);\n methodRefs = expandMethodNames(methodIDs);\n }", "private static Stack<Point> grahamScan(Set<Point> points){\n List<Point> sortedPoints = new ArrayList<>(sortedPointsSet(points));\n\n if(sortedPoints.size() < 3)\n throw new IllegalArgumentException(\"At least three unique points must be provided\");\n if(pointsAreCollinear(sortedPoints))\n throw new IllegalArgumentException(\"Points must not be collinear\");\n\n Stack<Point> stack = new Stack<>();\n stack.push(sortedPoints.get(0));\n stack.push(sortedPoints.get(1));\n stack.push(sortedPoints.get(2));\n\n for (int i = 3; i < sortedPoints.size(); i++) {\n Point top = stack.pop();\n Point nextToTop = stack.peek();\n Point pi = sortedPoints.get(i);\n\n AngleDirection direction = getAngleDirection(nextToTop, top, pi);\n\n switch (direction){\n case COUNTERCLOCKWISE: {\n stack.push(top);\n stack.push(pi);\n break;\n }\n case CLOCKWISE: {\n i--;\n break;\n }\n case COLLINEAR:{\n stack.push(pi);\n break;\n }\n }\n }\n return stack;\n }", "java.util.List<? extends com.google.ads.googleads.v6.common.CpvBidSimulationPointOrBuilder> \n getPointsOrBuilderList();", "private ArrayList<Chromosome> selectParentsTournament() {\n ArrayList<Chromosome> parents = new ArrayList<Chromosome>(Defines.crossoverParentCt);\n ArrayList<Chromosome> matingPool = new ArrayList<Chromosome>(Defines.crossoverParentCt);\n\n // Run tournaments to select parents - for each parent\n for (int parentIdx = 0; parentIdx < Defines.crossoverParentCt; parentIdx++) {\n\n // Run tournaments - get random contestants (run.getPaTournamentSize())\n for (int tournIdx = 0; tournIdx < Defines.tournamentSize; tournIdx++) {\n int contestantID = Defines.randNum(0, this.chromosomes.size() - 1);\n matingPool.add(this.chromosomes.get(contestantID));\n }\n Collections.sort(matingPool);\n parents.add(matingPool.get(0));\n }\n\n return parents;\n }", "public static void main(String[] args) {\n\t\tSolution060 s=new Solution060();\n\t\t\n\t\tSystem.out.println(s.getPermutation(8, 33333));\n\t}", "@Override\n public List<Vertex> solution(){\n return solution;\n }", "@Override\n public void visitCode() {\n try {\n InstructionInjector injector = new InstructionInjector(mv);\n if (tileEntity) {\n injector.begin();\n injector.addThisObjectToStack();\n injector.addThisObjectToStack();\n injector.addInstanceVarToStack(info.className.replace(\".\", \"/\"), info.facingVar, info.varType);\n injector.addThisObjectToStack();\n injector.addStaticMethodCall(ASMHelper.class.getCanonicalName().replace(\".\", \"/\"), \"canMine\",\n new MethodDescriptor(\"boolean\", new String[] {\n TileEntity.class.getCanonicalName().replace(\".\", \"/\"),\n byte.class.getCanonicalName(),\n Object.class.getCanonicalName().replace(\".\", \"/\")\n }));\n Label l1 = injector.addIfNotEqual();\n injector.addReturn(info.desc.getReturnType(), l1);\n injector.end();\n } else {\n Map<String, Integer> indexes = info.desc.getParamIndexes(new String[] {\n EntityLivingBase.class.getCanonicalName().replace(\".\", \"/\"),\n \"XCOORD\",\n \"YCOORD\",\n \"ZCOORD\"\n });\n if(indexes.containsKey(\"XCOORD\") && indexes.containsKey(\"YCOORD\") && indexes.containsKey(\"ZCOORD\")) {\n // We can pass coordinates to use...\n injector.begin();\n injector.addLocalVarToStack(Object.class, indexes.get(EntityLivingBase.class.getCanonicalName().replace(\".\", \"/\")));\n injector.addLocalVarToStack(int.class, indexes.get(\"XCOORD\"));\n injector.addLocalVarToStack(int.class, indexes.get(\"YCOORD\"));\n injector.addLocalVarToStack(int.class, indexes.get(\"ZCOORD\"));\n injector.addThisObjectToStack();\n injector.addStaticMethodCall(ASMHelper.class.getCanonicalName().replace(\".\", \"/\"), \"canMine\",\n new MethodDescriptor(\"boolean\", new String[] {\n EntityLivingBase.class.getCanonicalName().replace(\".\", \"/\"),\n int.class.getCanonicalName(),\n int.class.getCanonicalName(),\n int.class.getCanonicalName(),\n Object.class.getCanonicalName().replace(\".\", \"/\")\n }));\n Label l1 = injector.addIfNotEqual();\n injector.addReturn(info.desc.getReturnType(), l1);\n injector.end();\n } else if(indexes.containsKey(EntityLivingBase.class.getCanonicalName().replace(\".\", \"/\"))) {\n // We'll have to figure out coordinates on our own based on where the player is looking...\n injector.begin();\n injector.addLocalVarToStack(Object.class, indexes.get(EntityLivingBase.class.getCanonicalName().replace(\".\", \"/\")));\n injector.addThisObjectToStack();\n injector.addStaticMethodCall(ASMHelper.class.getCanonicalName().replace(\".\", \"/\"), \"canMine\",\n new MethodDescriptor(\"boolean\", new String[] {\n EntityLivingBase.class.getCanonicalName().replace(\".\", \"/\"),\n Object.class.getCanonicalName().replace(\".\", \"/\")\n }));\n Label l1 = injector.addIfNotEqual();\n injector.addReturn(info.desc.getReturnType(), l1);\n injector.end();\n }\n }\n } catch (Throwable e) {\n FMLLog.log(\"Canine\", Level.WARN, \"%s\", \"Failed to find or patch class: \" + info.className);\n e.printStackTrace();\n }\n }", "Set<Point2D> getWallSet();", "public int[] findAnyPairIndexesWhileGCDMinimized() {\n if (seq.length < 2) {\n return null;\n }\n int g = -1;\n for (int i = 1; i <= m; i++) {\n if (minimumSizeOfSubsetWhoseGCDDivisibleBy(i) <= 2) {\n g = i;\n break;\n }\n }\n\n IntegerArrayList list = new IntegerArrayList(seq.length);\n for (int i = 0; i < seq.length; i++) {\n if (seq[i] % g == 0) {\n list.add(seq[i]);\n }\n }\n\n int[] pair = findAnyPairIndexesCoprime(list.toArray());\n return new int[]{indexesOfSeq.peekFirst(list.get(pair[0]) * g), indexesOfSeq.peekLast(list.get(pair[1]) * g)};\n }", "public Map<Integer, ArrayList<Integer>> getClassCardMap() {\n classCardMap = new HashMap<Integer, ArrayList<Integer>>();\n if (classPowers.size() > 0) {\n for (Integer pos : classPosMap.get(classId)) {\n // Filter out any pos already in the powMap\n if (!powMap.keySet().contains(pos)) {\n // Rotate power to next in list\n classPowers.add(classPowers.remove(0));\n ArrayList<Integer> powersCopy = new ArrayList<>(classPowers);\n classCardMap.put(pos, powersCopy);\n }\n }\n }\n return classCardMap;\n }", "private List<Set<V>> findAllAnticomponentsOfY(Graph<V, E> g, Set<V> Y)\n {\n Graph<V, E> target;\n if (g.getType().isSimple())\n target = new SimpleGraph<>(\n g.getVertexSupplier(), g.getEdgeSupplier(), g.getType().isWeighted());\n else\n target = new Multigraph<>(\n g.getVertexSupplier(), g.getEdgeSupplier(), g.getType().isWeighted());\n new ComplementGraphGenerator<>(g).generateGraph(target);\n\n return findAllComponents(target, Y);\n }", "public Set<Square> validDestinations(Board b);", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "Set<String> getProteinAccessions(String experimentAccession);", "public static void main(String[] args) {\n \n PointSET pset = new PointSET();\n System.out.println(\"Empty: \" + pset.isEmpty());\n pset.insert(new Point2D(0.5, 0.5));\n pset.insert(new Point2D(0.5, 0.5));\n pset.insert(new Point2D(0.5, 0.6));\n pset.insert(new Point2D(0.5, 0.7));\n pset.insert(new Point2D(0.5, 0.8));\n pset.insert(new Point2D(0.1, 0.5));\n pset.insert(new Point2D(0.8, 0.5));\n pset.insert(new Point2D(0.1, 0.1));\n System.out.println(\"Empty: \" + pset.isEmpty());\n System.out.println(\"Size: \" + pset.size());\n System.out.println(\"Nearest to start: \" + pset.nearest(new Point2D(0.0, 0.0)));\n System.out.println(\"Contains #1: \" + pset.contains(new Point2D(0.0, 0.0)));\n System.out.println(\"Contains #2: \" + pset.contains(new Point2D(0.5, 0.5)));\n System.out.print(\"Range #1: \");\n for (Point2D p : pset.range(new RectHV(0.001, 0.001, 0.002, 0.002)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n System.out.print(\"Range #2: \");\n for (Point2D p : pset.range(new RectHV(0.05, 0.05, 0.15, 0.15)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n System.out.print(\"Range #3: \");\n for (Point2D p : pset.range(new RectHV(0.25, 0.35, 0.65, 0.75)))\n System.out.print(p.toString() + \"; \");\n System.out.print(\"\\n\");\n \n }", "public Collection <Point> getAllPoints(){\n Collection <Point> points = new ArrayList<>();\n for(int i = 0; i < width; i++){\n for(int j = 0; j < height; j++){\n points.add(new Point(i, j));\n }\n }\n return points;\n }", "protected List<Candidate> getSlopeCandidates() {\r\n\t\t//method parameter declaration\r\n\t\tString de_name, xml_gid_in = null, xml_gid_out = null;\r\n\t\t\r\n\t\t//metaData logging\r\n\t\tLogger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.INFO, \"Features_in size is: \" + this.getFeatures_in().length);\r\n\t\tSystem.out.println(\"max allowed end-point distance is: \" + this.slopeThreshold);\r\n\t\tSystem.out.println(\"max allowed mid-point distance is: \" + midPointThreshold);\r\n\t\tSystem.out.println(\"max allowed height difference for slope Links is: \" + (StartConfiguration.getInstance().getSlope_heights()[5] + 0.5));\r\n\t\tList<SimpleFeature> slopes_out = new ArrayList<SimpleFeature>(Arrays.asList(this.getFeatures_in()));\r\n\t\tList<Candidate> candidates = new ArrayList<Candidate>();\r\n\t\tCandidate cand = null;\r\n\t\t\t\t\r\n\t\tfor (SimpleFeature slope_in: this.getFeatures_in()) {\r\n\t\t\t//remove first item of the out_feature list, to avoid checking a feature over itself\r\n\t\t\tslopes_out.remove(0);\r\n\t\t\t\r\n//if (!slope_in.getAttribute(\"DE_GR_L_1\").equals(\"Sportgastein\")) continue;\r\n\r\n\t\t\t//fetch geometry, coordinate sequence and create start and end point\r\n\t\t\tGeometry geom_in = (Geometry) slope_in.getDefaultGeometry();\r\n\t\t\tCoordinate [] slope_in_endPoints = GeometryOperations.getOrderedEndPoints(slope_in);\r\n\t\t\t\r\n\t\t\t//iterate over the out set of features\r\n\t\t\tfor (SimpleFeature slope_out: slopes_out) {\t\t\r\n\t\t\t\t//fetch semantic info\r\n\t\t\t\tde_name = slope_in.getAttribute(\"DE_GR_L_0\") + \" - \" + slope_in.getAttribute(\"DE_GR_L_1\");\r\n\t\t\t\txml_gid_in = slope_in.getAttribute(\"XML_GID\").toString();\r\n\t\t\t\txml_gid_out = slope_out.getAttribute(\"XML_GID\").toString();\r\n\t\t\t\t\r\n\t\t\t\tString[] attributes = new String [] {xml_gid_in, xml_gid_out, de_name};\r\n\t\t\t\t\r\n\t\t\t\t//fetch geometry and slope_out end-points\r\n\t\t\t\tCoordinate [] slope_out_endPoints = GeometryOperations.getOrderedEndPoints(slope_out);\r\n\t\t\t\tGeometry geom_out = (Geometry) slope_out.getDefaultGeometry();\r\n\t\t\t\t\r\n\t\t\t\t/* fetch intersection points of two geometries. size null -> means no intersection. size >=1 -> means slope intersect at one or more points */\r\n\t\t\t\tList<Coordinate> intersectionPoints = geomOps.getIntersectionVertices(geom_in, geom_out);\r\n\r\n\t\t\t\t//Remove common upper or lower point, if there is one, from intersection list\r\n\t\t\t\tcleanIntersectionsFromCommonEndPoints(slope_in_endPoints, slope_out_endPoints, intersectionPoints);\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t/* 1 - search slope_in upper for connection with slope_out lower or mid-point (distance < 20m) (traverse direction from slope_out to slope_in) */\r\n\t\t\t\tCoordinate midPointNeighbor = getMidPointCandidate(slope_in_endPoints[1], geom_out, midPointThreshold); //fetch midPoint neighbor if one exists, for upper endPoint\r\n\t\t\t\tcand = fetchEndpointCandidate(slope_in_endPoints[1], slope_out_endPoints[0], intersectionPoints, midPointNeighbor, attributes, true);\r\n\t\t\t\tif (cand!=null) { candidates.add(cand); }\r\n\t\t\t\t\r\n\t\t\t\t/* 2 - search slope_in lower for connection with slope_out upper or mid-point (distance < 20m) (traverse direction from slope_in to slope_out) */\r\n\t\t\t\tmidPointNeighbor = getMidPointCandidate(slope_in_endPoints[0], geom_out, this.midPointThreshold);\t//fetch midPoint neighbor if one exists, for lower endPoint\r\n\t\t\t\tcand = fetchEndpointCandidate(slope_in_endPoints[0], slope_out_endPoints[1], intersectionPoints, midPointNeighbor, attributes, false);\r\n\t\t\t\tif (cand!=null) { candidates.add(cand); }\r\n\t\t\t\t\r\n\t\t\t\t/* 3 - search slope_out upper for connection with slope_in lower or mid-point (distance < 20m) (traverse direction from slope_in to slope_out)*/\r\n\t\t\t\tmidPointNeighbor = getMidPointCandidate(slope_out_endPoints[1], geom_in, midPointThreshold); //fetch midPoint neighbor if one exists, for upper slope_out endPoint\r\n\t\t\t\tcand = fetchEndpointCandidate(slope_out_endPoints[1], slope_in_endPoints[0], intersectionPoints, midPointNeighbor, new String [] { xml_gid_out, xml_gid_in, de_name}, true);\r\n\t\t\t\tif (cand!=null) { candidates.add(cand); }\r\n\t\t\t\t\r\n\t\t\t\t/* 4 - search slope_out lower for connection with slope_in upper or mid-point (distance < 20m) (traverse direction from slope_out to slope_in) */\r\n\t\t\t\tmidPointNeighbor = getMidPointCandidate(slope_out_endPoints[0], geom_in, this.midPointThreshold);\t//fetch midPoint neighbor if one exists, for lower endPoint\r\n\t\t\t\tcand = fetchEndpointCandidate(slope_out_endPoints[0], slope_in_endPoints[1], intersectionPoints, midPointNeighbor, new String [] { xml_gid_out, xml_gid_in, de_name}, false);\r\n\t\t\t\tif (cand!=null) { candidates.add(cand);\t}\r\n\t\t\t\t\r\n\t\t\t\t/* 5 - No candidate links are found and slopes DO NOT INTERSECT, search for mid-point links*/\r\n\t\t\t\tif (candidates.size() == 0 && intersectionPoints == null) {\r\n\t\t\t\t\t//Fetch closest point between two geometries, that is within allowed threshold (10.50)\r\n\t\t\t\t\tif (DistanceOp.isWithinDistance(geom_in, geom_out, midPointThreshold)) {\r\n\t\t\t\t\t\t//fetch nearest points\r\n\t\t\t\t\t\tCoordinate[] nearestPoints = DistanceOp.nearestPoints(geom_in, geom_out);\r\n\t\t\t\t\t\tCoordinate nearestGeom_in = nearestPoints[0];\r\n\t\t\t\t\t\tCoordinate nearestGeom_out = nearestPoints[1];\r\n\t\t\t\t\t\t//fetch interpolated Z ordinate in case it is NaN\r\n\t\t\t\t\t\tnearestGeom_in = GeometryOperations.get3DLinePoint(nearestGeom_in, geom_in);\r\n\t\t\t\t\t\tnearestGeom_out = GeometryOperations.get3DLinePoint(nearestGeom_out, geom_out);\r\n\t\t\t\t\t\t//create and add mid-point candidate. Traverse direction has to be from highest to lowest point\r\n\t\t\t\t\t\tif (nearestGeom_in.z > nearestGeom_out.z) {\r\n\t\t\t\t\t\t\tcand = new Candidate(nearestGeom_in, nearestGeom_out, \"Slope2Slope\", xml_gid_in, xml_gid_out, de_name);\r\n\t\t\t\t\t\t\tcandidates.add(cand);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcand = new Candidate(nearestGeom_out, nearestGeom_in, \"Slope2Slope\", xml_gid_out, xml_gid_in, de_name);\r\n\t\t\t\t\t\t\tcandidates.add(cand);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//FINALLY add intersection points\r\n\t\t\t\tif (intersectionPoints != null && intersectionPoints.size() > 0) {\r\n\t\t\t\t\t//System.err.println(\"Still \" + intersectionPoints.size() + \" to add\");\r\n\t\t\t\t\tfor (Coordinate intersection: intersectionPoints) {\r\n\t\t\t\t\t\tcand = new Candidate(intersection, intersection, \"Intersection\", xml_gid_in, xml_gid_out, de_name);\r\n\t\t\t\t\t\tcandidates.add(cand);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcand = null; //reset candidate\r\n\t\t\t} \r\n\t\t}\r\n\r\n\t\t//Clean duplicate candidates in case some exist, candidates with different start and end features are needed for the final slope nodding\r\n\t\tcleanDuplicates(candidates);\r\n\t\t\t\r\n\t\t//********* METHOD END ****************\r\n\t\treturn candidates;\r\n\t}", "public Set<Point> getHitboxPoints() {\n Set<Point> hitboxPoints = new HashSet<>();\n\n for(Point p : relevantPoints)\n {\n int currX = (int)(p.x + xPos - (getWidth() / 2));\n int currY = (int)(p.y + yPos - (getHeight() / 2));\n\n hitboxPoints.add(new Point(currX, currY));\n }\n\n return hitboxPoints;\n }", "private void generatePointPairs() {\n\t\tfinal int mod = SIZE_OF_ORIGINAL_LIST * 8; \n\t\t\n\t\tif(DEBUG) System.out.println(\"----- Generating Point Pairs...\");\n\n\t\tint counter = 0;\n\t\tint j = 0;\n\t\t\n\t\tfor(int i = 0; i < myPoints.length; i++) {\n\t\t\t//while(j++ < myPoints.length) {\n\t\t\tfor( ; j < myPoints.length; j++) {\n\t\t\t\t// i and j are the same point, so ignore that pair.\n\t\t\t\tif(i != j) {\n\t\t\t\t\tmyPairs.add(new PointPair(myPoints[i], myPoints[j]));\n\t\t\t\t\tif(DEBUG && ++counter % mod == 0) System.out.print(\"pair \");\n\t\t\t\t}\n\t\t\t\t// Not yet colinear, just a unique pair to use later.\n\t\t\t}\n\n\t\t}\n\t\tif(DEBUG) System.out.println(\"\\n----- ----- \" + counter + \" pairs found.\\n\");\n\t}", "private List<Set<BitSet>> buildPFunction(boolean[][] table, boolean[] coveredMinterms) {\n\n\t\tList<Set<BitSet>> pFunction = new ArrayList<>();\n\n\t\tfor (int i = 0; i < coveredMinterms.length; i++) {\n\n\t\t\tSet<BitSet> currentColumn = new LinkedHashSet<>();\n\n\t\t\tfor (int j = 0; j < table.length; j++) {\n\n\t\t\t\tif (table[j][i] && !coveredMinterms[i]) {\n\t\t\t\t\tBitSet current = new BitSet();\n\t\t\t\t\tcurrent.set(j);\n\t\t\t\t\tcurrentColumn.add(current);\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (currentColumn.size() > 0) {\n\t\t\t\tpFunction.add(currentColumn);\n\t\t\t}\n\t\t}\n\t\treturn pFunction;\n\t}", "public int[] findAnyPairIndexesWhileGCDMaximized() {\n if (seq.length < 2) {\n return null;\n }\n\n int g = -1;\n for (int i = m; i >= 1; i--) {\n if (cntOfMultiple[i] >= 2) {\n g = i;\n break;\n }\n }\n\n IntegerArrayList ans = new IntegerArrayList(2);\n for (int i = 0; i < seq.length && ans.size() < 2; i++) {\n if (seq[i] % g == 0) {\n ans.add(i);\n }\n }\n return ans.toArray();\n }", "public List<Point2D> getControlPoints();", "public void buildPointPetriNet(){\n\t\tcreatePlace(pnet, \"int\", 3);\n\t\tcreatePlace(pnet, \"Point\", 2);\n\t\tcreatePlace(pnet, \"MyPoint\", 2);\n\t\tcreatePlace(pnet, \"void\", 2);\n\t\t\n\t\t// Create transitions for the petri-net\n\t\tpnet.createTransition(\"int<-getX(Point)\");\n\t\tpnet.createTransition(\"int<-getY(Point)\");\n\t\tpnet.createTransition(\"void<-setX(Point,int)\");\n\t\tpnet.createTransition(\"void<-setY(Point,int)\");\n\t\tpnet.createTransition(\"Point<-Point(void)\");\n\t\t\n\t\tpnet.createTransition(\"int<-getX(MyPoint)\");\n\t\tpnet.createTransition(\"int<-getY(MyPoint)\");\n\t\tpnet.createTransition(\"MyPoint<-MyPoint(int,int)\");\n\t\t\n\t\t// Create clone transitions for the petri-net\n\t\tpnet.createTransition(\"int<-clone(int)\");\n\t\tpnet.createTransition(\"Point<-clone(Point)\");\n\t\tpnet.createTransition(\"MyPoint<-clone(MyPoint)\");\n\t\tpnet.createTransition(\"void<-clone(void)\");\n\t\t\n\t\t// Create flows for the petri-net\n\t\tpnet.createFlow(\"Point\",\"int<-getX(Point)\",1);\n\t\tpnet.createFlow(\"int<-getX(Point)\",\"int\",1);\n\t\tpnet.createFlow(\"Point\",\"int<-getY(Point)\",1);\n\t\tpnet.createFlow(\"int<-getY(Point)\",\"int\",1);\n\t\tpnet.createFlow(\"Point\",\"void<-setX(Point,int)\",1);\n\t\tpnet.createFlow(\"int\",\"void<-setX(Point,int)\",1);\n\t\tpnet.createFlow(\"void<-setX(Point,int)\",\"void\",1);\n\t\tpnet.createFlow(\"Point\",\"void<-setY(Point,int)\",1);\n\t\tpnet.createFlow(\"int\",\"void<-setY(Point,int)\",1);\n\t\tpnet.createFlow(\"void<-setY(Point,int)\",\"void\",1);\n\t\tpnet.createFlow(\"void\",\"Point<-Point(void)\",1);\n\t\tpnet.createFlow(\"Point<-Point(void)\",\"Point\",1);\n\t\t\n\t\tpnet.createFlow(\"MyPoint\",\"int<-getX(MyPoint)\",1);\n\t\tpnet.createFlow(\"int<-getX(MyPoint)\",\"int\",1);\n\t\tpnet.createFlow(\"MyPoint\",\"int<-getY(MyPoint)\",1);\n\t\tpnet.createFlow(\"int<-getY(MyPoint)\",\"int\",1);\n\t\tpnet.createFlow(\"int\",\"MyPoint<-MyPoint(int,int)\",2);\n\t\tpnet.createFlow(\"MyPoint<-MyPoint(int,int)\",\"MyPoint\",1);\n\t\t\n\t\t// Create flows for the clone edges\n\t\tpnet.createFlow(\"int\",\"int<-clone(int)\",1);\n\t\tpnet.createFlow(\"int<-clone(int)\",\"int\",2);\n\t\tpnet.createFlow(\"Point\",\"Point<-clone(Point)\",1);\n\t\tpnet.createFlow(\"Point<-clone(Point)\",\"Point\",2);\n\t\tpnet.createFlow(\"MyPoint\",\"MyPoint<-clone(MyPoint)\",1);\n\t\tpnet.createFlow(\"MyPoint<-clone(MyPoint)\",\"MyPoint\",2);\n\t\tpnet.createFlow(\"void\",\"void<-clone(void)\",1);\n\t\tpnet.createFlow(\"void<-clone(void)\",\"void\",2);\n\t\t\n\t}", "public static void main(String[] args) {\n\tArrayList<Integer[]> chunks = new ArrayList<Integer[]>();\n\t\t\n\t\tfor(int x = -128; x<=128; x++){\n\t\t\t\n\t\t\tfor (int z = -128; z<=128; z++){\n\t\t\t\t\n\t\t\t\tif(x*x + z*z < 128*128){\n\t\t\t\t\t/*\n\t\t\t\t\t * Makes sure that there is no duplicate.\n\t\t\t\t\t */\n\t\t\t\t\tif(!HasChunks(new Integer[] {(int) x/ 16, (int) z/16}, chunks)){\n\t\t\t\t\t\t\n\t\t\t\t\t\tchunks.add(new Integer[] {(int) x/ 16, (int) z/16});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t/*\n\t\t * The programm testd many chunks with many seeds in order to try to find the good location.\n\t\t */\n\t\tfor(long seed = 32000; seed<1000000L; seed++){\n\t\t \n\t\t\t//from chunk(-100;-100) to chunk(100;100) which is 4.10^4 chunks^2.seed^-1\n\t\t\tfor(int cx = -100; cx<=100; cx++){\n\t\t\t\tfor (int cz = -100; cz<=100; cz++){\n\t\t\t\n\t\t\t\t\tboolean flag = true;\n\t\t\t\t\t\t//browse the chunks which are in the 8chunk circle radius.\n\t\t\t\t\t\tfor(Integer[] ch: chunks){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(isSlimeChunk(seed, cx+ch[0], cz+ch[1])){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//no chunks contains slimechunks --> good location, we need to output the result.\n\t\t\t\t\t\tif(flag){\n\t\t\t\t\t\tSystem.out.println(\"Seed=\"+String.valueOf(seed)+\" ,ChunkX=\"+cx+\" ,ChunkZ\"+cz);\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}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static Set<Set<Polyomino>> tilings(ArrayList<Polyomino> polyominos_list,Polyomino P, boolean use_all_once, boolean rotations, boolean reflections) {\r\n\t\t\r\n\t\tHashMap<Integer, Square> hmap_P = new HashMap<Integer, Square>();\r\n\t\tSet<Integer> X= new HashSet<Integer>();\r\n\t\tSet<Set<Integer>> C= new HashSet<Set<Integer>>();\t\r\n\t\tSet<Set<Polyomino>> tilings = new HashSet<Set<Polyomino>>();\r\n\t\t\r\n\t\tif (use_all_once) {//quick check to see if there is a tiling of P using each tile exactly once: ( sum of area(tile) ) == area(P)\r\n\t\t\tint total_area=0;\r\n\t\t\tfor (Polyomino q: polyominos_list) total_area+=q.area;\r\n\t\t\tif (!(total_area==P.area)) return tilings;\r\n\t\t}\r\n\t\t\t\t\t\r\n\t\t//index squares of P\r\n\t\tfor (int i=0; i<P.vertices.size();i++) {\r\n\t\t\thmap_P.put(i+1,P.vertices.get(i));\r\n\t\t\tX.add(i+1);\r\n\t\t}\r\n\t\tif (use_all_once) {//we add extra elements to the ground set to ensure each polyomino is used exactly once\r\n\t\t\tfor (int j=0;j<polyominos_list.size();j++) {\r\n\t\t\t\tX.add(P.vertices.size()+j+1);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t//we now define C\r\n\t\t//if A= set of (fixed/one-sided/free) polyominos of area n\r\n\t\t//C= union over Q in A of union of S subset of X corresponding to indices of squares of P covered by some translate of Q\r\n\t\t//to generate C, we iterate over the polyominos Q in A and we see, for each possible translation of Q,\r\n\t\t//if Q fits in P, in which case we record the indices of the squares of P it covers\r\n\t\t\r\n\t\tfor (int k=0; k<polyominos_list.size();k++) {\r\n\t\t\tPolyomino tile=polyominos_list.get(k);\r\n\t\t\t\r\n\t\t\tArrayList<Polyomino> orientations_of_tile=new ArrayList<Polyomino>();\r\n\t\t\tif (rotations && reflections) orientations_of_tile=tile.distinct_symmetries();\r\n\t\t\telse if (rotations) orientations_of_tile=tile.rotations();\r\n\t\t\telse if (reflections) orientations_of_tile=tile.reflections();\r\n\t\t\telse orientations_of_tile.add(tile);//if no rotations, the only possible orientation is the tile as it was given\r\n\t\t\r\n\t\t\tfor (Polyomino Q: orientations_of_tile) {\r\n\t\t\t\t//for each VALID translation of Q, we calculate the indices of squares of P which Q occupies, and add this to C\r\n\t\t\t\t//we choose some square of Q, which we will \"nail\" to the squares of P and see if Q fits in in P in that position\r\n\t\t\t\tSquare nail = Q.vertices.get(0);\r\n\t\t\t\tfor (Square s: P.vertices) {\r\n\t\t\t\t Set<Integer> indices_Q_translated= new HashSet<Integer>();\r\n\t\t\t\t boolean Q_fits_inP=true;\r\n\t\t\t\t\tfor (Square q: Q.vertices) {//lets check if this translation of Q fits in P\r\n\t\t\t\t\t\tSquare translated_q=new Square (q.x+s\r\n\t\t\t\t\t\t\t\t.x-nail.x,q.y+s.y-nail.y);\r\n\t\t\t\t\t\tif (!P.contains(translated_q)) {//check if square translated_q fits is in P\r\n\t\t\t\t\t\t\tQ_fits_inP=false;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\thmap_P.forEach((key, value) -> {//get index of square translated_q\r\n\t\t\t\t\t\t if (value.equals(translated_q)) {\r\n\t\t\t\t\t\t \tindices_Q_translated.add(key);\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (Q_fits_inP) {\r\n\t\t\t\t\t\t//we add an element which corresponds to putting a one in a dummy column in the exact cover matrix\r\n\t\t\t\t\t\tif (use_all_once) indices_Q_translated.add(k+P.vertices.size()+1); \r\n\t\t\t\t\t\tC.add(indices_Q_translated);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Initialization step complete, with complexity at least |polyominos_list|*4*area(P)*area(Q)*area(P)\r\n\t\t\r\n\t\tif(!(C.size()==0)) {\r\n\t\t\t\r\n\t\t\tint[][] M=Exact_cover.sets_to_matrix(X,C);\r\n\t\t\r\n\t\t\t//we add n columns (initialized to all zeros) to M where n=polyominos_list.size().\r\n\t\t\t//Each row of M corresponds to some translation of a polyomino Pk in polyominos_list-{P1,...,Pn}\r\n\t\t\t//in a such a row we place a 1 in the column k\r\n\t\t\t//any exact cover of M must then use each Pk exactly once \r\n\r\n\t\t\tDancingLinks dl = new DancingLinks(M);\r\n\t\t\tSet<Set<data_object>> exact_covers_data_objects=dl.exactCover(dl.master_header);\r\n\t\t\t\r\n\t\t\tfor (Set<data_object> cover_data_objects: exact_covers_data_objects) {\r\n\t\t\t\t\r\n\t\t\t\tSet<Set<Integer>> cover_sets=new HashSet<Set<Integer>>();\r\n\t\t\t\tfor (data_object t: cover_data_objects) cover_sets.add(dl.set_of_row.get(t.row_id));\r\n\t\t\t\t\r\n\t\t\t\tSet<Polyomino> T = new HashSet<Polyomino>();//a tiling, i.e a set of polyominos\r\n\t\t\t\t\r\n\t\t\t\tfor (Set<Integer> indices: cover_sets) {\r\n\t\t\t\t\tArrayList<Square> vertices= new ArrayList<Square>();\r\n\t\t\t\t\t//convert indices to corresponding squares of P, \r\n\t\t\t\t\t//and add the corresponding Polyomino R to T\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (int index: indices) {\r\n\t\t\t\t\t\tif (index<P.vertices.size()+1) {//if not a dummy index (in the case of use_all_once polyominos)\r\n\t\t\t\t\t\t\tvertices.add(hmap_P.get(index));\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\tT.add(new Polyomino(vertices,\"R\"));\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\ttilings.add(T);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn tilings;\r\n\t}", "Collection<P> getPointsOfInterest ();", "private void restrictClasses() {\n\t\tSet<String> classes = classMap.keySet();\n\t\tSet<String> intersect;\n\t\tfor (String s : disjointsInfo.keySet()) {\n\t\t\tintersect = disjointsInfo.get(s);\n\t\t\tintersect.retainAll(classes);\n\t\t\tdisjointsInfo.put(s, intersect);\n\t\t}\n\t\tfor (String s : supersInfo.keySet()) {\n\t\t\tintersect = supersInfo.get(s);\n\t\t\tintersect.retainAll(classes);\n\t\t\tsupersInfo.put(s, intersect);\n\t\t}\n\t}", "private List<Pair<MyNode, MyNode>> generateMex(List<MyNode> nodes){\r\n\r\n\t\t//Sanity check\r\n\t\tif (numMex <= 0){\r\n\t\t\treturn new ArrayList<Pair<MyNode, MyNode>>();\r\n\t\t}\r\n\r\n\t\t//Generate all possible mutual exclusion constraints. \r\n\t\tList<Pair<MyNode, MyNode>> result = new ArrayList<Pair<MyNode, MyNode>>();\r\n\t\tfor (int idxA = 0; idxA < nodes.size(); idxA++){\r\n\t\t\tfor (int idxB = idxA+1; idxB < nodes.size(); idxB++){\r\n\t\t\t\tPair<MyNode, MyNode> mex = new Pair<MyNode, MyNode>(nodes.get(idxA), nodes.get(idxB));\r\n\t\t\t\tresult.add(mex);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Shuffle the result list for random order.\r\n\t\tCollections.shuffle(result, random);\r\n\r\n\t\t//Repeatedly remove constraints from the list until we reach the numMex size.\r\n\t\twhile (result.size() > numMex){\r\n\t\t\tresult.remove(random.nextInt(result.size()));\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}", "private int[] mutationPairwiseExchange(int[] mutant) {\n\t\tint pairPoint1 = rand.nextInt(mutant.length);\n\t\tint pairPoint2 = pairPoint1;\n\t\twhile (mutant[pairPoint2] == mutant[pairPoint1]) {\n\t\t\tpairPoint2 = rand.nextInt(mutant.length); //find element in different bucket\n\t\t}\n\t\tint temp = mutant[pairPoint1];\n\t\tmutant[pairPoint1] = mutant[pairPoint2];\n\t\tmutant[pairPoint2] = temp;\n\t\treturn mutant;\n\t}", "private List<Entity> getToTeleport(boolean sameDimension) {\n return level == null || teleportBounds == null ? Collections.emptyList() : level.getEntitiesOfClass(Entity.class, teleportBounds,\n entity -> !entity.isSpectator() && !entity.isPassenger() && !(entity instanceof PartEntity) &&\n (sameDimension || entity.canChangeDimensions()) && !didTeleport.contains(entity.getUUID()));\n }", "public abstract int[] getCoords();", "List<Coord> allActiveCells();", "public Object[] charClassParams() {\n\t\treturn new Object[] {\n\t\t\t// simple char classes\n\t\t\tnew Object[] {\"[a+]\", \"aa+\",\n\t\t\t\tnew String[]{\"a\", \"a\", \"+\"}},\n\t\t\tnew Object[] {\"[+a]\", \"aa+\",\n\t\t\t\tnew String[]{\"a\", \"a\", \"+\"}},\n\t\t\tnew Object[] {\"[\\\\Q].]\\\\E]\", \"]a].]\",\n\t\t\t\tnew String[] {\"]\", \"]\", \".\", \"]\"}},\n\t\t\tnew Object[] {\"[a]\", \"aAaa\",\n\t\t\t\tnew String[] {\"a\", \"a\", \"a\"}},\n\t\t\tnew Object[] {\"[aca]\", \"acab\",\n\t\t\t\tnew String[] {\"a\", \"c\", \"a\"}},\n\t\t\tnew Object[] {\"[abc]\", \"[abc] ABc\",\n\t\t\t\tnew String[] {\"a\", \"b\", \"c\", \"c\"}},\n\t\t\tnew Object[] {\"\\\\[abc]\", \"[abc]abc\",\n\t\t\t\tnew String[] {\"[abc]\"}},\n\t\t\tnew Object[] {\"[\\\\t\\\\041]\", \"\\t\\041\\\\t041\",\n\t\t\t\tnew String[] {\"\\t\", \"\\041\"}},\n\t\t\tnew Object[] {\"\\\\[ab]\", \"\\\\[ab] a b []\",\n\t\t\t\tnew String[] {\"[ab]\"}},\n\t\t\tnew Object[] {\"gr[ae]y\", \"graey gray grey\",\n\t\t\t\tnew String[] {\"gray\", \"grey\"}},\n\t\t\tnew Object[] {\"li[cs]en[cs]e\", \"license lisence licence lisense licsencse\",\n\t\t\t\tnew String[] {\"license\", \"lisence\", \"licence\", \"lisense\"}},\n\t\t\tnew Object[] {\"[a\\\\\\\\]\", \"a\\\\\\\\\",\n\t\t\t\tnew String[] {\"a\", \"\\\\\", \"\\\\\"}},\n\t\t\tnew Object[] {\"[ab[cd]]\", \"[ab[cd]]\",\n\t\t\t\tnew String[] {\"a\", \"b\", \"c\", \"d\"}},\n\t\t\tnew Object[] {\"[[a]]\", \"[[a]]aa\",\n\t\t\t\tnew String[] {\"a\", \"a\", \"a\"}},\n\t\t\tnew Object[] {\"[+*]\", \"[*]\",\n\t\t\t\tnew String[] {\"*\"}},\n\t\t\tnew Object[] {\"[]x]\", \"[]x]\",\n\t\t\t\tnew String[] {\"]\", \"x\", \"]\"}},\n\t\t\t// char class with ranges\n\t\t\tnew Object[] {\"[0-9]\", \"0 3 [0-9] a2b2\",\n\t\t\t\tnew String[] {\"0\", \"3\", \"0\", \"9\", \"2\", \"2\"}},\n\t\t\tnew Object[] {\"[b-g]\", \"abggfbzg\",\n\t\t\t\tnew String[] {\"b\", \"g\", \"g\", \"f\", \"b\", \"g\"}},\n\t\t\tnew Object[] {\"[\\\\x59-{]\", \"aT\\u0058{Y|\",\n\t\t\t\tnew String[] {\"a\", \"{\", \"Y\"}},\n\t\t\tnew Object[] {\"[ag-iz]\", \"azbgkhiz\",\n\t\t\t\tnew String[] {\"a\", \"z\", \"g\", \"h\", \"i\", \"z\"}},\n\t\t\tnew Object[] {\"[a\\\\-d]\", \"[a\\\\-d]abcd\",\n\t\t\t\tnew String[] {\"a\", \"-\", \"d\", \"a\", \"d\"}},\n\t\t\tnew Object[] {\"[a\\\\\\\\-a]\", \"[a\\\\\\\\-a]`\",\n\t\t\t\tnew String[] {\"a\", \"\\\\\", \"\\\\\", \"a\", \"]\", \"`\"}},\n\t\t\tnew Object[] {\"[-x]\", \"zyx[-x]\",\n\t\t\t\tnew String[] {\"x\", \"-\", \"x\"}},\n\t\t\tnew Object[] {\"[\\\\\\\\-]\", \"\\\\-[]\",\n\t\t\t\tnew String[] {\"\\\\\", \"-\"}},\n\t\t\tnew Object[] {\"[0-9a-fxA-FX]\", \"X039Afgx\",\n\t\t\t\tnew String[] {\"X\", \"0\", \"3\", \"9\", \"A\", \"f\", \"x\"}},\n\t\t\tnew Object[] {\"[+--]\", \"+'-\",\n\t\t\t\tnew String[] {\"+\", \"-\"}},\n\t\t\tnew Object[] {\"a-c]\", \"abc-a-c]\",\n\t\t\t\tnew String[] {\"a-c]\"}},\n\t\t\tnew Object[] {\"[-^]\", \"[^-]\",\n\t\t\t\tnew String[] {\"^\", \"-\"}},\n\t\t\tnew Object[] {\"[a\\\\Q-\\\\Ed]\", \"[a\\\\Q-\\\\Ed]abcd\",\n\t\t\t\tnew String[] {\"a\", \"-\", \"d\", \"a\", \"d\"}},\n\t\t\tnew Object[] {\"-\", \"---\", \n\t\t\t\tnew String[] {\"-\", \"-\", \"-\"}},\n\t\t\tnew Object[] {\"---\", \"---\",\n\t\t\t\tnew String[] {\"---\"}},\n\t\t\tnew Object[] {\"[6-]\", \"ab-66\",\n\t\t\t\tnew String[] {\"-\", \"6\", \"6\"}},\n\t\t\tnew Object[] {\"[c-a]\", \"a-abc\", \n\t\t\t\tnew String[] {\"a\", \"-\", \"a\", \"c\"}},\n\t\t\tnew Object[] {\"[a-f][^a-f]\", \"afgb\",\n\t\t\t\tnew String[] {\"fg\"}},\n\t\t\t// char class with negation\n\t\t\tnew Object[] {\"[^abc]\", \"[^abc] dcabB^\",\n\t\t\t\tnew String[] {\"[\", \"^\", \"]\", \" \", \"d\", \"B\", \"^\"}},\n\t\t\tnew Object[] {\"a[^A]a\", \"AaaAaaa a a\",\n\t\t\t\tnew String[] {\"aaa\", \"a a\"}},\n\t\t\tnew Object[] {\"[^zz]\", \"\\t\\n \",\n\t\t\t\tnew String[] {\"\\t\", \"\\n\", \" \"}},\n\t\t\tnew Object[] {\"[^x-z]\", \"azbcxy\",\n\t\t\t\tnew String[] {\"a\", \"b\", \"c\"}},\n\t\t\tnew Object[] {\"[^ad-z]\", \"abgIC\",\n\t\t\t\tnew String[] {\"b\", \"I\", \"C\"}},\n\t\t\tnew Object[] {\"[\\\\^0-9]\", \"[\\\\^0-9]a^b\",\n\t\t\t\tnew String[] {\"^\", \"0\", \"9\", \"^\"}},\n\t\t\tnew Object[] {\"[\\\\Q^ab\\\\Ec+]\", \"\\\\Q^ab\\\\Ec+c+\",\n\t\t\t\tnew String[] {\"^\", \"a\", \"b\", \"c\", \"+\", \"c\", \"+\"}},\n\t\t\tnew Object[] {\"[\\\\^-`]\", \"[\\\\^-`]^^_ab\",\n\t\t\t\tnew String[] {\"^\", \"`\", \"^\", \"^\", \"_\"}},\n\t\t\tnew Object[] {\"[]-^]\", \"[]-^], _abc\",\n\t\t\t\tnew String[] {\"]\", \"^\", \"]\"}},\n\t\t\tnew Object[] {\"[a^-a]\", \"[a^-a]_\",\n\t\t\t\tnew String[] {\"a\", \"^\", \"a\", \"_\"}},\n\t\t\tnew Object[] {\"[^^]\", \"^^^^\",\n\t\t\t\tnew String[] {}},\n\t\t\tnew Object[] {\"[x^]\", \"[x^]xyz`_\",\n\t\t\t\tnew String[] {\"x\", \"^\", \"x\"}},\n\t\t\tnew Object[] {\"[^]x^]\", \"[^]x]\",\n\t\t\t\tnew String[] {\"[\"}},\n\t\t\tnew Object[] {\"[^-x][^x-]\", \"-a8\\tbx\",\n\t\t\t\tnew String[] {\"a8\", \"\\tb\"}},\n\t\t\tnew Object[] {\"[^[^ab]]\", \"abcz[^]0a\\nb\",\n\t\t\t\tnew String[] {\"a\", \"b\", \"a\", \"b\"}},\n\t\t\tnew Object[] {\"q[^u]\", \"qu q q\",\n\t\t\t\tnew String[] {\"q \"}},\n\t\t\tnew Object[] {\"[^\\\\0101]\\\\0101\", \"A\\\\AB\",\n\t\t\t\tnew String[] {\"\\\\A\"}},\n\t\t\tnew Object[] {\"[ax]^[b-c]\", \"[x^cagxz]\",\n\t\t\t\tnew String[] {\"x^c\"}},\n\t\t\tnew Object[] {\"b[^c]\", \"bcbab\",\n\t\t\t\tnew String[] {\"ba\"}}\n\t\t};\n\t}", "public static ArrayList<XYCoord> findVisibleLocations(GameMap map, XYCoord origin, int range, boolean piercing)\n {\n ArrayList<XYCoord> locations = new ArrayList<XYCoord>();\n\n // Loop through all the valid x and y offsets, as dictated by the max range, and add valid spaces to our collection.\n for( int yOff = -range; yOff <= range; ++yOff )\n {\n for( int xOff = -range; xOff <= range; ++xOff )\n {\n int currentRange = Math.abs(xOff) + Math.abs(yOff);\n XYCoord coord = new XYCoord(origin.xCoord + xOff, origin.yCoord + yOff);\n if( currentRange <= range && map.isLocationValid(coord) )\n {\n // If we're adjacent, or we can see through cover, or it's *not* cover, we can see into it.\n if( piercing || !map.getEnvironment(coord).terrainType.isCover() )\n {\n // Add this location to the set.\n locations.add(coord);\n }\n }\n }\n }\n\n return locations;\n }", "private void generate () {\n\t\t\n\t\tArrayList<Integer[]> copyToCheck = new ArrayList<Integer[]> ();\n\t\tfor (int i = 0; i < Math.pow(size, 3); i++) { // Filling up the maze with blocks\n\t\t\tint x, y, z;\n\t\t\tx = i / (size * size); // Get the x, y, and z\n\t\t\ty = i % (size * size) / size;\n\t\t\tz = i % (size * size) % size;\n\t\t\t// spaces each block out by 1\n\t\t\tif (x%2 == 1 && y%2 == 1 && z%2 == 1) {\n\t\t\t\tmaze.add(new Block (x, y, z, ' ')); // 'w' means wall\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tmaze.add(new Block (x, y, z, 'w'));\n\t\t\t\tif (x > 0 && y > 0 && z > 0 && x < size-1 && y < size-1 && z < size-1) { // if the blocks are within the outer shell, add the blocks to the list of walls to check\n\t\t\t\t\tif (x%2+y%2+z%2 == 2)copyToCheck.add(new Integer[] {x, y, z});\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if (x > 0 && y > 0 && z > 0 && x < size-1 && y < size-1 && z < size-1) { // checks if the coordinates are within the smaller cube that is below the first layer.\n\t\t\t\t//copyToCheck.add(new Integer[] { x, y, z });\t// the Block coords left to check\n\t\t\t//}\n\t\t}\n\t\t\n\t\tint starty, startx, startz; // x, y and z of current block\n\t\tstartz = 0; // the starting block will be at z = 0 because that is the bottom-most layer\n\n\t\tstartx = ((int)(Math.random() * (size/2)))*2 + 1; \n\t\tstarty = ((int)(Math.random() * (size/2)))*2 + 1;\n\t\tstart = get(startx, starty, startz);\n\t\t\n\t\tint endx, endy, endz; // x, y and z of end block\n\t\tendx = ((int)(Math.random() * (size/2)))*2 + 1; \n\t\tendy = ((int)(Math.random() * (size/2)))*2 + 1;\n\t\tendz = size-1;\n\t\tend = get(endx, endy, endz);\n\t\t\n\t\tArrayList<Integer[]> toCheck;\n\t\tboolean removed = true;\n\t\twhile (removed) {\n\t\t\tremoved = false;\n\t\t\ttoCheck = new ArrayList<Integer[]> ();\n\t\t\tfor (Integer[] thing : copyToCheck) {\n\t\t\t\ttoCheck.add(thing);\n\t\t\t}\n\t\t\tCollections.shuffle(toCheck); // Randomizes the order of the list of coordinates to check.\n\t\t\tfor (Integer[] coords : toCheck) {\n\t\t\t\tBlock curr = get(coords[0], coords[1], coords[2]);\n\t\t\t\tArrayList<Block> neighbors = getAdj(curr);\n\t\t\t\tboolean isJoint = false;\n\t\t\t\t\tfor (int i = 0; i < neighbors.size() - 1 && !isJoint; i++) {\n\t\t\t\t\t\tfor (int j = i+1; j < neighbors.size(); j++) {\n\t\t\t\t\t\t\tif (neighbors.get(j).t == ' ')\n\t\t\t\t\t\t\t\tif (neighbors.get(i).tree == neighbors.get(j).tree) {\n\t\t\t\t\t\t\t\t\tisJoint = true;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (isJoint) { // Even if it doesn't matter too much, don't want to spend a bunch of time iterating through the stuff unless I have too.\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!isJoint) {\n\t\t\t\t\t\tremoved = true;\n\t\t\t\t\t\tcopyToCheck.remove(coords);\n\t\t\t\t\t\tjoin(curr); // Joins all of the sets, changes the type of the block.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\tArrayList<Block> t = new ArrayList<Block>();\n\t\tfor (int i = 0; i < 5*size; i++) {\n\t\t\tArrayList<Block> b = getWalls();\n\t\t\t\n\t\t\tint rand = (int)(Math.random()*b.size());\n\t\t\tint x = b.get(rand).x;\n\t\t\tint y = b.get(rand).y;\n\t\t\tint z = b.get(rand).z;\n\t\t\tset(x, y, z, new Trap (x, y, z));\n\t\t}\n\t\tstart.t = ' '; // sets the type of the start and end blocks\n\t\tend.t = 'e';\n\t}", "List memberClasses();", "public PossibleMove[] getPossibleMoves(Coordinate from);", "public List<Point> getPieces(Color pColor){\r\n List<Point> result = new LinkedList<>();\r\n Point pos = new Point();\r\n for (int i = 0; i < 8; i++){\r\n pos.setFirst(i);\r\n for (int j = 0; j < 8; j++){\r\n pos.setSecond(j);\r\n if((isBlack(pColor) && isBlack(pos)) || (isRed(pColor) && isRed(pos))){\r\n result.add(pos.clone());\r\n }\r\n }\r\n } \r\n return result;\r\n }", "public void testMethodInfo889() throws Exception {\n\t\tClassInfo var2788 = instantiateClassInfo431();\n\t\tList<ClassInfo> var2764 = Collections.emptyList();\n\t\tList<ParameterInfo> var2766 = Collections.emptyList();\n\t\tList<LocalVariableInfo> var2767 = Collections.emptyList();\n\t\tList<Operation> var2768 = Collections.emptyList();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tMethodInfo var2789 = new MethodInfo(var2788, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList());\n\t\tClassInfo var2765 = new ClassInfo(\"super\", false, null, var2764, null);\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tClassInfo var2771 = new ClassInfo(\"super\", false, var2765, var2764,\n\t\t\t\tnull);\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.getSetters();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2788.getSetters();\n\t\tvar2789.isSetter();\n\t\tvar2789.isSetter();\n\t}", "public static byte[] doTransform(ClassNode classNode) {\n for (Object aNode : classNode.methods) {\n MethodNode methodNode = (MethodNode) aNode;\n if (methodNode.name.equalsIgnoreCase(\"<init>\")) {\n\n InsnList instructionList = new InsnList();\n\n Iterator<AbstractInsnNode> insnNodes = methodNode.instructions.iterator();\n while (insnNodes.hasNext()) {\n AbstractInsnNode currentNode = insnNodes.next();\n instructionList.add(currentNode);\n if (currentNode.getOpcode() == Opcodes.INVOKESPECIAL) {\n instructionList.add(new VarInsnNode(Opcodes.ALOAD, 0));\n instructionList.add(new MethodInsnNode(Opcodes.INVOKESTATIC, \"net/redige/util/serviceapi/ServiceManager\", \"inject\", \"(Ljava/lang/Object;)V\"));\n }\n }\n methodNode.instructions.clear();\n methodNode.instructions.add(instructionList);\n }\n }\n\n //We are done now. so dump the class\n ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS | ClassWriter.COMPUTE_FRAMES);\n classNode.accept(cw);\n return cw.toByteArray();\n }", "public Point[] getPoints()\n {\n return getPointsForAlignment(this);\n }", "@CheckReturnValue\n static Set<Class<? extends Message>> inspect(Class<?> cls, Predicate<Method> predicate) {\n final ImmutableSet.Builder<Class<? extends Message>> builder = ImmutableSet.builder();\n\n for (Method method : cls.getDeclaredMethods()) {\n final boolean methodMatches = predicate.apply(method);\n if (methodMatches) {\n final Class<? extends Message> firstParamType = getFirstParamType(method);\n builder.add(firstParamType);\n }\n }\n\n return builder.build();\n }", "public static void main(String[] args) {\n Solution app = new Solution();\n System.out.println(app.getPermutation(4, 5));\n }", "public List<PuzzleInstance> generateInstance() {\n\n final String[] POSITION = {\"Up\", \"Down\", \"Left\", \"Right\"};// In this order\n List<PuzzleInstance> puzzleInstances = new ArrayList<>();\n\n for (String traverse : POSITION) {\n int tempI=-1, tempJ=-1;\n switch (traverse) {\n case \"Up\":\n tempI = row - 1; \n tempJ = coloum;\n break;\n case \"Down\":\n tempI = row + 1; \n tempJ = coloum;\n break;\n case \"Left\":\n tempI = row; \n tempJ = coloum - 1;\n break;\n case \"Right\":\n tempI = row; \n tempJ = coloum + 1;\n break;\n }\n \n if((tempI < 0 || tempJ <0)|| (tempI >= rowColoumSize || tempJ >=rowColoumSize )){\n System.out.println(\"Out of bound\");\n // skip it nothing to add in the list\n }else{\n final Integer[][] puzzleGenerator = cloneArray(puzzle); \n int temp = puzzleGenerator [tempI][tempJ];\n puzzleGenerator[tempI][tempJ] = 0;\n puzzleGenerator[row][coloum] = temp;\n \n PuzzleInstance puzzleInstance = new PuzzleInstance(cloneArray(puzzleGenerator),rowColoumSize,cost_of_path+1,traverse, this);\n puzzleInstances.add(puzzleInstance); \n }\n }\n\n return puzzleInstances;\n \n \n }", "private void scanAndCopyMethods() {\n int numMethods = copyShort();\n for (int i = 0; i < numMethods; i++) {\n scanAndCopyAccessFlags();\n copy(4); // name_index, descriptor_index\n int numAttributes = copyShort();\n for (int j = 0; j < numAttributes; j++) {\n // Look for \"Code\" attribute.\n int attrNameIdx = copyShort();\n if (cpIdxIsCode(attrNameIdx)) {\n processCodeAttribute();\n } else {\n copyRestOfAttribute();\n }\n }\n }\n }", "@Override\n public void getTileEntities(int blockID, Set<Pair<String, Class<? extends TileEntity>>> list)\n {\n\n }", "public List<ClassId> getThirdClasses() {\n\t\tList<ClassId> classes = new ArrayList<>();\r\n\r\n\t\t/*\r\n\t\t * classes.add(ClassId.EVAS_SAINT); classes.add(ClassId.SHILLIEN_TEMPLAR);\r\n\t\t * classes.add(ClassId.SPECTRAL_DANCER); classes.add(ClassId.GHOST_HUNTER);\r\n\t\t * \r\n\t\t * classes.add(ClassId.DREADNOUGHT); classes.add(ClassId.PHOENIX_KNIGHT);\r\n\t\t * classes.add(ClassId.HELL_KNIGHT);\r\n\t\t * \r\n\t\t * classes.add(ClassId.HIEROPHANT); classes.add(ClassId.EVAS_TEMPLAR);\r\n\t\t * classes.add(ClassId.SWORD_MUSE);\r\n\t\t * \r\n\t\t * classes.add(ClassId.DOOMCRYER); classes.add(ClassId.FORTUNE_SEEKER);\r\n\t\t * classes.add(ClassId.MAESTRO);\r\n\t\t */\r\n\r\n\t\t// classes.add(ClassId.ARCANA_LORD);\r\n\t\t// classes.add(ClassId.ELEMENTAL_MASTER);\r\n\t\t// classes.add(ClassId.SPECTRAL_MASTER);\r\n\t\t// classes.add(ClassId.SHILLIEN_SAINT);\r\n\r\n\t\tclasses.add(ClassId.SAGGITARIUS);\r\n\t\tclasses.add(ClassId.ARCHMAGE);\r\n\t\tclasses.add(ClassId.SOULTAKER);\r\n\t\tclasses.add(ClassId.MYSTIC_MUSE);\r\n\t\tclasses.add(ClassId.STORM_SCREAMER);\r\n\t\tclasses.add(ClassId.MOONLIGHT_SENTINEL);\r\n\t\tclasses.add(ClassId.GHOST_SENTINEL);\r\n\t\tclasses.add(ClassId.ADVENTURER);\r\n\t\tclasses.add(ClassId.WIND_RIDER);\r\n\t\tclasses.add(ClassId.DOMINATOR);\r\n\t\tclasses.add(ClassId.TITAN);\r\n\t\tclasses.add(ClassId.CARDINAL);\r\n\t\tclasses.add(ClassId.DUELIST);\r\n\r\n\t\tclasses.add(ClassId.GRAND_KHAVATARI);\r\n\r\n\t\treturn classes;\r\n\t}", "@DataProvider(name = \"allPairs\")\n public Object[][] allPairs() {\n final List<Object[]> tests = new ArrayList<>();\n\n for (final Allele ref : Arrays.asList(refA, refC, refG, refT)){\n for (final Allele alt : Arrays.asList(altA, altC, altG, altT)){\n if (!ref.getBaseString().equals(alt.getBaseString())){\n tests.add(new Object[]{ref, alt});\n }\n }\n }\n\n return tests.toArray(new Object[][]{});\n }", "public Queue<Point> getPoints() {\n\tQueue<Point> iter = new Queue<Point>();\n\tfor (Shape s : this.shapes) {\n\t for (Point p : s.getPoints())\n\t\titer.enqueue(p);\n\t}\n\n\treturn iter;\n }", "Set<V> targetOtherComponents() {\n\t\treturn new HashSet<V>();\n\t}", "public void testMethodInfo888() throws Exception {\n\t\tClassInfo var2785 = instantiateClassInfo430();\n\t\tFieldInfo var2786 = instantiateFieldInfo429();\n\t\tList<ClassInfo> var2764 = Collections.emptyList();\n\t\tList<ParameterInfo> var2766 = Collections.emptyList();\n\t\tList<LocalVariableInfo> var2767 = Collections.emptyList();\n\t\tList<Operation> var2768 = Collections.emptyList();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tMethodInfo var2787 = new MethodInfo(var2785, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList());\n\t\tClassInfo var2765 = new ClassInfo(\"super\", false, null, var2764, null);\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tClassInfo var2771 = new ClassInfo(\"super\", false, var2765, var2764,\n\t\t\t\tnull);\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.getSetters();\n\t\tvar2787.isSetter();\n\t\tvar2787.isSetter();\n\t}", "java.util.List<com.google.ads.googleads.v6.common.CpvBidSimulationPoint> \n getPointsList();", "private Point[] generateInstructions(){\n\t\tPoint[] movement = new Point[d];\n\t\tfor(int i = 0; i < d; i++){\n\t\t\tmovement[i] = new Point(dancers[i].next_pos.x-this.last_positions[i].x,dancers[i].next_pos.y-this.last_positions[i].y);\n\t\t\tif(movement[i].x * movement[i].x + movement[i].y * movement[i].y > 4){\n\t\t\t\tSystem.out.println(\"dancer \" + i + \" move too far\");\n\t\t\t\tSystem.out.println(\"soulmate: \" + dancers[i].soulmate);\n\t\t\t\tSystem.out.println(\"connected? \" + this.connected);\n\t\t\t\tmovement[i] = new Point(0,0);\n\t\t\t}\n\t\t}\n\t\treturn movement;\n\t}", "public Block[] getTestBlocks(Class<?> c, int[] indices, int arrayCursor) {\n\t\tassert c != null;\n\t\tassert indices != null;\n\t\t\n\t\tif (!plans.containsKey(c)) {\t//cache miss\n\t\t\tplans.put(c, new ClassUnderTest(c, MAX_PLAN_RECURSION));\n\t\t}\t\t\n\t\tClassUnderTest node = plans.get(c);\t\t\n\n\t\t/* Retrieve distinct selected plans from plan space */\n\t\tList<Block> res = new Vector<Block>();\n\t\tfor (int i=0; i+arrayCursor<indices.length && i<MAX_NR_TEST_METHS_PER_CLASS; i++) {\n\t\t\t\tres.add(node.getBlock(indices[i+arrayCursor]));\n\t\t}\n\t\treturn res.toArray(new Block[res.size()]);\n\t}", "public static Field[] getInstanceVariables(Class<?> cls) {\n List<Field> accum = new LinkedList<>();\n while (cls != null) {\n Field[] fields = cls.getDeclaredFields();\n for (Field field : fields) {\n if (!Modifier.isStatic(field.getModifiers())) {\n accum.add(field);\n }\n }\n cls = cls.getSuperclass();\n }\n Field[] retvalue = new Field[accum.size()];\n return accum.toArray(retvalue);\n }", "private static List<Point<Thread>> getPointList(Bundle a)\r\n/* 62: */ {\r\n/* 63:74 */ List<Point<Thread>> aa = new ArrayList(a.size());\r\n/* 64:75 */ for (Thread t : a) {\r\n/* 65:76 */ aa.add(new ThreadWithSimilarityDistance(t));\r\n/* 66: */ }\r\n/* 67:78 */ return aa;\r\n/* 68: */ }", "Set<E> getForwardNeighbors();", "public interface Program {\n\n\t/**\n\t * The name of the string class\n\t */\n\tpublic static final String STRING_CLASS = \"String\";\n\n\t/**\n\t * The name of the object class\n\t */\n\tpublic static final String OBJECT_CLASS = \"Object\";\n\n\t/**\n\t * Yields an unmodifiable view of all the methods and constructors that are part\n\t * of the program to analyze.\n\t * \n\t * @return the collection of method and constructors\n\t */\n\tCollection<MCodeMember> getAllCodeMembers();\n\n\t/**\n\t * Yields an unmodifiable view of all the methods and constructors that are part\n\t * of the program to analyze, excluding ones from the String and Object classes.\n\t * \n\t * @return the collection of method and constructors\n\t */\n\tCollection<MCodeMember> getAllSubmittedCodeMembers();\n}", "@Nullable U get(Iterable<T> codePoints);", "HashSet getGrantedClassNames(boolean andToPublic) throws HsqlException {\n\n IntValueHashMap rights;\n Object key;\n int right;\n Iterator i;\n\n rights = rightsMap;\n\n HashSet out = getGrantedClassNamesDirect();\n\n if (andToPublic && pubGrantee != null) {\n rights = pubGrantee.rightsMap;\n i = rights.keySet().iterator();\n\n while (i.hasNext()) {\n key = i.next();\n\n if (key instanceof String) {\n right = rights.get(key, 0);\n\n if (right == GranteeManager.ALL) {\n out.add(key);\n }\n }\n }\n }\n\n Grantee g;\n RoleManager rm = getRoleManager();\n Iterator it = getAllRoles().iterator();\n\n while (it.hasNext()) {\n out.addAll(\n ((Grantee) rm.getGrantee(\n (String) it.next())).getGrantedClassNamesDirect());\n }\n\n return out;\n }", "@Override\r\n default Vector3[] getPoints(int amount) {\r\n if (amount < 0) throw new IllegalArgumentException(\"amount < 0\");\r\n if (amount == 0) return new Vector3[0];\r\n if (amount == 1) return new Vector3[] {getOrigin()};\r\n if (amount == 2) return new Vector3[] {getOrigin(), getEnd()};\r\n\r\n int t = amount - 1, i = 0;\r\n Vector3[] result = new Vector3[amount];\r\n\r\n Iterator<Vector3> iter = intervalIterator(getLengthSquared() / t*t);\r\n while (iter.hasNext())\r\n result[i++] = iter.next();\r\n\r\n return result;\r\n }", "private static List<String> getJavasSourceCodeFiels(Map<String,Object> map){\r\n \t\t\r\n \t\t\r\n \t\tSystem.out.println(\"............\");\r\n \t\tLinkedList<String> list = new LinkedList<String>();\r\n \t\tfor(String key : map.keySet()){\r\n \t\t\tObject o = map.get(key);\r\n \r\n \t\t\t//package...\r\n \t\t\tif(o instanceof IPackageFragment){\r\n \t\t\t\t//System.out.println(\"Package --> \" + key);\r\n \t\t\t\tkey = key.substring(0,key.indexOf('[')).trim();\r\n \t\t\t\tkey = PACKAGE + \"(\" + key + \")\";\r\n \t\t\t\tlist.add(key);\r\n \t\t\t}\r\n \t\t\t//class...\r\n \t\t\tif(o instanceof ICompilationUnit){\r\n \t\t\t\t//System.out.println(\"Class --> \" + key);\r\n \t\t\t\tString classname = key.substring(0,key.indexOf('[')).trim();\r\n \t\t\t\tString packagename = key.substring(key.indexOf(PACKAGE),key.indexOf('\\n',key.indexOf(PACKAGE)));\r\n \t\t\t\tkey = CLASS_WITH_MEMBERS + \"(\" + packagename + \",\" + classname + \")\";\r\n \t\t\t\tlist.add(key);\r\n \t\t\t}//method\r\n \t\t\tif(o instanceof IMethod){\r\n \t\t\t\tSystem.out.println(\"Methode --> \" + key);\r\n \t\t\t\tkey = METHOD + \"(\" + getQueryFromMethod((IMethod)o) + \")\";\r\n \t\t\t\tlist.add(key);\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif(o instanceof IField){\r\n \t\t\t\tSystem.out.println(\"Attribut --> \" + key);\r\n \t\t\t\tkey = FIELD + \"(\" + getQueryFromField((IField)o) + \")\";\r\n \t\t\t\tlist.add(key);\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn list;\r\n \t\t\r\n \t\t\r\n \t\t/*\r\n \t\tfor(String key : map.keySet()){\r\n \t\t\tObject o = map.get(key);\r\n \t\t\t//if(o instanceof ISourceAttribute)\r\n \t\t\t\t//System.out.println(\"attribute\");\r\n \t\t\t//if(o instanceof ISourceMethod)\r\n \t\t\t\t//System.out.println(\"methode\");\r\n \t\t\tif(o instanceof IPackageFragment) \r\n \t\t\t\tSystem.out.println(\"Package\");\r\n \t\t\tif(o instanceof ICompilationUnit)\r\n \t\t\t\tSystem.out.println(\"sour code file\");\r\n \t\t\t\t\r\n \t\t\t//\"oldquery or class('voller packagename', klassenname)\"\r\n \t\t\t\t\r\n \t\t\t\t\r\n \t\t\tif(o instanceof IField)\r\n \t\t\t\tSystem.out.println(\"Attribut\");\r\n \t\t\tif(o instanceof IType)\r\n \t\t\t\tSystem.out.println(\"classe also class ... in einem file\");\r\n \t\t\tif(o instanceof IMethod)\r\n \t\t\t\tSystem.out.println(\"Methode\");\r\n \t\t\tif(o instanceof IPackageFragmentRoot) \r\n \t\t\t\tSystem.out.println(\"jar package / src Ordner\");\r\n \t\t\tif(o instanceof IProject)\r\n \t\t\t\tSystem.out.println(\"Projekt Ordner\");\r\n \t\t\tif(o instanceof IClassFile)\r\n \t\t\t\tSystem.out.println(\"ClassFile\");\r\n \t\t\tif(o instanceof IAdaptable) //trieft auch auf viele ander sachen zu\r\n \t\t\t\tSystem.out.println(\"Libaraycontainer\");\r\n \t\t\tif(o instanceof IFile)\r\n \t\t\t\tSystem.out.println(\"file\"); //je nach ausgewlter ansicht knnen file auch *.java datein sein\r\n \t\t\tif(o instanceof IFolder)\r\n \t\t\t\tSystem.out.println(\"folder\");\r\n \t\t\tSystem.out.println(o.getClass());\r\n \t\t\t\r\n \t\r\n \t\t}\r\n \t\treturn null;\r\n \t\t*/\r\n \t}", "private List<Individual<T>> selectIndividuals(Deme<T> deme) {\n return IntStream.range(0, tournamentSize).mapToObj(i -> selRandomOp.select(deme.getIndividuals()))\n .collect(Collectors.toList());\n }", "protected abstract void getAllUniformLocations();", "public static void main(String[] args) {\n Class clazz = ModifierDemo.InnerPrivateClass.class;\n\n int modifiers = clazz.getModifiers();\n System.out.println(modifiers);\n String name = clazz.getName();\n System.out.println(name);\n\n int modifiers1 = ModifierDemo.class.getModifiers();\n System.out.println(modifiers1);\n\n\n\n }", "public ArrayList<? extends Puzzle> getNeighbors();" ]
[ "0.5495744", "0.53275955", "0.52839947", "0.5100314", "0.49457952", "0.4879189", "0.4846819", "0.4846739", "0.48412973", "0.48225534", "0.47843298", "0.47245875", "0.46991572", "0.4677428", "0.46536854", "0.4651904", "0.46264514", "0.46229538", "0.46218038", "0.4601627", "0.4598168", "0.4575309", "0.4530861", "0.4517905", "0.45160946", "0.44934684", "0.44636545", "0.44618472", "0.44582215", "0.44496828", "0.4426268", "0.4418632", "0.4407512", "0.43938917", "0.43931875", "0.43863055", "0.43767706", "0.4373938", "0.43730348", "0.43723118", "0.43687436", "0.43627056", "0.43586448", "0.4356362", "0.4342052", "0.43324506", "0.43238235", "0.43084082", "0.430189", "0.4296161", "0.4294145", "0.42907006", "0.42634532", "0.42597848", "0.4256194", "0.42522818", "0.42479822", "0.42450967", "0.4232357", "0.42307472", "0.4229518", "0.42272326", "0.422055", "0.42141417", "0.4210227", "0.42085236", "0.42077684", "0.42061117", "0.42056894", "0.4203501", "0.419973", "0.41973233", "0.41957825", "0.4189572", "0.41885734", "0.418606", "0.4178993", "0.41760865", "0.41721743", "0.41675588", "0.41637954", "0.41631058", "0.4158631", "0.4157406", "0.41550323", "0.41509724", "0.41507107", "0.41497287", "0.41435936", "0.4143069", "0.41425663", "0.4139878", "0.41389894", "0.41364872", "0.4135799", "0.4135246", "0.41325912", "0.4130072", "0.41280884", "0.41273695" ]
0.627564
0
Mutate given bytecode to create mutants with given mutation points.
List<IMutantBytecode> mutate(byte[] bytecode, IMutationPoint mutationPoint);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<IMutationPoint> getMutationPoints(byte[] bytecode);", "private Mutater createMutater(int mutationpoint) {\n final Mutater m = new Mutater(mutationpoint);\n m.setIgnoredMethods(mExcludeMethods);\n m.setMutateIncrements(mIncrements);\n m.setMutateInlineConstants(mInlineConstants);\n m.setMutateReturnValues(mReturnVals);\n return m;\n }", "public interface IMutationOperator extends IDescriptable, Opcodes {\n\t/**\n\t * Gets all possible points in given class (bytecode) where different\n\t * mutants can be produced.\n\t *\n\t * @param bytecode bytecode to be analyzed\n\t * @return list of mutation points witihn given class (bytecode)\n\t */\n\tList<IMutationPoint> getMutationPoints(byte[] bytecode);\n\n\t/**\n\t * Mutate given bytecode to create mutants with given mutation points.\n\t *\n\t * @param bytecode bytecode to be mutated\n\t * @param mutationPoint mutation point in given class (bytecode)\n\t * @return list of mutants created within given point\n\t */\n\tList<IMutantBytecode> mutate(byte[] bytecode, IMutationPoint mutationPoint);\n\n\t/**\n\t * @param bytecode bytecode to be mutated\n\t * @param mutationPointIndex mutation point in given class (bytecode)\n\t * @param mutantIndex specific mutant index within given point\n\t * @return mutated bytecode - mutant\n\t */\n\tIMutantBytecode mutate(byte[] bytecode, int mutationPointIndex, int mutantIndex);\n}", "public void compileMutants() {\n\tif (classOp != null && classOp.length > 0) {\n\t Debug.println(\"* Compiling class mutants into bytecode\");\n\t MutationSystem.MUTANT_PATH = MutationSystem.CLASS_MUTANT_PATH;\n\t super.compileMutants();\n\t}\n }", "private void introduceMutations() {\n }", "private void generateMutants(BlockStmt blockStmt)\n {\n List<BlockStmt> targets = new ArrayList<>();\n blockStmt.walk(Node.TreeTraversal.BREADTHFIRST, n -> loadTargets(n, targets));\n if (targets.isEmpty())\n return;\n\n // Generate mutants\n for (BlockStmt t : targets)\n {\n generateMutant(blockStmt, t);\n }\n }", "@Override\n public void visitCode() {\n try {\n InstructionInjector injector = new InstructionInjector(mv);\n if (tileEntity) {\n injector.begin();\n injector.addThisObjectToStack();\n injector.addThisObjectToStack();\n injector.addInstanceVarToStack(info.className.replace(\".\", \"/\"), info.facingVar, info.varType);\n injector.addThisObjectToStack();\n injector.addStaticMethodCall(ASMHelper.class.getCanonicalName().replace(\".\", \"/\"), \"canMine\",\n new MethodDescriptor(\"boolean\", new String[] {\n TileEntity.class.getCanonicalName().replace(\".\", \"/\"),\n byte.class.getCanonicalName(),\n Object.class.getCanonicalName().replace(\".\", \"/\")\n }));\n Label l1 = injector.addIfNotEqual();\n injector.addReturn(info.desc.getReturnType(), l1);\n injector.end();\n } else {\n Map<String, Integer> indexes = info.desc.getParamIndexes(new String[] {\n EntityLivingBase.class.getCanonicalName().replace(\".\", \"/\"),\n \"XCOORD\",\n \"YCOORD\",\n \"ZCOORD\"\n });\n if(indexes.containsKey(\"XCOORD\") && indexes.containsKey(\"YCOORD\") && indexes.containsKey(\"ZCOORD\")) {\n // We can pass coordinates to use...\n injector.begin();\n injector.addLocalVarToStack(Object.class, indexes.get(EntityLivingBase.class.getCanonicalName().replace(\".\", \"/\")));\n injector.addLocalVarToStack(int.class, indexes.get(\"XCOORD\"));\n injector.addLocalVarToStack(int.class, indexes.get(\"YCOORD\"));\n injector.addLocalVarToStack(int.class, indexes.get(\"ZCOORD\"));\n injector.addThisObjectToStack();\n injector.addStaticMethodCall(ASMHelper.class.getCanonicalName().replace(\".\", \"/\"), \"canMine\",\n new MethodDescriptor(\"boolean\", new String[] {\n EntityLivingBase.class.getCanonicalName().replace(\".\", \"/\"),\n int.class.getCanonicalName(),\n int.class.getCanonicalName(),\n int.class.getCanonicalName(),\n Object.class.getCanonicalName().replace(\".\", \"/\")\n }));\n Label l1 = injector.addIfNotEqual();\n injector.addReturn(info.desc.getReturnType(), l1);\n injector.end();\n } else if(indexes.containsKey(EntityLivingBase.class.getCanonicalName().replace(\".\", \"/\"))) {\n // We'll have to figure out coordinates on our own based on where the player is looking...\n injector.begin();\n injector.addLocalVarToStack(Object.class, indexes.get(EntityLivingBase.class.getCanonicalName().replace(\".\", \"/\")));\n injector.addThisObjectToStack();\n injector.addStaticMethodCall(ASMHelper.class.getCanonicalName().replace(\".\", \"/\"), \"canMine\",\n new MethodDescriptor(\"boolean\", new String[] {\n EntityLivingBase.class.getCanonicalName().replace(\".\", \"/\"),\n Object.class.getCanonicalName().replace(\".\", \"/\")\n }));\n Label l1 = injector.addIfNotEqual();\n injector.addReturn(info.desc.getReturnType(), l1);\n injector.end();\n }\n }\n } catch (Throwable e) {\n FMLLog.log(\"Canine\", Level.WARN, \"%s\", \"Failed to find or patch class: \" + info.className);\n e.printStackTrace();\n }\n }", "private void mutateHelper() {\n\t\tsynchronized (this) {\n\t\t\tRandom rand = new Random();\n\t\t\tint mutateType = rand.nextInt(5);\n\t\t\tif (rules.size() >= 14) {\n\t\t\t\tmutateType = rand.nextInt(6);\n\t\t\t}\n\t\t\tint index = rand.nextInt(rules.size());\n\t\t\tMutation m = null;\n\t\t\tswitch (mutateType) {\n\t\t\tcase 0:\n\t\t\t\tm = MutationFactory.getDuplicate();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tm = MutationFactory.getInsert();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tm = MutationFactory.getRemove();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tm = MutationFactory.getReplace();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tm = MutationFactory.getSwap();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tm = MutationFactory.getTransform();\n\t\t\t\tm.addRules(rules.root);\n\t\t\t\tm.mutate(index);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void genMutants(ModifierList mod) {\r\n\t\tif (mod.contains(ModifierList.PRIVATE)) {\r\n\t\t\tchangeModifier(mod, ModifierList.PRIVATE, -1);\r\n\t\t\tchangeModifier(mod, ModifierList.PRIVATE, ModifierList.PROTECTED);\r\n\t\t\tchangeModifier(mod, ModifierList.PRIVATE, ModifierList.PUBLIC);\r\n\r\n\t\t} else if (mod.contains(ModifierList.PROTECTED)) {\r\n\t\t\tchangeModifier(mod, ModifierList.PROTECTED, -1);\r\n\t\t\tchangeModifier(mod, ModifierList.PROTECTED, ModifierList.PRIVATE);\r\n\t\t\tchangeModifier(mod, ModifierList.PROTECTED, ModifierList.PUBLIC);\r\n\t\t} else if (mod.contains(ModifierList.PUBLIC)) {\r\n\t\t\tchangeModifier(mod, ModifierList.PUBLIC, -1);\r\n\t\t\tchangeModifier(mod, ModifierList.PUBLIC, ModifierList.PRIVATE);\r\n\t\t\tchangeModifier(mod, ModifierList.PUBLIC, ModifierList.PROTECTED);\r\n\t\t} else { // Friendly\r\n\t\t\tchangeModifier(mod, -1, ModifierList.PRIVATE);\r\n\t\t\tchangeModifier(mod, -1, ModifierList.PROTECTED);\r\n\t\t\tchangeModifier(mod, -1, ModifierList.PUBLIC);\r\n\t\t}\r\n\t}", "void genMutants() {\n\tif (comp_unit == null) {\n\t System.err.println(original_file + \" is skipped.\");\n\t}\n\tClassDeclarationList cdecls = comp_unit.getClassDeclarations();\n\n\tif (cdecls == null || cdecls.size() == 0)\n\t return;\n\n\tif (classOp != null && classOp.length > 0) {\n\t Debug.println(\"* Generating class mutants\");\n\t MutationSystem.clearPreviousClassMutants();\n\t MutationSystem.MUTANT_PATH = MutationSystem.CLASS_MUTANT_PATH;\n\t CodeChangeLog.openLogFile();\n\t genClassMutants(cdecls);\n\t CodeChangeLog.closeLogFile();\n\t}\n }", "public void rewrite(IRCode code, DexEncodedMethod method) {\n ListIterator<BasicBlock> blocks = code.blocks.listIterator();\n while (blocks.hasNext()) {\n BasicBlock block = blocks.next();\n InstructionListIterator iterator = block.listIterator();\n while (iterator.hasNext()) {\n Instruction current = iterator.next();\n if (current.isInvokeCustom()) {\n InvokeCustom invokeCustom = current.asInvokeCustom();\n DexCallSite callSite = invokeCustom.getCallSite();\n DexMethodHandle newBootstrapMethod = rewriteDexMethodHandle(method,\n callSite.bootstrapMethod);\n List<DexValue> newArgs = callSite.bootstrapArgs.stream().map(\n (arg) -> {\n if (arg instanceof DexValueMethodHandle) {\n return new DexValueMethodHandle(\n rewriteDexMethodHandle(method, ((DexValueMethodHandle) arg).value));\n }\n return arg;\n })\n .collect(Collectors.toList());\n\n if (newBootstrapMethod != callSite.bootstrapMethod\n || !newArgs.equals(callSite.bootstrapArgs)) {\n DexCallSite newCallSite = appInfo.dexItemFactory.createCallSite(\n callSite.methodName, callSite.methodProto, newBootstrapMethod, newArgs);\n InvokeCustom newInvokeCustom = new InvokeCustom(newCallSite, invokeCustom.outValue(),\n invokeCustom.inValues());\n iterator.replaceCurrentInstruction(newInvokeCustom);\n }\n } else if (current.isInvokeMethod()) {\n InvokeMethod invoke = current.asInvokeMethod();\n DexMethod invokedMethod = invoke.getInvokedMethod();\n DexType invokedHolder = invokedMethod.getHolder();\n if (!invokedHolder.isClassType()) {\n continue;\n }\n DexMethod actualTarget = graphLense.lookupMethod(invokedMethod, method);\n Invoke.Type invokeType = getInvokeType(invoke, actualTarget, invokedMethod);\n if (actualTarget != invokedMethod || invoke.getType() != invokeType) {\n Invoke newInvoke = Invoke\n .create(invokeType, actualTarget, null,\n invoke.outValue(), invoke.inValues());\n iterator.replaceCurrentInstruction(newInvoke);\n // Fix up the return type if needed.\n if (actualTarget.proto.returnType != invokedMethod.proto.returnType\n && newInvoke.outValue() != null) {\n Value newValue = code.createValue(newInvoke.outType(), invoke.getDebugInfo());\n newInvoke.outValue().replaceUsers(newValue);\n CheckCast cast = new CheckCast(\n newValue,\n newInvoke.outValue(),\n graphLense.lookupType(invokedMethod.proto.returnType, method));\n iterator.add(cast);\n // If the current block has catch handlers split the check cast into its own block.\n if (newInvoke.getBlock().hasCatchHandlers()) {\n iterator.previous();\n iterator.split(1, code, blocks);\n }\n }\n }\n } else if (current.isInstanceGet()) {\n InstanceGet instanceGet = current.asInstanceGet();\n DexField field = instanceGet.getField();\n DexField actualField = graphLense.lookupField(field, method);\n if (actualField != field) {\n InstanceGet newInstanceGet =\n new InstanceGet(\n instanceGet.getType(), instanceGet.dest(), instanceGet.object(), actualField);\n iterator.replaceCurrentInstruction(newInstanceGet);\n }\n } else if (current.isInstancePut()) {\n InstancePut instancePut = current.asInstancePut();\n DexField field = instancePut.getField();\n DexField actualField = graphLense.lookupField(field, method);\n if (actualField != field) {\n InstancePut newInstancePut =\n new InstancePut(instancePut.getType(), instancePut.inValues(), actualField);\n iterator.replaceCurrentInstruction(newInstancePut);\n }\n } else if (current.isStaticGet()) {\n StaticGet staticGet = current.asStaticGet();\n DexField field = staticGet.getField();\n DexField actualField = graphLense.lookupField(field, method);\n if (actualField != field) {\n StaticGet newStaticGet =\n new StaticGet(staticGet.getType(), staticGet.dest(), actualField);\n iterator.replaceCurrentInstruction(newStaticGet);\n }\n } else if (current.isStaticPut()) {\n StaticPut staticPut = current.asStaticPut();\n DexField field = staticPut.getField();\n DexField actualField = graphLense.lookupField(field, method);\n if (actualField != field) {\n StaticPut newStaticPut =\n new StaticPut(staticPut.getType(), staticPut.inValue(), actualField);\n iterator.replaceCurrentInstruction(newStaticPut);\n }\n } else if (current.isCheckCast()) {\n CheckCast checkCast = current.asCheckCast();\n DexType newType = graphLense.lookupType(checkCast.getType(), method);\n if (newType != checkCast.getType()) {\n CheckCast newCheckCast =\n new CheckCast(makeOutValue(checkCast, code), checkCast.object(), newType);\n iterator.replaceCurrentInstruction(newCheckCast);\n }\n } else if (current.isConstClass()) {\n ConstClass constClass = current.asConstClass();\n DexType newType = graphLense.lookupType(constClass.getValue(), method);\n if (newType != constClass.getValue()) {\n ConstClass newConstClass = new ConstClass(makeOutValue(constClass, code), newType);\n iterator.replaceCurrentInstruction(newConstClass);\n }\n } else if (current.isInstanceOf()) {\n InstanceOf instanceOf = current.asInstanceOf();\n DexType newType = graphLense.lookupType(instanceOf.type(), method);\n if (newType != instanceOf.type()) {\n InstanceOf newInstanceOf = new InstanceOf(makeOutValue(instanceOf, code),\n instanceOf.value(), newType);\n iterator.replaceCurrentInstruction(newInstanceOf);\n }\n } else if (current.isInvokeNewArray()) {\n InvokeNewArray newArray = current.asInvokeNewArray();\n DexType newType = graphLense.lookupType(newArray.getArrayType(), method);\n if (newType != newArray.getArrayType()) {\n InvokeNewArray newNewArray = new InvokeNewArray(newType, makeOutValue(newArray, code),\n newArray.inValues());\n iterator.replaceCurrentInstruction(newNewArray);\n }\n } else if (current.isNewArrayEmpty()) {\n NewArrayEmpty newArrayEmpty = current.asNewArrayEmpty();\n DexType newType = graphLense.lookupType(newArrayEmpty.type, method);\n if (newType != newArrayEmpty.type) {\n NewArrayEmpty newNewArray = new NewArrayEmpty(makeOutValue(newArrayEmpty, code),\n newArrayEmpty.size(), newType);\n iterator.replaceCurrentInstruction(newNewArray);\n }\n }\n }\n }\n assert code.isConsistentSSA();\n }", "public abstract void mutate();", "private void instrumentCode(NodeTraversal traversal, Node block, String fnName) {\n block.addChildToFront(newInstrumentationNode(traversal, block, fnName));\n compiler.reportChangeToEnclosingScope(block);\n }", "private ASMInstrumenter() {\n insertMutationProbes = SmartSHARKAdapter.getInstance().getMutationsWithLines();\n\n /*\n insertMutationProbes.put(\"de.ugoe.cs.testproject.A.<init>\", new TreeSet<Integer>(){{add(2);}});\n insertMutationProbes.put(\"de.ugoe.cs.testproject.A.method1\", new TreeSet<Integer>(){{add(25); add(29);}});\n insertMutationProbes.put(\"de.ugoe.cs.testproject.A.method2\", new TreeSet<Integer>(){{add(44);}});\n insertMutationProbes.put(\"de.ugoe.cs.testproject.A.metho5\", new TreeSet<Integer>(){{add(59);}});\n insertMutationProbes.put(\"de.ugoe.cs.testproject.B.method1\", new TreeSet<Integer>(){{add(25);}});\n */\n //System.out.println(insertMutationProbes);\n }", "private void uniformMutation(){\n Random random = new Random();\n double newValue = random.nextGaussian()*16.6 + 50.0;\n if(newValue < 0) newValue = 0;\n if(newValue > 100) newValue = 100;\n int gene = random.nextInt(6);\n switch (gene){\n case 0 : this.x1 = newValue; break;\n case 1 : this.x2 = newValue; break;\n case 2 : this.x3 = newValue; break;\n case 3 : this.y1 = newValue; break;\n case 4 : this.y2 = newValue; break;\n case 5 : this.y3 = newValue; break;\n }\n }", "TACBlock optimise(TACBlock code);", "@Override\n\tvoid populateMethodImplBlock(Block block) {\n\t\tfinal DataConstructorExp newLocExp = new DataConstructorExp();\n\t\tnewLocExp.setConstructor(LOCATION_CONSTRUCTOR);\n\t\tfinal FnApp memExp = new FnApp();\n\t\tmemExp.setName(MEMORY_SELECTOR);\n\t\tmemExp.addParamNoTransform(arrayArg.getVarUse());\n\t\tnewLocExp.addParamNoTransform(memExp);\n\t\tfinal FnApp offsetExp = new FnApp();\n\t\toffsetExp.setName(OFFSET_SELECTOR);\n\t\toffsetExp.addParamNoTransform(arrayArg.getVarUse());\n\t\tnewLocExp.addParamNoTransform(new AddAddExp(offsetExp, new MultMultExp(sizeArg.getVarUse(), indexArg.getInnerExp())));\n\t\tfinal ReturnStmt returnStmt = new ReturnStmt();\n\t\treturnStmt.setRetExp(newLocExp);\n\t\tblock.addStmt(returnStmt);\n\t}", "public void setMutationMethod(Mutation m){\n mutationType = m;\n }", "@Override\n\t public Node apply(Node gen) {\n\t\t gen = gen.clone(null);\n\t\t int n = gen.weight();\n\t\t int m = (int)(Math.random()*n);\n\t\t Node mutate_node = gen.get(m);\n\t\t int x = (int)(Math.random()*codes.length);\n\t\t mutate_node.oper = codes[x];\n\t\t return gen;\n\t }", "@Override\n public Expression visit(MemberNode node) {\n Expression expression = transformExpression(node.getExpression());\n node.setInstance (expression);\n if (!node.getType().isFunction()) {\n Expression offset = ptrdiff(node.getOffset());\n Expression address = new Binary(ptr_t(), Op.ADD, expression, offset);\n return memory(address, node.getType());\n }\n else {\n java.lang.String typeName = node.getTypeName();\n Entity entity = ast.getTypeDefinition(typeName).getScope().get(node.getName());\n return ref (entity);\n }\n }", "public Snippet visit(MethodDeclaration n, Snippet argu) {\n\t\t Snippet _ret=null;\n\t\t\ttPlasmaCode = \"\";\n\t n.nodeToken.accept(this, argu);\n\t n.nodeToken1.accept(this, argu);\n\t Snippet f2 = n.returnType.accept(this, argu);\n\t String tempString = \"\";\n\t\t\tif(f2 != null){\n\t\t\t\t//System.out.println(\" \"+f2.expType+\" \"+f2.returnTemp);\n\t\t\t\ttempString = f2.expType.typeName;\n\t\t\t}else{\n\t\t\t\ttempString = \"void \";\n\t\t\t}\n\t Snippet f3 = n.identifier.accept(this, argu);\n\t String methodName = f3.expType.getTypeName();\n\t memberSig = new MethodSignature();\n\t\t\tmemberSig.methodName = methodName;\n\t\t\tcurrentMethod = currentClass.methods.get(methodName);\n\t\t\t\n\t\t\t\n\t\t\ttempCounter = tempZero;\n\t\t\tblockId = 1;\n\t\t\tcurrentBlock = 1;\n\t n.nodeToken2.accept(this, argu);\n\t Snippet f5 = n.nodeOptional.accept(this, argu);\n\t // n.nodeToken3.accept(this, argu);\n\t memberSig = null;\n\t\t\tblockId = 0;\n\t\t\tcurrentBlock = 0;\n\t\t\t\n\t\t\tString tempFormal = \"\";\n\t\t\tif(f5 != null){\n\t\t\t\ttempFormal = f5.returnTemp+\",\";\n\t\t\t}else{\n\t\t\t\ttempFormal = \"\";\n\t\t\t}\n\t\t\t\n\t\t\ttempString+=\" \"+methodName+\" \"+\"( \"+tempFormal+\" int myUniquePlacePoint)\";\n\t\t\t\n\t\t\ttPlasmaCode += \"public static \"+tempString+\"\\n\";\n\t\t\t//String placeCheckString = \"final HashMap<Integer, HashSet<Integer>> globalPointerHashMap = new final HashMap<Integer, HashSet<Integer>>(4)\";\n\t\t\t//placeCheckString += \"final int maxPlaces = 4; \\n for(int i =0; i <maxPlaces; ++i){globalPointerHashMap.put(i, new HashSet<Integer>());}\";\n\t\t\tn.block.accept(this, argu);\n\t currentClassBody.methods += tPlasmaCode;\n\t\t\ttPlasmaCode = \"\";\n\t return _ret;\n\t }", "private void genArgRepMutantGen(MethodCallExpr me,Expression ex,int pos){\n\n MethodCallExpr mutantMulti = me.clone();\n BinaryExpr binaryExpr2 = new BinaryExpr(ex,ex, BinaryExpr.Operator.MULTIPLY);\n mutantMulti.setArgument(pos,binaryExpr2);\n outputToFile(me,mutantMulti);\n }", "public static int createnumOfMutationss(){\n\t\tint totalMut = 0;\n\t\t\n\t\tint[] gen0 = new int[(int) Math.pow(2,0)]; //size of numOfMutations is based on exponential growth by generation number\n\t\t\tmutate(gen0); //function to mutate\n\t\t\ttotalMut = totalMut + totalMutations(gen0);\n\t\tint[] gen1 = new int[(int) Math.pow(2,1)];\n\t\t\tcheckMutations(gen0, gen1); //checks for previous generation mutations\n\t\t\tmutate(gen1);\n\t\t\ttotalMut = totalMut + totalMutations(gen1);\n\t\tint[] gen2 = new int[(int) Math.pow(2,2)];\n\t\t\tcheckMutations(gen1, gen2);\n\t\t\tmutate(gen2);\n\t\t\ttotalMut = totalMut + totalMutations(gen2);\n\t\tint[] gen3 = new int[(int) Math.pow(2,3)];\n\t\t\tcheckMutations(gen2, gen3);\n\t\t\tmutate(gen3);\n\t\t\ttotalMut = totalMut + totalMutations(gen3);\n\t\tint[] gen4 = new int[(int) Math.pow(2,4)];\n\t\t\tcheckMutations(gen3, gen4);\n\t\t\tmutate(gen4);\n\t\t\ttotalMut = totalMut + totalMutations(gen4);\n\t\tint[] gen5 = new int[(int) Math.pow(2,5)];\n\t\t\tcheckMutations(gen4, gen5);\n\t\t\tmutate(gen5);\n\t\t\ttotalMut = totalMut + totalMutations(gen5);\n\t\tint[] gen6 = new int[(int) Math.pow(2,6)];\n\t\t\tcheckMutations(gen5, gen6);\n\t\t\tmutate(gen6);\n\t\t\ttotalMut = totalMut + totalMutations(gen6);\n\t\tint[] gen7 = new int[(int) Math.pow(2,7)];\n\t\t\tcheckMutations(gen6, gen7);\n\t\t\tmutate(gen7);\n\t\t\ttotalMut = totalMut + totalMutations(gen7);\n\t\tint[] gen8 = new int[(int) Math.pow(2,8)];\n\t\t\tcheckMutations(gen7, gen8);\n\t\t\tmutate(gen8);\n\t\t\ttotalMut = totalMut + totalMutations(gen8);\n\t\tint[] gen9 = new int[(int) Math.pow(2,9)];\n\t\t\tcheckMutations(gen8, gen9);\n\t\t\tmutate(gen9);\n\t\t\ttotalMut = totalMut + totalMutations(gen9);\n\t\tint[] gen10 = new int[(int) Math.pow(2,10)];\n\t\t\tcheckMutations(gen9, gen10);\n\t\t\tmutate(gen10);\n\t\t\ttotalMut = totalMut + totalMutations(gen10);\n\t\t\t\n\t\t\treturn totalMut;\n\t\n\t}", "public static void generateCode()\n {\n \n }", "void genClassMutants2(ClassDeclarationList cdecls) {\n\tfor (int j = 0; j < cdecls.size(); ++j) {\n\t ClassDeclaration cdecl = cdecls.get(j);\n\t if (cdecl.getName().equals(MutationSystem.CLASS_NAME)) {\n\t\tDeclAnalyzer mutant_op;\n\n\t\tif (hasOperator(classOp, \"IHD\")) {\n\t\t Debug.println(\" Applying IHD ... ... \");\n\t\t mutant_op = new IHD(file_env, null, cdecl);\n\t\t generateMutant(mutant_op);\n\n\t\t if (((IHD) mutant_op).getTotal() > 0)\n\t\t\texistIHD = true;\n\t\t}\n\n\t\tif (hasOperator(classOp, \"IHI\")) {\n\t\t Debug.println(\" Applying IHI ... ... \");\n\t\t mutant_op = new IHI(file_env, null, cdecl);\n\t\t generateMutant(mutant_op);\n\t\t}\n\n\t\tif (hasOperator(classOp, \"IOD\")) {\n\t\t Debug.println(\" Applying IOD ... ... \");\n\t\t mutant_op = new IOD(file_env, null, cdecl);\n\t\t generateMutant(mutant_op);\n\t\t}\n\n\t\tif (hasOperator(classOp, \"OMR\")) {\n\t\t Debug.println(\" Applying OMR ... ... \");\n\t\t mutant_op = new OMR(file_env, null, cdecl);\n\t\t generateMutant(mutant_op);\n\t\t}\n\n\t\tif (hasOperator(classOp, \"OMD\")) {\n\t\t Debug.println(\" Applying OMD ... ... \");\n\t\t mutant_op = new OMD(file_env, null, cdecl);\n\t\t generateMutant(mutant_op);\n\t\t}\n\n\t\tif (hasOperator(classOp, \"JDC\")) {\n\t\t Debug.println(\" Applying JDC ... ... \");\n\t\t mutant_op = new JDC(file_env, null, cdecl);\n\t\t generateMutant(mutant_op);\n\t\t}\n\t }\n\t}\n }", "void genClassMutants1(ClassDeclarationList cdecls) {\n\n\tfor (int j = 0; j < cdecls.size(); ++j) {\n\t ClassDeclaration cdecl = cdecls.get(j);\n\n\t if (cdecl.getName().equals(MutationSystem.CLASS_NAME)) {\n\t\tString qname = file_env.toQualifiedName(cdecl.getName());\n\t\ttry {\n\t\t mujava.op.util.Mutator mutant_op;\n\n\t\t if (hasOperator(classOp, \"AMC\")) {\n\t\t\tDebug.println(\" Applying AMC ... ... \");\n\t\t\tmutant_op = new AMC(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"IOR\")) {\n\t\t\tDebug.println(\" Applying IOR ... ... \");\n\t\t\ttry {\n\t\t\t Class parent_class = Class.forName(qname).getSuperclass();\n\t\t\t if (!(parent_class.getName().equals(\"java.lang.Object\"))) {\n\t\t\t\tString temp_str = parent_class.getName();\n\t\t\t\tString result_str = \"\";\n\n\t\t\t\tfor (int k = 0; k < temp_str.length(); k++) {\n\t\t\t\t char c = temp_str.charAt(k);\n\t\t\t\t if (c == '.') {\n\t\t\t\t\tresult_str = result_str + \"/\";\n\t\t\t\t } else {\n\t\t\t\t\tresult_str = result_str + c;\n\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\tFile f = new File(MutationSystem.SRC_PATH, result_str + \".java\");\n\t\t\t\tif (f.exists()) {\n\t\t\t\t CompilationUnit[] parent_comp_unit = new CompilationUnit[1];\n\t\t\t\t FileEnvironment[] parent_file_env = new FileEnvironment[1];\n\t\t\t\t this.generateParseTree(f, parent_comp_unit, parent_file_env);\n\t\t\t\t this.initParseTree(parent_comp_unit, parent_file_env);\n\t\t\t\t mutant_op = new IOR(file_env, cdecl, comp_unit);\n\t\t\t\t ((IOR) mutant_op).setParentEnv(parent_file_env[0], parent_comp_unit[0]);\n\t\t\t\t comp_unit.accept(mutant_op);\n\t\t\t\t}\n\t\t\t }\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t System.out\n\t\t\t\t .println(\" Exception at generating IOR mutant. file : AllMutantsGenerator.java \");\n\t\t\t} catch (NullPointerException e1) {\n\t\t\t System.out.print(\" IOP ^^; \");\n\t\t\t}\n\t\t }\n\n\t\t if (hasOperator(classOp, \"ISD\")) {\n\t\t\tDebug.println(\" Applying ISD ... ... \");\n\t\t\tmutant_op = new ISD(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"IOP\")) {\n\t\t\tDebug.println(\" Applying IOP ... ... \");\n\t\t\tmutant_op = new IOP(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"IPC\")) {\n\t\t\tDebug.println(\" Applying IPC ... ... \");\n\t\t\tmutant_op = new IPC(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PNC\")) {\n\t\t\tDebug.println(\" Applying PNC ... ... \");\n\t\t\tmutant_op = new PNC(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PMD\")) {\n\t\t\tDebug.println(\" Applying PMD ... ... \");\n\t\t\t// if(existIHD){\n\t\t\tmutant_op = new PMD(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t\t// }\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PPD\")) {\n\t\t\tDebug.println(\" Applying PPD ... ... \");\n\t\t\t// if(existIHD){\n\t\t\tmutant_op = new PPD(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t\t// }\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PRV\")) {\n\t\t\tDebug.println(\" Applying PRV ... ... \");\n\t\t\tmutant_op = new PRV(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PCI\")) {\n\t\t\tDebug.println(\" Applying PCI ... ... \");\n\t\t\tmutant_op = new PCI(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PCC\")) {\n\t\t\tDebug.println(\" Applying PCC ... ... \");\n\t\t\tmutant_op = new PCC(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"PCD\")) {\n\t\t\tDebug.println(\" Applying PCD ... ... \");\n\t\t\tmutant_op = new PCD(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"JSD\")) {\n\t\t\tDebug.println(\" Applying JSC ... ... \");\n\t\t\tmutant_op = new JSD(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"JSI\")) {\n\t\t\tDebug.println(\" Applying JSI ... ... \");\n\t\t\tmutant_op = new JSI(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"JTD\")) {\n\t\t\tDebug.println(\" Applying JTD ... ... \");\n\t\t\tmutant_op = new JTD(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"JTI\")) {\n\t\t\tDebug.println(\" Applying JTI ... ... \");\n\t\t\tmutant_op = new JTI(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"JID\")) {\n\t\t\tDebug.println(\" Applying JID ... ... \");\n\t\t\tmutant_op = new JID(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"OAN\")) {\n\t\t\tDebug.println(\" Applying OAN ... ... \");\n\t\t\tmutant_op = new OAN(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"EOA\")) {\n\t\t\tDebug.println(\" Applying EOA ... ... \");\n\t\t\tmutant_op = new EOA(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"EOC\")) {\n\t\t\tDebug.println(\" Applying EOC ... ... \");\n\t\t\tmutant_op = new EOC(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"EAM\")) {\n\t\t\tDebug.println(\" Applying EAM ... ... \");\n\t\t\tmutant_op = new EAM(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t if (hasOperator(classOp, \"EMM\")) {\n\t\t\tDebug.println(\" Applying EMM ... ... \");\n\t\t\tmutant_op = new EMM(file_env, cdecl, comp_unit);\n\t\t\tcomp_unit.accept(mutant_op);\n\t\t }\n\n\t\t} catch (ParseTreeException e) {\n\t\t System.err.println(\"Encountered errors during generating mutants.\");\n\t\t e.printStackTrace();\n\t\t}\n\t }\n\t}\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/DebugInfoMetadata.h\", line = 783,\n FQN=\"llvm::DICompositeType::mutate\", NM=\"_ZN4llvm15DICompositeType6mutateEjjjyyyj\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/DebugInfoMetadata.cpp -nm=_ZN4llvm15DICompositeType6mutateEjjjyyyj\")\n //</editor-fold>\n private void mutate(/*uint*/int Tag, /*uint*/int Line, /*uint*/int RuntimeLang,\n long/*uint64_t*/ SizeInBits, long/*uint64_t*/ AlignInBits, long/*uint64_t*/ OffsetInBits,\n /*uint*/int Flags) {\n assert (isDistinct()) : \"Only distinct nodes can mutate\";\n assert ((getRawIdentifier() != null)) : \"Only ODR-uniqued nodes should mutate\";\n this.RuntimeLang = RuntimeLang;\n super.mutate(Tag, Line, SizeInBits, AlignInBits, OffsetInBits, Flags);\n }", "public MutableBlock createMutableBlock(ExpressionBuilder expression) {\r\n return new MutableBlock(passwordType, expression.toString());\r\n }", "public MutableBlock createMutableBlock(String expression) {\r\n return new MutableBlock(passwordType, expression);\r\n }", "@Override\n\tpublic List<MutantCtElement> execute(CtElement toMutate) {\n\t\tList<MutantCtElement> result = new ArrayList<MutantCtElement>();\n\n\t\tif (toMutate instanceof CtUnaryOperator<?>) {\n\t\t\tCtUnaryOperator<?> unary = (CtUnaryOperator<?>) toMutate;\n\t\t\tif (unary.getKind() == UnaryOperatorKind.NOT) {\n\t\t\t\tCtExpression expIF = factory.Core().clone(unary.getOperand());\n\t\t\t\tMutantCtElement mutatn = new MutantCtElement(expIF,0.3);\n\t\t\t\t//result.add(expIF);\n\t\t\t\tresult.add(mutatn);\n\t\t\t}\n\t\t} else {\n\t\t\tif (toMutate instanceof CtTypedElement<?>) {\n\t\t\t\tCtExpression<?> inv = (CtExpression<?>) toMutate;\n\t\t\t\tif (inv.getType()!= null && inv.getType().getSimpleName().equals(boolean.class.getSimpleName())) {\n\t\t\t\t\tCtExpression<?> invClone = factory.Core().clone(inv);\n\t\t\t\t\tCtUnaryOperator unary = factory.Core().createUnaryOperator();\n\t\t\t\t\tunary.setOperand(invClone);\n\t\t\t\t\tunary.setKind(UnaryOperatorKind.NOT);\n\t\t\t\t\t//result.add(unary);\n\t\t\t\t\tMutantCtElement mutatn = new MutantCtElement(unary,3);\n\t\t\t\t\t//result.add(expIF);\n\t\t\t\t\tresult.add(mutatn);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private static void mutate(Tour tour) {\n // Loop through tour cities\n for(int tourPos1=0; tourPos1 < tour.tourSize(); tourPos1++){\n // Apply mutation rate\n if(Math.random() < mutationRate){\n // Get a second random position in the tour\n int tourPos2 = (int) (tour.tourSize() * Math.random());\n\n // Get the cities at target position in tour\n City city1 = tour.getCity(tourPos1);\n City city2 = tour.getCity(tourPos2);\n\n // Swap them around\n tour.setCity(tourPos2, city1);\n tour.setCity(tourPos1, city2);\n }\n }\n }", "protected final void emitCode() {\n int bytecodeSize = request.graph.method() == null ? 0 : request.graph.getBytecodeSize();\n request.compilationResult.setHasUnsafeAccess(request.graph.hasUnsafeAccess());\n GraalCompiler.emitCode(request.backend, request.graph.getAssumptions(), request.graph.method(), request.graph.getMethods(), request.graph.getFields(), bytecodeSize, lirGenRes,\n request.compilationResult, request.installedCodeOwner, request.factory);\n }", "protected void injectCodeAndRewrite(byte[] injectedBytes, int injectedBytesCount, int injectionPos,\n boolean injectionBindsToFollowingInstruction) {\n this.injectionBindsToFollowingInstruction = injectionBindsToFollowingInstruction;\n relocateCode(injectionPos, 0, injectedBytesCount, true);\n // Copy the bytecodes to inject into the method\n System.arraycopy(injectedBytes, 0, bytecodes, injectionPos, injectedBytesCount);\n // Now handle the additional changes that could be caused by the injection\n handleCodeChanges();\n }", "public void compile(final MethodVisitor mv) {\n writeLineInfo(mv);\n if (isTailRecursive) {\n // In case of TCO don't push 'this' onto stack, as we don't want to\n // do a recursive method call!\n }\n else {\n // push 'this'\n mv.visitVarInsn(ALOAD, 0);\n }\n\n if (args != null) {\n // push new array\n mv.visitLdcInsn(args.length);\n mv.visitTypeInsn(ANEWARRAY, \"java/lang/Object\");\n // mv.visitInsn(DUP);\n for (int i = 0; i < args.length; i++) {\n mv.visitInsn(DUP);\n mv.visitLdcInsn(i);\n args[i].compile(mv);\n mv.visitInsn(AASTORE);\n }\n }\n if (isTailRecursive) {\n // update local variables for TCO re-entry\n mv.visitVarInsn(ASTORE, 1);\n // jump to first instruction of the method\n mv.visitJumpInsn(GOTO, methodEntry);\n\n }\n else {\n // classic recursive this.apply(args) invocation\n \tmv.visitMethodInsn(INVOKEINTERFACE, getName(Function.class), \"apply\",\n \"([Ljava/lang/Object;)Ljava/lang/Object;\");\n }\n }", "public void translateInstantiation( MethodTranslator method, New newInsn );", "public void mutate(NeuralPlayer p)\n\t{\n\t\tdouble[] genome = NetworkCODEC.networkToArray(p.net);\n\t\tRandom g = new Random();\n\t\tfor (int i = 0; i< genome.length; i++)\n\t\t{\n\t\t\tif (g.nextDouble() <= mutationPer)\n\t\t\t\tgenome[i] = randomNum(g) + genome[i];\n\t\t}\n\t\tNetworkCODEC.arrayToNetwork(genome, p.net);\n\t}", "private void storeMutantShared(BlockStmt original, BlockStmt modified)\n {\n if (modified.equals(original))\n return;\n\n // Add Mutant\n addMutant(new ASTMutant(\n this.getOriginal().getCompilationUnit(),\n original,\n modified,\n this.getType()\n ));\n\n }", "@Test\n public void testMutateTrue() throws Exception {\n final TranslationUnit tu = ParseHelper.parse(\"#version 310 es\\n\"\n + \"precision highp float;\\n\"\n + \"void foo() {\"\n + \" true;\"\n + \"}\"\n + \"void main() {\"\n + \" true;\"\n + \"}\");\n final List<Expr2ExprMutation> mutations =\n new IdentityMutationFinder(tu, new RandomWrapper(0),\n GenerationParams.normal(ShaderKind.FRAGMENT, false, false))\n .findMutations();\n assertEquals(2, mutations.size());\n mutations.get(0).apply();\n assertEquals(\"void main()\\n{\\n true;\\n}\\n\",\n PrettyPrinterVisitor.prettyPrintAsString(tu.getMainFunction()));\n\n }", "void accept(Opcodes opcode, byte[] code, int location);", "MutateNda<V> getMut();", "private void mutate() {\n\t\tfor (int i = 0; i < population; ++i) {\n\t\t\tpopulationArray.set(i, populationArray.get(i).generateNeighbor());\n\t\t}\n\t}", "public void generateCode() {\n new CodeGenerator(data).generateCode();\n }", "public boolean visitCode(final byte[] bytes, int offset, int length);", "public int mutateGene(int gene);", "public void mutation(){\n \n \tfor (int[] temp : wallpapers) {\n \t\tint e = random.nextInt(20);\n \t\tfor (int y = 0; y < e; y++){\n \t\t\tint h = random.nextInt(temp.length);\n \t\t\t//Log.d(\"MUT\", \"selected index \" + h);\n \t\t\tif (h == temp.length - 1 || h == temp.length - 2 || h == temp.length - 3){\n \t\t\t\tint newrgb = random.nextInt(NODELENGTH) + 2;\n \t\t\t\t//Log.d(\"MUT\", \"Picking new node \" + newrgb);\n \t\t\t\ttemp[h] = newrgb;\n \t\t\t} else if (((h + 1) % 3) == 0){\n \t\t\t\tint newfunction = random.nextInt(NUM_FUNCTIONS);\n \t\t\t\t//Log.d(\"MUT\", \"Picking new function \" + newfunction);\n \t\t\t\ttemp[h] = newfunction;\n \t\t\t} else {\n \t\t\t\tint newinput = random.nextInt(h / 3 +1);\n \t\t\t\ttemp[h] = newinput;\n \t\t\t\t//Log.d(\"MUT\", \"Picking new input \" + newinput);\n \t\t\t}\n \t\t}\n \t}\n }", "public int captureCodeFragment05(int x) {\r\n return x * x;\r\n }", "private void mutation() {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tint num = (int) (Math.random() * GENE * ChrNum + 1);\n\t\t\tint chromosomeNum = (int) (num / GENE) + 1;\n\n\t\t\tint mutationNum = num - (chromosomeNum - 1) * GENE; \n\t\t\tif (mutationNum == 0) \n\t\t\t\tmutationNum = 1;\n\t\t\tchromosomeNum = chromosomeNum - 1;\n\t\t\tif (chromosomeNum >= ChrNum)\n\t\t\t\tchromosomeNum = 9;\n\t\t\tString temp;\n\t\t\tString a; \n\t\t\tif (ipop[chromosomeNum].charAt(mutationNum - 1) == '0') { \n a = \"1\";\n\t\t\t} else { \n\t\t\t\ta = \"0\";\n\t\t\t}\n\t\t\t\n\t\t\tif (mutationNum == 1) {\n\t\t\t\ttemp = a + ipop[chromosomeNum].substring(mutationNum);\n\t\t\t} else {\n\t\t\t\tif (mutationNum != GENE) {\n\t\t\t\t\ttemp = ipop[chromosomeNum].substring(0, mutationNum -1) + a \n\t\t\t\t\t\t\t+ ipop[chromosomeNum].substring(mutationNum);\n\t\t\t\t} else {\n\t\t\t\t\ttemp = ipop[chromosomeNum].substring(0, mutationNum - 1) + a;\n\t\t\t\t}\n\t\t\t}\n \tipop[chromosomeNum] = temp;\n\t\t}\n\t}", "private static MethodSpec.Builder visitorBuilderSetterPrototype(\n NameTypeMetadata member, TypeName visitResultType, ClassName nextBuilderStage, Options options) {\n TypeName visitorObject = visitorObjectTypeName(member, visitResultType, options);\n return MethodSpec.methodBuilder(JavaNameSanitizer.sanitize(member.memberName))\n .addParameter(ParameterSpec.builder(visitorObject, visitorFieldName(member.memberName))\n .addAnnotation(Nonnull.class)\n .build())\n .returns(ParameterizedTypeName.get(nextBuilderStage, visitResultType));\n }", "public Snippet visit(MethodCallStatement n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\", \"\", null, false);\n\t\t\tSnippet f0 =n.methodCall.accept(this, argu);\n\t n.nodeToken.accept(this, argu);\n\t _ret.returnTemp = f0.returnTemp + \";\";\n\t\t\ttPlasmaCode+=generateTabs(blockDepth)+_ret.returnTemp+\"\\n\";\n\t return _ret;\n\t }", "public abstract void recompileRun(int opcode);", "private void compile(SSAProgram prog, SSAMethod m, String name) {\n // beginning of the prologue\n sb.append(name);\n sb.append(\":\\n\");\n sb.append(\" add $sp, $sp, -\");\n sb.append(wordSize);\n sb.append(\"\\n\");\n sb.append(\" sw $fp, ($sp)\\n\");\n sb.append(\" move $fp, $sp\\n\");\n\n // pin registers\n for (SSAStatement s : m.getBody()) {\n if (s.getOp() == SSAStatement.Op.Parameter) {\n int paramNum = ((Integer) s.getSpecial()).intValue();\n if (paramNum < argRegisters.length)\n s.pinRegister(argFreeRegisters[paramNum]);\n }\n\n if (s.getOp() == SSAStatement.Op.Arg) {\n int argNum = ((Integer) s.getSpecial()).intValue();\n if (argNum < argRegisters.length)\n s.pinRegister(argFreeRegisters[argNum]);\n else\n s.pinRegister(-1); // pin to -1 to do this at Call time\n }\n }\n\n // FILLIN: perform register allocation\n RegisterAllocator.alloc(m, freeRegisters.length);\n int totalSpace = 0;\n // FILLIN: figure out how much space we need to reserve for spills\n int spillSpace = 0;\n spillSpace += findMax(m.getBody());\n spills = spillSpace;\n // FILLIN: and perhaps any other space we need to reserve (saved registers?)\n \n // Add space for v0 and v1 if not already\n List<Integer> cesaved = new ArrayList<Integer>();\n \n sortOnInsert(crsaved, callerSavedRegisters[0]);\n sortOnInsert(crsaved, callerSavedRegisters[1]);\n sortOnInsert(cesaved, calleeSavedRegisters[9]);\n \n int extraArgs = 0;\n for(SSAStatement s : m.getBody()) {\n if(s.getRegister() < 0) {\n extraArgs++;\n continue;\n }\n if(!crsaved.contains(freeReg(s)) && (Arrays.binarySearch(callerSavedRegisters, freeReg(s)) > -1)){\n sortOnInsert(crsaved, freeReg(s));\n } else if (!cesaved.contains(freeReg(s)) && Arrays.binarySearch(calleeSavedRegisters, freeReg(s)) > -1){\n sortOnInsert(cesaved, freeReg(s));\n }\n }\n \n // FILLIN: reserve space\n totalSpace+= crsaved.size() + spillSpace; \n sb.append(\" add $sp, $sp, -\");\n sb.append(wordSize*(totalSpace));\n sb.append(\"\\n\");\n // reserve $ra space\n\n StringBuilder cestores = new StringBuilder();\n StringBuilder celoads = new StringBuilder();\n for(int i = 0; i < cesaved.size(); i++) {\n int reg = cesaved.get(i);\n cestores.append(\" add $sp, $sp, -\" + (wordSize) + \"\\n\");\n cestores.append(\" sw $\");\n cestores.append(registers[reg]);\n cestores.append(\", ($sp)\\n\"); \n reg = cesaved.get(((cesaved).size()-1) - i);\n celoads.append(\" lw $\");\n celoads.append(registers[reg]);\n celoads.append(\", ($sp)\\n\");\n celoads.append(\" add $sp, $sp, \" + (wordSize) + \"\\n\");\n \n }\n\n // FILLIN: save the callee-saved registers, anything else that needs to be callee-saved\n sb.append(cestores);\n if(extraArgs > 0) {\n sb.append(\" add $sp, $sp, -\");\n sb.append(wordSize*(extraArgs));\n sb.append(\"\\n\");\n }\n // now write the code\n for (SSAStatement s : m.getBody()) {\n compile(prog, name, s);\n }\n\n // the epilogue starts here\n sb.append(\" .ret_\");\n sb.append(name);\n sb.append(\":\\n\");\n\n // FILLIN: restore the callee-saved registers (anything else?)\n if(extraArgs > 0) {\n sb.append(\" add $sp, $sp, \");\n sb.append(wordSize*(extraArgs));\n sb.append(\"\\n\");\n } \n sb.append(celoads);\n \n // and the rest of the epilogue\n sb.append(\" move $sp, $fp\\n\");\n sb.append(\" lw $fp, ($sp)\\n\");\n sb.append(\" add $sp, $sp, \");\n sb.append(wordSize);\n sb.append(\"\\n\");\n sb.append(\" j $ra\\n\");\n\n crsaved.clear();\n crstores.setLength(0);\n crloads.setLength(0);\n }", "private void prepareMethodsToInstrument(\r\n\t\t\tboolean useInlinedVersion,\r\n\t\t\tboolean useCaller, // Compressor.compress\r\n\t\t\tboolean useCallee1, // CodeTable.of\r\n\t\t\tboolean useCallee2, // CodeTable.set\r\n\t\t\tboolean useCallee3, // HashTable.clear\r\n\t\t\tboolean useCallee4, // HashTable.hsize\r\n\t\t\tboolean useCallee5, // HashTable.of_hash\r\n\t\t\tboolean useCallee6, // HashTable.set_hash\r\n\t\t\tboolean useCallee7, // Compressor.clblock\r\n\t\t\tboolean useCallee8, // Compressor.output\r\n\t\t\tboolean useCallee9, // InputBuffer.readByte\r\n\t\t\tboolean useCalleeA, // Compressor.getMaxCode\r\n\t\t\tboolean useCalleeB, // OutputBuffer.writeByte\r\n\t\t\tboolean useCalleeC, // OutputBuffer.writeBytes\r\n\t\t\tString packageName,\r\n\t\t\tList<MethodDescriptor> methodsToInstrument\r\n\t\t) {\r\n\t\tMethodDescriptor caller = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor\", //Compressor is not an inner class! thus, do not try Compress$Compressor!\r\n\t\t\t\t\"public void compress()\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_COUNTED_SEPARATELY\r\n\t\t\t\t); \r\n\t\tcaller.setContext(new UUID(System.currentTimeMillis(),System.currentTimeMillis()));\r\n\t\t\r\n\t\tMethodDescriptor callee1 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".CodeTable\", \r\n\t\t\t\t\"public int of(int i)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcallee1.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee2 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".CodeTable\", \r\n\t\t\t\t\"public void set(int i, int v)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcallee2.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee3;\r\n\t\tif(useInlinedVersion){\r\n\t\t\tcallee3 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".HashTable\", \r\n\t\t\t\t\"public void clear()\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,//\"size\" always 69001... \r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}else{\r\n\t\t\tcallee3 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor$HashTable\", \r\n\t\t\t\t\"public void clear()\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,//\"size\" always 69001...\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}\r\n\t\tcallee3.setContext(caller.getContext());\r\n\r\n\t\tMethodDescriptor callee4;\r\n\t\tif(useInlinedVersion){\r\n\t\t\tcallee4 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".HashTable\", \r\n\t\t\t\t\"public int hsize()\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}else{\r\n\t\t\tcallee4 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor$HashTable\", \r\n\t\t\t\t\"public int hsize()\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}\r\n\t\tcallee4.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee5;\r\n\t\tif(useInlinedVersion){\r\n\t\t\tlog.error(\"Inlined version of callee6 still with a problematic method name of\");\r\n\t\t\tcallee5 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".HashTable\", \r\n\t\t\t\t\"public int of(int i)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}else{\r\n\t\t\tcallee5 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor$HashTable\", \r\n\t\t\t\t\"public int of_hash(int i)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}\r\n\t\tcallee5.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee6;\r\n\t\tif(useInlinedVersion){\r\n\t\t\tlog.error(\"Inlined version of callee6 still with a problematic method name set\");\r\n\t\t\tcallee6 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".HashTable\", \r\n\t\t\t\t\"public void set(int i, int v)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}else{\r\n\t\t\tcallee6 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor$HashTable\", \r\n\t\t\t\t\"public void set_hash(int i, int v)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\t}\r\n\t\tcallee6.setContext(caller.getContext());\r\n\t\t\r\n\t\tMethodDescriptor callee7 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor\", \r\n\t\t\t\t\"public void clBlock()\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_COUNTED_SEPARATELY\r\n\t\t\t\t); //I had an error here\r\n\t\tcallee7.setContext(caller.getContext());\r\n\t\t\r\n\t\tSystem.err.println(\"Callee 8 (Compressor.output) not inlined - may be a scalability issue (see prepareMethodsToInstrument)\");\r\n\t\tMethodDescriptor callee8 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".Compressor\", \r\n\t\t\t\t\"public void output(int code)\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcallee8.setContext(caller.getContext());\r\n\t\t\r\n\t\tSystem.err.println(\"Callee 9 (InputBuffer.readByte) not inlined - may be a scalability issue (see prepareMethodsToInstrument)\");\r\n\t\tMethodDescriptor callee9 = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".InputBuffer\",\r\n\t\t\t\t\"public int readByte()\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcallee9.setContext(caller.getContext());\r\n\t\t\t\t\r\n\t\t//called from Compressor.output, implemented in Compressor's superclass (CompBase)\r\n\t\t//does not call other methods\r\n\t\tlog.warn(\"For instrumenting getMaxCode: replaced Compressor with CompBase, but only in prepareMethodsToInstrument\");\r\n\t\tMethodDescriptor calleeA = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".CompBase\",\r\n\t\t\t\t\"public int getMaxCode()\",//TODO inherited but not overwritten method!!!\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcalleeA.setContext(caller.getContext());\r\n\t\t\t\t\r\n\t\t//called from Compressor.output\r\n\t\t//does not call other methods\r\n\t\tMethodDescriptor calleeB = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".OutputBuffer\",\r\n\t\t\t\t\"public void writeByte(byte c)\",\r\n\t\t\t\tMethodDescriptor.IS_INVARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcalleeB.setContext(caller.getContext());\r\n\t\t\t\t\r\n\t\t//called from Compressor.output\r\n\t\t//does not call other methods\r\n\t\tMethodDescriptor calleeC = new MethodDescriptor(\r\n\t\t\t\tpackageName+\".OutputBuffer\",\r\n\t\t\t\t\"public void writebytes(byte[] buf, int n)\",\r\n\t\t\t\tMethodDescriptor.IS_VARIANT,\r\n\t\t\t\tMethodDescriptor.IS_IMMEDIATELY_INLINED\r\n\t\t\t\t);\r\n\t\tcalleeC.setContext(caller.getContext());\r\n\t\t\t\t\r\n\t\tif(useCaller){\r\n\t\t\tmethodsToInstrument.add(caller);\r\n\t\t}\r\n\t\tif(useCallee1){\r\n\t\t\tmethodsToInstrument.add(callee1);\r\n\t\t}\r\n\t\tif(useCallee2){\r\n\t\t\tmethodsToInstrument.add(callee2);\r\n\t\t}\r\n\t\tif(useCallee3){\r\n\t\t\tmethodsToInstrument.add(callee3);\r\n\t\t}\r\n\t\tif(useCallee4){\r\n\t\t\tmethodsToInstrument.add(callee4);\r\n\t\t}\r\n\t\tif(useCallee5){\r\n\t\t\tmethodsToInstrument.add(callee5);\r\n\t\t}\r\n\t\tif(useCallee6){\r\n\t\t\tmethodsToInstrument.add(callee6);\r\n\t\t}\r\n\t\tif(useCallee7){\r\n\t\t\tmethodsToInstrument.add(callee7);\r\n\t\t}\r\n\t\tif(useCallee8){\r\n\t\t\tmethodsToInstrument.add(callee8);\r\n\t\t}\r\n\t\tif(useCallee9){\r\n\t\t\tmethodsToInstrument.add(callee9);\r\n\t\t}\r\n\t\tif(useCalleeA){\r\n\t\t\tmethodsToInstrument.add(calleeA);\r\n\t\t}\r\n\t\tif(useCalleeB){\r\n\t\t\tmethodsToInstrument.add(calleeB);\r\n\t\t}\r\n\t\tif(useCalleeC){\r\n\t\t\tmethodsToInstrument.add(calleeC);\r\n\t\t}\r\n\t}", "private String identingCode(int offset, String codeSnippet) {\n\t\tStringBuilder code = new StringBuilder();\n\t\tString[] lineBroken = codeSnippet.split(\"\\n\");\n\t\tfor(int index=0; index < lineBroken.length; index++) {\n\t\t\tString line = lineBroken[index];\n\t\t\tStringBuilder tmpLine = new StringBuilder();\n\t\t\tif(index != 0) {\n\t\t\t\tfor(int i=0; i<offset; i++) {\n\t\t\t\t\ttmpLine.append(\"\");\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\ttmpLine.append(line.replace(\"\\t\", \"\")).append(\"\\n\");\n\t\t\tcode.append(tmpLine);\n\t\t}\n\t\treturn code.toString();\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic void mutation() {\r\n\t\tfinal double MUTATION_PROB = 0.1;\r\n\t\tfor (int i=0; i<this.nChromosomes; i++) {\r\n\t\t\tArrayList<Integer> chr = (ArrayList<Integer>) this.chromosomes.get(i);\r\n\t\t\tfor (int j=0; j<this.nViaPoints; j++) {\r\n\t\t\t\tdouble rand = Math.random();\r\n\t\t\t\tif (rand < MUTATION_PROB) {\r\n\t\t\t\t\t// change the sign\r\n\t\t\t\t\tInteger vPoint = chr.get(j);\r\n\t\t\t\t\tchr.remove(j);\r\n\t\t\t\t\tchr.add(j, new Integer(- (vPoint.intValue()%100)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.printChromosomes(\"After Mutation\");\r\n\t}", "public Code visitBlockNode(BlockNode node) {\n beginGen(\"Block\");\n /** Generate code to allocate space for local variables on\n * procedure entry.\n */\n Code code = new Code();\n code.genAllocStack(node.getBlockLocals().getVariableSpace());\n /* Generate the code for the body */\n code.append(node.getBody().genCode(this));\n /** Generate code for local procedures. */\n /* Static level is one greater for the procedures. */\n staticLevel++;\n node.getProcedures().accept(this);\n staticLevel--;\n endGen(\"Block\");\n return code;\n }", "void genClassMutants(ClassDeclarationList cdecls) {\n\tgenClassMutants1(cdecls);\n\tgenClassMutants2(cdecls);\n }", "public int captureCodeFragment04(int x, int y) {\r\n return x + y;\r\n }", "public JasminBytecode( String className ) {\n this.className = className;\n this.jasminCode = new ArrayList<>();\n }", "public abstract void emitCode(CodeEmitter ce);", "@Test\n public void testVectorizationOpportunitiesWithSingleStatementLoops() throws Exception {\n final String program =\n \"float f()\\n\"\n + \"{\\n\"\n + \" float a = 1.0;\"\n + \" while (a > 2.0) float z = 3.0;\"\n + \" float b = 2.0;\"\n + \" float c = 3.0;\"\n + \" for (int i = 0; i < 100; i++) float w = 10.0;\"\n + \" return a;\\n\"\n + \"}\\n\";\n\n final String expectedFirst =\n \"float f()\\n\"\n + \"{\\n\"\n + \" vec3 GLF_merged3_0_1_1_1_1_1_2_1_1abc;\\n\"\n + \" float a = 1.0;\\n\"\n + \" GLF_merged3_0_1_1_1_1_1_2_1_1abc.x = a;\\n\"\n + \" while (GLF_merged3_0_1_1_1_1_1_2_1_1abc.x > 2.0) float z = 3.0;\"\n + \" float b = 2.0;\\n\"\n + \" GLF_merged3_0_1_1_1_1_1_2_1_1abc.y = b;\\n\"\n + \" float c = 3.0;\\n\"\n + \" GLF_merged3_0_1_1_1_1_1_2_1_1abc.z = c;\\n\"\n + \" for (int i = 0; i < 100; i++) float w = 10.0;\"\n + \" return GLF_merged3_0_1_1_1_1_1_2_1_1abc.x;\\n\"\n + \"}\\n\";\n\n TranslationUnit tu = ParseHelper.parse(program);\n List<VectorizeMutation> ops =\n new VectorizeMutationFinder(tu,\n new CannedRandom(0, 0, 0, 0, 0, 0, 0)).findMutations();\n assertEquals(1, ops.size());\n ops.get(0).apply();\n CompareAsts.assertEqualAsts(expectedFirst, tu);\n }", "public abstract void accept(CodeVisitor v);", "void genAst();", "public Individual mutate(Config config)\r\n\t{\r\n\t\tIndividual ind;\r\n\r\n\t\tif (isBinaryEncoding())\r\n\t\t{\r\n\t\t\t// Create a new binary individual\r\n\t\t\tind = new Individual(intSize, intCount, signedInt);\r\n\r\n\t\t\t// Copy our genes to other individual\r\n\t\t\tfor (int i = 0; i < binary.length; i++)\r\n\t\t\t\tind.binary[i] = binary[i];\r\n\r\n\t\t\t// Mutate\r\n\t\t\tint mutatedBits = (int) (Math.random() * config.mutationStrength) + 1;\r\n\t\t\tfor (int i = 0; i < mutatedBits; i++)\r\n\t\t\t{\r\n\t\t\t\tint bitIndex = (int) (Math.random() * binary.length);\r\n\t\t\t\tind.binary[bitIndex] = !ind.binary[bitIndex];\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Create a new float individual\r\n\t\t\tind = new Individual();\r\n\r\n\t\t\t// Copy our genes\r\n\t\t\tind.realValue = realValue;\r\n\r\n\t\t\t// Mutate\r\n\t\t\tind.realValue += (Math.random() * 2f - 1f) * config.mutationStrength;\r\n\t\t}\r\n\r\n\t\treturn ind;\r\n\t}", "private String vmCode(ArrayList<String> accessArgs, int size, ArrayList<SystemType> signature) {\n\n if(kind == Kind.Expr) {\n // result = className(args); pc += size\n return String.format(\"%s = %s; pc += %d;\", accessArgs.get(accessArgs.size() - 1),\n call(accessArgs, size, signature), size);\n }\n\n if(kind == Kind.Bool) {\n return String.format(\"pc = %s ? %s : %s;\",\n call(accessArgs, size, signature),\n accessArgs.get(accessArgs.size() - 2), accessArgs.get(accessArgs.size() - 1));\n }\n\n // eg jumps. They know best.\n return call(accessArgs, size, signature);\n }", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(2320);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"xp:%03,6Y\";\n stringArray0[1] = \"StackMap\";\n stringArray0[2] = \"Signature\";\n stringArray0[3] = \"StackMap\";\n stringArray0[4] = \"StackMap\";\n stringArray0[5] = \"StackMap\";\n stringArray0[6] = \"StackMap\";\n stringArray0[7] = \"Signature\";\n stringArray0[8] = \"Signature\";\n MethodVisitor methodVisitor0 = classWriter0.visitMethod(54, \"Signature\", \"StackMap\", \"Signature\", stringArray0);\n String[] stringArray1 = new String[0];\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 2127, \"c6c)y~[K\", \"c6c)y~[K\", \"c6c)y~[K\", stringArray1, true, true);\n methodWriter0.visitAnnotation(\"c6c)y~[K\", true);\n Object[] objectArray0 = new Object[5];\n objectArray0[0] = (Object) methodWriter0;\n methodWriter0.visitTypeInsn((-1934044868), \"Label offset position has not been resolved yet\");\n methodVisitor0.visitTypeInsn(127, \"StackMap\");\n assertFalse(methodVisitor0.equals((Object)methodWriter0));\n }", "public abstract Chromosome mutation(Chromosome child);", "public static void main(String []args) {\n ConstantNode ten = new ConstantNode(10);\n ExprNode tree = ten.into(20).plus(30);\n// ExprNode exprNode = new AddOperator(\n// new MultiplyOperator(\n// new ConstantNode(10),\n// new ConstantNode(20)),\n// new ConstantNode(30));\n tree.genCode();\n }", "void generateSetter(MethodSpec.Builder method, SetterParam param);", "public static void mutate(Chromosome chrome) {\n \n // Loop through tour cities\n for(int rosterNursePos1=0; rosterNursePos1 < chrome.ChromosomeRowSize(); rosterNursePos1++){\n for (int rosterDayPos1=0; rosterDayPos1<chrome.chromosomeColumnCount();rosterDayPos1++){\n if(RosterManager.isPreviousShift(chrome.getShift(rosterNursePos1, rosterDayPos1))==false || RosterManager.isNextShift(chrome.getShift(rosterNursePos1, rosterDayPos1))==false || chrome.getShift(rosterNursePos1, rosterDayPos1).getHours()!=0 ){\n if(Math.random() < mutationRate){\n // Get a second random position in the tour\n int rosterNursePos2= rosterNursePos1;\n int rosterDayPos2 = returnValidPos(rosterNursePos2, randomizeShiftGeneration(chrome), chrome );\n\n // Get the cities at target position in tour\n Gene gene1 = chrome.retrieveGene(rosterNursePos1, rosterDayPos1);\n Gene gene2 = chrome.retrieveGene(rosterNursePos2, rosterDayPos2);\n\n // Swap them around\n chrome.saveGene(rosterNursePos1, rosterDayPos1, gene2);\n chrome.saveGene(rosterNursePos2, rosterDayPos2, gene1);\n \n }\n \n \n } \n // Apply mutation rate\n \n }\n \n }\n \n \n }", "@Override\n\tpublic String generateJavaCode() {\n\t\treturn id + \" = \"+(tam>0? \"new int[]\": \"\")+expr+\";\";\n\t}", "private Expression transform(Expression exp)\n {\n return UseContracts.execute(exp, fun, callers);\n }", "public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}", "public Integer mutate(int index);", "private void mutate(Chromosome c){\n for(double[] gene:c.getGeneData()){\n for(int i=0; i<gene.length; i++){\n if(Math.random()<mutationRate){\n //Mutate the data\n gene[i] += (Math.random()-Math.random())*maxPerturbation;\n }\n }\n }\n }", "static /* synthetic */ long m312-set5(android.location.GpsClock r1, long r2) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e7 in method: android.location.GpsClock.-set5(android.location.GpsClock, long):long, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.-set5(android.location.GpsClock, long):long\");\n }", "public static BinaryExpression addAssign(Expression expression0, Expression expression1, Method method, LambdaExpression lambdaExpression0, LambdaExpression lambdaExpression1) { throw Extensions.todo(); }", "public static void main(String[] args) {\n //Ersetzt jetzt mal unseren Parser, Stell Dir vor\n // das Ding liest das Beispiel da oben ^^.\n final StatementNode[] statementNodes = readStatements();\n \n //Zustände:\n // - FillSymbolTable (was für Symbole [variablen, ...] gibt es)\n // - TypInferenz (Was für Typen haben die Expressions und sind die eingaben semantisch korrekt)\n // - CodeGenerierung oder Ausführung (ersetzen wir mit \"schreibe die Werte aller Variablen nach Ende der Ausführung\")\n \n \n final SymbolTabelle symbolTabelle = new SymbolTabelle();\n //IDEE 2:\n //Ich gebe Statements und Expressions nur eine Methode mit Visitor als Callback\n final StatementVisitorSymbolTabelle statementVisitorSymbolTabelle = new StatementVisitorSymbolTabelle(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorSymbolTabelle);\n }\n \n final StatementVisitorTypInferenz statementVisitorTypInferenz = new StatementVisitorTypInferenz(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorTypInferenz);\n }\n \n PseudoLaufContext laufContext = new PseudoLaufContext();\n final StatementVisitorCodeGen statementVisitorCodeGen = new StatementVisitorCodeGen(laufContext);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorCodeGen);\n }\n \n laufContext.druckeVariablen();\n \n //Zusammenfassung:\n //Reduktion des Problems darauf, den Code nur noch von einem Abhängig zu machen\n //Jetzt nur noch abhängig vom Typ des Statements\n \n \n //Problem hierbei:\n //Ich muss selbst angeben, in welchem Zustand ich bin\n //Code-Duplizierung\n }", "@Override\r\n\tpublic void transform(CtExecutable method) {\n reset();\r\n \r\n // Get setup for renaming\r\n setDefs(getChildrenOfType(method, CtLocalVariable.class));\r\n setSubtokens(topTargetSubtokens);\r\n \r\n // Select some percentage of things to rename\r\n takePercentage(RENAME_PERCENT);\r\n\r\n // Build new names and apply them\r\n applyRenaming(method, false, generateRenaming(\r\n method, SHUFFLE_MODE, NAME_MIN_LENGTH, NAME_MAX_LENGTH\r\n ));\r\n\t}", "private Node newInstrumentationNode(NodeTraversal traversal, Node node, String fnName) {\n\n String type = \"Type.FUNCTION\";\n\n String encodedParam = parameterMapping.getEncodedParam(traversal.getSourceName(), fnName, type);\n\n Node innerProp = IR.getprop(IR.name(MODULE_RENAMING), IR.string(INSTRUMENT_CODE_INSTANCE));\n Node outerProp = IR.getprop(innerProp, IR.string(INSTRUMENT_CODE_FUNCTION_NAME));\n Node functionCall = IR.call(outerProp, IR.string(encodedParam), IR.number(node.getLineno()));\n Node exprNode = IR.exprResult(functionCall);\n\n return exprNode.useSourceInfoIfMissingFromForTree(node);\n }", "private void processCodeAttribute() {\n int codeAttributeLengthPos = destPos();\n int codeAttributeLength = copyInt();\n copy(4); // max_stack, max_locals\n int codeLength = copyInt(); // code_length\n copy(codeLength); // code\n copy(8 * copyShort()); // exception_table_length, exception_table\n int numAttr = copyShort();\n for (int i = 0; i < numAttr; i++) {\n // Look for \"LocalVariableTable\" attribute.\n int attrNameIdx = copyShort();\n if (cpIdxIsLocalVariableTable(attrNameIdx)) {\n processLocalVariableTableAttribute(codeAttributeLengthPos, codeAttributeLength, codeLength);\n } else {\n copyRestOfAttribute();\n }\n }\n }", "public void generateCode() {\n\t\tthis.setCharacter();\n\t}", "public void setCount(final int p0) {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 3: aload_3 \n // 4: monitorexit \n // 5: athrow \n // 6: aload_0 \n // 7: dup \n // 8: astore_3 \n // 9: monitorenter \n // 10: aload_0 \n // 11: getfield facade/characters/wmedef/TopicReferenceCountWME.count:I\n // 14: istore_2 \n // 15: aload_0 \n // 16: iload_1 \n // 17: putfield facade/characters/wmedef/TopicReferenceCountWME.count:I\n // 20: aload_3 \n // 21: monitorexit \n // 22: aload_0 \n // 23: getfield facade/characters/wmedef/TopicReferenceCountWME.__support:Ljava/beans/PropertyChangeSupport;\n // 26: ldc \"count\"\n // 28: iload_2 \n // 29: iload_1 \n // 30: invokevirtual java/beans/PropertyChangeSupport.firePropertyChange:(Ljava/lang/String;II)V\n // 33: return \n // Exceptions:\n // Try Handler\n // Start End Start End Type\n // ----- ----- ----- ----- ----\n // 3 5 3 6 Any\n // 10 22 3 6 Any\n // \n // The error that occurred was:\n // \n // java.util.ConcurrentModificationException\n // at java.util.ArrayList$Itr.checkForComodification(Unknown Source)\n // at java.util.ArrayList$Itr.next(Unknown Source)\n // at com.strobel.decompiler.ast.AstBuilder.convertLocalVariables(AstBuilder.java:2863)\n // at com.strobel.decompiler.ast.AstBuilder.performStackAnalysis(AstBuilder.java:2445)\n // at com.strobel.decompiler.ast.AstBuilder.build(AstBuilder.java:108)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:211)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:125)\n // at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)\n // at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)\n // at com.strobel.decompiler.DecompilerDriver.decompileType(DecompilerDriver.java:330)\n // at com.strobel.decompiler.DecompilerDriver.decompileJar(DecompilerDriver.java:251)\n // at com.strobel.decompiler.DecompilerDriver.main(DecompilerDriver.java:126)\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }", "@Converted(kind = Converted.Kind.MANUAL_SEMANTIC,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 154,\n FQN=\"llvm::Module::getOrInsertFunction\", NM=\"_ZN4llvm6Module19getOrInsertFunctionENS_9StringRefENS_12AttributeSetEPNS_4TypeEz\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module19getOrInsertFunctionENS_9StringRefENS_12AttributeSetEPNS_4TypeEz\")\n //</editor-fold>\n public Constant /*P*/ getOrInsertFunction(StringRef Name, \n AttributeSet AttributeList, \n Type /*P*/ RetTy, Type ... $VarArg)/* __attribute__((sentinel(0, 0)))*/ {\n std.vector<Type /*P*/ > ArgTys = null;\n try {\n // Build the list of argument types...\n ArgTys/*J*/= new std.vector<Type /*P*/ >((Type /*P*/ )null);\n if (false) {\n// char$ptr/*char P*/ Args = create_char$ptr();\n// __builtin_va_start(Args, RetTy);\n//\n// {\n// Type /*P*/ ArgTy;\n// while (((/*P*/ ArgTy = __builtin_va_arg(Args, Type /*P*/ .class)) != null)) {\n// ArgTys.push_back_T$C$R(ArgTy);\n// }\n// }\n// __builtin_va_end(Args);\n } else {\n // JAVA: \n if ($VarArg != null) {\n for (Type ArgTy : $VarArg) {\n if (ArgTy != null) {\n ArgTys.push_back_T$C$R(ArgTy);\n }\n }\n } \n }\n \n // Build the function type and chain to the other getOrInsertFunction...\n return getOrInsertFunction(new StringRef(Name), \n FunctionType.get(RetTy, new ArrayRef<Type /*P*/ >(ArgTys, true), false), \n new AttributeSet(AttributeList));\n } finally {\n if (ArgTys != null) { ArgTys.$destroy(); }\n }\n }", "@Override\n\t\tpublic void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) {\n\t\t\tparsingInstruction = new Instruction(name, desc, owner, parsingMethod);\n\t\t\tparsingMethod.getInstructions().add(parsingInstruction);\n\t\t}", "public JasminBytecode(String className, List<String> jasminCode ) {\n this.className = className;\n this.jasminCode = new ArrayList<>(jasminCode);\n }", "private UnifiedAst precompile(PrecompilationContext precompilationContext)\n\t\t\tthrows UnableToCompleteException {\n\t\ttry {\n\t\t\t// (0) Assert preconditions\n\t\t\tif (precompilationContext.getEntryPoints().length\n\t\t\t\t\t+ precompilationContext\n\t\t\t\t\t\t\t.getAdditionalRootTypes().length == 0) {\n\t\t\t\tthrow new IllegalArgumentException(\"entry point(s) required\");\n\t\t\t}\n\t\t\tboolean singlePermutation = precompilationContext\n\t\t\t\t\t.getPermutations().length == 1;\n\t\t\tPrecompilationMetricsArtifact precompilationMetrics = precompilationContext\n\t\t\t\t\t.getPrecompilationMetricsArtifact();\n\t\t\t/*\n\t\t\t * Do not introduce any new pass here unless it is logically a part\n\t\t\t * of one of the 6 defined stages and is physically located in that\n\t\t\t * stage.\n\t\t\t */\n\t\t\t// (1) Initialize local state\n\t\t\tjprogram = new JProgram(compilerContext.getMinimalRebuildCache());\n\t\t\t// Synchronize JTypeOracle with compile optimization behavior.\n\t\t\tjprogram.typeOracle.setOptimize(options\n\t\t\t\t\t.getOptimizationLevel() > OptionOptimize.OPTIMIZE_LEVEL_DRAFT);\n\t\t\tjsProgram = new JsProgram();\n\t\t\t// (2) Construct and unify the unresolved Java AST\n\t\t\tCompilationState compilationState = constructJavaAst(\n\t\t\t\t\tprecompilationContext);\n\t\t\t// TODO(stalcup): hide metrics gathering in a callback or subclass\n\t\t\tJsniRestrictionChecker.exec(logger, jprogram);\n\t\t\tJsInteropRestrictionChecker.exec(logger, jprogram,\n\t\t\t\t\tgetMinimalRebuildCache());\n\t\t\tlogTypeOracleMetrics(precompilationMetrics, compilationState);\n\t\t\tMemory.maybeDumpMemory(\"AstOnly\");\n\t\t\tAstDumper.maybeDumpAST(jprogram);\n\t\t\t// TODO(stalcup): is in wrong place, move to optimization stage\n\t\t\tConfigurationProperties configurationProperties = new ConfigurationProperties(\n\t\t\t\t\tmodule);\n\t\t\tEnumNameObfuscator.exec(jprogram, logger, configurationProperties,\n\t\t\t\t\toptions);\n\t\t\t// (3) Normalize the unresolved Java AST\n\t\t\t// Replace default methods by static implementations.\n\t\t\tDevirtualizeDefaultMethodForwarding.exec(jprogram);\n\t\t\t// Replace calls to native overrides of object methods.\n\t\t\tReplaceCallsToNativeJavaLangObjectOverrides.exec(jprogram);\n\t\t\tFixAssignmentsToUnboxOrCast.exec(jprogram);\n\t\t\tif (options.isEnableAssertions()) {\n\t\t\t\tAssertionNormalizer.exec(jprogram);\n\t\t\t} else {\n\t\t\t\tAssertionRemover.exec(jprogram);\n\t\t\t}\n\t\t\tif (module != null && options.isRunAsyncEnabled()) {\n\t\t\t\tReplaceRunAsyncs.exec(logger, jprogram);\n\t\t\t\tConfigurationProperties config = new ConfigurationProperties(\n\t\t\t\t\t\tmodule);\n\t\t\t\tCodeSplitters.pickInitialLoadSequence(logger, jprogram, config);\n\t\t\t}\n\t\t\tImplementClassLiteralsAsFields.exec(jprogram, shouldOptimize());\n\t\t\t// TODO(stalcup): hide metrics gathering in a callback or subclass\n\t\t\tlogAstTypeMetrics(precompilationMetrics);\n\t\t\t// (4) Construct and return a value.\n\t\t\tEvent createUnifiedAstEvent = SpeedTracerLogger\n\t\t\t\t\t.start(CompilerEventType.CREATE_UNIFIED_AST);\n\t\t\tUnifiedAst result = new UnifiedAst(options,\n\t\t\t\t\tnew AST(jprogram, jsProgram), singlePermutation,\n\t\t\t\t\tRecordRebinds.exec(jprogram));\n\t\t\tcreateUnifiedAstEvent.end();\n\t\t\treturn result;\n\t\t} catch (Throwable e) {\n\t\t\tthrow CompilationProblemReporter.logAndTranslateException(logger,\n\t\t\t\t\te);\n\t\t}\n\t}", "InstrumentedType withModifiers(int modifiers);", "public void mutate() {\n \t//POEY comment: for initialise() -> jasmine.gp.nodes.ercs\n //such as CustomRangeIntegerERC.java, PercentageERC.java, BoolERC.java \n \tsetValue(initialise());\n }", "public void testMethodInfo885() throws Exception {\n\t\tClassInfo var2769 = instantiateClassInfo424();\n\t\tLocalVariableInfo var2770 = instantiateLocalVariableInfo423();\n\t\tList<ClassInfo> var2764 = Collections.emptyList();\n\t\tList<ParameterInfo> var2766 = Collections.emptyList();\n\t\tList<LocalVariableInfo> var2767 = Collections.emptyList();\n\t\tList<Operation> var2768 = Collections.emptyList();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tMethodInfo var2772 = new MethodInfo(var2769, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList());\n\t\tClassInfo var2765 = new ClassInfo(\"super\", false, null, var2764, null);\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tClassInfo var2771 = new ClassInfo(\"super\", false, var2765, var2764,\n\t\t\t\tnull);\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.getSetters();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2769.getSetters();\n\t\tvar2772.isSetter();\n\t\tvar2772.isSetter();\n\t}", "@Test(timeout = 4000)\n public void test33() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(32767);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"tE\";\n stringArray0[1] = \"RuntimeInvisibleParameterAnnotations\";\n stringArray0[2] = \"oG0Y(?Kt\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 32767, \"LocalVariableTable\", \"S&D$-ctBdre@#\", \"LocalVariableTable\", stringArray0, false, false);\n MethodWriter methodWriter1 = classWriter0.firstMethod;\n Object object0 = new Object();\n MethodWriter methodWriter2 = new MethodWriter(classWriter0, (-488), \"tE\", \"S&D$-ctBdre@#\", \"RuntimeInvisibleParameterAnnotations\", stringArray0, false, false);\n int int0 = 2282;\n Object[] objectArray0 = new Object[4];\n objectArray0[0] = (Object) \"oG0Y(?Kt\";\n objectArray0[1] = (Object) \"S&D$-ctBdre@#\";\n objectArray0[2] = (Object) \"RuntimeInvisibleParameterAnnotations\";\n objectArray0[3] = (Object) \"&h'pH__a\";\n // Undeclared exception!\n try { \n methodWriter2.visitFrame(1, 2282, objectArray0, 2, stringArray0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 4\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "public void executeForce(MethodInfo method, Vector localVariables,\n OperandStack callerStack, BytecodeVerifier bytecodeVerifier) {\n try {\n Frame frame = bytecodeVerifier.getFrame();\n Vector callingParameters = bytecodeVerifier.getMethodCallingParameters();\n executeInstructions(bytecodeVerifier, callerStack, localVariables);\n /*GCType retType = FunctionStateRecorder.getInstanceOf().\n getFunctionReturnType(method, localVariables);\n if (retType != null) {\n lastBytecodeVerifier.addReturnType(retType);\n }*/\n workAfterMethodExecuted(method, frame, callerStack,\n lastBytecodeVerifier.getReturnType(),\n callingParameters);\n\n } catch (Exception d) {\n d.printStackTrace();\n Miscellaneous.exit();\n }\n }", "public void testMethodInfo888() throws Exception {\n\t\tClassInfo var2785 = instantiateClassInfo430();\n\t\tFieldInfo var2786 = instantiateFieldInfo429();\n\t\tList<ClassInfo> var2764 = Collections.emptyList();\n\t\tList<ParameterInfo> var2766 = Collections.emptyList();\n\t\tList<LocalVariableInfo> var2767 = Collections.emptyList();\n\t\tList<Operation> var2768 = Collections.emptyList();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tMethodInfo var2787 = new MethodInfo(var2785, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList());\n\t\tClassInfo var2765 = new ClassInfo(\"super\", false, null, var2764, null);\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tClassInfo var2771 = new ClassInfo(\"super\", false, var2765, var2764,\n\t\t\t\tnull);\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2785.getSetters();\n\t\tvar2787.isSetter();\n\t\tvar2787.isSetter();\n\t}", "@Test(timeout = 4000)\n public void test107() throws Throwable {\n int int0 = 0;\n ClassWriter classWriter0 = new ClassWriter(0);\n String string0 = \"Code\";\n String[] stringArray0 = new String[6];\n stringArray0[0] = \"Code\";\n stringArray0[1] = \"Code\";\n stringArray0[2] = \"Code\";\n classWriter0.addUninitializedType(\"{=k(UmyU|{qe`7t,\", 0);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n stringArray0[3] = \"Code\";\n stringArray0[4] = \"Code\";\n stringArray0[5] = \"Code\";\n MethodWriter methodWriter0 = new MethodWriter(classWriter0, 1, \"Code\", \"Code\", \"Code\", stringArray0, false, false);\n // Undeclared exception!\n try { \n methodWriter0.visitFrame(0, 0, stringArray0, 182, stringArray0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 6\n //\n verifyException(\"org.objectweb.asm.jip.MethodWriter\", e);\n }\n }", "public void setX(int r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.renderscript.AllocationAdapter.setX(int):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.renderscript.AllocationAdapter.setX(int):void\");\n }", "@Override\r\n\tpublic boolean manipulate() {\n\t\tStatement statement = mp.getStatement();\r\n\t\tStatement ingredStatementCopy = (Statement) ASTNode.copySubtree(statement.getAST(), ingredStatement);\r\n\t\trewriter.replace(statement, ingredStatementCopy, null);\r\n\t\treturn true;\r\n\t}", "void genAddressCode(FuncDecl curFunc) {\n\tif (index == null) {\n\t Code.genInstr(\"\", \"leal\", declRef.assemblerName+\",%eax\", varName);\n\t} else {\n\t index.genCode(curFunc);\n\t if (declRef.type instanceof ArrayType) {\n\t\tCode.genInstr(\"\", \"leal\", declRef.assemblerName+\",%edx\", \n\t\t\t varName+\"[...]\");\n\t } else {\n\t\tCode.genInstr(\"\", \"movl\", declRef.assemblerName+\",%edx\", \n\t\t\t varName+\"[...]\");\n\t }\n\t Code.genInstr(\"\", \"leal\", \"(%edx,%eax,4),%eax\", \"\");\n\t}\n }", "@Deprecated\n public void setMemberVariables(List<Variable> vars) {\n if (isImmutable())\n throw new IllegalStateException(\"Cant modify\");\n members = new ArrayList<>();\n memberHash = new HashMap<>(2 * vars.size());\n for (Variable v : vars) {\n addMemberVariable(v);\n }\n }", "@Override\n public void codegen(Emitter output) {\n }", "public void generateByteCode(Optimizer opt) {}", "public void genCode(CodeFile code) {\n\t\t\n\t}" ]
[ "0.67733073", "0.6123009", "0.5922236", "0.5712601", "0.55165625", "0.5491389", "0.54529005", "0.5060484", "0.5051569", "0.4885203", "0.48167723", "0.4808702", "0.4749391", "0.4748983", "0.47335762", "0.47117049", "0.46849456", "0.46834418", "0.46679497", "0.4601501", "0.4597684", "0.45844668", "0.4579791", "0.45794585", "0.4520353", "0.45180076", "0.45155525", "0.45141554", "0.45005345", "0.44917047", "0.44690517", "0.4462587", "0.44595262", "0.44577497", "0.4457064", "0.44420502", "0.44396204", "0.44383132", "0.44293404", "0.44176504", "0.44151866", "0.44147357", "0.44091493", "0.43849367", "0.43822616", "0.43793753", "0.43703535", "0.43685415", "0.43542174", "0.43539873", "0.43518695", "0.4350758", "0.43486112", "0.43338636", "0.4330679", "0.43179142", "0.4295712", "0.4294908", "0.42900053", "0.4280236", "0.42742527", "0.42662027", "0.42608935", "0.4256475", "0.42255774", "0.42244065", "0.4220519", "0.42143828", "0.42090645", "0.42049313", "0.419261", "0.41875193", "0.4185158", "0.41829857", "0.41669226", "0.41486552", "0.41469455", "0.41463447", "0.4142595", "0.41411608", "0.4140913", "0.41398126", "0.41302225", "0.41215667", "0.41101757", "0.4107406", "0.41073295", "0.41061094", "0.41013086", "0.40973338", "0.4097153", "0.40902874", "0.4081158", "0.40805313", "0.4078074", "0.40745446", "0.40716428", "0.40655965", "0.40588343", "0.4056037" ]
0.7767812
0
GIVEN a requestObject to be converted
@Test public void shouldConvertATransactionMetricsRequestToTransactionMetric() { TransactionMetricsRequest transactionMetricsRequest = from(TransactionMetricsRequest.class).gimme(TransactionMetricsRequestTemplate.INVALID_REQUEST_OLD_2016); // WHEN I try to convert the object TransactionMetric transactionMetricConverted = transactionMetricsRequestToTransactionMetric.convert(transactionMetricsRequest); // THEN it should be converted successfully then(transactionMetricConverted.getTime()).isEqualTo(LocalDateTime.of(2016, 11, 3, 16, 56, 44)); then(transactionMetricConverted.getAmount()).isEqualTo(12.3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TO fromObject(CONTEXT context, final FROM obj);", "@Override\n public BookDto convertToDto(final HttpServletRequest request) {\n try {\n return BookDto.builder()\n .id(Integer.parseInt(request.getParameter(\"id\")))\n .title(request.getParameter(\"title\"))\n .publisher(request.getParameter(\"publisher\"))\n .publishDate(Integer.parseInt(request.getParameter(\"publishDate\")))\n .pageCount(Integer.parseInt(request.getParameter(\"pageCount\")))\n .genres(Arrays.asList(request.getParameterValues(\"genres\")))\n .authors(Arrays.asList(request.getParameterValues(\"authors\")))\n .isbn(request.getParameter(\"ISBN\"))\n .description(request.getParameter(\"description\"))\n .totalAmount(Integer.parseInt(request.getParameter(\"totalAmount\")))\n .availableAmount(Integer.parseInt(request.getParameter(\"availableAmount\")))\n .covers(Arrays.asList(fileUtility.getUniqueName(request)))\n .readerCardDtos(requestReaderCardDtoListConverter.convertToDto(request))\n .build();\n } catch (IOException e) {\n LOGGER.debug(\"Convert request to BookDto error.\", e);\n } catch (ServletException e) {\n LOGGER.debug(\"Convert request to BookDto error.\", e);\n }\n return null;\n }", "public static Payload convert(Request request) {\n \n Metadata newMeta = Metadata.newBuilder().setType(request.getClass().getSimpleName())\n .setClientIp(NetUtils.localIP()).putAllHeaders(request.getHeaders()).build();\n \n byte[] jsonBytes = convertRequestToByte(request);\n \n Payload.Builder builder = Payload.newBuilder();\n \n return builder\n .setBody(Any.newBuilder().setValue(UnsafeByteOperations.unsafeWrap(jsonBytes)))\n .setMetadata(newMeta).build();\n \n }", "public ValidateObject(String requestId, LocalDate onDate, O object) {\n this.requestId = requestId;\n this.onDate = onDate;\n this.object = object;\n }", "private Object deserializeObjectFromRequest(String mimeInputFormat,\n\t\tIWebSerialDeserial serialDeserial)\n\t{\n\t\tWebRequest servletRequest = AbstractRestResource.getCurrentWebRequest();\n\n\t\treturn serialDeserial.requestToObject(servletRequest, parameterClass, mimeInputFormat);\n\t}", "public static Payload convert(Request request, RequestMeta meta) {\n //meta.\n Payload.Builder payloadBuilder = Payload.newBuilder();\n Metadata.Builder metaBuilder = Metadata.newBuilder();\n if (meta != null) {\n metaBuilder.putAllHeaders(request.getHeaders()).setType(request.getClass().getSimpleName());\n }\n metaBuilder.setClientIp(NetUtils.localIP());\n payloadBuilder.setMetadata(metaBuilder.build());\n \n // request body .\n byte[] jsonBytes = convertRequestToByte(request);\n return payloadBuilder\n .setBody(Any.newBuilder().setValue(UnsafeByteOperations.unsafeWrap(jsonBytes)))\n .build();\n \n }", "Object transform(Object o);", "TypedRequest createTypedRequest();", "private <T> T formatObject(String objectName, JSONObject object, Class objectClass){\n Gson gson = new Gson();\n String stringObject = object.getJSONObject(objectName).toString();\n T formattedObject = (T) gson.fromJson(stringObject,objectClass);\n return formattedObject;\n }", "@Override\n\tpublic InterChildrenRequest prepareRequest(IntercastRequest request)\n\t{\n\t\treturn null;\n\t}", "public T caseRequestBaseType(RequestBaseType object) {\n\t\treturn null;\n\t}", "public abstract Object deserialize(Object object);", "protected abstract Object transform(Object o);", "public static Object dispatch(Object object){\n RPCCommonReqDTO rpcCommonReqDTO = (RPCCommonReqDTO)object;\n String methodName = rpcCommonReqDTO.getMethodName();\n String classPath = rpcCommonReqDTO.getClassPath();\n Object[] args = rpcCommonReqDTO.getArgs();\n Class[] types = null;\n Object resObject = null;\n if(args != null && args.length > 0) {\n types = new Class[args.length];\n for (int i = 0; i < types.length; i++) {\n types[i] = args[i].getClass();\n }\n }\n //\n try {\n Class<?> aClass = Class.forName(classPath);\n Method method = aClass.getDeclaredMethod(methodName, types);\n resObject = method.invoke(aClass.newInstance(), args);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n return resObject;\n }", "public Object toJava(final Object object) {\n if ((object == null) || (_convertTo == null)) {\n return object;\n }\n return _convertTo.convert(object);\n }", "public AkismetCommentData convert(HttpServletRequest servletRequest, T document, BaseDocumentRepresentation representation);", "Object decodeObject(Object value);", "public String processMsg(RequestObject reqObj);", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private ObjectNode ProcessObject(RDFNode node){\n if(node.isLiteral()){\n //handle literal\n return TransformUtils.GenerateLiteralJsonObject(mapper, node.asLiteral(), null);\n }\n else {\n //else handle resource\n return ProcessResource(node.asResource());\n }\n }", "@Override\n\tprotected VoiceMessage convert(Map<String, String> requestMap)\n\t\t\tthrows Exception {\n\t\tVoiceMessage voiceMessage = new VoiceMessage();\n\t\tvoiceMessage\n\t\t\t\t.setCreateTime(Long.parseLong(requestMap.get(\"CreateTime\")));\n\t\tvoiceMessage.setFormat(requestMap.get(\"Format\"));\n\t\tvoiceMessage.setFromUserName(requestMap.get(\"FromUserName\"));\n\t\tvoiceMessage.setMediaId(requestMap.get(\"MediaId\"));\n\t\tvoiceMessage.setMsgId(Long.parseLong(requestMap.get(\"MsgId\")));\n\t\tvoiceMessage.setMsgType(requestMap.get(\"MsgType\"));\n\t\tvoiceMessage.setToUserName(requestMap.get(\"ToUserName\"));\n\t\tvoiceMessage.setRecognition(requestMap.get(\"Recognition\"));\n\t\treturn voiceMessage;\n\t}", "<T> T convert(Object o, Class<T> type);", "@SuppressWarnings({\"unchecked\"})\n private void readObject(final java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {\n /** Response string */\n this.responseString = (String) in.readObject();\n\n /** Code */\n this.code = in.readInt();\n\n /** Response headers */\n final Map headers = (Map) in.readObject();\n this.headers.clear();\n this.headers.putAll(headers);\n\n /** Response body */\n final byte[] body = (byte[]) in.readObject();\n //System.out.println(\"[] body \"+body.length );\n sosi = new ServletByteArrayOutputStream();\n sosi.write(body);\n writer = new PrintWriter(sosi);\n\n }", "void convert(ConversionPostedData postedData);", "private <T> T convert(String json, Type resultObject) {\n\t\tGson gson = new GsonBuilder().create();\n\t\treturn gson.fromJson(json, resultObject);\n\t}", "Object encodeObject(Object value);", "FROM toObject(CONTEXT context, final TO value);", "MovilizerRequest getRequestFromString(String requestString);", "public Object convert(Object fromValue) {\n RawObject oldDataRawObject = (RawObject) fromValue;\n Object[] oldElements = oldDataRawObject.getElements();\n Map<String, Object> integerClassValues = \n new HashMap<String, Object>();\n integerClassValues.put(\"data\", oldElements[0]);\n RawObject integerClassObject = \n new RawObject(integerClassType, integerClassValues, null);\n RawObject[] newElements = new RawObject[1];\n newElements[0] = integerClassObject;\n RawObject newDataRawObject = \n new RawObject(newDataType, newElements);\n return newDataRawObject;\n }", "public String toJsonfrmObject(Object object) {\n try {\n ObjectMapper mapper = new ObjectMapper();\n mapper.setDateFormat(simpleDateFormat);\n return mapper.writeValueAsString(object);\n } catch (IOException e) {\n logger.error(\"Invalid JSON!\", e);\n }\n return \"\";\n }", "private static void setRequest(Object request) {\n\t\tif (null != request) {\n\t\t\tMDC.put(ApplicationConstants.REQUEST, request.toString());\n\t\t}\n\t}", "byte[] toJson(Object object) throws Exception {\r\n return this.mapper.writeValueAsString(object).getBytes();\r\n }", "@POST( CONTROLLER )\n VersionedObjectKey createObject( @Body CreateObjectRequest request );", "public ResultVO readService(Object object);", "Item convertToItem(Object value) throws XQException;", "private Object preprocessObject( Object v )\n\t{\n\t\t\n\t\tif (v instanceof String)\n\t\t{\n\t\t\tString n_o = (String) v;\n\t\t\t\n\t\t\tif (n_o.length() > this._char_limit)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tn_o = n_o.substring(0, this._char_limit);\n\t\t\t\tv = (Object) n_o;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn v;\n\t\t\n\t}", "private void serializeObject(final Object object, final StringBuffer buffer)\n {\n serializeObject(object, buffer, true);\n }", "protected abstract Object toObject(InputStream inputStream, Type targetType) throws BeanConversionException;", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\t@Override\n\tpublic void doWithRequest(ClientHttpRequest request) throws IOException {\n\t\trequest.getHeaders().set( \"Accept\", \"application/json\" );\n\t\trequest.getHeaders().set(\"Content-Type\", MediaType.APPLICATION_JSON.toString());\n\t\tif (headerAttrs != null) {\n\t\t\tfor (String key : headerAttrs.keySet()) {\n\t\t\t\tString value = headerAttrs.get(key);\n\t\t\t\trequest.getHeaders().set(key, value);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// next if there is a body add it to request\n\t\tif (requestBody != null){\n\t\t\tAssert.notEmpty(messageConverters, \"'messageConverters' must not be empty\");\n\t\t\tClass<?> requestType = requestBody.getClass();\n\t\t\tfor (HttpMessageConverter messageConverter : messageConverters) {\n\t\t\t\tif (messageConverter.canWrite(requestType, MediaType.APPLICATION_JSON)) {\n\t\t\t\t\tmessageConverter.write(requestBody, MediaType.APPLICATION_JSON, request);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void remapRequest(HttpServletRequest request) throws Exception {\n Request connectorReq = (Request) request;\n\n MappingData mappingData = connectorReq.getMappingData();\n mappingData.recycle();\n\n connectorReq.getConnector().\n getMapper().map(connectorReq.getCoyoteRequest().serverName(),\n connectorReq.getCoyoteRequest().decodedURI(), null,\n mappingData);\n\n connectorReq.setContext((Context) connectorReq.getMappingData().context);\n connectorReq.setWrapper((Wrapper) connectorReq.getMappingData().wrapper);\n }", "public ModelObject read(ModelObject obj);", "public static void encodeObject(Object obj,String inEncodeType,String outEncodeType)throws Exception {\n try{\n Class destClass=obj.getClass();\n Method[] methods = destClass.getDeclaredMethods();\n for (int i = 0; i < methods.length; i++) {\n Method dm = methods[i];\n String methodName = dm.getName();\n String methodValue = null;\n String methodType=methodName.substring(0, 3);\n\n if (methodType.equalsIgnoreCase(\"set\")) {\n\n methodName = methodName.substring(3);\n try {\n //get sourObject value\n Method sm = destClass.getDeclaredMethod(\"get\" + methodName, null);\n methodValue = (String) sm.invoke(obj, null);\n //set destObject value\n if(methodValue!=null){\n //System.out.println(methodName+\"--\"+methodValue);\n\n Object[] args = {new String(methodValue.getBytes(inEncodeType), outEncodeType)};\n dm.invoke(obj, args);\n }\n }\n catch (Exception ex) {\n //check sourObject no this method,do nothing.\n }\n }\n }\n }catch (Exception ex) {\n\n throw ex;\n }\n\n }", "String requestToString(MovilizerRequest request);", "@Override\n\tpublic Message toMessage(Object object, Session session) throws JMSException, MessageConversionException {\n\t\tMessage msg = delegate.toMessage(object, session);\n\t\tsetRequestIdProperty(object, msg);\n\t\treturn msg;\n\t}", "public abstract HttpResponse<String> buildAction(@Nullable Object object) throws Exception;", "protected void populateBeanFromParameters(Object bean, HttpServletRequest request) {\n\t\tMap<String,String> parameters = getParametersMap(request) ;\n\t\tBeanMapper mapper = new BeanMapper();\n\t\tmapper.mapToBean(parameters, bean);\n\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static <T> T cast(Object object) {\n\n\t\treturn (T) object;\n\t}", "private synchronized void morphRequest (SearchHotelRequestDTO requestDTO) {\r\n\t\t\r\n\t\ttry {\r\n\t\tDate fromDateOld = new SimpleDateFormat(\"yyyy-MM-dd\").parse(requestDTO.getFromDate());\r\n\t\tDate toDateOld = new SimpleDateFormat(\"yyyy-MM-dd\").parse(requestDTO.getToDate());\r\n\t\t\r\n\t\tlong diff = toDateOld.getTime() - fromDateOld.getTime();\r\n\t\tlogger.trace(\"Number of Days: \" + TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS));\r\n\t\tint numOfDays = (int) TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS);\r\n\t\trequestDTO.getAdditionalData().put(\"numberOfDays\", numOfDays);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public ImageToObjectRequest(ImageToObjectRequest source) {\n if (source.ImageInfoList != null) {\n this.ImageInfoList = new ImageInfo[source.ImageInfoList.length];\n for (int i = 0; i < source.ImageInfoList.length; i++) {\n this.ImageInfoList[i] = new ImageInfo(source.ImageInfoList[i]);\n }\n }\n if (source.HandleParam != null) {\n this.HandleParam = new HandleParam(source.HandleParam);\n }\n if (source.Type != null) {\n this.Type = new Long(source.Type);\n }\n if (source.IsUsedClassify != null) {\n this.IsUsedClassify = new Boolean(source.IsUsedClassify);\n }\n if (source.UserType != null) {\n this.UserType = new Long(source.UserType);\n }\n if (source.ReportTypeVersion != null) {\n this.ReportTypeVersion = new ReportTypeVersion[source.ReportTypeVersion.length];\n for (int i = 0; i < source.ReportTypeVersion.length; i++) {\n this.ReportTypeVersion[i] = new ReportTypeVersion(source.ReportTypeVersion[i]);\n }\n }\n }", "Object handle(Object request);", "@SuppressWarnings( { \"incomplete-switch\", \"rawtypes\", \"unchecked\" } )\n XmlElement objectToXml(Object o)\n {\n ElementType type = m_simpleTypes.get(o.getClass());\n if (type != null)\n {\n switch (type)\n {\n case REAL:\n return new XmlElement(\"real\", o.toString());\n case INTEGER:\n return new XmlElement(\"integer\", o.toString());\n case TRUE:\n return new XmlElement(((Boolean) o).booleanValue() ? \"true\" : \"false\");\n case DATE:\n return new XmlElement(\"date\", m_dateFormat.format((Date) o));\n case STRING:\n return new XmlElement(\"string\", (String) o);\n case DATA:\n return new XmlElement(\"data\", base64encode((byte[]) o));\n }\n }\n if (o instanceof Map)\n {\n return toXmlDict((Map) o);\n }\n else if (o instanceof List)\n {\n return toXmlArray((List) o);\n }\n else throw new RuntimeException(\"Cannot use \" + o.getClass() + \" in plist.\");\n }", "public Converter<?, RequestBody> requestBodyConverter(Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, Retrofit retrofit) {\n/* 38 */ if (String.class.equals(type)) {\n/* 39 */ return new Converter<String, RequestBody>()\n/* */ {\n/* */ public RequestBody convert(String value) throws IOException {\n/* 42 */ return RequestBody.create(ToStringConverterFactory.MEDIA_TYPE, value);\n/* */ }\n/* */ };\n/* */ }\n/* 46 */ return null;\n/* */ }", "@Test\n public void shouldConvertATransactionMetricsRequestToTransactionMetricActual() {\n TransactionMetricsRequest transactionMetricsRequest =\n from(TransactionMetricsRequest.class).gimme(TransactionMetricsRequestTemplate.ACTUAL_EPOCH_MILLIS);\n\n // WHEN I try to convert the object\n TransactionMetric transactionMetricConverted = transactionMetricsRequestToTransactionMetric.convert(transactionMetricsRequest);\n\n // THEN it should be converted successfully\n then(transactionMetricConverted.getTime()).isEqualTo(LocalDateTime.of(2018, 6, 24, 6, 24, 54));\n then(transactionMetricConverted.getAmount()).isEqualTo(12.3);\n }", "Object convert(Object source, TypeToken<?> targetTypeToken);", "@Override\n\tpublic void dataObtained(final I object) {\n\t\t\n\t\t\tI filtered = filter.filter(object);\n\t\t\tO translated = translator.translate(filtered);\n\t\t\tif (translated != null){\n\t\t\t\trouter.send(translated);\n\t\t\t}\t\t\n\t\t\n\t}", "public <T> Object transforms(Object object, Class<T> cls) {\n\t\treturn modelMapper.map(object, cls);\n\t}", "JSONStreamAware processRequest(HttpServletRequest paramHttpServletRequest)\r\n/* 18: */ {\r\n/* 19:19 */ JSONObject localJSONObject = new JSONObject();\r\n/* 20:20 */ localJSONObject.put(\"host\", paramHttpServletRequest.getRemoteHost());\r\n/* 21:21 */ localJSONObject.put(\"address\", paramHttpServletRequest.getRemoteAddr());\r\n/* 22:22 */ return localJSONObject;\r\n/* 23: */ }", "private Object[] recebendoObjetos(HttpServletRequest httpServletRequest) throws FileUploadException {\r\n\t\t\r\n\t\tObject[] parametrosFormulario = new Object[2]; \r\n\t\t\r\n\t\tDiskFileUpload upload = new DiskFileUpload();\r\n\t\t\r\n\t\tList itens = upload.parseRequest(httpServletRequest);\r\n\t\tFileItem fileItem = null;\r\n\t\t\r\n\t\tif (itens != null) {\r\n\t\t\t\r\n\t\t\tIterator iter = itens.iterator();\r\n\t\t\t\r\n\t\t\twhile (iter.hasNext()) {\r\n\t\t\t\t\r\n\t\t\t\tfileItem = (FileItem) iter.next();\r\n\t\t\t\t\r\n\t\t\t\tif (fileItem.getFieldName().equals(\"uploadPicture\")) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tparametrosFormulario[0] = fileItem;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (fileItem.getFieldName().equals(\"idEmpresa\")) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tparametrosFormulario[1] = fileItem.getString();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn parametrosFormulario;\r\n\t}", "private void changeRequest(InstanceRequest request) {\r\n\t\t\r\n\t}", "private void processObject( HttpServletResponse oResponse, Object oViewObject ) throws ViewExecutorException\r\n {\n try\r\n {\r\n oResponse.getWriter().print( oViewObject );\r\n }\r\n catch ( IOException e )\r\n {\r\n throw new ViewExecutorException( \"View \" + oViewObject.getClass().getName() + \", generic object view I/O error\", e );\r\n }\r\n }", "@Override\n\tpublic Object convert(Class<?> desiredType, Object in) throws Exception {\n\t\treturn null;\n\t}", "public final void setIncomingRequest_SDEObject(sdemigration.proxies.SDEObject incomingrequest_sdeobject)\r\n\t{\r\n\t\tsetIncomingRequest_SDEObject(getContext(), incomingrequest_sdeobject);\r\n\t}", "@Test\n public void readSystemObjectClassAppointmentRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AppointmentRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return AppointmentRequest properly\", object.getClass(), actual.getClass());\n }", "public Object toSQL(final Object object) {\n if ((object == null) || (_convertFrom == null)) {\n return object;\n }\n return _convertFrom.convert(object);\n }", "@SuppressWarnings(\"unchecked\")\n static <T> T reserialize(T object) {\n checkNotNull(object);\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n try {\n ObjectOutputStream out = new ObjectOutputStream(bytes);\n out.writeObject(object);\n ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()));\n return (T) in.readObject();\n } catch (IOException | ClassNotFoundException e) {\n throw new RuntimeException(e);\n }\n }", "void projectUriRequest(Request request);", "public String prepareRequestToHost(Object request) {\n\t\tString clRequest = null;\n\t\tUserAuthRequestAndTXLifeRequest userRequest = ((NbaTXLife) request).getTXLife().getUserAuthRequestAndTXLifeRequest();\n\t\tif (userRequest != null && userRequest.getTXLifeRequestCount() > 0) {\n\t\t\tTXLifeRequest txRequest = userRequest.getTXLifeRequestAt(0);\n\t\t\tlong transType = txRequest.getTransType();\n\t\t\tlong transSubType = txRequest.getTransSubType();\n\t\t\tif (transType == NbaOliConstants.TC_TYPE_NEWBUSSUBMISSION && transSubType == NbaOliConstants.TC_SUBTYPE_BACKEND_PRINT) {\n\t\t\t\t// TODO determine why a new instance of this same class is needed\n\t\t\t\tNbaCyberPrintRequests cyberRequest = new NbaCyberPrintRequests();\n\t\t\t\ttry {\n\t\t\t\t\tclRequest = cyberRequest.createPrintRequest((NbaTXLife) request);\n\t\t\t\t} catch (NbaBaseException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new RuntimeException(new NbaBaseException(\"Invalid Print Type Requested\"));\n\t\t\t}\n\t\t\tgetLogger().logDebug(clRequest);\n\t\t}\n\t\treturn clRequest;\n\t}", "protected abstract T prepareObject(String extracted);", "public void setParaToRequest(String key, Object obj)\n\t{\n\t\t\n\t\t\n\t}", "public abstract VKRequest mo118416a(JSONObject jSONObject);", "private Response createObjectReturnResponse(Class clazz, Request request) {\n Object object = ContextMap.getInstance().getContext().getObject(clazz);\n // if it could not create the object, will return a proper error message\n if (object == null) {\n return Error(request, \"No object created from this class: \" + clazz.getName()).toResponse();\n } else {\n try {\n return runMethodReturnResponse(object, request);\n } catch (Exception e) {\n e.printStackTrace();\n return Error(request, \"could not handle method\").exception(e).toResponse();\n }\n }\n }", "public static byte[] toBytes(Object object) {\n\t\tif(object instanceof Boolean) {\n\t\t\treturn new byte[] {\n\t\t\t\t\t(boolean) object ? (byte) 1 : (byte) 0\n\t\t\t};\n\t\t} else if (object instanceof Byte) {\n\t\t\treturn new byte[] {\n\t\t\t\t\t(byte) object\n\t\t\t};\n\t\t} else if (object instanceof Short) {\n\t\t\tByteBuffer buffer = ByteBuffer.allocate(2);\n\t\t\tbuffer.putShort((short) object);\n\t\t\treturn buffer.array();\n\t\t} else if (object instanceof Integer) {\n\t\t\tByteBuffer buffer = ByteBuffer.allocate(4);\n\t\t\tbuffer.putInt((int) object);\n\t\t\treturn buffer.array();\n\t\t} else if (object instanceof Long) {\n\t\t\tByteBuffer buffer = ByteBuffer.allocate(8);\n\t\t\tbuffer.putLong((long) object);\n\t\t\treturn buffer.array();\n\t\t} else if (object instanceof Character) {\n\t\t\tByteBuffer buffer = ByteBuffer.allocate(4);\n\t\t\tbuffer.putInt((char) object);\n\t\t\treturn buffer.array();\n\t\t} else if (object instanceof Float) {\n\t\t\tByteBuffer buffer = ByteBuffer.allocate(4);\n\t\t\tbuffer.putFloat((float) object);\n\t\t\treturn buffer.array();\n\t\t} else if (object instanceof Double) {\n\t\t\tByteBuffer buffer = ByteBuffer.allocate(8);\n\t\t\tbuffer.putDouble((double) object);\n\t\t\treturn buffer.array();\n\t\t} else if (object instanceof String) {\n\t\t\tbyte[] charset = ((String) object).getBytes();\n\t\t\tByteBuffer buffer = ByteBuffer.allocate(4+charset.length);\n\t\t\tbuffer.putInt(charset.length);\n\t\t\tbuffer.put(charset);\n\t\t\treturn buffer.array();\n\t\t} else {\n\t\t\tbyte[] charset = object.toString().getBytes();\n\t\t\tByteBuffer buffer = ByteBuffer.allocate(4+charset.length);\n\t\t\tbuffer.putInt(charset.length);\n\t\t\tbuffer.put(charset);\n\t\t\treturn buffer.array();\n\t\t}\n\t}", "protected abstract Object toObject(ByteBuffer content, Type targetType) throws BeanConversionException;", "@Override\n\tpublic String putObjectCore(Object object) {\n\t\treturn JSON.encode(object);\n\t}", "protected abstract ByteBuffer toMedia(Object object) throws BeanConversionException;", "Ticket ticketDTOToTicket(TicketDTO ticketDTO);", "T fromJson(Object source);", "private VwConstraintDefOracleBean fromObjectToBean(VwConstraintDef object) {\n VwConstraintDefOracleBean bean = new VwConstraintDefOracleBean();\n bean.setConsType(object.getConsType());\n bean.setConsName(object.getConsName());\n bean.setMainTable(object.getMainTable());\n bean.setRefTable(object.getRefTable());\n bean.setTable1(object.getTable1());\n bean.setCol1(object.getCol1());\n return bean;\n }", "public Object transform(Object input) {\n return input;\n }", "private ObjectNode makeRequest(final String api, final JsiiObjectRef objRef) {\n ObjectNode req = makeRequest(api);\n req.set(\"objref\", objRef.toJson());\n return req;\n }", "private Object processHttpRequestIfNecessary(Object argument) {\n\t\tif (argument instanceof HttpServletRequestWrapper) { // ShiroHttpServletRequest?\n\t\t\tHttpServletRequestWrapper wrap = (HttpServletRequestWrapper) argument;\n\t\t\t/*\n\t\t\t * Wrapping request with resolved XSS security.\n\t\t\t */\n\t\t\twrap.setRequest(resolver.newXssHttpRequestWrapper((HttpServletRequest) wrap.getRequest()));\n\t\t} else if (argument instanceof HttpServletRequest) {\n\t\t\targument = resolver.newXssHttpRequestWrapper((HttpServletRequest) argument);\n\t\t}\n\n\t\treturn argument;\n\t}", "@Override\r\n public byte[] encodeToBytes(Object object) throws Exception {\n return null;\r\n }", "public interface Request {\n public String toXml();\n\n\n public String getHandlerId();\n\n\n public String getRequestId();\n}", "public static interfacerequests.proxies.IncomingRequest initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject mendixObject)\r\n\t{\r\n\t\treturn new interfacerequests.proxies.IncomingRequest(context, mendixObject);\r\n\t}", "void decodeObject();", "@Test\n public void testToFromObjectinvalid() throws GeoportalException, JsonHelperException {\n\n GeoportalRequestObject requestObject = new GeoportalRequestDataObject(random.nextDouble(), random.nextDouble());\n String jsonObject = JsonHelper.toJson(requestObject);\n assertNotNull(jsonObject);\n\n for (int i = 0; i < 9; i++) {\n if (jsonObject.contains(\"\" + i)) {\n jsonObject = jsonObject.replace(\"\" + i, \"\" + (i + 1));\n break;\n }\n }\n GeoportalRequestObject restoredObject = JsonHelper.fromJson(jsonObject, GeoportalRequestDataObject.class);\n assertFalse(requestObject.equals(restoredObject));\n }", "Call mo35727a(Request request);", "Object read(Object inputObject, Settings settings);", "public static EvaluableRequest buildEvaluableRequest(String requestBody, String requestResourcePath, HttpServletRequest request) {\n // Create and fill an evaluable request object.\n EvaluableRequest evaluableRequest = new EvaluableRequest(requestBody,\n requestResourcePath != null ? requestResourcePath.split(\"/\") : null);\n // Adding query parameters...\n Map<String, String> evaluableParams = new HashMap<>();\n List<String> parameterNames = Collections.list(request.getParameterNames());\n for (String parameter : parameterNames) {\n evaluableParams.put(parameter, request.getParameter(parameter));\n }\n evaluableRequest.setParams(evaluableParams);\n // Adding headers...\n Map<String, String> evaluableHeaders = new HashMap<>();\n List<String> headerNames = Collections.list(request.getHeaderNames());\n for (String header : headerNames) {\n evaluableHeaders.put(header, request.getHeader(header));\n }\n evaluableRequest.setHeaders(evaluableHeaders);\n\n return evaluableRequest;\n }", "public V cast(Object object) {\n return valueClass.cast(object);\n }", "private void mapObject(Object obj) {\n if (!objectIdMap.containsKey(obj))\n objectIdMap.put(obj, objectIdMap.size());\n if (obj instanceof Map) {\n Map dict = (Map) obj;\n Set<Map.Entry<String, Object>> de = dict.entrySet();\n for (Map.Entry<String, Object> e : de)\n mapObject(e.getKey());\n for (Map.Entry<String, Object> e : de)\n mapObject(e.getValue());\n } else if (obj instanceof List) {\n List list = (List) obj;\n for (int i = 0; i < list.size(); i++)\n mapObject(list.get(i));\n } else if (obj instanceof String || obj instanceof Float || obj instanceof Double ||\n obj instanceof Integer || obj instanceof Long || obj instanceof byte[] ||\n obj instanceof Date || obj instanceof Boolean) {\n // do nothing.\n } else\n throw new IllegalStateException(\"Incompatible object \" + obj + \" found\");\n }", "final protected Object convertSpringProxyObj(final Object o) {\n\t\tif (o instanceof InfrastructureProxy)\n\t\t\treturn ((InfrastructureProxy)o).getWrappedObject();\n\t\telse\n\t\t\treturn o;\n\t}", "public Object readInternal(Class<? extends Object> clazz, HttpInputMessage inputMessage) throws IOException {\n return this.conversionService.convert(this.stringHttpMessageConverter.readInternal(String.class, inputMessage), clazz);\n }", "@Test\n public void readSystemObjectClassAccCrRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AccountCreationRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return AccountCreationRequest properly\", object.getClass(), actual.getClass());\n }", "private void processClientIQRequest(IQRequest request) throws Exception {\n\t\t\n\t\tString id = request.getTo().getNode();\n\t\tElement payload = request.getElement();\n\t\t\n\t\tJID fromJidInternal = getXmppFactory().createJID(getInternalDomain());\n\t\tJID toJidInternal = createInternalJid(id, request);\n\t\tif (request.getTo().getResource() != null) {\n\t\t\ttoJidInternal.setResource(request.getTo().getResource());\n\t\t}\n\n\t\tforwardIQRequest(fromJidInternal, toJidInternal, request, payload);\n\t}", "@SuppressWarnings(\"unchecked\")\n private <E> void handleRequest(ApiRequest<E> request) {\n\n try {\n apiAdapter\n .invokeAsync(request.target)\n .subscribe(new Responder<E>(request, this::writeResponse));\n } catch (Exception e) {\n System.out.println(\"Something went wrong while trying to invoke an ApiAdapter function\");\n e.printStackTrace();\n }\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n protected String convertObjectToJson(Object object) {\n try {\n Set<EventDataValue> eventDataValues =\n object == null ? Collections.emptySet() : (Set<EventDataValue>) object;\n\n Map<String, EventDataValue> tempMap = new HashMap<>();\n\n for (EventDataValue eventDataValue : eventDataValues) {\n tempMap.put(eventDataValue.getDataElement(), eventDataValue);\n }\n\n return writer.writeValueAsString(tempMap);\n } catch (IOException e) {\n throw new IllegalArgumentException(e);\n }\n }", "public static <T> T convert(Object object, Class<T> cls) {\n\t\treturn fullMapper.convertValue(object, cls);\n\t}", "public Object encode(Object obj) throws EncoderException {\n/* 316 */ if (obj == null)\n/* 317 */ return null; \n/* 318 */ if (obj instanceof byte[])\n/* 319 */ return encode((byte[])obj); \n/* 320 */ if (obj instanceof String) {\n/* 321 */ return encode((String)obj);\n/* */ }\n/* 323 */ throw new EncoderException(\"Objects of type \" + obj.getClass().getName() + \" cannot be URL encoded\");\n/* */ }", "public void setRequest(Map<String, Object> request)\r\n\t{\n\t\tthis.request = request;\r\n\t}" ]
[ "0.61846346", "0.5904997", "0.579815", "0.5713424", "0.56236935", "0.55910414", "0.55237395", "0.54956245", "0.5445602", "0.54151946", "0.5413684", "0.5395144", "0.5354648", "0.5346002", "0.5332674", "0.53267777", "0.5323976", "0.5319973", "0.53157806", "0.5303153", "0.5281854", "0.526763", "0.5250961", "0.52462673", "0.5231167", "0.5230648", "0.5204793", "0.52044797", "0.52037114", "0.51968724", "0.5182624", "0.51717913", "0.5164817", "0.51586944", "0.51467806", "0.51438594", "0.5121726", "0.51162624", "0.5107258", "0.5076948", "0.5068195", "0.5067868", "0.50674367", "0.5044351", "0.5043015", "0.5024268", "0.5018242", "0.5015911", "0.50152653", "0.5010189", "0.5008064", "0.5007762", "0.50063616", "0.49928916", "0.49916124", "0.49789", "0.4976438", "0.49755478", "0.49695826", "0.49679273", "0.49633223", "0.49627092", "0.494916", "0.4948857", "0.49479488", "0.4940502", "0.4934739", "0.4926165", "0.49254838", "0.49234006", "0.49232164", "0.49215457", "0.49145752", "0.4913413", "0.4912399", "0.49065375", "0.49053445", "0.4899404", "0.48962474", "0.48929134", "0.48891473", "0.48785838", "0.48785004", "0.4870191", "0.48660374", "0.48454112", "0.48418126", "0.48413113", "0.4840018", "0.48346534", "0.48146087", "0.48063523", "0.4805571", "0.48036018", "0.48026553", "0.4793582", "0.47930732", "0.47898868", "0.4784154", "0.47814584" ]
0.52460027
24
GIVEN a requestObject to be converted
@Test public void shouldConvertATransactionMetricsRequestToTransactionMetricActual() { TransactionMetricsRequest transactionMetricsRequest = from(TransactionMetricsRequest.class).gimme(TransactionMetricsRequestTemplate.ACTUAL_EPOCH_MILLIS); // WHEN I try to convert the object TransactionMetric transactionMetricConverted = transactionMetricsRequestToTransactionMetric.convert(transactionMetricsRequest); // THEN it should be converted successfully then(transactionMetricConverted.getTime()).isEqualTo(LocalDateTime.of(2018, 6, 24, 6, 24, 54)); then(transactionMetricConverted.getAmount()).isEqualTo(12.3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TO fromObject(CONTEXT context, final FROM obj);", "@Override\n public BookDto convertToDto(final HttpServletRequest request) {\n try {\n return BookDto.builder()\n .id(Integer.parseInt(request.getParameter(\"id\")))\n .title(request.getParameter(\"title\"))\n .publisher(request.getParameter(\"publisher\"))\n .publishDate(Integer.parseInt(request.getParameter(\"publishDate\")))\n .pageCount(Integer.parseInt(request.getParameter(\"pageCount\")))\n .genres(Arrays.asList(request.getParameterValues(\"genres\")))\n .authors(Arrays.asList(request.getParameterValues(\"authors\")))\n .isbn(request.getParameter(\"ISBN\"))\n .description(request.getParameter(\"description\"))\n .totalAmount(Integer.parseInt(request.getParameter(\"totalAmount\")))\n .availableAmount(Integer.parseInt(request.getParameter(\"availableAmount\")))\n .covers(Arrays.asList(fileUtility.getUniqueName(request)))\n .readerCardDtos(requestReaderCardDtoListConverter.convertToDto(request))\n .build();\n } catch (IOException e) {\n LOGGER.debug(\"Convert request to BookDto error.\", e);\n } catch (ServletException e) {\n LOGGER.debug(\"Convert request to BookDto error.\", e);\n }\n return null;\n }", "public static Payload convert(Request request) {\n \n Metadata newMeta = Metadata.newBuilder().setType(request.getClass().getSimpleName())\n .setClientIp(NetUtils.localIP()).putAllHeaders(request.getHeaders()).build();\n \n byte[] jsonBytes = convertRequestToByte(request);\n \n Payload.Builder builder = Payload.newBuilder();\n \n return builder\n .setBody(Any.newBuilder().setValue(UnsafeByteOperations.unsafeWrap(jsonBytes)))\n .setMetadata(newMeta).build();\n \n }", "public ValidateObject(String requestId, LocalDate onDate, O object) {\n this.requestId = requestId;\n this.onDate = onDate;\n this.object = object;\n }", "private Object deserializeObjectFromRequest(String mimeInputFormat,\n\t\tIWebSerialDeserial serialDeserial)\n\t{\n\t\tWebRequest servletRequest = AbstractRestResource.getCurrentWebRequest();\n\n\t\treturn serialDeserial.requestToObject(servletRequest, parameterClass, mimeInputFormat);\n\t}", "public static Payload convert(Request request, RequestMeta meta) {\n //meta.\n Payload.Builder payloadBuilder = Payload.newBuilder();\n Metadata.Builder metaBuilder = Metadata.newBuilder();\n if (meta != null) {\n metaBuilder.putAllHeaders(request.getHeaders()).setType(request.getClass().getSimpleName());\n }\n metaBuilder.setClientIp(NetUtils.localIP());\n payloadBuilder.setMetadata(metaBuilder.build());\n \n // request body .\n byte[] jsonBytes = convertRequestToByte(request);\n return payloadBuilder\n .setBody(Any.newBuilder().setValue(UnsafeByteOperations.unsafeWrap(jsonBytes)))\n .build();\n \n }", "Object transform(Object o);", "TypedRequest createTypedRequest();", "private <T> T formatObject(String objectName, JSONObject object, Class objectClass){\n Gson gson = new Gson();\n String stringObject = object.getJSONObject(objectName).toString();\n T formattedObject = (T) gson.fromJson(stringObject,objectClass);\n return formattedObject;\n }", "public T caseRequestBaseType(RequestBaseType object) {\n\t\treturn null;\n\t}", "@Override\n\tpublic InterChildrenRequest prepareRequest(IntercastRequest request)\n\t{\n\t\treturn null;\n\t}", "public abstract Object deserialize(Object object);", "protected abstract Object transform(Object o);", "public static Object dispatch(Object object){\n RPCCommonReqDTO rpcCommonReqDTO = (RPCCommonReqDTO)object;\n String methodName = rpcCommonReqDTO.getMethodName();\n String classPath = rpcCommonReqDTO.getClassPath();\n Object[] args = rpcCommonReqDTO.getArgs();\n Class[] types = null;\n Object resObject = null;\n if(args != null && args.length > 0) {\n types = new Class[args.length];\n for (int i = 0; i < types.length; i++) {\n types[i] = args[i].getClass();\n }\n }\n //\n try {\n Class<?> aClass = Class.forName(classPath);\n Method method = aClass.getDeclaredMethod(methodName, types);\n resObject = method.invoke(aClass.newInstance(), args);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n return resObject;\n }", "public Object toJava(final Object object) {\n if ((object == null) || (_convertTo == null)) {\n return object;\n }\n return _convertTo.convert(object);\n }", "public AkismetCommentData convert(HttpServletRequest servletRequest, T document, BaseDocumentRepresentation representation);", "Object decodeObject(Object value);", "public String processMsg(RequestObject reqObj);", "private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }", "private ObjectNode ProcessObject(RDFNode node){\n if(node.isLiteral()){\n //handle literal\n return TransformUtils.GenerateLiteralJsonObject(mapper, node.asLiteral(), null);\n }\n else {\n //else handle resource\n return ProcessResource(node.asResource());\n }\n }", "@Override\n\tprotected VoiceMessage convert(Map<String, String> requestMap)\n\t\t\tthrows Exception {\n\t\tVoiceMessage voiceMessage = new VoiceMessage();\n\t\tvoiceMessage\n\t\t\t\t.setCreateTime(Long.parseLong(requestMap.get(\"CreateTime\")));\n\t\tvoiceMessage.setFormat(requestMap.get(\"Format\"));\n\t\tvoiceMessage.setFromUserName(requestMap.get(\"FromUserName\"));\n\t\tvoiceMessage.setMediaId(requestMap.get(\"MediaId\"));\n\t\tvoiceMessage.setMsgId(Long.parseLong(requestMap.get(\"MsgId\")));\n\t\tvoiceMessage.setMsgType(requestMap.get(\"MsgType\"));\n\t\tvoiceMessage.setToUserName(requestMap.get(\"ToUserName\"));\n\t\tvoiceMessage.setRecognition(requestMap.get(\"Recognition\"));\n\t\treturn voiceMessage;\n\t}", "<T> T convert(Object o, Class<T> type);", "@SuppressWarnings({\"unchecked\"})\n private void readObject(final java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {\n /** Response string */\n this.responseString = (String) in.readObject();\n\n /** Code */\n this.code = in.readInt();\n\n /** Response headers */\n final Map headers = (Map) in.readObject();\n this.headers.clear();\n this.headers.putAll(headers);\n\n /** Response body */\n final byte[] body = (byte[]) in.readObject();\n //System.out.println(\"[] body \"+body.length );\n sosi = new ServletByteArrayOutputStream();\n sosi.write(body);\n writer = new PrintWriter(sosi);\n\n }", "void convert(ConversionPostedData postedData);", "@Test\n public void shouldConvertATransactionMetricsRequestToTransactionMetric() {\n TransactionMetricsRequest transactionMetricsRequest =\n from(TransactionMetricsRequest.class).gimme(TransactionMetricsRequestTemplate.INVALID_REQUEST_OLD_2016);\n\n // WHEN I try to convert the object\n TransactionMetric transactionMetricConverted = transactionMetricsRequestToTransactionMetric.convert(transactionMetricsRequest);\n\n // THEN it should be converted successfully\n then(transactionMetricConverted.getTime()).isEqualTo(LocalDateTime.of(2016, 11, 3, 16, 56, 44));\n then(transactionMetricConverted.getAmount()).isEqualTo(12.3);\n }", "Object encodeObject(Object value);", "private <T> T convert(String json, Type resultObject) {\n\t\tGson gson = new GsonBuilder().create();\n\t\treturn gson.fromJson(json, resultObject);\n\t}", "FROM toObject(CONTEXT context, final TO value);", "public Object convert(Object fromValue) {\n RawObject oldDataRawObject = (RawObject) fromValue;\n Object[] oldElements = oldDataRawObject.getElements();\n Map<String, Object> integerClassValues = \n new HashMap<String, Object>();\n integerClassValues.put(\"data\", oldElements[0]);\n RawObject integerClassObject = \n new RawObject(integerClassType, integerClassValues, null);\n RawObject[] newElements = new RawObject[1];\n newElements[0] = integerClassObject;\n RawObject newDataRawObject = \n new RawObject(newDataType, newElements);\n return newDataRawObject;\n }", "MovilizerRequest getRequestFromString(String requestString);", "public String toJsonfrmObject(Object object) {\n try {\n ObjectMapper mapper = new ObjectMapper();\n mapper.setDateFormat(simpleDateFormat);\n return mapper.writeValueAsString(object);\n } catch (IOException e) {\n logger.error(\"Invalid JSON!\", e);\n }\n return \"\";\n }", "private static void setRequest(Object request) {\n\t\tif (null != request) {\n\t\t\tMDC.put(ApplicationConstants.REQUEST, request.toString());\n\t\t}\n\t}", "byte[] toJson(Object object) throws Exception {\r\n return this.mapper.writeValueAsString(object).getBytes();\r\n }", "@POST( CONTROLLER )\n VersionedObjectKey createObject( @Body CreateObjectRequest request );", "public ResultVO readService(Object object);", "Item convertToItem(Object value) throws XQException;", "private Object preprocessObject( Object v )\n\t{\n\t\t\n\t\tif (v instanceof String)\n\t\t{\n\t\t\tString n_o = (String) v;\n\t\t\t\n\t\t\tif (n_o.length() > this._char_limit)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tn_o = n_o.substring(0, this._char_limit);\n\t\t\t\tv = (Object) n_o;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn v;\n\t\t\n\t}", "private void serializeObject(final Object object, final StringBuffer buffer)\n {\n serializeObject(object, buffer, true);\n }", "protected abstract Object toObject(InputStream inputStream, Type targetType) throws BeanConversionException;", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\t@Override\n\tpublic void doWithRequest(ClientHttpRequest request) throws IOException {\n\t\trequest.getHeaders().set( \"Accept\", \"application/json\" );\n\t\trequest.getHeaders().set(\"Content-Type\", MediaType.APPLICATION_JSON.toString());\n\t\tif (headerAttrs != null) {\n\t\t\tfor (String key : headerAttrs.keySet()) {\n\t\t\t\tString value = headerAttrs.get(key);\n\t\t\t\trequest.getHeaders().set(key, value);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// next if there is a body add it to request\n\t\tif (requestBody != null){\n\t\t\tAssert.notEmpty(messageConverters, \"'messageConverters' must not be empty\");\n\t\t\tClass<?> requestType = requestBody.getClass();\n\t\t\tfor (HttpMessageConverter messageConverter : messageConverters) {\n\t\t\t\tif (messageConverter.canWrite(requestType, MediaType.APPLICATION_JSON)) {\n\t\t\t\t\tmessageConverter.write(requestBody, MediaType.APPLICATION_JSON, request);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void remapRequest(HttpServletRequest request) throws Exception {\n Request connectorReq = (Request) request;\n\n MappingData mappingData = connectorReq.getMappingData();\n mappingData.recycle();\n\n connectorReq.getConnector().\n getMapper().map(connectorReq.getCoyoteRequest().serverName(),\n connectorReq.getCoyoteRequest().decodedURI(), null,\n mappingData);\n\n connectorReq.setContext((Context) connectorReq.getMappingData().context);\n connectorReq.setWrapper((Wrapper) connectorReq.getMappingData().wrapper);\n }", "public static void encodeObject(Object obj,String inEncodeType,String outEncodeType)throws Exception {\n try{\n Class destClass=obj.getClass();\n Method[] methods = destClass.getDeclaredMethods();\n for (int i = 0; i < methods.length; i++) {\n Method dm = methods[i];\n String methodName = dm.getName();\n String methodValue = null;\n String methodType=methodName.substring(0, 3);\n\n if (methodType.equalsIgnoreCase(\"set\")) {\n\n methodName = methodName.substring(3);\n try {\n //get sourObject value\n Method sm = destClass.getDeclaredMethod(\"get\" + methodName, null);\n methodValue = (String) sm.invoke(obj, null);\n //set destObject value\n if(methodValue!=null){\n //System.out.println(methodName+\"--\"+methodValue);\n\n Object[] args = {new String(methodValue.getBytes(inEncodeType), outEncodeType)};\n dm.invoke(obj, args);\n }\n }\n catch (Exception ex) {\n //check sourObject no this method,do nothing.\n }\n }\n }\n }catch (Exception ex) {\n\n throw ex;\n }\n\n }", "public ModelObject read(ModelObject obj);", "String requestToString(MovilizerRequest request);", "@Override\n\tpublic Message toMessage(Object object, Session session) throws JMSException, MessageConversionException {\n\t\tMessage msg = delegate.toMessage(object, session);\n\t\tsetRequestIdProperty(object, msg);\n\t\treturn msg;\n\t}", "public abstract HttpResponse<String> buildAction(@Nullable Object object) throws Exception;", "protected void populateBeanFromParameters(Object bean, HttpServletRequest request) {\n\t\tMap<String,String> parameters = getParametersMap(request) ;\n\t\tBeanMapper mapper = new BeanMapper();\n\t\tmapper.mapToBean(parameters, bean);\n\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static <T> T cast(Object object) {\n\n\t\treturn (T) object;\n\t}", "private synchronized void morphRequest (SearchHotelRequestDTO requestDTO) {\r\n\t\t\r\n\t\ttry {\r\n\t\tDate fromDateOld = new SimpleDateFormat(\"yyyy-MM-dd\").parse(requestDTO.getFromDate());\r\n\t\tDate toDateOld = new SimpleDateFormat(\"yyyy-MM-dd\").parse(requestDTO.getToDate());\r\n\t\t\r\n\t\tlong diff = toDateOld.getTime() - fromDateOld.getTime();\r\n\t\tlogger.trace(\"Number of Days: \" + TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS));\r\n\t\tint numOfDays = (int) TimeUnit.DAYS.convert(diff, TimeUnit.MILLISECONDS);\r\n\t\trequestDTO.getAdditionalData().put(\"numberOfDays\", numOfDays);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public ImageToObjectRequest(ImageToObjectRequest source) {\n if (source.ImageInfoList != null) {\n this.ImageInfoList = new ImageInfo[source.ImageInfoList.length];\n for (int i = 0; i < source.ImageInfoList.length; i++) {\n this.ImageInfoList[i] = new ImageInfo(source.ImageInfoList[i]);\n }\n }\n if (source.HandleParam != null) {\n this.HandleParam = new HandleParam(source.HandleParam);\n }\n if (source.Type != null) {\n this.Type = new Long(source.Type);\n }\n if (source.IsUsedClassify != null) {\n this.IsUsedClassify = new Boolean(source.IsUsedClassify);\n }\n if (source.UserType != null) {\n this.UserType = new Long(source.UserType);\n }\n if (source.ReportTypeVersion != null) {\n this.ReportTypeVersion = new ReportTypeVersion[source.ReportTypeVersion.length];\n for (int i = 0; i < source.ReportTypeVersion.length; i++) {\n this.ReportTypeVersion[i] = new ReportTypeVersion(source.ReportTypeVersion[i]);\n }\n }\n }", "Object handle(Object request);", "@SuppressWarnings( { \"incomplete-switch\", \"rawtypes\", \"unchecked\" } )\n XmlElement objectToXml(Object o)\n {\n ElementType type = m_simpleTypes.get(o.getClass());\n if (type != null)\n {\n switch (type)\n {\n case REAL:\n return new XmlElement(\"real\", o.toString());\n case INTEGER:\n return new XmlElement(\"integer\", o.toString());\n case TRUE:\n return new XmlElement(((Boolean) o).booleanValue() ? \"true\" : \"false\");\n case DATE:\n return new XmlElement(\"date\", m_dateFormat.format((Date) o));\n case STRING:\n return new XmlElement(\"string\", (String) o);\n case DATA:\n return new XmlElement(\"data\", base64encode((byte[]) o));\n }\n }\n if (o instanceof Map)\n {\n return toXmlDict((Map) o);\n }\n else if (o instanceof List)\n {\n return toXmlArray((List) o);\n }\n else throw new RuntimeException(\"Cannot use \" + o.getClass() + \" in plist.\");\n }", "public Converter<?, RequestBody> requestBodyConverter(Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, Retrofit retrofit) {\n/* 38 */ if (String.class.equals(type)) {\n/* 39 */ return new Converter<String, RequestBody>()\n/* */ {\n/* */ public RequestBody convert(String value) throws IOException {\n/* 42 */ return RequestBody.create(ToStringConverterFactory.MEDIA_TYPE, value);\n/* */ }\n/* */ };\n/* */ }\n/* 46 */ return null;\n/* */ }", "@Override\n\tpublic void dataObtained(final I object) {\n\t\t\n\t\t\tI filtered = filter.filter(object);\n\t\t\tO translated = translator.translate(filtered);\n\t\t\tif (translated != null){\n\t\t\t\trouter.send(translated);\n\t\t\t}\t\t\n\t\t\n\t}", "Object convert(Object source, TypeToken<?> targetTypeToken);", "public <T> Object transforms(Object object, Class<T> cls) {\n\t\treturn modelMapper.map(object, cls);\n\t}", "JSONStreamAware processRequest(HttpServletRequest paramHttpServletRequest)\r\n/* 18: */ {\r\n/* 19:19 */ JSONObject localJSONObject = new JSONObject();\r\n/* 20:20 */ localJSONObject.put(\"host\", paramHttpServletRequest.getRemoteHost());\r\n/* 21:21 */ localJSONObject.put(\"address\", paramHttpServletRequest.getRemoteAddr());\r\n/* 22:22 */ return localJSONObject;\r\n/* 23: */ }", "private Object[] recebendoObjetos(HttpServletRequest httpServletRequest) throws FileUploadException {\r\n\t\t\r\n\t\tObject[] parametrosFormulario = new Object[2]; \r\n\t\t\r\n\t\tDiskFileUpload upload = new DiskFileUpload();\r\n\t\t\r\n\t\tList itens = upload.parseRequest(httpServletRequest);\r\n\t\tFileItem fileItem = null;\r\n\t\t\r\n\t\tif (itens != null) {\r\n\t\t\t\r\n\t\t\tIterator iter = itens.iterator();\r\n\t\t\t\r\n\t\t\twhile (iter.hasNext()) {\r\n\t\t\t\t\r\n\t\t\t\tfileItem = (FileItem) iter.next();\r\n\t\t\t\t\r\n\t\t\t\tif (fileItem.getFieldName().equals(\"uploadPicture\")) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tparametrosFormulario[0] = fileItem;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (fileItem.getFieldName().equals(\"idEmpresa\")) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tparametrosFormulario[1] = fileItem.getString();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn parametrosFormulario;\r\n\t}", "private void processObject( HttpServletResponse oResponse, Object oViewObject ) throws ViewExecutorException\r\n {\n try\r\n {\r\n oResponse.getWriter().print( oViewObject );\r\n }\r\n catch ( IOException e )\r\n {\r\n throw new ViewExecutorException( \"View \" + oViewObject.getClass().getName() + \", generic object view I/O error\", e );\r\n }\r\n }", "private void changeRequest(InstanceRequest request) {\r\n\t\t\r\n\t}", "public final void setIncomingRequest_SDEObject(sdemigration.proxies.SDEObject incomingrequest_sdeobject)\r\n\t{\r\n\t\tsetIncomingRequest_SDEObject(getContext(), incomingrequest_sdeobject);\r\n\t}", "@Override\n\tpublic Object convert(Class<?> desiredType, Object in) throws Exception {\n\t\treturn null;\n\t}", "@Test\n public void readSystemObjectClassAppointmentRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AppointmentRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return AppointmentRequest properly\", object.getClass(), actual.getClass());\n }", "public Object toSQL(final Object object) {\n if ((object == null) || (_convertFrom == null)) {\n return object;\n }\n return _convertFrom.convert(object);\n }", "@SuppressWarnings(\"unchecked\")\n static <T> T reserialize(T object) {\n checkNotNull(object);\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n try {\n ObjectOutputStream out = new ObjectOutputStream(bytes);\n out.writeObject(object);\n ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()));\n return (T) in.readObject();\n } catch (IOException | ClassNotFoundException e) {\n throw new RuntimeException(e);\n }\n }", "void projectUriRequest(Request request);", "public String prepareRequestToHost(Object request) {\n\t\tString clRequest = null;\n\t\tUserAuthRequestAndTXLifeRequest userRequest = ((NbaTXLife) request).getTXLife().getUserAuthRequestAndTXLifeRequest();\n\t\tif (userRequest != null && userRequest.getTXLifeRequestCount() > 0) {\n\t\t\tTXLifeRequest txRequest = userRequest.getTXLifeRequestAt(0);\n\t\t\tlong transType = txRequest.getTransType();\n\t\t\tlong transSubType = txRequest.getTransSubType();\n\t\t\tif (transType == NbaOliConstants.TC_TYPE_NEWBUSSUBMISSION && transSubType == NbaOliConstants.TC_SUBTYPE_BACKEND_PRINT) {\n\t\t\t\t// TODO determine why a new instance of this same class is needed\n\t\t\t\tNbaCyberPrintRequests cyberRequest = new NbaCyberPrintRequests();\n\t\t\t\ttry {\n\t\t\t\t\tclRequest = cyberRequest.createPrintRequest((NbaTXLife) request);\n\t\t\t\t} catch (NbaBaseException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new RuntimeException(new NbaBaseException(\"Invalid Print Type Requested\"));\n\t\t\t}\n\t\t\tgetLogger().logDebug(clRequest);\n\t\t}\n\t\treturn clRequest;\n\t}", "protected abstract T prepareObject(String extracted);", "public void setParaToRequest(String key, Object obj)\n\t{\n\t\t\n\t\t\n\t}", "public static byte[] toBytes(Object object) {\n\t\tif(object instanceof Boolean) {\n\t\t\treturn new byte[] {\n\t\t\t\t\t(boolean) object ? (byte) 1 : (byte) 0\n\t\t\t};\n\t\t} else if (object instanceof Byte) {\n\t\t\treturn new byte[] {\n\t\t\t\t\t(byte) object\n\t\t\t};\n\t\t} else if (object instanceof Short) {\n\t\t\tByteBuffer buffer = ByteBuffer.allocate(2);\n\t\t\tbuffer.putShort((short) object);\n\t\t\treturn buffer.array();\n\t\t} else if (object instanceof Integer) {\n\t\t\tByteBuffer buffer = ByteBuffer.allocate(4);\n\t\t\tbuffer.putInt((int) object);\n\t\t\treturn buffer.array();\n\t\t} else if (object instanceof Long) {\n\t\t\tByteBuffer buffer = ByteBuffer.allocate(8);\n\t\t\tbuffer.putLong((long) object);\n\t\t\treturn buffer.array();\n\t\t} else if (object instanceof Character) {\n\t\t\tByteBuffer buffer = ByteBuffer.allocate(4);\n\t\t\tbuffer.putInt((char) object);\n\t\t\treturn buffer.array();\n\t\t} else if (object instanceof Float) {\n\t\t\tByteBuffer buffer = ByteBuffer.allocate(4);\n\t\t\tbuffer.putFloat((float) object);\n\t\t\treturn buffer.array();\n\t\t} else if (object instanceof Double) {\n\t\t\tByteBuffer buffer = ByteBuffer.allocate(8);\n\t\t\tbuffer.putDouble((double) object);\n\t\t\treturn buffer.array();\n\t\t} else if (object instanceof String) {\n\t\t\tbyte[] charset = ((String) object).getBytes();\n\t\t\tByteBuffer buffer = ByteBuffer.allocate(4+charset.length);\n\t\t\tbuffer.putInt(charset.length);\n\t\t\tbuffer.put(charset);\n\t\t\treturn buffer.array();\n\t\t} else {\n\t\t\tbyte[] charset = object.toString().getBytes();\n\t\t\tByteBuffer buffer = ByteBuffer.allocate(4+charset.length);\n\t\t\tbuffer.putInt(charset.length);\n\t\t\tbuffer.put(charset);\n\t\t\treturn buffer.array();\n\t\t}\n\t}", "private Response createObjectReturnResponse(Class clazz, Request request) {\n Object object = ContextMap.getInstance().getContext().getObject(clazz);\n // if it could not create the object, will return a proper error message\n if (object == null) {\n return Error(request, \"No object created from this class: \" + clazz.getName()).toResponse();\n } else {\n try {\n return runMethodReturnResponse(object, request);\n } catch (Exception e) {\n e.printStackTrace();\n return Error(request, \"could not handle method\").exception(e).toResponse();\n }\n }\n }", "public abstract VKRequest mo118416a(JSONObject jSONObject);", "@Override\n\tpublic String putObjectCore(Object object) {\n\t\treturn JSON.encode(object);\n\t}", "protected abstract Object toObject(ByteBuffer content, Type targetType) throws BeanConversionException;", "protected abstract ByteBuffer toMedia(Object object) throws BeanConversionException;", "Ticket ticketDTOToTicket(TicketDTO ticketDTO);", "T fromJson(Object source);", "private VwConstraintDefOracleBean fromObjectToBean(VwConstraintDef object) {\n VwConstraintDefOracleBean bean = new VwConstraintDefOracleBean();\n bean.setConsType(object.getConsType());\n bean.setConsName(object.getConsName());\n bean.setMainTable(object.getMainTable());\n bean.setRefTable(object.getRefTable());\n bean.setTable1(object.getTable1());\n bean.setCol1(object.getCol1());\n return bean;\n }", "public Object transform(Object input) {\n return input;\n }", "private ObjectNode makeRequest(final String api, final JsiiObjectRef objRef) {\n ObjectNode req = makeRequest(api);\n req.set(\"objref\", objRef.toJson());\n return req;\n }", "private Object processHttpRequestIfNecessary(Object argument) {\n\t\tif (argument instanceof HttpServletRequestWrapper) { // ShiroHttpServletRequest?\n\t\t\tHttpServletRequestWrapper wrap = (HttpServletRequestWrapper) argument;\n\t\t\t/*\n\t\t\t * Wrapping request with resolved XSS security.\n\t\t\t */\n\t\t\twrap.setRequest(resolver.newXssHttpRequestWrapper((HttpServletRequest) wrap.getRequest()));\n\t\t} else if (argument instanceof HttpServletRequest) {\n\t\t\targument = resolver.newXssHttpRequestWrapper((HttpServletRequest) argument);\n\t\t}\n\n\t\treturn argument;\n\t}", "@Override\r\n public byte[] encodeToBytes(Object object) throws Exception {\n return null;\r\n }", "public interface Request {\n public String toXml();\n\n\n public String getHandlerId();\n\n\n public String getRequestId();\n}", "public static interfacerequests.proxies.IncomingRequest initialize(com.mendix.systemwideinterfaces.core.IContext context, com.mendix.systemwideinterfaces.core.IMendixObject mendixObject)\r\n\t{\r\n\t\treturn new interfacerequests.proxies.IncomingRequest(context, mendixObject);\r\n\t}", "void decodeObject();", "@Test\n public void testToFromObjectinvalid() throws GeoportalException, JsonHelperException {\n\n GeoportalRequestObject requestObject = new GeoportalRequestDataObject(random.nextDouble(), random.nextDouble());\n String jsonObject = JsonHelper.toJson(requestObject);\n assertNotNull(jsonObject);\n\n for (int i = 0; i < 9; i++) {\n if (jsonObject.contains(\"\" + i)) {\n jsonObject = jsonObject.replace(\"\" + i, \"\" + (i + 1));\n break;\n }\n }\n GeoportalRequestObject restoredObject = JsonHelper.fromJson(jsonObject, GeoportalRequestDataObject.class);\n assertFalse(requestObject.equals(restoredObject));\n }", "Object read(Object inputObject, Settings settings);", "Call mo35727a(Request request);", "public static EvaluableRequest buildEvaluableRequest(String requestBody, String requestResourcePath, HttpServletRequest request) {\n // Create and fill an evaluable request object.\n EvaluableRequest evaluableRequest = new EvaluableRequest(requestBody,\n requestResourcePath != null ? requestResourcePath.split(\"/\") : null);\n // Adding query parameters...\n Map<String, String> evaluableParams = new HashMap<>();\n List<String> parameterNames = Collections.list(request.getParameterNames());\n for (String parameter : parameterNames) {\n evaluableParams.put(parameter, request.getParameter(parameter));\n }\n evaluableRequest.setParams(evaluableParams);\n // Adding headers...\n Map<String, String> evaluableHeaders = new HashMap<>();\n List<String> headerNames = Collections.list(request.getHeaderNames());\n for (String header : headerNames) {\n evaluableHeaders.put(header, request.getHeader(header));\n }\n evaluableRequest.setHeaders(evaluableHeaders);\n\n return evaluableRequest;\n }", "public V cast(Object object) {\n return valueClass.cast(object);\n }", "private void mapObject(Object obj) {\n if (!objectIdMap.containsKey(obj))\n objectIdMap.put(obj, objectIdMap.size());\n if (obj instanceof Map) {\n Map dict = (Map) obj;\n Set<Map.Entry<String, Object>> de = dict.entrySet();\n for (Map.Entry<String, Object> e : de)\n mapObject(e.getKey());\n for (Map.Entry<String, Object> e : de)\n mapObject(e.getValue());\n } else if (obj instanceof List) {\n List list = (List) obj;\n for (int i = 0; i < list.size(); i++)\n mapObject(list.get(i));\n } else if (obj instanceof String || obj instanceof Float || obj instanceof Double ||\n obj instanceof Integer || obj instanceof Long || obj instanceof byte[] ||\n obj instanceof Date || obj instanceof Boolean) {\n // do nothing.\n } else\n throw new IllegalStateException(\"Incompatible object \" + obj + \" found\");\n }", "final protected Object convertSpringProxyObj(final Object o) {\n\t\tif (o instanceof InfrastructureProxy)\n\t\t\treturn ((InfrastructureProxy)o).getWrappedObject();\n\t\telse\n\t\t\treturn o;\n\t}", "public Object readInternal(Class<? extends Object> clazz, HttpInputMessage inputMessage) throws IOException {\n return this.conversionService.convert(this.stringHttpMessageConverter.readInternal(String.class, inputMessage), clazz);\n }", "@Test\n public void readSystemObjectClassAccCrRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AccountCreationRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return AccountCreationRequest properly\", object.getClass(), actual.getClass());\n }", "private void processClientIQRequest(IQRequest request) throws Exception {\n\t\t\n\t\tString id = request.getTo().getNode();\n\t\tElement payload = request.getElement();\n\t\t\n\t\tJID fromJidInternal = getXmppFactory().createJID(getInternalDomain());\n\t\tJID toJidInternal = createInternalJid(id, request);\n\t\tif (request.getTo().getResource() != null) {\n\t\t\ttoJidInternal.setResource(request.getTo().getResource());\n\t\t}\n\n\t\tforwardIQRequest(fromJidInternal, toJidInternal, request, payload);\n\t}", "@SuppressWarnings(\"unchecked\")\n @Override\n protected String convertObjectToJson(Object object) {\n try {\n Set<EventDataValue> eventDataValues =\n object == null ? Collections.emptySet() : (Set<EventDataValue>) object;\n\n Map<String, EventDataValue> tempMap = new HashMap<>();\n\n for (EventDataValue eventDataValue : eventDataValues) {\n tempMap.put(eventDataValue.getDataElement(), eventDataValue);\n }\n\n return writer.writeValueAsString(tempMap);\n } catch (IOException e) {\n throw new IllegalArgumentException(e);\n }\n }", "@SuppressWarnings(\"unchecked\")\n private <E> void handleRequest(ApiRequest<E> request) {\n\n try {\n apiAdapter\n .invokeAsync(request.target)\n .subscribe(new Responder<E>(request, this::writeResponse));\n } catch (Exception e) {\n System.out.println(\"Something went wrong while trying to invoke an ApiAdapter function\");\n e.printStackTrace();\n }\n }", "public static <T> T convert(Object object, Class<T> cls) {\n\t\treturn fullMapper.convertValue(object, cls);\n\t}", "public Object encode(Object obj) throws EncoderException {\n/* 316 */ if (obj == null)\n/* 317 */ return null; \n/* 318 */ if (obj instanceof byte[])\n/* 319 */ return encode((byte[])obj); \n/* 320 */ if (obj instanceof String) {\n/* 321 */ return encode((String)obj);\n/* */ }\n/* 323 */ throw new EncoderException(\"Objects of type \" + obj.getClass().getName() + \" cannot be URL encoded\");\n/* */ }", "public void setRequest(Map<String, Object> request)\r\n\t{\n\t\tthis.request = request;\r\n\t}" ]
[ "0.61846155", "0.59027666", "0.5796184", "0.5715531", "0.56233513", "0.558935", "0.55243576", "0.549289", "0.54479766", "0.5414574", "0.54126835", "0.5396405", "0.5355266", "0.5347161", "0.5333284", "0.5325219", "0.5325074", "0.5320932", "0.5314553", "0.53050303", "0.5280288", "0.5267808", "0.52522653", "0.5244966", "0.5244933", "0.5231742", "0.5231699", "0.5204696", "0.5203449", "0.52026117", "0.5199051", "0.51807785", "0.517379", "0.5165684", "0.51610935", "0.5145944", "0.5144064", "0.5124878", "0.5116376", "0.5106342", "0.5075015", "0.50693053", "0.5068879", "0.5066207", "0.504505", "0.5043409", "0.5024149", "0.5019653", "0.50144666", "0.5013626", "0.50103533", "0.5009833", "0.50052786", "0.4994138", "0.4992345", "0.4978762", "0.49760106", "0.49756047", "0.49712616", "0.4967497", "0.49630678", "0.4962717", "0.49499816", "0.49497604", "0.4949356", "0.4938556", "0.49336112", "0.4927619", "0.4925348", "0.49248976", "0.49246982", "0.49243778", "0.49160206", "0.49149695", "0.49142224", "0.49053472", "0.4905326", "0.49002466", "0.48952463", "0.48920587", "0.4888766", "0.48810655", "0.48768312", "0.48699385", "0.48683354", "0.48472896", "0.48437157", "0.483996", "0.48392585", "0.48353598", "0.48173568", "0.48068318", "0.48056647", "0.4805138", "0.48004907", "0.47954842", "0.47925282", "0.47905767", "0.47860372", "0.4779802" ]
0.50054896
52
minimizando o aplicativo programaticamente (evitando que a splash screen seja reexibida quando restaurada, ou que o aplicativo volte para a parent intent):
@Override public void onBackPressed() { Utilidades.Aplicativo.minizarAplicativo(this); // Intent intent = new Intent(Intent.ACTION_MAIN); // intent.addCategory(Intent.CATEGORY_HOME); // intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // startActivity(intent); // getApplicationContext().startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n\r\n // Do not display title bar, this makes the splash screen really full screen\r\n requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n \r\n // Check if we need to display the splash screen. If no, go directly to the main intent\r\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\r\n boolean showscreen = prefs.getBoolean(\"showsplashscreen\", true);\r\n if (! showscreen) {\r\n \t gotoMainIntent();\r\n \t return;\r\n }\r\n \r\n\r\n // Set the layout\r\n setContentView(R.layout.splash);\r\n\r\n // This will run after a specified time (SPLASH_DISPLAY_LENGHT milliseconds)\r\n new Handler().postDelayed(new Runnable(){\r\n public void run() {\r\n \t gotoMainIntent();\r\n }\r\n }, SPLASH_DISPLAY_LENGHT);\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n //TODO: add any code you want to do while the splash screen is showing before the MainActivity is shown\n\n// try {\n// Thread.sleep(5000);\n// } catch (InterruptedException e) {\n// e.printStackTrace();\n// }\n\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n finish();\n }", "public void run() {\n Intent i = new Intent(activity_splash.this, MainActivity.class);\r\n startActivity(i); // menghubungkan activity splashscren ke xml\r\n //jeda selesai Splashscreen\r\n this.finish();\r\n }", "@Override\n public void showSplash() {\n }", "@Override\r\n\t\t public void run() {\n\t\t Intent i = new Intent(SplashScreen.this, MainMenuActivity.class);\r\n\t\t startActivity(i);\r\n\t\t \r\n\t\t //Menyelesaikan Splashscreen\r\n\t\t finish();\r\n\t\t }", "@Override \r\n public void onCreate(Bundle icicle) { \r\n super.onCreate(icicle);\r\n \r\n getWindow().setFormat(PixelFormat.RGBA_8888);\r\n getWindow().addFlags(WindowManager.LayoutParams.FLAG_DITHER);\r\n setContentView(R.layout.splash_activity);\r\n \r\n //Display the current version number \r\n PackageManager pm = getPackageManager(); \r\n try {\r\n \tPackageInfo pi = pm.getPackageInfo(\"org.mems\", 0);\r\n TextView versionNumber = (TextView) findViewById(R.id.versionNumber); \r\n versionNumber.setText(\"Version \" + pi.versionName); \r\n } catch (NameNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n \r\n new Handler().postDelayed(new Runnable() {\r\n public void run() { \r\n \tIntent mainIntent = new Intent(SplashActivity.this, MainActivity.class); \r\n \tSplashActivity.this.startActivity(mainIntent); \r\n \tSplashActivity.this.finish(); \r\n } \r\n }, 2000); //2000 for release \r\n }", "@Override\r\n public void run() {\n if (preferences.getBoolean(\"isMain\",false))\r\n {\r\n startActivity(new Intent(SplashScreen.this,MainActivity.class));\r\n finish();\r\n }else {\r\n editor.putBoolean(\"isMain\",true);\r\n editor.apply();\r\n\r\n TaskStackBuilder.create(SplashScreen.this)\r\n .addNextIntentWithParentStack(new Intent(SplashScreen.this,MainActivity.class))\r\n .addNextIntent(new Intent(SplashScreen.this,IntroActivity.class))\r\n .startActivities();\r\n }\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n SplashScreenBuilder.getInstance(this)\n .setVideo(R.raw.splash_animation)\n .setImage(R.drawable.app_icon)\n .enableSkipOnTap(false)\n .show();\n\n Button restart_app = findViewById(R.id.restart_app);\n restart_app.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n // Restart app\n Intent i = getBaseContext().getPackageManager().getLaunchIntentForPackage(getBaseContext().getPackageName());\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(i);\n overridePendingTransition(0, 0);\n finish();\n }\n });\n }", "public void run() {\n Intent mainIntent = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(mainIntent);\n finish();\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n UserInfoData entry = new UserInfoData(this);\n \t\n \tentry.open();\n \t\n \tfinal String data = entry.getData();\n \t\n \tentry.close();\n Thread splashTimer = new Thread(){\n \tpublic void run(){\n \t\ttry{\n \t\t\tsleep(3000);\n \t\t\t\n \t}\n \t\tcatch(InterruptedException e){\n \t\t\t\n \t\t\te.printStackTrace();\n \t\t}\n finally{\n \tif (!data.equals(\"\")){\n \t\t\tstartActivity(new Intent (\"com.JacobyApps.android.mainMenu\")); \n \t}\n \t\telse{\n \n startActivity(new Intent (\"android.intent.action.Signup\"));\n \t}\n \tfinish();\n \t \n }\n \t \n \t}\n \t\n };\n splashTimer.start();\n }", "private void showSplashScreen() {\n splashDialog = new SplashScreenDialog(this);\n splashDialog.show();\n }", "@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n makeActivityFullScreen();\n setContentView(R.layout.activity_splash);\n }", "@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.activity_splash_screen);\n\n intent = new Intent(this, MainActivity.class);\n\n\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n\n //Start MainActivity\n startActivity(intent);\n finish();\n }\n }, SPLASH_DISPLAY_LENGTH);\n }", "@Override\r\n public void run() {\n Intent i = new Intent(SplashScreen.this, MainActivity.class);\r\n startActivity(i);\r\n finish();\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash);\n ButterKnife.inject(this);\n\n if(getResources().getBoolean(R.bool.isTablet)){\n lyMain.setBackgroundResource(R.drawable.ic_tablet_splash);\n }else {\n lyMain.setBackgroundResource(R.drawable.ic_smatphone_splash);\n }\n\n Thread timerThread = new Thread() {\n public void run() {\n try {\n sleep(3000);\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n startActivity(new Intent(SplashActivity.this, ApplicationsGridActivity.class));\n }\n }\n };\n timerThread.start();\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);\n }\n super.onCreate(savedInstanceState);\n setContentView(R.layout.helal_haram_splash);\n\n initViews();\n alphaAnimation(img);\n\n\n // splash efect kodu\n /* Thread timerThread = new Thread(){\n public void run(){\n try{\n sleep(1200);\n }catch(InterruptedException e){\n e.printStackTrace();\n }finally{\n\n Intent intent = new Intent(Splash.this, MainActivity.class);\n startActivity(intent);\n\n }\n }\n };\n timerThread.start();\n */\n }", "@Override\n public void run() {\n Intent i = new Intent(Splash.this, MainActivity.class);\n startActivity(i);\n finish();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash);\n ButterKnife.bind(this, SplashActivity.this);\n getSupportActionBar().hide();\n startService(new Intent(this, AppExitService.class));\n\n String[] permissionArray = new String[]{PermissionUtils.Manifest_CAMERA,\n// PermissionUtils.Manifest_READ_EXTERNAL_STORAGE,\n PermissionUtils.Manifest_WRITE_EXTERNAL_STORAGE,\n PermissionUtils.Manifest_RECORD_AUDIO,\n/* PermissionUtils.Manifest_BLUETOOTH,\n PermissionUtils.Manifest_BLUETOOTH_ADMIN,*/\n PermissionUtils.Manifest_ACCESS_COARSE_LOCATION,\n// PermissionUtils.Manifest_ACCESS_FINE_LOCATION\n };\n\n if (!isPermissionsGranted(SplashActivity.this, permissionArray)) {\n askCompactPermissions(permissionArray, this);\n }\n\n startApp.setTextColor(Color.WHITE);\n startApp.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n File file = new File(Environment.getExternalStorageDirectory().toString() + \"/.KKSInternal\");\n if (!file.exists())\n file.mkdir();\n\n file = new File(Environment.getExternalStorageDirectory().toString() + \"/.KKSInternal/UsageJsons\");\n if (!file.exists())\n file.mkdir();\n\n file = new File(Environment.getExternalStorageDirectory().toString() + \"/.KKSInternal/SelfUsageJsons\");\n if (!file.exists())\n file.mkdir();\n\n file = new File(Environment.getExternalStorageDirectory().toString() + \"/.KKSInternal/JsonsBackup\");\n if (!file.exists())\n file.mkdir();\n\n file = new File(Environment.getExternalStorageDirectory().toString() + \"/.KKSInternal/Recordings\");\n if (!file.exists())\n file.mkdir();\n\n BackupDatabase.backup(SplashActivity.this);\n startActivity(new Intent(SplashActivity.this, MainActivity.class));\n }\n });\n\n if (!(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)) {\n startUpProcess();\n }\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n SplashScreen.show(this); // here\n super.onCreate(savedInstanceState);\n }", "private void SplashScreen() {\n// if (!mSettings.getBoolean(\"PlayedBefore\", false)) {\n// mSolitaireView.DisplaySplash();\n// }\n splas.setVisibility(View.VISIBLE);\n Handler h = new Handler(Looper.getMainLooper());\n h.postDelayed(new Runnable() {\n @Override\n public void run() {\n splas.setVisibility(View.GONE);\n }\n }, 3000);\n }", "private void launchHomeScreen(){\n\n prefManager.setFirstTimeLaunch(false);\n Intent i = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(i);\n }", "@Override\n public void run() {\n Intent i = new Intent(SplashScreenActivity.this, MainActivity.class);\n startActivity(i);\n finish();\n }", "public void run(){\n\t\t\t\tif(!exit)\r\n\t\t\t\t{\r\n\t\t\t\tIntent mainIntent = new Intent(Splash.this,MainActivity.class);\r\n\t\t\t\tSplash.this.startActivity(mainIntent);\r\n\t\t\t\tSplash.this.finish();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// When the Splash is exiting the application\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t//android.os.Process.killProcess(android.os.Process.myPid());\r\n\t\t\t\tfinish();\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n public void run() {\n Intent mainIntent = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(mainIntent);\n finish();\n }", "public void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n requestWindowFeature(1);\n getWindow().setFlags(1024, 1024);\n setContentView(R.layout.activity_splash_screen);\n new Handler().postDelayed(new Runnable() {\n public void run() {\n SplashScreen.this.startActivity(new Intent(SplashScreen.this, MainActivity.class));\n SplashScreen.this.finish();\n }\n }, 3000);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash_screen);\n Intent intent = new Intent(getApplicationContext(),InitialSetupActivity.class);\n startActivity(intent);\n finish();\n }", "@Override\n public void run() {\n Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class);\n startActivity(intent);\n finish();\n }", "@Override\n public void run() {\n Intent intent = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(intent);\n finish();\n }", "@Override\n public void run() {\n SplashScreen.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n startActivity(new Intent(SplashScreen.this,MainActivity.class));\n finish();\n\n }\n });\n }", "@Override\n public void run() {\n Intent mainIntent = new Intent().setClass(\n SplashScreenActivity.this, MainActivity.class);\n startActivity(mainIntent);\n \n // Close the activity so the user won't able to go back this\n // activity pressing Back button\n finish();\n }", "@Override\n public void run() {\n Intent mainIntent = new Intent(StartSplash.this, SplashActivity.class);\n StartSplash.this.startActivity(mainIntent);\n StartSplash.this.finish();\n }", "protected void displaySplashScreen() {\n\t\t// Creates new thread to act as timer.\n\t\tThread logoTimer = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\n\t\t\t\t\tint logoTimer = 0;\n\t\t\t\t\t// Pauses for SPLASH_TIME amount of time\n\t\t\t\t\twhile (logoTimer < SPLASH_TIME) {\n\t\t\t\t\t\tsleep(100);\n\t\t\t\t\t\tlogoTimer = logoTimer + 100;\n\t\t\t\t\t}\n\t\t\t\t\t// Calls the activity from manifest.xml\n\t\t\t\t\tIntent intent = new Intent(getApplicationContext(),\n\t\t\t\t\t\t\tMenuActivity.class);\n\t\t\t\t\tintent.putExtra(\"connect\", connect);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t// Starts the thread.\n\t\tlogoTimer.start();\n\t}", "@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n\t\t/* layout splashscreen dengan background gambar */\n setContentView(R.layout.activity_spalsh);\n\t/* handler untuk menjalankan splashscreen selama 5 detik lalu\n\t * membuat HomeActivity\n\t */\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent mainIntent = null;\n\n mainIntent = new Intent(SpalshActivity.this,\n HomeActivity.class);\n\n SpalshActivity.this.startActivity(mainIntent);\n SpalshActivity.this.finish();\n overridePendingTransition(R.layout.fadein,R.layout.fadeout);\n\n\n }\n }, SPLASH_DISPLAY_LENGHT);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n SplashScreen.show(this);\n super.onCreate(savedInstanceState);\n }", "private void removeSplashScreen(final boolean z) {\n this.cordova.getActivity().runOnUiThread(new Runnable() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass4 */\n\n public void run() {\n if (SplashScreen.splashDialog != null && SplashScreen.this.splashImageView != null && SplashScreen.splashDialog.isShowing()) {\n int fadeDuration = SplashScreen.this.getFadeDuration();\n if (fadeDuration <= 0 || z) {\n SplashScreen.this.spinnerStop();\n SplashScreen.splashDialog.dismiss();\n Dialog unused = SplashScreen.splashDialog = null;\n SplashScreen.this.splashImageView = null;\n return;\n }\n AlphaAnimation alphaAnimation = new AlphaAnimation(1.0f, 0.0f);\n alphaAnimation.setInterpolator(new DecelerateInterpolator());\n alphaAnimation.setDuration((long) fadeDuration);\n SplashScreen.this.splashImageView.setAnimation(alphaAnimation);\n SplashScreen.this.splashImageView.startAnimation(alphaAnimation);\n alphaAnimation.setAnimationListener(new Animation.AnimationListener() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass4.AnonymousClass1 */\n\n public void onAnimationRepeat(Animation animation) {\n }\n\n public void onAnimationStart(Animation animation) {\n SplashScreen.this.spinnerStop();\n }\n\n public void onAnimationEnd(Animation animation) {\n if (SplashScreen.splashDialog != null && SplashScreen.this.splashImageView != null && SplashScreen.splashDialog.isShowing()) {\n SplashScreen.splashDialog.dismiss();\n Dialog unused = SplashScreen.splashDialog = null;\n SplashScreen.this.splashImageView = null;\n }\n }\n });\n }\n }\n });\n }", "@Override\n public void run() {\n Intent mainIntent = new Intent(SplashscreenActivity.this, MainActivity.class);\n SplashscreenActivity.this.startActivity(mainIntent);\n //We call finish() function to prevent user to come back to splashScreen\n SplashscreenActivity.this.finish();\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.splash);\n\n\t\tRunnable showMain = new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tIntent intent = new Intent(SplashActivity.this, KeepErAppyActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tLog.i(Util.TAG, \"SplashActivity.onCreate.run\");\n\t\t\t}\n\t\t};\n\n\t\tView vw = findViewById(R.id.big_beer);\n\t\tvw.postDelayed(showMain, 1000);\n\t\tLog.i(Util.TAG, \"SplashActivity.onCreate\");\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n setContentView(R.layout.splash);\n//\n// if (Build.VERSION.SDK_INT >= 23) {\n// checkPermissions( Manifest.permission.READ_PHONE_STATE);\n// } else\n StartApp();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n Thread timerThread = new Thread() {\n public void run() {\n try {\n sleep(3000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n if (user != null) {\n redireccionar();\n }else{\n Intent intent = new Intent(SplashScreen.this, Login.class);\n startActivity(intent);\n }\n\n }\n }\n };\n timerThread.start();\n }", "public void makegoaway(){\n if (!started_app){ // added to prevent running two copies when user clicks to skip\n // and when time runs out for splash\n Intent mainIntent = new Intent(SplashActivity.this,MainActivity.class);\n SplashActivity.this.startActivity(mainIntent);\n SplashActivity.this.finish();\n started_app=true;\n }\n }", "public void run(){\r\n try{\r\n \tsleep(DURACION_SPLASH);\r\n }catch(InterruptedException e){\r\n //Si no puedo ejecutar el sleep muestro el error\r\n e.printStackTrace();\r\n }finally{\r\n //Llamo a la nueva actividad\r\n Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class);\r\n \tstartActivity(intent);\r\n \tfinish();\r\n } \r\n }", "void setSplashContentView() {\n// verifyUser = PreferenceHelper.isVerifyMail(getContext());\n // user is logged in app and is active.\n view.setSplashViewLayout(R.layout.activity_splash);\n\n }", "@Override\n public void run() {\n Intent splashScreen=new Intent(SplashScreen.this,Donor.class);\n startActivity(splashScreen);\n finish();\n }", "@Override\n public void run() {\n\n Intent starthome = new Intent(SplashScreenActivity.this, WelcomeActivity.class);\n starthome.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(starthome);\n\n finish();\n }", "@Override\n public void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n //Assign the splashscreen_activity_main layout to the SplashScreenActivity\n setContentView(R.layout.splashscreen_activity_main);\n\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n /* Create an Intent that will start the Menu-Activity. */\n Intent mainIntent = new Intent(SplashscreenActivity.this, MainActivity.class);\n SplashscreenActivity.this.startActivity(mainIntent);\n //We call finish() function to prevent user to come back to splashScreen\n SplashscreenActivity.this.finish();\n }\n }, SPLASH_DISPLAY_LENGTH);\n }", "@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.activity_splash);\n bundle=new Bundle();\n final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n try{\n Log.v(\"_dan\",preferences.getAll().toString());\n\n registered = preferences.getBoolean(\"registered\", false);\n profileName = preferences.getString(\"profileName\", \"\");\n loginMethod = preferences.getString(\"loginMethod\", \"\");\n bundle.putBoolean(\"registered\", registered);\n bundle.putString(\"loginMethod\", loginMethod);\n bundle.putString(\"profileName\", profileName);\n i = new Intent(SplashActivity.this, MainActivity.class);\n i.putExtra(\"bundle\",bundle);\n }catch (Exception e){\n e.printStackTrace();\n }\n\n if(registered.equals(false)||profileName.isEmpty()||profileName.equals(\"\")||loginMethod.isEmpty()||loginMethod.equals(\"\")){\n i = new Intent(SplashActivity.this, RegisterActivity.class);\n }\n\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n /* Create an Intent that will start the Menu-Activity. */\n// Intent mainIntent = new Intent(SplashActivity.this,MainActivity.class);\n startActivity(i);\n SplashActivity.this.finish();\n }\n }, SPLASH_DISPLAY_LENGTH);\n }", "@Override\n public void run() {\n Intent intent = new Intent(SplashScreen.this, Welcome.class);\n startActivity(intent);\n finish();\n }", "@Override\n public void onCreate(final Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.splash_screen);\n\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(() -> {\n Intent mainIntent = new Intent(SplashScreen.this, MainActivity.class);\n SplashScreen.this.startActivity(mainIntent);\n SplashScreen.this.finish();\n }, SPLASH_DISPLAY_SECONDS * 1000);\n }", "@Override\n public void run() {\n startActivity(new Intent(SplashActivity.this, MainActivity3.class));\n //Close the current welcome page after the jump\n SplashActivity.this.finish();\n }", "@Override\n public void run() {\n Intent intent = new Intent(SplashActivity.this, CidadeActivity.class);\n /* startactivity solicita uma intent para saber o que deve fazer */\n startActivity(intent);\n finish();\n }", "@Override\r\n public void onCreate(Bundle savedInstanceState) {\r\n\r\n super.onCreate(savedInstanceState);\r\n\r\n Context context = this.getApplicationContext();\r\n\r\n requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);\r\n\r\n SplashHandler mHandler = new SplashHandler();\r\n final int layoutId = ResourceUtil.getLayoutResourceIdFromName(context, Colorme.LAYOUT_COLORME_AIYOUXI_SPLASH);\r\n setContentView(layoutId);\r\n\r\n final int viewId = ResourceUtil.getIdResourceIdFromName(context, Colorme.ID_COLORME_AIYOUXI_DRAWABLE);\r\n View view = findViewById(viewId);\r\n\r\n int what = 0;\r\n// Intent intent = this.getIntent();\r\n// if (intent != null) {\r\n// Bundle bundle = intent.getExtras();\r\n// if (bundle != null) {\r\n// String type = bundle.getString(KEY_TYPE);\r\n// if (VALUE_JYZA.equals(type)) {\r\n// final int bgId = ResourceUtil.getDrawableResourceIdFromName(context, Colorme.DRAWABLE_COLORME_JYZA);\r\n// view.setBackgroundResource(bgId);\r\n// what = 1;\r\n// }\r\n// }\r\n// }\r\n if (what == 0) {\r\n final int bgId = ResourceUtil.getDrawableResourceIdFromName(context, Colorme.DRAWABLE_COLORME_AIYOUXI);\r\n view.setBackgroundResource(bgId);\r\n }\r\n\r\n Message msg = new Message();\r\n msg.what = what;\r\n mHandler.sendMessageDelayed(msg, 3000);\r\n }", "public void showSplashScreen() {\r\n\r\n JPanel content = (JPanel) getContentPane();\r\n content.setBackground(Color.white);\r\n\r\n // setting the window's properties\r\n \r\n int width = 700;\r\n int height = 438;\r\n Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();\r\n int x = (screen.width - width) / 2;\r\n int y = (screen.height - height) / 2;\r\n setBounds(x, y, width, height);\r\n\r\n // build the splash screen using an image \r\n \r\n JLabel gifImage = new JLabel(new ImageIcon(this.getClass().getResource(\"/splash.gif\")));\r\n content.add(gifImage, BorderLayout.CENTER);\r\n\r\n // display it\r\n setVisible(true);\r\n\r\n new resourceLoader().execute();\r\n }", "private void goToMainScreen() {\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent mainIntent;\n\n MainActivity act = new MainActivity();\n Intent intent = new Intent(getApplication(), MainActivity.class);\n startActivity(intent);\n finish();\n }\n }, SPLASH_DISPLAY_LENGHT);\n }", "@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.splashscreen);\n ((LinearLayout)findViewById(R.id.bgsplashid)).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent mainIntent = new Intent(splash.this,firstAct.class);\n isClicked = true;\n splash.this.startActivity(mainIntent);\n splash.this.finish();\n }\n });\n\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n /* Create an Intent that will start the Menu-Activity. */\n if(!isClicked) {\n Intent mainIntent = new Intent(splash.this, firstAct.class);\n splash.this.startActivity(mainIntent);\n splash.this.finish();\n }\n }\n }, SPLASH_DISPLAY_LENGTH);\n }", "@Override\n\t\t public void run() {\n\t\t \tsetContentView(R.layout.activity_splash);\n\t\t }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.splash);\n\t\tMyThread myThread=new MyThread();\n\t myThread.start();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash__screen);\n\n\n Thread splashTread = new Thread() {\n @Override\n public void run() {\n try {\n int waited = 0;\n while (_active && (waited < _splashTime)) {\n sleep(3000);\n if (_active) {\n waited += 3000;\n }\n }\n } catch (Exception e) {\n\n } finally {\n\n startActivity(new Intent(Splash_Screen.this,\n MainActivity.class));\n finish();\n }\n };\n };\n splashTread.start();\n\n// Thread thread = new Thread(){\n//\n// @Override\n// public void run() {\n// try {\n// sleep(SPLASH_DISPLAY_LENGTH);\n// Intent intent = new Intent(getApplicationContext(),MainActivity.class);\n// startActivity(intent);\n// finish();\n// } catch (InterruptedException e) {\n// e.printStackTrace();\n// }\n// }\n// };\n//\n// thread.start();\n\n\n }", "@Override\n public void onStart() {\n super.onStart();\n waitForSplashAnimation(SPLASH_SCREEN_DELAY);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_splash_screen);\n\t\tnm1 = (NotificationManager)getSystemService(NOTIFICATION_SERVICE); //Declaracion de notificacion\n\t\t\n\t\tTimerTask task = new TimerTask(){\n\t\t @Override\n\t public void run() {\n\t Intent mainIntent = new Intent().setClass(SplashScreen.this, MainActivity.class);\n\t startActivity(mainIntent);\n\t finish();//Destrucion de la actividad, usuario no tendra oportunidad de verla hasta reiniciar\n\t }\t\t\n\t};\n\tTimer timer = new Timer();\n\ttimer.schedule(task, splashDelay); //Pasando los 6 segundos entramos a la tarea en si\n\tnoti1();\n\t}", "void gotoMainIntent() {\r\n // Intenting to start the activity \"main\".\r\n Intent mainIntent = new Intent(this, Main.class);\r\n this.startActivity(mainIntent);\r\n this.finish(); // Splash screen is done now... Needed, otherwise when closing the main activity will result\r\n // in coming back to the splashscreen.\r\n }", "@Override\r\n protected void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.activity_splash);\r\n\r\n new Handler().postDelayed(new Runnable(){\r\n @Override\r\n public void run() {\r\n\r\n //check whether user has already logged in\r\n SharedPreferences pref = getSharedPreferences(\"ActivityPREF\", Context.MODE_PRIVATE);\r\n\r\n //if user has logged in\r\n if (pref.getBoolean(\"activity_executed\", false)) {\r\n\r\n String bus_or_pas = pref.getString(\"bus_or_passenger\",\"bus\");\r\n\r\n switch (bus_or_pas){\r\n //if user has logged as a bus\r\n case(\"bus\"):{\r\n Intent intent = new Intent(SplashActivity.this, BusMapsActivity.class);\r\n startActivity(intent);\r\n finish();\r\n\r\n break;\r\n }\r\n\r\n //if user has logged as passenger\r\n case (\"passenger\"):{\r\n Intent intent = new Intent(SplashActivity.this, NavDrawerActivity.class);\r\n startActivity(intent);\r\n finish();\r\n\r\n break;\r\n }\r\n }\r\n\r\n //if user hasn't logged in\r\n } else {\r\n Intent intent = new Intent(SplashActivity.this, MainActivity.class);\r\n startActivity(intent);\r\n finish();\r\n }\r\n\r\n\r\n }\r\n },SPLASH_TIME_OUT);\r\n\r\n\r\n\r\n }", "private void splashScreen() {\r\n\t\t// Clear the screen, reset the level, and display the legend\r\n\t\tclear();\r\n\t\tdisplay.setLegend(\"Asteroids\");\r\n\r\n\t\t// Place four asteroids near the corners of the screen.\r\n\t\tplaceAsteroids();\r\n\t}", "@Override\n public void run() {\n Intent i = new Intent(ActivitySplash.this, ActivityIntro.class);\n startActivity(i);\n\n // close this activity\n finish();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n new AddressBookPresenter(this);\n // 去掉标题\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n setContentView(R.layout.act_splash_screen);\n // 闪屏核心代码\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n // TODO Auto-generated method stub\n if (LinphoneManager.getCore().getProxyConfigList().length > 0)\n {\n return;\n }\n Intent intent = new Intent(ActSplashScreen.this,\n LoginPhoneActivity.class);\n // 从启动动画切换到主界面\n startActivity(intent);\n ActSplashScreen.this.finish();// 结束动画\n }\n }, 3000);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.splash_act);\n\n\t\tif (Build.VERSION.SDK_INT >= 11) {\n\t\t\tStrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()\n\t\t\t\t\t.detectDiskReads().detectDiskWrites().detectNetwork()\n\t\t\t\t\t.penaltyLog().build());\n\t\t\tStrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()\n\t\t\t\t\t.detectLeakedSqlLiteObjects().detectLeakedClosableObjects()\n\t\t\t\t\t.penaltyLog().penaltyDeath().build());\n\t\t}\n\n\t\tspl_rl = (RelativeLayout) this.findViewById(R.id.spl_rl);\n\n\t\tAlphaAnimation aa = new AlphaAnimation(0.5f, 1.0f);\n\t\taa.setDuration(2000);\n\t\tspl_rl.startAnimation(aa);\n\t\tnew Thread() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tsuper.run();\n\t\t\t\ttry {\n\t\t\t\t\tsleep(2000);\n\t\t\t\t\tloadMainUI();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}.start();\n\n\t}", "@Override\n public void run() {\n Intent mainIntent = new Intent(SplashActivity.this, RegisterActivity.class);\n startActivity(mainIntent);\n //finish zamyka nasza aplikace, jesli tego nie zrobimy dowktywnosci bedziemy mogli\n //wrocic\n finish();\n }", "private static void splashScreen() {\n\t\t\n\t\tString message = \"Welcome to JProject v\"+VERSION+\"\\nby Gabriel Skoropada\";\n\t\t\n\t\tJOptionPane.showMessageDialog(null, message, \"JProject v\"+VERSION, JOptionPane.NO_OPTION, null);\n\t\t\n\t}", "@Override\r\n public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.activity_splash_screen);\r\n StartAnimations();\r\n\r\n new Handler().postDelayed(new Runnable() {\r\n\r\n\r\n @Override\r\n public void run() {\r\n // This method will be executed once the timer is over\r\n Intent i = new Intent(SplashScreen.this, MainActivity.class);\r\n startActivity(i);\r\n finish();\r\n }\r\n }, 5000);\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n // Hide Navigation and Status Bar\n View decorView = getWindow().getDecorView();\n\n // Set layout\n setContentView(R.layout.activity_splash);\n\n int uiOptions;\n // Not displaying the status bar is only supported in SDK >= 16\n if (Build.VERSION.SDK_INT >= 16) {\n uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN;\n } else {\n uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;\n }\n decorView.setSystemUiVisibility(uiOptions);\n\n Thread checkPermissions = new Thread() {\n // Request necessary permissions\n\n @RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public void run() {\n super.run();\n if (checkSelfPermission(Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED\n || checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED\n || checkSelfPermission(Manifest.permission.INTERNET) != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(PERMISSIONS_NEEDED, PERMISSION_CODE);\n } else {\n try {\n TimeUnit.SECONDS.sleep(SECONDS_TO_WAIT);\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n Intent redirect = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(redirect);\n }\n }\n }\n };\n checkPermissions.start();\n }", "private void showSplash() {\n \t\tthis.splashInfoContainer.setVisibility( View.VISIBLE );\n \t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash_screen);\n\n pref = getApplicationContext().getSharedPreferences(AppConstants.mypreference, Context.MODE_PRIVATE);\n\n\n // ************************** SCREEN DISPLAY FOR SOMETIMES ******************************************\n\n final int welcomeScreenDisplay = 1500;\n /** create a thread to show splash up to splash time */\n Thread welcomeThread = new Thread()\n {\n int wait = 0;\n\n @Override\n public void run()\n {\n try\n {\n super.run();\n /**\n * use while to get the splash time. Use sleep() to increase\n * the wait variable for every 100L.\n */\n while (wait < welcomeScreenDisplay)\n {\n sleep(100);\n wait += 100;\n }\n }\n catch (Exception e) {\n System.out.println(\"EXC=\" + e);\n }\n finally {\n /**\n * Called after splash times up. Do some action after splash\n * times up. Here we moved to another main activity class\n */\n String getStatus=pref.getString(AppConstants.IS_LOGIN, \"null\");\n if(getStatus.equals(\"true\"))\n {\n Intent i=new Intent(getApplicationContext(),WelcomeScreen.class);\n startActivity(i);\n finish();\n\n }else\n {\n //first time\n Intent i=new Intent(getApplicationContext(),LoginScreen.class);\n startActivity(i);\n finish();\n\n }\n\n }\n }\n };\n welcomeThread.start();\n\n }", "public final void restartApp() {\r\n Intent intent = new Intent(getApplicationContext(), SplashActivity.class);\r\n intent.addFlags(32768);\r\n intent.addFlags(268435456);\r\n startActivity(intent);\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n super.onCreate(savedInstanceState);\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);\n GLSurfaceView view = new GLSurfaceView(this);\n view.setEGLConfigChooser(8, 8, 8, 8, 16, 0); //Transparent background\n view.getHolder().setFormat(PixelFormat.TRANSLUCENT); //Transparent background\n view.setRenderer(new OpenGLRenderer(this));\n setContentView(view);\n //Transition to Landing screen\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n // This app main activity\n Intent i = new Intent(SplashActivity.this, SearchActivity.class);\n startActivity(i);\n finish();\n }\n }, SPLASH_TIME_OUT);\n }", "public void onCreate(Bundle savedInstanceState) {\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);\n\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.activity_home_page);\n\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null) {\n actionBar.hide();\n }\n\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent startActivityIntent = new Intent(SplashActivity.this, HomePage.class);\n startActivity(startActivityIntent);\n SplashActivity.this.finish();\n }\n }\n , SPLASH_DISPLAY_LENGTH);\n }", "private void nextScreen() {\n mHandler.post(new Runnable() {\n @Override\n public void run() {\n Intent intent = new Intent(SplashScreenActivity.this, HomeActivity.class);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n //check draw over app permission\n if (!Settings.canDrawOverlays(SplashScreenActivity.this)) {\n intent = new Intent(SplashScreenActivity.this, DrawOverAppActivity.class);\n }\n }\n startActivity(intent);\n }\n });\n }", "@Override\r\n public void run() {\r\n Intent i = new Intent(SplashScreen.this, TelaLogin.class);\r\n startActivity(i);\r\n finish();\r\n }", "@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.sample);\n\n splash = findViewById(R.id.splashscreen);\n\n splash.startAnimation(\n AnimationUtils.loadAnimation(this, R.anim.rotation) );\n\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n /* Create an Intent that will start the Menu-Activity. */\n Intent mainIntent = new Intent(Sample.this,WebviewActivity.class);\n Sample.this.startActivity(mainIntent);\n Sample.this.finish();\n }\n }, SPLASH_DISPLAY_LENGTH);\n }", "@Override\n\tpublic Screen getStartScreen() {\n\t\treturn new Splash(this);\n\t}", "public void disposeSplashWindow()\n {\n \n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n this.requestWindowFeature(Window.FEATURE_NO_TITLE);\n setContentView(R.layout.activity_splash);\n\n initView();\n initPoint();\n mHandler = new AutoHandler(this);\n }", "@Override\n protected Void doInBackground() throws Exception {\n assert doStuff != null: \"Jævla dritt i doInBackground\";\n doStuff.showSplashScreen();\n return null;\n }", "@Override\n\t\t\t\t public void run() {\n\t\t\t\t \tsplashActivity.get().finish();\n\t\t\t\t \tsplashActivity = null;\n\t\t\t\t }", "@Override\n public void run() {\n // This method will be executed once the timer is over\n // Start your app main activity\n checkMainSetupCompletion();\n Intent i;\n if(isPermanentlySkipped == 1 || isFacebookLoggedIn == 1 )\n i = new Intent(SplashScreen.this, menuActivity.class);\n else\n i = new Intent(SplashScreen.this, MainActivity.class);\n startActivity(i);\n // close this activity\n finish();\n }", "@Override // org.apache.cordova.CordovaPlugin\n public void pluginInitialize() {\n if (!HAS_BUILT_IN_SPLASH_SCREEN) {\n this.cordova.getActivity().runOnUiThread(new Runnable() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass1 */\n\n public void run() {\n SplashScreen.this.getView().setVisibility(4);\n }\n });\n getSplashId();\n this.orientation = this.cordova.getActivity().getResources().getConfiguration().orientation;\n if (firstShow) {\n showSplashScreen(this.preferences.getBoolean(\"AutoHideSplashScreen\", true));\n }\n if (this.preferences.getBoolean(\"SplashShowOnlyFirstTime\", true)) {\n firstShow = false;\n }\n }\n }", "private void showSplash ()\n {\n ResourceBundle resourceBundle = null;\n try\n {\n resourceBundle = ResourceBundle.getBundle(\"splash\", Locale.getDefault());\n }\n catch (MissingResourceException ignored)\n {\n System.out.println(\"Info: file splash.properties not found in resources root directory.\");\n }\n\n FXMLLoader fxmlLoader = new FXMLLoader();\n if (resourceBundle != null)\n {\n fxmlLoader.setResources(resourceBundle);\n }\n try\n {\n primaryStage.setScene(new Scene(fxmlLoader.load(getClass().getResourceAsStream(\"/splash.fxml\"))));\n primaryStage.initStyle(StageStyle.UNDECORATED);\n primaryStage.centerOnScreen();\n primaryStage.show();\n }\n catch (NullPointerException ignored)\n {\n System.out.println(\"Info: file splash.fxml not found in resources root directory.\");\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n }\n }", "@Override\n public void run() \n {\n \n finish();\n \n if (!mIsBackButtonPressed) \n {\n // start the home screen if the back button wasn't pressed already \n Intent startApp = new Intent(SplashActivity.this, LandingActivity.class);\n SplashActivity.this.startActivity(startApp);\n }\n \n }", "@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash_screen);\n\n SharedPreferences sp = getSharedPreferences(FrozenBubble.PREFS_NAME,\n Context.MODE_PRIVATE);\n boolean showSplashScreen = sp.getBoolean(\"showSplashScreen\", true);\n if ( showSplashScreen )\n {\n SharedPreferences.Editor editor = sp.edit();\n editor.putBoolean(\"showSplashScreen\", false);\n editor.commit();\n }\n else\n {\n startFrozenBubble();\n return;\n }\n\n // thread for displaying the SplashScreen\n splashThread = new Thread()\n {\n @Override\n public void run()\n {\n try\n {\n synchronized(this)\n {\n //\n // TODO: The splash screen waits before launching\n // the game activity. Change this so that\n // the game activity is started immediately,\n // and notifies the splash screen activity\n // when it is done loading saved state data\n // and preferences, so the splash screen\n // functions as a distraction from game\n // loading latency.\n //\n //\n wait(_splashTime); //wait 3 seconds\n }\n } catch(InterruptedException e) {}\n finally\n {\n startFrozenBubble();\n }\n }\n };\n\n splashThread.start();\n }", "@Override\n public void run() {\n if (!isLoggedIn() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n // Start LoginActivity while Transition-animating the Ecole-logo\n Intent LoginActivity = new Intent(SplashActivity.this, LoginActivity.class);\n ActivityOptionsCompat transitionOptions = ActivityOptionsCompat.makeSceneTransitionAnimation(SplashActivity.this, ecoleIcon, ViewCompat.getTransitionName(ecoleIcon));\n startActivity(LoginActivity, transitionOptions.toBundle());\n }else if(!isLoggedIn() && Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP){\n /*\n * When the SDK Version is lower than API 21 start the login screen without animation,\n * since any API lower than 21 hasn't got Activity Transitions\n */\n Intent LoginActivity = new Intent(SplashActivity.this, LoginActivity.class);\n startActivity(LoginActivity);\n } else if (isLoggedIn()) {\n /*\n * If the user is already logged in just start the MainActivity.\n */\n Intent MainActivity = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(MainActivity);\n finish();\n }\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.logo_show);\n\t\tnew Thread(new Runnable() { \n @Override\n public void run() {\n // TODO Auto-generated method stub\n try {\n Thread.sleep(2000);\n Intent i = new Intent(ScreenLogo.this, MusicProject.class);\n startActivity(i);\n ScreenLogo.this.finish();\n //handler.sendMessage(handler.obtainMessage(1));\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }).start();\n\t}", "@Override\n public void run() {\n Intent mainIntent = new Intent(Splash.this, ScoreScreen.class);\n Splash.this.startActivity(mainIntent);\n Splash.this.finish();\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tgetWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,\n\t\t\t\tWindowManager.LayoutParams.FLAG_FULLSCREEN);\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.startup_splash);\n\n\t\t// graphics = (SplashView) findViewById(R.id.graphics);\n\t\tsplash = (ImageView) findViewById(R.id.splashImage);\n\t\trootSet = getAnimation();\n\n\t\tThread splashTread = new Thread() {\n\n\t\t\tpublic void run() {\n\n\t\t\t\tsplash.startAnimation(rootSet);\n\n\t\t\t\ttry {\n\t\t\t\t\tString[] keys = new String[] {};\n\t\t\t\t\tString[] values = new String[] {};\n\t\t\t\t\tString pagedata = Util.convertToString(HTTPUtil.performGET(\n\t\t\t\t\t\t\tConstants.baseUrl, keys, values));\n\n\t\t\t\t\tJSONObject pageData = new JSONObject(pagedata);\n\n\t\t\t\t\tString imgUrl = pageData.getString(\"picture\");\n\n\t\t\t\t\tConstants.profilePicture = UiUtil.loadImageFromURL(imgUrl);\n\t\t\t\t\tString feed = Util.convertToString(HTTPUtil.performGET(\n\t\t\t\t\t\t\tConstants.feedsUrl, keys, values));\n\t\t\t\t\tIntent intent = new Intent(StartupActivity.this,\n\t\t\t\t\t\t\tPostsActivity.class);\n\t\t\t\t\tintent.putExtra(\"feed\", feed);\n\t\t\t\t\tstartActivity(intent);\n\n\t\t\t\t} catch (Exception e) {\n\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tfinish();\n\n\t\t\t\treturn;\n\n\t\t\t}\n\t\t};\n\t\tsplashTread.start();\n\n\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tif(flag == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tIntent mainIntent = null;\r\n\t\t\t\t\tmainIntent = new Intent(SplashActivity.this,\r\n\t\t\t\t\t\t\tMainActivity.class);\r\n\t\t\t\t\tSplashActivity.this.startActivity(mainIntent);\r\n\t\t\t\t\tSplashActivity.this.finish();\r\n\t\t\t\t}\r\n\t\t\t\telse if(flag ==1)\r\n\t\t\t\t{\r\n\t\t\t\t\tIntent mainIntent = null;\r\n\t\t\t\t\tmainIntent = new Intent(SplashActivity.this,\r\n\t\t\t\t\t\t\tRegisterActivity.class);\r\n\t\t\t\t\tSplashActivity.this.startActivity(mainIntent);\r\n\t\t\t\t\tSplashActivity.this.finish();\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n \n mp = MediaPlayer.create(this, R.raw.love_story);\n mp.start();\n \n Thread logoTimer = new Thread(){\n \tpublic void run(){\n \t\ttry{\n \t\t\tint logoTimer = 0;\n \t\t\twhile(logoTimer<5000){\n \t\t\t\tsleep(100);\n \t\t\t\tlogoTimer = logoTimer +100;\n \t\t\t}\n \t\t\tstartActivity(new Intent(\"com.crognar.CLEARSCREEN\"));\n \t\t\t//clearscreen mag anders\n \t\t} \n \t\t\n \t\tcatch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n \t\t\n \t\tfinally{\n \t\t\tfinish();\n \t\t}\n \t}\n };\n logoTimer.start();\n }", "private void setupSplash() {\n \t\tthis.splashInfoContainer = (LinearLayout) this.findViewById( R.id.edit_gpsfilter_area_splash );\n \n \t\tTextView textView = (TextView) this.splashInfoContainer.findViewById( R.id.edit_gpsfilter_area_splash_text );\n \t\ttextView.setText( Html.fromHtml( this.getString( R.string.edit_gpsfilter_area_splash_text ) ) );\n \n \t\t// Define fade out animation.\n \t\tthis.splashFadeOut = new AlphaAnimation( 1.00f, 0.00f );\n \t\tthis.splashFadeOut.setDuration( SPLASH_FADE_DELAY );\n \t\tthis.splashFadeOut.setAnimationListener( new AnimationListener() {\n \t\t\tpublic void onAnimationStart( Animation animation ) {\n \t\t\t}\n \n \t\t\tpublic void onAnimationRepeat( Animation animation ) {\n \t\t\t}\n \n \t\t\tpublic void onAnimationEnd( Animation animation ) {\n \t\t\t\tsplashInfoContainer.setVisibility( View.GONE );\n \t\t\t}\n \t\t} );\n \n \t\t// Don't show if not new and we got polygon.\n \t\tif ( !this.isConsideredFresh() ) {\n \t\t\tthis.splashInfoContainer.setVisibility( View.GONE );\n \t\t}\n \t}", "public SplashScreen() {\r\n instance = this;\r\n\r\n width = 600;\r\n height = 600;\r\n\r\n icon = \"graphics/application/icon_96.png\";\r\n }", "private void initUI() {\n setContentView(R.layout.activity_launcher);\r\n new Thread() {\r\n @Override\r\n public void run() {\r\n // TODO Auto-generated method stub\r\n long time1 = System.currentTimeMillis();\r\n long time2 = 0;\r\n while (true) {\r\n if (BaseApplication.getInstance().isShelfDataLoadOver) {\r\n time2 = System.currentTimeMillis();\r\n break;\r\n }\r\n }\r\n long timeDis = time2 - time1;\r\n if (timeDis < 3500) {\r\n try {\r\n Thread.sleep(3500 - timeDis);\r\n } catch (InterruptedException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n\r\n LauncherActivity.this.runOnUiThread(new Runnable() {\r\n\r\n @Override\r\n public void run() {\r\n // TODO Auto-generated method stub\r\n startBookMain();\r\n }\r\n });\r\n\r\n }\r\n }.start();\r\n }", "protected void iniciarAplicacion()\n {\n \tiniciarModo();\n \tiniciarGUI();\n\n \t// Se fuerza la orientación de la pantalla a Landscape\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\n \n setDimensionesPantalla();\n\n // Mantener la pantalla activa\n getWindow().setFlags( \tWindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON,\n \t\t\t\t\t\tWindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\n }", "@Override\n public void run() {\n Intent i = new Intent(activity_splash.this, login_activity.class);\n startActivity(i);\n finish();\n }", "@Override\n protected void onPause() {\n super.onPause();\n mpSplash.pause();\n\n }", "public static void showSplashScreen(Class cls, String propFile) {//todo: is this useful ?????.....\n final Class appClass = cls;\n final String resPropFile = propFile;\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n if (splashScreen == null) {\n String filename = \"\";\n String resFile = CoreUtil.getPathOnly(appClass.getName(), true) + \"resources.\" + resPropFile;\n try {\n filename = ResourceBundle.getBundle(resFile)\n .getString(\"image.SplashScreenImage\");\n } catch (MissingResourceException e) {\n System.out.println(\"java.util.MissingResourceException: Couldn't find value for: image.SplashScreenImage\");\n }\n String path = \"resources/images/\" + filename;\n ImageIcon img = new ImageIcon(appClass.getResource(path));\n splashScreen = new JWindow();\n splashLabel = new JLabel(img);\n splashScreen.getContentPane().add(splashLabel);\n splashScreen.pack();\n }\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n splashScreen.setLocation(screenSize.width / 2 - splashScreen.getSize().width / 2,\n screenSize.height / 2 - splashScreen.getSize().height / 2);\n splashScreen.setVisible(true);\n }\n });\n }" ]
[ "0.69512033", "0.69347304", "0.6924493", "0.6905144", "0.68910533", "0.67703944", "0.6694202", "0.6690716", "0.6689525", "0.665731", "0.66357726", "0.6632455", "0.6622048", "0.66085005", "0.6594692", "0.6573568", "0.6569493", "0.6563659", "0.65528816", "0.65372473", "0.65260535", "0.65115947", "0.6504973", "0.65024716", "0.6476249", "0.64717484", "0.64674544", "0.64547694", "0.6445371", "0.64242244", "0.6408201", "0.6406801", "0.63962734", "0.63893574", "0.63683236", "0.63655263", "0.63562065", "0.6353446", "0.63358814", "0.63191015", "0.63148516", "0.6304719", "0.6291479", "0.62777174", "0.62769204", "0.6265475", "0.62589574", "0.62569785", "0.6253775", "0.6240182", "0.6240023", "0.62388885", "0.62378156", "0.62316734", "0.6203029", "0.6198686", "0.61920124", "0.61862445", "0.6173352", "0.6167047", "0.61667544", "0.6147542", "0.61396384", "0.61213714", "0.61022455", "0.6097735", "0.609275", "0.6091135", "0.60839254", "0.6074591", "0.6062889", "0.60588855", "0.60526776", "0.6026323", "0.6025716", "0.6007773", "0.60048497", "0.60041016", "0.5973047", "0.5970371", "0.59688205", "0.596765", "0.59327835", "0.5930304", "0.59269273", "0.5924552", "0.5919078", "0.5917377", "0.59171104", "0.5914786", "0.5906115", "0.5903102", "0.5900626", "0.589515", "0.5888674", "0.5882857", "0.5872126", "0.5869757", "0.5853812", "0.5849639", "0.5846407" ]
0.0
-1
Inicia o ciclo de exibicao temporaria da splash screen, seguindo com a animacao de transicao para exibir o conteudo principal da activity.
private void initializeSplashScreenCycle() { // desabilitando os botoes antes de iniciar a animacao da splash screen: Utilidades.Views.disableViews(this.arrViewsBloqueaveis); Animation animLayoutSplitLogo = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.splash_move); Animation animLayoutContent = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.splash_fade_in); animLayoutContent.setAnimationListener(new AnimationListener() { @Override public void onAnimationStart(Animation animation) { } @Override public void onAnimationRepeat(Animation animation) { } @Override public void onAnimationEnd(Animation animation) { // rehabilitando os botoes depois de finalizar a animacao da splash screen: Utilidades.Views.enableViews(arrViewsBloqueaveis); } }); ((RelativeLayout) findViewById(R.id.layout_split_logo)).startAnimation(animLayoutSplitLogo); ((RelativeLayout) findViewById(R.id.layout_content)).startAnimation(animLayoutContent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void splash(){\n ImageView splash = (ImageView) findViewById(R.id.mekslogo);\n Animation animation1 =\n AnimationUtils.loadAnimation(getApplicationContext(),\n R.anim.clockwise);\n animation1.setDuration(5000);\n splash.startAnimation(animation1);\n animation1.setAnimationListener(new Animation.AnimationListener() {\n @Override\n public void onAnimationStart(Animation animation) {\n\n }\n\n @Override\n public void onAnimationEnd(Animation animation) {\n // Toast.makeText(getApplicationContext(),\"Animation ended\",Toast.LENGTH_SHORT).show();\n Intent intent=new Intent(MainActivity.this, sign_up.class);\n startActivity(intent);\n }\n\n @Override\n public void onAnimationRepeat(Animation animation) {\n\n }\n });\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);\n }\n super.onCreate(savedInstanceState);\n setContentView(R.layout.helal_haram_splash);\n\n initViews();\n alphaAnimation(img);\n\n\n // splash efect kodu\n /* Thread timerThread = new Thread(){\n public void run(){\n try{\n sleep(1200);\n }catch(InterruptedException e){\n e.printStackTrace();\n }finally{\n\n Intent intent = new Intent(Splash.this, MainActivity.class);\n startActivity(intent);\n\n }\n }\n };\n timerThread.start();\n */\n }", "private void SplashScreen() {\n// if (!mSettings.getBoolean(\"PlayedBefore\", false)) {\n// mSolitaireView.DisplaySplash();\n// }\n splas.setVisibility(View.VISIBLE);\n Handler h = new Handler(Looper.getMainLooper());\n h.postDelayed(new Runnable() {\n @Override\n public void run() {\n splas.setVisibility(View.GONE);\n }\n }, 3000);\n }", "@Override\n public void showSplash() {\n }", "public void run() {\n Intent i = new Intent(activity_splash.this, MainActivity.class);\r\n startActivity(i); // menghubungkan activity splashscren ke xml\r\n //jeda selesai Splashscreen\r\n this.finish();\r\n }", "@Override\r\n public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.activity_splash_screen);\r\n StartAnimations();\r\n\r\n new Handler().postDelayed(new Runnable() {\r\n\r\n\r\n @Override\r\n public void run() {\r\n // This method will be executed once the timer is over\r\n Intent i = new Intent(SplashScreen.this, MainActivity.class);\r\n startActivity(i);\r\n finish();\r\n }\r\n }, 5000);\r\n }", "@Override\r\n\t\t public void run() {\n\t\t Intent i = new Intent(SplashScreen.this, MainMenuActivity.class);\r\n\t\t startActivity(i);\r\n\t\t \r\n\t\t //Menyelesaikan Splashscreen\r\n\t\t finish();\r\n\t\t }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash);\n ButterKnife.inject(this);\n\n if(getResources().getBoolean(R.bool.isTablet)){\n lyMain.setBackgroundResource(R.drawable.ic_tablet_splash);\n }else {\n lyMain.setBackgroundResource(R.drawable.ic_smatphone_splash);\n }\n\n Thread timerThread = new Thread() {\n public void run() {\n try {\n sleep(3000);\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n startActivity(new Intent(SplashActivity.this, ApplicationsGridActivity.class));\n }\n }\n };\n timerThread.start();\n\n }", "@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n\t\t/* layout splashscreen dengan background gambar */\n setContentView(R.layout.activity_spalsh);\n\t/* handler untuk menjalankan splashscreen selama 5 detik lalu\n\t * membuat HomeActivity\n\t */\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent mainIntent = null;\n\n mainIntent = new Intent(SpalshActivity.this,\n HomeActivity.class);\n\n SpalshActivity.this.startActivity(mainIntent);\n SpalshActivity.this.finish();\n overridePendingTransition(R.layout.fadein,R.layout.fadeout);\n\n\n }\n }, SPLASH_DISPLAY_LENGHT);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n //TODO: add any code you want to do while the splash screen is showing before the MainActivity is shown\n\n// try {\n// Thread.sleep(5000);\n// } catch (InterruptedException e) {\n// e.printStackTrace();\n// }\n\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n finish();\n }", "public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n\r\n // Do not display title bar, this makes the splash screen really full screen\r\n requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n \r\n // Check if we need to display the splash screen. If no, go directly to the main intent\r\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\r\n boolean showscreen = prefs.getBoolean(\"showsplashscreen\", true);\r\n if (! showscreen) {\r\n \t gotoMainIntent();\r\n \t return;\r\n }\r\n \r\n\r\n // Set the layout\r\n setContentView(R.layout.splash);\r\n\r\n // This will run after a specified time (SPLASH_DISPLAY_LENGHT milliseconds)\r\n new Handler().postDelayed(new Runnable(){\r\n public void run() {\r\n \t gotoMainIntent();\r\n }\r\n }, SPLASH_DISPLAY_LENGHT);\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n Thread timerThread = new Thread() {\n public void run() {\n try {\n sleep(3000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n if (user != null) {\n redireccionar();\n }else{\n Intent intent = new Intent(SplashScreen.this, Login.class);\n startActivity(intent);\n }\n\n }\n }\n };\n timerThread.start();\n }", "@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n\n }", "@Override\n public void run() {\n startActivity(new Intent(SplashActivity.this, MainActivity3.class));\n //Close the current welcome page after the jump\n SplashActivity.this.finish();\n }", "@Override\n public void run() {\n SplashScreen.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n startActivity(new Intent(SplashScreen.this,MainActivity.class));\n finish();\n\n }\n });\n }", "private void removeSplashScreen(final boolean z) {\n this.cordova.getActivity().runOnUiThread(new Runnable() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass4 */\n\n public void run() {\n if (SplashScreen.splashDialog != null && SplashScreen.this.splashImageView != null && SplashScreen.splashDialog.isShowing()) {\n int fadeDuration = SplashScreen.this.getFadeDuration();\n if (fadeDuration <= 0 || z) {\n SplashScreen.this.spinnerStop();\n SplashScreen.splashDialog.dismiss();\n Dialog unused = SplashScreen.splashDialog = null;\n SplashScreen.this.splashImageView = null;\n return;\n }\n AlphaAnimation alphaAnimation = new AlphaAnimation(1.0f, 0.0f);\n alphaAnimation.setInterpolator(new DecelerateInterpolator());\n alphaAnimation.setDuration((long) fadeDuration);\n SplashScreen.this.splashImageView.setAnimation(alphaAnimation);\n SplashScreen.this.splashImageView.startAnimation(alphaAnimation);\n alphaAnimation.setAnimationListener(new Animation.AnimationListener() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass4.AnonymousClass1 */\n\n public void onAnimationRepeat(Animation animation) {\n }\n\n public void onAnimationStart(Animation animation) {\n SplashScreen.this.spinnerStop();\n }\n\n public void onAnimationEnd(Animation animation) {\n if (SplashScreen.splashDialog != null && SplashScreen.this.splashImageView != null && SplashScreen.splashDialog.isShowing()) {\n SplashScreen.splashDialog.dismiss();\n Dialog unused = SplashScreen.splashDialog = null;\n SplashScreen.this.splashImageView = null;\n }\n }\n });\n }\n }\n });\n }", "private void setupSplash() {\n \t\tthis.splashInfoContainer = (LinearLayout) this.findViewById( R.id.edit_gpsfilter_area_splash );\n \n \t\tTextView textView = (TextView) this.splashInfoContainer.findViewById( R.id.edit_gpsfilter_area_splash_text );\n \t\ttextView.setText( Html.fromHtml( this.getString( R.string.edit_gpsfilter_area_splash_text ) ) );\n \n \t\t// Define fade out animation.\n \t\tthis.splashFadeOut = new AlphaAnimation( 1.00f, 0.00f );\n \t\tthis.splashFadeOut.setDuration( SPLASH_FADE_DELAY );\n \t\tthis.splashFadeOut.setAnimationListener( new AnimationListener() {\n \t\t\tpublic void onAnimationStart( Animation animation ) {\n \t\t\t}\n \n \t\t\tpublic void onAnimationRepeat( Animation animation ) {\n \t\t\t}\n \n \t\t\tpublic void onAnimationEnd( Animation animation ) {\n \t\t\t\tsplashInfoContainer.setVisibility( View.GONE );\n \t\t\t}\n \t\t} );\n \n \t\t// Don't show if not new and we got polygon.\n \t\tif ( !this.isConsideredFresh() ) {\n \t\t\tthis.splashInfoContainer.setVisibility( View.GONE );\n \t\t}\n \t}", "@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.activity_splash_screen);\n\n intent = new Intent(this, MainActivity.class);\n\n\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n\n //Start MainActivity\n startActivity(intent);\n finish();\n }\n }, SPLASH_DISPLAY_LENGTH);\n }", "@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.splashscreen);\n ((LinearLayout)findViewById(R.id.bgsplashid)).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent mainIntent = new Intent(splash.this,firstAct.class);\n isClicked = true;\n splash.this.startActivity(mainIntent);\n splash.this.finish();\n }\n });\n\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n /* Create an Intent that will start the Menu-Activity. */\n if(!isClicked) {\n Intent mainIntent = new Intent(splash.this, firstAct.class);\n splash.this.startActivity(mainIntent);\n splash.this.finish();\n }\n }\n }, SPLASH_DISPLAY_LENGTH);\n }", "@Override\n public void run() {\n Intent i = new Intent(ActivitySplash.this, ActivityIntro.class);\n startActivity(i);\n\n // close this activity\n finish();\n }", "public void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n requestWindowFeature(1);\n getWindow().setFlags(1024, 1024);\n setContentView(R.layout.activity_splash_screen);\n new Handler().postDelayed(new Runnable() {\n public void run() {\n SplashScreen.this.startActivity(new Intent(SplashScreen.this, MainActivity.class));\n SplashScreen.this.finish();\n }\n }, 3000);\n }", "@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.sample);\n\n splash = findViewById(R.id.splashscreen);\n\n splash.startAnimation(\n AnimationUtils.loadAnimation(this, R.anim.rotation) );\n\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n /* Create an Intent that will start the Menu-Activity. */\n Intent mainIntent = new Intent(Sample.this,WebviewActivity.class);\n Sample.this.startActivity(mainIntent);\n Sample.this.finish();\n }\n }, SPLASH_DISPLAY_LENGTH);\n }", "@Override\r\n public void onCreate(Bundle savedInstanceState) {\r\n\r\n super.onCreate(savedInstanceState);\r\n\r\n Context context = this.getApplicationContext();\r\n\r\n requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);\r\n\r\n SplashHandler mHandler = new SplashHandler();\r\n final int layoutId = ResourceUtil.getLayoutResourceIdFromName(context, Colorme.LAYOUT_COLORME_AIYOUXI_SPLASH);\r\n setContentView(layoutId);\r\n\r\n final int viewId = ResourceUtil.getIdResourceIdFromName(context, Colorme.ID_COLORME_AIYOUXI_DRAWABLE);\r\n View view = findViewById(viewId);\r\n\r\n int what = 0;\r\n// Intent intent = this.getIntent();\r\n// if (intent != null) {\r\n// Bundle bundle = intent.getExtras();\r\n// if (bundle != null) {\r\n// String type = bundle.getString(KEY_TYPE);\r\n// if (VALUE_JYZA.equals(type)) {\r\n// final int bgId = ResourceUtil.getDrawableResourceIdFromName(context, Colorme.DRAWABLE_COLORME_JYZA);\r\n// view.setBackgroundResource(bgId);\r\n// what = 1;\r\n// }\r\n// }\r\n// }\r\n if (what == 0) {\r\n final int bgId = ResourceUtil.getDrawableResourceIdFromName(context, Colorme.DRAWABLE_COLORME_AIYOUXI);\r\n view.setBackgroundResource(bgId);\r\n }\r\n\r\n Message msg = new Message();\r\n msg.what = what;\r\n mHandler.sendMessageDelayed(msg, 3000);\r\n }", "@Override\n public void onCreate(final Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.splash_screen);\n\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(() -> {\n Intent mainIntent = new Intent(SplashScreen.this, MainActivity.class);\n SplashScreen.this.startActivity(mainIntent);\n SplashScreen.this.finish();\n }, SPLASH_DISPLAY_SECONDS * 1000);\n }", "@Override\n public void run() {\n Intent i = new Intent(Splash.this, MainActivity.class);\n startActivity(i);\n finish();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n SplashScreen.show(this); // here\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n UserInfoData entry = new UserInfoData(this);\n \t\n \tentry.open();\n \t\n \tfinal String data = entry.getData();\n \t\n \tentry.close();\n Thread splashTimer = new Thread(){\n \tpublic void run(){\n \t\ttry{\n \t\t\tsleep(3000);\n \t\t\t\n \t}\n \t\tcatch(InterruptedException e){\n \t\t\t\n \t\t\te.printStackTrace();\n \t\t}\n finally{\n \tif (!data.equals(\"\")){\n \t\t\tstartActivity(new Intent (\"com.JacobyApps.android.mainMenu\")); \n \t}\n \t\telse{\n \n startActivity(new Intent (\"android.intent.action.Signup\"));\n \t}\n \tfinish();\n \t \n }\n \t \n \t}\n \t\n };\n splashTimer.start();\n }", "private void showSplashScreen() {\n splashDialog = new SplashScreenDialog(this);\n splashDialog.show();\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n makeActivityFullScreen();\n setContentView(R.layout.activity_splash);\n }", "@Override\r\n public void run() {\n Intent i = new Intent(SplashScreen.this, MainActivity.class);\r\n startActivity(i);\r\n finish();\r\n }", "protected void displaySplashScreen() {\n\t\t// Creates new thread to act as timer.\n\t\tThread logoTimer = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\n\t\t\t\t\tint logoTimer = 0;\n\t\t\t\t\t// Pauses for SPLASH_TIME amount of time\n\t\t\t\t\twhile (logoTimer < SPLASH_TIME) {\n\t\t\t\t\t\tsleep(100);\n\t\t\t\t\t\tlogoTimer = logoTimer + 100;\n\t\t\t\t\t}\n\t\t\t\t\t// Calls the activity from manifest.xml\n\t\t\t\t\tIntent intent = new Intent(getApplicationContext(),\n\t\t\t\t\t\t\tMenuActivity.class);\n\t\t\t\t\tintent.putExtra(\"connect\", connect);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t// Starts the thread.\n\t\tlogoTimer.start();\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.splash_act);\n\n\t\tif (Build.VERSION.SDK_INT >= 11) {\n\t\t\tStrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()\n\t\t\t\t\t.detectDiskReads().detectDiskWrites().detectNetwork()\n\t\t\t\t\t.penaltyLog().build());\n\t\t\tStrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()\n\t\t\t\t\t.detectLeakedSqlLiteObjects().detectLeakedClosableObjects()\n\t\t\t\t\t.penaltyLog().penaltyDeath().build());\n\t\t}\n\n\t\tspl_rl = (RelativeLayout) this.findViewById(R.id.spl_rl);\n\n\t\tAlphaAnimation aa = new AlphaAnimation(0.5f, 1.0f);\n\t\taa.setDuration(2000);\n\t\tspl_rl.startAnimation(aa);\n\t\tnew Thread() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tsuper.run();\n\t\t\t\ttry {\n\t\t\t\t\tsleep(2000);\n\t\t\t\t\tloadMainUI();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}.start();\n\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash__screen);\n\n\n Thread splashTread = new Thread() {\n @Override\n public void run() {\n try {\n int waited = 0;\n while (_active && (waited < _splashTime)) {\n sleep(3000);\n if (_active) {\n waited += 3000;\n }\n }\n } catch (Exception e) {\n\n } finally {\n\n startActivity(new Intent(Splash_Screen.this,\n MainActivity.class));\n finish();\n }\n };\n };\n splashTread.start();\n\n// Thread thread = new Thread(){\n//\n// @Override\n// public void run() {\n// try {\n// sleep(SPLASH_DISPLAY_LENGTH);\n// Intent intent = new Intent(getApplicationContext(),MainActivity.class);\n// startActivity(intent);\n// finish();\n// } catch (InterruptedException e) {\n// e.printStackTrace();\n// }\n// }\n// };\n//\n// thread.start();\n\n\n }", "public void startSplashGameOver(){\r\n\t\t\r\n\t\tpanel[CurrentPanel].stop();\r\n\t\t\r\n\t\tDriver.panel[CurrentPanel].setVisible(false);\r\n\t\tgame.remove(panel[CurrentPanel] );\r\n\t\t\r\n\t\tCurrentPanel = 0;\r\n\t\t\r\n\t\t\r\n\t\tpanel[CurrentPanel] = new Splash(this);\r\n\t\t\r\n\t\tadd( panel[CurrentPanel] );\r\n\t\tpanel[CurrentPanel].setVisible(true);\r\n\t\tgame.setVisible(true);\r\n\t\t\r\n\t\tpanel[CurrentPanel].start();\r\n\t\t\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_welecome);\n l1 = (LinearLayout) findViewById(R.id.l1);\n l2 = (LinearLayout) findViewById(R.id.l2);\n progressBar=(ProgressBar)findViewById(R.id.loadingPanel);\n progressBar.setVisibility(View.GONE);\n progressBar.setVisibility(View.VISIBLE);\n uptodown = AnimationUtils.loadAnimation(this,R.anim.uptodown);\n downtoup = AnimationUtils.loadAnimation(this,R.anim.downtoup);\n l1.setAnimation\n (uptodown);\n l2.setAnimation(downtoup);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n //Do any action here. Now we are moving to next page\n Intent mySuperIntent = new Intent(welecomeActivity.this, IntroApplicationActivity.class);\n startActivity(mySuperIntent);\n /* This 'finish()' is for exiting the app when back button pressed\n * from Home page which is ActivityHome\n */\n finish();\n }\n }, SPLASH_TIME);\n }", "@Override\n public void onStart() {\n super.onStart();\n waitForSplashAnimation(SPLASH_SCREEN_DELAY);\n }", "@Override\n protected Void doInBackground() throws Exception {\n assert doStuff != null: \"Jævla dritt i doInBackground\";\n doStuff.showSplashScreen();\n return null;\n }", "private void waitForSplashAnimation(int duration) {\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n clearAndStartActivity(new Intent(SplashActivity.this, MainMenuActivity.class));\n }\n\n }, duration);\n }", "public void run() {\n Intent mainIntent = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(mainIntent);\n finish();\n }", "@Override\n public void run() {\n Picasso.with(SplashActivity.this).load(mSplashInfo.getImageUri())\n .into(mStartupImageView);\n mImageSrcTextView.setText(mSplashInfo.getImageSrcInfo());\n // start the animation\n mStartupImageView.startAnimation(mAnimationZoomIn);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n mStartupImageView.startAnimation(mAnimationFadeOut);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent intent = new Intent(SplashActivity.this, MainActivity.class);\n //Add Flags to prevent BACK touch to a wrong activity\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n }\n }, 500);\n }\n }, 3000);\n }", "@Override\n\t\t public void run() {\n\t\t \tsetContentView(R.layout.activity_splash);\n\t\t }", "private void showSplash() {\n \t\tthis.splashInfoContainer.setVisibility( View.VISIBLE );\n \t}", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState)\n {\n Log.d(TAG, \"onCreate: started\");\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash);\n\n\n animFadein = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.fade_in);\n\n\n //animFadein.setAnimationListener(this);\n\n\n Thread thread = new Thread()\n {\n @Override\n public void run() {\n Log.d(TAG, \"run: started\");\n try\n {\n Thread.sleep(5000);\n } catch (InterruptedException e)\n {\n e.printStackTrace();\n }\n\n Intent i = new Intent(SplashScreen.this, MainActivity.class);\n\n Intent i2 = new Intent(SplashScreen.this,MyService.class);\n stopService(i2);\n\n startActivity(i);\n }\n };\n\n Thread threadMuisic = new Thread()\n {\n @Override\n public void run() {\n\n Intent i = new Intent(SplashScreen.this, MyService.class);\n startService(i);\n }\n };\n\n thread.start();\n threadMuisic.start();\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n /* ani = AnimationUtils.loadAnimation(this,R.anim.animation_1);\n ani.setDuration(2000);\n ll = (LinearLayout)findViewById(R.id.back1);\n ll.setBackgroundResource(R.drawable.list_view);\n animationDrawable = (AnimationDrawable)ll.getBackground();\n animationDrawable.start();\n ll.startAnimation(ani);*/\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n /* Create an Intent that will start the Menu-Activity. */\n Intent mainIntent = new Intent(getApplicationContext(), Login_state_checker.class);\n startActivity(mainIntent);\n finish();\n }\n }, SPLASH_DISPLAY_LENGTH);\n }", "@Override\n public void run() {\n if (!isLoggedIn() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n // Start LoginActivity while Transition-animating the Ecole-logo\n Intent LoginActivity = new Intent(SplashActivity.this, LoginActivity.class);\n ActivityOptionsCompat transitionOptions = ActivityOptionsCompat.makeSceneTransitionAnimation(SplashActivity.this, ecoleIcon, ViewCompat.getTransitionName(ecoleIcon));\n startActivity(LoginActivity, transitionOptions.toBundle());\n }else if(!isLoggedIn() && Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP){\n /*\n * When the SDK Version is lower than API 21 start the login screen without animation,\n * since any API lower than 21 hasn't got Activity Transitions\n */\n Intent LoginActivity = new Intent(SplashActivity.this, LoginActivity.class);\n startActivity(LoginActivity);\n } else if (isLoggedIn()) {\n /*\n * If the user is already logged in just start the MainActivity.\n */\n Intent MainActivity = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(MainActivity);\n finish();\n }\n }", "private void hideSplash() {\n \t\tthis.splashInfoContainer.startAnimation( this.splashFadeOut );\n \t}", "@Override\n public void run() {\n Intent i = new Intent(SplashScreenActivity.this, MainActivity.class);\n startActivity(i);\n finish();\n }", "@Override \r\n public void onCreate(Bundle icicle) { \r\n super.onCreate(icicle);\r\n \r\n getWindow().setFormat(PixelFormat.RGBA_8888);\r\n getWindow().addFlags(WindowManager.LayoutParams.FLAG_DITHER);\r\n setContentView(R.layout.splash_activity);\r\n \r\n //Display the current version number \r\n PackageManager pm = getPackageManager(); \r\n try {\r\n \tPackageInfo pi = pm.getPackageInfo(\"org.mems\", 0);\r\n TextView versionNumber = (TextView) findViewById(R.id.versionNumber); \r\n versionNumber.setText(\"Version \" + pi.versionName); \r\n } catch (NameNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n \r\n new Handler().postDelayed(new Runnable() {\r\n public void run() { \r\n \tIntent mainIntent = new Intent(SplashActivity.this, MainActivity.class); \r\n \tSplashActivity.this.startActivity(mainIntent); \r\n \tSplashActivity.this.finish(); \r\n } \r\n }, 2000); //2000 for release \r\n }", "@Override\n public void run() {\n Intent mainIntent = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(mainIntent);\n finish();\n }", "@Override\n public void run() {\n progressBar.setVisibility(View.GONE);\n // Esse método será executado sempre que o timer acabar\n // E inicia a activity principal\n Intent i = new Intent(SplashAct.this, LogEnter.class);\n startActivity(i);\n\n // Fecha esta activity\n finish();\n }", "@Override\n public void run() {\n Intent intent = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(intent);\n finish();\n }", "void setSplashContentView() {\n// verifyUser = PreferenceHelper.isVerifyMail(getContext());\n // user is logged in app and is active.\n view.setSplashViewLayout(R.layout.activity_splash);\n\n }", "@Override\n public void run() {\n Intent intent = new Intent(SplashActivity.this, CidadeActivity.class);\n /* startactivity solicita uma intent para saber o que deve fazer */\n startActivity(intent);\n finish();\n }", "private void skippingWorks() {\n Storage storage = new Storage(SplashActivity.this);\n if (storage.getLogInState()) {\n Intent intent = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(intent);\n SplashActivity.this.overridePendingTransition(R.anim.slide_left, R.anim.slide_right);\n finish();\n } else {\n /*if user is previously not logged in take him to the AuthActivity*/\n Intent intent = new Intent(SplashActivity.this, AuthActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n SplashActivity.this.overridePendingTransition(R.anim.slide_left, R.anim.slide_right);\n finish();\n }\n }", "public void goBackToSplash(View view) {\n startActivity(new Intent(view.getContext(), SplashScreenActivity.class));\n finish();\n }", "@Override\n protected void onPause() {\n super.onPause();\n mpSplash.pause();\n\n }", "@Override\n public void run() {\n Intent intent = new Intent(SplashScreen.this, Welcome.class);\n startActivity(intent);\n finish();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_splash_screen);\n\t\tnm1 = (NotificationManager)getSystemService(NOTIFICATION_SERVICE); //Declaracion de notificacion\n\t\t\n\t\tTimerTask task = new TimerTask(){\n\t\t @Override\n\t public void run() {\n\t Intent mainIntent = new Intent().setClass(SplashScreen.this, MainActivity.class);\n\t startActivity(mainIntent);\n\t finish();//Destrucion de la actividad, usuario no tendra oportunidad de verla hasta reiniciar\n\t }\t\t\n\t};\n\tTimer timer = new Timer();\n\ttimer.schedule(task, splashDelay); //Pasando los 6 segundos entramos a la tarea en si\n\tnoti1();\n\t}", "@Override\n public void run() {\n\n Intent starthome = new Intent(SplashScreenActivity.this, WelcomeActivity.class);\n starthome.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(starthome);\n\n finish();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n ImageView image = (ImageView)findViewById(R.id.logo);//logo image\n Animation animation1 =\n AnimationUtils.loadAnimation(getApplicationContext(), R.anim.side_slide); //animation\n image.startAnimation(animation1);\n TextView t = (TextView) findViewById(R.id.textView2);\n t.startAnimation(animation1);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n\n Intent mySuperIntent = new Intent(MainActivity.this, Main2Activity.class);//link to main activity 2\n startActivity(mySuperIntent);\n finish();\n }\n }, SPLASH_TIME);\n }", "public void disposeSplashWindow()\n {\n \n }", "@Override\n\t\t\t\t public void run() {\n\t\t\t\t \tsplashActivity.get().finish();\n\t\t\t\t \tsplashActivity = null;\n\t\t\t\t }", "@Override\n public void run() {\n Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class);\n startActivity(intent);\n finish();\n }", "@Override\r\n public void run() {\n if (preferences.getBoolean(\"isMain\",false))\r\n {\r\n startActivity(new Intent(SplashScreen.this,MainActivity.class));\r\n finish();\r\n }else {\r\n editor.putBoolean(\"isMain\",true);\r\n editor.apply();\r\n\r\n TaskStackBuilder.create(SplashScreen.this)\r\n .addNextIntentWithParentStack(new Intent(SplashScreen.this,MainActivity.class))\r\n .addNextIntent(new Intent(SplashScreen.this,IntroActivity.class))\r\n .startActivities();\r\n }\r\n }", "@Override\n public void run() {\n Intent mainIntent = new Intent(StartSplash.this, SplashActivity.class);\n StartSplash.this.startActivity(mainIntent);\n StartSplash.this.finish();\n }", "public static void disposeSplash(){\n splash.dispose();\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.splash);\n\n\t\tRunnable showMain = new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tIntent intent = new Intent(SplashActivity.this, KeepErAppyActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tLog.i(Util.TAG, \"SplashActivity.onCreate.run\");\n\t\t\t}\n\t\t};\n\n\t\tView vw = findViewById(R.id.big_beer);\n\t\tvw.postDelayed(showMain, 1000);\n\t\tLog.i(Util.TAG, \"SplashActivity.onCreate\");\n\t}", "public void showSplashScreen() {\r\n\r\n JPanel content = (JPanel) getContentPane();\r\n content.setBackground(Color.white);\r\n\r\n // setting the window's properties\r\n \r\n int width = 700;\r\n int height = 438;\r\n Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();\r\n int x = (screen.width - width) / 2;\r\n int y = (screen.height - height) / 2;\r\n setBounds(x, y, width, height);\r\n\r\n // build the splash screen using an image \r\n \r\n JLabel gifImage = new JLabel(new ImageIcon(this.getClass().getResource(\"/splash.gif\")));\r\n content.add(gifImage, BorderLayout.CENTER);\r\n\r\n // display it\r\n setVisible(true);\r\n\r\n new resourceLoader().execute();\r\n }", "public void run(){\r\n try{\r\n \tsleep(DURACION_SPLASH);\r\n }catch(InterruptedException e){\r\n //Si no puedo ejecutar el sleep muestro el error\r\n e.printStackTrace();\r\n }finally{\r\n //Llamo a la nueva actividad\r\n Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class);\r\n \tstartActivity(intent);\r\n \tfinish();\r\n } \r\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.logo_show);\n\t\tnew Thread(new Runnable() { \n @Override\n public void run() {\n // TODO Auto-generated method stub\n try {\n Thread.sleep(2000);\n Intent i = new Intent(ScreenLogo.this, MusicProject.class);\n startActivity(i);\n ScreenLogo.this.finish();\n //handler.sendMessage(handler.obtainMessage(1));\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }).start();\n\t}", "@Override\n public void onBackPressed() {\n Intent intent = new Intent(this, SplashActivity.class);\n startActivity(intent);\n }", "@Override\n public void run() {\n Intent mainIntent = new Intent().setClass(\n SplashScreenActivity.this, MainActivity.class);\n startActivity(mainIntent);\n \n // Close the activity so the user won't able to go back this\n // activity pressing Back button\n finish();\n }", "public S<T> splash(int time,final String nextActivity){\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n to(nextActivity);\n activity.finish();\n }\n }, time);\n \n\t\treturn this;\n\t}", "@Override\n public void run() {\n\n mShimmerViewContainer.setBaseAlpha(1);\n\n Animation animation2 = AnimationUtils.loadAnimation(Splash_Activity.this, R.anim.alpha);\n\n mShimmerViewContainer.setAnimation(animation2);\n\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n super.onCreate(savedInstanceState);\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);\n GLSurfaceView view = new GLSurfaceView(this);\n view.setEGLConfigChooser(8, 8, 8, 8, 16, 0); //Transparent background\n view.getHolder().setFormat(PixelFormat.TRANSLUCENT); //Transparent background\n view.setRenderer(new OpenGLRenderer(this));\n setContentView(view);\n //Transition to Landing screen\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n // This app main activity\n Intent i = new Intent(SplashActivity.this, SearchActivity.class);\n startActivity(i);\n finish();\n }\n }, SPLASH_TIME_OUT);\n }", "@Override\n public void run() {\n Intent splashScreen=new Intent(SplashScreen.this,Donor.class);\n startActivity(splashScreen);\n finish();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash_screen);\n\n pref = getApplicationContext().getSharedPreferences(AppConstants.mypreference, Context.MODE_PRIVATE);\n\n\n // ************************** SCREEN DISPLAY FOR SOMETIMES ******************************************\n\n final int welcomeScreenDisplay = 1500;\n /** create a thread to show splash up to splash time */\n Thread welcomeThread = new Thread()\n {\n int wait = 0;\n\n @Override\n public void run()\n {\n try\n {\n super.run();\n /**\n * use while to get the splash time. Use sleep() to increase\n * the wait variable for every 100L.\n */\n while (wait < welcomeScreenDisplay)\n {\n sleep(100);\n wait += 100;\n }\n }\n catch (Exception e) {\n System.out.println(\"EXC=\" + e);\n }\n finally {\n /**\n * Called after splash times up. Do some action after splash\n * times up. Here we moved to another main activity class\n */\n String getStatus=pref.getString(AppConstants.IS_LOGIN, \"null\");\n if(getStatus.equals(\"true\"))\n {\n Intent i=new Intent(getApplicationContext(),WelcomeScreen.class);\n startActivity(i);\n finish();\n\n }else\n {\n //first time\n Intent i=new Intent(getApplicationContext(),LoginScreen.class);\n startActivity(i);\n finish();\n\n }\n\n }\n }\n };\n welcomeThread.start();\n\n }", "@Override\n public void run() {\n startActivity(i);\n SplashActivity.this.finish();\n }", "private static void hideSplashScreen() {\n if (splash != null) {\n splash.dispose();\n splash = null;\n }\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n new AddressBookPresenter(this);\n // 去掉标题\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n setContentView(R.layout.act_splash_screen);\n // 闪屏核心代码\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n // TODO Auto-generated method stub\n if (LinphoneManager.getCore().getProxyConfigList().length > 0)\n {\n return;\n }\n Intent intent = new Intent(ActSplashScreen.this,\n LoginPhoneActivity.class);\n // 从启动动画切换到主界面\n startActivity(intent);\n ActSplashScreen.this.finish();// 结束动画\n }\n }, 3000);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n SplashScreen.show(this);\n super.onCreate(savedInstanceState);\n }", "@Override\n public void run() {\n // This method will be executed once the timer is over\n // Start your app main activity\n Intent i = new Intent(SplashScreen.this, MainActivity.class);\n startActivity(i);\n\n // close this activity\n finish();\n }", "@Override\n public void run() {\n Intent mainIntent = new Intent(SplashscreenActivity.this, MainActivity.class);\n SplashscreenActivity.this.startActivity(mainIntent);\n //We call finish() function to prevent user to come back to splashScreen\n SplashscreenActivity.this.finish();\n }", "public void onCreate(Bundle savedInstanceState) {\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);\n\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.activity_home_page);\n\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null) {\n actionBar.hide();\n }\n\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent startActivityIntent = new Intent(SplashActivity.this, HomePage.class);\n startActivity(startActivityIntent);\n SplashActivity.this.finish();\n }\n }\n , SPLASH_DISPLAY_LENGTH);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash_screen);\n Intent intent = new Intent(getApplicationContext(),InitialSetupActivity.class);\n startActivity(intent);\n finish();\n }", "@Override\n public void run() \n {\n \n finish();\n \n if (!mIsBackButtonPressed) \n {\n // start the home screen if the back button wasn't pressed already \n Intent startApp = new Intent(SplashActivity.this, LandingActivity.class);\n SplashActivity.this.startActivity(startApp);\n }\n \n }", "@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\n\t\t\t\tIntent it = new Intent(Splash.this, PageHomeActivity.class);\r\n\t\t\t\tSplash.this.startActivity(it);\r\n\t\t\t\tfinish();\r\n\t\t\t}", "public ScreenSplash() {\n initComponents();\n this.setCursor(new Cursor(HAND_CURSOR));\n setBackground(new Color(0, 0, 0, 0));\n }", "@Override\r\n protected void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.activity_splash);\r\n\r\n new Handler().postDelayed(new Runnable(){\r\n @Override\r\n public void run() {\r\n\r\n //check whether user has already logged in\r\n SharedPreferences pref = getSharedPreferences(\"ActivityPREF\", Context.MODE_PRIVATE);\r\n\r\n //if user has logged in\r\n if (pref.getBoolean(\"activity_executed\", false)) {\r\n\r\n String bus_or_pas = pref.getString(\"bus_or_passenger\",\"bus\");\r\n\r\n switch (bus_or_pas){\r\n //if user has logged as a bus\r\n case(\"bus\"):{\r\n Intent intent = new Intent(SplashActivity.this, BusMapsActivity.class);\r\n startActivity(intent);\r\n finish();\r\n\r\n break;\r\n }\r\n\r\n //if user has logged as passenger\r\n case (\"passenger\"):{\r\n Intent intent = new Intent(SplashActivity.this, NavDrawerActivity.class);\r\n startActivity(intent);\r\n finish();\r\n\r\n break;\r\n }\r\n }\r\n\r\n //if user hasn't logged in\r\n } else {\r\n Intent intent = new Intent(SplashActivity.this, MainActivity.class);\r\n startActivity(intent);\r\n finish();\r\n }\r\n\r\n\r\n }\r\n },SPLASH_TIME_OUT);\r\n\r\n\r\n\r\n }", "@Override\n public void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n //Assign the splashscreen_activity_main layout to the SplashScreenActivity\n setContentView(R.layout.splashscreen_activity_main);\n\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n /* Create an Intent that will start the Menu-Activity. */\n Intent mainIntent = new Intent(SplashscreenActivity.this, MainActivity.class);\n SplashscreenActivity.this.startActivity(mainIntent);\n //We call finish() function to prevent user to come back to splashScreen\n SplashscreenActivity.this.finish();\n }\n }, SPLASH_DISPLAY_LENGTH);\n }", "@Override\r\n public void run() {\r\n Intent i = new Intent(SplashScreen.this, TelaLogin.class);\r\n startActivity(i);\r\n finish();\r\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n \n mp = MediaPlayer.create(this, R.raw.love_story);\n mp.start();\n \n Thread logoTimer = new Thread(){\n \tpublic void run(){\n \t\ttry{\n \t\t\tint logoTimer = 0;\n \t\t\twhile(logoTimer<5000){\n \t\t\t\tsleep(100);\n \t\t\t\tlogoTimer = logoTimer +100;\n \t\t\t}\n \t\t\tstartActivity(new Intent(\"com.crognar.CLEARSCREEN\"));\n \t\t\t//clearscreen mag anders\n \t\t} \n \t\t\n \t\tcatch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n \t\t\n \t\tfinally{\n \t\t\tfinish();\n \t\t}\n \t}\n };\n logoTimer.start();\n }", "@Override\r\n public void run() {\r\n // This method will be executed once the timer is over\r\n // Start your app main activity\r\n Intent i = new Intent(SplashScreen.this, MainActivity.class);\r\n startActivity(i);\r\n\r\n // close this activity\r\n finish();\r\n }", "private static void splashScreen() {\n\t\t\n\t\tString message = \"Welcome to JProject v\"+VERSION+\"\\nby Gabriel Skoropada\";\n\t\t\n\t\tJOptionPane.showMessageDialog(null, message, \"JProject v\"+VERSION, JOptionPane.NO_OPTION, null);\n\t\t\n\t}", "private void nextScreen() {\n mHandler.post(new Runnable() {\n @Override\n public void run() {\n Intent intent = new Intent(SplashScreenActivity.this, HomeActivity.class);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n //check draw over app permission\n if (!Settings.canDrawOverlays(SplashScreenActivity.this)) {\n intent = new Intent(SplashScreenActivity.this, DrawOverAppActivity.class);\n }\n }\n startActivity(intent);\n }\n });\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n this.requestWindowFeature(Window.FEATURE_NO_TITLE);\n setContentView(R.layout.activity_splash);\n\n initView();\n initPoint();\n mHandler = new AutoHandler(this);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n SplashScreenBuilder.getInstance(this)\n .setVideo(R.raw.splash_animation)\n .setImage(R.drawable.app_icon)\n .enableSkipOnTap(false)\n .show();\n\n Button restart_app = findViewById(R.id.restart_app);\n restart_app.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n // Restart app\n Intent i = getBaseContext().getPackageManager().getLaunchIntentForPackage(getBaseContext().getPackageName());\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(i);\n overridePendingTransition(0, 0);\n finish();\n }\n });\n }", "private void spinnerStart() {\n this.cordova.getActivity().runOnUiThread(new Runnable() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass6 */\n\n public void run() {\n String string;\n SplashScreen.this.spinnerStop();\n ProgressDialog unused = SplashScreen.spinnerDialog = new ProgressDialog(SplashScreen.this.webView.getContext());\n SplashScreen.spinnerDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass6.AnonymousClass1 */\n\n public void onCancel(DialogInterface dialogInterface) {\n ProgressDialog unused = SplashScreen.spinnerDialog = null;\n }\n });\n SplashScreen.spinnerDialog.setCancelable(false);\n SplashScreen.spinnerDialog.setIndeterminate(true);\n RelativeLayout relativeLayout = new RelativeLayout(SplashScreen.this.cordova.getActivity());\n relativeLayout.setGravity(17);\n relativeLayout.setLayoutParams(new RelativeLayout.LayoutParams(-2, -2));\n ProgressBar progressBar = new ProgressBar(SplashScreen.this.webView.getContext());\n RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-2, -2);\n layoutParams.addRule(13, -1);\n progressBar.setLayoutParams(layoutParams);\n if (Build.VERSION.SDK_INT >= 21 && (string = SplashScreen.this.preferences.getString(\"SplashScreenSpinnerColor\", null)) != null) {\n int parseColor = Color.parseColor(string);\n progressBar.setIndeterminateTintList(new ColorStateList(new int[][]{new int[]{16842910}, new int[]{-16842910}, new int[]{-16842912}, new int[]{16842919}}, new int[]{parseColor, parseColor, parseColor, parseColor}));\n }\n relativeLayout.addView(progressBar);\n SplashScreen.spinnerDialog.getWindow().clearFlags(2);\n SplashScreen.spinnerDialog.getWindow().setBackgroundDrawable(new ColorDrawable(0));\n SplashScreen.spinnerDialog.show();\n SplashScreen.spinnerDialog.setContentView(relativeLayout);\n }\n });\n }", "public static void hideSplashScreen() {//todo: is this useful ?????.....\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n if (splashScreen != null) {\n splashScreen.setVisible(false);\n splashScreen.dispose();\n }\n }\n });\n }", "public Splash() {\n initComponents();\n }" ]
[ "0.7453707", "0.7369857", "0.72216475", "0.71246076", "0.69044185", "0.68912745", "0.6856517", "0.68535453", "0.68298626", "0.6754833", "0.6688386", "0.6682068", "0.66643643", "0.6660629", "0.6644893", "0.66426593", "0.6602209", "0.6593905", "0.655718", "0.6549199", "0.654631", "0.6541826", "0.6493674", "0.649179", "0.64883804", "0.64615303", "0.64613295", "0.6454152", "0.6449407", "0.643454", "0.6432945", "0.64327466", "0.64278173", "0.64106363", "0.6406727", "0.6405802", "0.64051163", "0.63928574", "0.639", "0.63843226", "0.63837993", "0.6382029", "0.637252", "0.6370703", "0.63642365", "0.63630116", "0.6360035", "0.6359663", "0.63514245", "0.6351354", "0.63449097", "0.6332792", "0.63288534", "0.63212264", "0.6321224", "0.6310216", "0.6308419", "0.6302777", "0.6287742", "0.6279258", "0.62690496", "0.6265981", "0.62410843", "0.62385297", "0.62343276", "0.6222901", "0.6222694", "0.61817974", "0.6171757", "0.61682487", "0.6148487", "0.6145679", "0.6144764", "0.6131785", "0.6130895", "0.61227363", "0.6119623", "0.610018", "0.60834783", "0.6079961", "0.6079332", "0.60751975", "0.6073781", "0.6066761", "0.60536313", "0.6051593", "0.6051456", "0.6047605", "0.60353947", "0.60240656", "0.6021313", "0.60129464", "0.60024554", "0.5980207", "0.59733593", "0.59690005", "0.5967812", "0.5965641", "0.5960506", "0.5959334" ]
0.6791538
9
rehabilitando os botoes depois de finalizar a animacao da splash screen:
@Override public void onAnimationEnd(Animation animation) { Utilidades.Views.enableViews(arrViewsBloqueaveis); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initializeSplashScreenCycle()\n\t{\n\t\t// desabilitando os botoes antes de iniciar a animacao da splash screen:\n\t\tUtilidades.Views.disableViews(this.arrViewsBloqueaveis);\n\n\t\tAnimation animLayoutSplitLogo = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.splash_move);\n\t\tAnimation animLayoutContent = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.splash_fade_in);\n\n\t\tanimLayoutContent.setAnimationListener(new AnimationListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void onAnimationStart(Animation animation)\n\t\t\t{\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onAnimationRepeat(Animation animation)\n\t\t\t{\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onAnimationEnd(Animation animation)\n\t\t\t{\n\t\t\t\t// rehabilitando os botoes depois de finalizar a animacao da splash screen:\n\t\t\t\tUtilidades.Views.enableViews(arrViewsBloqueaveis);\n\t\t\t}\n\t\t});\n\n\t\t((RelativeLayout) findViewById(R.id.layout_split_logo)).startAnimation(animLayoutSplitLogo);\n\t\t((RelativeLayout) findViewById(R.id.layout_content)).startAnimation(animLayoutContent);\n\t}", "private void splashScreen() {\r\n\t\t// Clear the screen, reset the level, and display the legend\r\n\t\tclear();\r\n\t\tdisplay.setLegend(\"Asteroids\");\r\n\r\n\t\t// Place four asteroids near the corners of the screen.\r\n\t\tplaceAsteroids();\r\n\t}", "private void hideSplash() {\n \t\tthis.splashInfoContainer.startAnimation( this.splashFadeOut );\n \t}", "public static void disposeSplash(){\n splash.dispose();\n }", "@Override\n public void showSplash() {\n }", "private void SplashScreen() {\n// if (!mSettings.getBoolean(\"PlayedBefore\", false)) {\n// mSolitaireView.DisplaySplash();\n// }\n splas.setVisibility(View.VISIBLE);\n Handler h = new Handler(Looper.getMainLooper());\n h.postDelayed(new Runnable() {\n @Override\n public void run() {\n splas.setVisibility(View.GONE);\n }\n }, 3000);\n }", "public void splash(){\n ImageView splash = (ImageView) findViewById(R.id.mekslogo);\n Animation animation1 =\n AnimationUtils.loadAnimation(getApplicationContext(),\n R.anim.clockwise);\n animation1.setDuration(5000);\n splash.startAnimation(animation1);\n animation1.setAnimationListener(new Animation.AnimationListener() {\n @Override\n public void onAnimationStart(Animation animation) {\n\n }\n\n @Override\n public void onAnimationEnd(Animation animation) {\n // Toast.makeText(getApplicationContext(),\"Animation ended\",Toast.LENGTH_SHORT).show();\n Intent intent=new Intent(MainActivity.this, sign_up.class);\n startActivity(intent);\n }\n\n @Override\n public void onAnimationRepeat(Animation animation) {\n\n }\n });\n }", "public void disposeSplashWindow()\n {\n \n }", "private void removeSplashScreen(final boolean z) {\n this.cordova.getActivity().runOnUiThread(new Runnable() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass4 */\n\n public void run() {\n if (SplashScreen.splashDialog != null && SplashScreen.this.splashImageView != null && SplashScreen.splashDialog.isShowing()) {\n int fadeDuration = SplashScreen.this.getFadeDuration();\n if (fadeDuration <= 0 || z) {\n SplashScreen.this.spinnerStop();\n SplashScreen.splashDialog.dismiss();\n Dialog unused = SplashScreen.splashDialog = null;\n SplashScreen.this.splashImageView = null;\n return;\n }\n AlphaAnimation alphaAnimation = new AlphaAnimation(1.0f, 0.0f);\n alphaAnimation.setInterpolator(new DecelerateInterpolator());\n alphaAnimation.setDuration((long) fadeDuration);\n SplashScreen.this.splashImageView.setAnimation(alphaAnimation);\n SplashScreen.this.splashImageView.startAnimation(alphaAnimation);\n alphaAnimation.setAnimationListener(new Animation.AnimationListener() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass4.AnonymousClass1 */\n\n public void onAnimationRepeat(Animation animation) {\n }\n\n public void onAnimationStart(Animation animation) {\n SplashScreen.this.spinnerStop();\n }\n\n public void onAnimationEnd(Animation animation) {\n if (SplashScreen.splashDialog != null && SplashScreen.this.splashImageView != null && SplashScreen.splashDialog.isShowing()) {\n SplashScreen.splashDialog.dismiss();\n Dialog unused = SplashScreen.splashDialog = null;\n SplashScreen.this.splashImageView = null;\n }\n }\n });\n }\n }\n });\n }", "private void setupSplash() {\n \t\tthis.splashInfoContainer = (LinearLayout) this.findViewById( R.id.edit_gpsfilter_area_splash );\n \n \t\tTextView textView = (TextView) this.splashInfoContainer.findViewById( R.id.edit_gpsfilter_area_splash_text );\n \t\ttextView.setText( Html.fromHtml( this.getString( R.string.edit_gpsfilter_area_splash_text ) ) );\n \n \t\t// Define fade out animation.\n \t\tthis.splashFadeOut = new AlphaAnimation( 1.00f, 0.00f );\n \t\tthis.splashFadeOut.setDuration( SPLASH_FADE_DELAY );\n \t\tthis.splashFadeOut.setAnimationListener( new AnimationListener() {\n \t\t\tpublic void onAnimationStart( Animation animation ) {\n \t\t\t}\n \n \t\t\tpublic void onAnimationRepeat( Animation animation ) {\n \t\t\t}\n \n \t\t\tpublic void onAnimationEnd( Animation animation ) {\n \t\t\t\tsplashInfoContainer.setVisibility( View.GONE );\n \t\t\t}\n \t\t} );\n \n \t\t// Don't show if not new and we got polygon.\n \t\tif ( !this.isConsideredFresh() ) {\n \t\t\tthis.splashInfoContainer.setVisibility( View.GONE );\n \t\t}\n \t}", "private static void hideSplashScreen() {\n if (splash != null) {\n splash.dispose();\n splash = null;\n }\n }", "public static void main(String args[]) \n {\n //declare constant to hold the speed of the loader\n final int LOAD_SPEED = 10;\n //create the new splash screen called mySplash\n TspSplash mySplash = new TspSplash();\n //center splash\n mySplash.setLocationRelativeTo(null);\n //set icon \n mySplash.setIconImage(Toolkit.getDefaultToolkit().getImage\n (\"src/Images/Salesperson.png\")); \n //make splash visible\n mySplash.setVisible(true);\n \n try\n {\n //create a variable which will count loop to 100, incrementing by\n //one until it reaches 100\n for(int loader = 0; loader <= 100; loader++)\n {\n //set speed of counter (miliseconds)\n Thread.sleep(LOAD_SPEED);\n //display the counter in the loading label\n mySplash.loadingJLabel.setText(\"Loading \" \n + Integer.toString(loader) + \"%\");\n //increment the progress bar with the counter\n mySplash.splashJProgressBar.setValue(loader);\n //when the loop gets to 100, close the splash screen\n if (loader == 100)\n {\n //when loader is done, close the splash screen\n mySplash.dispose();\n }\n }\n }\n catch (Exception exp)\n {\n JOptionPane.showMessageDialog(null, \"Loading error--\" \n + \"Cannot load splash\");\n }\n /* Set the Nimbus look and feel */\n //<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">\n /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(TspGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(TspGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(TspGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(TspGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() \n {\n public void run() \n {\n new TspGUI().setVisible(true);\n }\n });\n }", "public static void hideSplashScreen() {//todo: is this useful ?????.....\n SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n if (splashScreen != null) {\n splashScreen.setVisible(false);\n splashScreen.dispose();\n }\n }\n });\n }", "public void startSplashGameOver(){\r\n\t\t\r\n\t\tpanel[CurrentPanel].stop();\r\n\t\t\r\n\t\tDriver.panel[CurrentPanel].setVisible(false);\r\n\t\tgame.remove(panel[CurrentPanel] );\r\n\t\t\r\n\t\tCurrentPanel = 0;\r\n\t\t\r\n\t\t\r\n\t\tpanel[CurrentPanel] = new Splash(this);\r\n\t\t\r\n\t\tadd( panel[CurrentPanel] );\r\n\t\tpanel[CurrentPanel].setVisible(true);\r\n\t\tgame.setVisible(true);\r\n\t\t\r\n\t\tpanel[CurrentPanel].start();\r\n\t\t\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);\n }\n super.onCreate(savedInstanceState);\n setContentView(R.layout.helal_haram_splash);\n\n initViews();\n alphaAnimation(img);\n\n\n // splash efect kodu\n /* Thread timerThread = new Thread(){\n public void run(){\n try{\n sleep(1200);\n }catch(InterruptedException e){\n e.printStackTrace();\n }finally{\n\n Intent intent = new Intent(Splash.this, MainActivity.class);\n startActivity(intent);\n\n }\n }\n };\n timerThread.start();\n */\n }", "@Override\n public void onStart() {\n super.onStart();\n waitForSplashAnimation(SPLASH_SCREEN_DELAY);\n }", "private void waitForSplashAnimation(int duration) {\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n clearAndStartActivity(new Intent(SplashActivity.this, MainMenuActivity.class));\n }\n\n }, duration);\n }", "@Override\n\t\t\t\t public void run() {\n\t\t\t\t \tsplashActivity.get().finish();\n\t\t\t\t \tsplashActivity = null;\n\t\t\t\t }", "@Override\n protected void onPause() {\n super.onPause();\n mpSplash.pause();\n\n }", "public ScreenSplash() {\n initComponents();\n this.setCursor(new Cursor(HAND_CURSOR));\n setBackground(new Color(0, 0, 0, 0));\n }", "public void run() {\n Intent i = new Intent(activity_splash.this, MainActivity.class);\r\n startActivity(i); // menghubungkan activity splashscren ke xml\r\n //jeda selesai Splashscreen\r\n this.finish();\r\n }", "@Override\r\n\t\t public void run() {\n\t\t Intent i = new Intent(SplashScreen.this, MainMenuActivity.class);\r\n\t\t startActivity(i);\r\n\t\t \r\n\t\t //Menyelesaikan Splashscreen\r\n\t\t finish();\r\n\t\t }", "@Override\r\n public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.activity_splash_screen);\r\n StartAnimations();\r\n\r\n new Handler().postDelayed(new Runnable() {\r\n\r\n\r\n @Override\r\n public void run() {\r\n // This method will be executed once the timer is over\r\n Intent i = new Intent(SplashScreen.this, MainActivity.class);\r\n startActivity(i);\r\n finish();\r\n }\r\n }, 5000);\r\n }", "private void createSplash(ArticleElement ae) {\n\t\tint splashWidth = 427;\n\t\tint splashHeight = 120;\n\t\tint width = ae.getDataParamWidth();\n\t\tint height = ae.getDataParamHeight();\n\t\tif (ae.getDataParamShowMenuBar()) {\n\t\t\t// The menubar has extra height:\n\t\t\theight += 31;\n\t\t}\n\t\tif (ae.getDataParamShowToolBar()) {\n\t\t\t// The toolbar has extra height:\n\t\t\theight += 57;\n\t\t}\n\t\tboolean showLogo = ((width >= splashWidth) && (height >= splashHeight));\n\t\tsplash = new SplashDialog(showLogo);\n\t\t\n\t\tif (width > 0 && height > 0) {\n\t\t\tsetWidth(width + \"px\");\n\t\t\tsetDataParamWidth(ae.getDataParamWidth());\n\t\t\tsetDataParamHeight(ae.getDataParamHeight());\n\t\t\tsetHeight(height + \"px\");\n\t\t\tsplash.addStyleName(\"splash\");\n\t\t\tsplash.getElement().getStyle()\n\t\t\t .setTop((height / 2) - (splashHeight / 2), Unit.PX);\n\t\t\tsplash.getElement().getStyle()\n\t\t\t .setLeft((width / 2) - (splashWidth / 2), Unit.PX);\n\n\t\t}\n\t\taddStyleName(\"jsloaded\");\n\t\tadd(splash);\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_splash);\n ButterKnife.inject(this);\n\n if(getResources().getBoolean(R.bool.isTablet)){\n lyMain.setBackgroundResource(R.drawable.ic_tablet_splash);\n }else {\n lyMain.setBackgroundResource(R.drawable.ic_smatphone_splash);\n }\n\n Thread timerThread = new Thread() {\n public void run() {\n try {\n sleep(3000);\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n startActivity(new Intent(SplashActivity.this, ApplicationsGridActivity.class));\n }\n }\n };\n timerThread.start();\n\n }", "@Override\n public void run() {\n\n mShimmerViewContainer.setBaseAlpha(1);\n\n Animation animation2 = AnimationUtils.loadAnimation(Splash_Activity.this, R.anim.alpha);\n\n mShimmerViewContainer.setAnimation(animation2);\n\n }", "@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n\t\t/* layout splashscreen dengan background gambar */\n setContentView(R.layout.activity_spalsh);\n\t/* handler untuk menjalankan splashscreen selama 5 detik lalu\n\t * membuat HomeActivity\n\t */\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent mainIntent = null;\n\n mainIntent = new Intent(SpalshActivity.this,\n HomeActivity.class);\n\n SpalshActivity.this.startActivity(mainIntent);\n SpalshActivity.this.finish();\n overridePendingTransition(R.layout.fadein,R.layout.fadeout);\n\n\n }\n }, SPLASH_DISPLAY_LENGHT);\n }", "@Override\n\tpublic void init() throws Exception {\n\t\ttry {\n\t\t\tThread.sleep(SPLASH_SCREEN_TIMER);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "public void showSplashScreen() {\r\n\r\n JPanel content = (JPanel) getContentPane();\r\n content.setBackground(Color.white);\r\n\r\n // setting the window's properties\r\n \r\n int width = 700;\r\n int height = 438;\r\n Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();\r\n int x = (screen.width - width) / 2;\r\n int y = (screen.height - height) / 2;\r\n setBounds(x, y, width, height);\r\n\r\n // build the splash screen using an image \r\n \r\n JLabel gifImage = new JLabel(new ImageIcon(this.getClass().getResource(\"/splash.gif\")));\r\n content.add(gifImage, BorderLayout.CENTER);\r\n\r\n // display it\r\n setVisible(true);\r\n\r\n new resourceLoader().execute();\r\n }", "@Override\r\n public void init() throws Exception {\r\n super.init();\r\n log.debug(\"init\");\r\n\r\n /*\r\n ImageView splash = new ImageView(new Image(getClass().getResourceAsStream(\"/images/splash.png\")));\r\n\r\n loadProgress = new ProgressBar();\r\n loadProgress.setPrefWidth(SPLASH_WIDTH - 20);\r\n //progressText = new Label(\"Will find friends for peanuts . . .\");\r\n progressText = new Label(\"\");\r\n splashLayout = new VBox();\r\n //splashLayout.getChildren().addAll(splash, loadProgress, progressText);\r\n splashLayout.getChildren().addAll(splash, progressText, loadProgress);\r\n progressText.setAlignment(Pos.CENTER);\r\n\r\n// splashLayout.setStyle(\r\n// \"-fx-padding: 5; \" +\r\n// \"-fx-background-color: cornsilk; \" +\r\n// \"-fx-border-width:5; \" +\r\n// \"-fx-border-color: \" +\r\n// \"linear-gradient(\" +\r\n// \"to bottom, \" +\r\n// \"chocolate, \" +\r\n// \"derive(chocolate, 50%)\" +\r\n// \");\"\r\n// );\r\n\r\n //splashLayout.setStyle(\"-fx-padding: 5; -fx-border-width:5;\");\r\n splashLayout.getStylesheets().add(BootstrapFX.bootstrapFXStylesheet());\r\n splashLayout.setEffect(new DropShadow());\r\n */\r\n }", "private static void splashScreen() {\n\t\t\n\t\tString message = \"Welcome to JProject v\"+VERSION+\"\\nby Gabriel Skoropada\";\n\t\t\n\t\tJOptionPane.showMessageDialog(null, message, \"JProject v\"+VERSION, JOptionPane.NO_OPTION, null);\n\t\t\n\t}", "protected void displaySplashScreen() {\n\t\t// Creates new thread to act as timer.\n\t\tThread logoTimer = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\n\t\t\t\t\tint logoTimer = 0;\n\t\t\t\t\t// Pauses for SPLASH_TIME amount of time\n\t\t\t\t\twhile (logoTimer < SPLASH_TIME) {\n\t\t\t\t\t\tsleep(100);\n\t\t\t\t\t\tlogoTimer = logoTimer + 100;\n\t\t\t\t\t}\n\t\t\t\t\t// Calls the activity from manifest.xml\n\t\t\t\t\tIntent intent = new Intent(getApplicationContext(),\n\t\t\t\t\t\t\tMenuActivity.class);\n\t\t\t\t\tintent.putExtra(\"connect\", connect);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t// Starts the thread.\n\t\tlogoTimer.start();\n\t}", "private void showSplash() {\n \t\tthis.splashInfoContainer.setVisibility( View.VISIBLE );\n \t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n //TODO: add any code you want to do while the splash screen is showing before the MainActivity is shown\n\n// try {\n// Thread.sleep(5000);\n// } catch (InterruptedException e) {\n// e.printStackTrace();\n// }\n\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n finish();\n }", "public SplashScreen() {\r\n instance = this;\r\n\r\n width = 600;\r\n height = 600;\r\n\r\n icon = \"graphics/application/icon_96.png\";\r\n }", "private void muerte(){\r\n\t\t for(Icon i:sprites.elementAt(4))\r\n\t \t {\r\n\t \t\t grafico.setIcon(i);\r\n\t \t\t try {\r\n\t\t\t\tThread.sleep(300);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t \t }\r\n\t \t grafico.setIcon(null);\r\n\t}", "@Override\n public void run() {\n startActivity(new Intent(SplashActivity.this, MainActivity3.class));\n //Close the current welcome page after the jump\n SplashActivity.this.finish();\n }", "@Override\n public void run() {\n Picasso.with(SplashActivity.this).load(mSplashInfo.getImageUri())\n .into(mStartupImageView);\n mImageSrcTextView.setText(mSplashInfo.getImageSrcInfo());\n // start the animation\n mStartupImageView.startAnimation(mAnimationZoomIn);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n mStartupImageView.startAnimation(mAnimationFadeOut);\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Intent intent = new Intent(SplashActivity.this, MainActivity.class);\n //Add Flags to prevent BACK touch to a wrong activity\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n }\n }, 500);\n }\n }, 3000);\n }", "public static void main(String[] args) {\n\t\t// Define new Runnable for splash screen execution\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tSplashScreenView splash;\n\t\t\tTimer timer;\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\t// Create splash screen boundary object and set visible\n\t\t\t\t\tsplash = new SplashScreenView();\n\t\t\t\t\tsplash.setVisible(true);\n\n\t\t\t\t\t// Begin timer for 2 seconds to display\n\t\t\t\t\ttimer = new Timer(2000, new ActionListener(){ \n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\t// Create event on timer completion that hide the splash screen, and creates\n\t\t\t\t\t\t\t// the Kabasuji and corresponding view for interactions\n\t\t\t\t\t\t\tsplash.setVisible(false);\n\t\t\t\t\t\t\tKabasuji game = new Kabasuji();\n\t\t\t\t\t\t\tLevelSelectorView window = new LevelSelectorView(game);\n\n\t\t\t\t\t\t\t// allow controller to set up GUI based on the levels loaded by 'game'\n\t\t\t\t\t\t\tStartLevelSelectorController selectorController = new StartLevelSelectorController(window, game);\n\t\t\t\t\t\t\tselectorController.process();\n\n\t\t\t\t\t\t\t// show window\n\t\t\t\t\t\t\twindow.setVisible(true);\n\t\t\t\t\t\t\tImageIcon image = new ImageIcon(StartKabasuji.class.getResource(\"/images/heineman.jpg\"));\n\t\t\t\t\t\t\twindow.setIconImage(image.getImage().getScaledInstance(40, 40, 0));\n\t\t\t\t\t\t\tSystem.out.println(image);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t// Start the timer and ensure it only runs once\n\t\t\t\t\ttimer.setRepeats(false);\n\t\t\t\t\ttimer.start();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void close(){\n\t\tMultiPurposeInterpolator in = new MultiPurposeInterpolator(200, 0, 500, 0, 0, 1);\n\t\tAnimation animation = new Animation(\"fading\", in, this);\n\t\tanimation.addAnimationListener(new IAnimationListener() {\n\t\t public void processAnimationEvent(AnimationEvent ae) {\n\t\t //fade using ae.getValue() as alpha\n\t\t \tlauncher.setFillColor(new MTColor(255, 255, 255, ae.getValue()));\n\t\t \t\n\t\t \tif(ae.getValue() == 0)\n\t\t\t\t{\n\t\t\t\t\tlauncher.removeFromParent();\n\t\t\t\t}\n\t\t }\n\t\t});\n\t\tanimation.start();\n\t}", "protected void init() {\n splashImg = new Texture(\"splash.png\");\n }", "public void startSplash(int nextPanel,Man m){\r\n\t\t\r\n\t\tpanel[CurrentPanel].stop();\r\n\t\t\r\n\t\tDriver.panel[CurrentPanel].setVisible(false);\r\n\t\tgame.remove(panel[CurrentPanel] );\r\n\t\t\r\n\t\tCurrentPanel = nextPanel;\r\n\t\t\r\n\t\t\r\n\t\tpanel[CurrentPanel] = new Splash(this,nextPanel,m);\r\n\t\t\r\n\t\tadd( panel[CurrentPanel] );\r\n\t\tpanel[CurrentPanel].setVisible(true);\r\n\t\tgame.setVisible(true);\r\n\t\t\r\n\t\tpanel[CurrentPanel].start();\r\n\t\t\r\n\t}", "public void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n requestWindowFeature(1);\n getWindow().setFlags(1024, 1024);\n setContentView(R.layout.activity_splash_screen);\n new Handler().postDelayed(new Runnable() {\n public void run() {\n SplashScreen.this.startActivity(new Intent(SplashScreen.this, MainActivity.class));\n SplashScreen.this.finish();\n }\n }, 3000);\n }", "public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n\r\n // Do not display title bar, this makes the splash screen really full screen\r\n requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n \r\n // Check if we need to display the splash screen. If no, go directly to the main intent\r\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\r\n boolean showscreen = prefs.getBoolean(\"showsplashscreen\", true);\r\n if (! showscreen) {\r\n \t gotoMainIntent();\r\n \t return;\r\n }\r\n \r\n\r\n // Set the layout\r\n setContentView(R.layout.splash);\r\n\r\n // This will run after a specified time (SPLASH_DISPLAY_LENGHT milliseconds)\r\n new Handler().postDelayed(new Runnable(){\r\n public void run() {\r\n \t gotoMainIntent();\r\n }\r\n }, SPLASH_DISPLAY_LENGHT);\r\n }", "public void run() {\n Intent mainIntent = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(mainIntent);\n finish();\n }", "public Splash() {\n initComponents();\n }", "public Splash() {\n initComponents();\n }", "@Override\n public void run() {\n Intent mainIntent = new Intent(StartSplash.this, SplashActivity.class);\n StartSplash.this.startActivity(mainIntent);\n StartSplash.this.finish();\n }", "@Override\n public void run() {\n SplashScreen.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n startActivity(new Intent(SplashScreen.this,MainActivity.class));\n finish();\n\n }\n });\n }", "public static void splashScreen() {\n System.out.println(printLine(\"-\",100));\n System.out.println(\"Welcome to KaviBase\"); // Display the string.\n System.out.println(\"Version \" + getVersion());\n System.out.println(getCopyright());\n System.out.println(\"\\nType \\\"help;\\\" to display supported commands.\");\n System.out.println(\"\\nEvery command should end with semicolon ;\");\n System.out.println(printLine(\"-\",100));\n }", "@Override\r\n public void run() {\n Intent i = new Intent(SplashScreen.this, MainActivity.class);\r\n startActivity(i);\r\n finish();\r\n }", "private void runProfileTutorial() {\n mEnterAnimation = new AlphaAnimation(0f, 1f);\n mEnterAnimation.setDuration(600);\n mEnterAnimation.setFillAfter(true);\n\n mExitAnimation = new AlphaAnimation(1f, 0f);\n mExitAnimation.setDuration(600);\n mExitAnimation.setFillAfter(true);\n\n runOverlay_ContinueMethod();\n }", "private void showSplashScreen() {\n splashDialog = new SplashScreenDialog(this);\n splashDialog.show();\n }", "public void run(){\r\n try{\r\n \tsleep(DURACION_SPLASH);\r\n }catch(InterruptedException e){\r\n //Si no puedo ejecutar el sleep muestro el error\r\n e.printStackTrace();\r\n }finally{\r\n //Llamo a la nueva actividad\r\n Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class);\r\n \tstartActivity(intent);\r\n \tfinish();\r\n } \r\n }", "public void makegoaway(){\n if (!started_app){ // added to prevent running two copies when user clicks to skip\n // and when time runs out for splash\n Intent mainIntent = new Intent(SplashActivity.this,MainActivity.class);\n SplashActivity.this.startActivity(mainIntent);\n SplashActivity.this.finish();\n started_app=true;\n }\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n Thread timerThread = new Thread() {\n public void run() {\n try {\n sleep(3000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n if (user != null) {\n redireccionar();\n }else{\n Intent intent = new Intent(SplashScreen.this, Login.class);\n startActivity(intent);\n }\n\n }\n }\n };\n timerThread.start();\n }", "@Override\n public void run() {\n Intent splashScreen=new Intent(SplashScreen.this,Donor.class);\n startActivity(splashScreen);\n finish();\n }", "@Override\r\n\t\t\tpublic void onAnimationEnd(Animation animation) {\n\t\t\t\tIntent it = new Intent(Splash.this, PageHomeActivity.class);\r\n\t\t\t\tSplash.this.startActivity(it);\r\n\t\t\t\tfinish();\r\n\t\t\t}", "@Override\n public void run() {\n Intent mainIntent = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(mainIntent);\n finish();\n }", "@Override\n public void run() {\n Intent i = new Intent(SplashScreenActivity.this, MainActivity.class);\n startActivity(i);\n finish();\n }", "@Override\n public void run() {\n Intent i = new Intent(Splash.this, MainActivity.class);\n startActivity(i);\n finish();\n }", "@Override\n public void run() {\n Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class);\n startActivity(intent);\n finish();\n }", "@Override\n public void run() {\n Intent intent = new Intent(SplashScreen.this, Welcome.class);\n startActivity(intent);\n finish();\n }", "@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n\n }", "public void onAnimationEnd(Animation animation) {\n\t\t\t\tstartActivity(new Intent(SplashActivity.this, MainMenu.class));\n\t\t\t\tSplashActivity.this.finish();\n\t\t\t}", "@Override\n\t\t\t\t\tpublic boolean act(float delta) {\n\t\t\t\t\t\tchangeScreen(SplashScreen.class);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n \n mp = MediaPlayer.create(this, R.raw.love_story);\n mp.start();\n \n Thread logoTimer = new Thread(){\n \tpublic void run(){\n \t\ttry{\n \t\t\tint logoTimer = 0;\n \t\t\twhile(logoTimer<5000){\n \t\t\t\tsleep(100);\n \t\t\t\tlogoTimer = logoTimer +100;\n \t\t\t}\n \t\t\tstartActivity(new Intent(\"com.crognar.CLEARSCREEN\"));\n \t\t\t//clearscreen mag anders\n \t\t} \n \t\t\n \t\tcatch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n \t\t\n \t\tfinally{\n \t\t\tfinish();\n \t\t}\n \t}\n };\n logoTimer.start();\n }", "@Override\n public void run() {\n\n Intent starthome = new Intent(SplashScreenActivity.this, WelcomeActivity.class);\n starthome.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(starthome);\n\n finish();\n }", "private void showSplash ()\n {\n ResourceBundle resourceBundle = null;\n try\n {\n resourceBundle = ResourceBundle.getBundle(\"splash\", Locale.getDefault());\n }\n catch (MissingResourceException ignored)\n {\n System.out.println(\"Info: file splash.properties not found in resources root directory.\");\n }\n\n FXMLLoader fxmlLoader = new FXMLLoader();\n if (resourceBundle != null)\n {\n fxmlLoader.setResources(resourceBundle);\n }\n try\n {\n primaryStage.setScene(new Scene(fxmlLoader.load(getClass().getResourceAsStream(\"/splash.fxml\"))));\n primaryStage.initStyle(StageStyle.UNDECORATED);\n primaryStage.centerOnScreen();\n primaryStage.show();\n }\n catch (NullPointerException ignored)\n {\n System.out.println(\"Info: file splash.fxml not found in resources root directory.\");\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n }\n }", "@Override\n public void run() {\n Intent mainIntent = new Intent(Splash.this, ScoreScreen.class);\n Splash.this.startActivity(mainIntent);\n Splash.this.finish();\n }", "@Override\n public void run() {\n Intent i = new Intent(ActivitySplash.this, ActivityIntro.class);\n startActivity(i);\n\n // close this activity\n finish();\n }", "@Override\n public void onCreate(final Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.splash_screen);\n\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(() -> {\n Intent mainIntent = new Intent(SplashScreen.this, MainActivity.class);\n SplashScreen.this.startActivity(mainIntent);\n SplashScreen.this.finish();\n }, SPLASH_DISPLAY_SECONDS * 1000);\n }", "@Override\n public void run() {\n Intent intent = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(intent);\n finish();\n }", "protected void removeSplashScreen() {\n if (splashDialog != null) {\n splashDialog.dismiss();\n splashDialog = null;\n }\n }", "Icon getSplashImage();", "public void mostrarSprites() throws MalformedURLException, IOException, InterruptedException{\n URL url = new URL(miPokemon.getSprites().get(\"front_default\").toString());\n Image img = ImageIO.read(url);\n lblSprites.setIcon(new ImageIcon(img));\n // 1 segundo para cada cambio de sprite\n Thread.sleep(1000);\n \n url = new URL(miPokemon.getSprites().get(\"back_default\").toString());\n img = ImageIO.read(url);\n lblSprites.setIcon(new ImageIcon(img));\n Thread.sleep(1000);\n \n url = new URL(miPokemon.getSprites().get(\"front_shiny\").toString());\n img = ImageIO.read(url);\n lblSprites.setIcon(new ImageIcon(img));\n Thread.sleep(1000);\n \n url = new URL(miPokemon.getSprites().get(\"back_shiny\").toString());\n img = ImageIO.read(url);\n lblSprites.setIcon(new ImageIcon(img));\n Thread.sleep(1000);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.splash);\n UserInfoData entry = new UserInfoData(this);\n \t\n \tentry.open();\n \t\n \tfinal String data = entry.getData();\n \t\n \tentry.close();\n Thread splashTimer = new Thread(){\n \tpublic void run(){\n \t\ttry{\n \t\t\tsleep(3000);\n \t\t\t\n \t}\n \t\tcatch(InterruptedException e){\n \t\t\t\n \t\t\te.printStackTrace();\n \t\t}\n finally{\n \tif (!data.equals(\"\")){\n \t\t\tstartActivity(new Intent (\"com.JacobyApps.android.mainMenu\")); \n \t}\n \t\telse{\n \n startActivity(new Intent (\"android.intent.action.Signup\"));\n \t}\n \tfinish();\n \t \n }\n \t \n \t}\n \t\n };\n splashTimer.start();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n SplashScreen.show(this); // here\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.activity_splash_screen);\n\n intent = new Intent(this, MainActivity.class);\n\n\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n\n //Start MainActivity\n startActivity(intent);\n finish();\n }\n }, SPLASH_DISPLAY_LENGTH);\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void initGui() {\n\t\tthis.viewportTexture = new DynamicTexture(256, 256);\n\t\tthis.field_110351_G = this.mc.getTextureManager().getDynamicTextureLocation(\"background\", this.viewportTexture);\n\t\tCalendar var1 = Calendar.getInstance();\n\t\tvar1.setTime(new Date());\n\n\t\tif (var1.get(2) + 1 == 11 && var1.get(5) == 9) {\n\t\t\tthis.splashText = \"Happy birthday, ez!\";\n\t\t} else if (var1.get(2) + 1 == 6 && var1.get(5) == 1) {\n\t\t\tthis.splashText = \"Happy birthday, Notch!\";\n\t\t} else if (var1.get(2) + 1 == 12 && var1.get(5) == 24) {\n\t\t\tthis.splashText = \"Merry X-mas!\";\n\t\t} else if (var1.get(2) + 1 == 1 && var1.get(5) == 1) {\n\t\t\tthis.splashText = \"Happy new year!\";\n\t\t} else if (var1.get(2) + 1 == 10 && var1.get(5) == 31) {\n\t\t\tthis.splashText = \"OOoooOOOoooo! Spooky!\";\n\t\t} else {\n\t\t\tthis.splashText = \"\";\n\t\t}\n\n\t\tboolean var2 = true;\n\t\tint var3 = this.height / 4 + 48;\n\n\t\tthis.addSingleplayerMultiplayerButtons();\n\n\t\tthis.buttonList.add(new GuiButton(0, this.width - 120, 3, 60, 20, I18n.format(\"menu.options\", new Object[0])));\n\t\tthis.buttonList.add(new GuiButton(4, this.width - 54, 3, 50, 20, I18n.format(\"menu.quit\", new Object[0])));\n\n\t\t// Remove annoying language button\n\t\t// this.buttonList.add(new GuiButtonLanguage(5, this.width / 2 - 124,\n\t\t// var3 + 72 + 12));\n\n\t\tObject var4 = this.field_104025_t;\n\n\t\tsynchronized (this.field_104025_t) {\n\t\t\tthis.field_92023_s = this.fontRendererObj.getStringWidth(this.field_92025_p);\n\t\t\tthis.field_92024_r = this.fontRendererObj.getStringWidth(this.field_146972_A);\n\t\t\tint var5 = Math.max(this.field_92023_s, this.field_92024_r);\n\t\t\tthis.field_92022_t = (this.width - var5) / 2;\n\t\t\tthis.field_92021_u = ((GuiButton) this.buttonList.get(0)).yPosition - 24;\n\t\t\tthis.field_92020_v = this.field_92022_t + var5;\n\t\t\tthis.field_92019_w = this.field_92021_u + 24;\n\t\t}\n\t}", "@Override\r\n public void run() {\r\n Intent i = new Intent(SplashScreen.this, TelaLogin.class);\r\n startActivity(i);\r\n finish();\r\n }", "private void loaddLastScreen() {\n\n btnSelanjutnya.setVisibility(View.INVISIBLE);\n btnMulai.setVisibility(View.VISIBLE);\n tvSkip.setVisibility(View.INVISIBLE);\n tabIndicator.setVisibility(View.INVISIBLE);\n // TODO : ADD an animation the getstarted button\n // penyiapan animasi\n btnMulai.setAnimation(btnAnim);\n\n\n }", "public void goBackToSplash(View view) {\n startActivity(new Intent(view.getContext(), SplashScreenActivity.class));\n finish();\n }", "public void terminouCamadas() {\n Platform.runLater(() -> {\n camadas.setExpandedPane(null);\n setaImagem.setVisible(false);\n });\n }", "static void renderSplashFrame(Graphics2D g) {\n\t\tfinal String version = \"Release: 2.1.1 - release date: 2022-07-31\";\r\n\t\tg.setComposite(AlphaComposite.Clear);\r\n\t\tg.fillRect(120, 140, 200, 40);\r\n\t\tg.setPaintMode();\r\n\t\tg.setColor(Color.BLACK);\r\n\t\tg.drawString(\"Loading \" + version + \"...\", 120, 350);\r\n\t}", "public void onAnimationEnd(Animation animation){\n\t\t\t\tIntent intent = new Intent(Splash.this, TMDmenu.class);\n\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tSplash.this.finish();\n\t\t\t}", "private void ini_Progressbar()\r\n\t{\r\n\r\n\t\tfloat ref = UiSizes.that.getWindowHeight() / 13;\r\n\t\tCB_RectF CB_LogoRec = new CB_RectF(this.getHalfWidth() - (ref * 2.5f), this.getHeight() - ((ref * 5) / 4.11f) - ref, ref * 5,\r\n\t\t\t\t(ref * 5) / 4.11f);\r\n\r\n\t\t// CB_Logo = new Image(CB_LogoRec, \"CB_Logo\");\r\n\t\t// CB_Logo.setDrawable(new SpriteDrawable(atlas.createSprite(\"cachebox-logo\")));\r\n\t\t// this.addChild(CB_Logo);\r\n\r\n\t\tString VersionString = Global.getVersionString();\r\n\t\tTextBounds bounds = Fonts.getNormal().getMultiLineBounds(VersionString + Global.br + Global.br + Global.splashMsg);\r\n\t\tdescTextView = new Label(0, CB_LogoRec.getY() - ref - bounds.height, this.getWidth(), bounds.height + 10, \"DescLabel\");\r\n\t\t// HAlignment.CENTER funktioniert (hier) (noch) nicht, es kommt rechtsbündig raus\r\n\t\tdescTextView.setWrappedText(VersionString + Global.br + Global.br + Global.splashMsg);\r\n\t\tdescTextView.setHAlignment(HAlignment.CENTER);\r\n\t\tthis.addChild(descTextView);\r\n\r\n\t\tDrawable ProgressBack = new NinePatchDrawable(atlas.createPatch(\"btn-normal\"));\r\n\t\tDrawable ProgressFill = new NinePatchDrawable(atlas.createPatch(\"progress\"));\r\n\r\n\t\tfloat ProgressHeight = Math.max(ProgressBack.getBottomHeight() + ProgressBack.getTopHeight(), ref / 1.5f);\r\n\r\n\t\tprogress = new ProgressBar(new CB_RectF(0, 0, this.getWidth(), ProgressHeight), \"Splash.ProgressBar\");\r\n\r\n\t\tprogress.setBackground(ProgressBack);\r\n\t\tprogress.setProgressFill(ProgressFill);\r\n\t\tthis.addChild(progress);\r\n\r\n\t\tfloat logoCalcRef = ref * 1.5f;\r\n\r\n\t\tCB_RectF rec_Mapsforge_Logo = new CB_RectF(200, 50, logoCalcRef, logoCalcRef / 1.142f);\r\n\t\tCB_RectF rec_FX2_Logo = new CB_RectF(rec_Mapsforge_Logo);\r\n\t\tfloat w = logoCalcRef * 2.892655367231638f;\r\n\t\tCB_RectF rec_LibGdx_Logo = new CB_RectF(this.getHalfWidth() - (w / 2), 50, w, w);\r\n\r\n\t\trec_FX2_Logo.setX(400);\r\n\r\n\t\tLasifant = new LasifantAnimation(rec_LibGdx_Logo, \"LibGdx_Logo\");\r\n\r\n\t\tLasifant.addFrame(atlas.createSprite(\"logo-1\"));\r\n\t\tLasifant.addFrame(atlas.createSprite(\"logo-2\"));\r\n\t\tLasifant.addFrame(atlas.createSprite(\"logo-3\"));\r\n\t\tLasifant.addFrame(atlas.createSprite(\"logo-4\"));\r\n\t\tLasifant.addFrame(atlas.createSprite(\"logo-5\"));\r\n\t\tLasifant.addFrame(atlas.createSprite(\"logo-6\"));\r\n\t\tLasifant.addFrame(atlas.createSprite(\"logo-7\"));\r\n\t\tLasifant.addLastFrame(atlas.createSprite(\"logo-8\"));\r\n\r\n\t\tLasifant.play();\r\n\r\n\t\tthis.addChild(Lasifant);\r\n\r\n\t}", "@Override\n protected Void doInBackground() throws Exception {\n assert doStuff != null: \"Jævla dritt i doInBackground\";\n doStuff.showSplashScreen();\n return null;\n }", "public static ImageIcon splashImage() {\n if (splashImage == null) {\r\n splashImage = IconLoader.icon(\"splash.png\");\r\n //splashImage = IconLoader.icon(I18N.get(\"splash.png\"));\r\n }\r\n return splashImage;\r\n }", "@Override\r\n public void onCreate(Bundle savedInstanceState) {\r\n\r\n super.onCreate(savedInstanceState);\r\n\r\n Context context = this.getApplicationContext();\r\n\r\n requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);\r\n\r\n SplashHandler mHandler = new SplashHandler();\r\n final int layoutId = ResourceUtil.getLayoutResourceIdFromName(context, Colorme.LAYOUT_COLORME_AIYOUXI_SPLASH);\r\n setContentView(layoutId);\r\n\r\n final int viewId = ResourceUtil.getIdResourceIdFromName(context, Colorme.ID_COLORME_AIYOUXI_DRAWABLE);\r\n View view = findViewById(viewId);\r\n\r\n int what = 0;\r\n// Intent intent = this.getIntent();\r\n// if (intent != null) {\r\n// Bundle bundle = intent.getExtras();\r\n// if (bundle != null) {\r\n// String type = bundle.getString(KEY_TYPE);\r\n// if (VALUE_JYZA.equals(type)) {\r\n// final int bgId = ResourceUtil.getDrawableResourceIdFromName(context, Colorme.DRAWABLE_COLORME_JYZA);\r\n// view.setBackgroundResource(bgId);\r\n// what = 1;\r\n// }\r\n// }\r\n// }\r\n if (what == 0) {\r\n final int bgId = ResourceUtil.getDrawableResourceIdFromName(context, Colorme.DRAWABLE_COLORME_AIYOUXI);\r\n view.setBackgroundResource(bgId);\r\n }\r\n\r\n Message msg = new Message();\r\n msg.what = what;\r\n mHandler.sendMessageDelayed(msg, 3000);\r\n }", "@Override\n public void onCreate(Bundle icicle) {\n super.onCreate(icicle);\n setContentView(R.layout.sample);\n\n splash = findViewById(R.id.splashscreen);\n\n splash.startAnimation(\n AnimationUtils.loadAnimation(this, R.anim.rotation) );\n\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n /* Create an Intent that will start the Menu-Activity. */\n Intent mainIntent = new Intent(Sample.this,WebviewActivity.class);\n Sample.this.startActivity(mainIntent);\n Sample.this.finish();\n }\n }, SPLASH_DISPLAY_LENGTH);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n makeActivityFullScreen();\n setContentView(R.layout.activity_splash);\n }", "public void run(){\n\t\t\t\tif(!exit)\r\n\t\t\t\t{\r\n\t\t\t\tIntent mainIntent = new Intent(Splash.this,MainActivity.class);\r\n\t\t\t\tSplash.this.startActivity(mainIntent);\r\n\t\t\t\tSplash.this.finish();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// When the Splash is exiting the application\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t//android.os.Process.killProcess(android.os.Process.myPid());\r\n\t\t\t\tfinish();\r\n\t\t\t\t}\r\n\t\t\t}", "public static Texture getSplash(){\n //set a linear filter to clean image\n splash.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);\n //return image\n return splash;\n }", "public void run()\n {\n\n setVisible(false);\n dispose();\n\n // long mem2 = Runtime.getRuntime().freeMemory();\n // System.out.println(\"SplashWindow: free memory after dispose = \" + mem2);\n\n // Explicitly invoke the garbage collector\n\n System.gc();\n\n // long mem3 = Runtime.getRuntime().freeMemory();\n // System.out.println(\"SplashWindow: free memory after garbage collection = \" + mem3);\n\n // long diff = mem3 - mem1;\n // System.out.println(\"SplashWindow: total memory recovered (bytes) = \" + diff);\n }", "@Override\n public void run() {\n progressBar.setVisibility(View.GONE);\n // Esse método será executado sempre que o timer acabar\n // E inicia a activity principal\n Intent i = new Intent(SplashAct.this, LogEnter.class);\n startActivity(i);\n\n // Fecha esta activity\n finish();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_splash_screen);\n\t\tnm1 = (NotificationManager)getSystemService(NOTIFICATION_SERVICE); //Declaracion de notificacion\n\t\t\n\t\tTimerTask task = new TimerTask(){\n\t\t @Override\n\t public void run() {\n\t Intent mainIntent = new Intent().setClass(SplashScreen.this, MainActivity.class);\n\t startActivity(mainIntent);\n\t finish();//Destrucion de la actividad, usuario no tendra oportunidad de verla hasta reiniciar\n\t }\t\t\n\t};\n\tTimer timer = new Timer();\n\ttimer.schedule(task, splashDelay); //Pasando los 6 segundos entramos a la tarea en si\n\tnoti1();\n\t}", "@Override\n public void run() {\n Intent intent = new Intent(SplashActivity.this, CidadeActivity.class);\n /* startactivity solicita uma intent para saber o que deve fazer */\n startActivity(intent);\n finish();\n }", "@Override \r\n public void onCreate(Bundle icicle) { \r\n super.onCreate(icicle);\r\n \r\n getWindow().setFormat(PixelFormat.RGBA_8888);\r\n getWindow().addFlags(WindowManager.LayoutParams.FLAG_DITHER);\r\n setContentView(R.layout.splash_activity);\r\n \r\n //Display the current version number \r\n PackageManager pm = getPackageManager(); \r\n try {\r\n \tPackageInfo pi = pm.getPackageInfo(\"org.mems\", 0);\r\n TextView versionNumber = (TextView) findViewById(R.id.versionNumber); \r\n versionNumber.setText(\"Version \" + pi.versionName); \r\n } catch (NameNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n \r\n new Handler().postDelayed(new Runnable() {\r\n public void run() { \r\n \tIntent mainIntent = new Intent(SplashActivity.this, MainActivity.class); \r\n \tSplashActivity.this.startActivity(mainIntent); \r\n \tSplashActivity.this.finish(); \r\n } \r\n }, 2000); //2000 for release \r\n }", "@Override\n public void run() {\n Intent mainIntent = new Intent().setClass(\n SplashScreenActivity.this, MainActivity.class);\n startActivity(mainIntent);\n \n // Close the activity so the user won't able to go back this\n // activity pressing Back button\n finish();\n }", "public SplashScreen(String image, int showTime)\r\n {\r\n\tlogo = new ImageIcon(image);\r\n\r\n\tContainer splashPanel = getContentPane();\r\n\tsplashPanel.setLayout(new BorderLayout());\r\n\tBorder bd1 = BorderFactory.createBevelBorder(BevelBorder.RAISED);\r\n\tBorder bd2 = BorderFactory.createEtchedBorder();\r\n\tBorder bd3 = BorderFactory.createCompoundBorder(bd1, bd2);\r\n\t((JPanel) splashPanel).setBorder(bd3);\r\n\r\n\tsplashPanel.add(\"Center\", new JLabel(logo, JLabel.CENTER));\r\n\r\n\tsetUndecorated(true);\r\n\tshowFor(showTime);\r\n }" ]
[ "0.71723366", "0.6910589", "0.6725042", "0.6701296", "0.6596005", "0.65705264", "0.65377265", "0.65302145", "0.6516118", "0.64895946", "0.6430725", "0.62889665", "0.62821835", "0.6270159", "0.6266838", "0.6261512", "0.62247753", "0.6217368", "0.6097084", "0.6057145", "0.6047863", "0.6039235", "0.60132635", "0.60052156", "0.5981103", "0.59658897", "0.59632087", "0.59554857", "0.5944053", "0.59211034", "0.5915479", "0.5914711", "0.5906979", "0.5895753", "0.58679223", "0.5860106", "0.5852539", "0.58400935", "0.5829701", "0.5825991", "0.5795345", "0.5787734", "0.57874984", "0.576951", "0.5739046", "0.5716771", "0.5716771", "0.57160103", "0.57156885", "0.5709139", "0.57068944", "0.56983835", "0.56940293", "0.56709915", "0.56678635", "0.5656248", "0.5649708", "0.5643565", "0.5638176", "0.56361955", "0.5635913", "0.5628293", "0.5626873", "0.5624082", "0.5623676", "0.56075555", "0.56042904", "0.5597626", "0.5592303", "0.55875105", "0.55826086", "0.55764437", "0.5571479", "0.5563088", "0.555779", "0.5520781", "0.55185497", "0.5506177", "0.55046225", "0.55028236", "0.54984283", "0.54969674", "0.5494781", "0.54940605", "0.54898155", "0.54875773", "0.5486988", "0.54784673", "0.546469", "0.5460286", "0.5455517", "0.5449464", "0.54463655", "0.5443524", "0.54394996", "0.54347336", "0.54337937", "0.5432111", "0.5427959", "0.5416256", "0.5413157" ]
0.0
-1
Created by Andy on 11/2/17.
public interface Service<E> { void start(E handler); void stop(E handler); default void pause(E handler) {} default void resume(E handler) {} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private stendhal() {\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private void m50366E() {\n }", "public void method_4270() {}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public void init() {\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\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public void init() {}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n protected void init() {\n }", "public void m23075a() {\n }", "private void init() {\n\n\t}", "@Override\n void init() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "public abstract void mo70713b();", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\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}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo21779D() {\n }", "@Override\n\tpublic void jugar() {}", "public void mo21877s() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "public abstract void mo56925d();", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n protected void prot() {\n }", "private void m50367F() {\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "protected boolean func_70041_e_() { return false; }", "@Override\n protected void initialize() \n {\n \n }", "public abstract void mo27386d();" ]
[ "0.5867078", "0.5863937", "0.5828345", "0.5715621", "0.5714425", "0.5712373", "0.56622785", "0.56622785", "0.5653585", "0.5647272", "0.5635531", "0.5635499", "0.5627699", "0.5624684", "0.5618582", "0.55843496", "0.55817306", "0.55817306", "0.55817306", "0.55817306", "0.55817306", "0.55774695", "0.5574526", "0.55729455", "0.55707526", "0.5541267", "0.55332154", "0.55306166", "0.55296266", "0.5525259", "0.54889125", "0.54808116", "0.54805326", "0.54663235", "0.54582876", "0.5455438", "0.54504156", "0.5437067", "0.5437067", "0.541365", "0.541365", "0.541365", "0.5413585", "0.5402994", "0.5397365", "0.539644", "0.53944594", "0.53891367", "0.53821117", "0.53749084", "0.53736484", "0.5371374", "0.53710914", "0.5369583", "0.5369346", "0.5369346", "0.5362364", "0.5362364", "0.5362364", "0.53571177", "0.53499913", "0.5348066", "0.53477913", "0.5342071", "0.5342071", "0.5342071", "0.53414017", "0.5340365", "0.533394", "0.53241324", "0.5318202", "0.5294247", "0.5292142", "0.5292142", "0.5292142", "0.5292142", "0.5292142", "0.5292142", "0.52830607", "0.52830607", "0.52778465", "0.52724195", "0.5244632", "0.52428156", "0.52394104", "0.52363735", "0.5232619", "0.52294093", "0.52269286", "0.5226459", "0.5222151", "0.5221165", "0.5218965", "0.5216915", "0.5215197", "0.5214084", "0.5209979", "0.5209979", "0.5206869", "0.520331", "0.52027696" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View v) { if(v.getId() == R.id.setting_update) { Editor editor = sp.edit(); if(update_setting.getCheckBox().isChecked()) { update_setting.setCheckBox(false); editor.putBoolean("auto_update", false); }else { update_setting.setCheckBox(true); editor.putBoolean("auto_update", true); } editor.commit(); }else if(v.getId() == R.id.setting_ring_attention) { if(ring_attention_setting.getCheckBox().isChecked()) { ring_attention_setting.setCheckBox(false); stopService(new Intent(SettingActivity.this, PhoneListernService.class)); }else { ring_attention_setting.setCheckBox(true); startService(new Intent(SettingActivity.this, PhoneListernService.class)); } } }
{ "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
Generates a tile positioned and fixed in the game board
public TilePositionedFixed(Tile tile0, Rotation rotation2) { super(tile0, rotation2, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void generateTiles() {\n }", "@Override\n\tprotected void generateTiles() {\n\t}", "private void createTile(){\n for(int i = 0; i < COPY_TILE; i++){\n for(int k = 0; k < DIFF_TILES -2; k++){\n allTiles.add(new Tile(k));\n }\n }\n }", "public void initializeTiles(){\r\n tileBoard = new Tile[7][7];\r\n //Create the fixed tiles\r\n //Row 0\r\n tileBoard[0][0] = new Tile(false, true, true, false);\r\n tileBoard[2][0] = new Tile(false, true, true, true);\r\n tileBoard[4][0] = new Tile(false, true, true, true);\r\n tileBoard[6][0] = new Tile(false, false, true, true);\r\n //Row 2\r\n tileBoard[0][2] = new Tile(true, true, true, false);\r\n tileBoard[2][2] = new Tile(true, true, true, false);\r\n tileBoard[4][2] = new Tile(false, true, true, true);\r\n tileBoard[6][2] = new Tile(true, false, true, true);\r\n //Row 4\r\n tileBoard[0][4] = new Tile(true, true, true, false);\r\n tileBoard[2][4] = new Tile(true, true, false, true);\r\n tileBoard[4][4] = new Tile(true, false, true, true);\r\n tileBoard[6][4] = new Tile(true, false, true, true);\r\n //Row 6\r\n tileBoard[0][6] = new Tile(true, true, false, false);\r\n tileBoard[2][6] = new Tile(true, true, false, true);\r\n tileBoard[4][6] = new Tile(true, true, false, true);\r\n tileBoard[6][6] = new Tile(true, false, false, true);\r\n \r\n //Now create the unfixed tiles, plus the extra tile (15 corners, 6 t's, 13 lines)\r\n ArrayList<Tile> tileBag = new ArrayList<Tile>();\r\n Random r = new Random();\r\n for (int x = 0; x < 15; x++){\r\n tileBag.add(new Tile(true, true, false, false));\r\n }\r\n for (int x = 0; x < 6; x++){\r\n tileBag.add(new Tile(true, true, true, false));\r\n }\r\n for (int x = 0; x < 13; x++){\r\n tileBag.add(new Tile(true, false, true, false));\r\n }\r\n //Randomize Orientation\r\n for (int x = 0; x < tileBag.size(); x++){\r\n int rand = r.nextInt(4);\r\n for (int y = 0; y <= rand; y++){\r\n tileBag.get(x).rotateClockwise();\r\n }\r\n }\r\n \r\n for (int x = 0; x < 7; x++){\r\n for (int y = 0; y < 7; y++){\r\n if (tileBoard[x][y] == null){\r\n tileBoard[x][y] = tileBag.remove(r.nextInt(tileBag.size()));\r\n }\r\n }\r\n }\r\n extraTile = tileBag.remove(0);\r\n }", "private void generateMap(){\n int[] blockStepX = {X_STEP, 0, -X_STEP, -X_STEP, 0, X_STEP};\n int[] blockStepY = {Y_STEP_ONE, Y_STEP_TWO, Y_STEP_ONE, -Y_STEP_ONE, -Y_STEP_TWO, -Y_STEP_ONE};\n int blockSpecialValue = 0;\n int cellSpecial = 0;\n\n mapCells[origin.x/10][origin.y/10] = new EschatonCell(new CellPosition(0, 0, 0),\n new Point(origin.x, origin.y), blockSpecialValue);\n\n cellGrid[0][0][0] = new EschatonCell(new CellPosition(0, 0, 0),\n new Point(origin.x, origin.y), blockSpecialValue);\n\n for (int distanceFromOrigin = 0; distanceFromOrigin < config.getSizeOfMap();\n distanceFromOrigin++){\n\n int[] blockXVals = {origin.x,\n origin.x + X_STEP * distanceFromOrigin,\n origin.x + X_STEP * distanceFromOrigin,\n origin.x,\n origin.x - X_STEP * distanceFromOrigin,\n origin.x - X_STEP * distanceFromOrigin};\n\n int[] blockYVals = {origin.y - Y_STEP_TWO * distanceFromOrigin,\n origin.y - Y_STEP_ONE * distanceFromOrigin,\n origin.y + Y_STEP_ONE * distanceFromOrigin,\n origin.y + Y_STEP_TWO * distanceFromOrigin,\n origin.y + Y_STEP_ONE * distanceFromOrigin,\n origin.y - Y_STEP_ONE * distanceFromOrigin};\n\n blockSpecialValue = getRandomNumber(distanceFromOrigin, 0, 0);\n\n for (int block = 0; block < NUMBER_OF_BLOCKS; block ++){\n\n int blockXOrdinal = blockXVals[block];\n int blockYOrdinal = blockYVals[block];\n\n for (int blockSize = 0; blockSize < distanceFromOrigin; blockSize++){\n if(blockSpecialValue == blockSize){\n cellSpecial = getRandomNumber(2, 1, 1);\n }else {\n cellSpecial = 0;\n }\n cellGrid [distanceFromOrigin][block+1][blockSize+1] = makeNewCell(\n new CellPosition(distanceFromOrigin,block+1, blockSize+1),\n new Point(blockXOrdinal + blockStepX[block] * (blockSize + 1),\n blockYOrdinal + blockStepY[block] * (blockSize + 1)), cellSpecial);\n }\n }\n }\n }", "void randomBlock() {\n\t\t// map generate (int map)\n\t\tfor (int i = 0; i < mapX; i += 2) {\n\t\t\tfor (int j = 0; j < mapY; j += 2) {\n\t\t\t\tint r = (int) Math.random() * 4;\n\t\t\t\tif (r == 0) {\n\t\t\t\t\ttileMap[i][j] = new Tile(i, j, 1);\n\t\t\t\t\ttileMap[i + 1][j] = new Tile(i + 1, j, 1);\n\t\t\t\t\ttileMap[i][j + 1] = new Tile(i, j + 1, 1);\n\t\t\t\t\ttileMap[i + 1][j + 1] = new Tile(i + 1, j + 1, 1);\n\n\t\t\t\t} else {\n\t\t\t\t\ttileMap[i][j] = new Tile(i, j, 0);\n\t\t\t\t\ttileMap[i + 1][j] = new Tile(i + 1, j, 0);\n\t\t\t\t\ttileMap[i][j + 1] = new Tile(i, j + 1, 0);\n\t\t\t\t\ttileMap[i + 1][j + 1] = new Tile(i + 1, j + 1, 0);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void drawTile() {\n\n }", "private void generateBoard(){\n\t}", "private void generate()\r\n {\r\n mapPieces = myMap.Generate3();\r\n mapWidth = myMap.getMapWidth();\r\n mapHeight = myMap.getMapHeight();\r\n }", "public TiledMap createMap() {\n map_inter = new MapTile[g_logic.MAP_WIDTH][g_logic.MAP_HEIGHT];\n \n //drawing stuff\n tiles = new Texture(Gdx.files.internal(\"packed/terrain.png\"));\n TextureRegion[][] splitTiles = TextureRegion.split(tiles, 54, 54);\n map = new TiledMap();\n MapLayers layers = map.getLayers();\n TiledMapTileLayer new_layer = new TiledMapTileLayer(g_logic.MAP_WIDTH, g_logic.MAP_HEIGHT, g_logic.ISO_WIDTH, g_logic.ISO_HEIGHT);\n \n //actual generation\n for (int x = 0; x < g_logic.MAP_WIDTH; x++) \n {\n for (int y = 0; y < g_logic.MAP_HEIGHT; y++) \n {\n char chara = '.';\n int ty = 0;\n int tx;\n if (x == 0 || x == g_logic.MAP_WIDTH-1)\n {\n tx = 1;\n chara = '#';\n }\n else\n {\n tx = 0; \n chara = '.';\n }\n \n //set up map tiles\n MapTile tile = new MapTile(x, y, tx, ty, chara);\n Gdx.app.log(\"Map gen\", \"Created a map tile @\" + x + \",\" + y + \" \" + tx + \" \" + ty + \" \" + chara);\n \n //put them in the internal map\n putInterMap(tile, x, y);\n \n //set up renderer cells\n TiledMapTileLayer.Cell cell = new TiledMapTileLayer.Cell();\n //y,x\n cell.setTile(new StaticTiledMapTile(splitTiles[tile.getTextureY()][tile.getTextureX()]));\n new_layer.setCell(x, y, cell);\n }\n }\n \n \n float y_off = g_logic.getYOffset();\n new_layer.setOffsetY(y_off);\n layers.add(new_layer);\n \n g_logic.setInterMap(map_inter);\n\n return map;\n }", "public void generateTerrain()\n\t{\n\t\tint rand;\n\t\tint starting=(int)(blocksWide*0.45);//Choose the first grass block\n\t\tblocksTall=(int)(blocksWide*0.6);\n\t\tfor(int i=0;i<blocksWide;i++)\n\t\t{\n\t\t\t//Determine whether the next block will go up a level, down a level or stay the same (55% chance of staying the same)\n\t\t\trand=ThreadLocalRandom.current().nextInt(0,3);\t\n\t\t\tif(rand!=0)\n\t\t\t{\n\t\t\t\trand=ThreadLocalRandom.current().nextInt(-1,2);\n\t\t\t}\n\t\t\tif(starting+rand<blocksTall-2 && starting+rand>4)\t//Make sure new position isn't too close to the top or bottom\n\t\t\t{\n\t\t\t\tstarting+=rand;\n\t\t\t}\n\t\t\tgrassy[i]=starting;\n\t\t\tgrassT[i]=ThreadLocalRandom.current().nextInt(0,3);\n\t\t\t//Generate a platform to allow for collision detection\n\t\t\tplatforms.add(new Platform((double)i/blocksWide,(double)starting/blocksTall,1.0/blocksWide,1.0/blocksWide));\n\t\t}\n\t\tplatforms.add(new Platform(0.0,0.0,0.0,0.0));\n\t}", "public void generateShape() {\n\n //TODO for tetris game - copy added to Tetris\n Shape newShape = null;\n //if(GAME_TO_TEST==GameEnum.TETRIS){\n //newShape = TetrisShapeFactory.getRandomShape(this.board);\n //} else if (GAME_TO_TEST== GameEnum.DRMARIO){\n //newShape = DrMarioShapeFactory.getRandomShape(this.board);\n //}\n\n //Temporary\n //-------------------------------------//\n Image image = null;\n try {\n image = new Image(new FileInputStream(\"resources/BlockPurple.png\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n int spawnColIndex = 0;\n int spawnRowIndex = 0;\n int tileSize = 0;\n boolean setColor = false;\n boolean setTileBorder = false; //toggle to add boarder to tile\n boolean setImage = true;\n spawnColIndex = (board.gridWidth-1)/2; //half of board width\n spawnRowIndex = 0;\n tileSize = board.tileSize;\n\n Tile tile1 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 0 , Direction.DOWN); //Center Tile\n Tile tile2 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex,1 , Direction.RIGHT);\n Tile tile3 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.LEFT);\n Tile tile4 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.DOWN);\n\n List<Tile> tiles = new ArrayList<Tile>();\n tiles.add(tile1);\n tiles.add(tile2);\n tiles.add(tile3);\n tiles.add(tile4);\n newShape = new Shape(tiles);\n\n //set newly created shape as the currently active shape\n this.currentActiveShape = newShape;\n\n //check if spawn area is occupied\n boolean isOccupied =false;\n for (Tile newTile : this.currentActiveShape.tiles) {\n if(this.board.getTile(newTile.columnIndex,newTile.rowIndex)!=null){\n isOccupied = true;\n }\n }\n\n //TODO\n //check if shape reaches top\n if(!isOccupied){\n //add tiles to board\n for (Tile newTile : this.currentActiveShape.tiles) {\n this.board.placeTile(newTile);\n }\n } else {\n //TODO later add Game Over JavaFx message\n System.out.println(\"GAME OVER\");\n\n //TODO Finishlater\n //Text gameoverText = new Text(10,20,\"GAME OVER\");\n //gameoverText.setFill(Color.RED);\n //gameoverText.setX( 100/*( ((board.gridWidth-1)*tileSize)/2)*/ );\n //gameoverText.setY( 100/*( ((board.gridHeight-1)*tileSize)/2)*/ );\n //gameoverText.setStyle(\"-fx-font: 70 arial;\");\n //this.group.getChildren().add(gameoverText);\n\n //Text t = new Text();\n //t.setX(20.0f);\n //t.setY(65.0f);\n //t.setX(100);\n //t.setY(200);\n //t.setText(\"Perspective\");\n //t.setFill(Color.YELLOW);\n //t.setFont(Font.font(null, FontWeight.BOLD, 36));\n //this.group.getChildren().add(t);\n //this.pane.getChildren().add(t);\n\n //System.exit(0);\n }\n\n }", "Tile getPosition();", "public Puzzle exPuzzle() {\n List<Tile> tiles = new ArrayList<>(9);\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.x), new Pic(Pattern.B, Half.y), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.y), new Pic(Pattern.D, Half.x), new Pic(Pattern.C, Half.y), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.y), new Pic(Pattern.D, Half.x), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.C, Half.x), new Pic(Pattern.C, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.C, Half.x)));\n tiles.add(new Tile(new Pic(Pattern.A, Half.x), new Pic(Pattern.A, Half.y), new Pic(Pattern.B, Half.y), new Pic(Pattern.B, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.C, Half.y), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.x), new Pic(Pattern.A, Half.x), new Pic(Pattern.D, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.x), new Pic(Pattern.B, Half.y), new Pic(Pattern.B, Half.x), new Pic(Pattern.A, Half.y)));\n tiles.add(new Tile(new Pic(Pattern.B, Half.y), new Pic(Pattern.A, Half.x), new Pic(Pattern.D, Half.y), new Pic(Pattern.C, Half.y)));\n return new Puzzle(tiles);\n }", "private Board create5by5Board() {\n Tile[][] tiles;\n Tile t1 = new Tile(0, 5);\n Tile t2 = new Tile(1, 5);\n Tile t3 = new Tile(2, 5);\n Tile t4 = new Tile(3, 5);\n Tile t5 = new Tile(4, 5);\n Tile t6 = new Tile(5, 5);\n Tile t7 = new Tile(6, 5);\n Tile t8 = new Tile(7, 5);\n Tile t9 = new Tile(8, 5);\n Tile t10 = new Tile(9, 5);\n Tile t11 = new Tile(10, 5);\n Tile t12 = new Tile(11, 5);\n Tile t13 = new Tile(12, 5);\n Tile t14 = new Tile(13, 5);\n Tile t15 = new Tile(14, 5);\n Tile t16 = new Tile(15, 5);\n Tile t17 = new Tile(16, 5);\n Tile t18 = new Tile(17, 5);\n Tile t19 = new Tile(18, 5);\n Tile t20 = new Tile(19, 5);\n Tile t21 = new Tile(20, 5);\n Tile t22 = new Tile(21, 5);\n Tile t23 = new Tile(22, 5);\n Tile t24 = new Tile(23, 5);\n Tile t25 = new Tile(24, 5);\n tiles = new Tile[5][5];\n tiles[0][0] = t7;\n tiles[0][1] = t6;\n tiles[0][2] = t2;\n tiles[0][3] = t5;\n tiles[0][4] = t9;\n tiles[1][0] = t3;\n tiles[1][1] = t1;\n tiles[1][2] = t8;\n tiles[1][3] = t4;\n tiles[1][4] = t11;\n tiles[2][0] = t17;\n tiles[2][1] = t18;\n tiles[2][2] = t10;\n tiles[2][3] = t25;\n tiles[2][4] = t20;\n tiles[3][0] = t23;\n tiles[3][1] = t21;\n tiles[3][2] = t12;\n tiles[3][3] = t15;\n tiles[3][4] = t13;\n tiles[4][0] = t22;\n tiles[4][1] = t24;\n tiles[4][2] = t14;\n tiles[4][3] = t16;\n tiles[4][4] = t19;\n return new Board(tiles);\n }", "private void createTiles() {\n\t\tint tile_width = bitmap.getWidth() / gridSize;\n\t\tint tile_height = bitmap.getHeight() / gridSize;\n\n\t\tfor (short row = 0; row < gridSize; row++) {\n\t\t\tfor (short column = 0; column < gridSize; column++) {\n\t\t\t\tBitmap bm = Bitmap.createBitmap(bitmap, column * tile_width,\n\t\t\t\t\t\trow * tile_height, tile_width, tile_height);\n\n\t\t\t\t// if final, Tile -> blank\n\t\t\t\tif ((row == gridSize - 1) && (column == gridSize - 1)) {\n\t\t\t\t\tbm = Bitmap.createBitmap(tile_width, tile_height,\n\t\t\t\t\t\t\tbm.getConfig());\n\t\t\t\t\tbm.eraseColor(Color.WHITE);\n\t\t\t\t\ttheBlankTile = new Tile(bm, row, column);\n\t\t\t\t\ttiles.add(theBlankTile);\n\t\t\t\t} else {\n\t\t\t\t\ttiles.add(new Tile(bm, row, column));\n\t\t\t\t}\n\t\t\t} // end column\n\t\t} // end row\n\t\tbitmap.recycle();\n\n\t}", "public void putRandomOnTile(Item item) {\n/* 4677 */ float newPosX = (this.tilex << 2) + 0.5F + Server.rand.nextFloat() * 3.0F;\n/* 4678 */ float newPosY = (this.tiley << 2) + 0.5F + Server.rand.nextFloat() * 3.0F;\n/* 4679 */ item.setPosXY(newPosX, newPosY);\n/* */ }", "private List<Tile> makeTiles() {\n List<Tile> tiles = new ArrayList<>();\n Board board = (Board) boardManager.getBoard();\n final int numTiles = board.getNumRows() * board.getNumCols();\n for (int tileNum = 0; tileNum != numTiles; tileNum++) {\n tiles.add(new Tile(tileNum + 1, tileNum, 4));\n }\n\n return tiles;\n }", "private void boxCreator(int[] pos, int width, int height) {\n for (int x = pos[0]; x < pos[0] + width; x++) {\n tiles[x][pos[1]] = Tileset.WALL;\n }\n for (int y = pos[1]; y < pos[1] + height; y++) {\n tiles[pos[0]][y] = Tileset.WALL;\n }\n for (int x = pos[0]; x < pos[0] + width; x++) {\n tiles[x][pos[1] + height] = Tileset.WALL;\n }\n for (int y = pos[1]; y < pos[1] + height + 1; y++) {\n tiles[pos[0] + width][y] = Tileset.WALL;\n }\n for (int y = pos[1] + 1; y < pos[1] + height; y++) {\n for (int x = pos[0] + 1; x < pos[0] + width; x++) {\n tiles[x][y] = Tileset.FLOWER;\n }\n }\n }", "private void initialiseBoard() {\r\n\t\t//Set all squares to EMPTY\r\n\t\tfor(int x = 0; x < board.getWidth(); x++) {\r\n\t\t\tfor(int y = 0; y < board.getHeight(); y++) {\r\n\t\t\t\tboard.setSquare(new GridSquare(GridSquare.Type.EMPTY), x, y);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Assign player tiles\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_ONE_TILE), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new PlayerTile(GridSquare.Type.PLAYER_TWO_TILE), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y);\r\n\t\t\r\n\t\t//Assign Creation tiles\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_ONE_POSITION_X+3, Board.PLAYER_ONE_POSITION_Y+3);\r\n\t\tsetFixedTile(new CreationTile(GridSquare.Type.CREATION_TILE), Board.PLAYER_TWO_POSITION_X-3, Board.PLAYER_TWO_POSITION_Y-3);\r\n\t\t\r\n\t\t//Assign Out of Bounds tiles\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_ONE_POSITION_X-3, Board.PLAYER_ONE_POSITION_Y-3);\r\n\t\t\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\tsetFixedTile(new OutOfBoundsTile(GridSquare.Type.OUT_OF_BOUNDS), Board.PLAYER_TWO_POSITION_X+3, Board.PLAYER_TWO_POSITION_Y+3);\r\n\t\t\r\n\t\t\r\n\t}", "protected abstract void setTile( int tile, int x, int y );", "public void generateLevel() {\n\t\tfor (int y = 0; y < this.height; y++) {\n\t\t\tfor (int x = 0; x < this.width; x++) {\n\t\t\t\tif (x * y % 10 < 5)\n\t\t\t\t\ttiles[x + y * width] = Tile.GRASS.getId();\n\t\t\t\telse\n\t\t\t\t\ttiles[x + y * width] = Tile.STONE.getId();\n\t\t\t}\n\t\t}\n\t}", "public void getTile_B8();", "public void fillTable() {\n\t\tif (scroll.getWidth() == 0) {\n\t\t\treturn;\n\t\t}\n\t\tboolean showedNew = false;\n\t\tArrayList<Placeable> currentView = new ArrayList<Placeable>();\n\t\tif (viewing == ViewingMode.MATERIAL) {\n\t\t\tif (loadedMats == null)\n\t\t\t\tloadedMats = repo.getAllMats();\n\t\t\tfor (NamedMaterial m: loadedMats) {\n\t\t\t\tcurrentView.add(m);\n\t\t\t}\n\t\t}\n\t\telse if (viewing == ViewingMode.PIECE){\n\t\t\tif (loadedPieces == null)\n\t\t\t\tloadedPieces = repo.getAllPieces();\n\t\t\tfor (Piece m: loadedPieces) {\n\t\t\t\tcurrentView.add(m);\n\t\t\t}\n\t\t\tshowedNew = true;\n\t\t}\n\t\t\n\t\ttiles.clearChildren();\n\t\tfloat cellWidth = 64.0f;\n\t\tint numAcross = (int)(scroll.getWidth() / cellWidth);\n\t\tif (numAcross <= 0) {\n\t\t\tnumAcross = 1;\n\t\t}\n\t\tint count = 0;\n\t\tActor tile;\n\t\twhile (count < currentView.size()) {\n\t\t\tfor (int y = 0; y < numAcross; y++) {\n\t\t\t\tif (!showedNew) {\n\t\t\t\t\ttile = new Label(\"New\", TextureOrganizer.getSkin());\n\t\t\t\t\t((Label)tile).setAlignment(Align.center);\n\t\t\t\t\ttile.addListener(new ClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t public void clicked(InputEvent event, float x, float y) {\n\t\t\t\t\t\t\tmakeNew();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tshowedNew = true;\n\t\t\t\t}\n\t\t\t\telse if (count >= currentView.size()) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttile = new ColoredRectActor(currentView.get(count++));\n\t\t\t\t\ttile.addListener(new TileListener((ColoredRectActor)tile));\n\t\t\t\t}\n\t\t\t\ttiles.add(tile).width(cellWidth).height(cellWidth).fill();\n\t\t\t}\n\t\t\tif (count < currentView.size())\n\t\t\t\ttiles.row();\n\t\t}\n\t}", "protected void registerTile(int x, int y) {}", "void placeTile(Tile tile, int x, int y, SurfaceEntityType type, Building building) {\r\n\t\tfor (int a = x; a < x + tile.width; a++) {\r\n\t\t\tfor (int b = y; b > y - tile.height; b--) {\r\n\t\t\t\tSurfaceEntity se = new SurfaceEntity();\r\n\t\t\t\tse.type = type;\r\n\t\t\t\tse.virtualRow = y - b;\r\n\t\t\t\tse.virtualColumn = a - x;\r\n\t\t\t\tse.tile = tile;\r\n\t\t\t\tse.tile.alpha = alpha;\r\n\t\t\t\tse.building = building;\r\n\t\t\t\tif (type != SurfaceEntityType.BASE) {\r\n\t\t\t\t\trenderer.surface.buildingmap.put(Location.of(a, b), se);\r\n\t\t\t\t} else {\r\n\t\t\t\t\trenderer.surface.basemap.put(Location.of(a, b), se);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static Tile[][] setUpMap() {\n\n Tile[][] tiles = new Tile[5][9];\n String[][] defaultMapLayout = GameMap.getMapLayout();\n\n for (int i = 0; i < 5; i++) {\n\n for (int j = 0; j < 9; j++) {\n\n String tileType = defaultMapLayout[i][j];\n\n if (tileType.equals(\"P\")) {\n Tile newTileName = new Plain();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"R\")) {\n Tile newTileName = new River();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M1\")) {\n Tile newTileName = new Mountain1();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M2\")) {\n Tile newTileName = new Mountain2();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M3\")) {\n Tile newTileName = new Mountain3();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"SM\")) {\n Tile newTileName = new SwampMonster();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"O\")) {\n Tile newTileName = new Ocean();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"G\")) {\n Tile newTileName = new Grass();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"V\")) {\n Tile newTileName = new Volcano();\n tiles[i][j] = newTileName;\n\n }else {\n Tile newTileName = new Plain();\n tiles[i][j] = newTileName;\n newTileName.setOwner(null);\n }\n\n }\n }\n return tiles;\n }", "public static void makePieces() {\n\t\tPiece[] pieces = new Piece[35];\n\t\tfor (int i = 0; i < pieces.length; i++) {\n\t\t\tTile t = new Tile(false, true, 0, 0);\n\t\t\tTile f = new Tile(false, false, 0, 0);\n\t\t\tTile[][] tiles = new Tile[6][6];\n\t\t\tswitch (i) {\n\t\t\tcase 0:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, f, t, f, f }, { f, f, f, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, t, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, f, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, t, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, t, f, f, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, t, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 20:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 22:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 23:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 24:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, t, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 25:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 26:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 27:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 28:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 29:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 30:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 31:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, t, f, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 32:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 33:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 34:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tpieces[i] = new Piece(tiles);\n\t\t}\n\t\ttry {\n\t\t\tFileOutputStream saveFile = new FileOutputStream(\"pieces.data\");\n\t\t\tObjectOutputStream save = new ObjectOutputStream(saveFile);\n\t\t\tsave.reset();\n\t\t\tsave.writeObject(pieces);\n\t\t\tsave.close();\n\t\t} catch (Exception exc) {\n\t\t\texc.printStackTrace(); // If there was an error, print the info.\n\t\t}\n\t}", "public abstract Tile getTileAt(int x, int y);", "private void setFixedTile(FixedTile tile, int x, int y) {\r\n\t\tGridSquare.Type type = tile.getType();\r\n\t\tfor(int i = x; i < x+3; i++) {\r\n\t\t\tfor(int j = y; j < y+3; j++) {\r\n\t\t\t\tboard.setSquare(new GridSquare(type) , i, j);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setTiles() {\n\t\tTileStack names = new TileStack();\n\t\tfor(int x=0; x < theBoard.getCols(); x++) {\n\t\t\tfor(int y=0; y < theBoard.getRows(); y++) {\n\t\t\t\tp = new Point(x,y);\n\t\t\t\tif(p.equals(new Point(0,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(1,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(4,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,1)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,1)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,4)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,4)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(1,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(4,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse \n\t\t\t\t\ttheBoard.setTile(p, names.pop());\n\t\t\t}\n\t\t}\n\t}", "public Parent createContent(){\n Pane root = new Pane();\n root.setPrefSize((dimension * tileSize)+(tileSize*4)+menuWidth, (dimension * tileSize)+(tileSize*4));\n root.getChildren().addAll(tileGroup);\n TopOfBoard top = new TopOfBoard();\n Parent controlsAndMovement = top.newScene();\n root.getChildren().addAll(controlsAndMovement);\n\n // setting main game board template\n for (int i = 0; i< dimension; i++){\n for (int j = 0; j< dimension; j++){\n if (i==0||i== dimension -1||j==0||j== dimension -1){\n if (i==0) {\n if (j==0){\n tileInit(i, j, tileGroup, tileSize * 2, tileSize * 2, j * tileSize, i * tileSize);\n }\n else if (j== dimension -1){\n tileInit(i, j, tileGroup, tileSize*2, tileSize*2, (j * tileSize)+tileSize, i * tileSize);\n }\n else {\n tileInit(i, j, tileGroup, tileSize*2, tileSize, (j * tileSize)+tileSize, i * tileSize);\n }\n }\n else if (i== dimension -1){\n if (j==0){\n tileInit(i, j, tileGroup, tileSize*2, tileSize*2, j * tileSize, (i * tileSize)+tileSize);\n }\n else if (j== dimension -1){\n tileInit(i, j, tileGroup, tileSize*2, tileSize*2, (j * tileSize)+tileSize, (i * tileSize)+tileSize);\n }\n else {\n tileInit(i, j, tileGroup, tileSize * 2, tileSize, (j * tileSize) + tileSize, (i * tileSize) + tileSize);\n }\n }\n else if (j==0){\n tileInit(i, j, tileGroup, tileSize, tileSize*2, j * tileSize, (i * tileSize)+(tileSize));\n\n }\n else if (j== dimension -1) {\n tileInit(i, j, tileGroup, tileSize, tileSize*2, (j * tileSize)+(tileSize), (i * tileSize)+tileSize);\n }\n\n }\n }\n\n // Setting player score board\n for (int q = 1; q <= numOfPlayers; q++){\n if (q == 1){\n Tile tile = new Tile((getTileSize()*2), (getTileSize()*4));\n tile.setTranslateX((getTileSize()* getDimension())+(getTileSize()*3));\n tile.setTranslateY(getTileSize()*3);\n Text text = new Text((getTileSize()* getDimension())+(getTileSize()*4), (getTileSize()*3.5), \"Player 1 score board:\");\n tileGroup.getChildren().addAll(tile, text);\n }\n else if (q == 2){\n Tile tile = new Tile((getTileSize()*2), (getTileSize()*4));\n tile.setTranslateX((getTileSize()* getDimension())+(getTileSize()*3));\n tile.setTranslateY(getTileSize()*5);\n Text text = new Text((getTileSize()* getDimension())+(getTileSize()*4), (getTileSize()*5.5), \"Player 2 score board:\");\n tileGroup.getChildren().addAll(tile, text);\n }\n else if (q == 3){\n Tile tile = new Tile((getTileSize()*2), (getTileSize()*4));\n tile.setTranslateX((getTileSize()* getDimension())+(getTileSize()*3));\n tile.setTranslateY(getTileSize()*7);\n Text text = new Text((getTileSize()* getDimension())+(getTileSize()*4), (getTileSize()*7.5), \"Player 3 score board:\");\n tileGroup.getChildren().addAll(tile, text);\n }\n else if (q == 4){\n Tile tile = new Tile((getTileSize()*2), (getTileSize()*4));\n tile.setTranslateX((getTileSize()* getDimension())+(getTileSize()*3));\n tile.setTranslateY(getTileSize()*9);\n Text text = new Text((getTileSize()* getDimension())+(getTileSize()*4), (getTileSize()*9.5), \"Player 4 score board:\");\n tileGroup.getChildren().addAll(tile, text);\n }\n\n }\n\n for (int r = 1; r <= numOfPlayers; r++) {\n if (r == 1) {\n Tile tile = new Tile((getTileSize() * 3), (getTileSize() * 4));\n tile.setTranslateX((getTileSize() * getDimension()) + (getTileSize() * 7));\n tile.setTranslateY(0);\n Text text = new Text((getTileSize() * getDimension()) + (getTileSize() * 8), (getTileSize() * 0.5), \"Player 1 owned cards:\");\n tileGroup.getChildren().addAll(tile, text);\n } else if (r == 2) {\n Tile tile = new Tile((getTileSize() * 3), (getTileSize() * 4));\n tile.setTranslateX((getTileSize() * getDimension()) + (getTileSize() * 7));\n tile.setTranslateY(getTileSize() * 3);\n Text text = new Text((getTileSize() * getDimension()) + (getTileSize() * 8), (getTileSize() * 3.5), \"Player 2 owned cards:\");\n tileGroup.getChildren().addAll(tile, text);\n } else if (r == 3) {\n Tile tile = new Tile((getTileSize() * 3), (getTileSize() * 4));\n tile.setTranslateX((getTileSize() * getDimension()) + (getTileSize() * 7));\n tile.setTranslateY(getTileSize() * 6);\n Text text = new Text((getTileSize() * getDimension()) + (getTileSize() * 8), (getTileSize() * 6.5), \"Player 3 owned cards:\");\n tileGroup.getChildren().addAll(tile, text);\n } else if (r == 4) {\n Tile tile = new Tile((getTileSize() * 3), (getTileSize() * 4));\n tile.setTranslateX((getTileSize() * getDimension()) + (getTileSize() * 7));\n tile.setTranslateY(getTileSize() * 9);\n Text text = new Text((getTileSize() * getDimension()) + (getTileSize() * 8), (getTileSize() * 9.5), \"Player 4 owned cards:\");\n tileGroup.getChildren().addAll(tile, text);\n\n }\n }\n addImg();\n }\n return root;\n }", "private void generateMap() {\n\n\t\t//Used to ensure unique locations of each Gameboard element\n\t\tboolean[][] spaceUsed = new boolean[12][12];\n\n\t\t//A running total of fences generated\n\t\tint fencesGenerated = 0;\n\n\t\t//A running total of Mhos generated\n\t\tint mhosGenerated = 0;\n\n\t\t//Fill the board with spaces and spikes on the edge\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tmap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\tif (i == 0 || i == 11 || j ==0 || j == 11) {\n\t\t\t\t\tmap[i][j] = new Fence(i, j, board);\n\t\t\t\t\tspaceUsed[i][j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Generate 20 spikes in unique locations\n\t\twhile (fencesGenerated < 20) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Fence(x, y, board);\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\tfencesGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate 12 mhos in unique locations\n\t\twhile (mhosGenerated < 12) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Mho(x, y, board);\n\n\t\t\t\tmhoLocations.add(x);\n\t\t\t\tmhoLocations.add(y);\n\n\t\t\t\tspaceUsed[x][y] = true;\n\n\t\t\t\tmhosGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate a player in a unique location\n\t\twhile (true) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Player(x, y, board);\n\t\t\t\tplayerLocation[0] = x;\n\t\t\t\tplayerLocation[1] = y;\n\t\t\t\tnewPlayerLocation[0] = x;\n\t\t\t\tnewPlayerLocation[1] = y;\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public void createWorldMap() {\r\n\t\tdo {\r\n\t\t\t//\t\t@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Recursive map generation method over here@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\n\t\t\t//Generation loop 1 *ADDS VEIN STARTS AND GRASS*\r\n\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\r\n\t\t\t\t\tif (Math.random()*10000>9999) { //randomly spawn a conore vein start\r\n\t\t\t\t\t\ttileMap[i][j] = new ConoreTile (conore, true);\r\n\t\t\t\t\t\tconoreCount++;\r\n\t\t\t\t\t}else if (Math.random()*10000>9999){\r\n\t\t\t\t\t\ttileMap[i][j] = new KannaiteTile(kanna, true);\r\n\t\t\t\t\t\tkannaiteCount++;\r\n\t\t\t\t\t}else if(Math.random()*10000>9999){\r\n\t\t\t\t\t\ttileMap[i][j] = new FuelTile(fuel, true);\r\n\t\t\t\t\t\tfuelCount++;\r\n\t\t\t\t\t}else if(Math.random()*10000>9999) {\r\n\t\t\t\t\t\ttileMap[i][j] = new ForestTile(forest, true);\r\n\t\t\t\t\t\tforestCount++;\r\n\t\t\t\t\t}else if(Math.random()*10000>9999){\r\n\t\t\t\t\t\ttileMap[i][j] = new OilTile(oil,true);\r\n\t\t\t\t\t}else if(Math.random()*10000>9997) {\r\n\t\t\t\t\t\ttileMap[i][j] = new MountainTile(mountain, true);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\ttileMap[i][j] = new GrassTile(dirt);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} // End for loop \r\n\t\t\t} // End for loop\r\n\t\t\t//End generation loop 1\r\n\r\n\t\t\t//Generation loop 2 *EXPANDS ON THE VEINS*\r\n\t\t\tdo {\r\n\t\t\t\tif (conoreCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new ConoreTile (conore,true);\r\n\t\t\t\t\tconoreCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tconorePass = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (kannaiteCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new KannaiteTile (kanna,true);\r\n\t\t\t\t\tkannaiteCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tkannaitePass = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (fuelCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new FuelTile (fuel,true);\r\n\t\t\t\t\tfuelCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tfuelPass = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (forestCount<6) {\r\n\t\t\t\t\ttileMap[(int)Math.random()*200][(int)Math.random()*200] = new ForestTile (forest,true);\r\n\t\t\t\t\tforestCount++;\r\n\t\t\t\t}else {\r\n\t\t\t\t\tforestPass = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSystem.out.println(\"Conore: \" + conoreCount + \" - \" + conorePass);\r\n\t\t\t\tSystem.out.println(\"Kannaite: \" + kannaiteCount + \" - \" + kannaitePass);\r\n\t\t\t\tSystem.out.println(\"Fuel: \" + fuelCount + \" - \" + fuelPass);\r\n\t\t\t\tSystem.out.println(\"Forest: \" + forestCount + \" - \" + forestPass);\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t}while(!conorePass || !kannaitePass || !fuelPass || !forestPass);\r\n\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\tbuildConore(i,j);\r\n\t\t\t\t\tbuildKannaite(i,j);\r\n\t\t\t\t\tbuildFuel(i,j);\r\n\t\t\t\t\tbuildForest(i,j);\r\n\t\t\t\t}//End of for loop\r\n\t\t\t}//End of for loop\r\n\t\t\t//End of generation loop 2\r\n\r\n\t\t\t//Generation loop 3 *COUNT ORES*\r\n\t\t\tint loop3Count = 0;\r\n\t\t\tconorePass = false;\r\n\t\t\tkannaitePass = false;\r\n\t\t\tfuelPass = false;\r\n\t\t\tforestPass = false;\r\n\t\t\tdo {\r\n\t\t\t\tconoreCount = 0;\r\n\t\t\t\tkannaiteCount = 0;\r\n\t\t\t\tfuelCount = 0;\r\n\t\t\t\tforestCount = 0;\r\n\t\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\t\tif (tileMap[i][j] instanceof ConoreTile) {\r\n\t\t\t\t\t\t\tconoreCount++;\r\n\t\t\t\t\t\t}else if(tileMap[i][j] instanceof KannaiteTile) {\r\n\t\t\t\t\t\t\tkannaiteCount++;\r\n\t\t\t\t\t\t}else if(tileMap[i][j] instanceof FuelTile) {\r\n\t\t\t\t\t\t\tfuelCount++;\r\n\t\t\t\t\t\t}else if(tileMap[i][j] instanceof ForestTile) {\r\n\t\t\t\t\t\t\tforestCount++;\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\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\t\tif (conoreCount < 220) {\r\n\t\t\t\t\t\t\tbuildConore(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tconorePass = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (kannaiteCount < 220) {\r\n\t\t\t\t\t\t\tbuildKannaite(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tkannaitePass = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (fuelCount< 220) {\r\n\t\t\t\t\t\t\tbuildFuel(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tfuelPass = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (forestCount < 220) {\r\n\t\t\t\t\t\t\tbuildForest(i,j);\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tforestPass = true;\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\tSystem.out.println(\"Conore: \" + conoreCount + \" - \" + conorePass);\r\n\t\t\t\tSystem.out.println(\"Kannaite: \" + kannaiteCount + \" - \" + kannaitePass);\r\n\t\t\t\tSystem.out.println(\"Fuel: \" + fuelCount + \" - \" + fuelPass);\r\n\t\t\t\tSystem.out.println(\"Forest: \" + forestCount + \" - \" + forestPass);\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tloop3Count++;\r\n\t\t\t\tif (loop3Count > 100) {\r\n\t\t\t\t\tSystem.out.println(\"map generation failed! restarting\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}while(!conorePass || !kannaitePass || !fuelPass || !forestPass);\r\n\t\t\t//END OF LOOP 3\r\n\r\n\t\t\t//LOOP 4: THE MOUNTAIN & OIL LOOP\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\t\t\t\t\tbuildMountain(i,j);\r\n\t\t\t\t\tbuildOil(i,j);\r\n\t\t\t\t}\r\n\t\t\t}//End of THE Mountain & OIL LOOP\r\n\r\n\t\t\t//ADD MINIMUM AMOUNT OF ORES\r\n\r\n\t\t\t//Generation Loop 5 *FINAL SETUP*\r\n\t\t\tfor (int i = 0; i < tileMap.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < tileMap[i].length; j++) {\r\n\r\n\t\t\t\t\tif(i == 1 || j == 1 || i == tileMap.length-2 || j == tileMap[i].length-2) {\r\n\t\t\t\t\t\ttileMap[i][j] = new DesertTile(desert);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (i == 0 || j == 0 || i == tileMap.length-1 || j == tileMap[i].length-1) {\r\n\t\t\t\t\t\ttileMap[i][j] = new WaterTile(water);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}//End of for loop\r\n\t\t\t}//End of for loop\r\n\t\t\t//End of generation loop 5\r\n\t\t\t//mapToString();//TEST RUN\r\n\t\t} while(!conorePass || !kannaitePass || !fuelPass || !forestPass); // End createWorldMap method\r\n\t}", "public void renderTile(int xp, int yp, Tile tile) {\n\t\txp -= xOffset; //subtracting the Offset accounts for player movement. This also somehow reverses the inversion of the controls. Understand why we are subtracting as opposed to adding.\n\t\typ -= yOffset;\n\t\tfor (int y = 0; y < tile.sprite.SIZE; y++) {\n\t\t\tint ya = y + yp; // ya refers to absolute position. y is the rendering thing moving from left to right. yp is the offset. The reason for needing an absolute position is that this method only renders a single tile\n\t\t\tfor (int x = 0; x < tile.sprite.SIZE; x++) {\n\t\t\t\tint xa = x + xp;\n\t\t\t\tif (xa < -tile.sprite.SIZE || xa >= width || ya < 0 || ya >= height) break; //width and height refer to the screen width and height. this if statement insures that only tiles on the screen are rendered! There are 4 bounds representing top, bottom, left and right. the far left bound isn't zero because...see andrew ton.\n\t\t\t\t//\"xa < -tile.sprite.SIZE\" insures that we get an extra tile on the far left so rendering is smooth.\n\t\t\t\tif (xa < 0) xa = 0; //we set xa equal to zero if \"xa < 0\" in case we are on the border. It ONLY solves the arrayindexoutofbounds error. doesnt have affect rendering\n\t\t\t\tpixels[xa + ya * width] = tile.sprite.pixels[x + y * tile.sprite.SIZE];\n\t\t\t}\n\t\t}\n\t}", "public void initBasicBoardTiles() {\n\t\ttry {\n\t\t\tfor(int i = 1 ; i <= BOARD_SIZE ; i+=2) {\n\t\t\t\tfor(char c = getColumnLowerBound() ; c <= getColumnUpperBound() ; c+=2) {\n\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, c), PrimaryColor.BLACK).build());\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, (char) ( c + 1)), PrimaryColor.WHITE).build());\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 2 ; i <= BOARD_SIZE ; i+=2) {\n\t\t\t\tfor(char c = getColumnLowerBound() ; c <= getColumnUpperBound() ; c+=2) {\n\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, c), PrimaryColor.WHITE).build());\n\t\t\t\t\taddTile(new Tile.Builder(new Location(i, (char) ( c + 1)), PrimaryColor.BLACK).build());\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(LocationException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void generateLevel() {\n\t\tgenerateBorder();\n\t\tfor (int y = 1; y < height - 1; y++) {\n\t\t\tfor (int x = 1; x < height - 1; x++) {\n\t\t\t\tif (random.nextInt(2) == 1) {\n\t\t\t\t\ttiles[x + y * width] = new Tile(Sprite.getGrass(), false, x, y);\n\t\t\t\t\trandForest(x, y);\n\t\t\t\t} else {\n\t\t\t\t\ttiles[x + y * width] = new Tile(Sprite.getDirt(), false, x, y);\n\t\t\t\t\trandOre(x, y);\n\t\t\t\t}\n\t\t\t\tif (x == 4 && y == 4) {\n\t\t\t\t\ttiles[x + y * width] = new Tile(Sprite.getGrass(), false, x, y);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public Tile getTileAt(Position p);", "@Override\n\tprotected void updateTiles() {\n\n\t\tfinal byte tileId = getPlanetType().mainTileId;\n\n\t\tfor (int i = 0; i < tiles.length; i++) {\n\t\t\t// if (random.NextDouble() > 0.95f)\n\t\t\t// tiles[i] = 0;\n\t\t\t// else\n\t\t\ttiles[i] = tileId;\n\t\t}\n\t}", "public void initTiles()\n {\n PropertiesManager props = PropertiesManager.getPropertiesManager(); \n String imgPath = props.getProperty(MahjongSolitairePropertyType.IMG_PATH);\n int spriteTypeID = 0;\n SpriteType sT;\n \n // WE'LL RENDER ALL THE TILES ON TOP OF THE BLANK TILE\n String blankTileFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_IMAGE_NAME);\n BufferedImage blankTileImage = miniGame.loadImageWithColorKey(imgPath + blankTileFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileImage(blankTileImage);\n \n // THIS IS A HIGHLIGHTED BLANK TILE FOR WHEN THE PLAYER SELECTS ONE\n String blankTileSelectedFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_SELECTED_IMAGE_NAME);\n BufferedImage blankTileSelectedImage = miniGame.loadImageWithColorKey(imgPath + blankTileSelectedFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileSelectedImage(blankTileSelectedImage);\n \n // FIRST THE TYPE A TILES, OF WHICH THERE IS ONLY ONE OF EACH\n // THIS IS ANALOGOUS TO THE SEASON TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeATiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_A_TILES);\n for (int i = 0; i < typeATiles.size(); i++)\n {\n String imgFile = imgPath + typeATiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_A_TYPE);\n spriteTypeID++;\n }\n \n // THEN THE TYPE B TILES, WHICH ALSO ONLY HAVE ONE OF EACH\n // THIS IS ANALOGOUS TO THE FLOWER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeBTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_B_TILES);\n for (int i = 0; i < typeBTiles.size(); i++)\n {\n String imgFile = imgPath + typeBTiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_B_TYPE);\n spriteTypeID++;\n }\n \n // AND THEN TYPE C, FOR WHICH THERE ARE 4 OF EACH \n // THIS IS ANALOGOUS TO THE CHARACTER AND NUMBER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeCTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_C_TILES);\n for (int i = 0; i < typeCTiles.size(); i++)\n {\n String imgFile = imgPath + typeCTiles.get(i);\n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID); \n for (int j = 0; j < 4; j++)\n {\n initTile(sT, TILE_C_TYPE);\n }\n spriteTypeID++;\n }\n }", "public TileFloor( int x, int y, int rows, int columns)\r\n {\r\n random = new Random(12345);\r\n ROWS = rows;\r\n COLUMNS= columns;\r\n this.x = x;\r\n this.y = y;\r\n }", "private void drawTiles(Graphics g)\n {\n for (int x = 0; x < 19; x++)\n {\n for (int y = 0; y < 15; y++)\n {\n tileset.getSprite(5, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n switch(board[x][y])\n {\n case 1:\n {\n tileset.getSprite(4, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n break;\n }\n case 2:\n {\n tileset.getSprite(3, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n break;\n }\n case 3:\n {\n if (bombs[x][y].getTimeLeft() > 80)\n {\n bombImage.getSprite(0, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n if (bombs[x][y].getTimeLeft() <= 80 && bombs[x][y].getTimeLeft() > 50)\n {\n bombImage.getSprite(1, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n if (bombs[x][y].getTimeLeft() <= 50 && bombs[x][y].getTimeLeft() > 20)\n {\n bombImage.getSprite(2, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n if (bombs[x][y].getTimeLeft() <= 20)\n {\n bombImage.getSprite(3, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n break;\n }\n //4 is player\n case 5:\n {\n if (fire[x][y] == null)\n {\n tileset.getSprite(2, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n break;\n }\n case 6:\n {\n if (fire[x][y] == null)\n {\n tileset.getSprite(15, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n break;\n }\n }\n }\n }\n }", "@Override\n\tpublic AbstractTileOLD createTile(Frame frame, Point pos, Point sourcePos) {\n\t\t// TileOLD t = new TileOLD(frame, pos.x, pos.y, new ZoneSheet(frame,\n\t\t// ZoneSheet.TILE_SHEET), sourcePos.x, sourcePos.y);\n\t\t// t.setData((TileDataOLD) data[sourcePos.x][sourcePos.y]);\n\t\treturn null;\n\t}", "private void testBoardCreation() {\n for (int r = 0; r < Constants.BOARD_GRID_ROWS; r++) {\n for (int c = 0; c < Constants.BOARD_GRID_COLUMNS; c++) {\n Vector2 tokenLocation = this.mBoardLevel.getCenterOfLocation(r, c);\n Image tokenImage = new Image(this.mResources.getToken(PlayerType.RED));\n tokenImage.setPosition(tokenLocation.x, tokenLocation.y);\n this.mStage.addActor(tokenImage);\n }\n }\n }", "public void generateAntHill(int x, int y, String colour) {\n for (int i = 0; i < 11; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[x*130+y+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[x*130+y+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next change the two rows above and below the centre\n for (int i = 0; i < 10; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+1)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-1)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+1)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-1)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next rows inset by one on the right\n for (int i = 0; i < 9; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+2)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-2)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+2)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-2)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next Row inset by one more on the left none on the right\n for (int i = 0; i < 8; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+3)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-3)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+3)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-3)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next Row inset by one more on the right and none on the left\n for (int i = 0; i < 7; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+4)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-4)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+4)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-4)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next Row inset by one more on the left and none on the right\n for (int i = 0; i < 6; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+5)*130+y+3+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-5)*130+y+3+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+5)*130+y+3+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-5)*130+y+3+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n }", "private void putTilesOnBoard() {\n boolean isWhite = true;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n Tile t = new Tile(isWhite, new Position(x, y));\n t.setOnMouseClicked(e -> {\n if (t.piece != null && this.activeTile == null && this.whitePlayer == t.piece.isWhite()) {\n this.activeTile = t;\n ArrayList<Position> moves = t.piece.getLegalMoves();\n this.highlightAvailableMoves(moves, t.isWhite);\n } else if (t.isHighlighted.getValue() && this.activeTile.piece != null ) {\n movePieces(t);\n } else {\n this.activeTile = null;\n this.clearHighlightedTiles();\n }\n this.updatePieceBoards();\n });\n t.isHighlighted.addListener((o, b, b1) -> {\n if (o.getValue() == true) {\n t.startHighlight();\n } else {\n t.clearHighlight();\n }\n });\n this.board[x][y] = t;\n this.add(this.board[x][y], x, y);\n isWhite = !isWhite;\n }\n isWhite = !isWhite;\n }\n\n }", "private Array<Tile>[] walk() {\n float targetY = currentTile.y + 1;\n Vector2 previousTile = new Vector2(currentTile.x, currentTile.y);\n\n Array<Vector2> tiles = new Array<Vector2>();\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n\n while(currentTile.y < targetY) {\n float rnd = random.nextFloat();\n\n if(rnd > 0.75f) { // up\n Array<Tile> grassRow = new Array<Tile>();\n Array<Tile> treeRow = new Array<Tile>();\n\n for(int x = 1; x <= 5; x++) {\n Vector2 vector = new Vector2(x, currentTile.y);\n\n GrassNEW grass = grassPool.obtain();\n grass.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n grassRow.add(grass);\n\n if(!tiles.contains(vector, false)) {\n if(random.nextFloat() > 0.3) {\n TreeNEW tree = treePool.obtain();\n tree.init(vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n treeRow.add(tree);\n }\n } else {\n if(random.nextFloat() > 0.99) {\n Collectible power = new PowerUpSpikes(world, spikesTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(power);\n } else {\n if(random.nextFloat() > 0.5) {\n Coin coin = new Coin(world, coinTexture, vector.x * GameVars.TILE_SIZE, vector.y * GameVars.TILE_SIZE);\n collectibles.add(coin);\n }\n }\n }\n }\n\n currentTile.add(0, 1);\n\n Array<Tile>[] ret = new Array[2];\n ret[0] = grassRow;\n ret[1] = treeRow;\n\n return ret;\n } else if(rnd > 0.375) { // right\n if(currentTile.x < 5 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n } else { // left\n if(currentTile.x > 1 && Math.abs(previousTile.x - currentTile.x) <= 2) {\n currentTile.add(-1, 0);\n tiles.add(new Vector2(currentTile.x, currentTile.y));\n }\n }\n }\n\n return null; // will never happen\n }", "@Override\n public void placeShips(Fleet fleet, Board board) {\n foundPosition = new boolean[sizeX][sizeY];\n for (int i = fleet.getNumberOfShips() - 1; i >= 0; i--) {\n Ship s = fleet.getShip(i);\n boolean vertical = rnd.nextBoolean();\n Position pos;\n if (vertical) {\n int x = rnd.nextInt(sizeX);\n int y = rnd.nextInt(sizeY - (s.size()));\n\n while (true) {\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x][y + j]) {\n check = true;\n x = rnd.nextInt(sizeX);\n y = rnd.nextInt(sizeY - (s.size()));\n break;\n }\n }\n if (check == false) {\n break;\n }\n /* int counter = 0;\n if (counter > 1) {\n y = rnd.nextInt(sizeY - (s.size()));\n }\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x][y + j]) {\n check = true;\n x++;\n if (x >= sizeX) {\n x = 0;\n }\n }\n }\n if (check == false) {\n break;\n }\n counter++;\n }*/\n }\n for (int j = 0; j < s.size(); j++) {\n foundPosition[x][y + j] = true;\n }\n pos = new Position(x, y);\n } else {\n int x = rnd.nextInt(sizeX - (s.size()));\n int y = rnd.nextInt(sizeY);\n while (true) {\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x + j][y]) {\n check = true;\n x = rnd.nextInt(sizeX - (s.size()));\n y = rnd.nextInt(sizeY);\n }\n }\n if (check == false) {\n break;\n }\n /*int counter = 0;\n if (counter > 1) {\n x = rnd.nextInt(sizeX - (s.size() - 1));\n }\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x + j][y]) {\n check = true;\n y++;\n if (y >= sizeX) {\n y = 0;\n }\n }\n }\n if (check == false) {\n break;\n }\n counter++;\n }*/\n }\n for (int j = 0; j < s.size(); j++) {\n foundPosition[x + j][y] = true;\n }\n pos = new Position(x, y);\n }\n board.placeShip(pos, s, vertical);\n }\n }", "public void SpiritBomb()\r\n {\r\n\r\n\t \r\n\t\tLocation loc = new Location(userRow+1, userCol);\r\n\t\tLocation loc1 = new Location(userRow+1, userCol1);\r\n\t\tLocation loc2 = new Location(userRow+1, userCol2);\r\n\t\tLocation loc3 = new Location(userRow+1, userCol3);\r\n\t\t\r\n\t\tLocation loc4 = new Location(userRow, userCol);\r\n\t\tLocation loc5 = new Location(userRow, userCol1);\r\n\t\tLocation loc6 = new Location(userRow, userCol2);\r\n\t\tLocation loc7 = new Location(userRow, userCol3);\r\n\t\t\r\n\t\tLocation loc8 = new Location(userRow-1, userCol);\r\n\t\tLocation loc9 = new Location(userRow-1, userCol1);\r\n\t\tLocation loc10 = new Location(userRow-1, userCol2);\r\n\t\tLocation loc11 = new Location(userRow-1, userCol3);\r\n\t\t\r\n\t\tLocation loc12 = new Location(userRow-2, userCol);\r\n\t\tLocation loc13= new Location(userRow-2, userCol1);\r\n\t\tLocation loc14 = new Location(userRow-2, userCol2);\r\n\t\tLocation loc15 = new Location(userRow-2, userCol3);\r\n\r\n\t \r\n\r\n\r\n\r\n\t\t\r\n\t\tLocation base1 = new Location(userRow,0);\r\n\t\t\r\n\t\t\tgrid.setImage(base1, \"FSpiritHold.png\");\r\n\t\t\t\r\n\t\tfor(int a = 0; a<9; a++) {\r\n\t\tif(userCol>0 && userCol3 !=15 && userCol2!=15 && userCol1!=15 && userCol!=15 && userRow>0)\r\n\t\t{\r\n\t\r\n\t\t\t Location next101 = new Location(userRow+1,userCol);\r\n\t\t\t Location next102 = new Location(userRow+1,userCol1);\r\n\t\t\t Location next103 = new Location(userRow+1,userCol2);\r\n\t\t\t Location next104 = new Location(userRow+1,userCol3);\r\n\r\n\t\t\t\tLocation next201 = new Location(userRow,userCol);\r\n\t\t\t\tLocation next202 = new Location(userRow,userCol1);\r\n\t\t\t\tLocation next203 = new Location(userRow,userCol2);\r\n\t\t\t\tLocation next204 = new Location(userRow,userCol3);\r\n\t\t\t\t\r\n\t\t\t\tLocation next301 = new Location(userRow-1,userCol);\r\n\t\t\t\tLocation next302 = new Location(userRow-1,userCol1);\r\n\t\t\t\tLocation next303 = new Location(userRow-1,userCol2);\r\n\t\t\t\tLocation next304 = new Location(userRow-1,userCol3);\r\n\t\t\t\t\r\n\t\t\t Location next401 = new Location(userRow-2,userCol);\r\n\t\t\t Location next402 = new Location(userRow-2,userCol1);\r\n\t\t\t Location next403 = new Location(userRow-2,userCol2);\r\n\t\t\t Location next404 = new Location(userRow-2,userCol3);\r\n\t\t\t userCol+=1;\r\n\t\t\t userCol1+=1;\r\n\t\t\t\tuserCol2+=1;\r\n\t\t\t\tuserCol3+=1;\r\n\t\t\t grid.setImage(next101, \"SB401.png\");\r\n\t\t\t grid.setImage(loc1, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next102, \"SB402.png\");\r\n\t\t\t grid.setImage(loc2, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next103, \"SB403.png\");\r\n\t\t\t grid.setImage(loc2, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next104, \"SB404.png\");\r\n\t\t\t grid.setImage(loc3, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next201, \"SB301.png\");\r\n\t\t\t grid.setImage(loc4, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next202, \"SB302.png\");\r\n\t\t\t grid.setImage(loc5, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next203, \"SB303.png\");\r\n\t\t\t grid.setImage(loc6, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next204, \"SB304.png\");\r\n\t\t\t grid.setImage(loc7, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next301, \"SB201.png\");\r\n\t\t\t grid.setImage(loc8, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next302, \"SB202.png\");\r\n\t\t\t grid.setImage(loc9, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next303, \"SB203.png\");\r\n\t\t\t grid.setImage(loc10, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next304, \"SB204.png\");\r\n\t\t\t grid.setImage(loc11, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\tgrid.setImage(next401, \"SB101.png\");\r\n\t\t\t grid.setImage(loc12, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next402, \"SB102.png\");\r\n\t\t\t grid.setImage(loc13, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next403, \"SB103.png\");\r\n\t\t\t grid.setImage(loc14, null);\r\n\r\n\t\t\t \r\n\t\t\t\tgrid.setImage(next404, \"SB104.png\");\r\n\t\t\t grid.setImage(loc15, null);\r\n\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t \r\n\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n }\r\n }", "public Row(Context context, boolean black, int x, int y, int tileWidth, int tileHeight, int index) {\n this.blackFirst = black;\n this.context = context;\n this.index = index;\n this.x = x;\n this.y = y;\n dy = GamePanel.gameSpeed;\n\n\n// BLACK_BITMAP_TILE = BitmapFactory.decodeResource(context.getResources(), R.drawable.black);\n// WHITE_BITMAP_TILE = BitmapFactory.decodeResource(context.getResources(), R.drawable.white);\n\n tiles = new ArrayList<>();\n if (blackFirst) {\n// for(int i = 0; i < ChessBoard.COLUMN_NUM; i ++){\n// Tile tile;\n// if((i % 2) == 0) {\n// tile = new Tile(BLACK_BITMAP_TILE, x + i * tileWidth, y, tileWidth, tileHeight, true );\n// } else {\n// tile = new Tile(WHITE_BITMAP_TILE, x + i * tileWidth, y, tileWidth, tileHeight, false );\n// }\n// tiles.add(i, tile);\n// }\n for (int i = 0; i < GamePanel.COLUMN_NUM; i++) {\n Tile tile;\n if ((i % 2) == 0) {\n tile = new Tile(x + i * tileWidth, y, tileWidth, tileHeight, true, i, index);\n } else {\n tile = new Tile(x + i * tileWidth, y, tileWidth, tileHeight, false, i, index);\n }\n tiles.add(i, tile);\n }\n } else {\n// for(int i = 0; i < ChessBoard.COLUMN_NUM; i ++){\n// Tile tile;\n// if((i % 2) == 0) {\n// tile = new Tile(WHITE_BITMAP_TILE, x + i * tileWidth, y, tileWidth, tileHeight, false );\n// } else {\n// tile = new Tile(BLACK_BITMAP_TILE, x + i * tileWidth, y, tileWidth, tileHeight, true );\n// }\n// tiles.add(i, tile);\n// }\n\n for (int i = 0; i < GamePanel.COLUMN_NUM; i++) {\n Tile tile;\n if ((i % 2) == 0) {\n tile = new Tile(x + i * tileWidth, y, tileWidth, tileHeight, false, i, index);\n } else {\n tile = new Tile(x + i * tileWidth, y, tileWidth, tileHeight, true, i, index);\n }\n tiles.add(i, tile);\n }\n }\n\n\n }", "public Tile(GameLogic logic, PieceService pieceservice, int x, int y) {\n\n this.x = x;\n this.y = y;\n this.pieces = new ArrayList<>();\n\n setWidth(TakApp.TILE_SIZE);\n setHeight(TakApp.TILE_SIZE);\n \n relocate(x * TakApp.TILE_SIZE, y * TakApp.TILE_SIZE);\n Image tilebg = new Image(getClass().getResourceAsStream(\"/images/tile.jpg\"));\n ImagePattern imagePattern = new ImagePattern(tilebg);\n setFill(imagePattern);\n \n if (this.hasPieces() == false) {\n setOnMousePressed(e -> {\n String pieceColor = logic.checkTurn();\n Piece piece = pieceservice.makePiece(logic, pieceColor, x, y);\n if (piece != null) {\n pieceservice.setPiece(piece, x, y);\n this.pieces.add(piece);\n }\n });\n } else if (this.hasPieces() == true) {\n \n setOnMousePressed(e -> {\n this.oldX = this.getXcoordinate();\n this.oldY = this.getYcoordinate();\n });\n\n setOnMouseDragged(e -> {\n relocate(e.getSceneX(), e.getSceneY());\n });\n \n setOnMouseReleased(e -> {\n \n double mouseX = e.getSceneX();\n double mouseY = e.getSceneY();\n\n int newX = (int) Math.floor(mouseX / 100.0);\n int newY = (int) Math.floor(mouseY / 100.0);\n \n boolean validMove = logic.isValidMove(oldX, oldY, newX, newY);\n \n if (validMove) {\n pieceservice.removePiece(this.pieces.get(this.pieces.size() - 1), oldX, oldY);\n pieceservice.setPiece(this.pieces.get(this.pieces.size() - 1), newX, newY);\n } else {\n pieceservice.setPiece(this.pieces.get(this.pieces.size() - 1), oldX, oldY);\n }\n });\n } \n }", "public Tile createTile(int i, int x, int y) {\n\t\tif (Constants.INTERACTIVE_TILES.contains(\" \" + i + \" \")) {\n\t\t\treturn new InteractiveTile(i, x, y);\n\t\t} else if (Constants.ITEM_IDS.contains(\" \" + i + \" \")\n\t\t\t\t|| Constants.IOBJECTS_IDS.contains(\" \" + i + \" \")\n\t\t\t\t|| Constants.CREATURE_IDS.contains(\" \" + i + \" \")) {\n\t\t\treturn new Tile(0, x, y);\n\t\t} else {\n\n\t\t\treturn new Tile(i, x, y);\n\t\t}\n\t}", "public static StackPane createBoard() {\n StackPane stackPane = new StackPane();\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n Tile tile = new Tile();\n Coordinates coordinates = new Coordinates(i, j);\n tile.setTextValue(\"\");\n tile.setTranslateX(i * 50);\n tile.setTranslateY(j * 50);\n tile.setEditable(true);\n tile.setTileId(coordinates);\n stackPane.getChildren().add(tile);\n tiles.put(coordinates, tile);\n }\n }\n return stackPane;\n }", "public Board()\n {\n ArrayList<String[]> dies = new ArrayList<String[]>();\n dies.add(Die0);\n dies.add(Die1);\n dies.add(Die2);\n dies.add(Die3);\n dies.add(Die4);\n dies.add(Die5);\n dies.add(Die6);\n dies.add(Die7);\n dies.add(Die8);\n dies.add(Die9);\n dies.add(Die10);\n dies.add(Die11);\n dies.add(Die12);\n dies.add(Die13);\n dies.add(Die14);\n dies.add(Die15);\n \n \n \n Random rand = new Random();\n int a = rand.nextInt(16);\n int b = rand.nextInt(15);\n int c = rand.nextInt(14);\n int d = rand.nextInt(13);\n int e = rand.nextInt(12);\n int f = rand.nextInt(11);\n int g = rand.nextInt(10);\n int h = rand.nextInt(9);\n int i = rand.nextInt(8);\n int j = rand.nextInt(7);\n int k = rand.nextInt(6);\n int l = rand.nextInt(5);\n int m = rand.nextInt(4);\n int n = rand.nextInt(3);\n int o = rand.nextInt(2);\n int p = rand.nextInt(1);\n row0.add(new Tile(dies.get(a)[rand.nextInt(6)].charAt(0),0,0));\n dies.remove(a);\n row0.add(new Tile(dies.get(b)[rand.nextInt(6)].charAt(0),0,1));\n dies.remove(b);\n row0.add(new Tile(dies.get(c)[rand.nextInt(6)].charAt(0),0,2));\n dies.remove(c);\n row0.add(new Tile(dies.get(d)[rand.nextInt(6)].charAt(0),0,3));\n dies.remove(d);\n row1.add(new Tile(dies.get(e)[rand.nextInt(6)].charAt(0),1,0));\n dies.remove(e);\n row1.add(new Tile(dies.get(f)[rand.nextInt(6)].charAt(0),1,1));\n dies.remove(f);\n row1.add(new Tile(dies.get(g)[rand.nextInt(6)].charAt(0),1,2));\n dies.remove(g);\n row1.add(new Tile(dies.get(h)[rand.nextInt(6)].charAt(0),1,3));\n dies.remove(h);\n row2.add(new Tile(dies.get(i)[rand.nextInt(6)].charAt(0),2,0));\n dies.remove(i);\n row2.add(new Tile(dies.get(j)[rand.nextInt(6)].charAt(0),2,1));\n dies.remove(j);\n row2.add(new Tile(dies.get(k)[rand.nextInt(6)].charAt(0),2,2));\n dies.remove(k);\n row2.add(new Tile(dies.get(l)[rand.nextInt(6)].charAt(0),2,3));\n dies.remove(l);\n row3.add(new Tile(dies.get(m)[rand.nextInt(6)].charAt(0),3,0));\n dies.remove(m);\n row3.add(new Tile(dies.get(n)[rand.nextInt(6)].charAt(0),3,1));\n dies.remove(n);\n row3.add(new Tile(dies.get(o)[rand.nextInt(6)].charAt(0),3,2));\n dies.remove(o);\n row3.add(new Tile(dies.get(p)[rand.nextInt(6)].charAt(0),3,3));\n dies.remove(p);\n tiles.add(row0);\n tiles.add(row1);\n tiles.add(row2);\n tiles.add(row3);\n \n }", "private Board create4by4Board() {\n Tile[][] tiles;\n Tile t1 = new Tile(0, 4);\n Tile t2 = new Tile(1, 4);\n Tile t3 = new Tile(2, 4);\n Tile t4 = new Tile(3, 4);\n Tile t5 = new Tile(4, 4);\n Tile t6 = new Tile(5, 4);\n Tile t7 = new Tile(6, 4);\n Tile t8 = new Tile(7, 4);\n Tile t9 = new Tile(8, 4);\n Tile t10 = new Tile(9, 4);\n Tile t11 = new Tile(10, 4);\n Tile t12 = new Tile(11, 4);\n Tile t13 = new Tile(12, 4);\n Tile t14 = new Tile(13, 4);\n Tile t15 = new Tile(14, 4);\n Tile t16 = new Tile(15, 4);\n tiles = new Tile[4][4];\n tiles[0][0] = t5;\n tiles[0][1] = t16;\n tiles[0][2] = t1;\n tiles[0][3] = t3;\n tiles[1][0] = t13;\n tiles[1][1] = t15;\n tiles[1][2] = t9;\n tiles[1][3] = t12;\n tiles[2][0] = t2;\n tiles[2][1] = t6;\n tiles[2][2] = t7;\n tiles[2][3] = t14;\n tiles[3][0] = t10;\n tiles[3][1] = t4;\n tiles[3][2] = t8;\n tiles[3][3] = t11;\n return new Board(tiles);\n }", "public TileFloor(int x, int y)\r\n {\r\n random = new Random(12345);\r\n ROWS = DEFAULT_ROWS;\r\n COLUMNS= DEFAULT_COLUMNS;\r\n this.x = x;\r\n this.y = y;\r\n }", "private void layTiles() {\n board = new Tile[height][width];\n for (int i = 0; i < height; i++) {\n for (int j = 0; j < width; j++) {\n layTile(new Tile(i, j));\n }\n }\n }", "public Tile[] generateTiles() {\n return null;\n }", "public static void render(Graphics g, Tile tile, Point pxCenterPoint, float value) {\n Point topLeft = new Point(pxCenterPoint.x - (tile.getImage().getWidth() / 2), pxCenterPoint.y - (tile.getImage().getHeight() / 2));\n if (value >= 0) {\n\n\n if (tile.getType() == \"Mountain\") {\n\n g.drawImage(GraphicAssets.col, topLeft.x, topLeft.y + 19 + 21, 60, tile.getImageHeight() / 2, null);\n g.drawImage(GraphicAssets.base, topLeft.x, topLeft.y + 19 + 19 + tile.getImageHeight() / 2, 60, 19, null);\n g.drawImage(tile.getImage(), topLeft.x, topLeft.y, tile.getImage().getWidth(), tile.getImage().getHeight(), null);\n\n } else if (tile.getType() == \"Water\" || tile.getType() == \"Grass\" || tile.getType() == \"Running\") {\n //\n //System.out.println(topLeft.y);\n g.drawImage(GraphicAssets.col, topLeft.x, topLeft.y + 10 + 19, 60, tile.getImageHeight() / 2, null);\n g.drawImage(GraphicAssets.base, topLeft.x, topLeft.y + 10 + 19 + tile.getImageHeight() / 2, 60, 19, null);\n g.drawImage(tile.getImage(), topLeft.x, topLeft.y + 10, tile.getImage().getWidth(), tile.getImage().getHeight(), null);\n } else {\n g.drawImage(GraphicAssets.col, topLeft.x, topLeft.y + 10 + 19, 60, tile.getImageHeight() / 2, null);\n g.drawImage(GraphicAssets.base, topLeft.x, topLeft.y + 10 + 19 + tile.getImageHeight() / 2, 60, 19, null);\n g.drawImage(tile.getImage(), topLeft.x, topLeft.y + 10, tile.getImage().getWidth(), tile.getImage().getHeight(), null);\n }\n if (tile.hasAreaEffect()) {\n areaEffectRenderer.render(g, tile.getAreaEffect(), topLeft);\n }\n\n if (tile.hasItem()) {\n for (Item item : tile.getItems()) {\n itemRenderer.render(g, item, topLeft);\n }\n }\n }\n }", "private void generate() {\n preGenerate();\n\n SpriteGrid grid = new SpriteGrid(specState);\n IOHelper.pixelsToBitmap(grid.draw(), sprite);\n\n }", "public void Makeboard() {\r\n\r\n Normalboard(new Point2(20, 300));\r\n Normalboard(new Point2(224, 391));\r\n Stingboard(new Point2(156, 209));\r\n Leftlboard(new Point2(88, 482));\r\n Rightboard(new Point2(292, 573));\r\n Regenerateboard(new Point2(360, 118));\r\n\r\n }", "public void addTileOnBeginning(Tile tile);", "public void drawTile(Tile t, int x, int y, int cellSize, PGraphics pdf)\n {\n for(int i = 0; i < t.getW(); i++)\n {\n for(int j = 0; j < t.getH(); j++)\n {\n if(t.getPattern()[i][j])\n pdf.rect(x+i*cellSize, y+j*cellSize, cellSize*1.1f, cellSize*1.1f);\n }\n }\n }", "public void fillTheBoard() {\n for (int i = MIN; i <= MAX; i++) {\n for (int j = MIN; j <= MAX; j++) {\n this.getCells()[i][j] = new Tile(i, j, false);\n }\n }\n }", "static public Boolean slideTile(int row, int col, FloorTile newTile) {\r\n FloorTile oldTile1 = newTile;\r\n FloorTile oldTile2;\r\n boolean isNotFixed = true;\r\n if(row == 0 || row == board.length-1){//determine that the columns will be changed\r\n for (int i = 0; i < board.length; i++) {//check if there are any fixed or frozen tiles in the col\r\n if(board[i][col].isFixedTile() || board[i][col].isFrozen){\r\n isNotFixed = false;\r\n }\r\n }\r\n //move the tiles\r\n if(row == 0 && isNotFixed) {\r\n\r\n for(int i = 0; i < board.length; i++) {\r\n oldTile2 = board[i][col];\r\n board[i][col] = oldTile1;\r\n oldTile1 = oldTile2;\r\n }\r\n }else if(isNotFixed) {\r\n\r\n for(int i = board.length-1; i >= 0; i--) {\r\n oldTile2 = board[i][col];\r\n board[i][col] = oldTile1;\r\n oldTile1 = oldTile2;\r\n }\r\n }else {\r\n return false;\r\n }\r\n }else {//determine that the rows will be changed\r\n\r\n for (int i = 0; i < board[row].length; i++) {\r\n if(board[row][i].isFixedTile() || board[i][col].isFrozen){\r\n isNotFixed = false;\r\n }\r\n }\r\n\r\n if(col == 0 && isNotFixed) {\r\n for(int i = 0; i < board[row].length; i++) {\r\n oldTile2 = board[row][i];\r\n board[row][i] = oldTile1;\r\n oldTile1 = oldTile2;\r\n }\r\n\r\n }else if(isNotFixed) {\r\n for(int i = board[row].length-1; i >= 0; i--) {\r\n oldTile2 = board[row][i];\r\n board[row][i] = oldTile1;\r\n oldTile1 = oldTile2;\r\n }\r\n }else {\r\n return false;\r\n }\r\n\r\n }\r\n //if a player was standing on that tile it will be relocated to a new tile\r\n for(int i = 0; i < numOfPlayers; i++) {\r\n if(oldTile1 == players[i].getPosition()) {\r\n players[i].updateGetBackTiles(players[i].getPosition());\r\n players[i].setPosition(newTile);\r\n }\r\n }\r\n oldTile1.isFrozen = false;\r\n oldTile1.isOnFire = false;\r\n oldTile1.isFrozenForTheNextNTurns = 0;\r\n oldTile1.isOnFireForTheNextNTurns = 0;\r\n silkBag.add(oldTile1);\r\n return true;\r\n }", "public void fillWithIslandTiles() {\n\t\tthis.addCard(new IslandTile(\"Breakers Bridge\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Bronze Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Cliffs of Abandon\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Cave of Embers\", CardType.TILE, TreasureType.CRYSTAL_OF_FIRE));\n\t\tthis.addCard(new IslandTile(\"Crimson Forest\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Copper Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Coral Palace\", CardType.TILE, TreasureType.OCEAN_CHALICE));\n\t\tthis.addCard(new IslandTile(\"Cave of Shadows\", CardType.TILE, TreasureType.CRYSTAL_OF_FIRE));\n\t\tthis.addCard(new IslandTile(\"Dunes of Deception\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Fool's Landing\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Gold Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Howling Garden\", CardType.TILE, TreasureType.STATUE_OF_WIND));\n\t\tthis.addCard(new IslandTile(\"Iron Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Lost Lagoon\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Misty Marsh\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Observatory\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Phantom Rock\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Silver Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Temple of the Moon\", CardType.TILE, TreasureType.EARTH_STONE));\n\t\tthis.addCard(new IslandTile(\"Tidal Palace\", CardType.TILE, TreasureType.OCEAN_CHALICE));\n\t\tthis.addCard(new IslandTile(\"Temple of the Sun\", CardType.TILE, TreasureType.EARTH_STONE));\n\t\tthis.addCard(new IslandTile(\"Twilight Hollow\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Whispering Garden\", CardType.TILE, TreasureType.STATUE_OF_WIND));\n\t\tthis.addCard(new IslandTile(\"Watchtower\", CardType.TILE, TreasureType.NONE));\n\t}", "public void addRandomTile()\n {\n int count = 0;\n //runs through row first, column second\n for ( int i=0; i < this.grid.length; i++) {\n for ( int j=0; j < this.grid[i].length; j++) {\n // checks to see if the value at the point in the grid is zero\n if ( this.grid[i][j] == 0 ) {\n //increases count to check how many of your tiles equal zero\n count++;\n }\n }\n } \n if ( count == 0 ) {\n // exits method if count is zero because there is nowhere to add a tile\n return;\n }\n int location = random.nextInt(count);\n int percent = 100;\n int value = random.nextInt(percent);\n int mostLikely = 2;\n int lessLikely = 4;\n count = -1;\n // runs through row first, column second\n for ( int i=0; i< this.grid.length; i++ ) {\n for ( int j=0; j< this.grid[i].length; j++ ) {\n if ( this.grid[i][j] == 0 ) {\n count++;\n // checks to see if your value for count is the same as the random\n // integer location\n if ( count == location ) {\n // 90% of the time, the random tile placed will be a two\n if ( value < TWO_PROBABILITY && value >=0 ) {\n this.grid[i][j] = mostLikely;\n }\n else {\n this.grid[i][j] = lessLikely;\n }\n }\n } \n }\n } \n }", "@Override\n public void drawTile(GraphicsContext gc, double dx, double dy) {\n gc.drawImage(tile, dx, dy, 64, 64);\n }", "public Tile(int row, int column){\n this.row = row;\n this.column = column;\n this.piece = null;\n }", "void makePlacement(String placement) {\n\n // Task8 Do not clear the textField in order to place pieces step by step.\n // board.getChildren().clear();\n if (!StepsGame.isPlacementWellFormed(placement)) {\n throw new IllegalArgumentException(\"Hide board incorrect length: \" + placement);\n }\n Rectangle r = new Rectangle(BOARD_X, BOARD_Y, XSIDE*SQUARE_SIZE, YSIDE*SQUARE_SIZE);\n r.setFill(SUBBOARD_FILL);\n r.setStroke(SUBBOARD_STROKE);\n board.getChildren().add(r);\n String alphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYabcdefghijklmnopqrstuvwxy\";\n for (int i = 0; i<50; i++){\n double x = 1.0/3;\n Text t = new Text(BOARD_X + SQUARE_SIZE/3 + (i %XSIDE) * SQUARE_SIZE - 5, BOARD_Y + 2*SQUARE_SIZE/3 +(i / XSIDE) * SQUARE_SIZE + 10, alphabet.substring(i, i+1));\n t.setFont(new Font(20));\n t.setFill(Color.GREY);\n board.getChildren().add(t);\n }\n // Making board and adding the letters.\n\n\n String[] onepiece = placement.split(\"(?<=\\\\G...)\");\n String[] shape = new String[onepiece.length];\n String[] location = new String[onepiece.length];\n char[] loc = new char[onepiece.length];\n int[] lct = new int[onepiece.length];\n for (int i = 0; i<onepiece.length; i++){\n shape[i] = onepiece[i].substring(0, 2);\n location[i] = onepiece[i].substring(2, 3);\n loc[i] = location[i].charAt(0);\n if(loc[i] >= 'A' && loc[i] <= 'Y'){\n lct[i] = (int)loc[i] - 65;\n }else if(loc[i] >= 'a' && loc[i] <= 'y'){\n lct[i] = (int)loc[i] - 72;\n }\n //Split String into 3 letters and NUMBER the positions A-y into 0-49.\n\n\n String tile = shape[i];\n if (tile != \"\")\n board.getChildren().add(new Square(tile, lct[i]-11));\n }\n // Adding shapes\n board.toBack();\n\n // FIXME Task 4: implement the simple placement viewer\n }", "private void makeMaze() {\n\t\ttry {\n\t\t\tthis.end = ImageIO.read(new File(\"images/tiles/end_locked.png\"));\n\t\t\tint w = getWidth()/gui.getModel().getDifficulty();\n\t\t\tint h = getHeight()/gui.getModel().getDifficulty();\n\t\t\tint difficulty = gui.getModel().getDifficulty();\n\t\t\tmazeImage = new BufferedImage(difficulty*(getWidth()/difficulty), difficulty*(getHeight()/difficulty), BufferedImage.TYPE_INT_RGB);\n\t\t\tGraphics2D g = mazeImage.createGraphics();\n\t\t\tString tile = \"\";\n\t\t\tfor (BaseState s: gui.getModel().getMaze()) {\n\t\t\t\tint x = s.getX(); int y = s.getY();\n\t\t\t\t\n\t\t\t\t// check walls\n\t\t\t\tint numSides = 0;\n\t\t\t\tboolean rightWall = false;\n\t\t\t\tboolean leftWall = false;\n\t\t\t\tboolean topWall = false;\n\t\t\t\tboolean bottomWall = false;\n\t\t\t\tif (s.getRight() == null) rightWall = true;\n\t\t\t\tif (s.getLeft() == null) leftWall = true;\n\t\t\t\tif (s.getUp() == null) topWall = true;\n\t\t\t\tif (s.getDown() == null) bottomWall = true;\n\t\t\t\tif (topWall) numSides++;\n\t\t\t\tif (leftWall) numSides++;\n\t\t\t\tif (bottomWall) numSides++;\n\t\t\t\tif (rightWall) numSides++;\n\t\t\t\t\n\t\t\t\t// find tile type\n\t\t\t\tif (numSides == 3) { // dead end\n\t\t\t\t\tif (!rightWall) tile = \"images/tiles/deadend_left.bmp\";\n\t\t\t\t\telse if (!leftWall) tile = \"images/tiles/deadend_right.bmp\";\n\t\t\t\t\telse if (!topWall) tile = \"images/tiles/deadend_bottom.bmp\";\n\t\t\t\t\telse if (!bottomWall) tile = \"images/tiles/deadend_top.bmp\";\n\t\t\t\t} else if (numSides == 2) { // corner or hall\n\t\t\t\t\t//hall\n\t\t\t\t\tif (rightWall && leftWall) tile = \"images/tiles/hall_vertical.bmp\";\n\t\t\t\t\telse if (topWall && bottomWall) tile = \"images/tiles/hall_horizontal.bmp\";\n\t\t\t\t\t//corner\n\t\t\t\t\telse if (topWall && leftWall) tile = \"images/tiles/corner_top_left.bmp\";\n\t\t\t\t\telse if (topWall && rightWall) tile = \"images/tiles/corner_top_right.bmp\";\n\t\t\t\t\telse if (bottomWall && leftWall) tile = \"images/tiles/corner_bottom_left.bmp\";\n\t\t\t\t\telse if (bottomWall && rightWall) tile = \"images/tiles/corner_bottom_right.bmp\";\n\t\t\t\t} else if (numSides == 1) { // single side\n\t\t\t\t\tif (leftWall) tile = \"images/tiles/wall_left.bmp\";\n\t\t\t\t\telse if (rightWall) tile = \"images/tiles/wall_right.bmp\";\n\t\t\t\t\telse if (topWall) tile = \"images/tiles/wall_top.bmp\";\n\t\t\t\t\telse if (bottomWall) tile = \"images/tiles/wall_bottom.bmp\";\n\t\t\t\t} else { // open\n\t\t\t\t\ttile = \"images/tiles/open.bmp\";\n\t\t\t\t}\n\t\t\t\t// draw tile\n\t\t\t\tg.drawImage(ImageIO.read(new File(tile)), x*w, y*h, w, h, null);\n\t\t\t\t\n\t\t\t\t// check for ending and draw if need be\n\t\t\t\tif (s.getX() == gui.getModel().getDifficulty() - 1 && s.getY() == gui.getModel().getDifficulty() - 1) {\n\t\t\t\t\tg.drawImage(ImageIO.read(new File(\"images/tiles/end_unlocked.png\")), x*w, y*h, w, h, null);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch(IOException e) {System.err.println(\"Images not found.\");}\n\t}", "public Tile (int pos, int type) { \r\n\t\tthis.tilePos = pos;\r\n\t\tthis.tileType = type;\r\n\t}", "void buildBlock(Tile t);", "public void generateOneTileByMap(GridPane grid, int row, int col) {\n\n\t\tHBox tileField = new HBox();\n\t\ttileField.setAlignment(Pos.CENTER);\n\t\tgrid.add(tileField, row, col);\n\n\t\tImageView tilePane = new ImageView();\n\t\ttileField.getChildren().add(tilePane);\n\t\tgenerateImage(col, row);\n\t\ttilePane.setImage(getTileImage());\n\t}", "public Tile[] generate() {\n Tile[] tiles = generateTiles();\n calculatePathfindingGrid(tiles);\n return tiles;\n }", "public void randomize() {\r\n\t\tRandom random = new Random();// random generator used to get random int\r\n\t\tint r;// will hold the random int\r\n\t\tint num;// will hold the filtered random int that determines with entity to use for a tile\r\n\t\tfor (int i = 0; i < WIDTH_TILES; i++) {// loops x-coords\r\n\t\t\tfor (int j = 0; j < HEIGHT_TILES; j++) {// loops y-coords\r\n\t\t\t\tr = random.nextInt(32);// gets random int from 0 to 32\r\n\t\t\t\tif (r < 4) num = 0; else if (r < 8) num = 1; else if (r < 31) num = 2; else num = 3;// distributes different objects\r\n\t\t\t\tif (nodes[i * WIDTH_TILES + j].isOccupied() == false) {// if tile empty or random chosen\r\n\t\t\t\t\tnodes[i * WIDTH_TILES + j] = new Node(new Point(i * BOARD_WIDTH / WIDTH_TILES, j * BOARD_WIDTH / HEIGHT_TILES), new ImageIcon(icons[num]).getImage(), true, occupants[num]);// creates random tile\r\n\t\t\t\t}// if (random)\r\n\t\t\t}// for (j)\r\n\t\t}// for (i)\r\n\t}", "public void setAdjacent()\r\n {\n \t\r\n adjacentTiles = new Tile[6];\r\n \r\n \r\n //Driver.map[VERT][HOR]\r\n \r\n if(verticalPos < Driver.map.length && horizontalPos > 1) //topleft\r\n {\r\n \ttopLeft = Driver.map[verticalPos + 1][horizontalPos - 1];\r\n }\r\n else\r\n {\r\n \ttopLeft = null;\r\n }\r\n \r\n if(verticalPos < Driver.map.length - 2) //top\r\n {\r\n \ttop = Driver.map[verticalPos + 2][horizontalPos];\r\n }\r\n else\r\n {\r\n \ttop = null;\r\n }\r\n \r\n if(verticalPos < Driver.map.length && horizontalPos < Driver.map[0].length) //topright\r\n {\r\n \ttopRight = Driver.map[verticalPos + 1][horizontalPos + 1];\r\n }\r\n else\r\n {\r\n \ttopRight = null;\r\n }\r\n \r\n if(verticalPos > 1 && horizontalPos < Driver.map[0].length) //bottomright\r\n {\r\n \tbottomRight = Driver.map[verticalPos - 1][horizontalPos + 1];\r\n }\r\n else\r\n {\r\n \tbottomRight = null;\r\n }\r\n \r\n if(verticalPos > 2) //bottom\r\n {\r\n \tbottom = Driver.map[verticalPos - 2][horizontalPos];\r\n }\r\n else\r\n {\r\n \tbottom = null;\r\n }\r\n \r\n if(verticalPos > 1 && horizontalPos > 1) //botttomLeft\r\n {\r\n \tbottomLeft = Driver.map[verticalPos - 1][horizontalPos - 1];\r\n }\r\n else\r\n {\r\n \tbottomLeft = null;\r\n }\r\n \t\r\n \r\n adjacentTiles[0] = topLeft;\r\n adjacentTiles[1] = top;\r\n adjacentTiles[2] = topRight;\r\n adjacentTiles[3] = bottomRight;\r\n adjacentTiles[4] = bottom;\r\n adjacentTiles[5] = bottomLeft;\r\n \r\n \r\n// System.out.print(\"main tile \" + getHor() + \", \" + getVert() + \" \");\r\n// for(int i = 0; i < adjacentTiles.length; i++)\r\n// {\r\n// \tif( adjacentTiles[i] != null)\r\n// \t\tSystem.out.print(adjacentTiles[i].getHor() + \", \" + adjacentTiles[i].getVert() + \" | \");\r\n// \telse\r\n// \t\tSystem.out.print(\"null \");\r\n// }\r\n// System.out.println();\r\n \r\n }", "private void drawTile(int i, int j, Tile tile) {\n\t\tRectangle rect = new Rectangle(175*i+50,j*175+25,175, 175);\r\n\t\ttilesDrawn.add(rect);\r\n\t}", "@Test\n public void testGetTile() {\n assertEquals(7, board3by3.getTile(0, 0).getId());\n }", "private void createTileViews() {\n\t\tfor (short row = 0; row < gridSize; row++) {\n\t\t\tfor (short column = 0; column < gridSize; column++) {\n\t\t\t\tTileView tv = new TileView(context, row, column);\n\t\t\t\ttileViews.add(tv);\n\t\t\t\ttableRow.get(row).addView(tv);\n\t\t\t} // end column\n\t\t\tparentLayout.addView(tableRow.get(row));\n\t\t} // end row\n\n\t}", "@SuppressWarnings(\"unused\")\n\tpublic static void main(String[] args) {\n\t\tField field = new Field(0,6);\n\t\tArrayList<TileOnPositionEX> move = new ArrayList<TileOnPositionEX>();\n\t\t\n\t\t// Colors\n\t\tint blue \t= 1;\n\t\tint green \t= 5;\n\t\tint purple \t= 4;\n\t\tint orange \t= 3;\n\t\tint red \t= 0;\n\t\tint yellow \t= 2;\n\t\t// Shapes\n\t\tint circle\t= 0;\n\t\tint club \t= 11;\n\t\tint diamond\t= 3;\n\t\tint square\t= 1;\n\t\tint star\t= 7;\n\t\tint sun\t\t= 4;\n\t\t\n\t\t/* TEST CASE\tTILEONPOSITION(X,Y,TILE)\tTILE(COLOR,SHAPE,UNIQUEID) */\n\t\t// CAUTION: EVERY TILEONPOSITION WITH THE SAME TILE HAS CURRENTLY THE SAME UNIQUEID!\n\t\t\n\t\t// BLUE\n\t\tTile blueCircle\t\t= new Tile(blue,circle,0);\n\t\tTile blueClub\t\t= new Tile(blue,club,1);\n\t\tTile blueDiamond\t= new Tile(blue,diamond,2);\n\t\tTile blueSquare\t\t= new Tile(blue,square,3);\n\t\tTile blueStar\t\t= new Tile(blue,star,4);\n\t\tTile blueSun\t\t= new Tile(blue,sun,5);\n\t\t// GREEN\n\t\tTile greenCircle\t= new Tile(green,circle,6);\n\t\tTile greenClub\t\t= new Tile(green,club,7);\n\t\tTile greenDiamond\t= new Tile(green,diamond,8);\n\t\tTile greenSquare\t= new Tile(green,square,9);\n\t\tTile greenStar\t\t= new Tile(green,star,10);\n\t\tTile greenSun\t\t= new Tile(green,sun,11);\n\t\t// PURPLE\n\t\tTile purpleCircle\t= new Tile(purple,circle,12);\n\t\tTile purpleClub\t\t= new Tile(purple,club,13);\n\t\tTile purpleDiamond\t= new Tile(purple,diamond,14);\n\t\tTile purpleSquare\t= new Tile(purple,square,15);\n\t\tTile purpleStar\t\t= new Tile(purple,star,16);\n\t\tTile purpleSun\t\t= new Tile(purple,sun,17);\n\t\t// ORANGE\n\t\tTile orangeCircle\t= new Tile(orange,circle,18);\n\t\tTile orangeClub\t\t= new Tile(orange,club,19);\n\t\tTile orangeDiamond\t= new Tile(orange,diamond,20);\n\t\tTile orangeSquare\t= new Tile(orange,square,21);\n\t\tTile orangeStar\t\t= new Tile(orange,star,22);\n\t\tTile orangeSun\t\t= new Tile(orange,sun,23);\n\t\t// RED\n\t\tTile redCircle\t\t= new Tile(red,circle,24);\n\t\tTile redClub\t\t= new Tile(red,club,25);\n\t\tTile redDiamond\t\t= new Tile(red,diamond,26);\n\t\tTile redSquare\t\t= new Tile(red,square,27);\n\t\tTile redStar\t\t= new Tile(red,star,28);\n\t\tTile redSun\t\t\t= new Tile(red,sun,29);\n\t\t// YELLOW\n\t\tTile yellowCircle\t= new Tile(yellow,circle,30);\n\t\tTile yellowClub\t\t= new Tile(yellow,club,31);\n\t\tTile yellowDiamond\t= new Tile(yellow,diamond,32);\n\t\tTile yellowSquare\t= new Tile(yellow,square,33);\n\t\tTile yellowStar\t\t= new Tile(yellow,star,34);\n\t\tTile yellowSun\t\t= new Tile(yellow,sun,35);\n\t\t\n\t\tmove.add(new TileOnPositionEX(0,1,redCircle));\n\t\tmove.add(new TileOnPositionEX(0,0,blueCircle));\n\t\t\n\t\tfield.processMove(move, ControlParameters.Server);\n\t\tArrayList<TileOnPositionEX> tilesOnField = field.getTilesOnBoard();\n\t\tmove.clear();\n\t\t\n\t\tmove.add(new TileOnPositionEX(2,1,redClub));\n\t\tmove.add(new TileOnPositionEX(4,1, redStar));\n\t\tmove.add(new TileOnPositionEX(3,1, redDiamond));\n\t\tmove.add(new TileOnPositionEX(1,1, redSun));\n\t\tmove.add(new TileOnPositionEX(5,1, redSquare));\n\t\tfield.processMove(move, ControlParameters.Server);\n\t\ttilesOnField = field.getTilesOnBoard();\n\t\tmove.clear();\n\n\t\t\n\t\tSystem.out.println(\"\\nAMOUNT OF TILES ON FIELD: \" + tilesOnField.size() + \"\\n\");\n\t\tfor (TileOnPositionEX tile : tilesOnField) {\n\t\t\tSystem.out.println(\"The tile: \" + tile);\n\t\t\tif(tile.getNeighbor(Neighbor.Top)!=null) {System.out.println(\"TOP: \" + tile.getNeighbor(Neighbor.Top));}else {System.out.println(\"TOP: NULL\");}\n\t\t\tif(tile.getNeighbor(Neighbor.Right)!=null) {System.out.println(\"RIGHT: \" + tile.getNeighbor(Neighbor.Right));}else {System.out.println(\"RIGHT: NULL\");}\n\t\t\tif(tile.getNeighbor(Neighbor.Bottom)!=null) {System.out.println(\"BOTTOM: \" + tile.getNeighbor(Neighbor.Bottom));}else {System.out.println(\"BOTTOM: NULL\");}\n\t\t\tif(tile.getNeighbor(Neighbor.Left)!=null) {System.out.println(\"LEFT: \" + tile.getNeighbor(Neighbor.Left) + \"\\n\");}else {System.out.println(\"LEFT: NULL\\n\");}\n\t\t}\n\t}", "public void createTiles() {\r\n Session session = sessionService.getCurrentSession();\r\n Campaign campaign = session.getCampaign();\r\n\r\n tilePane.getChildren().clear();\r\n List<Pc> pcs = null;\r\n try {\r\n pcs = characterService.getPlayerCharacters();\r\n } catch (MultiplePlayersException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (pcs != null) {\r\n pcs = pcs.stream().filter(pc -> campaign.getPcs().stream().anyMatch(\r\n campaignPc -> campaignPc.getId().equalsIgnoreCase(pc.getId())\r\n )).collect(Collectors.toList());\r\n\r\n for (Pc pc : pcs) {\r\n SortedMap<String, String> items = getTileItems(pc);\r\n Tile tile = new Tile(pc.getId(), pc.getName(), items);\r\n tile.setOnMouseClicked(mouseEvent -> {\r\n try {\r\n sessionService.updateParticipant(playerManagementService.getRegisteredPlayer().getId(), tile.getObjectId());\r\n } catch (EntityNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n parentController.updateSession(sessionService.getCurrentSession());\r\n parentController.switchView();\r\n });\r\n tilePane.getChildren().add(tile);\r\n }\r\n }\r\n }", "public Bitmap generateBackground()\n {\n Bitmap bg = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);\n Canvas temp = new Canvas(bg);\n for (int i = 0; i < width/blockWidth; i++)\n {\n for (int j = 0; j < height/blockHeight; j++)\n {\n Random rand = new Random();\n int val = rand.nextInt(5);\n\n if (val == 0)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_1), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n\n }\n else if (val == 1)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_2), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n }\n else if (val == 2)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_3), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n }\n else if (val == 3)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_4), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n }\n else if (val == 4)\n {\n temp.drawBitmap(Bitmap.createScaledBitmap(BitmapFactory.decodeResource(getResources(),R.drawable.ground_tile_5), blockWidth, blockHeight, true),\n i*blockWidth, j*blockHeight, null);\n }\n\n }\n }\n\n return bg;\n\n }", "@Override\r\n public void init() {\n Image bgImage = assets().getImage(\"images/bg.png\");\r\n ImageLayer bgLayer = graphics().createImageLayer(bgImage);\r\n graphics().rootLayer().add(bgLayer);\r\n\r\n // Create tiles\r\n tiles = new int[BOARD_MAX_WIDTH][BOARD_MAX_HEIGHT];\r\n printTiles();\r\n\r\n // Place mines at random positions\r\n int placedMines = 0;\r\n Random r = new Random();\r\n while (placedMines < MINES) {\r\n int row = r.nextInt(BOARD_MAX_WIDTH);\r\n int col = r.nextInt(BOARD_MAX_HEIGHT);\r\n if (tiles[row][col] == TILE_EMPTY) {\r\n tiles[row][col] = TILE_MINE;\r\n placedMines++;\r\n }\r\n }\r\n printTiles();\r\n\r\n // Count number of mines around blank tiles\r\n for (int row = 0; row < BOARD_MAX_WIDTH; row++) {\r\n for (int col = 0; col < BOARD_MAX_WIDTH; col++) {\r\n // Check surrounding tiles if mine\r\n if (tiles[row][col] == TILE_MINE) {\r\n for (int rowCheck = -1; rowCheck <= 1; rowCheck++) {\r\n for (int colCheck = -1; colCheck <= 1; colCheck++) {\r\n if (tileExistAndNotMine(row+rowCheck, col+colCheck)) {\r\n tiles[row+rowCheck][col+colCheck]++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n printTiles();\r\n\r\n // Create tile map\r\n Map<Integer, TileType> tileMap = new HashMap<Integer, TileType>();\r\n tileMap.put(0, TileType.EMPTY);\r\n tileMap.put(1, TileType.ONE);\r\n tileMap.put(2, TileType.TWO);\r\n tileMap.put(3, TileType.THREE);\r\n tileMap.put(4, TileType.FOUR);\r\n tileMap.put(5, TileType.FIVE);\r\n tileMap.put(6, TileType.SIX);\r\n tileMap.put(7, TileType.SEVEN);\r\n tileMap.put(8, TileType.EIGHT);\r\n tileMap.put(9, TileType.MINE);\r\n\r\n // Create a GroupLayer to hold the sprites\r\n GroupLayer groupLayer = graphics().createGroupLayer();\r\n graphics().rootLayer().add(groupLayer);\r\n\r\n // Create graphic tiles\r\n tileList = new ArrayList<Tile>();\r\n for (int row = 0; row < BOARD_MAX_WIDTH; row++) {\r\n for (int col = 0; col < BOARD_MAX_WIDTH; col++) {\r\n Tile tile = new Tile(groupLayer, col*Tile.SIZE, row*Tile.SIZE, tileMap.get(tiles[row][col]), row, col);\r\n tileList.add(tile);\r\n }\r\n }\r\n\r\n // Timer text\r\n CanvasImage canvasImage = graphics().createImage(160, 70);\r\n timerLabel = canvasImage.canvas();\r\n ImageLayer countDownLayer = graphics().createImageLayer(canvasImage);\r\n countDownLayer.setTranslation(180, 10);\r\n graphics().rootLayer().add(countDownLayer);\r\n\r\n // Cleared tiles text\r\n CanvasImage clearedTilesImage = graphics().createImage(160, 70);\r\n clearedTilesLabel = clearedTilesImage.canvas();\r\n ImageLayer clearedTilesLayer = graphics().createImageLayer(clearedTilesImage);\r\n clearedTilesLayer.setTranslation(180, 30);\r\n graphics().rootLayer().add(clearedTilesLayer);\r\n updateClearedTiles();\r\n }", "private void fly() {\n\t\tint xTarget = 12 *Board.TILE_D;\r\n\t\tint yTarget = 12 * Board.TILE_D;\r\n\t\tif(centerX - xTarget >0) {\r\n\t\t\tcenterX--;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcenterX++;\r\n\t\t}\r\n\t\tif(centerY - yTarget > 0) {\r\n\t\t\tcenterY --;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcenterY ++;\r\n\t\t}\r\n\t}", "public void initTiles() {\n\t\ttileList.add(new Go());\n\n\t\t// Brown properties\n\t\tProperty mediterranean = new Property(\"Mediterranean\");\n\t\tProperty balticAve = new Property(\"Baltic Avenue\");\n\n\t\t// Light blue properties\n\t\tProperty orientalAve = new Property(\"Oriental Avenue\");\n\t\tProperty vermontAve = new Property(\"Vermont Avenue\");\n\t\tProperty connecticutAve = new Property(\"Connecticut Avenue\");\n\n\t\t// Magenta properties\n\t\tProperty stCharles = new Property(\"St. Charles Place\");\n\t\tProperty statesAve = new Property(\"States Avenue\");\n\t\tProperty virginiaAve = new Property(\"Virginia Avenue\");\n\n\t\t// Orange properties\n\t\tProperty stJames = new Property(\"St. James Place\");\n\t\tProperty tennesseeAve = new Property(\"Tennessee Avenue\");\n\t\tProperty newYorkAve = new Property(\"New York Avenue\");\n\n\t\t// Red properties\n\t\tProperty kentuckyAve = new Property(\"Kentucky Avenue\");\n\t\tProperty indianaAve = new Property(\"Indiana Avenue\");\n\t\tProperty illinoisAve = new Property(\"Illinois Avenue\");\n\n\t\t// Yellow Properties\n\t\tProperty atlanticAve = new Property(\"Atlantic Avenue\");\n\t\tProperty ventnorAve = new Property(\"Ventnor Avenue\");\n\t\tProperty marvinGard = new Property(\"Marvin Gardins\");\n\n\t\t// Green Properties\n\t\tProperty pacificAve = new Property(\"Pacific Avenue\");\n\t\tProperty northCar = new Property(\"North Carolina Avenue\");\n\t\tProperty pennsylvannia = new Property(\"Pennsylvania Avenue\");\n\n\t\t// Dark blue properties\n\t\tProperty parkPlace = new Property(\"Park Place\");\n\t\tProperty boardWalk = new Property(\"Boardwalk\");\n\n\t\t// Tax tiles\n\t\tTaxTile incomeTax = new TaxTile(\"Income Tax\", 200);\n\t\tTaxTile luxuryTax = new TaxTile(\"Luxury Tax\", 100);\n\n\t\t// Utilities\n\t\tUtility electric = new Utility(\"Electric Company\");\n\t\tUtility water = new Utility(\"Water Works\");\n\n\t\t// Railroads\n\t\tRailroad reading = new Railroad(\"Reading\");\n\t\tRailroad pennRail = new Railroad(\"Pennsylvania\");\n\t\tRailroad bno = new Railroad(\"B & O\");\n\t\tRailroad shortLine = new Railroad(\"Short Line\");\n\n\t\t// Chance and community chest\n\t\tChance chance = new Chance();\n\t\tCommunity chest = new Community();\n\n\t\t// Adds the properties by color in accordance with their position on the board\n\t\t// adds color + placement of piece to a list of their respective colors\n\t\tbrown.add(1);\n\t\tbrown.add(3);\n\t\trailroads.add(5);\n\t\tlightBlue.add(6);\n\t\tlightBlue.add(8);\n\t\tlightBlue.add(9);\n\t\tmagenta.add(11);\n\t\tutilities.add(12);\n\t\tmagenta.add(13);\n\t\tmagenta.add(14);\n\t\trailroads.add(15);\n\t\torange.add(16);\n\t\torange.add(18);\n\t\torange.add(19);\n\t\tred.add(21);\n\t\tred.add(23);\n\t\tred.add(24);\n\t\trailroads.add(25);\n\t\tyellow.add(26);\n\t\tyellow.add(27);\n\t\tutilities.add(28);\n\t\tyellow.add(29);\n\t\tgreen.add(31);\n\t\tgreen.add(32);\n\t\tgreen.add(34);\n\t\trailroads.add(35);\n\t\tdarkBlue.add(37);\n\t\tdarkBlue.add(39);\n\n\t\t// tileList is the list of tiles of the board where each tile is representative of a place on the board\n\t\t// adds each tile is chronological order beginning of the board \"go\"\n\t\t//this list includes: properties, taxes, railroads, chance, community chest\n\t\t\n\t\ttileList.add(new Go());\n\n\t\ttileList.add(mediterranean);\n\t\ttileList.add(chest);\n\t\ttileList.add(balticAve);\n\t\ttileList.add(incomeTax);\n\t\ttileList.add(reading);\n\t\ttileList.add(orientalAve);\n\t\ttileList.add(chance);\t\n\t\ttileList.add(vermontAve);\n\t\ttileList.add(connecticutAve);\n\n\t\ttileList.add(new Jail());\n\t\t\t\n\t\ttileList.add(stCharles);\n\t\ttileList.add(electric);\t\t\t\n\t\ttileList.add(statesAve);\t\t\t\n\t\ttileList.add(virginiaAve);\n\t\ttileList.add(pennRail);\n\t\ttileList.add(stJames);\t\n\t\ttileList.add(chest);\n\t\ttileList.add(tennesseeAve);\t\t\t\n\t\ttileList.add(newYorkAve);\n\n\t\ttileList.add(new FreeParking());\n\t\t\t\n\t\ttileList.add(kentuckyAve);\t\t\n\t\ttileList.add(chance);\t\n\t\ttileList.add(indianaAve);\t\t\t\n\t\ttileList.add(illinoisAve);\n\t\ttileList.add(bno);\n\t\ttileList.add(atlanticAve);\t\t\t\n\t\ttileList.add(ventnorAve);\n\t\ttileList.add(water);\n\t\ttileList.add(marvinGard);\n\n\t\ttileList.add(new GoToJail());\n\t\t\t\t\t\n\t\ttileList.add(pacificAve);\t\t\t\n\t\ttileList.add(northCar);\n\t\ttileList.add(chest);\t\t\t\n\t\ttileList.add(pennsylvannia);\n\t\ttileList.add(shortLine);\n\t\ttileList.add(chance);\n\t\ttileList.add(parkPlace);\n\t\ttileList.add(luxuryTax);\n\t\ttileList.add(boardWalk);\n\t}", "@Override\n protected void populate()\n {\n for (int i = 0; i < getHeight(); i++)\n {\n add(new Tile(), 1, i);\n add(new Block(), 2, i);\n add(new Tile(), 3, i);\n }\n for (int i = 2; i < 5; i++)\n {\n add(new LightableTile(), 4, i);\n }\n }", "public gameWorld()\n { \n // Create a new world with 600x600 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n \n addObject(new winSign(), 310, 300);\n addObject(new obscureDecorative(), 300, 400);\n addObject(new obscureDecorative(), 300, 240);\n \n for(int i = 1; i < 5; i++) {\n addObject(new catchArrow(i * 90), 125 * i, 100);\n }\n for (int i = 0; i < 12; i++) {\n addObject(new damageArrowCatch(), 50 * i + 25, 50); \n }\n \n \n //Spawning Interval\n\n if(timerInterval >= 10) {\n arrowNumber = Greenfoot.getRandomNumber(3);\n }\n if(arrowNumber == 0) {\n addObject(new upArrow(directionOfArrow[0], imageOfArrow[0]), 125, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 1) {\n addObject(new upArrow(directionOfArrow[1], imageOfArrow[1]), 125 * 2, 590);\n arrowNumber = 5;\n }\n if(arrowNumber == 2) {\n addObject(new upArrow(directionOfArrow[2], imageOfArrow[2]), 125 * 3, 590);\n arrowNumber = 5;\n }\n if( arrowNumber == 3) {\n addObject(new upArrow(directionOfArrow[3], imageOfArrow[3]), 125 * 4, 590);\n arrowNumber = 5;\n }\n \n \n\n \n }", "private void fillBoard() {\n\n boardMapper.put(1, new int[]{0, 0});\n boardMapper.put(2, new int[]{0, 1});\n boardMapper.put(3, new int[]{0, 2});\n boardMapper.put(4, new int[]{1, 0});\n boardMapper.put(5, new int[]{1, 1});\n boardMapper.put(6, new int[]{1, 2});\n boardMapper.put(7, new int[]{2, 0});\n boardMapper.put(8, new int[]{2, 1});\n boardMapper.put(9, new int[]{2, 2});\n\n }", "void generateBoard(){\r\n rearrangeSolution();\r\n makeInitial();\r\n }", "void loadCheckerBoard(int tileSize);", "void display()\n\t{\n\t\ttiles[fruit[0]][fruit[1]][fruit[2]] = \" *\";\n\n\t\t// does not write over head\n\t\tif (theSnake.getLength() == 3)\n\t\t{\n\t\t\tfor (int i = 1; i < theSnake.getLength(); i++)\n\t\t\t{\n\t\t\t\t// Places snake body parts onto the board\n\t\t\t\t//in each of its positions\n\t\t\t\ttiles[theSnake.getXofPartI(i)][theSnake.getYofPartI(i)][theSnake.getZofPartI(i)] = \" @\";\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (int i = theSnake.getLength() - 1; tiles[theSnake.getXofPartI(i)][theSnake.getYofPartI(i)][theSnake.getZofPartI(i)] != \" @\"\n\t\t\t\t&& i != 0; i--)\n\t\t\t{\n\t\t\t\t// Places snake body parts onto the board\n\t\t\t\t//in each of its positions\n\t\t\t\ttiles[theSnake.getXofPartI(i)][theSnake.getYofPartI(i)][theSnake.getZofPartI(i)] = \" @\";\n\t\t\t}\n\t\t\t// places snake body part where its head was in the previous update\n\t\t\ttiles[theSnake.getXofPartI(1)][theSnake.getYofPartI(1)][theSnake.getZofPartI(1)] = \" @\";\n\t\t}\n\n\t\t// Print basic instructions\n\t\tangles.append(\"\\n\\tq: to quit\\n\\t8: up\\t5: down\\t\\t\\t\\t\\t\\t8: up\\t5: down\\n\\t4: left\\t6: right\\t\\t\\t\\t\\t9: left\\t3:right\\n\\t9:\");\n\t\tangles.append(\"surfacing\\t3: deeper\\t\\t\\t\\t4: surfacing\\t6: deeper\\n\");\n\n\t\t// print the board to console\n\t\tfor (int y = 0; y < size; y++){\n\t\t\tangles.append(\"\\t\");\n\t\t\tdisplayLine(y, \"xy\");\n\n\t\t\tangles.append(\"\\t\\t\");\n\t\t\tdisplayLine(y, \"zy\");\n\t\t\tangles.append(\"\\n\");\n\t\t}\n\n\t\tangles.append(\"\\n\\n\");\n\t\tfor (int z = 0; z < size; z++) {\n\t\t\tangles.append(\"\\t\");\n\t\t\tdisplayLine(z, \"xz\");\n\t\t\tangles.append(\"\\n\");\n\t\t}\n\t\t\n\t\tSystem.out.println(angles);\n\t\tangles.replace(0, angles.length(), \"\");\n\n\t\t// removes snake from board completely so we don't have to keep track\n\t\t//of conditions.\n\t\t//for (int i = 0; i < theSnake.getLength(); i++)\n\t\t//{\n\n\t\t// Only the last snake body part will need to be taken off\n\t\ttiles[theSnake.getXofPartI(theSnake.getLength() - 1)][theSnake.getYofPartI(theSnake.getLength() - 1)][theSnake.getZofPartI(theSnake.getLength() - 1)] = \" \";\n\t\t//}\n\t}", "public void generate() {\n\n enemies.clear();\n\n for (int i = 0; i < (GRID_SIZE * ROOM_WIDTH); i++) {\n for (int j = 0; j < (GRID_SIZE * ROOM_HEIGHT); j++) {\n terrain[i][j] = null;\n }\n }\n\n RoomType[][] rooms = new RoomType[GRID_SIZE][GRID_SIZE];\n for(int i = 0; i < GRID_SIZE; i++) {\n for (int j = 0; j < GRID_SIZE; j++) {\n rooms[i][j] = RoomType.None;\n }\n }\n\n left = down = false;\n int x = random.nextInt(GRID_SIZE), y = 0;\n\n startPosition = new Vector2();\n startPosition.y = 4 * Tile.SIZE;\n startPosition.x = ((x + 1) * ROOM_WIDTH * Tile.SIZE) + 5 * Tile.SIZE;\n\n\n startRoom = true;\n while(true) {\n down = false;\n getDir();\n\n if(left) {\n x--;\n }\n else {\n x++;\n }\n\n if(x >= GRID_SIZE) {\n x--;\n down = true;\n }\n else if(x < 0) {\n x++;\n down = true;\n }\n\n if(down) {\n if(startRoom) {\n startRoomX = x;\n startRoomY = y;\n startRoom = false;\n }\n rooms[x][y] = RoomType.Down;\n y++;\n left = !left;\n if(y >= GRID_SIZE) {\n rooms[x][y - 1] = RoomType.Standard;\n endRoomX = x;\n endRoomY = y - 1;\n break;\n }\n }\n\n if(!down) {\n if(startRoom) {\n startRoomX = x;\n startRoomY = y;\n startRoom = false;\n }\n rooms[x][y] = RoomType.Standard;\n }\n else {\n if(startRoom) {\n startRoomX = x;\n startRoomY = y;\n startRoom = false;\n }\n rooms[x][y] = RoomType.getEnum(random.nextInt(1) + 3);\n }\n }\n\n for (int i = 0; i < GRID_SIZE; i++) {\n for (int j = 0; j < GRID_SIZE; j++) {\n System.out.print(rooms[i][j].VALUE + \" \");\n generateRoom(i, j, rooms[i][j]);\n }\n System.out.println(\"\");\n }\n }", "public void create(){\n\t\t//creating board to keep track of player postion with 1 or 0. 0 if not there 1 if they are there\n\t\tfor(int i = 0; i <this.position.length; i++){\n\t\t\tfor(int p = 0; p < this.position.length; p++){\n\t\t\t\tthis.position[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of position making board\n\t\tthis.position[1][1] = 1;//putting player in this position\n\n\t\t//creating door in the rooms\n\t\tfor(int i = 0; i <this.Door.length; i++){\n\t\t\tfor(int p = 0; p < this.Door.length; p++){\n\t\t\t\tthis.Door[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of Door making board\n\t\tthis.Door[9][13] = 1;//puts the door here \n\n\t\t//makes board that tells if item is there\n\t\tfor(int i = 0; i <this.Items.length; i++){\n\t\t\tfor(int p = 0; p < this.Items.length; p++){\n\t\t\t\tthis.Items[i][p] = null;//filling with null\n\t\t\t}\n\t\t}//end of filling board that has items\n\n\t\t//makes border of room\n\t\tfor(int i = 0; i < this.area.length; i++){\n\t\t\tfor(int p = 0; p<this.area.length; p++){\n\t\t\t\tif(i==0){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if (p==0 || p==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if(i==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.area[i][p] = \" \";\n\t\t\t\t}\n\t\t\t}//end of innner for\n\t\t}//end of outter for\n\t\tfor(int i = 4; i< 5 ; i++){\n\t\t\tfor(int p = 4; p < 7; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 4; i< 5 ; i++){\n\t\t\tfor(int p = 4; p < 7; p++){\n\t\t\t\tthis.area[p][i] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 7; i< 8 ; i++){\n\t\t\tfor(int p = 2; p < 7; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 17; i< 18 ; i++){\n\t\t\tfor(int p = 13; p < 17; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\t\n\t\t}\n\t\tfor(int i = 14; i< 15 ; i++){\n\t\t\tfor(int p = 13; p < 17; p++){\n\t\t\t\tthis.area[p][i] = \"[ ]\";\n\t\t\t}\t\n\t\t}\t\n\t\tfor(int i = 11; i< 12 ; i++){\n\t\t\tfor(int p = 10; p < 17; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 15; i< 16 ; i++){\n\t\t\tfor(int p = 3; p < 6; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 16; i< 17 ; i++){\n\t\t\tfor(int p = 6; p < 13; p++){\n\t\t\t\tthis.area[p][i] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 12; i< 13 ; i++){\n\t\t\tfor(int p = 5; p < 10; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t\tSystem.out.println(\" \");\n\t\t}//end of for that creates walls\t\n\n\t\t//for loop that distributes items\n\t\tint y = 0;\n\t\tint x = 0;\n\t\tfor(int i = 0;i<10;i++){\n\t\t\tItem thing = ItemGenerator.generate();//making an item\n\t\t\tboolean good = false;\n\t\t\twhile(!good){//makes coordates until there is nothing in the way\n\t\t\t\ty = fate.nextInt(20);//getting coordiantaes \n\t\t\t\tx = fate.nextInt(20);\n\t\t\t\tif(this.Items[y][x]==null && this.area[y][x] != \"[ ]\"){\n\t\t\t\t\tgood = true;\n\t\t\t\t}//end of if\n\t\t\t\telse{ \n\t\t\t\t\tgood = false;\n\t\t\t\t}\n\t\t\t}//end of while\n\t\t\tItems[y][x] = thing;\n\t\t}//end of for that distributes items on board\n\n\t}", "private void fillBoardWithCells(){\n double posx = MyValues.HORIZONTAL_VALUE*0.5*MyValues.HEX_SCALE + MyValues.DIAGONAL_VALUE*MyValues.HEX_SCALE;\n double posy = 2*MyValues.DIAGONAL_VALUE*MyValues.HEX_SCALE ;\n HexCell startCell = new HexCell(0,0, this);\n startCell.changePosition(posx, posy);\n boardCells[0][0] = startCell;\n for (int i = 0; i< x-1; i++) {\n HexCell currentCell = new HexCell(i+1, 0, this);\n boardCells[i+1][0] = currentCell;\n //i mod 2 = 0: Bottom\n if (i % 2 == 0) {\n boardCells[i][0].placeHexCell(currentCell, MyValues.HEX_POSITION.BOT_RIGHT );\n } else {\n //i mod 2 =1: Top\n boardCells[i][0].placeHexCell(currentCell, MyValues.HEX_POSITION.TOP_RIGHT );\n }\n }\n for(int i = 0; i < x; i++){\n for(int j = 0; j < y-1; j++){\n HexCell currentCell = new HexCell(i, j+1, this);\n //System.out.println(Integer.toString(i) + Integer.toString(j));\n boardCells[i][j+1] = currentCell;\n boardCells[i][j].placeHexCell(currentCell, MyValues.HEX_POSITION.BOT);\n }\n }\n }", "private void createRandomGame() {\n ArrayList<int[]> usedCoordinates = new ArrayList<>();\n\n // make sure the board is empty\n emptyBoard();\n\n //find different coordinates\n while (usedCoordinates.size() < 25) {\n int[] temp = new int[]{randomNumberGenerator.generateInteger(size), randomNumberGenerator.generateInteger(size)};\n\n // default contains(arraylist) doesn't work because it compares hashcodes\n if (! contains(usedCoordinates, temp)) {\n usedCoordinates.add(temp);\n }\n }\n\n for (int[] usedCoordinate : usedCoordinates) {\n board.setSquare(usedCoordinate[0], usedCoordinate[1], randomNumberGenerator.generateInteger(size) + 1);\n }\n\n //save start locations\n startLocations = usedCoordinates;\n }", "private void createMaze(Tile currentTile) {\n\n while (numberOfCellsVisited < CAST_WIDTH * CAST_HEIGHT) {\n\n // Get coordinates of current tile and set as visited\n int currentX = currentTile.getPosition().getX();\n int currentY = currentTile.getPosition().getY();\n tempMap[currentY][currentX].setVisited(true);\n\n // Begin neighbourhood scan\n ArrayList<Integer> neighbours = new ArrayList<>();\n\n // If a neighbour is not visited and its projected position is within bounds, add it to the list of valid neighbours\n // North neighbour\n if (currentY - 1 >= 0) {\n if (!tempMap[currentY - 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(0);\n }\n //Southern neighbour\n if (currentY + 1 < CAST_HEIGHT) { //y index if increased is not greater than height of the chamber\n if (!tempMap[currentY + 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(1);\n }\n //Eastern neighbour\n if (currentX + 1 < CAST_WIDTH) { //check edge case\n if (!tempMap[currentY][currentX + 1].isVisited()) { //check if visited\n neighbours.add(2);\n }\n }\n //Western neighbour\n if (currentX - 1 >= 0) {\n if (!tempMap[currentY][currentX - 1].isVisited()) {\n neighbours.add(3);\n }\n }\n if (!neighbours.isEmpty()) {\n\n //generate random number between 0 and 3 for direction\n Random rand = new Random();\n boolean randomizer;\n int myDirection;\n do {\n myDirection = rand.nextInt(4);\n randomizer = neighbours.contains(myDirection);\n } while (!randomizer);\n\n //knock down wall\n switch (myDirection) {\n case 0 -> { // North\n tempMap[currentY][currentX].getPathDirection()[0] = true;\n currentTile = tempMap[currentY - 1][currentX];\n }\n case 1 -> { // South\n tempMap[currentY][currentX].getPathDirection()[1] = true;\n currentTile = tempMap[currentY + 1][currentX];\n }\n case 2 -> { // East\n tempMap[currentY][currentX].getPathDirection()[2] = true;\n currentTile = tempMap[currentY][currentX + 1];\n }\n case 3 -> { // West\n tempMap[currentY][currentX].getPathDirection()[3] = true;\n currentTile = tempMap[currentY][currentX - 1];\n }\n }\n\n mapStack.push(currentTile);\n numberOfCellsVisited++;\n } else {\n currentTile = mapStack.pop(); //backtrack\n }\n }\n\n castMaze(tempMap[0][0], -1);\n }", "protected abstract void paintBoard() throws TilePixelOutOfRangeException;", "private void newPowerUp() {\r\n int row = 0;\r\n int column = 0;\r\n do {\r\n row = Numbers.random(0,maxRows-1);\r\n column = Numbers.random(0,maxColumns-1);\r\n } while(isInSnake(row,column,false));\r\n powerUp = new Location(row,column,STOP);\r\n grid[powerUp.row][powerUp.column].setBackground(POWER_UP_COLOR);\r\n }", "void setPosition(Tile t);", "@Override\r\n\tpublic void createSprites(World world) {\r\n \t// the height of the map since 0,0 in Tiled is in the top left\r\n // compared to the TiledMap's 0,0 in the bottom left\r\n int height = 2400;\r\n\r\n // file locations of different trees\r\n TextureAtlas atlas = new TextureAtlas(\"Game Tilesets/Trees/Trees.pack\");\r\n Skin skin = new Skin();\r\n skin.addRegions(atlas);\r\n TextureRegion T2 = skin.getRegion(\"T2\");\r\n TextureRegion T3 = skin.getRegion(\"T3\");\r\n TextureRegion T7 = skin.getRegion(\"T7\");\r\n TextureRegion T9 = skin.getRegion(\"T9\");\r\n TextureRegion T10 = skin.getRegion(\"T10\");\r\n \r\n // add all of the trees\r\n \tthis.addSprite(new ObjectSprites(T2, 236, height - 1490));\r\n \r\n this.addSprite(new ObjectSprites(T9, 622, height - 1907));\r\n this.addSprite(new ObjectSprites(T9, 683, height - 1687));\r\n this.addSprite(new ObjectSprites(T9, 174, height - 1851));\r\n this.addSprite(new ObjectSprites(T9, 361, height - 1643));\r\n \r\n this.addSprite(new ObjectSprites(T10, 572, height - 1354));\r\n this.addSprite(new ObjectSprites(T10, 0, height - 1475));\r\n this.addSprite(new ObjectSprites(T10, -9, height - 1707));\r\n this.addSprite(new ObjectSprites(T10, 675, height - 1479));\r\n this.addSprite(new ObjectSprites(T10, 416, height - 1903));\r\n\r\n this.addSprite(new ObjectSprites(T3, 428, height - 1453));\r\n this.addSprite(new ObjectSprites(T3, 596, height - 1122));\r\n this.addSprite(new ObjectSprites(T3, -32, height - 988));\r\n this.addSprite(new ObjectSprites(T3, 476, height - 864));\r\n this.addSprite(new ObjectSprites(T3, 640, height - 725));\r\n this.addSprite(new ObjectSprites(T3, 424, height - 2123));\r\n \r\n this.addSprite(new ObjectSprites(T7, 145, height - 1347));\r\n this.addSprite(new ObjectSprites(T7, 83, height - 1935));\r\n this.addSprite(new ObjectSprites(T7, 585, height - 2031));\r\n this.addSprite(new ObjectSprites(T7, 290, height - 2304));\r\n \r\n Bandit b1 = new Bandit();\r\n b1.defineBody(world, 215, 1305);\r\n super.addSprite(b1);\r\n \r\n Bandit b2 = new Bandit();\r\n b2.defineBody(world, 60, 1445);\r\n super.addSprite(b2);\r\n \r\n Bandit b3 = new Bandit();\r\n b3.defineBody(world, 90, 1640);\r\n super.addSprite(b3);\r\n \r\n Bandit b4 = new Bandit();\r\n b4.defineBody(world, 530, 1740);\r\n super.addSprite(b4);\r\n \r\n Bandit b5 = new Bandit();\r\n b5.defineBody(world, 730, 1655);\r\n super.addSprite(b5);\r\n \r\n Bandit b6 = new Bandit();\r\n b6.defineBody(world, 90, 2235);\r\n super.addSprite(b6);\r\n \r\n Bandit b7 = new Bandit();\r\n b7.defineBody(world, 715, 1490);\r\n super.addSprite(b7);\r\n \r\n Bandit b8 = new Bandit();\r\n b8.defineBody(world, 318, 1605);\r\n super.addSprite(b8);\r\n }" ]
[ "0.7133566", "0.70300645", "0.69864875", "0.695054", "0.6776188", "0.6766815", "0.67540926", "0.6698738", "0.66882944", "0.66863567", "0.6649996", "0.6640449", "0.6636494", "0.65971524", "0.6591226", "0.6510756", "0.65035194", "0.64791554", "0.6433198", "0.6418754", "0.6417497", "0.64074916", "0.63885194", "0.63815325", "0.63677275", "0.63658094", "0.6362629", "0.6361717", "0.6359646", "0.6358955", "0.63531256", "0.6322206", "0.6313992", "0.6313042", "0.63126755", "0.6291015", "0.62841874", "0.6269903", "0.626253", "0.6261739", "0.6258464", "0.6256336", "0.62557226", "0.62534165", "0.62269413", "0.6215347", "0.62024957", "0.6193721", "0.6185982", "0.616237", "0.6153701", "0.6144904", "0.61405295", "0.6138551", "0.6124433", "0.6123094", "0.61138797", "0.6108089", "0.60944176", "0.6092652", "0.608045", "0.6067615", "0.6062619", "0.60424304", "0.6042081", "0.6029464", "0.6028248", "0.60167015", "0.6016671", "0.6003736", "0.5991453", "0.59902793", "0.59896255", "0.59891313", "0.5986511", "0.5976933", "0.59750277", "0.5971027", "0.59700626", "0.59675014", "0.59666216", "0.5962095", "0.59550214", "0.59484124", "0.5947368", "0.5945776", "0.59446234", "0.5935059", "0.59300864", "0.5924934", "0.59239465", "0.59213036", "0.5921234", "0.5916272", "0.5912364", "0.5904508", "0.5895031", "0.5895027", "0.5889758", "0.5884958", "0.58814824" ]
0.0
-1
Handles the get request. if not logged in, redirect to "login" page.
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (!isLoggedIn(request)) getServletContext().getRequestDispatcher(LOGIN_PAGE).forward(request, response); else { String s = request.getParameter("id"); Identity identity = new Identity(Integer.parseInt(s)); identity = dao.search(identity).get(0); request.setAttribute("identity", identity); getServletContext().getRequestDispatcher("/identity-update.jsp").forward(request, response); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String action = request.getParameter(\"action\");\n HttpSession session = request.getSession();\n // Test if there is a user signed in.\n User user = (User) session.getAttribute(\"user\");\n \n String url = \"/login.jsp\";\n \n // If no user go to login\n if (user == null){\n url = \"/login.jsp\";\n action = \"no_user\";\n } else if (action == null) {\n // If user but no action go home\n url = \"/home.jsp\";\n } else if(action.equals(\"get_users\")) { \n ArrayList<User> users;\n users = UserDB.selectUsers();\n session.setAttribute(\"users\", users);\n \n url = \"/home.jsp\";\n }\n \n getServletContext()\n .getRequestDispatcher(url)\n .forward(request, response);\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\t\tString path = request.getRequestURI();\r\n\t\tString[] parts = path.split(\"/\");\r\n\t\tm.setMessage(\"The requested access is not permitted\");\r\n\t\tstatus = 401;\r\n\r\n\t\tSystem.out.println(\"User requested \" + Integer.parseInt(parts[3]));\r\n\t\tHttpSession session = request.getSession();\r\n\t\tPrintWriter pw = response.getWriter();\r\n\t\tUser currentUser = (User) session.getAttribute(\"currentUser\");\r\n\r\n\t\tif (currentUser != null) {\r\n\t\t\tUser userRequested = UserService.findUserByID(currentUser.getUserId(), Integer.parseInt(parts[3]),\r\n\t\t\t\t\tcurrentUser.getRole().getRoleId());\r\n\r\n\t\t\tif (userRequested != null) {\r\n\t\t\t\tpw.println(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(userRequested));\r\n\t\t\t\tstatus = 200;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tpw.println(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(m));\r\n\t\t}\r\n\t\tresponse.setStatus(status);\r\n\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString name = req.getParameter(\"uname\");\n\t\tString pass = req.getParameter(\"upass\");\n\t\tLoginService loginService = new LoginService();\n\t\tboolean result = loginService.authenticate(name, pass);\n\t\tif (result) {\n\t\t\tresp.sendRedirect(\"success.jsp\");\n\t\t\treturn;\n\t\t} else {\n\t\t\tresp.sendRedirect(\"login.jsp\");\n\t\t\treturn;\n\t\t}\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\treq.getRequestDispatcher(\"login.html\").forward(req, resp);\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n request.getRequestDispatcher(\"login.jsp\").forward(request, response);\r\n }", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n req.getRequestDispatcher(\"/WEB-INF/views/login.jsp\").forward(req, resp);\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tHttpSession session = req.getSession();\n\t\tcurrentUser = (User) session.getAttribute(\"CurrentUser\");\n\t\t\n\t\t// User was obtained successfully.. Continue\n\t\tif(currentUser != null)\n\t\t{\n\t\t\tcurrentProject = (Project) session.getAttribute(\"CurrentProject\");\n\t\t\tif(currentProject != null)\n\t\t\t{\n\t\t\t\tString action = req.getParameter(\"action\");\n\t\t\t\tif(action != null)\n\t\t\t\t{\n\t\t\t\t\treq.setAttribute(\"action\", action);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString pageName = getPageName(req);\n\t\t\t\tshowUI(req, resp, pageName);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treq.setAttribute(\"result\", \"You didn't select a project, Please select a project\");\n\t\t\t\tresp.sendRedirect(req.getContextPath() + \"/MyProjects\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//if there isn't one the person isn't logged in send them back\n\t\telse\n\t\t{\n\t\t\treq.setAttribute(\"result\", \"You are not logged in, Please Log in\");\n\t\t\tresp.sendRedirect(req.getContextPath() + \"/Login\");\n\t\t}\n\t\t\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tRequestDispatcher dispatcher=req.getRequestDispatcher(\"login.html\");\n\t\tdispatcher.forward(req, resp);\n\t\t\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t_logger.debug(\"Page requested from IP: \" + req.getRemoteAddr());\n\n\t\tHttpSession session = req.getSession(false);\n\n\t\tif (session != null && session.getAttribute(Commons.ReqAttribs.LOGIN_ID) != null) {\n\t\t\treq.setAttribute(Commons.ReqAttribs.LOGIN_ID, session.getAttribute(Commons.ReqAttribs.LOGIN_ID));\n\t\t\treq.getRequestDispatcher(Commons.Redirect.Servlet.CHAT).forward(req, resp);\n\t\t\treturn;\n\t\t}\n\n\t\tCookie[] cookies = req.getCookies();\n\t\tif (cookies != null)\n\t\t\tfor (int i = 0; i < cookies.length; i++) {\n\t\t\t\tif (Commons.Cookies.AUTO_LOGIN.equals(cookies[i].getName())) {\n\t\t\t\t\treq.setAttribute(Commons.ReqAttribs.LOGIN_TOKEN, cookies[i].getValue());\n\t\t\t\t\treq.getRequestDispatcher(Commons.Redirect.Servlet.LOGIN).forward(req, resp);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\treq.getRequestDispatcher(Commons.Redirect.Page.LOGIN_PAGE).forward(req, resp);\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n HttpSession session = request.getSession(false);\n if (session == null) {\n getServletContext().getRequestDispatcher(\"/WEB-INF/Login.jsp\").forward(request, response);\n }\n if (session.getAttribute(\"user\") == null) {\n getServletContext().getRequestDispatcher(\"/WEB-INF/Login.jsp\").forward(request, response);\n }\n getServletContext().getRequestDispatcher(\"/WEB-INF/Home.jsp\").forward(request, response);\n\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tif (req.getSession().getAttribute(\"client\") == null) {\n\t\t\tresp.sendRedirect(\"/FinalProject/login\");\n\t\t} else {\n\t\t\treq.getRequestDispatcher(\"view/client/client-profile.jsp\").forward(req, resp);\n\t\t}\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n response.sendRedirect(\"LoginPage.jsp\");\r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n HttpSession session = request.getSession();\n String action = request.getParameter(\"action\");\n request.setAttribute(\"role\", \"anonymous\");\n \n if (session.getAttribute(\"user\") == null && action == null) {\n getServletContext().getRequestDispatcher(\"/WEB-INF/index.jsp\").forward(request, response);\n return;\n }\n \n if(action != null && action.equals(\"login\")) {\n getServletContext().getRequestDispatcher(\"/WEB-INF/login.jsp\").forward(request, response);\n return;\n }\n \n if (action != null && action.equals(\"logout\")) {\n session.invalidate();\n request.setAttribute(\"role\", \"anonymous\");\n getServletContext().getRequestDispatcher(\"/WEB-INF/index.jsp\").forward(request, response);\n return;\n }\n }", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n helper.init(req, resp);\n Language locale = Language.getByLocale(\n (String) helper.getSessionAttribute(SESSION_LANGUAGE));\n\n User user = (User) helper.getSessionAttribute(SESSION_CURRENT_USER);\n\n if (user != null) {\n Optional<User> opt = userService.findById(user.getUserId(), locale);\n if (opt.isPresent()) {\n user = opt.get();\n\n prepareLevel(user, req, locale);\n prepareAchievements(user, req, locale);\n prepareProgression(user, req, locale);\n\n helper.setSessionAttribute(SESSION_CURRENT_USER, user);\n }\n helper.dispatch(Destination.GOTO_PROFILE);\n } else {\n helper.redirect(Destination.GOTO_AUTHORIZATION);\n }\n }", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n if (Authentication.isAdminInDbByCookies(req)) {\n // Authentication.log(req.getCookies()[0].getValue() + \" - redirect to /admin/registration/registration.html\");\n req.getRequestDispatcher(\"/admin/registration/registration.html\")\n .forward(req, resp);\n\n } else {\n // Authentication.log(req.getCookies()[0].getValue() + \" - redirect to / . Error Authorization.\");\n resp.sendRedirect(\"/\");\n }\n\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\treq.getRequestDispatcher(\"employeelogin.html\").forward(req, resp);\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tAdmin admin = (Admin) request.getSession().getAttribute(\"username\");\n\t\tif (admin != null) {\n\t\t\t// if (administer.getAccessLevel().equals(AccessLevel.ADMIN)) {\n\t\t\tresponse.sendRedirect(\"welcome.jsp\");\n\t\t\t// } else {\n\t\t\t// response.sendRedirect(doc_JSP);\n\t\t\t// }\n\t\t} else {\n\t\t\tRequestDispatcher rd = request.getRequestDispatcher(\"signup.jsp\");\n\t\t\trd.forward(request, response);\n\t\t}\n\n//\t\tRequestDispatcher rd = request.getRequestDispatcher(\"signup.jsp\");\n//\t\trd.forward(request, response);\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n processRequest(request, response);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "@Override\r\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)\r\n\t\t\tthrows Exception {\n\t\tString uri = request.getRequestURI();\r\n\t\tif (uri.indexOf(\"login\") >= 0 || uri.indexOf(\"index\") >= 0) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tUser user = (User) request.getSession().getAttribute(\"loginInfo\");\r\n\t\tif (user == null) {\r\n\t\t\trequest.setAttribute(\"errMsg\", \"ÇëÏȵǼ£¡\");\r\n\t\t\trequest.getRequestDispatcher(\"/WEB-INF/jsp/user/login.jsp\").forward(request, response);\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t// }\r\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n String login = req.getParameter(\"login\");\n String password = req.getParameter(\"password\");\n if (logic.isExisting(login, password)) {\n HttpSession session = req.getSession();\n session.setAttribute(\"login\", login);\n if (logic.isAdmin(login)) {\n session.setAttribute(\"role\", \"admin\");\n }\n resp.sendRedirect(String.format(\"%s/\", req.getContextPath()));\n } else {\n req.setAttribute(\"error\", \"Credentional is invalid\");\n doGet(req, resp);\n }\n }", "@Public\n\t@Get(\"/login\")\n\tpublic void login() {\n\t\tif (userSession.isLogged()) {\n\t\t\tresult.redirectTo(HomeController.class).home();\n\t\t}\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n boolean isPost = (boolean) request.getSession().getAttribute(\"isPost\");\n\n response.sendRedirect(\"signin.jsp\");\n\n }", "@Override\n public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {\n\tUser user = (User) request.getSession().getAttribute(\"loggedInUser\");\n\tif (user == null) {\n\t response.sendRedirect(\"/home.html\");\n\t return false;\n\t}\n\n\treturn true;\n\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n request.getRequestDispatcher(\"LoginForm.jsp\").forward(request, response);\n }", "private static void postLoginPage() {\n post(\"/login\", \"application/json\", (req, res) -> {\n HomerAccount loggedInAccount = homerAuth.login(req.body());\n if(loggedInAccount != null) {\n req.session().attribute(\"account\", loggedInAccount);\n res.redirect(\"/team\");\n } else {\n res.redirect(\"/login\");\n }\n return null;\n });\n }", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\r\n\t@ResponseBody\r\n\tpublic String loginPage(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tif (isCurrentAuthenticationAnonymous()) {\r\n\t\t\treturn \"login\";\r\n\t\t} else {\r\n\t\t\treturn \"redirect:/list\";\r\n\t\t}\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n String userID = null;\n if (request.getSession().getAttribute(\"userID\") != null) {\n userID = (String) request.getSession().getAttribute(\"userID\");\n }\n\n //user pressed login button\n if (request.getParameter(\"user\") != null) {\n if (userID == null) {\n userID = sc.firstConnection();\n }\n String email = request.getParameter(\"email\");\n String password = request.getParameter(\"password\");\n try {\n sc.makeLogin(userID, email, password);\n userID = email;\n request.getSession().setAttribute(\"userID\", userID);\n } catch (Exception e) {\n e.printStackTrace();\n String errorString = \"Login Failed!\";\n request.setAttribute(\"errorString\", errorString);\n request.setAttribute(\"email\", email);\n request.getSession().removeAttribute(\"userID\");\n RequestDispatcher dispatcher //\n = this.getServletContext().getRequestDispatcher(\"/WEB-INF/views/loginView.jsp\");\n dispatcher.forward(request, response);\n }\n }\n //user presses login as guest\n else if (request.getParameter(\"guest\") != null) {\n if (userID == null) {\n userID = sc.firstConnection();\n }\n request.getSession().setAttribute(\"userID\", userID);\n }\n //user pressed register button\n else if (request.getParameter(\"register\") != null) {\n //ArrayList<Nationality> nationalities = new ArrayList<>(Arrays.asList(Nationality.values()));\n //request.setAttribute(\"nat\", nationalities);\n request.getSession().removeAttribute(\"userID\");\n RequestDispatcher dispatcher = this.getServletContext().getRequestDispatcher(\"/WEB-INF/views/registerView.jsp\");\n dispatcher.forward(request, response);\n } else {\n return;\n }\n\n User user = sc.getInSystemUser(userID);\n request.getSession().setAttribute(\"userType\", user.getType().toString());\n response.sendRedirect(request.getContextPath() + \"/MainMenu\");\n }", "@Override\n public Object handle(Request request, Response response) {\n LOG.finer(\"GetAccountDetailsRoute is invoked.\");\n\n final Session session = request.session();\n // If the user is not already signed in, redirect them back to the home page\n if (session.attribute(GetHomeRoute.CURRENT_USER_KEY) == null) {\n response.redirect(URLS.HOME_URL.getURL());\n halt();\n return null;\n } else {\n Player currentUser = session.attribute(CURRENT_USER_KEY);\n // Create the view-model for rendering the page\n Map<String, Object> vm = new HashMap<>();\n // display a page title\n vm.put(TITLE_ATR, ACCOUNT_DETAILS_MSG);\n\n vm.put(GetHomeRoute.CURRENT_USER_ATR, currentUser);\n // render the View\n return templateEngine.render(new ModelAndView(vm, VIEW_NAME));\n }\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n\t\t// 로그인 유효성 검사\r\n\t\tHttpSession session = request.getSession();\r\n\t\tif(session.getAttribute(\"loginClient\") != null) {\r\n\t\t\tresponse.sendRedirect(request.getContextPath()+\"/IndexController\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\trequest.getRequestDispatcher(\"/WEB-INF/view/client/insertClient.jsp\").forward(request, response);\r\n\t}", "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 protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n HttpSession session = request.getSession();\n // Invalidate the session\n session.invalidate();\n // Redirect the user to the login page\n response.sendRedirect(\"Login\");\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (SQLException | NoSuchAlgorithmException ex) {\n Logger.getLogger(LoginServlet.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\ttry {\n\t\tHttpSession session = req.getSession(false);\n\t\tif(session == null)\n\t\t{\n\t\t\tlogger.info(\"Session expired when user clicked on products link from admin page\");\n\t\t\tRequestDispatcher rd = req.getRequestDispatcher(\"adminlogout/sessionexp_logout.jsp\");\n\t\t\trd.include(req, resp);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresp.setHeader(\"resultfor\", \"configure\");\n\t\t\tRequestDispatcher rd = req.getRequestDispatcher(\"jsps/products.jsp\");\n\t\t\trd.include(req, resp);\n\t\t}\n\t\t\n\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tlogger.error(\"Exception in ProductViewhandler\",e);\n\t\t}\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n response.setContentType(\"text/html\");\n PrintWriter out = response.getWriter();\n \n HttpSession session=request.getSession();\n String remoteUser = request.getRemoteUser();\n \n if (remoteUser == null) {\n out.println(\"HTTP 401 Unauthorized\");\n session.invalidate();\n }\n \n \n }", "@Override\n String execute(HttpServletRequest request, HttpServletResponse response) throws LegohusException {\n String email = request.getParameter(\"email\");\n String password = request.getParameter(\"password\");\n User user = LogicFacade.login(email, password);\n HttpSession session = request.getSession();\n session.setAttribute(\"user\", user);\n \n return \"WEB-INF/\" + user.getRole() + \"page\";\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString s1=request.getParameter(\"email\");\n\t\tString s2=request.getParameter(\"pass\");\n\t\t\n\t\tString str=null;\n\t\t\n\t\tLogin l=new Login();\n\t//\tl.setRno(Integer.parseInt(s1));\n\t\tl.setEmail(s1);\n\t\tl.setPass(s2);\n\t\tDBApplication db=new DBApplication();\n\t\tboolean b=db.validateUser(l);\n\t\tif(b)\n\t\t{\n\t\t\tresponse.sendRedirect(\"welcome.jsp\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresponse.sendRedirect(\"login.jsp\");\n\t\t}\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t\tHttpSession session = request.getSession();\n\t\tPrintWriter writer = prepareResponse(response);\n\t\tString username = (String) session.getAttribute(USERNAME);\n\t\tif(!isLoggedIn(request, response, session)) {\n\t\t\tresponse.sendRedirect(response.encodeRedirectURL(\"/login?\" + STATUS + \"=\" + NOT_LOGGED_IN));\n\t\t\treturn;\n\t\t}\n\t\t\n//\t\tfor (Cookie cookies : request.getCookies()) {\n//\t\t\tif(cookies.getName().compareTo(\"date\") == 0) {\n//\t\t\t\twriter.println(\"<h3><font color=\\\"red\\\">Last Login is: \" + cookies.getValue() + \"!</font></h3>\");\n//\t\t\t}\n//\t\t}\n\t\t\n\t\tString status = getParameterValue(request, STATUS);\n\t\tboolean loginSuccess = status != null && status.equals(VERIFIEDUSERNAME)?true:false;\n\t\tboolean passchange = status != null && status.endsWith(PASSCHANGE)?true:false;\n\t\tboolean isAdmin = status != null && status.endsWith(ADMIN)?true:false;\n\t\tboolean adminFail = status != null && status.endsWith(ADMINFAIL)?true:false;\n\t\t//boolean shutdownFail = status != null && status.endsWith(SHUTDOWNFAIL)?true:false;\n\t\t\n\t\tString responseHtml = responseFormatSearch();\n\t\tString suggested = \"<html>\" + \n\t\t\t\t\"<center><a href=\\\"/suggested\\\">Want to see the most popular searches?</a><center>\" + \n\t\t\t\t\"</html>\";\n\t\tString footer = footerSearch();\n\t\tString admin = \"<html>\" + \n\t\t\t\t\t\t\"<center><a href=\\\"/admin\\\">Want to be an Admin?</a><center>\" + \n\t\t\t\t\t\t\"</html>\";\n\t\tString shutdown = \"<html>\" + \n\t\t\t\t\"<center><a href=\\\"/shutdown\\\">Shutdown Server</a><center>\" + \n\t\t\t\t\"</html>\";\n\t\tString finalResponse = \"\";\n\t\tif (DBHelper.isAdmin(username)) {\n\t\t\tfinalResponse = responseHtml + suggested + footer + shutdown;\n\t\t}\n\t\telse {\n\t\t\tfinalResponse = responseHtml + suggested + admin + footer + shutdown;\n\t\t}\n\t\t\n\t\t\n\t\tif(loginSuccess) {\n\t\t\twriter.println(\"<h3><font color=\\\"red\\\">Login Successful!</font></h3>\");\n\t\t} else if(passchange) {\n\t\t\twriter.println(\"<h3><font color=\\\"red\\\">Password Changed Successfully!</font></h3>\");\n\t\t} else if(isAdmin) {\n\t\t\twriter.println(\"<h3><font color=\\\"red\\\">You are now an Admin!</font></h3>\");\n\t\t} else if(adminFail) {\n\t\t\twriter.println(\"<h3><font color=\\\"red\\\">You are not an Admin!</font></h3>\");\n\t\t} \n//\t\telse if(shutdownFail) { \n//\t\t\tSystem.out.println(\"here\");\n//\t\t\twriter.println(\"<h3><font color=\\\"red\\\">You cannot shutdown because you are not an Admin!</font></h3>\");\n//\t\t}\n\t\twriter.println(finalResponse);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tServletOutputStream out=resp.getOutputStream();\n\t\tHttpSession session=req.getSession();\n\t\tUserInfo info=(UserInfo) session.getAttribute(Constants.SESSION_USER_KEY);\n\t\tif(info==null) {\n\t\t\tresp.sendRedirect(this.getServletContext().getContextPath()+\"/login\");\n\t\t\t\n\t\t}\n\t\tout.println(\"<html>\");\n out.println(\"<head><title>Session example</title></head>\");\n \n out.println(\"<body>\");\n \n out.println(\"<h3>User Info:</h3>\");\n \n out.println(\"<p>User Name:\" + info.getUserName() + \"</p>\");\n out.println(\"<p>Country:\" + info.getCountry() + \"</p>\");\n out.println(\"<p>Post:\" + info.getPost() + \"</p>\");\n \n out.println(\"</body>\");\n out.println(\"<html>\");\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 }", "public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\t\t\r\n\t\trequest.getRequestDispatcher(\"/WEB-INF/jsp/account/SignonForm.jsp\").forward(request, response);\r\n\t\t\r\n\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}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t\tString username = request.getParameter(\"username\");\n\t\tString password = request.getParameter(\"password\");\n\t\tDatabaseManager dbm = new DatabaseManager();\n\t\tString admin = request.getParameter(\"admin?\");\n\t\tif (admin == null) {\n\t\t\tNormaluser user = dbm.normaluserLogin(username, password);\n\t\t\tif (user == null) {\n\t\t\t\tString url=\"index.jsp\";\n\t\t\t\turl=new String(url.getBytes(\"GBK\"),\"ISO8859_1\"); \n\t\t\t\tresponse.sendRedirect(url);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tCollection<OrderedDish> cart = new ArrayList<OrderedDish>();\n\t\t\t\trequest.getSession().setAttribute(\"cart\", cart);\n\t\t\t\trequest.getSession().setAttribute(\"user\", user);\n\t\t\t\trequest.getSession().setAttribute(\"type\", 1);\n\t\t\t\tString url=\"homePage.jsp\";\n\t\t\t\turl=new String(url.getBytes(\"GBK\"),\"ISO8859_1\"); \n\t\t\t\tresponse.sendRedirect(url); \n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tAdministrator administrator = dbm.adminLogin(username, password);\n\t\t\tif (administrator == null) {\n\t\t\t\tString url=\"index.jsp\";\n\t\t\t\turl=new String(url.getBytes(\"GBK\"),\"ISO8859_1\"); \n\t\t\t\tresponse.sendRedirect(url);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tCollection<OrderedDish> cart = new ArrayList<OrderedDish>();\n\t\t\t\trequest.getSession().setAttribute(\"admin\", administrator);\n\t\t\t\trequest.getSession().setAttribute(\"type\", 2);\n\t\t\t\tString url=\"homePage.jsp\";\n\t\t\t\turl=new String(url.getBytes(\"GBK\"),\"ISO8859_1\"); \n\t\t\t\tresponse.sendRedirect(url); \n\t\t\t}\n\t\t}\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {\n request.setAttribute(\"pageTitle\", \"Accueil\");\n\n if (new SessionChecker(request).isConnected()) {\n //Si l'utilisateur est conncecté on affiche la page \"Emprunter\"\n response.sendRedirect(\"/loan\");\n } else {\n //Sinon on afficjhe la page de connexion\n response.sendRedirect(\"/login\");\n }\n }", "@Override\n public void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException,\n IOException {\n \n final JsonMessage message = new JsonMessage(200, this.getClass().getName());\n \n try {\n final Map<String, String> parameters = getParameters(request);\n final RequestCode code = requestCodeMap.get(parameters.get(\"code\"));\n final String login = parameters.get(\"login\");\n final String password = parameters.get(\"password\");\n \n switch (code) {\n case READ :\n message.setMethod(\"READ\");\n if (login == null) {\n throw new InternalBackEndException(\"login argument missing!\");\n } else if (password == null) {\n throw new InternalBackEndException(\"password argument missing!\");\n } else {\n message.addData(\"warning\", \"METHOD DEPRECATED - Post method should be used instead of Get!\");\n final MUserBean userBean = authenticationManager.read(login, password);\n message.setDescription(\"Successfully authenticated\");\n message.addData(\"user\", getGson().toJson(userBean));\n }\n break;\n case DELETE :\n throw new InternalBackEndException(\"not implemented yet...\");\n default :\n throw new InternalBackEndException(\"AuthenticationRequestHandler(\" + code + \") not exist!\");\n }\n } catch (final AbstractMymedException e) {\n e.printStackTrace();\n MLogger.info(\"Error in doGet operation\");\n MLogger.debug(\"Error in doGet operation\", e.getCause());\n message.setStatus(e.getStatus());\n message.setDescription(e.getMessage());\n }\n \n printJSonResponse(message, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n HttpSession session = request.getSession();\n\n //Put user in session\n SessionUser sessionUser = new SessionUser();\n session.setAttribute(\"user\",sessionUser.getSessionUser(request));\n\n //Get request action\n String action = request.getParameter(\"action\");\n\n if (action != null) {\n switch (action) {\n case \"insert\":\n insertCar(request, response);\n break;\n case \"delete\":\n deleteCar(request, response);\n break;\n default:\n listCar(request, response);\n break;\n }\n }else{\n //Back to index page page\n RequestDispatcher dispatcher = request.getRequestDispatcher(\"index.jsp\");\n dispatcher.forward(request, response);\n }\n }", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp)\n throws ServletException, IOException {\n resp.setContentType(\"text/html;charset=UTF-8\");\n out = resp.getWriter();\n mPrintWriter = out;\n\n String authString =\n req.getHeader(CommonParamString.PARAM_HEADER_USERNAME_PASSWORD);\n //Get the UserName and Password\n parseAuthString(authString);\n getAccountInfo(getUserName());\n }", "private static void logedIn(Request req, Response res, CloudService cloud) {\r\n\t\t\tif (cloud.getKorisnici().get(req.cookie(\"userID\")) == null) {\r\n\t\t\t\tString[] params = req.splat();\r\n\t\t\t\tString path;\r\n\t\t\t\tif(params.length == 0)\r\n\t\t\t\t\tpath = \"\";\r\n\t\t\t\telse\r\n\t\t\t\t\tpath = params[0];\r\n\t\t\t\tif(path.equals(\"checkLogin\") || path.equals(\"favicon.ico\"))\r\n\t\t\t\t\treturn;\r\n\t\t\t\tres.redirect(\"/login.html\");\r\n\t\t\t\thalt(302);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(req.session().attribute(\"user\") == null) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tKorisnik k = cloud.getKorisnici().get(req.cookie(\"userID\"));\r\n\t\t\t\t\treq.session().attribute(\"user\", k); // postavi mu korisnika za sesiju\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "@Override\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {\n\t\tHttpSession session = request.getSession();\n\t\tString url = request.getRequestURI();\n\t\tString user_name = (String) session.getAttribute(\"user_name\");\n\t\tString admin_name = (String) session.getAttribute(\"admin_name\");\n\t\tif(url.equals(\"/shcool/login.action\")||url.equals(\"/shcool/regist.action\")||user_name!=null||admin_name!=null||url.equals(\"/shcool/user/login.action\")||url.equals(\"/shcool/user/regist.action\")||url.equals(\"/shcool/adminlogin.action\")||url.equals(\"/shcool/admin/adminlogin.action\")||url.equals(\"/shcool/addAdmin.action\")||url.equals(\"/shcool/admin/addAdmin.action\")\n\t\t\t\t||url.equals(\"/shcool/verification/imageServlet.action\")||url.equals(\"/shcool/verification/verificationServlet.action\")){\n\t\t\treturn true;\n\t\t}else \n\t\t\tresponse.sendRedirect(request.getContextPath()+\"/login.action\");\n\t\t\treturn false;\n\t\t}", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {\n String referer = (String) request.getSession().getAttribute(\"Referer\");\n String redirectTo = referer != null ? referer : \"/\";\n\n LOGGER.info(\"Access token: {}. Redirecting to: {}\", context.getAccessToken(), referer);\n response.sendRedirect(redirectTo);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\n String action = request.getParameter(\"action\");\r\n\r\n try {\r\n switch (action)\r\n {\r\n case \"/getUser\":\r\n \tgetUser(request, response);\r\n break;\r\n \r\n }\r\n } catch (Exception ex) {\r\n throw new ServletException(ex);\r\n }\r\n }", "public void handleGet( HttpExchange exchange ) throws IOException {\n switch( exchange.getRequestURI().toString().replace(\"%20\", \" \") ) {\n case \"/\":\n print(\"sending /MainPage.html\");\n sendResponse( exchange, FU.readFromFile( getReqDir( exchange )), 200);\n break;\n case \"/lif\":\n // send log in page ( main page )\n sendResponse ( exchange, FU.readFromFile(getReqDir(exchange)), 200);\n //\n break;\n case \"/home.html\":\n\n break;\n case \"/book.html\":\n\n break;\n default:\n //checks if user is logged in\n\n //if not send log in page\n //if user is logged in then\n print(\"Sending\");\n String directory = getReqDir( exchange ); // dont need to do the / replace as no space\n File page = new File( getReqDir( exchange) );\n\n // IMPLEMENT DIFFERENT RESPONSE CODE FOR HERE IF EXISTS IS FALSE OR CAN READ IS FALSE\n sendResponse(exchange, FU.readFromFile(directory), 200);\n break;\n }\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws \r\n\t \t\t\tServletException, IOException{ \t \r\n\t\t \r\n\t\t \t// Where jsp is /WEB-INF/views/login.jsp\r\n\t\t\t//when we write login.do we need to redirect servlet to Jsp. here we get request and redirecte it to jsp. \r\n\t\t\t//When we load the first page which is http://localhost:8080/login.do , it is get method. so we get the request from browser and redircet it to login.jsp to display the long page\r\n\t\t \t request.getRequestDispatcher(\"/WEB-INF/views/login.jsp\").forward(request, response);\r\n\t }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void userLogin(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\n\n UserDao dao = new UserDao();\n log.debug(dao.getAllUsers());\n List<Users> users = dao.getAllUsers();\n req.setAttribute(\"users\", users.get(0).getUserName());\n req.setAttribute(\"users\", users);\n log.debug(users.get(0).getPassword());\n String url = \"/leaderBoard.jsp\";\n\n RequestDispatcher dispatcher\n = getServletContext().getRequestDispatcher(url);\n dispatcher.forward(req, resp);\n }", "protected void doPostLogin(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tout.println(\"Look where we are, it's the login page\");\n\t\t\n\t\t//get parameter Names\n\t\tsetParameters(request);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tKeyspace keyspace = Connection.getKeyspace();\n\t\tStringSerializer se = StringSerializer.get();\n\t\t\n\t\ttry\n\t\t{\n\t\t\t// given Keyspace keyspace and StringSerializer se\n\t\t\tSliceQuery<String, String, String> q = HFactory.createSliceQuery(keyspace, se, se, se);\n\t\t\tq.setColumnFamily(\"Users\") .setKey(displayName).setColumnNames(\"fullname\", \"email\", \"password\");\n\t\t\tQueryResult<ColumnSlice<String, String>> r = q.execute();\n\n\t\t\tfullname = r.get().getColumnByName(\"fullname\").getValue();\n\t\t\temail = r.get().getColumnByName(\"email\").getValue();\n\n\t\t\tif(password.equals(r.get().getColumnByName(\"password\").getValue()))\n\t\t\t{\n\t\t\t\t//LOGGED IN CORRECTLY\n\t\t\t\t\n\t\t\t\tmySexySession.setAttribute(\"displayName\", displayName);\n\t\t\t\tmySexySession.setAttribute(\"fullname\", fullname);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmySexySession.setAttribute(\"message\", \"Incorrect Password.\");\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\t//catches happen when the key is not found (i.e. user doesn't exist)\n\t\t\tmySexySession.setAttribute(\"message\", \"User does not exist.\");\n\t\t}\n\t\tresponse.sendRedirect(\"/quotes/home\");\n\t}", "@Override\r\n\tpublic void doFilter(ServletRequest req, ServletResponse resp,\r\n\t\t\tFilterChain chain) throws IOException, ServletException {\n\t\tHttpServletRequest httpServletRequest = (HttpServletRequest) req;\r\n\t\tHttpServletResponse httpServletResponse = (HttpServletResponse) resp;\r\n\t\tString token = httpServletRequest.getParameter(\"token\");\r\n\t\tUserInfo userInfo = UserSession.get(token,UserInfo.class);\r\n\t\tif(userInfo == null){\r\n\t\t\thttpServletResponse.sendRedirect(\"login/login\");\r\n\t\t}else{\r\n\t\t\tchain.doFilter(req, resp);\r\n\t\t}\r\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n\t\t\r\n\t\t// We retrieve the session variable role to check if the user is an instructor\r\n\t\tHttpSession session = request.getSession();\r\n\t\tString role=\"\";\r\n\t\tif(session.getAttribute(\"role\")!=null) {\r\n\t\t\trole= (session.getAttribute(\"role\")).toString();\r\n\t\t\t\r\n\t\t\tif(role.equals(\"instructor\")) {\r\n\t\t\t\t// We retrieve the studentId parameter sent with the request and convert it in int\r\n\t\t\t\tthis.id = Integer.parseInt(request.getParameter(\"todoId\"));\r\n\t\t\t\t\t\t\r\n\t\t\t\t// We use an instance of WebTodoListDBUtil to fetch the corresponding todo\r\n\t\t\t\tTodo todo = webTodoListDBUtil.fetchTodo(id);\r\n\t\t\t\t\t\t\r\n\t\t\t\t// We set this student as a request attribute to the delete-student.jsp view\r\n\t\t\t\t// The aim of this view is to ask for confirmation and to recall the todo details\r\n\t\t\t\trequest.setAttribute(\"Todo\",todo);\r\n\t\t\t\trequest.getRequestDispatcher(\"/delete-todo.jsp\").forward(request,response);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//Access denied error\r\n\t\t\t\tString message = \"Access denied, you have been redirected to the login page because \"\r\n\t\t\t\t\t\t+ \"you do not have the rights to access this page\";\r\n\t\t\t\t//We set this message as a request attribute to the loging.jsp view\r\n\t\t\t\trequest.setAttribute(\"ErrorMessage\", message);\r\n\t\t\t\t// We don't forget to refill the username \r\n\t\t\t\trequest.setAttribute(\"usernameC\", session.getAttribute(\"username\")) ;\r\n\t\t\t\trequest.getRequestDispatcher(\"/login.jsp\").forward(request,response);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tString message = \"Session expired, please login with your username and password\";\r\n\t\t\t//We set this message as a request attribute to the loging.jsp view\r\n\t\t\trequest.setAttribute(\"ErrorMessage\", message);\r\n\t\t\trequest.getRequestDispatcher(\"/login.jsp\").forward(request,response);\r\n\t\t}\r\n\t\t\t\t\r\n\t\t\r\n\t\t\r\n\t}", "protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {\n\t\tString username = req.getParameter(\"username\");\n\t\t\n\t\tString result = LogStorage.retrieveUserEntries(username);\n\t\t\n\t\t//Sennd response back\n\t\tresp.setContentType(\"text/xml; charset=UTF-8\");\n\t\tresp.setStatus(HttpServletResponse.SC_OK);\n\t\tresp.getWriter().write(result);\n\t}", "public static String login(HttpServletRequest request) {\n\t\tif (request.getMethod().equals(FinalUtil.HTTP_GET)) {\n\t\t\treturn \"loginpage.html\";\n\t\t}\n\n\t\t// POST logic\n\t\tEmployee loggedEmployee = EmployeeService.getEmployeeService().login(\n\t\t\t\tnew Employee(\n\t\t\t\t\t\trequest.getParameter(\"email\"), \n\t\t\t\t\t\trequest.getParameter(\"password\")\n\t\t\t\t));\n\t\tSystem.out.println(\"LOGIN CONTROLLER: \" + loggedEmployee);\n\t\t\n\t\trequest.setAttribute(\"loggedEmployee\", loggedEmployee);\n\t\t\n\t\t// Wrong Credentials\n\t\tif (loggedEmployee.getEmailAddress().equals(\"\")) {\n\t\t\treturn \"loginpage.html\";\n\t\t} else {\n\t\t\n\t\t\trequest.getSession().setAttribute(\"loggedEmployee\", loggedEmployee);\n\n\t\t\t\n\t\t\tEmployee logged = (Employee) request.getSession().getAttribute(\"loggedEmployee\");\n\t\t\t\n\t\t\tSystem.out.println(\"Parameters(email and password from form): \" + request.getParameter(\"email\") +\":\" + request.getParameter(\"password\"));\n\t\t\tboolean loggedEmployee1 = EmployeeService.getEmployeeService().isManager(logged);\n\n\t\t\tif (loggedEmployee1 == true) {\n\t\t\t\treturn \"managerHome.jsp\";\n\t\t\t} else\n\t\t\t\treturn \"employeeHome.jsp\";\n\t\t}\n\t\t}", "@Override\r\n protected void doGet(HttpServletRequest request,\r\n HttpServletResponse response) throws ServletException, IOException {\r\n\r\n String path = request.getPathInfo();\r\n Map<String, Object> data = getDefaultData();\r\n Writer writer = response.getWriter();\r\n\r\n if (path == null) {\r\n throw new IOException(\"The associated path information is null\");\r\n }\r\n\r\n if (path.equals(\"/\")) {\r\n processTemplate(MAIN_SITE, data, writer);\r\n } else if (path.equals(\"/login\")) {\r\n processTemplate(LOGIN_SITE, data, writer);\r\n } else if (path.startsWith(\"/login/error\")) {\r\n data.put(\"hasLoginFailed\", true);\r\n AppServlet.processTemplate(LOGIN_SITE, data, response.getWriter());\r\n } else if (path.equals(\"/logout\")) {\r\n request.getSession().invalidate();\r\n response.sendRedirect(\"/login\");\r\n } else if (path.equals(\"/signup\")) {\r\n processTemplate(SIGNUP_SITE, data, response.getWriter());\r\n } else {\r\n processTemplate(NOT_FOUND_SITE, data, writer);\r\n }\r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //processRequest(request, response);\n if(request.getParameter(\"acao\").equals(\"Deslogar\")){\n HttpSession sessao = request.getSession();\n sessao.invalidate();\n response.sendRedirect(\"home.jsp\");\n }\n }", "@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 }", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\n public ModelAndView login() {\n ModelAndView modelAndView = new ModelAndView();\n modelAndView.setViewName(\"user/login\");\n return modelAndView;\n }", "public static String login(HttpServletRequest request) {\n\t\tif(request.getMethod().equals(FinalUtil.HTTP_GET)) {\n\t\t\treturn \"login.jsp\";\n\t\t}\n\t\t\n\t\t//POST logic\n\t\tCustomer loggedCustomer = CustomerService.getCustomerService().login(\n\t\t\t\tnew Customer(\n\t\t\t\t\t\trequest.getParameter(\"username\"),\n\t\t\t\t\t\trequest.getParameter(\"password\")\n\t\t\t\t\t\t));\n\t\t\n\t\t// Wrong Credentials\n\t\tif(loggedCustomer.getUsername().equals(\"\")) {\n\t\t\treturn \"login.jsp\";\n\t\t}\n\t\telse {\n\t\t\t/* Storing loggedCustomer to current session\n\t\t\tSESSION SCOPE IS AVAILABLE ONLY IN THIS REQUEST (CLIENT) */\n\t\t\trequest.getSession().setAttribute(\"loggedCustomer\", loggedCustomer);\n\t\t\t\n\t\t\t//Forward user to hit another controller\n\t\t\treturn \"/home.do\";\n\t\t}\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n // Restrict access by non-Guests\n if (!SessionHelpers.checkGuest(request.getSession())) {\n request.setAttribute(\"statusMessage\", \"You must be logged in as a guest to view the requested page.\");\n request.setAttribute(\"statusType\", \"warning\");\n RequestDispatcher view = request.getRequestDispatcher(\"/manager/login\");\n view.forward(request, response);\n return;\n }\n\n HttpSession session = request.getSession();\n User user = (User) session.getAttribute(\"sessionUser\");\n\n String url = \"/WEB-INF/views/list-events-guest.jsp\";\n String pageTitle = \"My Events\";\n\n // Get user attendance data from DB\n List<Attendance> userAttendance = attendanceData.getUserAttendance(user);\n request.setAttribute(\"userAttendance\", userAttendance);\n\n request.setAttribute(\"pageTitle\", pageTitle);\n RequestDispatcher view = request.getRequestDispatcher(url);\n view.forward(request, response);\n\n }", "@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tString userPath = request.getServletPath(); \n\t\tHttpSession session = request.getSession(); \n\t\tUser user = (User)session.getAttribute(\"user\");\n\t\tStudy study = (Study)session.getAttribute(\"study\");\n\n\t\t//The user is not logged in so is redirected to the index/login page\n\t\tif(user == null) {\n\t\t\tresponse.sendRedirect(\"/Photo_Grader/index.jsp\");\n\t\t\treturn;\n\t\t}\n\t\telse if(userPath.equals(\"/home\")) {\n\t\t\tif(user.isAdmin() && study == null) {\n\t\t\t\tresponse.sendRedirect(\"/Photo_Grader/admin_page\");\n\t\t\t\treturn;\n\t\t\t} else if (user.isStudy_coordinator() && !user.isGrader() && study == null){\n\t\t\t\tresponse.sendRedirect(\"/Photo_Grader/select_study\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsession.removeAttribute(\"grade_group\");\n\t\t\tsession.removeAttribute(\"rank_group\");\n\t\t\tsession.removeAttribute(\"last_compared_rank\");\n\t\t\tsession.removeAttribute(\"high_rank\");\n\t\t\tsession.removeAttribute(\"low_rank\");\n\t\t\tsession.removeAttribute(\"right_rank\");\n\t\t\tsession.removeAttribute(\"left_rank\");\n\t\t\tsession.removeAttribute(\"viewGroups\");\n\t\t\tsession.removeAttribute(\"viewGroupOptions\");\n\t\t}\n\t\telse if(userPath.equals(\"/select_CSVs\")) {\n\t\t\trequest.setAttribute(\"gradeCategories\",study.getGradeCategoryNames());\n\t\t\trequest.setAttribute(\"rankCategories\",study.getRankCategoryNames());\n\t\t\trequest.setAttribute(\"compareCategories\",study.getCompareCategoryNames());\n\t\t}\n\t\telse if (userPath.equals(\"/present_CSV\")) {\n\t\t\tString category = request.getParameter(\"category\");\n\t\t\tString type = request.getParameter(\"type\");\n\t\t\trequest.setAttribute(\"type\",type);\n\t\t\tString categoryName = request.getParameter(\"category\");\n\t\t\tif (type.equals(\"grade\")) {\n\t\t\t\tint grade_group_id = study.getGradeGroupId(categoryName);\n\n\t\t\t\trequest.setAttribute(\"category\",category);\n\t\t\t\trequest.setAttribute(\"csvLines\", Grade.getCSVLines(new GradeGroup(grade_group_id),study, user));\n\t\t\t} else if(type.equals(\"rank\")) {\n\t\t\t\tint rank_group_id = study.getRankGroupId(categoryName);\n\n\t\t\t\trequest.setAttribute(\"category\",category);\n\t\t\t\trequest.setAttribute(\"csvLines\", Rank.getCSVLines(new GradeGroup(rank_group_id),study, user));\n\t\t\t} else {\n\t\t\t\tint compare_group_id = study.getCompareGroupId(categoryName);\n\n\t\t\t\trequest.setAttribute(\"category\",category);\n\t\t\t\trequest.setAttribute(\"csvLines\", Compare.getCSVLines(new GradeGroup(compare_group_id),study, user));\n\t\t\t}\n\t\t}\n\n\t\tString url = \"/WEB-INF/view\" + userPath + \".jsp\";\n\n\t\ttry {\n\t\t\trequest.getRequestDispatcher(url).forward(request, response);\n\t\t} catch (IOException ex){\n\t\t\tex.printStackTrace(System.err);\n\t\t}\n\t}", "@Override\n protected void doPost(HttpServletRequest req,\n HttpServletResponse resp)\n throws ServletException, IOException {\n\n String requestBody = \"\";\n requestBody = IOUtils.toString(req.getReader());\n String[] usernameAndPassword = requestBody.split(\"&\");\n String username = usernameAndPassword[0].substring(9);\n String password = usernameAndPassword[1].substring(9);\n LoginDAO loginDAO = new LoginDAO();\n JsonCredential credential = loginDAO.login(username,password);\n if(credential == null) {\n // send invalid login response\n log.info(\"LoginServlet, Invalid Username/Password\");\n String invalidLoginURL = String.format(\"%s/\", req.getContextPath());\n resp.setStatus(401);\n }\n else{\n // login user, maybe with a redirect\n String credentialAsString = credential.makeJsonString();\n if(!credentialAsString.equals(\"\")) {\n // encoding prevents issue where Tomcat sees Cookie as invalid\n credentialAsString = URLEncoder.encode(credentialAsString,\"UTF-8\");\n Cookie cookie = new Cookie(\"expenseapp_authenticationcookie\",credentialAsString);\n cookie.setMaxAge(1200000); //roughly 2 weeks before expiration\n if(credential.getPermissionName().equals(\"Employee\")) {\n resp.addCookie(cookie);\n String employeeHomeScreen = String.format(\"%s/employeehomescreen.html\", req.getContextPath());\n resp.sendRedirect(employeeHomeScreen);\n }\n else if(credential.getPermissionName().equals(\"Manager\")) {\n resp.addCookie(cookie);\n String managerHomeScreen = String.format(\"%s/managerhomescreen.html\", req.getContextPath());\n resp.sendRedirect(managerHomeScreen);\n }\n else{\n log.error(\"LoginServlet, Invalid Permission Name - 500 error\");\n resp.setStatus(500);\n String errorUrl = String.format(\"%s/500Error.html\", req.getContextPath());\n req.getRequestDispatcher(errorUrl).forward(req,resp);\n }\n }\n }\n\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString action = req.getParameter(\"action\");\r\n\t\t\r\n\t\tif(action == null) {\r\n\t\t\taction = \"List\";\r\n\t\t}\r\n\t\t\r\n\t\tswitch(action) {\r\n\t\t\tcase \"List\":\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t\t\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tlistUser(req, resp);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n//\t\tSystem.out.println(\"handling request...\");\n\t\t// checks whether a session exists, otherwise creates a new one\n\t\t// overloaded version takes a boolean create param, if false it returns null if\n\t\t// no session exists for the current request\n\t\tHttpSession session = req.getSession();\n\t\tresp.setContentType(\"text/html\");\n\t\t// grab params from request\n\t\tString user = req.getParameter(\"username\");\n\t\tString pass = req.getParameter(\"password\");\n//\t\tSystem.out.println(req.getParameter(\"username\"));\n//\t\tSystem.out.println(req.getParameter(\"password\"));\n\t\t// attempting to authenticate employee\n\t\tEmployee e = employeeService.loginEmployee(user, pass);\n\t\t// set use information as session attributes\n\t\tif (e != null) {\n\t\t\tsession.setAttribute(\"userId\", e.getId());\n\t\t\tsession.setAttribute(\"username\", e.getName());\n\t\t\tsession.setAttribute(\"email\", e.getEmail());\n\t\t\tsession.setAttribute(\"password\", e.getPw());\n\t\t\tsession.setAttribute(\"manager\", e.getBoss());\n\t\t\tsession.setAttribute(\"boss\", e.getBossId());\n\t\t\tsession.setAttribute(\"problem\", null);\n\t\t\t// redirect user to profile page if authenticated\n\t\t\t// if employee is a boss, redirect to manager page\n\t\t\tif (e.getBoss().equals(\"Y\")) {\n\t\t\t\tresp.sendRedirect(\"managerHome.html\");\n\t\t\t} else {\n\t\t\t\t// if not, default to employee page\n\t\t\t\tresp.sendRedirect(\"employeeHome.html\");\n\t\t\t}\n\t\t} else {\n\t\t\tsession.setAttribute(\"problem\", \"invalid credentials\");\n\t\t\t// redirect user to login page if authentication fails\n\t\t\tresp.sendRedirect(\"login\");\n\t\t}\n\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n // This servlet shouldn't be reached via GET\n response.sendRedirect(\"index.jsp\");\n }", "private void loginHandler(RoutingContext context) {\n JsonObject creds = new JsonObject()\n .put(\"username\", context.getBodyAsJson().getString(\"username\"))\n .put(\"password\", context.getBodyAsJson().getString(\"password\"));\n\n // TODO : Authentication\n context.response().setStatusCode(500).end();\n }", "public final void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException\n {\n try {\n cleanUpSessionConnection(request.getSession(true));\n setHttpHeaders(request, response);\n// checkAuthentication(request, response);\n generateGetHeader(request, response);\n processGet(request, response);\n generateGetFooter(request, response);\n } catch (IOException e)\n {\n e.printStackTrace();\n throw e;\n }\n catch (ServletException e)\n {\n e.printStackTrace();\n throw e;\n }\n// catch (FGIPermissionException e)\n// {\n// System.err.println(\"Access control violation: \"+e.getMessage());\n// e.printStackTrace(System.err);\n// }\n }", "public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {\r\n \tif (((HttpServletRequest) request).getSession().getAttribute(UserController.AUTH_KEY) == null) {\r\n \t\t//System.out.println(\"User is not authenticated! Redirecting to login page.\");\r\n\t ((HttpServletResponse) response).sendRedirect(\"/index.xhtml\");\r\n\t } \r\n \t\r\n \telse\r\n\t chain.doFilter(request, response);\r\n\r\n }", "protected void login (HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\n String username = req.getParameter(\"username\");\n String password = req.getParameter(\"password\");\n // invoke userService.login()\n User loginUser = userService.login(new User(null, username, password, null));\n // if null, then fail\n if (loginUser == null) {\n // save information to request domain\n req.setAttribute(\"msg\", \"Username or Password incorrect !\");\n req.setAttribute(\"username\", username);\n // jump to login page dispatcher share the same request information\n req.getRequestDispatcher(\"/pages/user/login.jsp\").forward(req, resp);\n }\n else {\n\n // save user information to Session domain\n req.getSession().setAttribute(\"user\", loginUser);\n req.getRequestDispatcher(\"/pages/user/login_success.jsp\").forward(req, resp);\n }\n\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t\tresponse.setContentType(\"text/html;charset=utf-8\");\n\t\tString value1 = \"\",value2 = \"\";\n\t\tCookie cookie = null;\n\t\tCookie[] cookies = request.getCookies();\n\t\tif (cookies != null) {\n\t\t\tfor (int i = 0; i < cookies.length; i++) {\n\t\t\t\tcookie = cookies[i];\n//\t\t\t\tSystem.out.println(cookie.getName());\n\t\t\t\tif (cookie.getName().equals(\"username\")) {\n\t\t\t\t\tvalue1 = cookie.getValue();\n\t\t\t\t}\n\t\t\t\tif (cookie.getName().equals(\"password\")) {\n\t\t\t\t\tvalue2 = cookie.getValue();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (value1.equals(\"admin\") && value2.equals(\"admin\")) {\n\t\t\t\tmessage = \"欢迎您!\" + value1 + \"再次登录该页面!\";\n\t\t\t\trequest.getSession().setAttribute(\"message\", message);\n\t\t\t\tresponse.sendRedirect(\"ch3/welcome.jsp\");\n\t\t\t} else {\n\t\t\t\tresponse.sendRedirect(\"ch3/Login.jsp\");\n\t\t\t}\n\t\t} else {\n\t\t\tresponse.sendRedirect(\"ch3/Login.jsp\");\n\t\t}\n\t}", "protected void service(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String login = request.getParameter(\"login\");\n String senha = request.getParameter(\"senha\");\n UsuarioDAO dao = new UsuarioDAO();\n if (dao.checkLogin(login, senha)) {\n HttpSession session = request.getSession(true);\n session.setAttribute(\"login\", login);\n Cookie[] cookies = request.getCookies();\n Cookie cookie = null;\n for (int i = 0; cookies != null && i < cookies.length; i++) {\n Cookie c = cookies[i];\n if (c.getName().equals(\"myapp.login\")) {\n cookie = c;\n cookie.setValue(cookie.getValue().replace(\"@\" + login, \"\"));\n cookie.setValue(cookie.getValue().replace(login + \"@\", \"\"));\n cookie.setValue(login + \"@\" + cookie.getValue());\n break;\n }\n }\n if (cookie == null) {\n cookie = new Cookie(\"myapp.login\", login);\n }\n cookie.setMaxAge(Integer.MAX_VALUE);\n response.addCookie(cookie);\n RequestDispatcher rd = request.getRequestDispatcher(\"WEB-INF/TheGame.jsp\");\n rd.forward(request, response);\n } else {\n request.setAttribute(\"msg\", \"<span class=\\\"alert label\\\">Login ou senha inválida</span>\");\n RequestDispatcher rd = request.getRequestDispatcher(\"index.jsp\");\n rd.forward(request, response);\n }\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n //LEER INSTRUCCIÓN QUE LLEGA DESDE JSP \r\n String instruccion = request.getParameter(\"instruccion\");\r\n\r\n //EJECUTAR LOGIN SI LA INSTRUCCIÓN ADD ES NULL\r\n if (instruccion == null) {\r\n instruccion = \"cargalogin\";\r\n }\r\n\r\n System.out.println(\"INSTRUCCION : \" + instruccion);\r\n //SELECTOR DE EJECUCIÓN\r\n\r\n switch (instruccion) {\r\n case \"cargalogin\":\r\n cargaVistaLogin(request, response);\r\n break;\r\n case \"credenciales\":\r\n \r\n System.out.println(\"ENTRA EN INSTRUCCION LOGIN USER\");\r\n {\r\n try {\r\n login(request,response);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ControllerLogin.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n break;\r\n default:\r\n cargaVistaLogin(request, response);\r\n }\r\n\r\n if (instruccion == \"loginUser\") {\r\n try {\r\n login(request, response);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ControllerLogin.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n\r\n }", "@Override\n public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {\n Object user = request.getSession().getAttribute(\"userMes\");\n if(user == null){\n request.setAttribute(\"errorMes\",\"无权限,请登录\");\n request.getRequestDispatcher(\"/index\").forward(request, response);\n return false;\n //return\n }else return true;\n }", "public F.Promise<Result> handleSignIn() {\n final Form<LogIn> filledForm = logInForm.bindFromRequest();\n if (customerService().isLoggedIn()) {\n return asPromise(redirect(controllers.routes.HomeController.home()));\n } else if (filledForm.hasErrors()) {\n flash(\"error\", \"Login form contains missing or invalid data.\");\n return asPromise(badRequest(loginView.render(data().build(), filledForm)));\n } else {\n return handleSignInWithValidForm(filledForm);\n }\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tresp.setContentType(\"text/html\");\n\t\tPrintWriter out = resp.getWriter();\n\t\t\n\t\tString username = req.getParameter(\"user\");\n\t\tString password = req.getParameter(\"pass\");\n\t\t\n\t\tif(username.equals(\"admin\") && password.equals(\"123\")) {\n\t\t\tout.println(\"Xin chào: \"+ username);\n\t\t}else {\n\t\t\tout.println(\"Vui lòng đăng nhập lại\");\n\t\t}\n\t\tout.close();\n\t}", "@RequestMapping(value = \"/admin\", method = RequestMethod.GET)\n public ModelAndView adminPage() {\n logger.info(\"Admin GET request\");\n\n String login = authorizationUtils.getCurrentUserLogin();\n String message = MessageFormat.format(\"User login: {0}\", login);\n logger.info(message);\n\n ModelAndView model = new ModelAndView();\n model.addObject(\"search\", new SearchDto());\n model.setViewName(\"admin\");\n return model;\n }", "@Override\n protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n\n Locale locale = request.getLocale();\n setBundle(ResourceBundle.getBundle(\"text\", locale));\n\n HttpSession session = request.getSession(false);\n\n String path = request.getServletPath();\n String destination;\n\n switch (path) {\n\n case \"/loginpage\":\n LOGGER.log(Level.SEVERE, \"Session is {0}\", session);\n\n boolean loggedIn;\n try {\n loggedIn = (boolean) session.getAttribute(\"loggedIn\");\n if (loggedIn) {\n path = (String) session.getAttribute(\"home\");\n }\n } catch (Exception e) {\n break;\n }\n\n break;\n\n case \"/index\":\n path = \"index.jsp\";\n try {\n request.getRequestDispatcher(path).forward(request, response);\n } catch (IOException | ServletException e) {\n LOGGER.log(Level.SEVERE, \"Request dispatch failed\");\n }\n return;\n\n case \"/login\":\n\n /*if (session == null || ((new Date().getTime() - session.getLastAccessedTime()) > 1800000)) {*/\n String username = request.getParameter(\"username\");\n String password = request.getParameter(\"password\");\n Map<PersonDetails, PersonRoleDetail> personToPersonRoleMap;\n try {\n personToPersonRoleMap = personService.retrievePerson(username, password);\n } catch (MilesException ex) {\n response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\n response.setContentType(\"text/html;charset=UTF-8\");\n response.getWriter().write(getBundle().getString(ex.getCode()));\n LOGGER.log(Level.INFO, getBundle().getString(ex.getCode()));\n return;\n\n }\n\n PersonDetails person = null;\n PersonRoleDetail personRole = null;\n for (Map.Entry<PersonDetails, PersonRoleDetail> entryKey : personToPersonRoleMap.entrySet()) {\n person = entryKey.getKey();\n personRole = entryKey.getValue();\n break;\n }\n\n HashMap<String, Boolean> rightsMaps = new HashMap<>();\n\n if (person != null && personRole != null) {\n session = request.getSession(true);\n session.setAttribute(\"loggedIn\", true);\n session.setAttribute(\"person\", person);\n session.setAttribute(\"user\", person.getName());\n session.setAttribute(\"personRole\", personRole);\n\n switch (personRole.getPersonRole()) {\n case \"Farmer\":\n rightsMaps.clear();\n rightsMaps.put(\"farmerSession\", true);\n session.setAttribute(\"home\", \"/farmer\");\n session.setAttribute(\"userTitle\", \": Farmer\");\n break;\n\n case \"Agro-dealer\":\n rightsMaps.clear();\n rightsMaps.put(\"agroDealerSession\", true);\n session.setAttribute(\"home\", \"/agro_dealer\");\n session.setAttribute(\"userTitle\", \": Agro-dealer\");\n session.setAttribute(\"locationLabel\", \"service\");\n try {\n session.setAttribute(\"counties\", countyService.retrieveCounties());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during counties retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"subCounties\", subCountyService.retrieveSubCounties());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during sub-counties retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"wards\", wardService.retrieveWards());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during wards retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"personRoles\", personRoleService.retrievePersonRolesNotAdminOrPcu());\n } catch (Exception e) {\n }\n break;\n\n case \"WAO (Ward Extension Officer)\":\n rightsMaps.clear();\n rightsMaps.put(\"waoSession\", true);\n session.setAttribute(\"home\", \"/ward\");\n session.setAttribute(\"userTitle\", \": Ward Agricultural Officer(WAO)\");\n session.setAttribute(\"locationLabel\", \"ward\");\n try {\n session.setAttribute(\"counties\", countyService.retrieveCounties());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during counties retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"subCounties\", subCountyService.retrieveSubCounties());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during sub-counties retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"wards\", wardService.retrieveWards(person.getLocation().getSubCounty().getId()));\n } catch (Exception ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during wards retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"personRoles\", personRoleService.retrievePersonRolesNotAdminOrPcu());\n } catch (Exception e) {\n }\n break;\n\n case \"KALRO Officer\":\n rightsMaps.clear();\n rightsMaps.put(\"kalroSession\", true);\n session.setAttribute(\"home\", \"/kalro\");\n session.setAttribute(\"userTitle\", \": KALRO Officer\");\n session.setAttribute(\"locationLabel\", \"service\");\n try {\n session.setAttribute(\"counties\", countyService.retrieveCounties());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during counties retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"subCounties\", subCountyService.retrieveSubCounties());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during sub-counties retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"wards\", wardService.retrieveWards());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during wards retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"personRoles\", personRoleService.retrievePersonRolesNotAdminOrPcu());\n } catch (Exception e) {\n }\n break;\n\n case \"AGMARK Officer\":\n rightsMaps.clear();\n rightsMaps.put(\"agmarkSession\", true);\n session.setAttribute(\"home\", \"/agmark\");\n session.setAttribute(\"userTitle\", \": AGMARK Officer\");\n session.setAttribute(\"locationLabel\", \"service\");\n try {\n session.setAttribute(\"counties\", countyService.retrieveCounties());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during counties retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"subCounties\", subCountyService.retrieveSubCounties());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during sub-counties retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"wards\", wardService.retrieveWards());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during wards retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"personRoles\", personRoleService.retrievePersonRolesNotAdminOrPcu());\n } catch (Exception e) {\n }\n break;\n\n case \"County Officer\":\n rightsMaps.clear();\n rightsMaps.put(\"countyDeskOfficerSession\", true);\n session.setAttribute(\"home\", \"/county\");\n session.setAttribute(\"userTitle\", \": County Desk Officer\");\n session.setAttribute(\"locationLabel\", \"county\");\n try {\n session.setAttribute(\"counties\", countyService.retrieveCounties());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during counties retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"subCounties\", subCountyService.retrieveSubCounties(person.getLocation().getCounty().getId()));\n } catch (Exception ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during sub-counties retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"wards\", wardService.retrieveWards());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during wards retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"personRoles\", personRoleService.retrievePersonRolesNotAdminOrPcu());\n } catch (Exception e) {\n }\n break;\n\n case \"Sub-county Officer\":\n rightsMaps.clear();\n rightsMaps.put(\"subCountyDeskOfficerSession\", true);\n session.setAttribute(\"home\", \"/sub_county\");\n session.setAttribute(\"userTitle\", \": Sub-county Agricultural Officer(SCAO)\");\n session.setAttribute(\"locationLabel\", \"sub-county\");\n\n try {\n session.setAttribute(\"counties\", countyService.retrieveCounties());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during counties retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"subCounties\", subCountyService.retrieveSubCounties(person.getLocation().getCounty().getId()));\n } catch (Exception ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during sub-counties retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"wards\", wardService.retrieveWards());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during wards retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"personRoles\", personRoleService.retrievePersonRolesNotAdminOrPcu());\n MilesDebugger.debug(session.getAttribute(\"personRoles\"));\n } catch (Exception e) {\n }\n break;\n\n case \"Regional Coordinator\":\n rightsMaps.clear();\n rightsMaps.put(\"regionalCoordinatorSession\", true);\n session.setAttribute(\"home\", \"/region\");\n session.setAttribute(\"userTitle\", \": Regional Project Coordinator\");\n session.setAttribute(\"locationLabel\", \"region\");\n\n try {\n session.setAttribute(\"counties\", countyService.retrieveCounties(person.getLocation().getCounty().getRegion().getId()));\n } catch (Exception ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during counties retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"subCounties\", subCountyService.retrieveSubCounties());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during sub-counties retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"wards\", wardService.retrieveWards());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during wards retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"personRoles\", personRoleService.retrievePersonRolesNotAdminOrPcu());\n } catch (Exception e) {\n }\n break;\n\n case \"National Officer\":\n case \"System Admin\":\n\n rightsMaps.clear();\n session.setAttribute(\"home\", \"/head\");\n\n if (personRole.getPersonRole().equals(\"National Officer\")) {\n rightsMaps.put(\"nationalOfficerSession\", true);\n session.setAttribute(\"userTitle\", \": PCU Project Coordinator\");\n session.setAttribute(\"locationLabel\", \"country\");\n } else {\n rightsMaps.put(\"systemAdminSession\", true);\n session.setAttribute(\"userTitle\", \": System Admin\");\n session.setAttribute(\"locationLabel\", \"country\");\n }\n\n try {\n session.setAttribute(\"counties\", countyService.retrieveCounties());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during counties retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"subCounties\", subCountyService.retrieveSubCounties());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during sub-counties retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"wards\", wardService.retrieveWards());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during wards retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"personRoles\", personRoleService.retrievePersonRoles());\n } catch (Exception e) {\n }\n\n break;\n\n case \"Equity\":\n rightsMaps.clear();\n rightsMaps.put(\"equityPersonnelSession\", true);\n session.setAttribute(\"home\", \"/equity\");\n session.setAttribute(\"userTitle\", \": Equity Agent\");\n session.setAttribute(\"locationLabel\", \"service\");\n try {\n session.setAttribute(\"counties\", countyService.retrieveCounties());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during counties retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"subCounties\", subCountyService.retrieveSubCounties());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during sub-counties retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"wards\", wardService.retrieveWards());\n } catch (MilesException ex) {\n LOGGER.log(Level.SEVERE, \"An error occurred during wards retrieval\", ex);\n return;\n }\n\n try {\n session.setAttribute(\"personRoles\", personRoleService.retrievePersonRolesNotAdminOrPcu());\n } catch (Exception e) {\n }\n break;\n\n default:\n rightsMaps.clear();\n }\n\n }\n\n session.setAttribute(\"rightsMaps\", rightsMaps);\n\n availApplicationAttributes();\n\n return;\n\n case \"/home\":\n LOGGER.log(Level.INFO, \"Directing user to home\");\n path = (String) session.getAttribute(\"home\");\n LOGGER.log(Level.SEVERE, \"Path is : {0}\", path);\n\n break;\n\n case \"/logout\":\n if (session != null) {\n session.invalidate();\n }\n\n path = \"index.jsp\";\n LOGGER.log(Level.SEVERE, \"Path is : {0}\", path);\n request.getRequestDispatcher(path).forward(request, response);\n\n return;\n\n case \"/load\":\n\n availApplicationAttributes();\n\n return;\n\n }\n\n availApplicationAttributes();\n destination = \"/WEB-INF/views/pages\" + path + \".jsp\";\n\n LOGGER.log(Level.INFO, \"Request dispatch to forward to: {0}\", destination);\n try {\n request.getRequestDispatcher(destination).forward(request, response);\n } catch (ServletException | IOException e) {\n response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\n response.setContentType(\"text/html;charset=UTF-8\");\n response.getWriter().write(getBundle().getString(\"redirection_failed\") + \"<br>\");\n LOGGER.log(Level.INFO, getBundle().getString(\"redirection_failed\"));\n }\n }", "void redirectToLogin();", "private void loginForm(HttpServletRequest req, HttpServletResponse res)\n throws IOException {\n String url = req.getRequestURI();\n String query = req.getQueryString();\n if (query != null) {\n url = url + '?' +query;\n }\n ProtectedRequest target = new ProtectedRequest(url);\n\n // Store in current session\n HttpSession session = req.getSession(true);\n session.setAttribute(AuthSessions.REQUEST_ATTRIBUTE, target);\n\n res.sendRedirect(this.loginForm);\n }", "@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tboolean isAuthenticated = false;\n\t\tString userName = request.getParameter(\"user\");\n\t\tString password = request.getParameter(\"password\");\n\t\tisAuthenticated = (userName .equals( \"demo\") && password .equals( \"demo\"));\n\n\t\t/**\n\t\t * If authentication succeeds, redirect to user page servlet\n\t\t */\n\t\tif (isAuthenticated) {\n\t\t\t/**\n\t\t\t * Create a new session each time user login successfully a secure page\n\t\t\t */\n\t\t\tHttpSession session = ((HttpServletRequest)request).getSession(true);\n\t\t\tsession.setMaxInactiveInterval(20);\n\t\t\tSystem.out.println(session.getId() + \" \" + session.isNew() + \" \" + session.getCreationTime() + \" \" + session.getLastAccessedTime() + \" \" + session.getMaxInactiveInterval());\n\n\t\t\tCookie authCookie = new Cookie(\"user\", userName);\n\t\t\tauthCookie.setMaxAge(cookie_expire_time);\n\t\t\tresponse.addCookie(authCookie);\n\t\t\ttry {\n\t\t\t\tsession.setAttribute(\"myname\", userName);\n\t\t\t}\n\t\t\tcatch(IllegalStateException ise) {\n\t\t\t\tise.printStackTrace();\n\t\t\t}\n\t\t\tresponse.sendRedirect(authenticated_redirect);\n\t\t\t//TODO: Redirect to the page user requested before forced to login\n\t\t}\n\t\telse {\n\t\t\trequest.getRequestDispatcher(noauthenticated_forward).forward(request, response);\n\t\t}\n\t}", "@Override\r\n\tpublic void onAuthenticationSuccess(HttpServletRequest req, HttpServletResponse res,\r\n\t\t\tAuthentication auth) throws IOException, ServletException {\n\t\tlogger.info(\"Login Success !\");\r\n\t\tlogger.info(\"Login ID [ {} ].\",auth.getName());\r\n\t\t\r\n\t\tfor(GrantedAuthority a : auth.getAuthorities()) {\r\n\t\t\tlogger.info(\"authority = [ {} ].\",a.getAuthority());\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(auth.getDetails().toString());\r\n\t\tlogger.info(auth.getPrincipal().toString());\r\n\t\t\r\n\t\tUserDetails u = (UserDetails)auth.getPrincipal();\r\n\t\t\r\n\t\tlogger.info(String.valueOf(u.isAccountNonExpired()));\r\n\t\t\r\n\t\tlogger.info(\"sending URL..\");\r\n\t\t\r\n\t\tclearAuthenticationAttributes(req);\r\n\t\t\r\n\t\tint intRedirectStrategy = decideRedirectStrategy(req, res);\r\n\t\t\r\n\t\tswitch(intRedirectStrategy) {\r\n\t\t\r\n\t\tcase 1:\r\n\t\t\tuseTargetUrl(req, res);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 2:\r\n\t\t\tuseSessionUrl(req, res);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 3:\r\n\t\t\tuseRefererUrl(req, res);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tdefault:\r\n\t\t\tuseDefaultUrl(req, res);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "protected Response login() {\n return login(\"\");\n }", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n String id = req.getParameter(\"id\");\n String name = req.getParameter(\"firstName\") + ' ' + req.getParameter(\"lastName\");\n User user = userDao.getByPropertyEqual(\"username\", req.getRemoteUser()).get(0);\n Preference newPreference = new Preference();\n newPreference.setShow(id);\n newPreference.setUser(user);\n newPreference.setCandidateName(name);\n user.addPreference(newPreference);\n dao.insert(newPreference);\n\n try {\n resp.sendRedirect(\"myAccount\");\n } catch (Exception e) {\n logger.error(\"Problem redirecting to account\" + e);\n }\n\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tresponse.getWriter().append(\"Served at: \").append(request.getContextPath());\r\n//\t\tgetServletContext().getRequestDispatcher(\".jsp\").forward(request, response);\r\n//\t\tresponse.sendRedirect(\"index.jsp\");\r\n//\t\tresponse.getOutputStream().write(\"<p>hello, world</p>\".getBytes());\r\n//\t\tresponse.\r\n\t\tresponse.getWriter().append(\"username:\" + request.getParameter(\"username\"));\r\n\t\tresponse.getWriter().append(\"password:\" + request.getParameter(\"password\"));\r\n\r\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n response.setContentType(\"text/html\");\n // Actual logic goes here.\n PrintWriter out = response.getWriter();\n out.println(\"<h1> hello ... servlet </h1>\");\n shiro_signin();\n\n logger.info(\"this is log4j info\");\n }", "@RequestMapping(value=\"/login\", method = RequestMethod.GET) \n\tpublic String login( Principal principal) {\n\t\tif(principal!=null)\n\t\t{\n\t\t\treturn \"redirect:/dashboard\";\n\t\t}\n\t\treturn \"login\"; \n\t}", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response)\n throws IOException, ServletException {\n String requestUrl = request.getRequestURI();\n String name = requestUrl.substring(\"/profile/\".length());\n User loggedInUser = userStore.getUser((String) request.getSession().getAttribute(\"user\"));\n User user = userStore.getUser(name);\n List<Activity> activities = null;\n List<Activity> activitiesPermitted;\n if (user != null) {\n activitiesPermitted =\n loggedInUser == null\n ? sort(activityStore.getAllPublicActivitiesWithUserId(user.getId()))\n : sort(\n activityStore.getAllPermittedActivitiesWithUserId(\n user.getId(), loggedInUser.getId()));\n activities = activityStore.getActivitiesPerPrivacy(user, activitiesPermitted);\n }\n request.setAttribute(\"activities\", activities);\n request.setAttribute(\"user\", user);\n request.setAttribute(\"loggedInUser\", loggedInUser);\n request.getRequestDispatcher(\"/WEB-INF/view/profile.jsp\").forward(request, response);\n }", "@Override\r\n public boolean preHandle(HttpServletRequest request,\r\n HttpServletResponse response, Object handler) throws Exception {\n \r\n String servletContext = \"http://\"+request.getServerName()+\":\"+request.getLocalPort()+request.getContextPath();\r\n \r\n \r\n// logger.info(servletContext);\r\n// if(!MRNSystemConstant.SYSTEM_URI_LOGIN.equals(request.getServletPath()) && !MRNSystemConstant.SYSTEM_URI_WELCOME.equals(request.getServletPath())\r\n// \t\t&& !\"/json/raiseInvalidSessionError.do\".equals(request.getServletPath()) && !\"/view/raiseInvalidSessionError.do\".equals(request.getServletPath())\r\n// \t\t&& !\"/logout.do\".equals(request.getServletPath()) && !\"/requestedURLNotSupported.do\".equals(request.getServletPath()) && !\"/json/raiseSystemInternalError.do\".equals(request.getServletPath())\r\n// \t\t&& !request.getRequestURL().toString().contains(MRNSystemConstant.SYSTEM_URI_ALLOTMENT_REQUEST) && !\"/json/raiseNoAuthorityError.do\".equals(request.getServletPath()))\r\n// {\r\n// \t\r\n// \tUserObject userObj = (UserObject) request.getSession().getAttribute(\"USER\");\r\n// \t\r\n// \tif(request.getSession().isNew() || userObj == null)\r\n// \t{\r\n// \t\t\r\n// \t\tif(request.getServletPath().indexOf(MRNSystemConstant.SYSTEM_URI_CONTENT_JSON) != -1)\r\n// \t\t{\r\n// \t\t\tresponse.sendRedirect(request.getContextPath()+\"/json/raiseInvalidSessionError.do\");\r\n// \t\t}\r\n// \t\telse if(request.getServletPath().indexOf(MRNSystemConstant.SYSTEM_URI_CONTENT_VIEW) != -1)\r\n// \t\t{\r\n// \t\t\tresponse.sendRedirect(request.getContextPath()+\"/view/raiseInvalidSessionError.do\");\r\n// \t\t}\r\n// \telse\r\n// \t{\r\n// \t\tif(!\"/main.do\".equals(request.getServletPath()))\r\n// \t\t{\r\n// \t\t\t//response.sendRedirect(request.getContextPath()+\"/json/raiseInvalidSessionError.do\");\r\n// \t\tresponse.sendRedirect(request.getContextPath()+\"/requestedURLNotSupported.do\");\r\n// \t\tlogger.error(\"Invalid url\");\r\n// \t\t//request.getSession().invalidate();\r\n// \t\t}\r\n// \t\telse\r\n// \t\t{\r\n// \t\t\t//if main is called then check if session is expired in main and then display error message with login link \r\n// \t\t\t//else dont show the link to login.\r\n// \t\t\tresponse.sendRedirect(request.getContextPath()+\"/view/raiseInvalidSessionError.do\");\r\n// \t\t}\r\n// \t\t\r\n// \t}\r\n// \t\t\r\n// \t\treturn false;\r\n// \t}\r\n \t\r\n \t//System.out.println(\"MRNContext : \"+mrnContext);\r\n \t//mrnContext.setScreenCd(\"MBPPPP\");\r\n// \tString screenCd = request.getParameter(MRNSystemConstant.SYSTEM_FORM_FIELD_SCREEN_CD);\r\n// \t\r\n// \tif(StringUtil.isEmpty(screenCd))\r\n// \t{ \t\t\r\n// \t\tresponse.sendRedirect(request.getContextPath()+\"/view/requestedScreenCdMissing.do\");\r\n// \t\t\r\n// \t} \r\n \t\r\n \tmrnContext.setScreenCd(\"Test\");\r\n \t\r\n \t\r\n// }\r\n \r\n// String screenCd = request.getParameter(MRNSystemConstant.SYSTEM_FORM_FIELD_SCREEN_CD);\r\n// mrnContext.setScreenCd(screenCd);\r\n //request.setAttribute(\"startTime\", startTime);\r\n //if returned false, we need to make sure 'response' is sent\r\n return true;\r\n }", "@Override\n /**\n * Handles a HTTP GET request. This implements obtaining an authentication token from the server.\n */\n protected void handleGet(Request request, Response response) throws IllegalStateException {\n String username = String.valueOf(request.getAttributes().get(\"username\"));\n String password = String.valueOf(request.getAttributes().get(\"password\"));\n /* Construct MySQL Query. */\n String query = \"SELECT COUNT(id) AS `CNT`, `authToken` FROM accounts WHERE `username` = '\" + username + \"' AND \" +\n \"`password` = '\" + password + \"' LIMIT 0,1;\";\n /* Obtain the account count and existing token pair, as object array. */\n Object[] authenticationArray = dataHandler.handleAuthentication(database.ExecuteQuery(query,\n new ArrayList<String>()));\n int cnt = (int) authenticationArray[0];\n String existingToken = (String) authenticationArray[1];\n String authenticationToken = null;\n if (cnt == 1) { // There is exactly one account matching the parameterised username and password.\n if (existingToken == null) { // No token yet existed, generate one.\n authenticationToken = TokenGenerator.getInstance().generateAuthenticationToken(TOKEN_LENGTH);\n } else {\n authenticationToken = existingToken;\n }\n } else {\n this.returnStatus(response, new IllegalArgumentStatus(null));\n }\n if (!(authenticationToken == null || authenticationToken == \"\")) { // Update the database with the new token.\n Database.getInstance().ExecuteUpdate(\"UPDATE `accounts` SET `authToken` = '\" + authenticationToken +\n \"', `authTokenCreated` = CURRENT_TIMESTAMP WHERE `username` = '\" + username + \"';\",\n new ArrayList<String>());\n this.returnResponse(response, authenticationToken, new TokenSerializer());\n } else {\n this.returnStatus(response, new IllegalArgumentStatus(null));\n }\n }", "@RequestMapping(value=\"/\" , method = RequestMethod.GET)\n public ModelAndView welcome_login(){\n Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n String currentUserName = authentication.getName();\n\n UserEntity userEntity= iUserService.findUserByCurrentUserName(currentUserName);\n ModelAndView welcome = new ModelAndView(\"welcome\");\n welcome.getModel().put(\"currentUserName\", currentUserName);\n welcome.getModel().put(\"userEntity\", userEntity);\n\n return welcome;\n }", "@RequestMapping(value = \"/login\", method = RequestMethod.GET)\n\tpublic String login(Model model) {\n\t\tlogger.debug(\" A user trying to login\");\n\t\treturn \"login\";\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n // Retrieve id GET parameter\n String confirmationID = request.getParameter(\"id\");\n if (confirmationID == null || confirmationID.isEmpty()) {\n response.sendRedirect(request.getContextPath() + \"/error\");\n return;\n }\n\n // Activate user\n User user = null;\n try { \n user = userDAO.getByConfirmationID(confirmationID);\n if (user == null || user.getType() != User.Type.REGISTRATION_PENDING) {\n throw new DAOException();\n }\n if (request.getParameter(\"seller\") != null) {\n user.setType(User.Type.SELLER);\n // Create default shop\n Shop shop = new Shop();\n shop.setOwner(user);\n shop.setName(user.getUsername());\n shop.setDescription(null);\n shop.setRating(0);\n shop.setWebsite(null);\n shopDAO.insert(shop);\n } else {\n user.setType(User.Type.REGISTERED);\n }\n user.setConfirmationID(null);\n // Update user in DB\n userDAO.update(user);\n } catch (DAOException ex) {\n Logger.getLogger(ActivateAccount.class.getName()).log(Level.SEVERE, ex.getMessage(), ex);\n response.sendRedirect(request.getContextPath() + \"/error\");\n return;\n }\n \n // Login user & redirect to home page\n request.getSession().setAttribute(\"user\", user);\n response.sendRedirect(request.getContextPath());\n\n }", "@Override\r\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString uri = req.getRequestURI();\r\n\t\tString action = uri.substring(uri.lastIndexOf('/') + 1);\r\n\t\tsession = req.getSession();\r\n\t\tpath = req.getContextPath();\r\n\t\tpw = resp.getWriter();\r\n\t\tSystem.out.println(uri);\r\n\t\tswitch (action) {\r\n\t\tcase \"check\":\r\n\t\t\ttry {\r\n\t\t\t\tthis.checkAction(req,resp);\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\tbreak;\r\n\t\tcase \"index\":\r\n\t\t\tthis.checkSessionAction(req,resp);\r\n\t\t\tbreak;\r\n\t\tcase \"logout\":\r\n\t\t\tthis.logoutAction(req,resp);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\r\n\t\t}\r\n\t\treturn;\r\n\t}", "@Override\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)\n\t\t\tthrows Exception {\n\t\t System.err.println(\"URI -- \"+request.getRequestURL());\n\t\t if(request.getRequestURI()!=null &&\n\t\t (request.getRequestURI().contains(\"/self/login\"))) return true;\n\t\t \n\t\t \n\t\t String authHeader = request.getHeader(AUTH_HEADER);\n\t\t \n\t\t if (authHeader == null) { \n\t\t\t response.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t\t response.getOutputStream().write(TOKEN_EXPIRE_MSG.getBytes()); return false;\n\t\t }\n\t\t \n\t\t if (authHeader.contains(\"Basic \")) {\n\t\t \n\t\t String encodedUserNamePassword = authHeader.split(\"Basic \")[1]; String\n\t\t strValue = \"\";\n\t\t try\n\t\t { \n\t\t\t strValue = new String(java.util.Base64.getDecoder().decode(encodedUserNamePassword.getBytes(\n\t\t\t\t\t \t\t)), \"UTF-8\"); \n\t\t }\n\t\t catch (Exception e)\n\t\t { \n\t\t\t e.printStackTrace(); \n\t\t\t // TODO: handle exception return false; \n\t\t }\n\t\t \n\t\t String[] arrayOfString = strValue.split(\"\\\\:\");\n\t\t \n\t\t if (arrayOfString.length > 1) \n\t\t { \n\t\t\t \tString userName = arrayOfString[0]; String\n\t\t\t \tpassword = arrayOfString[1]; System.err.println(userName);\n\t\t\t \tSystem.err.println(password);\n\t\t \n\t\t\t \tpassword = Base64.getEncoder().encodeToString((password + \"\").getBytes(\"utf-8\")); \n\t\t\t \tUsernamePasswordAuthenticationToken\n\t\t\t \tusernamePasswordAuthenticationToken = new\n\t\t\t \tUsernamePasswordAuthenticationToken( userName, password);\n\t\t \n\t\t\t \tAuthentication authentication = null; \n\t\t\t \ttry { authentication =\n\t\t\t \t\t\tautheticationManager.authenticate(usernamePasswordAuthenticationToken);\n\t\t \n\t\t } catch (Exception ex) { \n\t\t\t ex.printStackTrace();\n\t\t\t response.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t\t response.getOutputStream().write(UNAUTHORISED_ACCESS_MSG.getBytes());\n\t\t \n\t\t\t return false; \n\t\t } \n\t\t if (authentication.isAuthenticated()) {\n\t\t\t SecurityContextHolder.getContext().setAuthentication(authentication);\n\t\t\t return true; \n\t\t } else { \n\t\t\t\n\t\t\tresponse.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t\t response.getOutputStream().write(UNAUTHORISED_ACCESS_MSG.getBytes()); \n\t\t\t return false; \n\t\t\t } \n\t\t } else { \n\t\t\t String encodedValue = authHeader.split(\"Basic \")[1];\n\t\t \n\t\t\t if (isValidToken(encodedValue)) return true;\n\t\t \n\t\t \tresponse.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t \tresponse.getOutputStream().write(TOKEN_EXPIRE_MSG.getBytes()); return false;\n\t\t }\n\t\t \n\t\t } \n\t\t response.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t response.getOutputStream().write(UNAUTHORISED_ACCESS_MSG.getBytes()); return\n\t\t false;\n\t\t \n\t\t\n\t}" ]
[ "0.73104984", "0.7153951", "0.71398824", "0.7101608", "0.7085784", "0.70780087", "0.7062988", "0.7048556", "0.7003312", "0.69811094", "0.6962947", "0.69549495", "0.6952656", "0.6886571", "0.68741924", "0.68290186", "0.68020815", "0.66978025", "0.66953194", "0.66851264", "0.6679745", "0.6672134", "0.6669335", "0.66139454", "0.66075647", "0.6555322", "0.65490746", "0.65367454", "0.65302753", "0.6475234", "0.64580464", "0.6452887", "0.64433926", "0.6442328", "0.64410496", "0.6430871", "0.63942343", "0.638689", "0.6383188", "0.63697773", "0.63370556", "0.63264453", "0.63157934", "0.63153297", "0.63116395", "0.62903154", "0.6289503", "0.6288815", "0.62867177", "0.62655073", "0.6263618", "0.624162", "0.6233116", "0.6229638", "0.62284064", "0.6220064", "0.6216372", "0.6215767", "0.62055707", "0.61596465", "0.61592156", "0.6151719", "0.6125872", "0.612094", "0.6115118", "0.6109276", "0.6096189", "0.60773736", "0.6070024", "0.6067859", "0.6061225", "0.60350174", "0.60239714", "0.6016012", "0.60145557", "0.6011623", "0.6010654", "0.6008319", "0.5998845", "0.59932375", "0.59922767", "0.59821725", "0.5972966", "0.59535515", "0.594591", "0.59455454", "0.59452474", "0.59428924", "0.5937422", "0.5935516", "0.5922019", "0.5921426", "0.5920806", "0.5918258", "0.5917195", "0.5916384", "0.5902437", "0.5899719", "0.5896692", "0.5892372" ]
0.64886785
29
Handles the request and uses the DAO to update the identity in the DB.
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (!isLoggedIn(request)) { writeLoginNeededInfo(response); return; } JSONObject status = new JSONObject(); PrintWriter out = response.getWriter(); try { Identity id = parseIdentity(request); dao.update(id); status.put("status", Integer.toString(HttpURLConnection.HTTP_OK)); status.put("msg", "Identity updated! :)"); } catch (JSONException ex) { logger.error(ex.toString()); status.put("status", Integer.toString(HttpURLConnection.HTTP_BAD_REQUEST)); status.put("msg", ex.toString()); } out.print(status); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tif (!isLoggedIn(request))\n\t\t\tgetServletContext().getRequestDispatcher(LOGIN_PAGE).forward(request, response);\n\t\telse {\n\t\t\tString s = request.getParameter(\"id\");\n\n\t\t\tIdentity identity = new Identity(Integer.parseInt(s));\n\t\t\tidentity = dao.search(identity).get(0);\n\n\t\t\trequest.setAttribute(\"identity\", identity);\n\n\t\t\tgetServletContext().getRequestDispatcher(\"/identity-update.jsp\").forward(request, response);\n\t\t}\n\t}", "int updateByPrimaryKey(SysAuthentication record);", "@Override\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) {\n\n\t\tString id = request.getParameter(\"id\");\n\t\tString pw = request.getParameter(\"pw\");\n\n\t\tMemberDao dao = MemberDao.getInstance();\n\t\tint checkNum = dao.login(id, pw);\n\n\t\trequest.setAttribute(\"checkNum\", checkNum);\n\t\trequest.setAttribute(\"id\", id);\n\t\trequest.setAttribute(\"pw\", pw);\n\n\t}", "public static int handleUpdateContact(Request req, Response res) {\n \n try {\n \n ObjectMapper objectMapper = new ObjectMapper();\n \n logger.info(\"raw body in handleUpdate = \\n\" + req.body());\n \n String data = Jsoup.parse(req.body()).text()\n .replaceAll(Path.Web.OK_PATTERN, \"\");\n \n logger.info(\"Jsoup parsed and escaped data = \\n\" + data);\n \n \n Contact c = objectMapper.readValue(data, Contact.class);\n \n String userIdNew = req.session(false).attribute(Path.Web.ATTR_USER_ID);\n String id = req.params(\"id\");\n \n if(userIdNew != null && !userIdNew.isEmpty() && id != null && !id.isEmpty()) {\n ObjectId objectId = new ObjectId(id); \n c.setUserId(userIdNew);\n c.setId(objectId.toString());\n c.setUpdatedAt(new Date());\n ds = dbHelper.getDataStore();\n\t ds.save(c);\n res.status(200);\n logger.info(\"updated contact object after mapping and setting id = \\n\" + c.toString());\n \n } else {\n //you managed not to login and get here\n logger.info(\"No user id found for the update operation\");\n res.status(500);\n }\n \n } catch(Exception e) {\n logger.info(\"error parsing data from handleUpdateContact \\n\");\n e.printStackTrace();\n res.status(500);\n }\n \n return res.status();\n\t}", "protected void updateEmployee(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException {\n\t\tString name,email,password,country;\n\t\tint eId;\n\t\tname = request.getParameter(\"name\");\n\t\temail = request.getParameter(\"email\");\n\t\tpassword = request.getParameter(\"password\");\n\t\tcountry = request.getParameter(\"country\");\n\t\teId = Integer.parseInt(request.getParameter(\"eId\"));\n\t\tEmployeeModel emp = new EmployeeModel(name,password,email,country,eId);\n\t\temployeeServiceObj.updateEmployee(emp);\n\t\t\n\t\t\n\t\tRequestDispatcher view=request.getRequestDispatcher(\"viewEmployees.do\");\n\t\tview.forward(request, response);\n\t\t\t\n\t}", "public void update() throws NotFoundException {\n\tUserDA.update(this);\n }", "@Override\n\tprotected void doRequest(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tBookDao bookdao = new BookDao();\n\t\tString id = request.getParameter(\"id\");\n\t\tbookdao.update(Integer.parseInt(id));\n\t\trequest.getRequestDispatcher(\"/QueryBookInfoServlet\").forward(request,\n\t\t\t\tresponse);\n\t}", "private void updateEmployee(HttpServletRequest request, HttpServletResponse response)\r\n\t\tthrows Exception {\n\t\tint id = Integer.parseInt(request.getParameter(\"employeeId\"));\r\n\t\tString firstName = request.getParameter(\"firstName\");\r\n\t\tString lastName = request.getParameter(\"lastName\");\r\n\t\tint age = Integer.parseInt(request.getParameter(\"age\"));\r\n\t\tString gender = request.getParameter(\"gender\");\r\n\t\tString email = request.getParameter(\"email\");\r\n\t\t\r\n\t\t// create a new student object\r\n\t\tEmployee theEmployee = new Employee (id, firstName, lastName,gender,age, email);\r\n\t\t\r\n\t\t// perform update on database\r\n\t\temployeeDAO.updateEmployee(theEmployee);\r\n\t\t\r\n\t\t// send them back to the \"list students\" page\r\n\t\tlistEmployees(request, response);\r\n\t\t\r\n\t}", "@Override\n // Update user\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n HttpSession session = request.getSession();\n User user = new User();\n user.setUserGroup(Integer.parseInt(request.getParameter(\"user_group\")));\n //user.setUpdatedBy= session.getAttribute(\"username\");\n String userid = request.getParameter(\"id\");\n user.setId(Integer.parseInt(userid));\n dao.updateUser(user);\n RequestDispatcher view = request.getRequestDispatcher(LIST_USER);\n request.setAttribute(\"users\", dao.getAllUsers());\n view.forward(request, response);\n }", "@Override\n\tpublic void execute(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\tint newsId = 1000;\n\t\tString catCode = \"\";\n\t\tString userInfoCode = \"\";\n\t\tString newsTittle = \"\";\n\t\tString newsDesc = \"\";\n\t\tString newsPath = \"\";\n\t\tString newsImg = \"\";\n\t\tString newsDate = \"\";\n\t\tNewsDAO dao = new NewsDAO(); /* Instantiate DAO object */\n\t\t\n\t\tif(dao.update(new News(newsId, catCode, userInfoCode, \n\t\t\t\tnewsTittle, newsDesc, newsPath, newsImg, newsDate))){\n\t\t\tresponse.getWriter().write(\"News Updated\"); /* Update Successful */\n\t\t}\n\t\telse{\n\t\t\tresponse.getWriter().write(\"New Update Unsuccessfuly\"); /* Update Unsuccessful */\n\t\t}\n\t\t\n\n\t\n\t}", "int updateByPrimaryKey(LoginRecordDO record);", "private void atualizarUsuario(HttpServletRequest request, HttpServletResponse response) throws SQLException, IOException {\n\t\tint id = Integer.parseInt(request.getParameter(\"id\"));\n\t\tString nome = request.getParameter(\"nome\");\n\t\tString email = request.getParameter(\"email\");\n\t\tint telefone = Integer.parseInt (request.getParameter(\"telefone\"));\n\t\tString nacionalidade = request.getParameter(\"nacionalidade\");\n\n\t\tUsuario book = new Usuario(id, nome, email, telefone, nacionalidade);\n\t\tdao.atualizarUsuario(book);\n\t\tresponse.sendRedirect(\"lista\");\n\t\t\n\t}", "private void doProcess(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception{\n\t\tUserBean userbean = new UserBean();\n\t\tRequestDispatcher dispatcher = null;\n\t\tHttpSession session = request.getSession(false);\n\t\tuserbean.setName(request.getParameter(\"name\"));\n\t\tuserbean.setPassword(request.getParameter(\"password\"));\n\t\tuserbean.setPhoneNumber(request.getParameter(\"phoneNumber\"));\n\t\tuserbean.setRole(request.getParameter(\"role\"));\n\t\tuserbean.setUserId(request.getParameter(\"userId\"));\n\t\tUpdatDao updateDao = new UpdatDao();\n\t\tif(\"success\".equals(updateDao.addUser(userbean))){\n\t\t\tdispatcher = session.getServletContext().getRequestDispatcher(\"/adminHome.jsp\");\n\t\t\tdispatcher.forward(request, response);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdispatcher = session.getServletContext().getRequestDispatcher(\"/adminHome.jsp\");\n\t\t\tdispatcher.forward(request, response);\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) {\n\t\tMemberDao mdao= new MemberDao();\n\t\tString id=request.getParameter(\"ch_id\");\n\t\tSystem.out.println(id);\n\t\tint check=mdao.id_check(id);\n\t\t\n\t\trequest.setAttribute(\"check\", check);\n\t\tif(check==0) {\n\t\trequest.setAttribute(\"id_ch\", id);\n\t\t}\n\t}", "public Future<CtxModelObject> update(CtxModelObject identifier);", "int updateByPrimaryKey(SysUser record);", "private void updateCustomer(HttpServletRequest request, HttpServletResponse response) throws IOException {\n int id = Integer.parseInt(request.getParameter(\"id\"));\n String name = request.getParameter(\"name\");\n String phone = request.getParameter(\"phone\");\n String email = request.getParameter(\"email\");\n Customer updateCustomer = new Customer(id, name, phone, email);\n CustomerDao.addCustomer(updateCustomer);\n response.sendRedirect(\"list\");\n\n }", "private void update(HttpServletRequest request, HttpServletResponse response)\n {\n String emp_no = request.getParameter(\"no\");\n String emp_name = request.getParameter(\"username\");\n String emp_tel_num = request.getParameter(\"phone\");\n String emp_addr = request.getParameter(\"addr\");\n String emp_email = request.getParameter(\"email\");\n String emp_sex = request.getParameter(\"sex\");\n int emp_type = Integer.parseInt(request.getParameter(\"type\"));\n String emp_pass = request.getParameter(\"pass\");\n //获取emp_id\n Employee emp = new EmployeeDAO().findUserByNo(emp_no);\n int emp_id = emp.getEmp_id();\n \n String boy = \"home/img/headpic/boy.jpg\";\t\t//男头\n String girl = \"home/img/headpic/girl.jpg\";\t\t//女头\n \n Employee employee = new Employee();\n employee.setEmp_id(emp_id);\n employee.setEmp_no(emp_no);\n employee.setEmp_name(emp_name);\n employee.setEmp_tel_num(emp_tel_num);\n employee.setEmp_addr(emp_addr);\n employee.setEmp_email(emp_email);\n employee.setEmp_sex(emp_sex);\n EmployeeDAO dao = (EmployeeDAO) DAOFactory.createEmployeeDAO();\n boolean result = dao.update(employee);\n User user = new User();\n user.setEmp_no(emp_no);\n user.setEmp_pass(emp_pass);\n if(emp_sex.equals(\"男\")) { \t\n \tuser.setHead_path(boy);\n } else if(emp_sex.equals(\"女\")){\n \tuser.setHead_path(girl);\n }\n user.setType(emp_type);\n UserDAO dao2 = (UserDAO) DAOFactory.createUserDAO();\n boolean result2 = dao2.update(user);\n try\n {\n if (result && result2)\n request.setAttribute(\"result\", \"更新成功!\");\n else\n request.setAttribute(\"result\", \"更新失败!\");\n request.setAttribute(\"employee\", employee);\n request.setAttribute(\"user\", user);\n request.getRequestDispatcher(\"home_root/people.jsp\").forward(request, response);\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) {\n\t\tint answerpk = Integer.parseInt(request.getParameter(\"answerpk\"));\n\t\tString answertext = request.getParameter(\"answertext\");\n\t\tSystem.out.println(answerpk + answertext);\n\t\tQnaDao dao = new QnaDao();\n\t\tdao.AdminAnswerUpdateAction(answerpk, answertext);\n\t}", "private void alter(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tUser user = (User) request.getSession().getAttribute(SessionKey.USER_LOGIN);\r\n\r\n\t\tSimpleDateFormat format1 = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\tInteger Creater = user.getUser_id();\r\n\t\tString Create_Time = format1.format(new Date());\r\n\t\tString Old_Create_Time = request.getParameter(\"create_time\");\r\n\t\tString Old_Creater = request.getParameter(\"creater\");\r\n\t\tInteger Updater = user.getUser_id();\r\n\r\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tString id = request.getParameter(\"id\") == \"\" ? null : request.getParameter(\"id\");\r\n\t\tString Old_pub_time = request.getParameter(\"pub_time\");\r\n\t\tString expire_time = request.getParameter(\"expire_time\") == \"\" ? \"2019-11-7\"\r\n\t\t\t\t: request.getParameter(\"expire_time\");\r\n\t\tString subject = request.getParameter(\"subject\");\r\n\t\tString tongzhifanwei = request.getParameter(\"tongzhifanwei\");\r\n\t\tString text = request.getParameter(\"text\");\r\n\r\n\t\tif (id == null) {\r\n\r\n\t\t\tNotice notice = new Notice(Integer.valueOf(tongzhifanwei), subject, text, format1.parse(Create_Time),\r\n\t\t\t\t\tformat.parse(expire_time), Creater, format1.parse(Create_Time));\r\n\t\t\tservice.add(notice);\r\n\t\t} else {\r\n\t\t\tNotice notice = new Notice(Integer.valueOf(id), Integer.valueOf(tongzhifanwei), subject, text,\r\n\t\t\t\t\tformat1.parse(Old_pub_time), format.parse(expire_time), Integer.valueOf(Old_Creater),\r\n\t\t\t\t\tformat1.parse(Old_Create_Time), Updater, format1.parse(Create_Time));\r\n\t\t\tservice.update(notice);\r\n\t\t}\r\n\t\trequest.getRequestDispatcher(\"NoticeServlet?service=NoticeGuanLi\").forward(request, response);\r\n\r\n\t}", "protected void edit(HttpServletRequest request, HttpServletResponse response, EcAnonymousPaymentInfoForm _EcAnonymousPaymentInfoForm, EcAnonymousPaymentInfo _EcAnonymousPaymentInfo) throws Exception{\n\r\n _EcAnonymousPaymentInfo.setAnonymousUserId(WebParamUtil.getLongValue(_EcAnonymousPaymentInfoForm.getAnonymousUserId()));\r\n _EcAnonymousPaymentInfo.setFirstName(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getFirstName()));\r\n _EcAnonymousPaymentInfo.setMiddleInitial(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getMiddleInitial()));\r\n _EcAnonymousPaymentInfo.setLastName(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getLastName()));\r\n _EcAnonymousPaymentInfo.setAddress1(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getAddress1()));\r\n _EcAnonymousPaymentInfo.setAddress2(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getAddress2()));\r\n _EcAnonymousPaymentInfo.setCity(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getCity()));\r\n _EcAnonymousPaymentInfo.setState(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getState()));\r\n _EcAnonymousPaymentInfo.setZip(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getZip()));\r\n _EcAnonymousPaymentInfo.setCountry(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getCountry()));\r\n _EcAnonymousPaymentInfo.setPaymentType(WebParamUtil.getIntValue(_EcAnonymousPaymentInfoForm.getPaymentType()));\r\n _EcAnonymousPaymentInfo.setPaymentNum(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getPaymentNum()));\r\n _EcAnonymousPaymentInfo.setPaymentExpireMonth(WebParamUtil.getIntValue(_EcAnonymousPaymentInfoForm.getPaymentExpireMonth()));\r\n _EcAnonymousPaymentInfo.setPaymentExpireYear(WebParamUtil.getIntValue(_EcAnonymousPaymentInfoForm.getPaymentExpireYear()));\r\n _EcAnonymousPaymentInfo.setPaymentExtraNum(WebParamUtil.getStringValue(_EcAnonymousPaymentInfoForm.getPaymentExtraNum()));\r\n _EcAnonymousPaymentInfo.setTimeCreated(WebParamUtil.getDateValue(_EcAnonymousPaymentInfoForm.getTimeCreated()));\r\n\r\n m_actionExtent.beforeUpdate(request, response, _EcAnonymousPaymentInfo);\r\n m_ds.update(_EcAnonymousPaymentInfo);\r\n m_actionExtent.afterUpdate(request, response, _EcAnonymousPaymentInfo);\r\n }", "int updateByPrimaryKey(Userinfo record);", "int updateByPrimaryKey(LitemallUserFormid record);", "int updateByPrimaryKey(AliUserInfoDO record);", "@RequestMapping(value = \"update\", method = RequestMethod.POST)\r\n\tpublic String update(HttpServletRequest request) {\n\t\tint id = Integer.parseInt(request.getParameter(\"id\"));\r\n\t\tString name = request.getParameter(\"name\");\r\n\t\tint marks = Integer.parseInt(request.getParameter(\"marks\"));\r\n\t\t// Create the student\r\n\t\tStudent student = new Student(id, name,marks);\r\n\t\tSystem.out.println(student);\r\n\t\t// insert student to db\r\n\r\n\t\tString res = studentService.update(student);\r\n\r\n\t\tif (res.equals(\"SUCCESS\"))\r\n\t\t\trequest.setAttribute(\"msg\", \"Record Updated\");\r\n\t\telse\r\n\t\t\trequest.setAttribute(\"msg\", \"Record Not Updated\");\r\n\t\treturn \"update\";\r\n\t}", "public void updateUserDetails() {\n\t\tSystem.out.println(\"Calling updateUserDetails() Method To Update User Record\");\n\t\tuserDAO.updateUser(user);\n\t}", "E update(ID id, E entity, RequestContext context);", "@Override\n\tpublic void run(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t\tMemberDAO dao = new MemberDAO();\n\t\tMemberDTO dto = new MemberDTO();\n\t\t\n\t\tdto.setMemberId(request.getParameter(\"id\"));\n\t\tdto.setMemberPw(request.getParameter(\"pw\"));\n\t\tdto.setMemberName(request.getParameter(\"name\"));\n\t\tdto.setMemberEmail(request.getParameter(\"email\"));\n\t\tdto.setMemberBirth(request.getParameter(\"birth\"));\n\t\t\n\t\tdao.insertMember(dto);\n\t\t\n\t}", "int updateByPrimaryKey(UserEntity record);", "@Override\n\t\t\t\tpublic void execute()\n\t\t\t\t{\n\n\t\t\t\t\tMobiculeLogger.verbose(\"execute()\");\n\t\t\t\t\tresponse = updateCustomerFacade.updateCustomerDetails();\n\t\t\t\t}", "int updateByPrimaryKey(SysRoleUser record);", "@Override\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tSystem.out.println(\"NoticeEditController\");\n\t\tString seq = request.getParameter(\"c\");\n\t\t\n\t\tString title = new String(request.getParameter(\"title\").getBytes(\"iso-8859-1\"),\"utf-8\");\n\t\tString content = new String(request.getParameter(\"content\").getBytes(\"iso-8859-1\"),\"utf-8\");\n\t\t\n\t\tNoticeDao dao = new NoticeDao();\n\t\tNotice n = new Notice();\n\t\tn.setSeq(seq);\n\t\tn.setTitle(title);\n\t\tn.setContent(content);\n\t\t\n\t\tint af = dao.update(n);\n\t\t\n\t\t\n\t\t//request에 n을 저장\n\t\trequest.setAttribute(\"n\", n);\n\t\t//jsp로 forward\n\t\tif(af>0) {\n\t\t\trequest.getRequestDispatcher(\"noticeDetail.do\").forward(request, response);\n\t\t}else {\n\t\t\tSystem.out.println(\"수정 오류\");\n\t\t}\n\t}", "int updateByPrimaryKey(AdminUser record);", "int updateByPrimaryKey(AdminUser record);", "int updateByPrimaryKey(UserInfoUserinfo record);", "int updateByPrimaryKey(SystemRoleUserMapperMo record);", "public void modificar(Long id, G entity, HttpServletRequest httpRequest) throws AppException;", "public void updateIdentities() {\n // get a list of the internal conversation addresses\n ArrayList<String> addresses = new ArrayList<>();\n for (int i = 0; i < size(); i++)\n addresses.add(get(i).getFromAddress());\n\n // retrieve and set the identities of the internal addresses\n ArrayList<String> identities = retrieveIdentities(addresses);\n for (int i = 0; i < size(); i++)\n get(i).setIdentity(identities.get(i));\n }", "@Override\n\tpublic String process(HttpServletRequest request, HttpServletResponse response) {\n\t\tmemberDAO dao = memberDAO.getInstance();\n\t\t\n\t\ttry {\n\t\t\trequest.setCharacterEncoding(\"utf-8\");\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tmember member = new member();\n\t\tDate date = new Date();\n\t\tmember.setID(request.getParameter(\"id\"));\n\t\tmember.setPw(request.getParameter(\"pw\"));\n\t\tmember.setName(request.getParameter(\"name\"));\n\t\tmember.setNickname(request.getParameter(\"nickname\"));\n\t\tmember.setTel(request.getParameter(\"tel\"));\n\t\tmember.setEmail(request.getParameter(\"eamil\"));\n\t\tmember.setAddr(request.getParameter(\"addr\"));\n\t\tmember.setLevel(1);\n\t\tmember.setReg_date(date);\n\t\t\n\t\tdao.Insert(member);\n\t\t\n\t\treturn \"Login\";\n\t}", "int updateByPrimaryKeySelective(SysAuthentication record);", "int updateByPrimaryKey(BaseUser record);", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n \n HttpSession sessao = request.getSession();\n \n int id_usuario_logado = (int) sessao.getAttribute(\"idUsuarioLogado\");\n \n \n \n Usuario_DAO dao = new Usuario_DAO();\n \n ObservableList <Usuario> lista_usuario = dao.select_Usuario();\n \n for(Usuario usu : lista_usuario){\n if(usu.getId_usuario() == id_usuario_logado){\n \n \n request.setAttribute(\"login_editar\", usu.getLogin());\n request.setAttribute(\"nome_editar\", usu.getNome());\n request.setAttribute(\"email_editar\", usu.getEmail());\n request.setAttribute(\"telefone_editar\", usu.getTelefone());\n request.setAttribute(\"img_editar\", usu.getFoto_perfil());\n \n break;\n }\n } \n \n \n RequestDispatcher rd = request.getRequestDispatcher(\"editar_usuario.jsp\");\n rd.forward(request, response);\n \n }", "public static void retrieveAndSaveUserId(Context context) {\r\n\t\t// if (updateRequired(context)) {\r\n\t\tnew LoadAndSaveUserIdFromACServiceTask(context).execute();\r\n\t\t// }\r\n\t}", "int updateByPrimaryKey(UserDO record);", "public void execute() {\n\t\tif (nameidRequest != null) {nameidRequest.execute();}\n\t}", "private static void LessonDAOUpdate() {\n PersonDAO personDAO = new PersonDAOImpl();\n\n Person person = personDAO.getPersonById(7);\n person.setFirstName(\"Teddy\");\n\n if(personDAO.updatePerson(person)) {\n System.out.println(\"Person Update Success!\");\n } else {\n System.out.println(\"Person Update Fail!\");\n }\n }", "int updateByPrimaryKey(AccessModelEntity record);", "public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\n\t\t\r\n\t\ttry{\r\n\t\tString firstName = request.getParameter(\"firstName\");\r\n\t\tString middleName = request.getParameter(\"middleName\");\r\n\t\tString lastName = request.getParameter(\"lastName\");\r\n\t\tString email = request.getParameter(\"email\");\r\n\t\tString mobile = request.getParameter(\"mobile\");\r\n\t\tString password = request.getParameter(\"password\");\r\n\t\tString id= request.getParameter(\"id\");\r\n\t\t\r\n\t\tUser user = new User();\r\n\t\t\r\n\t\tuser.setEmail(email);\r\n\t\tuser.setFirstName(firstName);\r\n\t\tuser.setLastName(lastName);\r\n\t\tuser.setMiddleName(middleName);\r\n\t\tuser.setMobile(mobile);\r\n\t\tuser.setPassword(password);\r\n\t\tuser.setId(id);\r\n\t\t\r\n\t\t\r\n\t\tUpdateRecordService urs=new UpdateRecordService();\r\n\t\turs.updateRecord(user);\r\n\t\t\r\n\t\tRequestDispatcher rd=request.getRequestDispatcher(\"adminPage.jsp\");\r\n\t\trd.forward(request, response);\r\n\t}\r\n\tcatch(Exception e)\r\n\t{\r\n\t\te.printStackTrace();\r\n\r\n\t/*\ttry {\r\n\t\t\tUpdateRecordService urs=new UpdateRecordService();\r\n\t\t\tboolean result = urs.updateRecord(user);\r\n\t\t\tout.println(\"<html>\");\r\n\t\t\tout.println(\"<head>\");\r\n\t\t\tout.println(\"<title>Updation Successful</title>\");\r\n\t\t\tout.println(\"</head>\");\r\n\t\t\tout.println(\"<body>\");\r\n\t\t\tout.println(\"<center>\");\r\n\t\t\tif (result)\r\n\t\t\t{\r\n\t\t\t\tout.println(\"<h1>Thanks for Update your Registeration Entries :</h1>\");\r\n\t\t\t\tresponse.sendRedirect(\"adminPage.jsp\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tout.println(\"<h1>Updation Failed</h1>\");\r\n\t\t\t\t//out.println(\"To try again<a href=edit.jsp>Click here</a>\");\r\n\t\t\t\tresponse.sendRedirect(\"edit.jsp\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tout.println(\"</center>\");\r\n\t\t\tout.println(\"</body>\");\r\n\t\t\tout.println(\"</html>\");\r\n\t\t} finally {\r\n\t\t\tout.close();\r\n\t\t}*/\r\n\t\t\r\n\t}\r\n\t}", "@Override\n\tpublic ApplicationResponse updateUser(String id, UserRequest request) {\n\t\tUserEntity user = null;\n\t\tOptional<UserEntity> userEntity = repository.findById(id);\n\t\tif (userEntity.isPresent()) {\n\t\t\tuser = userEntity.get();\n\t\t\tif (!StringUtils.isEmpty(request.getFirstName())) {\n\t\t\t\tuser.setFirstName(request.getFirstName());\n\t\t\t}\n\t\t\tif (!StringUtils.isEmpty(request.getSurName())) {\n\t\t\t\tuser.setSurName(request.getSurName());\n\t\t\t}\n\t\t\tif (!StringUtils.isEmpty(request.getDob())) {\n\t\t\t\tuser.setDob(request.getDob());\n\t\t\t}\n\t\t\tif (!StringUtils.isEmpty(request.getTitle())) {\n\t\t\t\tuser.setTitle(request.getTitle());\n\t\t\t}\n\t\t\tuser = repository.save(user);\n\t\t\treturn new ApplicationResponse(true, \"Success\", enitytomodel.apply(user));\n\t\t} else {\n\t\t\tthrow new UserNotFoundException(\"User not found\");\n\t\t}\n\t}", "int updateByPrimaryKey(UserInfo record);", "void update(User user, Connection connection) throws DAOException;", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n DaoAluno daoAluno = new DaoAluno();\n Aluno aluno = new Aluno();\n aluno = (Aluno) request.getSession(true).getAttribute(\"aluno\");\n String email = request.getParameter(\"email\");\n\n aluno.setEmail(email);\n daoAluno.update(aluno);\n request.setAttribute(\"mensagem\", \"E-mail alterado com sucesso !\");\n RequestDispatcher rd = request.getRequestDispatcher(\"trocarEmail_a.jsp\");\n rd.forward(request, response);\n\n }", "int updateByPrimaryKey(User record);", "int updateByPrimaryKey(User record);", "int updateByPrimaryKey(User record);", "int updateByPrimaryKey(User record);", "int updateByPrimaryKey(User record);", "int updateByPrimaryKey(User record);", "int updateByPrimaryKey(User record);", "int updateByPrimaryKey(User record);", "int updateByPrimaryKey(User record);", "@Override\n\tpublic void execute(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\tint parentId = 0;\n\t\tString parentDesc = \"\";\n\t\t\n\t\tCategoryParentDAO dao = new CategoryParentDAO(); /* Instantiate DAO object */\n\n\t\tif(dao.update(new CategoryParent(parentId, parentDesc))){\n\t\t\tresponse.getWriter().write(\"Category Parent Update\"); /* Add Successful */\n\t\t}\n\t\telse{\n\t\t\tresponse.getWriter().write(\"Category Parent Updated Unsuccessfuly\"); /* Add Unsuccessful */\n\t\t}\n\t\t\n\t\t\n\t}", "int updateUserById( User user);", "int updateByPrimaryKey(UUser record);", "void setIdentityId(String identityId);", "@Override\n\tpublic String execute(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tHttpSession session = request.getSession();\n\t\tString tid = session.getAttribute(\"id\").toString();\n\t\tTrainerDao dao = TrainerDao.getInstance();\n\t\tTrainerDto dto = new TrainerDto();\n\t\tdto = dao.trainerSelect(tid);\n\t\t\n\t\trequest.setAttribute(\"dto\", dto);\n\t\t\n\t\treturn \"trainer/trainerUpdate\";\n\t}", "Update withIdentity(Identity identity);", "protected void update(HttpServletRequest request) throws Exception {\n\t\t\r\n\r\n\r\n\t\tPedido p = new Pedido();\r\n\t\tCancion c = new Cancion();\r\n\t\tCliente cl = new Cliente();\r\n\t\t\r\n\t\tString cod = (request.getParameter(\"codigo\"));\r\n\t\tString cod_cancion = (request.getParameter(\"cod_cancion\"));\r\n\t\tString cod_cliente = (request.getParameter(\"cod_cliente\"));\r\n\t\tp.setCod_pedido(cod);\r\n\t\tc.setCod_cancion(cod_cancion);\r\n\t\tcl.setCod_cliente(cod_cliente);\r\n\t\tp.setCan(c);\r\n\t\tp.setCl(cl);\r\n\t\t\r\n\t\t\r\n\t\tpdmodel.ActualizarPedido(p);\r\n\t}", "int updateByPrimaryKey(RoleUser record);", "int updateByPrimaryKey(SysRoleDO record);", "@Override\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString id = request.getParameter(\"id\");\n\t\tString pwd = request.getParameter(\"pwd\");\n\t\tString email = request.getParameter(\"email\");\n\t\tString name = request.getParameter(\"name\");\n\t\tUser user = new User(id,pwd,email,name); //id,password를 넣어주는 생성자 만들기\n\t\tUserService s = UserService.getInstance();\n\t\ts.join(user);\n\t\t\n\t\tHttpUtil.forward(request, response, \"/index.jsp\");\n\t\t\n\t}", "int updateByPrimaryKey(TawRoleDomain record);", "@Transactional\n @Override\n public BaseResponse updateUserInfo(UpdateUserInfoRequest updateUserInfoRequest) throws Exception {\n\n\n UserEntity userEntity = userService.findByUserName(updateUserInfoRequest.getUsername());\n\n if(Objects.isNull(userEntity)){\n BaseResponse baseResponse = BaseResponse.builder().responseCode(Constants.FAILURE_RESPONSE_CODE)\n .responseMessage(configurationUtil.getMessage(Constants.FAILURE_RESPONSE_CODE)).build();\n return baseResponse;\n }\n\n if(Objects.nonNull(updateUserInfoRequest.getName())){\n userEntity.setName(updateUserInfoRequest.getName());\n }\n\n //check to update user details information\n Boolean updateCheckUserDetails = userService.updateUserDetailsInformation(\n updateUserInfoRequest.getUsername(), updateUserInfoRequest.getEmail(),\n updateUserInfoRequest.getNicNumber());\n\n if(Objects.nonNull(updateCheckUserDetails) && updateCheckUserDetails){\n BaseResponse baseResponse = BaseResponse.builder().responseCode(Constants.FAILURE_RESPONSE_CODE)\n .responseMessage(configurationUtil.getMessage(Constants.FAILURE_RESPONSE_CODE)).build();\n return baseResponse;\n }\n\n UserDetailsEntity userDetailsEntity = userEntity.getUserDetailsEntity();\n\n if(Objects.nonNull(updateUserInfoRequest.getNicNumber())){\n\n userDetailsEntity.setNicNumber(updateUserInfoRequest.getNicNumber());\n }\n\n if(Objects.nonNull(updateUserInfoRequest.getNicExpiryDate())){\n userDetailsEntity.setNicExpiryDate(updateUserInfoRequest.getNicExpiryDate());\n }\n\n if(Objects.nonNull(updateUserInfoRequest.getDateOfBirth())){\n userDetailsEntity.setDateOfBirth(updateUserInfoRequest.getDateOfBirth());\n }\n if(Objects.nonNull(updateUserInfoRequest.getCity())){\n\n userDetailsEntity.setCity(updateUserInfoRequest.getCity());\n }\n\n if(Objects.nonNull(updateUserInfoRequest.getCountry())){\n\n userDetailsEntity.setCountry(updateUserInfoRequest.getCountry());\n }\n\n if(Objects.nonNull(updateUserInfoRequest.getEmail())){\n\n userDetailsEntity.setEmail(updateUserInfoRequest.getEmail());\n }\n\n userService.saveUser(userEntity);\n userService.saveUserDetail(userDetailsEntity);\n\n BaseResponse baseResponse = BaseResponse.builder().responseCode(Constants.SUCCESS_RESPONSE_CODE)\n .responseMessage(configurationUtil.getMessage(Constants.SUCCESS_RESPONSE_CODE)).build();\n\n return baseResponse;\n }", "void updateUser(User entity) throws UserDaoException;", "int updateByPrimaryKey(ParUsuarios record);", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n {\r\n String idTemp = request.getParameter(\"id\");\r\n int id = Integer.parseInt(idTemp);\r\n request.setAttribute(\"obterCliente\", DAO.obterCliente(id));\r\n RequestDispatcher rd = request.getRequestDispatcher(\"EditarCliente.jsp\");\r\n try {\r\n rd.forward(request, response);\r\n } catch (ServletException | IOException ex) {\r\n Logger.getLogger(EditarCliente.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "protected void editField(HttpServletRequest request, HttpServletResponse response, EcAnonymousPaymentInfo _EcAnonymousPaymentInfo) throws Exception{\n\r\n if (!isMissing(request.getParameter(\"anonymousUserId\"))) {\r\n m_logger.debug(\"updating param anonymousUserId from \" +_EcAnonymousPaymentInfo.getAnonymousUserId() + \"->\" + request.getParameter(\"anonymousUserId\"));\r\n _EcAnonymousPaymentInfo.setAnonymousUserId(WebParamUtil.getLongValue(request.getParameter(\"anonymousUserId\")));\r\n }\r\n if (!isMissing(request.getParameter(\"firstName\"))) {\r\n m_logger.debug(\"updating param firstName from \" +_EcAnonymousPaymentInfo.getFirstName() + \"->\" + request.getParameter(\"firstName\"));\r\n _EcAnonymousPaymentInfo.setFirstName(WebParamUtil.getStringValue(request.getParameter(\"firstName\")));\r\n }\r\n if (!isMissing(request.getParameter(\"middleInitial\"))) {\r\n m_logger.debug(\"updating param middleInitial from \" +_EcAnonymousPaymentInfo.getMiddleInitial() + \"->\" + request.getParameter(\"middleInitial\"));\r\n _EcAnonymousPaymentInfo.setMiddleInitial(WebParamUtil.getStringValue(request.getParameter(\"middleInitial\")));\r\n }\r\n if (!isMissing(request.getParameter(\"lastName\"))) {\r\n m_logger.debug(\"updating param lastName from \" +_EcAnonymousPaymentInfo.getLastName() + \"->\" + request.getParameter(\"lastName\"));\r\n _EcAnonymousPaymentInfo.setLastName(WebParamUtil.getStringValue(request.getParameter(\"lastName\")));\r\n }\r\n if (!isMissing(request.getParameter(\"address1\"))) {\r\n m_logger.debug(\"updating param address1 from \" +_EcAnonymousPaymentInfo.getAddress1() + \"->\" + request.getParameter(\"address1\"));\r\n _EcAnonymousPaymentInfo.setAddress1(WebParamUtil.getStringValue(request.getParameter(\"address1\")));\r\n }\r\n if (!isMissing(request.getParameter(\"address2\"))) {\r\n m_logger.debug(\"updating param address2 from \" +_EcAnonymousPaymentInfo.getAddress2() + \"->\" + request.getParameter(\"address2\"));\r\n _EcAnonymousPaymentInfo.setAddress2(WebParamUtil.getStringValue(request.getParameter(\"address2\")));\r\n }\r\n if (!isMissing(request.getParameter(\"city\"))) {\r\n m_logger.debug(\"updating param city from \" +_EcAnonymousPaymentInfo.getCity() + \"->\" + request.getParameter(\"city\"));\r\n _EcAnonymousPaymentInfo.setCity(WebParamUtil.getStringValue(request.getParameter(\"city\")));\r\n }\r\n if (!isMissing(request.getParameter(\"state\"))) {\r\n m_logger.debug(\"updating param state from \" +_EcAnonymousPaymentInfo.getState() + \"->\" + request.getParameter(\"state\"));\r\n _EcAnonymousPaymentInfo.setState(WebParamUtil.getStringValue(request.getParameter(\"state\")));\r\n }\r\n if (!isMissing(request.getParameter(\"zip\"))) {\r\n m_logger.debug(\"updating param zip from \" +_EcAnonymousPaymentInfo.getZip() + \"->\" + request.getParameter(\"zip\"));\r\n _EcAnonymousPaymentInfo.setZip(WebParamUtil.getStringValue(request.getParameter(\"zip\")));\r\n }\r\n if (!isMissing(request.getParameter(\"country\"))) {\r\n m_logger.debug(\"updating param country from \" +_EcAnonymousPaymentInfo.getCountry() + \"->\" + request.getParameter(\"country\"));\r\n _EcAnonymousPaymentInfo.setCountry(WebParamUtil.getStringValue(request.getParameter(\"country\")));\r\n }\r\n if (!isMissing(request.getParameter(\"paymentType\"))) {\r\n m_logger.debug(\"updating param paymentType from \" +_EcAnonymousPaymentInfo.getPaymentType() + \"->\" + request.getParameter(\"paymentType\"));\r\n _EcAnonymousPaymentInfo.setPaymentType(WebParamUtil.getIntValue(request.getParameter(\"paymentType\")));\r\n }\r\n if (!isMissing(request.getParameter(\"paymentNum\"))) {\r\n m_logger.debug(\"updating param paymentNum from \" +_EcAnonymousPaymentInfo.getPaymentNum() + \"->\" + request.getParameter(\"paymentNum\"));\r\n _EcAnonymousPaymentInfo.setPaymentNum(WebParamUtil.getStringValue(request.getParameter(\"paymentNum\")));\r\n }\r\n if (!isMissing(request.getParameter(\"paymentExpireMonth\"))) {\r\n m_logger.debug(\"updating param paymentExpireMonth from \" +_EcAnonymousPaymentInfo.getPaymentExpireMonth() + \"->\" + request.getParameter(\"paymentExpireMonth\"));\r\n _EcAnonymousPaymentInfo.setPaymentExpireMonth(WebParamUtil.getIntValue(request.getParameter(\"paymentExpireMonth\")));\r\n }\r\n if (!isMissing(request.getParameter(\"paymentExpireYear\"))) {\r\n m_logger.debug(\"updating param paymentExpireYear from \" +_EcAnonymousPaymentInfo.getPaymentExpireYear() + \"->\" + request.getParameter(\"paymentExpireYear\"));\r\n _EcAnonymousPaymentInfo.setPaymentExpireYear(WebParamUtil.getIntValue(request.getParameter(\"paymentExpireYear\")));\r\n }\r\n if (!isMissing(request.getParameter(\"paymentExtraNum\"))) {\r\n m_logger.debug(\"updating param paymentExtraNum from \" +_EcAnonymousPaymentInfo.getPaymentExtraNum() + \"->\" + request.getParameter(\"paymentExtraNum\"));\r\n _EcAnonymousPaymentInfo.setPaymentExtraNum(WebParamUtil.getStringValue(request.getParameter(\"paymentExtraNum\")));\r\n }\r\n if (!isMissing(request.getParameter(\"timeCreated\"))) {\r\n m_logger.debug(\"updating param timeCreated from \" +_EcAnonymousPaymentInfo.getTimeCreated() + \"->\" + request.getParameter(\"timeCreated\"));\r\n _EcAnonymousPaymentInfo.setTimeCreated(WebParamUtil.getDateValue(request.getParameter(\"timeCreated\")));\r\n }\r\n\r\n m_actionExtent.beforeUpdate(request, response, _EcAnonymousPaymentInfo);\r\n m_ds.update(_EcAnonymousPaymentInfo);\r\n m_actionExtent.afterUpdate(request, response, _EcAnonymousPaymentInfo);\r\n }", "@Override\n\tpublic void execute(Model model) {\n\t\tMap<String, Object> map = model.asMap();\n\t\tHttpServletRequest request = (HttpServletRequest)map.get(\"request\");\n\t\tHttpSession session=request.getSession();\n\t\tString userId = (String) session.getAttribute(\"userid\");\n\t\tint pId = Integer.parseInt(request.getParameter(\"pId\"));\n\t\tSystem.out.println(\"BID=====\"+pId);\n\t\tPBasketDao dao = new PBasketDao();\n\t\tdao.write(pId, userId);\n\t}", "@Override\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString userid = request.getParameter(\"userid\");\n\t\tUsersDAO dao = UsersDAO.getInstance();\n\t\tint row = dao.userCheck(userid);\n\t\t\n\t\trequest.setAttribute(\"userid\", userid);\n\t\trequest.setAttribute(\"row\", row);\n\t\tRequestDispatcher rd = request.getRequestDispatcher(\"Users/user_idcheck.jsp\");\n\t\trd.forward(request, response);\n\t}", "@Override\n public void update(Object object, Object id) throws DAOException {\n\n }", "int updateByPrimaryKey(AutoAssessDetail record);", "public int update(SsoAuthDO ssoAuth) throws DataAccessException;", "int updateByPrimaryKey(UsercontrollerRole record);", "public void handleUserSwtiched(int newUserId) {\n }", "int updateByPrimaryKey(PlatformAdminRoleUser record);", "@RequestMapping(value = \"/linkedInUpdateURL/\", method = RequestMethod.POST)\n\tpublic String linkedInUpdateURL(HttpServletRequest req,\n\t\t\t@RequestParam(value = \"l_publicUrl\", defaultValue = \"null\") String l_publicUrl) {\n\t\tSystem.out.println(\"Updating LinkedIn Data!\");\n\t\tHttpSession session = req.getSession();\n\t\tString username = (String) session.getAttribute(\"username\");\n\t\tSystem.out.println(\"Here linkedInUpdateURL: \" + username);\n\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n\t\tDate date = new Date();\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\trestTemplate.setErrorHandler(new DefaultResponseErrorHandler() {\n\t\t\tprotected boolean hasError(HttpStatus statusCode) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\tSocialMediaAccess smaNewCreate = new SocialMediaAccess(username, \"linkedin\", \"linkedin_url\", l_publicUrl,\n\t\t\t\t\"long_live\", dateFormat.format(date));\n\t\tResponseEntity<SocialMediaAccess> smaLinkedIn = restTemplate.getForEntity(uriReadSM + username + \"/linkedin/\",\n\t\t\t\tSocialMediaAccess.class);\n\n\t\tSystem.out.println(\"--------------------------START check in smaLinkedIn. username: \" + username);\n\t\tif (smaLinkedIn.getStatusCode().equals(HttpStatus.OK)) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"--------------------------***START. There is smaLinkedIn in database. need to UPDATE. smaFB.id: \"\n\t\t\t\t\t\t\t+ smaLinkedIn.getBody().getSma_id());\n\t\t\tsmaNewCreate.setSma_id(smaLinkedIn.getBody().getSma_id());\n\t\t\trestTemplate.put(uriUpdateSMA, smaNewCreate);\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"--------------------------***END. There is smaLinkedIn in database. need to UPDATE. smaFB.id: \"\n\t\t\t\t\t\t\t+ smaLinkedIn.getBody().getSma_id());\n\t\t} else {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"--------------------------******START. There is NO smaLinkedIn in database. need to CREATE.\");\n\t\t\tResponseEntity<SocialMediaAccess> resmaCreated = restTemplate.postForEntity(uriCreateSMA, smaNewCreate,\n\t\t\t\t\tSocialMediaAccess.class);\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"--------------------------******END. There is NO smaLinkedIn in database. need to CREATE.\");\n\t\t}\n\t\tSystem.out.println(\"--------------------------END check in smaLinkedIn\");\n\n\t\t// START getting linkedin data\n\t\tResponseEntity<String[]> allSkills = restTemplate.postForEntity(uriGetLinkedInSkillsWeb, l_publicUrl,\n\t\t\t\tString[].class);\n\t\tSystem.out.println(\"+++START Here padung create+++. Length: \" + allSkills.getBody().length);\n\t\t// START storing of linkedin data to database\n\t\tJobSeekerSkills jss = new JobSeekerSkills();\n\t\tLinkedList<String> seekerSkills = new LinkedList<>();\n\t\tboolean proceed = false;\n\t\tfor (String skill : allSkills.getBody()) {\n\t\t\tjss.setUsername(username);\n\t\t\tjss.setSkill_name(skill);\n\t\t\tseekerSkills.add(skill);\n\t\t\tSystem.out.println(\"In JobSeeker Controller. Skills are:: \" + skill);\n\t\t\tResponseEntity<JobSeekerSkills> rejsk = restTemplate.postForEntity(uriCreateJobSeekerSkills, jss,\n\t\t\t\t\tJobSeekerSkills.class);\n\t\t\tproceed = true;\n\t\t}\n\t\tif (proceed) {\n\t\t\t// start reading job postings and matched skills to alert jobseeker\n\t\t\tResponseEntity<JobPost[]> readAllJobPostings = restTemplate.getForEntity(uriGetListJobPosts,\n\t\t\t\t\tJobPost[].class);\n\t\t\tif (readAllJobPostings.getStatusCode().equals(HttpStatus.OK)) {\n\t\t\t\tSystem.out.println(\">>Retrieved posts\");\n\t\t\t\tfor (JobPost jp : readAllJobPostings.getBody()) {\n\t\t\t\t\tLinkedList<String> jobPostSkillsReq = new LinkedList<>();\n\t\t\t\t\tResponseEntity<JobPostSkills[]> getAllJobPostSkillsReq = restTemplate.getForEntity(\n\t\t\t\t\t\t\turiGetAllJobPostSkillsReqByID + jp.getJob_post_id() + \"/\", JobPostSkills[].class);\n\t\t\t\t\tif (getAllJobPostSkillsReq.getStatusCode().equals(HttpStatus.OK)) {\n\t\t\t\t\t\tSystem.out.println(\">>>Retrieved JobPostSkills\");\n\t\t\t\t\t\tfor (JobPostSkills s : getAllJobPostSkillsReq.getBody()) {\n\t\t\t\t\t\t\tjobPostSkillsReq.add(s.getSkill_name());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (jobPostSkillsReq.isEmpty()) {\n\t\t\t\t\t\t\tSystem.out.println(\"JOB POST ID has empty skills req.. skip..\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// check skills matching : jobseeker skills vs\n\t\t\t\t\t\t\t// jobPost\n\t\t\t\t\t\t\t// skills req\n\t\t\t\t\t\t\tSystem.out.println(\"seekerSkills size = \" + seekerSkills.size());\n\t\t\t\t\t\t\tSystem.out.println(\"jobPostSkillsReq size = \" + jobPostSkillsReq.size());\n\t\t\t\t\t\t\tSkillMonitor skillMonitor = new SkillMonitor(seekerSkills, jobPostSkillsReq);\n\t\t\t\t\t\t\tdouble skill_score = skillMonitor.computeSkillScore();\n\t\t\t\t\t\t\tLinkedList<String> matchedSkills = skillMonitor.getMatchedJsSkills();\n\t\t\t\t\t\t\tString keywords = \"\";\n\t\t\t\t\t\t\tfor (String str : matchedSkills) {\n\t\t\t\t\t\t\t\tkeywords = keywords.concat(str + \",\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (skill_score <= 0.0) {\n\t\t\t\t\t\t\t\t// skip not recommended //no skills match\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tSystem.out.println(\">>>Relevant Skills Matched\");\n\t\t\t\t\t\t\t\tJobAlert j = new JobAlert();\n\t\t\t\t\t\t\t\tj.setAlertName(jp.getJob_title());\n\t\t\t\t\t\t\t\tj.setLocation(jp.getLocation());\n\t\t\t\t\t\t\t\tj.setJob_post_id(jp.getJob_post_id());\n\t\t\t\t\t\t\t\tj.setJsUsername(username);\n\t\t\t\t\t\t\t\tj.setStatus(\"Not yet Applied\");\n\t\t\t\t\t\t\t\tj.setDateCreated(jp.getDate_posted());\n\t\t\t\t\t\t\t\tj.setKeywords(keywords.substring(0, keywords.length() - 1));\n\t\t\t\t\t\t\t\tResponseEntity<JobAlert> readExisting = restTemplate.getForEntity(\n\t\t\t\t\t\t\t\t\t\turiCheckExistingAlert + \"/\" + username + \"/\" + jp.getJob_post_id() + \"/\",\n\t\t\t\t\t\t\t\t\t\tJobAlert.class);\n\t\t\t\t\t\t\t\tif (readExisting.getBody() != null) {\n\t\t\t\t\t\t\t\t\t// update alert\n\t\t\t\t\t\t\t\t\tj.setId(readExisting.getBody().getId());\n\t\t\t\t\t\t\t\t\tj.setJob_post_id(readExisting.getBody().getJob_post_id());\n\t\t\t\t\t\t\t\t\trestTemplate.put(uriUpdateAlert, j);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tResponseEntity<JobAlert> reCreateJobAlert = restTemplate\n\t\t\t\t\t\t\t\t\t\t\t.postForEntity(uriCreateJobAlert, j, JobAlert.class);\n\t\t\t\t\t\t\t\t\tif (reCreateJobAlert.getStatusCode().equals(HttpStatus.OK)) {\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\">>>Success create job Alert!\");\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tSystem.err.println(\">>>Failed to create job alert!\");\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}\n\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} else {\n\t\t\t// no alerts created\n\t\t}\n\n\t\tSystem.out.println(\"+++END Here padung create+++\");\n\t\t// END storing of linkedin data to database\n\t\t// END getting linkedin data\n\t\treturn \"redirect:../home\";\n\t}", "int updateByPrimaryKey(AccessKeyRecordEntity record);", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String action = request.getParameter(\"action\");\n \n String name = request.getParameter(\"name\");\n String email = request.getParameter(\"email\");\n String password = request.getParameter(\"password\");\n String address = request.getParameter(\"address\");\n String phone = request.getParameter(\"phone\");\n int status = 1;\n long url = System.currentTimeMillis();\n String passMD5 = helper.MD5Generator.generate(password);\n User user = new User(name, email, passMD5, address, phone,status,url); \n if (action.equals(\"Create\")) {\n if (!userDao.find(user)) {\n Controller.controller.addUser(user);\n response.sendRedirect(\"doUser\");\n } else {\n response.sendRedirect(\"create-user.jsp\");\n } \n } else if (action.equals(\"Edit\")) {\n if (userDao.find(email) != null) {\n Controller.controller.editUser(user);\n response.sendRedirect(\"doUser\");\n } else {\n response.sendRedirect(\"edit-user.jsp\");\n }\n }\n \n \n }", "private void handle(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n System.out.println(\"AJAXEmployeeEditHandler runned\");\n String idString = request.getParameter(\"id\");\n JSONObject jsonObject = new JSONObject();\n if (idString != null) {\n try {\n Long id = Long.parseLong(idString);\n Session hibernateSession = HibernateUtil.getSession();\n Employee emp;\n if (id > 0) {\n emp = (Employee) hibernateSession.get(Employee.class, (Long) id);\n\n request.getSession().setAttribute(\"hibernateSession\", hibernateSession);\n request.getSession().setAttribute(\"employee\", emp);\n\n jsonObject.put(\"employeeId\", emp.getId());\n jsonObject.put(\"firstName\", emp.getFirstName());\n jsonObject.put(\"lastName\", emp.getSecondName());\n\n putPositionsToJSON(jsonObject);\n jsonObject.put(\"positionId\", emp.getOccupation().getId());\n putOfficesToJSON(jsonObject);\n jsonObject.put(\"officeId\", emp.getOffice().getId());\n\n putDepartmentsToJSON(jsonObject);\n jsonObject.put(\"departmentId\", emp.getDepartment().getId());\n\n jsonObject.put(\"email\", emp.getEmail());\n jsonObject.put(\"login\", emp.getLogin());\n\n response.setContentType(\"application/json\");\n jsonObject.writeJSONString(response.getWriter());\n } else {\n emp = new Employee();\n\n request.getSession().setAttribute(\"hibernateSession\", hibernateSession);\n request.getSession().setAttribute(\"employee\", emp);\n putPositionsToJSON(jsonObject);\n putOfficesToJSON(jsonObject);\n putDepartmentsToJSON(jsonObject);\n response.setContentType(\"application/json\");\n jsonObject.writeJSONString(response.getWriter());\n }\n } catch (NumberFormatException e) {\n response.setContentType(\"application/json\");\n String answer = \"Server problem occured\";\n JSONObject js = new JSONObject();\n js.put(\"error\", \"error\");\n js.put(\"success\", answer);\n js.writeJSONString(response.getWriter());\n }\n }\n }", "@Override\n public String execute() throws MidasJPAException {\n aLog.setUser(getUser().getUserName());\n try {\n aLog.exit();\n } catch (Exception ex) { \n //TODO Log error\n }\n request.getSession().invalidate();\n return SUCCESS;\n }", "public void crudOperationStudent(){\n //Retrieve Student\n Student student=entityManager.find(Student.class,2L);\n // persistence Context have Student\n //Retrieve Passport\n Passport passport=student.getPassport();\n // persistence Context have Student,passport\n //Update passport number for student\n passport.setPassportNo(\"ZX132322\");\n // persistence Context have Student, updated-passport\n //update Student details\n student.setAge(25);\n // persistence Context have updated-Student, updated-passport\n entityManager.persist(student);\n\n }", "@Override\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) {\n\n\t\tString message = request.getParameter(\"message\");\n\t\tString nickname = request.getParameter(\"nickname\");\n\t\t\n\t\tDao2 dao = new Dao2();\n\t\t\n\t\tUserDto dto = dao.usInfo(nickname);\n\t\t\n\t\tint userseq = dto.getUserseq();\n\t\tint myseq = Integer.parseInt(request.getParameter(\"myseq\"));\n\t\t\n\t\t//System.out.println(myseq);\n\t\tdao.SendMessage(myseq, userseq, message);\n\t\n\t\t\n\t}", "public void executeUpdate(String request) {\n try {\r\n st.executeUpdate(request);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "int updateByPrimaryKey(PasswdDo record);", "@RequestMapping(value=\"/infact-record\", method=RequestMethod.PUT)\n\tpublic ResponseEntity<?> update(@RequestBody InfactRecord infactRecord) {\n\t\tinfactRecordServiceImpl.update(infactRecord);\n\t\treturn ResponseEntity.ok().body(\n\t\t\t\t\"infact-record has been updated successfully.\");\n\t}", "@Override\n protected void executeUpdate(final String requestId, DSRequest request, final DSResponse response)\n {\n JavaScriptObject data = request.getData();\n final ListGridRecord rec = new ListGridRecord(data);\n ContactDTO testRec = new ContactDTO();\n copyValues(rec, testRec);\n service.update(testRec, new AsyncCallback<Void>()\n {\n @Override\n public void onFailure(Throwable caught)\n {\n response.setStatus(RPCResponse.STATUS_FAILURE);\n processResponse(requestId, response);\n SC.say(\"Contact Edit Save\", \"Contact edits have NOT been saved!\");\n }\n\n @Override\n public void onSuccess(Void result)\n {\n ListGridRecord[] list = new ListGridRecord[1];\n // We do not receive removed record from server.\n // Return record from request.\n list[0] = rec;\n response.setData(list);\n processResponse(requestId, response);\n SC.say(\"Contact Edit Save\", \"Contact edits have been saved!\");\n }\n });\n }", "int updateByPrimaryKey(SysRole record);", "int updateByPrimaryKey(SysOrganization record);", "int updateByPrimaryKey(SysId record);", "int updateByPrimaryKey(BizUserWhiteList record);" ]
[ "0.6058119", "0.60058475", "0.592491", "0.58633024", "0.5837898", "0.58314246", "0.5823635", "0.5816092", "0.5798224", "0.5783055", "0.5666364", "0.56639576", "0.56590897", "0.5640128", "0.56256056", "0.56068665", "0.5565755", "0.55514824", "0.55334044", "0.5530055", "0.55125207", "0.5472472", "0.54607207", "0.5454552", "0.54505074", "0.544356", "0.5439743", "0.5436632", "0.5425774", "0.5424373", "0.54186153", "0.5414938", "0.54052794", "0.54052794", "0.53984475", "0.53823394", "0.53812224", "0.5380693", "0.53793055", "0.5372865", "0.53674674", "0.5366952", "0.5364225", "0.5357143", "0.5348515", "0.53452355", "0.53278065", "0.5319047", "0.53150994", "0.53124374", "0.53097737", "0.5293838", "0.52856815", "0.52856815", "0.52856815", "0.52856815", "0.52856815", "0.52856815", "0.52856815", "0.52856815", "0.52856815", "0.5279259", "0.5279113", "0.52675354", "0.52654135", "0.5261532", "0.5261041", "0.5241782", "0.52240324", "0.5217805", "0.5206709", "0.52051723", "0.52048486", "0.5196998", "0.5195598", "0.51948124", "0.5190056", "0.51850605", "0.5183669", "0.5177894", "0.51732713", "0.51724195", "0.51715636", "0.51662123", "0.5158911", "0.5158661", "0.5158337", "0.5156146", "0.5148387", "0.51481676", "0.5144499", "0.5141993", "0.51332134", "0.5133107", "0.51321167", "0.5131407", "0.5129538", "0.5126695", "0.51222396", "0.5115908" ]
0.6313829
0
Created by Daniel.Xu on 2017/1/14.
public interface MRPApi { @POST("get_mrp_production") Call<GetMrpProductionResponseBean> getMrpProduction(@Body GetMrpProductionRequestBean requestBean); @POST("get_stock_inventory_list") Call<GetStockInventoryResponse> getStockInventoryList(@Body GetStockInventoryRequestBean getStockInventoryRequestBean); @POST("find_product_by_condition") Call<FindProductByConditionResponse> findProductByCondition(@Body findProductByConditionRequest findProductByConditionRequest); @POST("get_area_list") Observable<GetAreaListResponse> getAreaList(@Body HashMap map); @POST("get_stock_inventory_detail") Call<GetStockInventoryDetailResponse> getStockInventoryDetail(@Body HashMap map); @POST("create_stock_inventory") Call<CreatInventoryResponse> creatStockInventory(@Body GetStockInventoryDetailResponse.ResultBean.ResDataBean resDataBean); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\n protected void getExras() {\n }", "private void strin() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void m50366E() {\n }", "@Override\n protected void initialize() {\n\n \n }", "protected boolean func_70814_o() { return true; }", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\n void init() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void mo4359a() {\n }", "@Override\n public void init() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void init() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n protected void init() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n public int getSize() {\n return 1;\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "public void mo6081a() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public int getOrder() {\n return 4;\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override public int describeContents() { return 0; }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "Consumable() {\n\t}", "@Override\n public void initialize() { \n }" ]
[ "0.5874132", "0.5650101", "0.56082654", "0.5589348", "0.555989", "0.5558183", "0.5558183", "0.5539216", "0.5490274", "0.5464456", "0.5445043", "0.54437566", "0.5439352", "0.5404738", "0.53937864", "0.53916436", "0.53752273", "0.5356616", "0.53451467", "0.53449786", "0.5300521", "0.5286909", "0.5281179", "0.52736515", "0.5257739", "0.52521676", "0.5251188", "0.52412593", "0.52371854", "0.5236027", "0.52359736", "0.5227494", "0.5227494", "0.52249414", "0.52249414", "0.52249414", "0.52249414", "0.52249414", "0.5212421", "0.5206044", "0.5205777", "0.5194772", "0.5192022", "0.518531", "0.51852065", "0.5182337", "0.5176591", "0.5160412", "0.5156378", "0.51540184", "0.51540184", "0.51540184", "0.51540184", "0.51540184", "0.51540184", "0.5149837", "0.514846", "0.5142657", "0.51301664", "0.51201516", "0.5118", "0.5118", "0.5118", "0.51170284", "0.51170284", "0.5116894", "0.5116894", "0.5116894", "0.5116894", "0.5116894", "0.5116894", "0.5116894", "0.50978684", "0.50978684", "0.5093061", "0.50801927", "0.5078238", "0.5078238", "0.5078238", "0.50762266", "0.5075082", "0.5075082", "0.5075082", "0.50713426", "0.50701267", "0.50691664", "0.50681996", "0.50629723", "0.5061865", "0.5051827", "0.5051579", "0.5048791", "0.5035315", "0.50276566", "0.5023117", "0.502089", "0.5015506", "0.5012654", "0.5007189", "0.500468", "0.5002302" ]
0.0
-1
TODO not sure if CPL belongs to ALU, let's leave it here for now
public void cpl() { int op = registers.getRegister(Register.A); int result = invert(op); registers.setRegister(Register.A, result); registers.setFlag(Flag.H, true); registers.setFlag(Flag.N, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract int getSoL();", "pvcs createpvcs();", "private final void silk_PLC_update(final Jsilk_decoder_control psDecCtrl)\r\n\t{\r\n\t\tfinal Jsilk_PLC_struct psPLC = this.sPLC;\r\n\r\n\t\t/* Update parameters used in case of packet loss */\r\n\t\tthis.prevSignalType = this.indices.signalType;\r\n\t\tint LTP_Gain_Q14 = 0;\r\n\t\tfinal int nb_subfr1 = this.nb_subfr - 1;// java\r\n\t\tif( this.indices.signalType == Jdefine.TYPE_VOICED ) {\r\n\t\t\t/* Find the parameters for the last subframe which contains a pitch pulse */\r\n\t\t\tfor( int j = 0, je = psDecCtrl.pitchL[ nb_subfr1 ], nb_j = nb_subfr1; j * this.subfr_length < je; j++, nb_j-- ) {\r\n\t\t\t\tif( j == this.nb_subfr ) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tint temp_LTP_Gain_Q14 = 0;\r\n\t\t\t\tfinal int nb_j_o = nb_j * Jdefine.LTP_ORDER;// java\r\n\t\t\t\tint i = 0;\r\n\t\t\t\tdo {\r\n\t\t\t\t\ttemp_LTP_Gain_Q14 += psDecCtrl.LTPCoef_Q14[ nb_j_o + i ];\r\n\t\t\t\t} while( ++i < Jdefine.LTP_ORDER );\r\n\t\t\t\tif( temp_LTP_Gain_Q14 > LTP_Gain_Q14 ) {\r\n\t\t\t\t\tLTP_Gain_Q14 = temp_LTP_Gain_Q14;\r\n\t\t\t\t\tSystem.arraycopy( psDecCtrl.LTPCoef_Q14, nb_j_o, psPLC.LTPCoef_Q14, 0, Jdefine.LTP_ORDER );\r\n\r\n\t\t\t\t\tpsPLC.pitchL_Q8 = psDecCtrl.pitchL[ nb_j ] << 8;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// silk_memset( psPLC.LTPCoef_Q14, 0, Jdefine.LTP_ORDER * sizeof( opus_int16 ) );\r\n\t\t\tint i = 0;\r\n\t\t\tdo {\r\n\t\t\t\tpsPLC.LTPCoef_Q14[i] = 0;\r\n\t\t\t} while( ++i < Jdefine.LTP_ORDER );\r\n\t\t\tpsPLC.LTPCoef_Q14[ Jdefine.LTP_ORDER / 2 ] = (short)LTP_Gain_Q14;\r\n\r\n\t\t\t/* Limit LT coefs */\r\n\t\t\tif( LTP_Gain_Q14 < V_PITCH_GAIN_START_MIN_Q14 ) {\r\n\t\t\t\tfinal int tmp = V_PITCH_GAIN_START_MIN_Q14 << 10;\r\n\t\t\t\tfinal int scale_Q10 = ( tmp / ( LTP_Gain_Q14 > 1 ? LTP_Gain_Q14 : 1 ) );\r\n\t\t\t\ti = 0;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tpsPLC.LTPCoef_Q14[ i ] = (short)(((int)psPLC.LTPCoef_Q14[ i ] * scale_Q10) >> 10);\r\n\t\t\t\t} while( ++i < Jdefine.LTP_ORDER );\r\n\t\t\t} else if( LTP_Gain_Q14 > V_PITCH_GAIN_START_MAX_Q14 ) {\r\n\t\t\t\tfinal int tmp = V_PITCH_GAIN_START_MAX_Q14 << 14;\r\n\t\t\t\tfinal int scale_Q14 = ( tmp / ( LTP_Gain_Q14 > 1 ? LTP_Gain_Q14 : 1 ) );\r\n\t\t\t\ti = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t\tpsPLC.LTPCoef_Q14[ i ] = (short)(( (int)psPLC.LTPCoef_Q14[ i ] * scale_Q14 ) >> 14);\r\n\t\t\t\t} while( ++i < Jdefine.LTP_ORDER );\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tpsPLC.pitchL_Q8 = ( this.fs_kHz * 18 ) << 8;\r\n\t\t\t// silk_memset( psPLC.LTPCoef_Q14, 0, Jdefine.LTP_ORDER * sizeof( opus_int16 ));\r\n\t\t\tint i = 0;\r\n\t\t\tdo {\r\n\t\t\t\tpsPLC.LTPCoef_Q14[i] = 0;\r\n\t\t\t} while( ++i < Jdefine.LTP_ORDER );\r\n\t\t}\r\n\r\n\t\t/* Save LPC coeficients */\r\n\t\tSystem.arraycopy( psDecCtrl.PredCoef_Q12[ 1 ], 0, psPLC.prevLPC_Q12, 0, this.LPC_order );\r\n\t\tpsPLC.prevLTP_scale_Q14 = (short)psDecCtrl.LTP_scale_Q14;\r\n\r\n\t\t/* Save last two gains */\r\n\t\tpsPLC.prevGain_Q16[0] = psDecCtrl.Gains_Q16[ nb_subfr1 - 1 ];\r\n\t\tpsPLC.prevGain_Q16[1] = psDecCtrl.Gains_Q16[ nb_subfr1 ];\r\n\r\n\t\tpsPLC.subfr_length = this.subfr_length;\r\n\t\tpsPLC.nb_subfr = this.nb_subfr;\r\n\t}", "public SystematicAcension_by_LiftingTechnology() {\n\n\t}", "int getCp();", "int getCp();", "public AgwCslOper() {\n super(Epc.NAMESPACE, \"agw-csl-oper\");\n }", "private void createGrpClinicSelection() {\n\n\t}", "private USI_TRLT() {}", "public abstract java.lang.String getIdpc();", "private USI_ADRC() {}", "public interface ACPowerSource {\n void provideACPower();\n}", "public int getCpscCase() { return cpscCase; }", "public void requestAccessToPcc()\n {\n \tstate = State.CONNECTING;\n\t releaseHandle = AntPlusBikePowerPcc.requestAccess(this.context, deviceNumber, 0, this, this);\n }", "@Override\n\tpublic void ccc() {\n\t\t\n\t}", "void add_collab_prnc() {\n\t\ttry {\n\t\t\tjdbc.setConnection();\n\t\t\tStatement stm=jdbc.setConnection().createStatement();\n\t\t\tString strcheck=\"select id from utilisateur where username=\"+'\"'+login_class.UsernameLog+'\"';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\tResultSet res = stm.executeQuery(strcheck);\n\t\t\t\n\t\t\t\n\t\t\twhile (res.next()) {\n\t\t\t\tsimple_users_select_list_id.add(res.getInt(\"id\"));\n\t\t\t}\n\t\t\tjdbc.setConnection().close();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public String getlbr_CPF();", "public void setCpscCase(int cpscCase) { this.cpscCase = cpscCase; }", "void mo21072c();", "@Override\n\tpublic String toCLPInfo() {\n\t\treturn null;\n\t}", "void mo4873a(C4718l c4718l);", "protected abstract void setSpl();", "public interface COPSPdpOSDataProcess extends COPSDataProcess {\r\n\r\n /**\r\n * Gets the policies to be uninstalled\r\n * @param man The associated request state manager\r\n * @return A <tt>Vector</tt> holding the policies to be uninstalled\r\n */\r\n public List<COPSDecision> getRemovePolicy(COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Gets the policies to be installed\r\n * @param man The associated request state manager\r\n * @return A <tt>Vector</tt> holding the policies to be uninstalled\r\n */\r\n public List<COPSDecision> getInstallPolicy(COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Makes a decision from the supplied request data\r\n * @param man The associated request state manager\r\n * @param reqSIs Client specific data suppplied in the COPS request\r\n */\r\n public void setClientData(COPSPdpOSReqStateMan man, List<COPSClientSI> reqSIs);\r\n\r\n /**\r\n * Builds a failure report\r\n * @param man The associated request state manager\r\n * @param reportSIs Report data\r\n */\r\n public void failReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);\r\n\r\n /**\r\n * Builds a success report\r\n * @param man The associated request state manager\r\n * @param reportSIs Report data\r\n */\r\n public void successReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);\r\n\r\n /**\r\n * Builds an accounting report\r\n * @param man The associated request state manager\r\n * @param reportSIs Report data\r\n */\r\n public void acctReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);\r\n\r\n /**\r\n * Notifies that no accounting report has been received\r\n * @param man The associated request state manager\r\n */\r\n public void notifyNoAcctReport (COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Notifies a keep-alive timeout\r\n * @param man The associated request state manager\r\n */\r\n public void notifyNoKAliveReceived (COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Notifies that the connection has been closed\r\n * @param man The associated request state manager\r\n * @param error Reason\r\n */\r\n public void notifyClosedConnection (COPSPdpOSReqStateMan man, COPSError error);\r\n\r\n /**\r\n * Notifies that a request state has been deleted\r\n * @param man The associated request state manager\r\n */\r\n public void notifyDeleteRequestState (COPSPdpOSReqStateMan man);\r\n\r\n /**\r\n * Notifies that a request state has been closed\r\n * @param man The associated request state manager\r\n */\r\n public void closeRequestState(COPSPdpOSReqStateMan man);\r\n\r\n}", "CPSMFactory getCPSMFactory();", "Integer getChnlCde();", "public void useOCL( boolean on )\r\n {\r\n \tuseOCL = on;\r\n }", "@Override\r\n\tpublic int getcc() {\n\t\treturn 120;\r\n\t}", "public PC getPC() {return _pc;}", "static void OPL_CALC_CH(OPL_CH CH) {\n long env_out;\n OPL_SLOT SLOT;\n\n feedback2[0] = 0;\n /* SLOT 1 */\n SLOT = CH.SLOT[SLOT1];\n env_out = OPL_CALC_SLOT(SLOT);\n if (env_out < EG_ENT - 1) {\n /* PG */\n if (SLOT.vib != 0) {\n SLOT.Cnt = (SLOT.Cnt + (SLOT.Incr * vib / VIB_RATE)) & 0xFFFFFFFFL;\n } else {\n SLOT.Cnt += SLOT.Incr;\n }\n /* connectoion */\n if (CH.FB != 0) {\n int feedback1 = (CH.op1_out[0] + CH.op1_out[1]) >> CH.FB;\n CH.op1_out[1] = CH.op1_out[0];\n CH.connect1[0] += CH.op1_out[0] = OP_OUT(SLOT, (int) env_out, feedback1);\n } else {\n CH.connect1[0] += OP_OUT(SLOT, (int) env_out, 0);\n }\n } else {\n CH.op1_out[1] = CH.op1_out[0];\n CH.op1_out[0] = 0;\n }\n /* SLOT 2 */\n SLOT = CH.SLOT[SLOT2];\n env_out = OPL_CALC_SLOT(SLOT);\n if (env_out < EG_ENT - 1) {\n /* PG */\n if (SLOT.vib != 0) {\n SLOT.Cnt = (SLOT.Cnt + (SLOT.Incr * vib / VIB_RATE)) & 0xFFFFFFFFL;\n } else {\n SLOT.Cnt += SLOT.Incr;\n }\n /* connectoion */\n outd[0] += OP_OUT(SLOT, (int) env_out, feedback2[0]);\n }\n }", "public void COPower(){\r\n COP = true;\r\n }", "public static void OPLWriteReg(FM_OPL OPL, int r, int v) {\n\n OPL_CH CH;\n int slot;\n int block_fnum;\n switch (r & 0xe0) {\n case 0x00:\n /* 00-1f:controll */\n\n switch (r & 0x1f) {\n\n case 0x01:\n /* wave selector enable */\n if ((OPL.type & OPL_TYPE_WAVESEL) != 0) {\n /*RECHECK*/\n OPL.wavesel = ((v & 0x20) & 0xFF);\n if (OPL.wavesel == 0) {\n /* preset compatible mode */\n int c;\n for (c = 0; c < OPL.max_ch; c++) {\n OPL.P_CH[c].SLOT[SLOT1].wt_offset = 0;\n OPL.P_CH[c].SLOT[SLOT1].wavetable = SIN_TABLE;//OPL->P_CH[c].SLOT[SLOT1].wavetable = &SIN_TABLE[0];\n OPL.P_CH[c].SLOT[SLOT2].wavetable = SIN_TABLE;//OPL->P_CH[c].SLOT[SLOT2].wavetable = &SIN_TABLE[0];\n }\n }\n }\n return;\n case 0x02:\n /* Timer 1 */\n\n OPL.T[0] = (256 - v) * 4;\n break;\n case 0x03:\n /* Timer 2 */\n\n OPL.T[1] = (256 - v) * 16;\n return;\n case 0x04:\n /* IRQ clear / mask and Timer enable */\n\n if ((v & 0x80) != 0) {\n /* IRQ flag clear */\n\n OPL_STATUS_RESET(OPL, 0x7f);\n } else {\n /* set IRQ mask ,timer enable*/\n /*RECHECK*/\n\n int/*UINT8*/ st1 = ((v & 1) & 0xFF);\n /*RECHECK*/\n int/*UINT8*/ st2 = (((v >> 1) & 1) & 0xFF);\n\n /* IRQRST,T1MSK,t2MSK,EOSMSK,BRMSK,x,ST2,ST1 */\n OPL_STATUS_RESET(OPL, v & 0x78);\n OPL_STATUSMASK_SET(OPL, ((~v) & 0x78) | 0x01);\n /* timer 2 */\n if (OPL.st[1] != st2) {\n double interval = st2 != 0 ? (double) OPL.T[1] * OPL.TimerBase : 0.0;\n OPL.st[1] = st2;\n if (OPL.TimerHandler != null) {\n OPL.TimerHandler.handler(OPL.TimerParam + 1, interval);\n }\n }\n /* timer 1 */\n if (OPL.st[0] != st1) {\n double interval = st1 != 0 ? (double) OPL.T[0] * OPL.TimerBase : 0.0;\n OPL.st[0] = st1;\n if (OPL.TimerHandler != null) {\n OPL.TimerHandler.handler(OPL.TimerParam + 0, interval);\n }\n }\n }\n return;\n case 0x06:\n /* Key Board OUT */\n if ((OPL.type & OPL_TYPE_KEYBOARD) != 0) {\n if (OPL.keyboardhandler_w != null) {\n OPL.keyboardhandler_w.handler(OPL.keyboard_param, v);\n } else {\n //Log(LOG_WAR,\"OPL:write unmapped KEYBOARD port\\n\");\n }\n }\n return;\n case 0x07:\n /* DELTA-T controll : START,REC,MEMDATA,REPT,SPOFF,x,x,RST */\n if ((OPL.type & OPL_TYPE_ADPCM) != 0) {\n YM_DELTAT_ADPCM_Write(OPL.deltat, r - 0x07, v);\n }\n return;\n case 0x08:\n /* MODE,DELTA-T : CSM,NOTESEL,x,x,smpl,da/ad,64k,rom */\n OPL.mode = v;\n v &= 0x1f;\n /* for DELTA-T unit */\n case 0x09:\n /* START ADD */\n case 0x0a:\n case 0x0b:\n /* STOP ADD */\n case 0x0c:\n case 0x0d:\n /* PRESCALE */\n case 0x0e:\n case 0x0f:\n /* ADPCM data */\n case 0x10:\n /* DELTA-N */\n case 0x11:\n /* DELTA-N */\n case 0x12:\n /* EG-CTRL */\n if ((OPL.type & OPL_TYPE_ADPCM) != 0) {\n YM_DELTAT_ADPCM_Write(OPL.deltat, r - 0x07, v);\n }\n return;\n }\n break;\n case 0x20:\n /* am,vib,ksr,eg type,mul */\n\n slot = slot_array[r & 0x1f];\n if (slot == -1) {\n return;\n }\n set_mul(OPL, slot, v);\n return;\n case 0x40:\n slot = slot_array[r & 0x1f];\n if (slot == -1) {\n return;\n }\n set_ksl_tl(OPL, slot, v);\n return;\n case 0x60:\n slot = slot_array[r & 0x1f];\n if (slot == -1) {\n return;\n }\n set_ar_dr(OPL, slot, v);\n return;\n case 0x80:\n slot = slot_array[r & 0x1f];\n if (slot == -1) {\n return;\n }\n set_sl_rr(OPL, slot, v);\n return;\n case 0xa0:\n switch (r) {\n case 0xbd: /* amsep,vibdep,r,bd,sd,tom,tc,hh */ {\n int rkey = ((OPL.rythm ^ v) & 0xFF);\n OPL.ams_table = new IntArray(AMS_TABLE, (v & 0x80) != 0 ? AMS_ENT : 0);\n OPL.vib_table = new IntArray(VIB_TABLE, (v & 0x40) != 0 ? VIB_ENT : 0);\n OPL.rythm = ((v & 0x3f) & 0xFF);\n\n if ((OPL.rythm & 0x20) != 0) {\n /* BD key on/off */\n if ((rkey & 0x10) != 0) {\n if ((v & 0x10) != 0) {\n OPL.P_CH[6].op1_out[0] = OPL.P_CH[6].op1_out[1] = 0;\n OPL_KEYON(OPL.P_CH[6].SLOT[SLOT1]);\n OPL_KEYON(OPL.P_CH[6].SLOT[SLOT2]);\n } else {\n OPL_KEYOFF(OPL.P_CH[6].SLOT[SLOT1]);\n OPL_KEYOFF(OPL.P_CH[6].SLOT[SLOT2]);\n }\n }\n /* SD key on/off */\n if ((rkey & 0x08) != 0) {\n if ((v & 0x08) != 0) {\n OPL_KEYON(OPL.P_CH[7].SLOT[SLOT2]);\n } else {\n OPL_KEYOFF(OPL.P_CH[7].SLOT[SLOT2]);\n }\n }/* TAM key on/off */\n\n if ((rkey & 0x04) != 0) {\n if ((v & 0x04) != 0) {\n OPL_KEYON(OPL.P_CH[8].SLOT[SLOT1]);\n } else {\n OPL_KEYOFF(OPL.P_CH[8].SLOT[SLOT1]);\n }\n }\n /* TOP-CY key on/off */\n if ((rkey & 0x02) != 0) {\n if ((v & 0x02) != 0) {\n OPL_KEYON(OPL.P_CH[8].SLOT[SLOT2]);\n } else {\n OPL_KEYOFF(OPL.P_CH[8].SLOT[SLOT2]);\n }\n }\n /* HH key on/off */\n if ((rkey & 0x01) != 0) {\n if ((v & 0x01) != 0) {\n OPL_KEYON(OPL.P_CH[7].SLOT[SLOT1]);\n } else {\n OPL_KEYOFF(OPL.P_CH[7].SLOT[SLOT1]);\n }\n }\n }\n }\n return;\n }\n /* keyon,block,fnum */\n if ((r & 0x0f) > 8) {\n return;\n }\n CH = OPL.P_CH[r & 0x0f];\n if ((r & 0x10) == 0) {\n /* a0-a8 */\n\n block_fnum = (int) (CH.block_fnum & 0x1f00) | v;\n } else {\n /* b0-b8 */\n\n int keyon = (v >> 5) & 1;\n block_fnum = (int) (((v & 0x1f) << 8) | (CH.block_fnum & 0xff));\n if (CH.keyon != keyon) {\n if ((CH.keyon = keyon) != 0) {\n CH.op1_out[0] = CH.op1_out[1] = 0;\n OPL_KEYON(CH.SLOT[SLOT1]);\n OPL_KEYON(CH.SLOT[SLOT2]);\n } else {\n OPL_KEYOFF(CH.SLOT[SLOT1]);\n OPL_KEYOFF(CH.SLOT[SLOT2]);\n }\n }\n }\n /* update */\n if (CH.block_fnum != block_fnum) {\n int blockRv = 7 - (block_fnum >> 10);\n int fnum = block_fnum & 0x3ff;\n CH.block_fnum = block_fnum & 0xFFFFFFFFL;\n\n CH.ksl_base = KSL_TABLE[block_fnum >> 6];\n CH.fc = OPL.FN_TABLE[fnum] >> blockRv;\n CH.kcode = (int) ((CH.block_fnum >> 9) & 0xFF);\n if ((OPL.mode & 0x40) != 0 && (CH.block_fnum & 0x100) != 0) {\n CH.kcode |= 1;\n }\n CALC_FCSLOT(CH, CH.SLOT[SLOT1]);\n CALC_FCSLOT(CH, CH.SLOT[SLOT2]);\n }\n return;\n case 0xc0:\n /* FB,C */\n if ((r & 0x0f) > 8) {\n return;\n }\n CH = OPL.P_CH[r & 0x0f];\n {\n int feedback = (v >> 1) & 7;\n CH.FB = ((feedback != 0 ? (8 + 1) - feedback : 0) & 0xFF);\n CH.CON = ((v & 1) & 0xFF);\n set_algorythm(CH);\n }\n return;\n case 0xe0:\n /* wave type */\n\n slot = slot_array[r & 0x1f];\n if (slot == -1) {\n return;\n }\n CH = OPL.P_CH[slot / 2];\n if (OPL.wavesel != 0) {\n /* Log(LOG_INF,\"OPL SLOT %d wave select %d\\n\",slot,v&3); */\n CH.SLOT[slot & 1].wt_offset = (v & 0x03) * SIN_ENT;//CH.SLOT[slot & 1].wavetable = new IntSubArray(SIN_TABLE[(v & 0x03) * SIN_ENT]);\n }\n return;\n default:\n System.out.println(\"case =\" + (r & 0xe0) + \" r=\" + r + \" v=\" + v);\n break;\n }\n }", "@java.lang.Override\n public int getCp() {\n return cp_;\n }", "protected abstract void setPpl();", "public void superCOPower(){\r\n SCOP = true;\r\n }", "LP getLp();", "public static void openPCSCR() {\r\n if (enaComp == null || enaSpec == null) {\r\n PCNMClientStart.switchPanels(new PCSCR());\r\n return;\r\n }\r\n ArrayList<String>compList = new ArrayList<String>();\r\n ArrayList<String>specList = new ArrayList<String>();\r\n for (Component cmp : enaComp)\r\n compList.add(cmp.toString());\r\n for (PCSpec spec : enaSpec)\r\n specList.add(spec.toString());\r\n PCNMClientStart.switchPanels(new PCSCR(compList, specList));\r\n }", "Integer getNLNDccp();", "public CPCAdapter(String code) {\n super();\n operationCode = code;\n if (code.equalsIgnoreCase(COPY))\n codeIndex = 0;\n else if (code.equalsIgnoreCase(CUT))\n codeIndex = 1;\n else if (code.equalsIgnoreCase(PASTE))\n codeIndex = 2;\n else\n System.out.println(\"wrong specfication of operation\");\n }", "public interface UserServiceInformationBase extends ISUPParameter {\n \t\n \t//for parameters list see ITU-T Q.763 (12/1999) 3.57\n \t//Recommendation Q.931 (05/98) Table 4-6/Q.931 Bearer capability information element\n \t//Dialogic User Service Information structure : http://www.dialogic.com/webhelp/NASignaling/Release%205.1/NA_ISUP_Layer_Dev_Ref_Manual/user_service_information.htm\n\n \t//LAYER IDENTIFIERS\n \tpublic static final int _LAYER1_IDENTIFIER=0x1;\n\n \tpublic static final int _LAYER2_IDENTIFIER=0x2;\n\n\tpublic static final int _LAYER3_IDENTIFIER=0x3;\n\n \t//CODING STANDART OPTIONS\n \tpublic static final int _CS_CCITT=0;\n \t\n \tpublic static final int _CS_INTERNATIONAL=1;\n \t\n \tpublic static final int _CS_NATIONAL=2;\n \t\n \tpublic static final int _CS_NETWORK=3;\n \t\n \t//INFORMATION TRANSFER CAPABILITIES OPTIONS\n \tpublic static final int _ITS_SPEECH=0;\n \t\n \tpublic static final int _ITS_UNRESTRICTED_DIGITAL=8;\n \t\n \tpublic static final int _ITS_RESTRICTED_DIGITAL=9;\n \t\n \tpublic static final int _ITS_3_1_KHZ=16;\n \t\n \tpublic static final int _ITS_UNRESTRICTED_DIGITAL_WITH_TONES=17;\n \t\n \tpublic static final int _ITS_VIDEO=24;\n \t\n \t//TRANSFER MODE OPTIONS\n \tpublic static final int _TM_CIRCUIT=0;\n \t\n \tpublic static final int _TM_PACKET=2;\n \t\n \t//INFORMATION TRANSFER RATE OPTIONS\n \tpublic static final int _ITR_PACKET_MODE=0;\n \t\n \tpublic static final int _ITR_64=16;\n \t\n \tpublic static final int _ITR_64x2=17;\n \t\n \tpublic static final int _ITR_384=19;\n \t\n \tpublic static final int _ITR_1536=21;\n \t\n \tpublic static final int _ITR_1920=23;\n \t\n \tpublic static final int _ITR_MULTIRATE=24;\n \t\n \t//SYNC/ASYNC OPTIONS\n \tpublic static final int _SA_SYNC=0;\n \t\n \tpublic static final int _SA_ASYNC=1;\n \t\n \t//NEGOTIATION OPTIONS\t\t\n \tpublic static final int _NG_INBAND_NOT_POSSIBLE=0;\n \t\n \tpublic static final int _NG_INBAND_POSSIBLE=1;\n \t\n \t//USER RATE OPTIONS\n \tpublic static final int _UR_EBITS=0;\n \t\n \tpublic static final int _UR_0_6=1;\n \t\n \tpublic static final int _UR_1_2=2;\n \t\n \tpublic static final int _UR_2_4=3;\n \t\n \tpublic static final int _UR_3_6=4;\n \t\n \tpublic static final int _UR_4_8=5;\n \t\n \tpublic static final int _UR_7_2=6;\n \t\n \tpublic static final int _UR_8_0=7;\n \t\n \tpublic static final int _UR_9_6=8;\n \t\n \tpublic static final int _UR_14_4=9;\n \t\n \tpublic static final int _UR_16_0=10;\n \t\n \tpublic static final int _UR_19_2=11;\n \t\n \tpublic static final int _UR_32_0=12;\n \t\n \tpublic static final int _UR_38_4=13;\n \t\n \tpublic static final int _UR_48_0=14;\n \t\n \tpublic static final int _UR_56_0=15;\n \t\n \tpublic static final int _UR_57_6=18;\n \t\n \tpublic static final int _UR_28_8=19;\n \t\n \tpublic static final int _UR_24_0=20;\n \t\n \tpublic static final int _UR_0_1345=21;\n \t\n \tpublic static final int _UR_0_1=22;\n \t\n \tpublic static final int _UR_0_075_ON_1_2=23;\n \t\n \tpublic static final int _UR_1_2_ON_0_075=24;\n \t\n \tpublic static final int _UR_0_050=25;\n \t\n \tpublic static final int _UR_0_075=26;\n \t\n \tpublic static final int _UR_0_110=27;\n \t\n \tpublic static final int _UR_0_150=28;\n \t\n \tpublic static final int _UR_0_200=29;\n \t\n \tpublic static final int _UR_0_300=30;\n \t\n \tpublic static final int _UR_12_0=31;\n \t\n \t//INTERMEDIATE RATE OPTIONS\n \tpublic static final int _IR_NOT_USED=0;\n \t\n \tpublic static final int _IR_8_0=1;\n \t\n \tpublic static final int _IR_16_0=2;\n \t\n \tpublic static final int _IR_32_0=3;\n \t\n \t//NETWORK INDEPENDENT CLOCK ON TX\n \tpublic static final int _NICTX_NOT_REQUIRED=0;\n \t\n \tpublic static final int _NICTX_REQUIRED=1;\n \t\n \t//NETWORK INDEPENDENT CLOCK ON RX\n \tpublic static final int _NICRX_CANNOT_ACCEPT=0;\n \t\n \tpublic static final int _NICRX_CAN_ACCEPT=1;\n \t\n \t//FLOW CONTROL ON TX\n \tpublic static final int _FCTX_NOT_REQUIRED=0;\n \t\n \tpublic static final int _FCTX_REQUIRED=1;\n \t\n \t//FLOW CONTROL ON RX\n \tpublic static final int _FCRX_CANNOT_ACCEPT=0;\n \t\n \tpublic static final int _FCRX_CAN_ACCEPT=1;\n \t\n \t//RATE ADAPTATION HEADER OPTIONS\n \tpublic static final int _HDR_INCLUDED=0;\n \t\n \tpublic static final int _HDR_NOT_INCLUDED=1;\n \t\n \t//MULTIFRAME OPTIONS\n \tpublic static final int _MF_NOT_SUPPORTED=0;\n \t\n \tpublic static final int _MF_SUPPORTED=1;\n \t\n \t//MODE OPTIONS\n \tpublic static final int _MODE_BIT_TRANSPARENT=0;\n \t\n \tpublic static final int _MODE_PROTOCOL_SENSITIVE=1;\n \t\n \t//LOGICAL LINK IDENTIFIER OPTIONS\n \tpublic static final int _LLI_256=0;\n \t\n \tpublic static final int _LLI_FULL_NEGOTIATION=1;\n \t\n \t//ASSIGNOR / ASSIGNEE OPTIONS\n \tpublic static final int _ASS_DEFAULT_ASSIGNEE=0;\n \t\n \tpublic static final int _ASS_ASSIGNOR_ONLY=1;\n \t\n \t//INBAND/OUT OF BAND NEGOTIATION OPTIONS\n \tpublic static final int _NEG_USER_INFORMATION=0;\n \t\t\n \tpublic static final int _NEG_INBAND=1;\n \t\t\n \t//STOP BITS OPTIONS\n \tpublic static final int _SB_NOT_USED=0;\n \t\n \tpublic static final int _SB_1BIT=1;\n \t\n \tpublic static final int _SB_1_5BITS=2;\n \t\n \tpublic static final int _SB_2BITS=3;\n \t\n \t//DATA BITS OPTIONS\n \tpublic static final int _DB_NOT_USED=0;\n \t\t\n \tpublic static final int _DB_5BITS=1;\n \t\t\n \tpublic static final int _DB_7BITS=2;\n \t\t\n \tpublic static final int _DB_8BITS=3;\n \t\t\n \t//PARITY INFORMATION\n \tpublic static final int _PAR_ODD=0;\n \t\t\t\n \tpublic static final int _PAR_EVEN=2;\n \t\t\t\n \tpublic static final int _PAR_NONE=3;\n \t\t\n \tpublic static final int _PAR_FORCED_0=4;\n \t\t\n \tpublic static final int _PAR_FORCED_1=5;\n \t\n \t//DUPLEX INFORMATION\n \tpublic static final int _DUP_HALF=0;\n \t\n \tpublic static final int _DUP_FULL=1;\n \t\t\t\n \t//MODEM TYPE INFORMATION\n \tpublic static final int _MODEM_V21=17;\n \t\n \tpublic static final int _MODEM_V22=18;\n \t\n \tpublic static final int _MODEM_V22_BIS=19;\n \t\n \tpublic static final int _MODEM_V23=20;\n \t\n \tpublic static final int _MODEM_V26=21;\n \t\n \tpublic static final int _MODEM_V26_BIS=22;\n \t\n \tpublic static final int _MODEM_V26_TER=23;\n \t\n \tpublic static final int _MODEM_V27=24;\n \t\n \tpublic static final int _MODEM_V27_BIS=25;\n \t\n \tpublic static final int _MODEM_V27_TER=26;\n \t\n \tpublic static final int _MODEM_V29=27;\n \t\n \tpublic static final int _MODEM_V32=29;\n \t\n \tpublic static final int _MODEM_V34=30;\n \t\n \t//LAYER 1 USER INFORMATION OPTIONS\n \tpublic static final int _L1_ITUT_110=1;\n \t\n \tpublic static final int _L1_G11_MU=2;\n \t\n \tpublic static final int _L1_G711_A=3;\n \t\n \tpublic static final int _L1_G721_ADPCM=4;\n \t\t\n \tpublic static final int _L1_G722_G725=5;\n \t\n \tpublic static final int _L1_H261=6;\n \t\n \tpublic static final int _L1_NON_ITUT=7;\n \t\n \tpublic static final int _L1_ITUT_120=8;\n \t\n \tpublic static final int _L1_ITUT_X31=9;\n \t\n \t//LAYER 2 USER INFORMATION OPTIONS\n \tpublic static final int _L2_BASIC=1;\n \t\n \tpublic static final int _L2_Q921=2;\n \t\n \tpublic static final int _L2_X25_SLP=6;\n \t\n \tpublic static final int _L2_X25_MLP=7;\n \t\n \tpublic static final int _L2_T71=8;\n \t\n \tpublic static final int _L2_HDLC_ARM=9;\n \t\n \tpublic static final int _L2_HDLC_NRM=10;\n \t\n \tpublic static final int _L2_HDLC_ABM=11;\n \t\n \tpublic static final int _L2_LAN_LLC=12;\n \t\n \tpublic static final int _L2_X75_SLP=13;\n \t\n \tpublic static final int _L2_Q922=14;\n \t\n \tpublic static final int _L2_USR_SPEC=16;\n \t\n \tpublic static final int _L2_T90=17;\n \t\n \t\n \t//LAYER 3 USER INFORMATION OPTIONS\n \tpublic static final int _L3_Q931=2;\n \t\n \tpublic static final int _L3_T90=5;\n \t\n \tpublic static final int _L3_X25_PLP=6;\n \t\n \tpublic static final int _L3_ISO_8208=7;\n \t\n \tpublic static final int _L3_ISO_8348=8;\n \t\n \tpublic static final int _L3_ISO_8473=9;\n \t\n \tpublic static final int _L3_T70=10;\n \t\n \tpublic static final int _L3_ISO_9577=11;\n \t\n \tpublic static final int _L3_USR_SPEC=16;\n \t\n \t\n \t//LAYER 3 PROTOCOL OPTIONS;\n \tpublic static final int _L3_PROT_IP=204;\n \t\n \tpublic static final int _L3_PROT_P2P=207;\n \t\n \tpublic int getCodingStandart();\n \n \tpublic void setCodingStandart(int codingStandart);\n \t\n \tpublic int getInformationTransferCapability();\n \n \tpublic void setInformationTransferCapability(int informationTransferCapability);\n \n \tpublic int getTransferMode();\n \n \tpublic void setTransferMode(int transferMode);\n \t\n \tpublic int getInformationTransferRate();\n \n \tpublic void setInformationTransferRate(int informationTransferRate);\n \t\n \t//custom rate in 64Kbps units\n \tpublic int getCustomInformationTransferRate();\n \t\n \tpublic void setCustomInformationTransferRate(int informationTransferRate);\n \t\n \t//TO CLEAR USER INFORMATION ON EACH LAYER SET IT TO 0\n \tpublic int getL1UserInformation();\n \n \tpublic void setL1UserInformation(int l1UserInformation);\n \t\n \tpublic int getL2UserInformation();\n \n \tpublic void setL2UserInformation(int l2UserInformation);\n \t\n \tpublic int getL3UserInformation();\n \n \tpublic void setL3UserInformation(int l3UserInformation);\n \t\n \tpublic int getSyncMode();\n \n \tpublic void setSyncMode(int syncMode);\n \t\n \tpublic int getNegotiation();\n \n \tpublic void setNegotiation(int negotiation);\n \t\n \tpublic int getUserRate();\n \n \tpublic void setUserRate(int userRate);\n \t\n \tpublic int getIntermediateRate();\n \n \tpublic void setIntermediateRate(int intermediateRate);\n \t\n \tpublic int getNicOnTx();\n \n \tpublic void setNicOnTx(int nicOnTx);\n \t\n \tpublic int getNicOnRx();\n \n \tpublic void setNicOnRx(int nicOnRx);\n \t\n \tpublic int getFlowControlOnTx();\n \n \tpublic void setFlowControlOnTx(int fcOnTx);\n \t\n \tpublic int getFlowControlOnRx();\n \n \tpublic void setFlowControlOnRx(int fcOnRx);\n \t\n \tpublic int getHDR();\n \n \tpublic void setHDR(int hdr);\n \t\n \tpublic int getMultiframe();\n \n \tpublic void setMultiframe(int multiframe);\n \t\n \tpublic int getMode();\n \n \tpublic void setMode(int mode);\n \t\n \tpublic int getLLINegotiation();\n \n \tpublic void setLLINegotiation(int lli);\n \t\n \tpublic int getAssignor();\n \n \tpublic void setAssignor(int assignor);\n \t\n \tpublic int getInBandNegotiation();\n \n \tpublic void setInBandNegotiation(int inBandNegotiation);\n \t\n \tpublic int getStopBits();\n \n \tpublic void setStopBits(int stopBits);\n \t\n \tpublic int getDataBits();\n \n \tpublic void setDataBits(int dataBits);\n \t\n \tpublic int getParity();\n \n \tpublic void setParity(int parity);\n \t\n \tpublic int getDuplexMode();\n \n \tpublic void setDuplexMode(int duplexMode);\n \t\n \tpublic int getModemType();\n \n \tpublic void setModemType(int modemType);\n \t\n \tpublic int getL3Protocol();\n \n \tpublic void setL3Protocol(int l3Protocol);\n \n }", "private int analyzeConstPool()\n {\n cp_index = new int[constant_pool_count];\n cp_index[0] = -1;\n\n int index = 1;\n int offset = 10;\n while (index < constant_pool_count)\n {\n cp_index[index] = offset;\n ++index;\n\n EConstPoolItem item = EConstPoolItem.getByTag(bytes[offset]);\n if (item == EConstPoolItem.UTF8_INFO)\n {\n int length = ByteTool.uBigEnd(bytes[offset + 1], bytes[offset + 2]);\n offset += length + 3;\n }\n else\n {\n offset += item.count;\n }\n\n // 这规定mdzz\n if (item == EConstPoolItem.DOUBLE_INFO || item == EConstPoolItem.LONG_INFO)\n {\n ++index;\n }\n }\n\n return offset;\n }", "private static void cajas() {\n\t\t\n\t}", "@java.lang.Override\n public int getCp() {\n return cp_;\n }", "public static void mcdc() {\n\t}", "public interface C0335c {\n }", "private C3P0Helper() { }", "public void setPCA0MD_CPS_Bits(PCA_ClockSource source){\r\n checkServoCommandThread();\r\n ServoCommand cmd=new ServoCommand();\r\n cmd.bytes=new byte[2];\r\n cmd.bytes[0]=CMD_SET_PCA0MD_CPS;\r\n cmd.bytes[1]=(byte)(0x07&source.code());\r\n submitCommand(cmd);\r\n }", "static int type_of_cnc(String passed){\n\t\treturn 1;\n\t}", "@Override\n public String getName() {\n return netcdfCS.getName();\n }", "void addPC(PCDevice pc);", "void mo4874b(C4718l c4718l);", "abstract void mo4372a(zzwt zzwt, cu cuVar);", "private CostHelper() {}", "float getCPA() throws SQLException;", "C1458cs mo7613iS();", "public void setCSPID(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localCSPID=param;\n \n\n }", "@Override\n\tprotected void getDataFromUCF() {\n\n\t}", "public interface C8843g {\n}", "public String getLBR_ProductSource();", "PCDevice getPC(UUID uID);", "public org.apache.axis2.databinding.types.soapencoding.String getCSPID(){\n return localCSPID;\n }", "static int type_of_cp(String passed){\n\t\treturn 1;\n\t}", "public void init()\n {\n boolean tHotspot = true;\n // Figures below valid for 1000TPS\n double tGcRateFactor = 1000.0D / ((1000.0D * 1000.0) * cClientTransPerMicro) ;\n if (tHotspot)\n {\n // tax average 6ms, max 65, every 20 seconds\n // me1 27ms, max 83ms, every 20 seconds\n // me1s 27ms, max 87, every 22seconds\n mTaxJvm = new GcService(9908.0D*1000 * tGcRateFactor, 9.0D*1000); \n mMeJvm = new GcService(2509.0D*1000 * tGcRateFactor, 17.0D*1000); \n mMeStandbyJvm = new GcService(2257.0D*1000 * tGcRateFactor, 15.0D*1000);\n }\n else\n {\n // Metronome \n mTaxJvm = new GcService(100*1000, 500);\n mMeJvm = new GcService(100*1000, 500);\n mMeStandbyJvm = new GcService(100*1000, 500);\n }\n\n String tName;\n mClient.init(new ServerConfig(mClient, mClientTaxNwDelay, \"Client\", cClientCount, cClientCount, 0.1));\n {\n mClientTaxNwDelay.init(new ServerConfig(mClientTaxNwDelay, mTaxTcp, \"ClientTaxNwDelay\", 1, 1, 0.1)); \n {\n tName = \"TaxServer\";\n mTaxTcp.init(new ServerConfig(mTaxJvm, mTaxTcp, mTaxPool, tName + \"_Tcp\", 1, 1, 22)); \n mTaxPool.init(new ServerConfig(mTaxJvm, mTaxPool, mTaxMeNwDelay, tName + \"_ServerPool\", 5, 150, 11)); \n\n {\n mTaxMeNwDelay.init(new ServerConfig(mTaxMeNwDelay, mMePrimaryTcp, \"TaxMeNwDelay\", 1, 1, 100)); \n {\n tName=\"MatchingEngine\";\n mMePrimaryTcp.init(new ServerConfig(mMeJvm, mMePrimaryTcp, mMePrimaryServerPool, tName + \"Tcp\", 1, 1, 14));\n mMePrimaryServerPool.init(new ServerConfig(mMeJvm, mMePrimaryServerPool, mMePrimarySorter, tName + \"_ServerPool\", 5, 150, 12)); \n mMePrimarySorter.init(new ServerConfig(mMeJvm, mMePrimarySorter, mMePrimaryChainUnit0, tName + \"_Sorter\", 1, 1, 13));\n mMePrimaryChainUnit0.init(new ServerConfig(mMeJvm, mMePrimaryChainUnit0, mMePrimaryPostChain, tName + \"_ChainUnit0\", 1, 1, 59)); \n mMePrimaryBatchSender.init(new ServerConfig(mMeJvm, mMePrimaryBatchSender, mMeMesNwDelay, tName + \"_BatchSender\", 10, 10, 1)); \n mMePrimaryRecoveryLog.init(new ServerConfig(mMeJvm, mMePrimaryRecoveryLog, mMePrimaryPostChain, tName + \"_RecoveryLog\", 1, 1, 50)); \n mMePrimaryPostChain.init(new ServerConfig(mMeJvm, mMePrimaryPostChain, mMePrimaryResponsePool, tName + \"_PostChain\", 1, 1, 46)); \n mMePrimaryResponsePool.init(new ServerConfig(mMeJvm, mMePrimaryResponsePool, mMeTaxNwDelay, tName + \"_ResponsePool\", 5, 25, 16)); \n\n {\n mMeMesNwDelay.init(new ServerConfig(mMeMesNwDelay, mMeStandbyTcp, \"MeMesNwDelay\", 1, 1, 90)); \n {\n tName=\"MatchingEngineStandby\";\n mMeStandbyTcp.init(new ServerConfig(mMeStandbyJvm, mMeStandbyTcp, mMeStandbyServerPool, tName + \"_Tcp\", 1, 1, 13)); \n mMeStandbyServerPool.init(new ServerConfig(mMeStandbyJvm, mMeStandbyServerPool, mMesMeNwDelay, tName + \"_ServerPool\", 5, 150, 18)); \n }\n mMesMeNwDelay.init(new ServerConfig(mMesMeNwDelay, mMePrimaryPostChain, \"MesMeNwDelay\", 1, 1, 90)); \n }\n }\n mMeTaxNwDelay.init(new ServerConfig(mMeTaxNwDelay, mTaxCollector, \"MeTaxNwDelay\", 1, 1, 100));\n }\n } \n mTaxCollector.init(new ServerConfig(mTaxJvm, mTaxCollector, mTaxClientNwDelay, tName + \"_Collector\", 1, 1, 0.1)); \n mTaxClientNwDelay.init(new ServerConfig(mTaxClientNwDelay, null, \"TaxClientNwDelay\", 1, 1, 0.1));\n }\n }", "PortMixer(PortMixerProvider.PortMixerInfo paramPortMixerInfo) {\n/* 70 */ super(paramPortMixerInfo, null, null, null);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 77 */ int i = 0;\n/* 78 */ int j = 0;\n/* 79 */ int k = 0;\n/* */ \n/* */ try {\n/* */ try {\n/* 83 */ this.id = nOpen(getMixerIndex());\n/* 84 */ if (this.id != 0L) {\n/* 85 */ i = nGetPortCount(this.id);\n/* 86 */ if (i < 0)\n/* */ {\n/* 88 */ i = 0;\n/* */ }\n/* */ } \n/* 91 */ } catch (Exception exception) {}\n/* */ \n/* 93 */ this.portInfos = new Port.Info[i];\n/* */ \n/* 95 */ for (byte b1 = 0; b1 < i; b1++) {\n/* 96 */ int m = nGetPortType(this.id, b1);\n/* 97 */ j += ((m & 0xFF) != 0) ? 1 : 0;\n/* 98 */ k += ((m & 0xFF00) != 0) ? 1 : 0;\n/* 99 */ this.portInfos[b1] = getPortInfo(b1, m);\n/* */ } \n/* */ } finally {\n/* 102 */ if (this.id != 0L) {\n/* 103 */ nClose(this.id);\n/* */ }\n/* 105 */ this.id = 0L;\n/* */ } \n/* */ \n/* */ \n/* 109 */ this.sourceLineInfo = (Line.Info[])new Port.Info[j];\n/* 110 */ this.targetLineInfo = (Line.Info[])new Port.Info[k];\n/* */ \n/* 112 */ j = 0; k = 0;\n/* 113 */ for (byte b = 0; b < i; b++) {\n/* 114 */ if (this.portInfos[b].isSource()) {\n/* 115 */ this.sourceLineInfo[j++] = this.portInfos[b];\n/* */ } else {\n/* 117 */ this.targetLineInfo[k++] = this.portInfos[b];\n/* */ } \n/* */ } \n/* */ }", "public static void c1_vl() {\n\t}", "public MnjCutlyrcntrlOffstandardLImpl() {\n }", "@Override\n\tpublic int getMinCpus() {\n\t\treturn _scienceApp.getMinCpus();\n\t}", "public PCtrlPort getFct (){\n\t\treturn this.fct;\n\t}", "java.lang.String getC3();", "static int type_of_cpo(String passed){\n\t\treturn 1;\n\t}", "protected UniqueInfo cpui() { return hpcpui(columnId()); }", "public void cNd() {\n AppMethodBeat.i(45485);\n if (this.tgC != null) {\n a(new e(this.pQV, \"CNY\", this.tgC.field_bindSerial, this.tgC.field_bankcardType), true, true);\n AppMethodBeat.o(45485);\n return;\n }\n g cPl = g.cPl();\n if (cPl.aFF()) {\n com.tencent.mm.ui.base.h.b((Context) this, cPl.pbp, getString(R.string.tz), true);\n AppMethodBeat.o(45485);\n return;\n }\n a(new e(this.pQV, \"CNY\", \"\", \"\"), true, true);\n AppMethodBeat.o(45485);\n }", "public void c2pStart();", "private static String lllIIllIl(short IIIlIIlllllIIll, String IIIIlIlllllIIll) {\n }", "Integer getCCPID();", "private CAUList construct_opt(int prefixLen,CAUList P, CAUList Px, CAUList Py, long sumMAUOfPx) {\n CAUList pxyUL = new CAUList(Py.item);\n long rtubOfPx = Px.sumOfRmu;\n long lubOfPx =(long)(Px.sumUtility / (double)prefixLen + Px.sumOfRemu) ;\n int tidPx=0, tidPy=0;\n\n while(tidPx < Px.CAUEntries.size() && tidPy < Py.CAUEntries.size()) {\n CAUEntry ex = Px.CAUEntries.get(tidPx);\n CAUEntry ey = Py.CAUEntries.get(tidPy);\n\n if(ex.tid==ey.tid) {\n if(P!=null) {\n CAUEntry e = findElementWithTID(P, ex.tid);\n if(e!=null) {\n // Create the new element\n CAUEntry eXY = new CAUEntry(ex.tid, ex.utility + ey.utility-e.utility, ex.rmu, ey.remu);\n // add the new element to the utility list of pXY\n pxyUL.addElement(eXY);\n }\n } else {\n // Create the new element\n CAUEntry eXY = new CAUEntry(ex.tid, ex.utility + ey.utility, ex.rmu, ey.remu);\n // add the new element to the utility list of pXY\n pxyUL.addElement(eXY);\n }\n\n ++tidPx; ++tidPy;\n } else if (ex.tid > ey.tid) {\n tidPy++;\n }\n else {\n ++tidPx;\n rtubOfPx -= ex.rmu;\n lubOfPx -= (ex.utility / (double)prefixLen + ex.remu);\n if(Math.min(rtubOfPx,lubOfPx) * prefixLen < sumMAUOfPx) {\n return null;\n }\n }\n }\n\n return pxyUL;\n }", "protected UniqueInfo cpui() { return hpcpui(columnStShhnKnyMsId()); }", "public static void OPLResetChip(FM_OPL OPL) {\n int c, s;\n int i;\n /* reset chip */\n OPL.mode = 0;\n /* normal mode */\n\n OPL_STATUS_RESET(OPL, 0x7f);\n /* reset with register write */\n OPLWriteReg(OPL, 0x01, 0);\n /* wabesel disable */\n\n OPLWriteReg(OPL, 0x02, 0);\n /* Timer1 */\n\n OPLWriteReg(OPL, 0x03, 0);\n /* Timer2 */\n\n OPLWriteReg(OPL, 0x04, 0);\n /* IRQ mask clear */\n\n for (i = 0xff; i >= 0x20; i--) {\n OPLWriteReg(OPL, i, 0);\n }\n /* reset OPerator paramater */\n for (c = 0; c < OPL.max_ch; c++) {\n OPL_CH CH = OPL.P_CH[c];\n /* OPL.P_CH[c].PAN = OPN_CENTER; */\n for (s = 0; s < 2; s++) {\n /* wave table */\n CH.SLOT[s].wt_offset = 0;\n CH.SLOT[s].wavetable = SIN_TABLE;//CH->SLOT[s].wavetable = &SIN_TABLE[0];\n /* CH.SLOT[s].evm = ENV_MOD_RR; */\n CH.SLOT[s].evc = EG_OFF;\n CH.SLOT[s].eve = EG_OFF + 1;\n CH.SLOT[s].evs = 0;\n }\n }\n if ((OPL.type & OPL_TYPE_ADPCM) != 0) {\n YM_DELTAT DELTAT = OPL.deltat;\n DELTAT.freqbase = OPL.freqbase;\n DELTAT.output_pointer = outd;\n DELTAT.portshift = 5;\n DELTAT.output_range = DELTAT_MIXING_LEVEL << TL_BITS;\n YM_DELTAT_ADPCM_Reset(DELTAT, 0);\n }\n }", "private javax.swing.JLabel getLblOSLocale() {\n\tif (ivjLblOSLocale == null) {\n\t\ttry {\n\t\t\tivjLblOSLocale = new javax.swing.JLabel();\n\t\t\tivjLblOSLocale.setName(\"LblOSLocale\");\n\t\t\tivjLblOSLocale.setText(\"Locale:\");\n\t\t\tivjLblOSLocale.setBounds(10, 94, 140, 14);\n\t\t\t// user code begin {1}\n ivjLblOSLocale.setText(ResourceManager.getResource(PlatformInfoPanel.class, \"LblOSLocale_text\"));\n\t\t\t// user code end\n\t\t} catch (java.lang.Throwable ivjExc) {\n\t\t\t// user code begin {2}\n\t\t\t// user code end\n\t\t\thandleException(ivjExc);\n\t\t}\n\t}\n\treturn ivjLblOSLocale;\n}", "public void setLUC(long LUC) {\r\n/* 394 */ this._LUC = LUC;\r\n/* 395 */ this._has_LUC = true;\r\n/* */ }", "public int getSipDscp();", "public interface CLibrary extends LibCAPI, Library {\n\n int AI_CANONNAME = 2;\n\n int UT_LINESIZE = 32;\n int UT_NAMESIZE = 32;\n int UT_HOSTSIZE = 256;\n int LOGIN_PROCESS = 6; // Session leader of a logged in user.\n int USER_PROCESS = 7; // Normal process.\n\n @FieldOrder({ \"sa_family\", \"sa_data\" })\n class Sockaddr extends Structure {\n public short sa_family;\n public byte[] sa_data = new byte[14];\n\n public static class ByReference extends Sockaddr implements Structure.ByReference {\n }\n }\n\n @FieldOrder({ \"ai_flags\", \"ai_family\", \"ai_socktype\", \"ai_protocol\", \"ai_addrlen\", \"ai_addr\", \"ai_canonname\",\n \"ai_next\" })\n class Addrinfo extends Structure {\n public int ai_flags;\n public int ai_family;\n public int ai_socktype;\n public int ai_protocol;\n public int ai_addrlen;\n public Sockaddr.ByReference ai_addr;\n public String ai_canonname;\n public ByReference ai_next;\n\n public static class ByReference extends Addrinfo implements Structure.ByReference {\n }\n\n public Addrinfo() {\n }\n\n public Addrinfo(Pointer p) {\n super(p);\n read();\n }\n }\n\n /*\n * Between macOS and FreeBSD there are multiple versions of some tcp/udp/ip\n * stats structures. Since we only need a few of the hundreds of fields, we can\n * improve performance by selectively reading the ints from the appropriate\n * offsets, which are consistent across the structure. These classes include the\n * common fields and offsets.\n */\n\n class BsdTcpstat {\n public int tcps_connattempt; // 0\n public int tcps_accepts; // 4\n public int tcps_drops; // 12\n public int tcps_conndrops; // 16\n public int tcps_sndpack; // 64\n public int tcps_sndrexmitpack; // 72\n public int tcps_rcvpack; // 104\n public int tcps_rcvbadsum; // 112\n public int tcps_rcvbadoff; // 116\n public int tcps_rcvmemdrop; // 120\n public int tcps_rcvshort; // 124\n }\n\n class BsdUdpstat {\n public int udps_ipackets; // 0\n public int udps_hdrops; // 4\n public int udps_badsum; // 8\n public int udps_badlen; // 12\n public int udps_opackets; // 36\n public int udps_noportmcast; // 48\n public int udps_rcv6_swcsum; // 64\n public int udps_snd6_swcsum; // 89\n }\n\n class BsdIpstat {\n public int ips_total; // 0\n public int ips_badsum; // 4\n public int ips_tooshort; // 8\n public int ips_toosmall; // 12\n public int ips_badhlen; // 16\n public int ips_badlen; // 20\n public int ips_delivered; // 56\n }\n\n class BsdIp6stat {\n public long ip6s_total; // 0\n public long ip6s_localout; // 88\n }\n\n /**\n * Returns the process ID of the calling process. The ID is guaranteed to be\n * unique and is useful for constructing temporary file names.\n *\n * @return the process ID of the calling process.\n */\n int getpid();\n\n /**\n * Given node and service, which identify an Internet host and a service,\n * getaddrinfo() returns one or more addrinfo structures, each of which contains\n * an Internet address that can be specified in a call to bind(2) or connect(2).\n *\n * @param node\n * a numerical network address or a network hostname, whose network\n * addresses are looked up and resolved.\n * @param service\n * sets the port in each returned address structure.\n * @param hints\n * specifies criteria for selecting the socket address structures\n * returned in the list pointed to by res.\n * @param res\n * returned address structure\n * @return 0 on success; sets errno on failure\n */\n int getaddrinfo(String node, String service, Addrinfo hints, PointerByReference res);\n\n /**\n * Frees the memory that was allocated for the dynamically allocated linked list\n * res.\n *\n * @param res\n * Pointer to linked list returned by getaddrinfo\n */\n void freeaddrinfo(Pointer res);\n\n /**\n * Translates getaddrinfo error codes to a human readable string, suitable for\n * error reporting.\n *\n * @param e\n * Error code from getaddrinfo\n * @return A human-readable version of the error code\n */\n String gai_strerror(int e);\n\n /**\n * Rewinds the file pointer to the beginning of the utmp file. It is generally a\n * good idea to call it before any of the other functions.\n */\n void setutxent();\n\n /**\n * Closes the utmp file. It should be called when the user code is done\n * accessing the file with the other functions.\n */\n void endutxent();\n}", "float getCpMultiplier();", "public int getNBCInoperative();", "public SelectSC()\r\n {\r\n\tlanguage = null;// just not to leave constructor empty\r\n }", "static void perform_cpo(String passed){\n\t\tint type = type_of_cpo(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tcall_when_parity_not(passed);\n\t\t\tbreak;\n\t\t}\n\t}", "void mips3drc_set_options(UINT8 cpunum, UINT32 opts)\n\t{\n\t}", "public boolean updAiccAu(Connection con, String domain, loginProfile prof, String aicc_crs_filename, String aicc_cst_filename, String aicc_des_filename, String aicc_au_filename, String aicc_ort_filename)\n throws IOException, SQLException, qdbException, qdbErrMessage, cwSysMessage {\n//System.out.println(\"mod_in_eff_start_datetime:\" + mod_in_eff_start_datetime);\n//System.out.println(\"mod_in_eff_end_datetime:\" + mod_in_eff_end_datetime);\n//System.out.println(\"mod_max_score:\" + mod_max_score);\n//System.out.println(\"res_subtype:\" + res_subtype);\n//System.out.println(\"res_src_type:\" + res_src_type);\n//System.out.println(\"res_src_link:\" + res_src_link);\n // only used for calling aicc methods\n dbCourse dbCos = new dbCourse();\n dbCos.cos_res_id = getCosId(con, mod_res_id);\n\n try {\n String mod_import_xml = null;\n\n Vector vtCosDescriptor = null;\n Vector vtCosStructure = null;\n Vector vtObjectiveRelation = null;\n\n Vector vtTemp = null;\n\n crsIniFile iniFileCRS = null;\n try {\n iniFileCRS = new crsIniFile(aicc_crs_filename);\n } catch(IOException e) {\n \tCommonLog.error(\"Error in loading the iniFileCRS:\" + e.toString());\n throw new IOException(e.toString());\n }\n\n vtCosDescriptor = dbCos.buildCosDescriptorVector(aicc_des_filename);\n vtCosStructure = dbCos.getCosStructureVector(aicc_cst_filename);\n if (aicc_ort_filename != null) {\n vtObjectiveRelation = dbCos.getCosObjectiveVector(aicc_ort_filename);\n }\n Hashtable htBlockElements = dbCos.buildAiccBlockElements(dbCos.getMemberRelationLst(aicc_cst_filename));\n\n Hashtable htAuModID = new Hashtable();\n Hashtable htObjObjID = new Hashtable();\n\n BufferedReader in = null;\n try {\n in = new BufferedReader(new InputStreamReader(new FileInputStream(new File(aicc_au_filename))));\n } catch(Exception e) {\n throw new IOException(e.toString());\n }\n String line = null;\n String systemID = null;\n String type = null;\n String command_line = null;\n String file_name = null;\n String max_score = null;\n String mastery_score = null;\n String max_time_allowed = null;\n String time_limit_action = null;\n String system_vendor = null;\n String core_vendor = null;\n String web_launch = null;\n String au_password = null;\n\n String tempStr = null;\n\n Hashtable htAuFieldOrder = null;\n Hashtable htAuFieldValue = null;\n\n StringTokenizer st = null;\n // the first line is used to determine the field order\n for (;;) {\n try {\n line = in.readLine();\n } catch(Exception e) {\n throw new IOException(e.toString());\n }\n if (line == null) {\n break;\n }\n else if (line.trim().length() > 0 && line.trim().equalsIgnoreCase(\"\") == false) {\n htAuFieldOrder = new Hashtable();\n\n int index = 1;\n\n Vector vtRecord = dbCos.buildTableRecord(line);\n String recordElement = null;\n for (int i=0; i<vtRecord.size(); i++) {\n recordElement = (String)vtRecord.elementAt(i);\n htAuFieldOrder.put(recordElement.toLowerCase(), new Integer(index));\n index++;\n }\n\n break;\n }\n }\n\n //actually there should be only one AU record in the .au file for skillsoft course\n for (;;) {\n String mod_desc = null;\n\n try {\n line = in.readLine();\n } catch(Exception e) {\n throw new IOException(e.toString());\n }\n if (line == null) {\n break;\n }\n else if (line.trim().length() == 0 || line.trim().equalsIgnoreCase(\"\") == true) {\n continue;\n }\n else {\n htAuFieldValue = new Hashtable();\n\n int index = 1;\n\n Vector vtRecord = dbCos.buildTableRecord(line);\n String recordElement = null;\n for (int i=0; i<vtRecord.size(); i++) {\n recordElement = (String)vtRecord.elementAt(i);\n htAuFieldValue.put(new Integer(index), recordElement);\n index++;\n }\n\n Integer fieldIndex = null;\n\n fieldIndex = (Integer)htAuFieldOrder.get(\"system_id\");\n systemID = (String)htAuFieldValue.get(fieldIndex);\n\n fieldIndex = (Integer)htAuFieldOrder.get(\"type\");\n type = (String)htAuFieldValue.get(fieldIndex);\n\n fieldIndex = (Integer)htAuFieldOrder.get(\"command_line\");\n command_line = (String)htAuFieldValue.get(fieldIndex);\n\n fieldIndex = (Integer)htAuFieldOrder.get(\"file_name\");\n file_name = (String)htAuFieldValue.get(fieldIndex);\n\n fieldIndex = (Integer)htAuFieldOrder.get(\"max_score\");\n max_score = (String)htAuFieldValue.get(fieldIndex);\n\n fieldIndex = (Integer)htAuFieldOrder.get(\"mastery_score\");\n mastery_score = (String)htAuFieldValue.get(fieldIndex);\n\n fieldIndex = (Integer)htAuFieldOrder.get(\"max_time_allowed\");\n max_time_allowed = (String)htAuFieldValue.get(fieldIndex);\n\n fieldIndex = (Integer)htAuFieldOrder.get(\"time_limit_action\");\n time_limit_action = (String)htAuFieldValue.get(fieldIndex);\n\n fieldIndex = (Integer)htAuFieldOrder.get(\"system_vendor\");\n system_vendor = (String)htAuFieldValue.get(fieldIndex);\n\n fieldIndex = (Integer)htAuFieldOrder.get(\"core_vendor\");\n core_vendor = (String)htAuFieldValue.get(fieldIndex);\n\n fieldIndex = (Integer)htAuFieldOrder.get(\"web_launch\");\n web_launch = (String)htAuFieldValue.get(fieldIndex);\n\n fieldIndex = (Integer)htAuFieldOrder.get(\"au_password\");\n au_password = (String)htAuFieldValue.get(fieldIndex);\n\n vtTemp = null;\n for (int i=0; i<vtCosDescriptor.size(); i++) {\n vtTemp = (Vector)vtCosDescriptor.elementAt(i);\n if (systemID.equalsIgnoreCase((String)vtTemp.elementAt(0)) == true) {\n break;\n }\n else {\n vtTemp = null;\n }\n }\n\n mod_import_xml = \"<assignable_unit system_id=\\\"\";\n mod_import_xml += dbUtils.esc4XML(systemID);\n mod_import_xml += \"\\\" type=\\\"\";\n mod_import_xml += dbUtils.esc4XML(type);\n mod_import_xml += \"\\\" command_line=\\\"\";\n mod_import_xml += dbUtils.esc4XML(command_line);\n mod_import_xml += \"\\\" file_name=\\\"\";\n mod_import_xml += dbUtils.esc4XML(file_name);\n mod_import_xml += \"\\\" max_score=\\\"\";\n mod_import_xml += dbUtils.esc4XML(max_score);\n mod_import_xml += \"\\\" mastery_score=\\\"\";\n mod_import_xml += dbUtils.esc4XML(mastery_score);\n mod_import_xml += \"\\\" max_time_allowed=\\\"\";\n mod_import_xml += dbUtils.esc4XML(max_time_allowed);\n mod_import_xml += \"\\\" time_limit_action=\\\"\";\n mod_import_xml += dbUtils.esc4XML(time_limit_action);\n mod_import_xml += \"\\\" system_vendor=\\\"\";\n mod_import_xml += dbUtils.esc4XML(system_vendor);\n mod_import_xml += \"\\\" core_vendor=\\\"\";\n mod_import_xml += dbUtils.esc4XML(core_vendor);\n mod_import_xml += \"\\\" web_launch=\\\"\";\n mod_import_xml += web_launch;\n mod_import_xml += \"\\\" au_password=\\\"\";\n mod_import_xml += au_password;\n\n mod_import_xml += \"\\\" />\";\n\n if (max_score.length() > 0) {\n mod_max_score = Float.parseFloat(max_score);;\n }\n else {\n }\n\n if (mastery_score.length() > 0) {\n mod_pass_score = Float.parseFloat(mastery_score);\n }\n else {\n }\n\n if (max_time_allowed.equalsIgnoreCase(\"\") == true || max_time_allowed.length() == 0) {\n }\n else {\n int hr = 0;\n int min = 0;\n int sec = 0;\n String strTime = null;\n StringTokenizer stTime = new StringTokenizer(max_time_allowed,\":\");\n\n strTime = stTime.nextToken();\n strTime = strTime.trim();\n hr = Integer.parseInt(strTime);\n\n strTime = stTime.nextToken();\n strTime = strTime.trim();\n min = Integer.parseInt(strTime);\n\n strTime = stTime.nextToken();\n strTime = strTime.trim();\n sec = Integer.parseInt(strTime);\n\n res_duration = hr*60 + min + sec/60;\n }\n\n res_type = \"MOD\";\n// res_lan = \"ISO-8859-1\";\n res_subtype = \"AICC_AU\";\n res_src_type = \"AICC_FILES\";\n res_src_link = file_name;\n// mod_in_eff_end_datetime = Timestamp.valueOf(dbUtils.MAX_TIMESTAMP);\n// mod_in_eff_start_datetime = Timestamp.valueOf(dbUtils.MIN_TIMESTAMP);\n\n // truncate the length of the description\n //if (res_desc.length() > 200) {\n //res_desc = res_desc.substring(0, 200);\n //}\n\n upd(con, prof);\n updAicc(con, prof, core_vendor, au_password, mod_import_xml, time_limit_action, web_launch, iniFileCRS.getValue(\"Course_Creator\"), res_desc, iniFileCRS.getValue(\"Version\"));\n\n htAuModID.put(systemID, new Long(mod_res_id));\n }\n\n }\n\n in.close();\n\n Vector vtElement = null;\n\n // input AICC objectives into DB\n for (int i=0; i<vtCosDescriptor.size(); i++) {\n String objSystemID = null;\n String objDeveloperID = null;\n String objTitle = null;\n String objDesc = null;\n dbObjective dbObj = null;\n\n vtElement = (Vector)vtCosDescriptor.elementAt(i);\n objSystemID = (String)vtElement.elementAt(0);\n if (objSystemID.toLowerCase().startsWith(\"j\") == true) {\n objDeveloperID = (String)vtElement.elementAt(1);\n objTitle = (String)vtElement.elementAt(2);\n objDesc = (String)vtElement.elementAt(3);\n\n dbObj = new dbObjective();\n dbObj.obj_type = \"AICC\";\n dbObj.obj_desc = dbCos.trimObjDesc(dbUtils.esc4XML(objDesc));\n dbObj.obj_title = objTitle;\n dbObj.obj_developer_id = objDeveloperID;\n dbObj.obj_import_xml = \"<objective developer_id=\\\"\";\n dbObj.obj_import_xml += objDeveloperID;\n dbObj.obj_import_xml += \"\\\" />\";\n int obj_id = (int)dbObj.insAicc(con, prof);\n htObjObjID.put(objSystemID, new Integer(obj_id));\n }\n }\n\n if (vtObjectiveRelation != null) {\n vtElement = null;\n for (int i=0; i<vtObjectiveRelation.size(); i++) {\n vtElement = (Vector)vtObjectiveRelation.elementAt(i);\n String parentSystemID = (String)vtElement.elementAt(0);\n\n Vector vtObjID = new Vector();\n String childSystemID = null;\n for (int j=1; j<vtElement.size(); j++) {\n childSystemID = (String)vtElement.elementAt(j);\n vtObjID.addElement((Integer)htObjObjID.get(childSystemID));\n }\n\n long[] intObjID = new long[vtObjID.size()];\n for (int k=0; k<vtObjID.size(); k++) {\n intObjID[k] = ((Integer) vtObjID.elementAt(k)).longValue();\n }\n\n long[] int_parent_mod_id_lst = null;\n if (parentSystemID.startsWith(\"A\") == true || parentSystemID.startsWith(\"a\") == true) {\n int_parent_mod_id_lst = new long[] { ((Long)htAuModID.get(parentSystemID)).longValue() };\n }\n // collect all AU's mod_id in that AICC Block\n else if (parentSystemID.startsWith(\"B\") == true || parentSystemID.startsWith(\"b\") == true) {\n Vector vtBlockElements = (Vector)htBlockElements.get(parentSystemID);\n int_parent_mod_id_lst = new long[vtBlockElements.size()];\n String tempSystemID = null;\n for (int m=0; m<vtBlockElements.size(); m++) {\n tempSystemID = (String)vtBlockElements.elementAt(m);\n int_parent_mod_id_lst[m] = ((Long)htAuModID.get(tempSystemID)).longValue();\n }\n }\n dbResourceObjective dbResObj = new dbResourceObjective();\n // remove the previous objective relations\n dbResObj.removeResObj(con, int_parent_mod_id_lst);\n // add new objective relations\n dbResObj.insResObj(con, int_parent_mod_id_lst, intObjID);\n\n }\n }\n\n // update the cos corresponding fields, or reset the fields that is previously set\n // during importing an AICC course which should be reset when inserting/updating an AICC AU\n dbCos.updAiccCos(con, prof, null, null, null, -1, false, false);\n\n return true;\n\n } catch(qdbErrMessage e) {\n // rollback at qdbAction\n //con.rollback();\n throw new qdbErrMessage(e.toString());\n }\n }", "void mo17021c();", "public long getLUC() {\r\n/* 180 */ return this._LUC;\r\n/* */ }", "String siToCcsdsName(String siName);", "public static void c0_vl() {\n\t}", "public void addBasedOnPacketIn(IOFSwitch sw, OFPacketIn pin, FloodlightContext cntx, OFPort outPort) {\n }", "public void setCpf(String cpf) {\r\n\t\tthis.cpf = cpf;\r\n\t}", "public LNDCDC_ADS_PRPSL_DEAL_PNT_FEAT_LN() {}", "public interface ServConstrainsManagement {\n /**\n * Obtien la lista de componentes visuales a los cuales no tendra accesso\n * el rol (perfil) que esta operando el sistema\n * @return Lista de componentes visuales que no tiene acceso\n */\n public List<ViewConstrainsEnum> getViewConstrainsUIComponent();\n \n}", "public MotgaCltalCtrctBsSgmt() {\n\t\tsuper();\n\t}", "@Override public String toString() {\n return \"\" + \"CUs=\" + CUs // NOI18N\n + \", Idx=\" + Idx // NOI18N\n + super.toString(); // NOI18N\n }", "public interface C0136c {\n }", "@Override\n public void updateLogData(LogDataBE logData) \n {\n\t\t//logData.AddData(\"Carriage: LimitSwitch\", String.valueOf(get_isCubeInCarriage()));\n }", "String getATCUD();" ]
[ "0.51517195", "0.5135802", "0.5130123", "0.51140565", "0.51104945", "0.51104945", "0.5100413", "0.507564", "0.50554025", "0.5013543", "0.49887782", "0.49717307", "0.49472752", "0.49416333", "0.49269113", "0.49087188", "0.49014747", "0.48975307", "0.4896185", "0.4886912", "0.48849016", "0.48586303", "0.4856094", "0.4850584", "0.4840018", "0.48377076", "0.48198777", "0.48021042", "0.4799702", "0.4795781", "0.4781741", "0.47809926", "0.47600654", "0.47596103", "0.47579613", "0.47567436", "0.4752974", "0.47518906", "0.47492433", "0.4729568", "0.472945", "0.47275466", "0.4727283", "0.47271854", "0.47153455", "0.4711272", "0.47080684", "0.47057822", "0.4703072", "0.4697399", "0.46967533", "0.46965614", "0.46922854", "0.46909422", "0.4684956", "0.46848485", "0.46738347", "0.4672547", "0.46637025", "0.4658072", "0.4657575", "0.4656455", "0.46541733", "0.4649534", "0.46429133", "0.4641177", "0.46363086", "0.46349734", "0.4633616", "0.46311054", "0.46212125", "0.46164656", "0.46129337", "0.4605459", "0.46043426", "0.4600755", "0.4599177", "0.4598485", "0.45971888", "0.45958096", "0.45870918", "0.4585075", "0.4583741", "0.45829168", "0.45823166", "0.45796257", "0.45729607", "0.45707822", "0.45690176", "0.45660943", "0.45653594", "0.45631507", "0.45472246", "0.45466408", "0.45463362", "0.45415893", "0.45400682", "0.45398918", "0.45360428", "0.45327395" ]
0.5064449
8
TODO temp. solution; move it out of ALU or combine with existing inc()
public int incExtern(final int op1) { Adder adder = Adder.newAdder8(); int result = adder.add(op1, 1, 0); setIncrementFlags(adder, result); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void inc() {\n inc(1);\n }", "public void inc(){\n this.current += 1;\n }", "default void inc(long value) {\n\t\tcount(Math.abs(value));\n\t}", "public void increment() {\n increment(1);\n }", "public void IncrementCounter()\r\n {\r\n \tsetCurrentValue( currentValue.add(BigInteger.ONE)); \r\n \r\n log.debug(\"counter now: \" + currentValue.intValue() );\r\n \r\n }", "void increase();", "void increase();", "public void inc(String name) {\n inc(name, 1);\n }", "public void incCount() { }", "private synchronized void increment() {\n count++;\n atomicInteger.incrementAndGet();\n }", "private void incTag() {\n long id = tagId(tag[th()]); // 1\n tag[th()] = newTag(id+1); // 2\n }", "public void incOffset( Integer increment ) {\n offset += increment;\n }", "private void increment() {\n for (int i=0; i < 10000; i++) {\n count++;\n }\n }", "void incrementCount();", "public static void increment() {\n\t\tcount.incrementAndGet();\n//\t\tcount++;\n\t}", "long getAndIncrement();", "private synchronized void increment() {\n ++count;\n }", "private int[] inc(int[] a)\n {\n int tI = a.length - 1;\n long m = 0;\n\n m = (((long)a[tI]) & IMASK) + 1L;\n a[tI--] = (int)m;\n m >>>= 32;\n\n while (tI >= 0 && m != 0)\n {\n m += (((long)a[tI]) & IMASK);\n a[tI--] = (int)m;\n m >>>= 32;\n }\n\n return a;\n }", "private int[] inc(int[] a)\n {\n int tI = a.length - 1;\n long m = 0;\n\n m = (((long)a[tI]) & IMASK) + 1L;\n a[tI--] = (int)m;\n m >>>= 32;\n\n while (tI >= 0 && m != 0)\n {\n m += (((long)a[tI]) & IMASK);\n a[tI--] = (int)m;\n m >>>= 32;\n }\n\n return a;\n }", "public void increment(){\n value+=1;\n }", "private void incrementCounter()\r\n\t{\r\n\t\tthis.counter++;\r\n\t}", "public int inc(Object key)\r\n {\r\n return add(key, 1);\r\n }", "public void increase() {\r\n\r\n\t\tincrease(1);\r\n\r\n\t}", "public abstract void increment(int delta);", "@Override\n public void visitIINC(IINC obj) {\n int v = obj.getIndex();\n int amount = obj.getIncrement();\n ConstantFrame f = getFrame();\n Constant c = f.getValue(v);\n if (c.isConstantInteger())\n f.setValue(v, new Constant(c.getConstantInt() + amount));\n else\n f.setValue(v, Constant.NOT_CONSTANT);\n // System.out.println(\"after iinc: \" + getFrame());\n }", "private void inc_x()\n {\n synchronized(mLock_IndexX) { set_x(get_x() + 1); }\n }", "public void incCounter()\n {\n counter++;\n }", "@Override\r\n\tpublic int increase() throws Exception {\n\t\treturn 0;\r\n\t}", "public void increment() {\n sync.increment();\n }", "public void increment() {\n items++;\n }", "private static void setCounter() {++counter;}", "public void testGetAndIncrement() {\n AtomicLong ai = new AtomicLong(1);\n assertEquals(1, ai.getAndIncrement());\n assertEquals(2, ai.get());\n ai.set(-2);\n assertEquals(-2, ai.getAndIncrement());\n assertEquals(-1, ai.getAndIncrement());\n assertEquals(0, ai.getAndIncrement());\n assertEquals(1, ai.get());\n }", "public int increase() {\r\n return ++value;\r\n }", "void incrementAddedCount() {\n addedCount.incrementAndGet();\n }", "public void increment() {\n this.data++;\n }", "public void IncrementCounter()\r\n {\r\n \tif (startAtUsed==false\r\n \t\t\t|| (!counter.encounteredAlready)) {\r\n \t\t// Defer setting the startValue until the list\r\n \t\t// is actually encountered in the main document part,\r\n \t\t// since otherwise earlier numbering (using the\r\n \t\t// same abstract number) would use this startValue\r\n \tcounter.setCurrentValue(this.startValue); \r\n \tlog.debug(\"not encounteredAlready; set to startValue \" + startValue);\r\n \tcounter.encounteredAlready = true;\r\n \tstartAtUsed = true;\r\n \t}\r\n counter.IncrementCounter();\r\n }", "void incUsage() {\n incUsage(1);\n }", "void incCount() {\n ++refCount;\n }", "private static void increaseReference(Counter counter) {\n counter.advance(1);\n }", "protected void incrementCurrent() {\n current++;\n }", "private static int nextID() {\r\n\t\treturn ID++;\r\n\t}", "@Override\n public synchronized void increment() {\n count++;\n }", "public void incCounter(){\n counter++;\n }", "public static synchronized void increment() {\r\n\t\tcount++;\r\n\t}", "public void inc(String key);", "private static void add() {\n\tcount.incrementAndGet();\n}", "public void increaseCounter(UltraSearchSessions.Session session,\n HugeType type, long increment) {\n\n\n JSONObject result = session.get(TABLE, type.name());\n if(null == result){\n putCounter(session, type, increment);\n return;\n }\n\n\n JSONObject obj = new JSONObject();\n\n JSONObject fields = new JSONObject();\n JSONObject id = new JSONObject();\n id.put(\"increment\", increment);\n fields.put(\"ID\", id);\n\n obj.put(\"fields\", fields);\n session.putDoc(TABLE, type.name(), obj.toString());\n\n\n }", "public void Increase()\n {\n Increase(1);\n }", "public long inc(final String key) {\n String c = get(key);\n if (c == null) c = \"0\";\n final long l = Long.parseLong(c) + 1;\n put(key, Long.toString(l));\n return l;\n }", "void increase()\n {\n a++;\n b++ ;\n }", "void add(int idx, float incr);", "public void increment(){\n\t\twordCount += 1;\n\t}", "public void incrementRefusals() {\n\t}", "private static void increasePrimitive(int value) {\n value++;\n }", "public void incA() {\n this.countA++;\n }", "public int getNextUnSafeSequence(){ return value++;}", "@Test\n\tpublic void testIncrement() {\n\t\tvar counter = new Counter();\n\t\tassertEquals(0, counter.get());\n\t\tcounter.increment();\n\t\tcounter.increment();\n\t\tassertEquals(2, counter.get());\n\t}", "public static void increase(){\n c++;\n }", "@CallSuper\n public long incrementAndGet() {\n return addAndGet(1);\n }", "public int valueAndIncrement() {\n\t\tint x = offset;\n\t\tnext();\n\t\treturn x;\n\t}", "public void incrementCount() {\n\t\tcount++;\n\t}", "public void testIncrementAndGet() {\n AtomicLong ai = new AtomicLong(1);\n assertEquals(2, ai.incrementAndGet());\n assertEquals(2, ai.get());\n ai.set(-2);\n assertEquals(-1, ai.incrementAndGet());\n assertEquals(0, ai.incrementAndGet());\n assertEquals(1, ai.incrementAndGet());\n assertEquals(1, ai.get());\n }", "long incrementAndGet();", "public void counterAddup(){\n\t\tfor (int i=0; i<window.size(); i++){\n\t\t\tif ( window.get(i).acked == false ){\n\t\t\t\twindow.get(i).counter = window.get(i).counter+1;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn ;\n\t}", "public void incrementCount(){\n count+=1;\n }", "public void next(){\n\t\tif(generated)\n\t\t\tcurr++;\n\t}", "public DocumentMutation increment(FieldPath path, byte inc);", "private synchronized void incrementCount()\n\t{\n\t\tcount++;\n\t}", "public void increaseScore(){\n this.inc.seekTo(0);\n this.inc.start();\n this.currentScore++;\n }", "public void increment() {\n long cnt = this.count.incrementAndGet();\n if (cnt > max) {\n max = cnt;\n // Remove this after refactoring to Timer Impl. This is inefficient\n }\n this.lastSampleTime.set(getSampleTime ());\n }", "private synchronized static void upCount() {\r\n\t\t++count;\r\n\t}", "private int increment(int index) {\n\t\treturn (++index < this.capacity) ? index : 0;\n\t}", "Boolean incremental();", "public void addCount()\n {\n \tcount++;\n }", "public void incrementIndex() {\n\t\tindex++;\n\t\tif (nextItem != null) {\n\t\t\tnextItem.incrementIndex();\n\t\t}\n\t}", "public void incValue(){\n\t\tif(this.value < 9){\n\t\t\tthis.value++;\n\t\t}\n\t\telse{\n\t\t\tthis.value = 0;\n\t\t}\n\t}", "private void writeIncViaBatchWritable(Cube cube, String measureName, long ts,\n long value, String... dims) throws Exception {\n cube.write(null, getFact(measureName, ts, value, MeasureType.COUNTER, dims));\n }", "public static void incrInsertions() { ++insertions; }", "public final long getAndIncrement() {\n\t\treturn value++;\n\t}", "public void increment() {\n\t\tsynchronized (this) {\n\t\t\tCounter.count++;\n\t\t\tSystem.out.print(Counter.count + \" \");\n\t\t}\n\t\n\t}", "public void increment(int symbol);", "public void increment(Object incValue) {\r\n\t\t\r\n\t\tNumberOperation operator = new NumberOperation(this.value, incValue) {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic Number doAnOperation() {\r\n\t\t\t\tTypeEnum typeOfResult = getFinalType();\r\n\t\t\t\tif(typeOfResult == TypeEnum.TYPE_INTEGER) {\r\n\t\t\t\t\treturn getO1().intValue() + getO2().intValue();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn getO1().doubleValue() + getO2().doubleValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.value = operator.doAnOperation();\r\n\t}", "protected void incrementSeqNum() {\n intToNetworkByteOrder(mySeqNum++, sequenceNum, 0, 4);\n }", "public void incrementCount() {\n count++;\n }", "public void incrementCount () {\n count = count + 1; // == count++ == count += 1 \n if (count == modulus) {\n count = 0;\n }\n }", "public void inc(String key) {\n int val = 0;\n\n if (!m.containsKey(key)) {\n m.put(key, val + 1);\n } else {\n val = m.get(key);\n m.put(key, val + 1);\n delete(key, val);\n }\n\n insert(key, val + 1);\n }", "private synchronized long nextId() {\n\t\treturn ++curID;\n\t}", "private void incrementUsageCount() {\n usageCount++;\n }", "public int increase()\n {\n return this.increase(1);\n }", "public static synchronized void inccount()\r\n\t{\r\n\t\tcount++;\r\n\t}", "public void incrementAmount() { amount++; }", "public interface Incrementor {\n\t\tpublic void incrementTransition (TransitionIterator ti, double count);\n\t\tpublic void incrementInitialState (State s, double count);\n\t\tpublic void incrementFinalState (State s, double count);\n\t}", "void setUnitIncrement(Adjustable adj, int u);", "public static synchronized void increment() {\n counter++;\n }", "public void add()\n {\n set(++ current);\n }", "public void inc()\n {\n _level++;\n calculateIndentationString();\n }", "public void incrHedgedReadOps() {\n hedgedReadOps.inc();\n }", "public void inc(int index) {\r\n\t\tthis.vclock.set(index, this.vclock.get(index)+1);\r\n\t}", "public void add1() {\r\n value++;\r\n }", "public void incrementDelayCounter(int increment) {\n delayCounter += increment;\n }", "public final long incrementAndGet() {\n\t\treturn ++value;\n\t}" ]
[ "0.74258834", "0.71684885", "0.67121035", "0.6706633", "0.66803694", "0.66538537", "0.66538537", "0.66034555", "0.6597332", "0.65399206", "0.65355676", "0.649384", "0.64834213", "0.6471879", "0.6451464", "0.6420914", "0.6378323", "0.63621414", "0.63621414", "0.6346977", "0.63467556", "0.63230526", "0.62764186", "0.6274039", "0.6261463", "0.62595165", "0.6239517", "0.62324744", "0.62192804", "0.62128395", "0.620569", "0.61961126", "0.61808586", "0.61801445", "0.6168436", "0.6162154", "0.6140844", "0.61402005", "0.61255544", "0.61253214", "0.6121587", "0.6120967", "0.61066455", "0.6101136", "0.6075672", "0.60670626", "0.6066254", "0.60631865", "0.6057423", "0.6057167", "0.60532373", "0.6045451", "0.60417587", "0.6036861", "0.60336757", "0.60188854", "0.60021776", "0.5973754", "0.59717816", "0.5926866", "0.5921206", "0.59126145", "0.59111756", "0.5902199", "0.59012467", "0.5899732", "0.58929145", "0.58838385", "0.5881378", "0.58763444", "0.586888", "0.5863565", "0.5860201", "0.5846348", "0.58359385", "0.58338475", "0.58301264", "0.5825813", "0.5818302", "0.5806496", "0.5801961", "0.5798246", "0.57816315", "0.5774329", "0.5770329", "0.57631767", "0.5757975", "0.57389265", "0.57318217", "0.5729459", "0.5729103", "0.5724148", "0.57213205", "0.5713601", "0.57118183", "0.5710191", "0.57072103", "0.56904113", "0.5686355", "0.5684735", "0.5675706" ]
0.0
-1
TODO temp. solution; move it out of ALU or combine with existing dec()
public int decExtern(final int op1) { Adder adder = Adder.newAdder8(); int result = adder.sub(op1, 1, 0); setDecrementFlags(adder, result); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void toDec(){\n\t\tlong temp = Long.parseLong(binary.substring(binary.length()/2, binary.length()));\n\t\tlong tempbin = 0;\n\t\tint j = 0;//splits the string in half with 2 for loops \n\t\tfor (int i = 0; i < binary.length()/2;i++){//second half of string\n\t\t\ttempbin+=((long)(Math.pow(2,j))*(temp%10));//convert binary to dec adding as it runs\n\t\t\ttemp/=10;\n\t\t\tj++;\n\t\t}\n\t\ttemp = Long.parseLong(binary.substring(0, binary.length()/2));//first half of string\n\t\tfor (int i = 0; i <= binary.length()/2;i++){\n\t\t\ttempbin+=((long)(Math.pow(2,j))*(temp%10));\n\t\t\ttemp/=10;\n\t\t\tj++;\n\t\t}\n\t\tbinary = Long.toString(tempbin);\n\t}", "public void binToDec(){\n\t\tthis.inputBin();\n\t\tif(checkValue()==true){\n\t\t\tthis.toDec();\n\t\t\tthis.outDec();\n\t\t}\n\t}", "public void dec() {\n dec(1);\n }", "private short toDec(byte[] source, short index){\r\n \treturn (short)(source[index] - (short)48);\r\n }", "default void dec(long value) {\n\t\tcount(-1 * Math.abs(value));\n\t}", "private void outDec(){\n\t\tSystem.out.println(binary);\n\t\tpw.println(binary);\n\t\t\n\t}", "public int Binary_to_dec(int[] Bin) {//binary transfer to dec\r\n\t\t\tint decAd=0;\r\n\t\t\tfor(int i=0;i<Bin.length;i++) {\r\n\t\t\t\tint exp = (int) Math.pow(2,(Bin.length-1-i));\r\n\t\t\t\tdecAd += Bin[i] * (exp);\r\n\t\t\t}\r\n\t\t\treturn decAd;\r\n\t\t}", "public static void main(String[] args) {\n System.out.println(-14>>>1);\n String bin = \"01111111111111111111111111111001\";\n double res = binToDec(bin);\n System.out.println(res);\n }", "protected static final int getDecFromHex(String inputHex) {\r\n\t\t// msb should be leftmost but for parsing , we use it like lsb per gsv's protocol specification\r\n\t\tString lsb = inputHex.substring(0, 2);\r\n\t\tString msb = inputHex.substring(2, 4);\r\n\r\n\t\tint val = ( Integer.parseInt(msb, 16) * 256 ) + ( Integer.parseInt(lsb, 16) * 1 );\r\n//\t\tGQDKPMConstants.logger.debug(\"incoming lsb = \" + lsb +\" lsb hex-dec = \"+Integer.parseInt(lsb, 16) * 1 +\r\n//\t\t\t\t\" , msb = \"+ msb + \" msb hex-dec = \"+Integer.parseInt(msb, 16) * 256 + \" , val = \" + val );\r\n\t\treturn val;\r\n\t}", "public final int ec_dec_uint(int _ft) {\r\n\t\t// unsigned ft;// FIXME must be uint32\r\n\t\t/*In order to optimize EC_ILOG(), it is undefined for the value 0.*/\r\n\t\t// celt_assert( _ft > 1 );\r\n\t\t_ft--;\r\n\t\tint ftb = EC_ILOG( _ft );\r\n\t\tif( ftb > EC_UINT_BITS ) {\r\n\t\t\tftb -= EC_UINT_BITS;\r\n\t\t\tfinal int ft = (_ft >>> ftb) + 1;\r\n\t\t\tfinal int s = ec_decode( ft );\r\n\t\t\tec_dec_update( s, s + 1, ft );\r\n\t\t\tfinal int t = s << ftb | ec_dec_bits( ftb );\r\n\t\t\tif( t + Integer.MIN_VALUE <= _ft + Integer.MIN_VALUE ) {// java: + MIN_VALUE for unsigned comparing.\r\n\t\t\t\treturn t;\r\n\t\t\t}\r\n\t\t\tthis.error = 1;\r\n\t\t\treturn _ft;\r\n\t\t}\r\n\t\t// else {\r\n\t\t\t_ft++;\r\n\t\t\tfinal int s = ec_decode( _ft );\r\n\t\t\tec_dec_update( s, s + 1, _ft );\r\n\t\t\treturn s;\r\n\t\t//}\r\n\t}", "final void ec_dec_update(final int _fl, final int _fh, final int _ft) {// FIXME calling with int\r\n\t\t// java: if ft > fh > fl, than & 0xffffffff don't need\r\n\t\t/*\r\n\t\tfinal long s = ( _this.ext * ((long)(_ft - _fh) & 0xffffffffL) );\r\n\t\t_this.val -= s;\r\n\t\t_this.rng = _fl > 0 ? ( _this.ext * ((long)(_fh - _fl) & 0xffffffffL) ) : _this.rng - s;\r\n\t\tec_dec_normalize( _this );\r\n\t\t*/\r\n\t\tfinal long fl = (long)_fl & 0xffffffffL;// java\r\n\t\tfinal long fh = (long)_fh & 0xffffffffL;// java\r\n\t\tfinal long ft = (long)_ft & 0xffffffffL;// java\r\n\t\tfinal long s = ( this.ext * (ft - fh) );\r\n\t\tthis.val -= s;\r\n\t\t// _this.rng = fl > 0 ? ( _this.ext * (fh - fl) ) : _this.rng - s;\r\n\t\t// java: unsigned _fl, so _fl > 0 equals _fl != 0\r\n\t\tthis.rng = _fl != 0 ? (this.ext * (fh - fl)) : this.rng - s;\r\n\t\tec_dec_normalize();\r\n\t}", "protected final void operationDEC(final int adr) {\r\n final int data = ((readByte(adr) & 0xff) - 1) & 0xff;\r\n\r\n writeByte(adr, (byte) data);\r\n this.zeroFlag = data == 0;\r\n this.signFlag = data >= 0x80;\r\n }", "final int ec_decode(final int _fti) {// FIXME it is called with int _ft, result uses as int\r\n\t\tfinal long _ft = ((long)_fti & 0xffffffffL);// java\r\n\t\tthis.ext = ( this.rng / _ft );\r\n\t\tlong s = (this.val / this.ext);\r\n\t\t// return (int)(_ft - EC_MINI( s + 1L, _ft ));\r\n\t\ts++;\r\n\t\tlong b = _ft;\r\n\t\tb -= s;\r\n\t\tif( b > 0 ) {\r\n\t\t\tb = 0;\r\n\t\t}\r\n\t\ts += b;\r\n\t\treturn (int)(_ft - s);\r\n\t}", "private static int dec2hex(int dec) {\n if (dec > 255 || dec < 0) {\n throw new IllegalArgumentException(\"Value must be between 0 and 255\");\n }\n return (dec / 100) * 256 + ((dec % 100) / 10) * 16 + dec % 100 % 10;\n }", "public Double lookBack(int in);", "int getInverterCurrent();", "private static int hex2dec(int hex) {\n if (hex > 0x255 || hex < 0) {\n throw new IllegalArgumentException(\"Value must be between 0 and 0x255 (597)\");\n }\n return (hex / 256) * 100 + ((hex % 256) / 16) * 10 + hex % 256 % 16;\n }", "void ec_dec_normalize() {\r\n\t\t/*If the range is too small, rescale it and input some bits.*/\r\n\t\twhile( this.rng <= EC_CODE_BOT ) {\r\n\t\t\tthis.nbits_total += EC_SYM_BITS;\r\n\t\t\tthis.rng <<= EC_SYM_BITS;\r\n\t\t\t/*Use up the remaining bits from our last symbol.*/\r\n\t\t\tint sym = this.rem;\r\n\t\t\t/*Read the next value from the input.*/\r\n\t\t\tthis.rem = ec_read_byte();\r\n\t\t\t/*Take the rest of the bits we need from this new symbol.*/\r\n\t\t\tsym = (sym << EC_SYM_BITS | this.rem) >> (EC_SYM_BITS - EC_CODE_EXTRA);\r\n\t\t\t/*And subtract them from val, capped to be less than EC_CODE_TOP.*/\r\n\t\t\tthis.val = ((this.val << EC_SYM_BITS) + (EC_SYM_MAX & ~sym)) & (EC_CODE_TOP - 1);\r\n\t\t}\r\n\t}", "public static String GenIncDec(String var,boolean prePost , boolean incDec){\n String temp=\"\";\n if(prePost){\n temp=var;\n if(incDec){ //Pre-incremento\n out.println(\" \"+var+\" = \"+var+\" + 1;\");\n }else{ //Pre-decremento\n out.println(\" \"+var+\" = \"+var+\" - 1;\");\n }\n }else{\n temp= newTag(\"\");\n if(incDec){//Post-incremento\n out.println(\" \"+temp+\" = \"+var+\";\");\n out.println(\" \"+var+\" = \"+var+\" + 1;\");\n }else{ //Post-decremento\n out.println(\" \"+temp+\" = \"+var+\";\");\n out.println(\" \"+var+\" = \"+var+\" - 1;\");\n }\n }\n return temp;\n }", "private String pedometerConversion() {\n return (record[20] & 255) + \"\";\n }", "private String AccelYConversion() {\n int reading = (((raw[17] & 0xFC) >> 2) + ((raw[18] & 0x0F) << 6));\n\n\n int y[] = fixBinaryString(Integer.toBinaryString(reading));\n return myUnsignedToSigned(y) + \"\";\n\n //System.out.println(\"Y \" + unsignedToSigned(reading ,10) * 0.1533);\n //return (reading * 0.1533) + \"\";\n }", "private static String dec2hex(int dec) {\r\n\t\t// Initialize StringBuilder\r\n\t\tStringBuilder hex = new StringBuilder(\"0x\");\r\n\t\tint insert_position = 2;\r\n\r\n\t\t// Add a \"-\" for negative numbers and then work with the absolute value\r\n\t\tif (dec < 0) {\r\n\t\t\thex.insert(0, \"-\");\r\n\t\t\tinsert_position = 3;\r\n\t\t}\r\n\t\tdec = Math.abs(dec); // Get absolute value\r\n\r\n\t\t// Use do...while to make it work with dec = 0\r\n\t\tString hex_str_digit;\r\n\t\tdo {\r\n\t\t\tint hex_digit = dec % 16;\r\n\t\t\tdec /= 16;\r\n\t\t\thex_str_digit = dec_2_hex[hex_digit];\r\n\t\t\thex.insert(insert_position, hex_str_digit);\r\n\t\t} while(dec > 0);\r\n\r\n\t\t// Return hex string\r\n\t\treturn hex.toString();\r\n\t}", "@Test\n public void decodeStringDelta()\n {\n {\n final BinaryEncoder encoder = new BinaryEncoder(0, 16, 1.0);\n assertEquals(3.0, encoder.decode(\"0011\"), 0.0);\n }\n\n {\n final BinaryEncoder encoder = new BinaryEncoder(0, 16, 2.0);\n assertEquals(0.0, encoder.decode(\"0001\"), 2.0);\n }\n\n {\n final BinaryEncoder encoder = new BinaryEncoder(0, 16, 0.5);\n assertEquals(3.0, encoder.decode(\"00110\"), 0.0);\n }\n }", "void decUsage() {\n incUsage(-1);\n }", "float mo56157b();", "int getInverterCurrentRaw();", "static void DtoB(int num,int[] rem) {\n\t\tint j=0,m;\n\t\twhile(num>0) {\n\t\t\tm=num%2;\n\t\t\trem[j++]=m;\n\t\t\tnum=num/2;\n\t\t}\n\t\tj--;\n\t\tSystem.out.println(\"Decimal to Binary Conversion \");\n\t\tfor(int i=j;i>=0;i--) {\n\t\t\tSystem.out.print(rem[i]+\" \");\n\t\t}\n\t}", "public int decToBin(int input) {\r\n\t String Binary = Integer.toBinaryString(input);\t\r\n\t\treturn Integer.valueOf(Binary);\t\t\r\n\t}", "private String BtaOneConversion() {\n int reading = (raw[25] & 0xFF) + ((raw[26] & 0x03) << 8);\n\n Map<String, BigDecimal> variables = new HashMap<String, BigDecimal>();\n variables.put(\"x\", new BigDecimal(reading));\n BigDecimal result = b1Conv.eval(variables);\n return result.setScale(3, RoundingMode.UP) + \"\";\n }", "static void BtoD(int []arr) {\n\t\tint sum=0;\n\t\tfor(int i=0;i<4;i++) {\n\t\t\tsum=(int)(sum+arr[i]*(Math.pow(2,4-i-1)));\n\t\t}\n\t\tSystem.out.println(\"Binary to decimal conversion \"+sum);\n\t}", "static long calcComplement(long value, long digits)\r\n {\n if ( value > 0.5*Math.pow(16, digits) )\r\n {\r\n return value - (int)Math.pow(16, digits);\r\n }\r\n else\r\n {\r\n return value;\r\n }\r\n }", "static int hexa_to_deci(String hexa_address){\n\t\tint deci_val = 0;\n\t\tint multiply = 1;\n\t\tfor(int i=hexa_address.length()-1;i>=0;i--){\n\t\t\tint j=0;\n\t\t\tfor(;j<16;j++)\n\t\t\t\tif(hexa_address.charAt(i)==hexa[j])\n\t\t\t\t\tbreak;\n\t\t\tdeci_val+=(multiply*j);\n\t\t\tmultiply*=16;\n\t\t}\n\t\treturn deci_val;\n\t}", "public int binToDec (String input) {\r\n\t int decimal = Integer.parseInt(input,2);\t\r\n\t\treturn decimal;\t\t\r\n\t}", "public int hexToDec(String input) {\r\n\t int decimal= Integer.parseInt(input,16); \r\n\t\treturn decimal;\t\t\r\n\t}", "@Test\n public void decodeDouble()\n {\n final double[] array = new double[4];\n array[0] = 0;\n array[1] = 0;\n array[2] = 1;\n array[3] = 1;\n\n final BinaryEncoder encoder = new BinaryEncoder(16);\n assertEquals(3.0, encoder.decode(array), 0.0);\n }", "public static int binToDec(String bin) {\n\t\tint len = bin.length();\n\t\tif (len == 0)\n\t\t\treturn 0;\n\t\tString now = bin.substring(0, 1);\n\t\tString later = bin.substring(1);\n\t\treturn Integer.parseInt(now) * (int) Math.pow(2, len - 1) + binToDec(later);\n\t}", "private static int decompose(long paramLong, int paramInt, DecomposeArgs paramDecomposeArgs)\n/* */ {\n/* 425 */ int i = getExtraDataIndex(paramLong);\n/* 426 */ paramDecomposeArgs.length = extraData[(i++)];\n/* */ \n/* 428 */ if (((paramLong & paramInt & 0x8) != 0L) && (paramDecomposeArgs.length >= 256))\n/* */ {\n/* 430 */ i += (paramDecomposeArgs.length >> 7 & 0x1) + (paramDecomposeArgs.length & 0x7F);\n/* 431 */ paramDecomposeArgs.length >>= 8;\n/* */ }\n/* */ \n/* 434 */ if ((paramDecomposeArgs.length & 0x80) > 0)\n/* */ {\n/* 436 */ int j = extraData[(i++)];\n/* 437 */ paramDecomposeArgs.cc = (0xFF & j >> 8);\n/* 438 */ paramDecomposeArgs.trailCC = (0xFF & j);\n/* */ }\n/* */ else {\n/* 441 */ paramDecomposeArgs.cc = (paramDecomposeArgs.trailCC = 0);\n/* */ }\n/* */ \n/* 444 */ paramDecomposeArgs.length &= 0x7F;\n/* 445 */ return i;\n/* */ }", "public static double avrund2(double des) {\n\t\treturn (int)(des*100 + 0.5)/100.0;\n\t}", "public void decrement(Object decValue) {\r\n\r\n\t\tNumberOperation operator = new NumberOperation(this.value, decValue) {\r\n\t\r\n\t\t\t@Override\r\n\t\t\tpublic Number doAnOperation() {\r\n\t\t\t\tTypeEnum typeOfResult = getFinalType();\r\n\t\t\t\tif(typeOfResult == TypeEnum.TYPE_INTEGER) {\r\n\t\t\t\t\treturn getO1().intValue() - getO2().intValue();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn getO1().doubleValue() - getO2().doubleValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.value = operator.doAnOperation();\r\n\t}", "private String BtaTwoConversion() {\n int reading = ((raw[26] & 0xFC) >> 2) + ((raw[27] & 0x0F) << 6);\n\n Map<String, BigDecimal> variables = new HashMap<String, BigDecimal>();\n variables.put(\"x\", new BigDecimal(reading));\n BigDecimal result = b2Conv.eval(variables);\n return result.setScale(3, RoundingMode.UP) + \"\";\n }", "public static Stack<Integer> decToBinary(int dec) {\n Stack<Integer> binary = new Stack<>();//integer stack that stores the binary number\n //converts decimal number into its binary equivalent\n for(int i = 8; i >= 0; i--) {\n binary.push((int) (dec / Math.pow(2,i)));\n dec = dec % (int)Math.pow(2,i); \n }\n return binary;\n }", "public double convert(double amount, Unit u);", "void calcComplement()\r\n { \r\n // check if this is a negative number\r\n if ( this.value > 0.5*Math.pow(16, this.digits) )\r\n {\r\n this.complement = this.value - (int)Math.pow(16, this.digits);\r\n }\r\n else\r\n {\r\n this.complement = this.value;\r\n }\r\n return;\r\n }", "int ainverse(int z)\n {\n return (65536-z);\n }", "private void ADC16 ( int Work16 )\n\t{\n\t\t// If Decimal FLAG is on\n\t\tif ( CheckDecimal () )\n\t\t{\n\t\t\tint A1 = A & 0x000F;\n\t\t\tint A2 = A & 0x00F0;\n\t\t\tint A3 = A & 0x0F00;\n\t\t\tint A4 = A & 0xF000;\n\t\t\tint W1 = Work16 & 0x000F;\n\t\t\tint W2 = Work16 & 0x00F0;\n\t\t\tint W3 = Work16 & 0x0F00;\n\t\t\tint W4 = Work16 & 0xF000;\n\n\t\t\tA1 += W1 + _Carry;\n\t\t\tif ( A1 > 0x0009 )\n\t\t\t{\n\t\t\t\tA1 -= 0x000A;\n\t\t\t\tA1 &= 0x000F;\n\t\t\t\tA2 += 0x0010;\n\t\t\t}\n\n\t\t\tA2 += W2;\n\t\t\tif ( A2 > 0x0090 )\n\t\t\t{\n\t\t\t\tA2 -= 0x00A0;\n\t\t\t\tA2 &= 0x00F0;\n\t\t\t\tA3 += 0x0100;\n\t\t\t}\n\n\t\t\tA3 += W3;\n\t\t\tif ( A3 > 0x0900 )\n\t\t\t{\n\t\t\t\tA3 -= 0x0A00;\n\t\t\t\tA3 &= 0x0F00;\n\t\t\t\tA4 += 0x1000;\n\t\t\t}\n\n\t\t\tA4 += W4;\n\t\t\tif ( A4 > 0x9000 )\n\t\t\t{\n\t\t\t\tA4 -= 0xA000;\n\t\t\t\tA4 &= 0xF000;\n\t\t\t\tSetCarry();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tClearCarry();\n\t\t\t}\n\n\t\t\tint Ans16 = A4 | A3 | A2 | A1;\n\n\t\t\t// if the result leave the 16th bit on?\n\t\t\tif ( ( ( ~( A ^ Work16 ) & ( Work16 ^ Ans16 ) ) & 0x8000 ) != 0 )\n\t\t\t{\n\t\t\t\tSetOverflow();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tClearOverflow();\n\t\t\t}\n\t\t\tA_W( Ans16 );\n\t\t\tSetZN16( A );\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint Ans32 = A + Work16 + _Carry;\n\n\t\t\t// If our result gives us a value greater than the 17th bit on Set the Carry flag\n\t\t\t_Carry = Ans32 >= 0x10000 ? 1 : 0;\n\n\t\t\tif ( ( ~( A ^ Work16 ) & ( Work16 ^ ( Ans32 & 0xFFFF ) ) & 0x8000 ) != 0 )\n\t\t\t{\n\t\t\t\tSetOverflow();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tClearOverflow();\n\t\t\t}\n\n\t\t\tA_W( Ans32 );\n\t\t\tSetZN16( A );\n\t\t}\n\t}", "private void subDefInt(double a, double b) {\n double eb, ea;\n this.subInt();\n eb = this.ias * Math.pow(b, 4) + this.ibs * Math.pow(b, 3) + this.ics * Math.pow(b, 2) + this.ids * b;\n ea = this.ias * Math.pow(a, 4) + this.ibs * Math.pow(a, 3) + this.ics * Math.pow(a, 2) + this.ids * a;\n this.subdefint = eb - ea;\n }", "final int ec_decode_bin(final int _bits) {\r\n\t\tthis.ext = this.rng >>> _bits;\r\n\t\tlong s = (this.val / this.ext);\r\n\t\t// return (int)((1L << _bits) - EC_MINI( s + 1L, 1L << _bits ));\r\n\t\ts++;\r\n\t\tlong b = 1L << _bits;\r\n\t\tb -= s;\r\n\t\tif( b > 0 ) {\r\n\t\t\tb = 0;\r\n\t\t}\r\n\t\ts += b;\r\n\t\treturn (int)((1L << _bits) - s);\r\n\t}", "static double convert(double in) {\n return (in * 0.254);\n }", "public int[] Dec_to_binary(int Dec, int Length) {\n\t\t\tint[] binary;\r\n\t\t\tint temp=Dec;\r\n\t\t\tbinary=new int[Length];\r\n\t\t\tfor(int i=0;i<Length;i++) {\r\n\t\t\t\tbinary[i]=0;\r\n\t\t\t}\r\n\t\t\tfor(int i=Length-1;i>=0;i--) {\r\n\t\t\t\tbinary[i]=temp%2;\r\n\t\t\t\ttemp=temp/2;\r\n\t\t\t}\r\n\t\t\treturn binary;\r\n\t\t}", "@Test\n public void decodeDoubleNegative()\n {\n final double[] array = new double[4];\n array[0] = 0;\n array[1] = 0;\n array[2] = 1;\n array[3] = 1;\n\n final BinaryEncoder encoder = new BinaryEncoder(-8, 8, 1.0);\n assertThat(encoder.decode(array), is(-5.0));\n }", "@Test\n public void testDecToHex() {\n Assert.assertEquals(\"41\", Cipher_Helper.decToHex(65));\n Assert.assertEquals(\"5A\", Cipher_Helper.decToHex(90));\n Assert.assertEquals(\"4D\", Cipher_Helper.decToHex(77));\n }", "public static double avrund1(double des) {\n\t\treturn (int)(des*10 + 0.5)/10.0;\n\t}", "private String externalConversion() {\n int reading = ((record[19] & 255) + ((record[21] & 0x03) << 8));\n\n Map<String, BigDecimal> variables = new HashMap<String, BigDecimal>();\n variables.put(\"x\", new BigDecimal(reading));\n BigDecimal result = externalConversion.eval(variables);\n\n String x = result + \"\";\n\n if(this.counter){\n x = Integer.parseInt(x) * (60/rate) + \"\";\n }\n\n return x;\n }", "int decodeInt();", "public static int bin2dec(String bri) {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private String tempConversion() {\n int reading = ((record[17] & 255) + ((record[21] & 0x30) << 4));\n\n double voltage = (reading * 3.3) / 1024;\n return formatter.format((voltage - .6) / .01);\n\n }", "static void cma_with_acc(String passed){\n\t\tint val = hexa_to_deci(registers.get('A'));\n\t\tString bin = Integer.toBinaryString(val);\n\t\tfor(int i=bin.length();i<8;i++)\n\t\t\tbin = \"0\"+bin;\n\t\tval=0;\n\t\tfor(int i=7;i>=0;i--)\n\t\t\tif(bin.charAt(i)=='0')\n\t\t\t\tval+=(Math.pow(2,7-i));\n\t\tregisters.put('A',decimel_to_hexa_8bit(val));\n\t}", "public void Down2(){\r\n if(Hy>0 && Hy<900){\r\n \r\n Hy+=3;\r\n }\r\n }", "private void devolver100() {\n cambio = cambio - 100;\n de100--;\n cambio100++;\n }", "@Test\n public void testDec () {\n\n CountDownTimer s1 = new CountDownTimer(5, 59, 30);\n for (int i = 0; i < 15000; i++) {\n s1.dec();\n }\n assertEquals(s1.toString(), \"1:49:30\");\n }", "abstract public int getFromU16SingleLead(char c);", "private long getUnsigned(byte b) {\n\t\tif(b>=0)\n\t\t\treturn b;\n\t\treturn 256+b;\n\t\t\n\t}", "public static String binaryToDec(String binary) {\n boolean isnegative = false;\n if (binary.startsWith(\"1\")) {\n isnegative = true;\n char[] c = binary.toCharArray();\n for (int i = 0; i < binary.length(); i++) {\n if (Character.getNumericValue(c[i]) == 0) {\n c[i] = '1';\n } else {\n c[i] = '0';\n }\n }\n\n boolean finded = false;\n for (int i = binary.length() - 1; i >= 0 && !finded; i--) {\n if (Character.getNumericValue(c[i]) == 0) {\n c[i] = '1';\n finded = true;\n } else {\n c[i] = '0';\n }\n }\n binary = String.valueOf(c);\n }\n String dec = \"\";\n if (binary.equals(\"10000000000000000000000000000000\")) {\n dec = Integer.toString(Integer.MIN_VALUE);\n isnegative = false;\n } else {\n dec = Integer.toString(Integer.parseInt(binary, 2));\n }\n\n if (isnegative) {\n dec = \"-\" + dec;\n }\n return dec;\n }", "public void convert(){\n afterValue = firstValue * 1000;\n }", "public final int ec_dec_icdf(final char[] _icdf, final int ioffset, final int _ftb) {// java\r\n\t\tlong s = this.rng;\r\n\t\tfinal long d = this.val;\r\n\t\tfinal long r = s >>> _ftb;\r\n\t\tint ret = ioffset - 1;\r\n\t\tlong t;\r\n\t\tdo {\r\n\t\t\tt = s;\r\n\t\t\ts = r * (long)_icdf[++ret];\r\n\t\t} while( d < s );\r\n\t\tthis.val = d - s;// d >= s\r\n\t\tthis.rng = (t - s) & 0xffffffffL;// java. & 0xffffffffL to uint32. t < s is possible?\r\n\t\tec_dec_normalize();\r\n\t\treturn ret - ioffset;\r\n\t}", "public float getMicGainDb();", "int getOutputVoltage();", "static void cpi_with_acc(String passed){\n\t\tint val1 = hexa_to_deci(registers.get('A'));\n\t\tint val2 = hexa_to_deci(passed.substring(4));\n\t\tS = val1>=val2?false:true;\n\t\tval2 = 256-val2;\n\t\tval2%=256;\n\t\tval1+=val2;\n\t\tCS = val1>255?true:false;\n\t\tString b = Integer.toBinaryString(val1);\n\t\tint ones=0;\n\t\tfor(int i=0;i<b.length();i++)\n\t\t\tif(b.charAt(i)=='1')\n\t\t\t\tones++;\n\t\tZ = ones==0?true:false;\n\t\tP = ones%2==0?true:false;\n\t}", "private static short decode(byte alaw)\n {\n //Invert every other bit, and the sign bit (0xD5 = 1101 0101)\n alaw ^= 0xD5;\n\n //Pull out the value of the sign bit\n int sign = alaw & 0x80;\n //Pull out and shift over the value of the exponent\n int exponent = (alaw & 0x70) >> 4;\n //Pull out the four bits of data\n int data = alaw & 0x0f;\n\n //Shift the data four bits to the left\n data <<= 4;\n //Add 8 to put the result in the middle of the range (like adding a half)\n data += 8;\n \n //If the exponent is not 0, then we know the four bits followed a 1,\n //and can thus add this implicit 1 with 0x100.\n if (exponent != 0)\n data += 0x100;\n /* Shift the bits to where they need to be: left (exponent - 1) places\n * Why (exponent - 1) ?\n * 1 2 3 4 5 6 7 8 9 A B C D E F G\n * . 7 6 5 4 3 2 1 . . . . . . . . <-- starting bit (based on exponent)\n * . . . . . . . Z x x x x 1 0 0 0 <-- our data (Z is 0 only when exponent is 0)\n * We need to move the one under the value of the exponent,\n * which means it must move (exponent - 1) times\n * It also means shifting is unnecessary if exponent is 0 or 1.\n */\n if (exponent > 1)\n data <<= (exponent - 1);\n\n return (short)(sign == 0 ? data : -data);\n }", "void decryption(String file)\n {\n try\n {\n fdec=new DataOutputStream(new FileOutputStream(\"dec.txt\"));\n fenc1=new FileInputStream(file);\n }\n catch(Exception e)\n {\n System.out.println(e);\n }\n try\n {\n size=fenc1.available();\n np=0;\n p=size%8;\n if(p!=0)\n np=8-p;\n size+=np;\n if(p==0)\n nl=size/8;\n else\n nl=size/8+1;\n buf1=new byte[size+10];\n buf=new byte[8];\n fenc1.read(buf1);\n mark=-8;\n int arr[]=new int [8];\n for(k1=0;k1<nl;k1++)\n {\n mark+=8;\n for(int k2=0;k2<8;k2++)\n buf[k2]=buf1[mark+k2];\n for(int k2=0;k2<8;k2++)\n\t {\n\t arr[k2]=0;\n\t if(buf[k2]>=0)\n\t arr[k2]=buf[k2];\n\t else\n\t arr[k2]=buf[k2]+256;\n }\n\t j1=0;i1=0;\n while( i1<=3)\n\t\t {\n\t\t if((j1+1)%2==0)\n\t {\n x[i1]|=arr[j1]; // dividing 64 bit cypher block into four 16 bit registers\n\t i1++;\n\t\t }\n\t else\n\t {\n\t \t x[i1]=arr[j1];\n\t x[i1]<<=8;\n\t }\n\t j1++;\n\t }\n for(int t=0;t<4;t++)\n {\n\t ft1 =x[t]&255;\n\t ft=x[t]>>8;\n\t }\n step1=mul( x[0] , minverse( z[48] ));\n step2=( x[1] + ainverse( z[49] )) % 65536;\n step3=( x[2] + ainverse( z[50] )) % 65536;\n step4=mul( x[3] , minverse( z[51] ));\n step5=step1^step3;\n step6=step2^step4;\n step7=mul(step5,z[46]);\n step8=(step6+step7)%65536;\n step9=mul(step8,z[47]);\n step10=(step7+step9)%65536;\n step11=step1^step9;\n step12=step3^step9;\n step13=step2^step10;\n step14=step4^step10;\n x[0]=step11;\n x[1]=step12;\n x[2]=step13;\n x[3]=step14;\n// 2nd round\n\tint j2=40;\n\t\tfor(j1=1;j1<=7;j1++)\n \t\t {\n step1=mul( x[0] , minverse( z[j2+2] ));\n step2=( x[1] + ainverse( z[j2+4] )) % 65536;\n step3=( x[2] + ainverse( z[j2+3] )) % 65536;\n t=step2;\n step2=step3;\n step3=t;\n step4=mul( x[3] , minverse( z[j2+5] ));\n step5=step1^step3;\n step6=step2^step4;\n step7=mul(step5,z[j2+0]);\n step8=(step6+step7)%65536;\n step9=mul(step8,z[j2+1]);\n step10=(step7+step9)%65536;\n step11=step1^step9;\n step12=step3^step9;\n step13=step2^step10;\n step14=step4^step10;\n x[0]=step11;\n x[1]=step12;\n x[2]=step13;\n x[3]=step14;\n j2=j2-6;\n }\n x[0]=mul(x[0],minverse(z[0]));\n x[1]=(x[1]+ainverse(z[2]))%65536;\n x[2]=(x[2]+ainverse(z[1]))%65536;\n x[3]=mul(x[3],minverse(z[3]));\n t=x[1];\n x[1]=x[2];\n x[2]=t;\n\t for(int t=0;t<4;t++)\n {\n\t ft1 =x[t]&255;\n\t ft=x[t]>>8;\n\t fdec.write((char)ft);\n\t fdec.write((char)ft1);\n\t }\n }\n\n }\n catch(Exception e)\n {\n System.out.println(e);\n }\n }", "public static int decompose(char[] paramArrayOfChar1, int paramInt1, int paramInt2, char[] paramArrayOfChar2, int paramInt3, int paramInt4, boolean paramBoolean, int[] paramArrayOfInt, UnicodeSet paramUnicodeSet)\n/* */ {\n/* 932 */ char[] arrayOfChar1 = new char[3];\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 941 */ int i7 = paramInt3;\n/* 942 */ int i8 = paramInt1;\n/* 943 */ int i2; int k; if (!paramBoolean) {\n/* 944 */ i2 = (char)indexes[8];\n/* 945 */ k = 4;\n/* */ } else {\n/* 947 */ i2 = (char)indexes[9];\n/* 948 */ k = 8;\n/* */ }\n/* */ \n/* */ \n/* 952 */ int j = 0xFF00 | k;\n/* 953 */ int m = 0;\n/* 954 */ int i4 = 0;\n/* 955 */ long l = 0L;\n/* 956 */ int i1 = 0;\n/* 957 */ int i6 = 0;\n/* */ int i5;\n/* 959 */ int i3 = i5 = -1;\n/* */ \n/* */ \n/* */ \n/* */ for (;;)\n/* */ {\n/* 965 */ int i = i8;\n/* */ \n/* 967 */ while ((i8 != paramInt2) && (((i1 = paramArrayOfChar1[i8]) < i2) || \n/* 968 */ (((l = getNorm32(i1)) & j) == 0L))) {\n/* 969 */ i4 = 0;\n/* 970 */ i8++;\n/* */ }\n/* */ \n/* */ int n;\n/* 974 */ if (i8 != i) {\n/* 975 */ n = i8 - i;\n/* 976 */ if (i7 + n <= paramInt4) {\n/* 977 */ System.arraycopy(paramArrayOfChar1, i, paramArrayOfChar2, i7, n);\n/* */ }\n/* */ \n/* 980 */ i7 += n;\n/* 981 */ m = i7;\n/* */ }\n/* */ \n/* */ \n/* 985 */ if (i8 == paramInt2) {\n/* */ break;\n/* */ }\n/* */ \n/* */ \n/* 990 */ i8++;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ char c2;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ char[] arrayOfChar2;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ char c1;\n/* */ \n/* */ \n/* */ \n/* 1009 */ if (isNorm32HangulOrJamo(l)) {\n/* 1010 */ if (nx_contains(paramUnicodeSet, i1)) {\n/* 1011 */ c2 = '\\000';\n/* 1012 */ arrayOfChar2 = null;\n/* 1013 */ n = 1;\n/* */ }\n/* */ else {\n/* 1016 */ arrayOfChar2 = arrayOfChar1;\n/* 1017 */ i6 = 0;\n/* 1018 */ i3 = i5 = 0;\n/* */ \n/* 1020 */ c1 = (char)(i1 - 44032);\n/* */ \n/* 1022 */ c2 = (char)(c1 % '\\034');\n/* 1023 */ c1 = (char)(c1 / '\\034');\n/* 1024 */ if (c2 > 0) {\n/* 1025 */ arrayOfChar1[2] = ((char)('ᆧ' + c2));\n/* 1026 */ n = 3;\n/* */ } else {\n/* 1028 */ n = 2;\n/* */ }\n/* */ \n/* 1031 */ arrayOfChar1[1] = ((char)(4449 + c1 % '\\025'));\n/* 1032 */ arrayOfChar1[0] = ((char)(4352 + c1 / '\\025'));\n/* */ }\n/* */ } else {\n/* 1035 */ if (isNorm32Regular(l)) {\n/* 1036 */ c2 = '\\000';\n/* 1037 */ n = 1;\n/* */ \n/* */ }\n/* 1040 */ else if ((i8 != paramInt2) && \n/* 1041 */ (UTF16.isTrailSurrogate(c2 = paramArrayOfChar1[i8]))) {\n/* 1042 */ i8++;\n/* 1043 */ n = 2;\n/* 1044 */ l = getNorm32FromSurrogatePair(l, c2);\n/* */ } else {\n/* 1046 */ c2 = '\\000';\n/* 1047 */ n = 1;\n/* 1048 */ l = 0L;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 1053 */ if (nx_contains(paramUnicodeSet, c1, c2))\n/* */ {\n/* 1055 */ i3 = i5 = 0;\n/* 1056 */ arrayOfChar2 = null;\n/* 1057 */ } else if ((l & k) == 0L)\n/* */ {\n/* 1059 */ i3 = i5 = (int)(0xFF & l >> 8);\n/* 1060 */ arrayOfChar2 = null;\n/* 1061 */ i6 = -1;\n/* */ } else {\n/* 1063 */ DecomposeArgs localDecomposeArgs = new DecomposeArgs(null);\n/* */ \n/* */ \n/* */ \n/* 1067 */ i6 = decompose(l, k, localDecomposeArgs);\n/* 1068 */ arrayOfChar2 = extraData;\n/* 1069 */ n = localDecomposeArgs.length;\n/* 1070 */ i3 = localDecomposeArgs.cc;\n/* 1071 */ i5 = localDecomposeArgs.trailCC;\n/* 1072 */ if (n == 1)\n/* */ {\n/* 1074 */ c1 = arrayOfChar2[i6];\n/* 1075 */ c2 = '\\000';\n/* 1076 */ arrayOfChar2 = null;\n/* 1077 */ i6 = -1;\n/* */ }\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1085 */ if (i7 + n <= paramInt4) {\n/* 1086 */ int i9 = i7;\n/* 1087 */ if (arrayOfChar2 == null)\n/* */ {\n/* 1089 */ if ((i3 != 0) && (i3 < i4))\n/* */ {\n/* */ \n/* */ \n/* 1093 */ i7 += n;\n/* 1094 */ i5 = insertOrdered(paramArrayOfChar2, m, i9, i7, c1, c2, i3);\n/* */ }\n/* */ else\n/* */ {\n/* 1098 */ paramArrayOfChar2[(i7++)] = c1;\n/* 1099 */ if (c2 != 0) {\n/* 1100 */ paramArrayOfChar2[(i7++)] = c2;\n/* */ }\n/* */ \n/* */ }\n/* */ \n/* */ \n/* */ }\n/* 1107 */ else if ((i3 != 0) && (i3 < i4))\n/* */ {\n/* */ \n/* */ \n/* 1111 */ i7 += n;\n/* 1112 */ i5 = mergeOrdered(paramArrayOfChar2, m, i9, arrayOfChar2, i6, i6 + n);\n/* */ }\n/* */ else\n/* */ {\n/* */ do {\n/* 1117 */ paramArrayOfChar2[(i7++)] = arrayOfChar2[(i6++)];\n/* 1118 */ n--; } while (n > 0);\n/* */ }\n/* */ \n/* */ }\n/* */ else\n/* */ {\n/* 1124 */ i7 += n;\n/* */ }\n/* */ \n/* 1127 */ i4 = i5;\n/* 1128 */ if (i4 == 0) {\n/* 1129 */ m = i7;\n/* */ }\n/* */ }\n/* */ \n/* 1133 */ paramArrayOfInt[0] = i4;\n/* */ \n/* 1135 */ return i7 - paramInt3;\n/* */ }", "public void subtract(Object decValue) {\n\t\tvalue = operate(\n\t\t\t\ttransform(value),\n\t\t\t\ttransform(decValue),\n\t\t\t\t(v1, v2) -> v1 - v2,\n\t\t\t\t(v1, v2) -> v1 - v2\n\t\t);\n\t}", "private static int decompose(long paramLong, DecomposeArgs paramDecomposeArgs)\n/* */ {\n/* 456 */ int i = getExtraDataIndex(paramLong);\n/* 457 */ paramDecomposeArgs.length = extraData[(i++)];\n/* */ \n/* 459 */ if ((paramDecomposeArgs.length & 0x80) > 0)\n/* */ {\n/* 461 */ int j = extraData[(i++)];\n/* 462 */ paramDecomposeArgs.cc = (0xFF & j >> 8);\n/* 463 */ paramDecomposeArgs.trailCC = (0xFF & j);\n/* */ }\n/* */ else {\n/* 466 */ paramDecomposeArgs.cc = (paramDecomposeArgs.trailCC = 0);\n/* */ }\n/* */ \n/* 469 */ paramDecomposeArgs.length &= 0x7F;\n/* 470 */ return i;\n/* */ }", "private String MiniTwoConversion() {\n int reading = ((raw[23] & 0xC0) >> 6) + ((raw[24] & 0xFF) << 2);\n\n Map<String, BigDecimal> variables = new HashMap<String, BigDecimal>();\n variables.put(\"x\", new BigDecimal(reading));\n BigDecimal result = m2Conv.eval(variables);\n return result.setScale(3, RoundingMode.UP) + \"\";\n }", "public final void dexp() throws ArithmeticException {\n\t\tdouble ls; char c; int i, last;\n\t\tif ((mksa&_log) == 0) throw new ArithmeticException \n\t\t(\"****Unit: dexp(\" + symbol + \")\") ;\n\t\tls = (mksa&_mag) != 0 ? -2.5 : 1.;\n\t\tvalue = AstroMath.dexp(value/ls);\n\t\tmksa &= (~_LOG) ;\n\t\tif (symbol == null) return;\n\n\t\t// Change the symbol\n\t\ti = -1; last = symbol.length()-1;\n\t\tc = symbol.charAt(last);\t\t// Closing bracket\n\t\tif (c == ']') i = symbol.indexOf('[');\n\t\telse if (c == ')') i = symbol.indexOf('(');\n\t\tif (i >= 0) symbol = symbol.substring(i+1, last);\n\t\telse { \t\t\t\t\t// Symbol can't be found, use SI\n\t\t\tStringBuffer b = new StringBuffer(64);\n\t\t\ttoSI(b, 0);\n\t\t\tsymbol = \"\" + b;\n\t\t}\n\t}", "private double convert() {\n\t\t// modulus is private, but we have the getter\n\t\treturn riskNeutralProbabilityUp * (randomGenerator.getModulus() - 1);\n\t}", "private void debit(APDU apdu) {\n\n // access authentication\n if ( ! pin.isValidated() )\n ISOException.throwIt\n(SW_PIN_VERIFICATION_REQUIRED);\n\n byte[] buffer = apdu.getBuffer();\n\n byte numBytes =\n (byte)(buffer[ISO7816.OFFSET_LC]);\n\n byte byteRead =\n (byte)(apdu.setIncomingAndReceive());\n\n if ( ( numBytes != 1 ) || (byteRead != 1) )\n ISOException.throwIt\n (ISO7816.SW_WRONG_LENGTH);\n\n // get debit amount\n byte debitAmount =\n buffer[ISO7816.OFFSET_CDATA];\n\n // check debit amount\n if ( ( debitAmount > MAX_TRANSACTION_AMOUNT)\n || ( debitAmount < 0 ) )\n ISOException.throwIt\n (SW_INVALID_TRANSACTION_AMOUNT);\n\n // check the new balance\n if ( (short)( balance - debitAmount ) < (short)0 )\n ISOException.throwIt(SW_NEGATIVE_BALANCE);\n\n balance = (short) (balance - debitAmount);\n\n }", "public void enfoncerDel() {\n\t\tthis.valC = this.valC/10;\n\t}", "public void decida(){\n int vecinasVivas=vecinos();\n if(vecinasVivas==3 && estadoActual=='m'){\n estadoSiguiente='v';\n }else if((estadoActual=='v' && vecinasVivas==2) || (estadoActual=='v' && vecinasVivas==3)){\n estadoSiguiente='v';\n }else if(vecinasVivas<2 || vecinasVivas>3){\n estadoSiguiente='m';\n }\n }", "public abstract double toBasicUnit(double unit);", "private static byte getByteValue(double angle) {\n int maxVol = 127;\n return (new Integer(\n (int)Math.round(\n Math.sin(angle)*maxVol))).\n byteValue();\n }", "private int hexToDecimal(String s)\n {\n String digits = \"0123456789ABCDEF\";//digits to define value based on position on this string\n s = s.toUpperCase();//changes the parameter value to uppercase\n int val = 0;//value starts with 0\n \n \n //loop for the as many characters as in \"s\"\n for (int i = 0; i < s.length(); i++)\n {\n char c = s.charAt(i);//gets character at position i from user input\n \n int d = digits.indexOf(c);//get index value of character from digits\n \n val = 16 * val + d;//calculates decimal num. Times 16 with itself each loop and adds the value of the character from digits in decimal form\n \n }\n return val;\n }", "protected final void operationSBC(final int data) {\r\n int tmp;\r\n\r\n if (this.decimalFlag) {\r\n tmp = 10 * (this.ac & 0xf0) + (this.ac & 0x0f) - (10 * (data & 0xf0) + (data & 0x0f));\r\n tmp = ((tmp / 10) << 4) + tmp % 10;\r\n } else {\r\n tmp = this.ac - data - (this.carryFlag ? 0 : 1);\r\n }\r\n this.overflowFlag = (((this.ac ^ tmp) & 0x80) != 0) && (((this.ac ^ data) & 0x80) != 0);\r\n this.carryFlag = tmp >= 0;\r\n this.ac = tmp & 0xff;\r\n this.zeroFlag = this.ac == 0;\r\n this.signFlag = this.ac >= 0x80;\r\n }", "private static int calc(int c) {\n\t\treturn 1;\n\t}", "private void processSuperHighValue(Bid bid) {\n\t}", "protected final void operationADC(final int data) {\r\n int tmp;\r\n\r\n if (this.decimalFlag) {\r\n tmp = 10 * (this.ac & 0xf0) + (this.ac & 0x0f) + (10 * (data & 0xf0) + (data & 0x0f));\r\n tmp = ((tmp / 10) << 4) + tmp % 10;\r\n } else {\r\n tmp = data + this.ac + (this.carryFlag ? 1 : 0);\r\n this.overflowFlag = (((this.ac ^ data) & 0x80) == 0) && (((this.ac ^ tmp) & 0x80) != 0);\r\n }\r\n this.carryFlag = tmp > 0xff;\r\n this.ac = tmp & 0xff;\r\n this.zeroFlag = this.ac == 0;\r\n this.signFlag = this.ac >= 0x80;\r\n }", "public void decrement(){\n if (value >0) {\n value -= 1;\n }\n }", "public void Down4()\r\n {\r\n if(By2>0 && By2<900){\r\n \r\n By2+=2.5;\r\n }\r\n }", "private double readScaledInt(ByteBuffer buf) {\n // Get the first two bytes\n short s1 = buf.getShort();\n\n // And the last one as unsigned\n short s2 = DataType.unsignedByteToShort(buf.get());\n\n // Get the sign bit, converting from 0 or 2 to +/- 1.\n int posneg = 1 - ((s1 & 0x8000) >> 14);\n\n // Combine the first two bytes (without sign bit) with the last byte.\n // Multiply by proper factor for +/-\n int nn = (((s1 & 0x7FFF) << 8) | s2) * posneg;\n return (double) nn / 10000.0;\n }", "public void decValue(final float amount) {\r\n\t\tthis.value -= amount;\r\n\t}", "public final void mDEC() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.DEC;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:759:5: ( 'dec' )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:759:7: 'dec'\n\t\t\t{\n\t\t\t\tthis.match(\"dec\");\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}", "public abstract float mo9744i();", "public static String hex2dec(String s) {\n\t\ttry {\n\t\t\tif (pHex0x.matcher(s).find()) {\n\t\t\t\ts = replaceNumber(s, pHex0x, 16, 2, 0);\n\t\t\t}\n\t\t\tif (pHexH.matcher(s).find()) {\n\t\t\t\ts = replaceNumber(s, pHexH, 16, 0, 1);\n\t\t\t}\n\t\t\tif (pHexDollar.matcher(s).find()) {\n\t\t\t\ts = replaceNumber(s, pHexDollar, 16, 1, 0);\n\t\t\t}\n\t\t\tif (pBinB.matcher(s).find()) {\n\t\t\t\ts = replaceNumber(s, pBinB, 2, 0, 1);\n\t\t\t}\n\t\t\tif (pOctO.matcher(s).find()) {\n\t\t\t\ts = replaceNumber(s, pOctO, 8, 0, 1);\n\t\t\t}\n\t\t\tif (pOctQ.matcher(s).find()) {\n\t\t\t\ts = replaceNumber(s, pOctQ, 8, 0, 1);\n\t\t\t}\n\t\t} catch (NumberFormatException ignored) {\n\t\t}\n\t\treturn s;\n\t}", "private int decToOctal(int decimal)\n {\n\t\t ArrayList<Integer> oct_num = new ArrayList<Integer>();\n\t\t int octal= 0;\n\t\t \n\t\t \n\t \n\t while(decimal != 0)\n\t {\n\t \t oct_num.add(decimal%8);//remainder represents one digit in octal. Adding it to the arraylist.\n\t \t decimal /= 8;//\"%\" does not divide the number, it only gets the remainder, so it requires this division to reach 0.\n\t }\n\t \n\t \n\t \n\t //for loop to combine values of each oct_num array into one integer value\n\t int unit = 1;//first value of the array list represents unit of 1\n\t for(int i = 0; i < oct_num.size(); i++) \n\t { \t\n\t \toctal = octal + (oct_num.get(i) * unit) ;\n\t unit *= 10;//unit is timed by ten after each loop\n\t \n\t }\n\t\t return octal;\n }", "static void dcx_rp(String passed){\n\t\tint h,l;\n\t\tswitch(passed.charAt(4)){\n\t\tcase 'B':\n\t\t\th = hexa_to_deci(registers.get('B'));\n\t\t\tl = hexa_to_deci(registers.get('C'));\n\t\t\tl--;\n\t\t\tif(l==-1)\n\t\t\t\th--;\n\t\t\tif(l==-1)\n\t\t\t\tl=255;\n\t\t\tif(h==-1)\n\t\t\t\th=255;\n\t\t\tregisters.put('C',decimel_to_hexa_8bit(l));\n\t\t\tregisters.put('B',decimel_to_hexa_8bit(h));\n\t\t\tbreak;\n\t\tcase 'D':\n\t\t\th = hexa_to_deci(registers.get('D'));\n\t\t\tl = hexa_to_deci(registers.get('E'));\n\t\t\tl--;\n\t\t\tif(l==-1)\n\t\t\t\th--;\n\t\t\tif(l==-1)\n\t\t\t\tl=255;\n\t\t\tif(h==-1)\n\t\t\t\th=255;\n\t\t\th+=(l>255?1:0);\n\t\t\tregisters.put('E',decimel_to_hexa_8bit(l));\n\t\t\tregisters.put('D',decimel_to_hexa_8bit(h));\n\t\t\tbreak;\n\t\tcase 'H':\n\t\t\th = hexa_to_deci(registers.get('H'));\n\t\t\tl = hexa_to_deci(registers.get('L'));\n\t\t\tl--;\n\t\t\tif(l==-1)\n\t\t\t\th--;\n\t\t\tif(l==-1)\n\t\t\t\tl=255;\n\t\t\tif(h==-1)\n\t\t\t\th=255;\n\t\t\th+=(l>255?1:0);\n\t\t\tregisters.put('L',decimel_to_hexa_8bit(l));\n\t\t\tregisters.put('H',decimel_to_hexa_8bit(h));\n\t\t\tbreak;\n\t\t}\n\t}", "public int getDmaValue();", "int getOutputVoltageRaw();", "short getDP1( byte[] buffer, short offset );", "void sub(double val) {\r\n\t\tresult = result - val;\r\n\t}", "private int convertBinaryToDecimal(int binaryValueOfBitMap){\r\n\t\r\n\tint decimalValue = 0;\r\n\ttry {\r\n\t\t int num = binaryValueOfBitMap; \r\n\t\t int dec_value = 0; \t\t \r\n\t\t // Initializing base \r\n\t\t // value to 1, i.e 2^0 \r\n\t\t int base = 1; \r\n\t\t \r\n\t\t int temp = num; \r\n\t\t while (temp > 0) \r\n\t\t { \r\n\t\t int last_digit = temp % 10; \r\n\t\t temp = temp / 10; \r\n\t\t \r\n\t\t dec_value += last_digit * base; \r\n\t\t \r\n\t\t base = base * 2; \r\n\t\t } \r\n\t\t decimalValue = dec_value;\r\n\t}\r\n\tcatch(Exception e) {\r\n\t\tSystem.out.println(\"Exception occurred \"+e);\r\n\r\n\t}\r\n\treturn decimalValue;\r\n\t\t\r\n}" ]
[ "0.6634597", "0.65951395", "0.6563234", "0.63855326", "0.6371915", "0.6339986", "0.61065745", "0.59958243", "0.59128803", "0.5895031", "0.58209145", "0.5773303", "0.57404244", "0.5642424", "0.55934733", "0.55854625", "0.5571076", "0.5557307", "0.55331475", "0.54319143", "0.5392482", "0.53858143", "0.5353927", "0.5345203", "0.5339492", "0.5334639", "0.53331804", "0.5246406", "0.523275", "0.5229909", "0.5226523", "0.52196974", "0.52147186", "0.5212829", "0.520291", "0.5198936", "0.5198583", "0.5190955", "0.51821923", "0.5180662", "0.51707727", "0.51687485", "0.5162896", "0.51524395", "0.51512337", "0.51468", "0.5146783", "0.5143325", "0.51425946", "0.51407874", "0.5127058", "0.5126049", "0.51079834", "0.5107888", "0.5097998", "0.50809795", "0.5079374", "0.50718594", "0.5061079", "0.5056322", "0.5052077", "0.5049924", "0.5044355", "0.5043452", "0.5037207", "0.5026825", "0.502631", "0.50181705", "0.50134534", "0.500791", "0.5003739", "0.500127", "0.49909514", "0.49902803", "0.49882612", "0.4987314", "0.4985496", "0.49849176", "0.4967553", "0.49557754", "0.4948914", "0.49457806", "0.4942824", "0.49402034", "0.4934475", "0.49316633", "0.4930636", "0.492649", "0.49263301", "0.49235937", "0.49204326", "0.49196282", "0.49142787", "0.49042097", "0.48948616", "0.48937207", "0.4891711", "0.48847204", "0.4875531", "0.4869778" ]
0.5566145
17
null means offline mode
public void Fill(WymiaryDTO wymiary) { this.wymiary=wymiary; //updateGUI(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean getOffline();", "private boolean dataAvailableOffline() {\n return false;\n }", "boolean setOffline(boolean b);", "public boolean isOffline()\n {\n return m_bOffline;\n }", "public boolean isOnline() {\n return isOnline;\n }", "public boolean getOffline() {\n return instance.getOffline();\n }", "public boolean getOffline() {\n return offline_;\n }", "public boolean requiresOnline()\n {\n return onlineRequired;\n }", "private void setOffline(boolean value) {\n \n offline_ = value;\n }", "boolean isOnline() {\n\t\treturn online;\n\t}", "public boolean isOnlineRequired()\n {\n return onlineRequired;\n }", "public NetworkInfo getActiveNetworkInfo() {\n\treturn null;\r\n}", "public void setOffline(boolean offline) {\n this.offline = offline;\n }", "private boolean isOnline() {\n Context context = getApplicationContext();\n ConnectivityManager cm = (ConnectivityManager) context\n .getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n if (netInfo != null && netInfo.isConnectedOrConnecting()) {\n return true;\n }\n return false;\n }", "private boolean isOnline(){\n ConnectivityManager cm= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n if(netInfo != null && netInfo.isConnectedOrConnecting()){\n return true;\n } else{\n return false;\n }\n }", "public boolean isOnline() {\n return this.online;\n }", "public interface IsOnline\n {\n /**\n * offline\n */\n String OFFLINE = \"0\";\n\n /**\n * online\n */\n String ONLINE = \"1\";\n }", "private boolean isOnline() {\n ConnectivityManager connect = (ConnectivityManager) this.getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = connect.getActiveNetworkInfo();\n if(netInfo != null && netInfo.isConnected()){\n return true;\n }\n return false;\n }", "public static boolean checkNetworkForOfflineDataStorage(Context context) {\r\n if (!checkNetConnection(context)) {\r\n //Logger.showShortMessage(context, context.getString(R.string.check_internet_for_sync));\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean isOnline() {\n \t\tConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n \t\tNetworkInfo netInfo = cm.getActiveNetworkInfo();\n \t\t\n \t\tif (netInfo != null && netInfo.isConnected()) {\n \t\t\treturn true;\n \t\t} else{\n \t\t\t\n \t\t\treturn false;\n \t\t}\n \t\t\n \t}", "private void clearOffline() {\n \n offline_ = false;\n }", "boolean getOptOutOnlineStatus();", "public void setOnlineRequired( boolean requiresOnline )\n {\n this.onlineRequired = requiresOnline;\n }", "protected boolean isOnline() {\n\n ConnectivityManager cm = (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n\n boolean isConnected = activeNetwork != null &&\n activeNetwork.isConnectedOrConnecting();\n\n //check if the connection id wifi or mobile data\n boolean isWiFi = activeNetwork.getType() == ConnectivityManager.TYPE_WIFI;\n\n return isConnected;\n\n }", "private void isOnline() {\n ConnectivityManager cm =\n (ConnectivityManager) getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\n\n NetworkInfo activeNetwork = cm.getActiveNetworkInfo();\n mIsConnected = activeNetwork != null &&\n activeNetwork.isConnectedOrConnecting();\n }", "boolean hasOfflineUserDataJob();", "public boolean isOfflineMessagingSupported()\n {\n return false;\n }", "private boolean isOnline() {\n ConnectivityManager connectivityManager\n = (ConnectivityManager) owner.getBaseContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "public boolean isOnline() {\n boolean connected = false;\n ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n if (connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState() == NetworkInfo.State.CONNECTED || connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState() == NetworkInfo.State.CONNECTED) {\n connected = true;\n } else {\n connected = false;\n }\n return connected;\n }", "public abstract boolean isLiveMode();", "private boolean isOnline() {\n\t\tConnectivityManager cm = (ConnectivityManager) getApplicationContext()\n\t\t\t\t.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n\t\treturn cm.getActiveNetworkInfo() != null\n\t\t\t\t&& cm.getActiveNetworkInfo().isConnectedOrConnecting();\n\n\t}", "public String getOfflineRequest()\n\t{\n\t\treturn offlineRequest;\n\t}", "public static void setOnline(boolean flag) {\r\n ONLINE = flag;\r\n }", "public boolean isOnline()\n\t{\n\t\treturn PlayerManager.getPlayer(name)!=null;\n\t}", "public boolean isOnline() {\n\t\tboolean connected = false;\n\t\t\n\t\tConnectivityManager connectivityManager = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\t\n\t\t if(connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState() == NetworkInfo.State.CONNECTED || \n\t\t connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI).getState() == NetworkInfo.State.CONNECTED) {\n\t\t //we are connected to a network\n\t\t connected = true;\n\t\t }\n\t\t else\n\t\t {\n\t\t connected = false;\n\t\t }\n\t\t return connected;\n\t}", "public boolean isOnline() {\r\n\t\tConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\r\n\t\tNetworkInfo netInfo = cm.getActiveNetworkInfo();\r\n\t\tif (netInfo != null && netInfo.isConnectedOrConnecting()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isOnline() {\n\t\t\tConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\t\tNetworkInfo netInfo = cm.getActiveNetworkInfo();\n\t\t\tif (netInfo != null && netInfo.isConnectedOrConnecting()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public boolean isOnline() {\n ConnectivityManager conMgr = (ConnectivityManager) getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = conMgr.getActiveNetworkInfo();\n // In case it's not notify it through a toast\n if(netInfo == null || !netInfo.isConnected() || !netInfo.isAvailable()){\n Toast.makeText(MainActivity.this, \"No Internet connection!\", Toast.LENGTH_LONG).show();\n return false;\n }\n return true;\n }", "public boolean isOnline() {\n \t\treturn (type == PLAYER_ONLINE);\n \t}", "public boolean isOnline() {\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n return netInfo != null && netInfo.isConnectedOrConnecting();\n }", "public boolean isOnline() {\n\t\tConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\tNetworkInfo netInfo = cm.getActiveNetworkInfo();\n\t\tif (netInfo != null && netInfo.isConnectedOrConnecting()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isOnline() {\n ConnectivityManager cm =\n (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n if (netInfo != null && netInfo.isConnectedOrConnecting()) {\n return true;\n }\n return false;\n }", "@Override\n public String localStatus(DeviceId deviceId) {\n return null;\n }", "@Override\n public boolean isOnline() {\n if(mSocket != null && mSocket.isConnected())\n return true;\n return false;\n }", "public boolean isOnline() {\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n return netInfo != null && netInfo.isConnected();\n }", "protected boolean isOnline() {\n ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = cm.getActiveNetworkInfo();\n\n // Check now for connectivity\n if (networkInfo != null && networkInfo.isConnectedOrConnecting()) {\n return true;\n } else {\n return false;\n }\n }", "public boolean isOnline() {\n\n\t\tConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\tNetworkInfo netInfo = cm.getActiveNetworkInfo();\n\t\tif (netInfo != null && netInfo.isConnectedOrConnecting()) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean internetErisimi() {\n\n ConnectivityManager conMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\n if (conMgr.getActiveNetworkInfo() != null\n\n && conMgr.getActiveNetworkInfo().isAvailable()\n\n && conMgr.getActiveNetworkInfo().isConnected()) {\n\n return true;\n\n } else {\n\n return false;\n\n }\n\n }", "public static boolean isOnline() {\n ConnectivityManager connectivityManager = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo activeNetworkinfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkinfo != null && activeNetworkinfo.isConnected();\n }", "public boolean isOnline(Context context) {\n\t\tif (null == context)\n\t\t\treturn false;\n\n\t\tConnectivityManager cm = (ConnectivityManager) context\n\t\t\t\t.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n\t\tNetworkInfo netInfo = cm.getActiveNetworkInfo();\n\n\t\tif (netInfo != null && netInfo.isConnectedOrConnecting()) {\n\t\t\tcm = null;\n\t\t\tnetInfo = null;\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tcm = null;\n\t\tnetInfo = null;\n\t\treturn false;\n\t}", "public void setOffline() {\r\n \t for (Utente u: utenti) { \r\n \t\t u.setStatus(\"OFFLINE\");\r\n \t }\r\n }", "public boolean isOnline() {\n ConnectivityManager cm =\n (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n return netInfo != null && netInfo.isConnectedOrConnecting();\n }", "public boolean isOnline() {\n ConnectivityManager cm =\n (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n return netInfo != null && netInfo.isConnectedOrConnecting();\n }", "public boolean estOuvert(){\n\n return netLinkIp.isOpen();\n\n }", "public void setOffline(int pos){\n }", "public static boolean isOnline() {\n ConnectivityManager cm =\n (ConnectivityManager) MainApplication.getGlobalContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n return netInfo != null && netInfo.isConnectedOrConnecting();\n }", "public boolean isOnline() {\n ConnectivityManager connMgr = (ConnectivityManager) getSystemService(Activity.CONNECTIVITY_SERVICE);\n assert connMgr != null;\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n return (networkInfo != null && networkInfo.isConnected());\n }", "public ToggleButton getOfflineButton() {\n return this.offlineButton;\n }", "private boolean isOnline() {\n ConnectivityManager conMgr = (ConnectivityManager) getApplicationContext().getSystemService(CONNECTIVITY_SERVICE);\n if (conMgr != null) {\n NetworkInfo netInfo = conMgr.getActiveNetworkInfo();\n if (netInfo == null || !netInfo.isConnected() || !netInfo.isAvailable()) {\n Toast.makeText(this, \"No Internet connection!\", Toast.LENGTH_LONG).show();\n return false;\n }\n }\n return true;\n }", "public void setOffline() {\n if (this.shutdownButton.isSelected() == false) {\n this.online = false;\n this.statusLed.setStatus(\"warning\");\n this.setOutputPower(0);\n this.channel.updateOutput();\n }\n }", "boolean getActiveNull();", "public boolean isIsOnlineResult() {\n return isOnlineResult;\n }", "public abstract OnlineStatus getStatus();", "public boolean getOnlineStatus(int status) throws android.os.RemoteException;", "Boolean isAvailable();", "public boolean isOnline ( ) {\n\t\treturn getBukkitPlayerOptional ( ).isPresent ( );\n\t}", "public static boolean isOnline(Context context) {\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n return netInfo != null && netInfo.isConnectedOrConnecting();\n }", "public boolean isOnline()\n\t{\t\t\n\t\treturn chatConnection.isConnected();\n\t}", "public boolean isConnected() {\n \tContext context = this.getApplicationContext();\n \t/** Create, if not exists, the preference GraviolaMOB. */\n SharedPreferences settings = context.getSharedPreferences(\"GraviolaMOB\", MODE_PRIVATE);\n /** Check the preference connectivity and return false if is not set. */\n return settings.getBoolean(\"connectivity\", false);\n }", "Boolean getStandAlone();", "public void internetConnectionProble()\n\t\t{\n\n\n\t\t}", "public boolean isOnline() {\n final ConnectivityManager conMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n if (conMgr.getNetworkInfo(0).getState() == NetworkInfo.State.CONNECTED\n || conMgr.getNetworkInfo(1).getState() == NetworkInfo.State.CONNECTED) {\n return true;\n } else {\n return false;\n }\n }", "public boolean[] getStatus()\n {\n\t return online;\n }", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "@Override\n public void onRefresh() {\n getUserOnlineStatus();\n }", "public void checkConnectivity(){\n ConnectivityManager cm = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);\n mIsOnline = cm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE)\n .isConnectedOrConnecting() || cm.getNetworkInfo(ConnectivityManager.TYPE_WIFI)\n .isConnectedOrConnecting();\n }", "protected boolean NetworkAviable() {\n\t\t\tConnectivityManager cm =(ConnectivityManager)contextyeild.getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\t\t NetworkInfo netInfo = cm.getActiveNetworkInfo();\n\t\t if (netInfo != null && netInfo.isConnectedOrConnecting()) {\n\t\t \t try{\n\t\t \t\t \n\t\t \t \t//new OnGetPondsdata().execute();\n\t\t \t }catch(Exception e){\n\t\t \t\t e.printStackTrace();\n\t\t \t }\n\t\t \t \t\n\t\t return true;\t\t \n\t\t }\n\t\t else{ \n\t\t \t\n\t\t \t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(contextyeild, \"No internet connection\", Toast.LENGTH_SHORT).show();\t\t\t\t\t\n\t\t }\n\t\t return false;\n\t\t\t}", "public abstract boolean isAvailable();", "public abstract boolean isAvailable();", "public static boolean isOnline(Context context) {\n ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo netInfo = cm.getActiveNetworkInfo();\n\n if (netInfo != null && netInfo.isConnectedOrConnecting()\n && cm.getActiveNetworkInfo().isAvailable()\n && cm.getActiveNetworkInfo().isConnected()) {\n return true;\n }\n return false;\n }", "@SuppressLint(\"MissingPermission\")\n private NetworkInfo getActiveNetworkInfo(){\n ConnectivityManager connectivityManager = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);\n return connectivityManager == null ? null : connectivityManager.getActiveNetworkInfo();\n }", "boolean getIsLocalClient();", "public void goOffline()\n\t{\n\t\tif (isOnline()){\n\t\t\tchatConnection.closeConnection();\n\t\t}\n\t\tgetMainWindow().displayOfflineSymbol();\n\t\tcloseAllRoomWindows();\n\n\t}", "public boolean isNetworkOnline() {\n\t\tboolean status = false;\n\t\ttry {\n\t\t\tConnectivityManager cm = (ConnectivityManager) context\n\t\t\t\t\t.getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\t\tNetworkInfo netInfo = cm.getNetworkInfo(0);\n\t\t\tif (netInfo != null\n\t\t\t\t\t&& netInfo.getState() == NetworkInfo.State.CONNECTED) {\n\t\t\t\tstatus = true;\n\t\t\t} else {\n\t\t\t\tnetInfo = cm.getNetworkInfo(1);\n\t\t\t\tif (netInfo != null\n\t\t\t\t\t\t&& netInfo.getState() == NetworkInfo.State.CONNECTED)\n\t\t\t\t\tstatus = true;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\treturn status;\n\n\t}", "public void checkConnection() {\n\t\tif (isOnline()) {\n\t\t\tgetFirsTopRatedMovies();\n\t\t} else {\n\t\t\tprogress.setVisibility(View.GONE);\n\t\t\tlayout_nothing_to_show.setVisibility(View.VISIBLE);\n\t\t\tToast.makeText(this, getString(R.string.no_netowrk), Toast.LENGTH_SHORT).show();\n\t\t}\n\t}", "private void checkInternetConnection() {\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override public boolean getOnlineStatus(int status) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nboolean _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(status);\nmRemote.transact(Stub.TRANSACTION_getOnlineStatus, _data, _reply, 0);\n_reply.readException();\n_result = (0!=_reply.readInt());\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}", "private static boolean supportsOfflineResponse(int method) {\n switch (method) {\n case AylaRestService.GET_DEVICES_LANMODE:\n case AylaRestService.GET_NODES_LOCAL_CACHE:\n case AylaRestService.CREATE_DATAPOINT_LANMODE:\n case AylaRestService.CREATE_NODE_DATAPOINT_LANMODE:\n \t\n case AylaRestService.GET_DATAPOINT_LANMODE:\n case AylaRestService.GET_DATAPOINTS_LANMODE:\n \t\n case AylaRestService.GET_PROPERTIES_LANMODE:\n case AylaRestService.GET_NODE_PROPERTIES_LANMODE:\n case AylaRestService.GET_NODE_DATAPOINT_LANMODE:\n \t\n case AylaRestService.GET_NODES_CONNECTION_STATUS_ZIGBEE_LANMODE:\n \t\n case AylaRestService.GET_PROPERTY_DETAIL_LANMODE:\n case AylaRestService.GET_NODES_CONNECTION_STATUS_LANMODE:\n case AylaRestService.POST_USER_LOGIN:\n\n\t\t\t// These APIs are used during wifi setup / registration where we may not be\n\t\t\t// connected to the cloud, but rather to the device's wifi AP.\n case AylaRestService.SET_DEVICE_CONNECT_TO_NETWORK:\n case AylaRestService.GET_MODULE_WIFI_STATUS:\n case AylaRestService.START_NEW_DEVICE_SCAN_FOR_APS:\n case AylaRestService.GET_NEW_DEVICE_STATUS:\n case AylaRestService.PUT_NEW_DEVICE_TIME:\n case AylaRestService.DELETE_DEVICE_WIFI_PROFILE:\n case AylaRestService.CONNECT_NEW_DEVICE_TO_SERVICE:\n case AylaRestService.SET_HOST_NETWORK_CONNECTION:\n case AylaRestService.DELETE_HOST_NETWORK_CONNECTION:\n case AylaRestService.DELETE_HOST_NETWORK_CONNECTIONS:\n case AylaRestService.CONFIRM_NEW_DEVICE_TO_SERVICE_CONNECTION:\n \t\n case AylaRestService.RETURN_HOST_SCAN:\n case AylaRestService.RETURN_HOST_NETWORK_CONNECTION:\n case AylaRestService.CONNECT_TO_NEW_DEVICE:\n case AylaRestService.GET_NEW_DEVICE_SCAN_RESULTS_FOR_APS:\n case AylaRestService.PUT_DISCONNECT_AP_MODE:\n \n // While this call should require network access, it is made right after re-connecting\n\t\t\t// to the original wifi network during wifi setup, and on certain devices the\n\t\t\t// check for reachability fails before this call is made. Including this API\n\t\t\t// in the list here allows these devices to complete setup.\n case AylaRestService.GET_NEW_DEVICE_CONNECTED:\n case AylaRestService.PROPERTY_CHANGE_NOTIFIER:\n case AylaRestService.PUT_LOCAL_REGISTRATION:\n \n // for same-lan wifi setup\n case AylaRestService.POST_LOCAL_REGISTRATION:\n case AylaRestService.DELETE_NETWORK_PROFILE_LANMODE:\n case AylaRestService.SEND_NETWORK_PROFILE_LANMODE:\n case AylaRestService.GET_NEW_DEVICE_WIFI_STATUS:\n\n // Confirm reachability state is finalized locally, either service or device, or both. \n case AylaRestService.REACHABILITY:\n return true;\n }\n return false;\n }", "@Override\n\tpublic boolean isOnline(String userId) throws Exception {\n\t\treturn false;\n\t}", "@Override public int getPresenceStatus(boolean onlineStatus, java.lang.String userAvailability, java.util.Map allValues) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\nint _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(((onlineStatus)?(1):(0)));\n_data.writeString(userAvailability);\n_data.writeMap(allValues);\nmRemote.transact(Stub.TRANSACTION_getPresenceStatus, _data, _reply, 0);\n_reply.readException();\n_result = _reply.readInt();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}", "private Settings enrichWithOfflineMode(Settings settings) {\n\n String goOffline = SecurityActions.getProperty(ALT_MAVEN_OFFLINE);\n if (goOffline != null && goOffline.length() > 0) {\n settings.setOffline(Boolean.valueOf(goOffline));\n }\n\n return settings;\n }", "public PresenceStatus getStatus() {\n return null;\n }", "public boolean getAvailability(){\n return availabile;\n }", "public boolean getUseLocal() {return this.databaseConfig.getProperty(\"useLocal\").equals(\"true\");}", "public boolean isNetworkAvailable() {\n initNetwork();\n NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();\n return activeNetworkInfo != null && activeNetworkInfo.isConnected();\n}", "private void setOnline(String urlConfig) {\n switch (status) {\n case SERVER_DOWN:\n case URL_UNSET:\n logger.debug(\"Status changing from \" + status + \" to \"\n + Status.SERVER_UP);\n broadcastMessage(urlConfig);\n status = Status.SERVER_UP;\n break;\n default:\n logger.debug(\"SetOnline: Status not changed from \" + status);\n // no action\n }\n }", "@Override\n\tpublic boolean isOnline() {\n\t\treturn bukkitPlayer != null && bukkitPlayer.isOnline();\n\t}", "private boolean isDeviceOnline() {\r\n ConnectivityManager connMgr = (ConnectivityManager) getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);\r\n NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\r\n return (networkInfo != null && networkInfo.isConnected());\r\n }" ]
[ "0.7848508", "0.69186664", "0.68565273", "0.6823916", "0.68231976", "0.68025476", "0.67768943", "0.6767804", "0.6693088", "0.6669269", "0.655215", "0.64734924", "0.64160794", "0.6319792", "0.6317352", "0.63114214", "0.6309575", "0.63093", "0.62862927", "0.6284446", "0.62788045", "0.62721723", "0.62709934", "0.62448883", "0.6170944", "0.6164015", "0.6159206", "0.6156336", "0.61024827", "0.609662", "0.6096049", "0.6064267", "0.6041008", "0.6034247", "0.60125285", "0.6001966", "0.59862256", "0.59826434", "0.5950806", "0.59414387", "0.59319234", "0.5921499", "0.5920199", "0.5916903", "0.59126204", "0.5910351", "0.5909232", "0.5896007", "0.5882942", "0.587643", "0.58699834", "0.58474505", "0.58474505", "0.5841539", "0.58357084", "0.58316666", "0.5825583", "0.57864237", "0.57571703", "0.575635", "0.57509", "0.5750234", "0.5745951", "0.5735779", "0.5726357", "0.5725115", "0.57160556", "0.5705825", "0.5694383", "0.56930524", "0.56905395", "0.56711435", "0.5661231", "0.5660854", "0.5660854", "0.5660854", "0.5660854", "0.5624228", "0.5616939", "0.5613109", "0.56077427", "0.56077427", "0.5606017", "0.5599993", "0.5586809", "0.55807245", "0.5574066", "0.5560137", "0.55450326", "0.5544797", "0.5543741", "0.554229", "0.5542042", "0.55382603", "0.5524966", "0.5523925", "0.5522677", "0.55049384", "0.5500738", "0.54981977", "0.54871887" ]
0.0
-1
Constructor fo Timer whit Start Thread
private AppTimer() { start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Timer() {\n myThread = new TimerThread();\n myThread.start();\n }", "public Timer() {}", "public void start() {timer.start();}", "public Timer() {\n\t\tthis.start = 0L;\n\t\tthis.end = 0L;\n\t}", "public GameTimer()\n \t{\n \t\tsuper();\n \t\tt = new Task();\n \t\tscheduleAtFixedRate( t, 0, 1000 );\n \t\tstartTime = System.currentTimeMillis();\n \t}", "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\t\tCount = new Timer();\n\t}", "private void startTimer() {\n Timer.addTimeout(endTime, this);\n }", "public void start(){\n\t\ttimer = new Timer();\n\t\ttimer.schedule(this, 0, (long)66.6);\n\t}", "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 }", "Timer(\n Cia host,\n Timer coTimer,\n de.michab.simulator.Clock clock,\n String threadName )\n {\n _cia = host;\n // TODO\n // _coTimer = coTimer;\n\n // Register with the central system clock.\n _clock = clock.register();\n\n // Init our thread.\n _worker = new Thread( this, threadName );\n _worker.setDaemon( true );\n\n // Start the timer thread...\n _worker.start();\n }", "public Timer()\r\n\t{\r\n\t\tcurrentstate = TIMER_STOP;\r\n\t}", "public void startTimer(){\n timerStarted = System.currentTimeMillis();\n }", "Timer(int tempTotalTime) {\n totalTime = tempTotalTime;\n }", "public abstract void startInitTimer();", "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 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 }", "public void startTimer() {\n startTime = System.currentTimeMillis();\n }", "public GameThread(Timer timer)\n\t{\n\t\tthis.timer = timer;\n\t}", "public synchronized void start() {\r\n\t\tif(type == TYPE_DELAY) {\r\n\t\t\tdate = new Date(System.currentTimeMillis() + delay);\r\n\t\t}\r\n\t\tif(started) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tstarted = true;\r\n\t\ttm.addStartedTimers(this);\t\t\r\n//\t\ttm.getHandler().post(new Runnable() {\r\n//\t\t\tpublic void run() {\r\n//\t\t\t\tdoCancel();\r\n//\t\t\t\tdoStart();\r\n//\t\t\t}\r\n//\t\t});\r\n\t}", "public Timer()\n {\n // initialise instance variables\n startTime = 0;\n bonusTime = 0;\n }", "public static void startTimer() {\n elapsedTime = 0;\r\n timerIsWorking = true;\r\n startTime = System.nanoTime() / 1000000; // ms\r\n }", "public void startTimer() {\n\t\ttimer.start();\n\t}", "protected void initialize() {\n \ttimer.start();\n }", "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}", "private void startTime()\n {\n timer.start();\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}", "public void timerThreadStart()\n {\n //Zaloz nove vlakno a uloz\n timer = new Thread(\n new Runnable() \n //Anonymni trida noveho vlakna s metodou run \n {\n @Override\n public void run() \n {\n //Cekej zadany cas\n try \n {\n TimeUnit.MINUTES.sleep(minutes);\n } \n catch (InterruptedException e) \n {\n amountJTextField.setText(\"Interrupted Exception\");\n }\n \n //Nacti zvuk\n try\n {\n //Vyrobeni input stream tak, aby sel cist po zabaleni do .jar\n InputStream is = getClass().getResourceAsStream(\"warn1.wav\");\n warn1 = new JavaSoundAudioClip(is);\n }\n catch(IOException ex)\n {\n amountJTextField.setText(\"IOException\");\n }\n //Zmen informacni text na \"vyznanim\"\n startStopJLabel.setForeground(Color.red);\n startStopJLabel.setText(\"RINGING\");\n //Prehraj zvuk\n warn1.loop();\n }\n });\n //Spust vlakno\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 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 void startTimer() {\n\t\t\n\t\ttimerStart = System.currentTimeMillis();\n\t\ttimerStarted = true;\n\t}", "@Override // se crea una clase anonima donde se implementa el metodo run porque Timer task implementa la interfaz runnable\r\n public void run() {\r\n System.out.println(\"Tarea realizada en: \" + new Date() + \" nombre del Thread: \"\r\n + Thread.currentThread().getName()); //retorna el nombre del hilo actual\r\n System.out.println(\"Finaliza el tiempo\");\r\n timer.cancel(); // termina este timer descartando cualquier tarea programada actual\r\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 }", "protected final void start(Timer timer) {\r\n timer.scheduleAtFixedRate(this, 5000L, 5000L);\r\n }", "private void initializeTimer(){\n logger.trace(\"Sensor/\" + getModel().getId() + \" initialising timer\");\n //create timer\n newTimer = new Timer(true);\n }", "public void initializeTimerTask() {\n timerTask = new TimerTask() {\n public void run() {\n Log.i(\"in timer\", \"in timer ++++ \"+ (counter++));\n cek_tugas();\n uploadphoto();\n cekNotifSampai();\n cekJanjiSurvey();\n }\n };\n }", "public Timer start() {\r\n timestamp = System.currentTimeMillis();\r\n return this;\r\n }", "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 }", "@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 Start(long startTime){\n // Your code here\n this.startTime = startTime;\n Thread t = new Thread(this);\n t.start();\n //run();\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 }", "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 startTeleopTimer() {\n t.reset();\n t.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 }", "public void startTimer() {\n mStatusChecker.run();\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 Timer (String name, int duration, boolean starttimer, boolean loop)\n {\n Name = name;\n Timer = duration;\n TimerMax = duration;\n Loop = loop;\n isRunning = starttimer;\n \n }", "@Override\n\tpublic void run() {\n\t\t\n\t // Inizializza nome thread\n\t Thread.currentThread().setName(\"Timer\");\n\t \n\t // Richiama procedura di gestione aggiornamento configurazione\n\t update();\n }", "public UpdateTimer()\n\t\t{\n\t\t\tsuper(delayTime, null);\n\t\t\t\n\t\t\taddActionListener(this);\n\t\t}", "public Timer(TimeSpan tickperiod)\r\n\t{\r\n\t\tcurrentstate = TIMER_STOP;\r\n\t\ttickPeriod = tickperiod.Ticks();\r\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 }", "Timer getTimer();", "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 }", "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 }", "public void start()\r\n\t{\r\n\t\tcurrentstate = TIMER_START;\r\n\t\tstarttime = Calendar.getInstance();\r\n\t\tamountOfPause = 0;\r\n\t\trunningTime = 0;\r\n\t\tlastRunningTime = 0;\r\n\t\tpassedTicks = 0;\r\n\t}", "public void startTime() {\n if (!isRunning) {\n timer = new Timer();\n clock = new Clock();\n timer.scheduleAtFixedRate(clock,0,1000);\n isRunning = true;\n }\n }", "@Override\n protected void initialize() {\n startT = Timer.getFPGATimestamp();\n }", "public void start() {\n ActionListener listener = new TimePrinter();\n Timer t = new Timer(interval, listener);\n t.start();\n }", "public TimerDisplay()\n {\n timeElapsed = 0;\n }", "public void setTimer() {\n\t\t\n\t}", "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}", "void start() {\n\tsleepThread = new Thread(this);\n\tsleepThread.start();\n }", "public static void ComienzaTimer(){\n timer = System.nanoTime();\n }", "public UhrImpl() {\n super();\n timer = new Timer(1000,new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n zeitGeber();\n }\n });\n timer.start();\n }", "public CustomTimerTask(Context con) {\n this.context = con;\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 start_handler_timer_task() {\n if (timertask != null) {\n return;\n }\n timertask = new Timer();\n timertask.scheduleAtFixedRate(new fyp002_Handler(), MOBILE_DELAY/2, MOBILE_INTERVAL/2);\n }", "public void start() {\n if (animationTimer != null) {\n animationTimer.cancel();\n }\n animationTimer = new Timer();\n animationTimer.scheduleAtFixedRate(new AnimationTask(), 0, 25);\n }", "public Timer(Cpu cpu) {\n this.cpu = Objects.requireNonNull(cpu);\n DIV = 0;\n TIMA = 0;\n TMA = 0;\n TAC = 0;\n }", "@Override\n public synchronized void start() {\n m_startTime = getMsClock();\n m_running = true;\n }", "public Timer(long millisecond) {\r\n this.period = millisecond;\r\n reset();\r\n }", "ThreadStart createThreadStart();", "public void startCount() {\n //meetodi k�ivitamisel nullime tunnid, minutid, sekundid:\n secondsPassed = 0;\n minutePassed = 0;\n hoursPassed = 0;\n if (task != null)\n return;\n task = new TimerTask() {\n @Override\n public void run() {//aeg l�ks!\n secondsPassed++; //loeme sekundid\n if (secondsPassed == 60) {//kui on l�binud 60 sek, nullime muutujat\n secondsPassed = 0;\n minutePassed++;//kui on l�binud 60 sek, suurendame minutid 1 v�rra\n }\n if (minutePassed == 60) {//kui on l�binud 60 min, nullime muutujat\n minutePassed = 0;\n hoursPassed++;//kui on l�binud 60 min, suurendame tunnid 1 v�rra\n }\n //kirjutame aeg �les\n String seconds = Integer.toString(secondsPassed);\n String minutes = Integer.toString(minutePassed);\n String hours = Integer.toString(hoursPassed);\n\n if (secondsPassed <= 9) {\n //kuni 10 kirjutame 0 ette\n seconds = \"0\" + Integer.toString(secondsPassed);\n }\n if (minutePassed <= 9) {\n //kuni 10 kirjutame 0 ette\n minutes = \"0\" + Integer.toString(minutePassed);\n }\n if (hoursPassed <= 9) {\n //kuni 10 kirjutame null ettte\n hours = \"0\" + Integer.toString(hoursPassed);\n }\n\n\n time = (hours + \":\" + minutes + \":\" + seconds);//aeg formaadis 00:00:00\n getTime();//edastame aeg meetodile getTime\n\n }\n\n };\n myTimer.scheduleAtFixedRate(task, 0, 1000);//timer k�ivitub kohe ja t��tab sekundite t�psusega\n\n }", "public Timer(long tickperiod)\r\n\t{\r\n\t\tcurrentstate = TIMER_STOP;\r\n\t\ttickPeriod = tickperiod;\r\n\t}", "public TopListTimer() {\r\n\t\tsuper(-1, 1000 * 30);\r\n\t}", "@Override\npublic void autonomousInit() {\n m_timer.reset();\n m_timer.start();\n}", "public TimerCheck() {\n super(\"timer_check\");\n PlayerMovementListener.EVENT.register(this);\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 }", "private void startTimer(int startValue) {\n counts = startValue;\n timerTask = new TimerTask() {\n @Override\n public void run() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n counts++;\n TextView score = (TextView) findViewById(R.id.Score);\n score.setText(\"Time: \"+counts);\n boardManager.setLastTime(counts);\n saveToFile(\"save_file_\" +\n Board.NUM_COLS + \"_\" + LoginActivity.currentUser);\n }\n });\n }\n };\n timer.scheduleAtFixedRate(timerTask, new Date(), 1000);\n }", "protected\n TimedRsp\n ( \n TaskTimer timer\n )\n { \n if(timer == null) \n throw new IllegalArgumentException(\"The timer cannot (null)!\");\n pTimer = new TaskTimer(timer);\n }", "protected void initialize() {\n \tsetTimeout(timeInSeconds);\n }", "public void startTimer() {\n animationTimer = new AnimationTimer() {\n @Override\n public void handle(final long now) {\n videoController.update(now);\n if (videoController.isClosed()) {\n stopTimer();\n return;\n }\n roomController.update(now);\n timeLogController.update(now);\n }\n };\n timeLogController.clearInformationArea();\n animationTimer.start();\n }", "public Alarm() {\n\n\t\tMachine.timer().setInterruptHandler(new Runnable() {\n\t\t\tpublic void run() { timerInterrupt(); }\n\t\t});\n\t}", "protected void initialize() {\n setTimeout(duration);\n }", "public void startTimer(final int min) throws InterruptedException {\n\t\tSystem.err.println(\"Inizio startTimer per = \" + min);\n\t\tfinal int sec = min * 60;\n\n\t\tses.scheduleWithFixedDelay(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tif (!runFlag) {\n\t\t\t\t\tinvertFlag();\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(new Date());\n\t\t\t\t\ttry {\n\t\t\t\t\t\tNotification.getIstance();\n\t\t\t\t\t} catch (final IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tses.shutdown();\n\t\t\t\t\tSystem.out.println(\"TIMER SHUTDOWN\");\n\t\t\t\t}\n\t\t\t}\n\t\t}, 0, sec, TimeUnit.SECONDS);\n\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 static void startTimerLabel()\n {\n {\n if (timeline != null) {\n timeline.stop();\n }\n timeSeconds.set(STARTTIME);\n //timeLabel.setText(timeSeconds.toString());\n timeline = new Timeline();\n //timeline.setCycleCount(timeline.INDEFINITE); // need this?\n\n timeline.getKeyFrames().add(\n new KeyFrame(Duration.seconds(STARTTIME+1),\n new EventHandler<ActionEvent>() {\n public void handle(ActionEvent event) {\n //System.out.println(\"Got Timer timeout.\");\n if (cancel == false) {\n SceneResultsTimed.updatePlayerScore();\n localStage.setScene(SceneMgr.getScene(SceneMgr.IDX_RESULTSTIMED));\n }\n }\n },\n new KeyValue(timeSeconds, 0)));\n timeline.playFromStart();\n }\n }", "public void ButtonStartClick(View view){\n\n final MyCountDownTimer cdt = new MyCountDownTimer(180000, 1000);\n\n cdt.start();\n }", "public static long startTimer() {\n return System.currentTimeMillis();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n timer = new Timer();\n timer.schedule(timerTask, 0, 60000);\n }", "private void startTimerAfterCountDown() {\n \t\thandler = new Handler();\n \t\tprepareTimeCountingHandler();\n \t\thandler.post(new CounterRunnable(COUNT_DOWN_TIME));\n \t}", "private void startAnimation(){\n\t TimerActionListener taskPerformer = new TimerActionListener();\n\t new Timer(DELAY, taskPerformer).start();\n \t}", "public TimerClass(ViewInterface view) {\n this.view = view;\n }", "private void timerStart()\r\n { updateTimer.postDelayed(updateTimerTask, UPDATE_TIME); }", "public Cronometro() {\n initComponents();\n setLocationRelativeTo(null);\n timer = new Timer(10, acciones);\n }", "private void initTimerTask() {\n\t\t\n\t\ttimerTask = new TimerTask() { \n\t\t @Override \n\t\t public void run() { \n\t\t // TODO Auto-generated method stub \n\t\t \t\n\t\t \tif (isCompleteQuery) {\n\t\t \t\tisCompleteQuery = !isCompleteQuery;\n\t\t \t\t\n\t\t \t\tMessage message = new Message(); \n\t\t\t message.what = 911; \n\t\t\t handler.sendMessage(message); \n\t\t\t LogUtils.i(\"*****************定时任务查询\");\n\t\t\t\t}\n\t\t \n\t\t } \n\t\t}; \n\t\tif (timer == null) {\n\t\t\ttimer = new Timer();\n\t\t}\n\t\t\n\t\ttimer.schedule(timerTask, 10000, 5000);//延迟10秒查询,每5秒执行一次\n\t}", "Start createStart();", "public JTimerLabel()\n\t{\n\t\tthis(LOOP_ICON);\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tLOGGER.log(Level.INFO, \"Timer started\");\n\t\t\ttry {\n\t\t\t\tThread.sleep(TIMEOUT);\n\t\t\t\tif (gameCanStart()) {\n\t\t\t\t\tstartNewGame(players);\n\t\t\t\t} else {\n\t\t\t\t\tLOGGER.log(Level.INFO, \"No players available right now...\");\n\t\t\t\t}\n\t\t\t\tLOGGER.log(Level.INFO, \"Timer stopped\");\n\t\t\t\tactiveConnections = 0;\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// Non fa nulla, può essere interrotto\n\t\t\t\tLOGGER.log(Level.INFO, \"Timer interrupted\", e);\n\t\t\t}\n\t\t}" ]
[ "0.8277894", "0.76293105", "0.7597392", "0.74654716", "0.74232733", "0.7339715", "0.7305739", "0.7304129", "0.727269", "0.72524434", "0.71366197", "0.7136503", "0.7106594", "0.70963234", "0.7089112", "0.7086646", "0.7080603", "0.7057984", "0.7057636", "0.70524544", "0.7032165", "0.69554895", "0.6910962", "0.6907911", "0.69035625", "0.68744755", "0.68516344", "0.6844722", "0.6839591", "0.6824335", "0.6803592", "0.6802452", "0.6735844", "0.6715596", "0.6713476", "0.67065793", "0.6706347", "0.66887563", "0.6684769", "0.6652031", "0.6638222", "0.663354", "0.6632135", "0.6623985", "0.66223013", "0.6620088", "0.65915513", "0.6590868", "0.65716517", "0.65486", "0.65410995", "0.65280145", "0.65146446", "0.65054363", "0.6489603", "0.648289", "0.64769953", "0.6471933", "0.646717", "0.64591944", "0.6420199", "0.6408561", "0.640553", "0.63789296", "0.6351098", "0.63478506", "0.6338107", "0.6329816", "0.63270414", "0.63265747", "0.6321522", "0.62999487", "0.6295177", "0.62810725", "0.62800324", "0.62768203", "0.6273394", "0.6271133", "0.6258186", "0.6243998", "0.6239684", "0.623467", "0.6223693", "0.6219612", "0.62043285", "0.6184732", "0.6181426", "0.61805123", "0.6178768", "0.61686", "0.61671937", "0.6164582", "0.61392426", "0.61320895", "0.61276895", "0.61269724", "0.6124517", "0.61126894", "0.611016", "0.6102916" ]
0.69669634
21
Reverser fo the flag (Start or Stop Thread)
public static void invertFlag() { runFlag = !runFlag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startStop()\n\t\t{\n\t\tif(currentAlgo!=null)\n\t\t\t{\n\t\t\tif(isRunning())\n\t\t\t\t{\n\t\t\t\tbStartStop.setText(\"Stopping\");\n\t\t\t\tthread.toStop=true;\n\t\t\t\tcurrentAlgo.setStopping(true);\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\tthread=new SteppingThread();\n\t\t\t\tbStartStop.setText(\"Stop\");\n\t\t\t\tthread.toStop=false;\n\t\t\t\tcurrentAlgo.setStopping(false);\n\t\t\t\tthread.start();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "static void stop(){\n stop=true;\n firstPass=true;\n }", "static void stop() {\n flag = 0;\n }", "public void setThreadStopped(boolean flag) {\r\n threadStopped = flag;\r\n }", "static void unstop(){\n stop=false;\n }", "public void arraiter() {\n \tthis.running = false;\n }", "private void stopThreadByBoolean() {\n if (customThread != null) {\n customThread.stopThread();\n }\n }", "boolean isStop();", "public void toggleRunning() {\r\n\t\trunning = !running;\r\n\t}", "public void toggleStartStop() {\r\n IOEQ.add(new Runnable() {\r\n public void run() {\r\n if (stateMachine.isStartState() || stateMachine.isFinal()) {\r\n /* download is in idle or stopped state */\r\n DownloadWatchDog.this.startDownloads();\r\n } else {\r\n /* download can be stopped */\r\n DownloadWatchDog.this.stopDownloads();\r\n }\r\n }\r\n }, true);\r\n }", "private static synchronized void requestStop() {\n stopRequested = true;\n }", "boolean stopThread();", "@Override\n\tpublic void run() {\n\t\tint i = 0;\n\t\twhile(flag) {\n\t\t\tSystem.out.println(\"run......Thread\" + i++);\n\t\t}\n\t}", "public void stop() {\n\t\tthis.flag = false;\n\t\t\n\t\t\n\t}", "public static void ThreadStop()\r\n\t{\r\n\t\tthread_running=false;\r\n\t}", "private void switchOffFlag(int flag) {\r\n\t\tsim40.memory[Simulator.STATUS_ADDRESS] = ~(~sim40.memory[Simulator.STATUS_ADDRESS] | (1<<flag));\r\n\t}", "@EncoderThread\n protected abstract void onStop();", "void toggleLoop();", "private synchronized void stop(){\n this.go = false;\n }", "public synchronized void requestStop() \n\t{\n\t\tstoprequested = true;\n\t}", "public void setResetTimeOnStop(boolean aFlag) { _resetTimeOnStop = aFlag; }", "private void step()\n\t\t{\n\t\tif(currentAlgo!=null && !isRunning())\n\t\t\t{\n\t\t\tthread=new SteppingThread();\n\t\t\tbStartStop.setText(\"Stepping\");\n\t\t\tthread.toStop=true;\n\t\t\tcurrentAlgo.setStopping(false);\n\t\t\tthread.start();\n//\t\t\tcurrentAlgo.setStopping(false);\n//\t\t\tcurrentAlgo.run(this);\n\t\t\t}\n\t\t}", "@Override\n\t\t\tpublic void run() {\n//\t\t\t\t\n//\t\t\t\tSystem.out.printf(\"Ausgangs-Puffer: \");\n//\t\t\t\tfor(int i=0; i<Message.length; i++)\tSystem.out.printf(\"0x%02X \", eeipClient.O_T_IOData[i]);\n//\t\t\t\tSystem.out.printf(\"\\n\\n\");\n\n\t\t\t\tStatus_Byte=eeipClient.T_O_IOData[0x7F];\n\t\t\t\tTO_Bit=(Status_Byte&(0x20))>>5;\n\t\t\t\tAA_Bit=(Status_Byte&(0x02))>>1;\n\t\t\n\t\t\t\tif((TO_Bit_old!=TO_Bit)&&(AA_Bit==1)) {\n\t\t\t\t\tTO_Bit_old=TO_Bit;\n\t\t\t\t\tstate=1;\n\t\t\t\t\ttimerflag2=false;\n\t\t\t\t\tthis.cancel();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "boolean shouldStop();", "void beforeStop();", "private void switchOnFlag(int flag) {\r\n\t\tsim40.memory[Simulator.STATUS_ADDRESS]|= (1<<flag);\r\n\t}", "public void resume() {\n moveStop = true;\n }", "public void resume(){\r\n\r\n isRunning = true;\r\n ourThread = new Thread(this);\r\n ourThread.start();\r\n }", "public void stopThread() \n {\n \tthis.exit = true;\n \t//ctr.getMemory().programmcounter = 65536;\n }", "public void stop(){\n stop = true;\n }", "@Override\n\t\t\t\tpublic void run() {\n//\t\t\t\t\t\n//\t\t\t\t\tSystem.out.printf(\"Ausgangs-Puffer: \");\n//\t\t\t\t\tfor(int i=0; i<Message.length; i++)\tSystem.out.printf(\"0x%02X \", eeipClient.O_T_IOData[i]);\n//\t\t\t\t\tSystem.out.printf(\"\\n\\n\");\n//\t\t\t\t\tSystem.out.println(TO_Bit_old);\n//\t\t\t\t\tSystem.out.printf(\"\\n\\n\");\n\t\t\t\t\tStatus_Byte=eeipClient.T_O_IOData[0x7F];\n\t\t\t\t\tTO_Bit=(Status_Byte&(0x20))>>5;\n\t\t\t\t\tAA_Bit=(Status_Byte&(0x02))>>1;\n\t\t\t\t\tAE_Bit=(Status_Byte&(0x04))>>2;\n\t\t\t\n\t\t\t\t\tif((TO_Bit_old!=TO_Bit)&&(AA_Bit==1)&&(AE_Bit==1)) {\t\t\t\n\t\t\t\t\t\tstate2=1;\n\t\t\t\t\t\ttimerflag2=false;\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}", "public synchronized void stop() {\n\t\tif (!isStart) {\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\t\tfor (LoopThread l : thread) {\n\t\t\tl.finnish();\n\t\t}\n\t\tint activeCount;\n\t\tdo{\n\t\t\tactiveCount = 0;\n\t\t\tfor(LoopThread l : thread){\n\t\t\t\tif(l.isAlive()){\n\t\t\t\t\tactiveCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t} while (activeCount > 0);\n\t\t\n\t}", "boolean isStopped();", "public void stop()\r\n\t{\r\n\t\tdoStop = true;\r\n\t}", "DeltaWorker() {\n this.shouldStop = new AtomicBoolean(false);\n }", "public void switchAtm(boolean flag);", "@Override\n public void OnMosSdkStop(boolean flag) {\n MyLog.log(\"stop??????\" + flag);\n\n }", "public void stop(Thread arg0) {\n\t\t\n\t}", "public synchronized void stop(){\n\t\tthis.running = false;\n\t\ttry {\n\t\t\tthis.thread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void susThread(){\r\n suspended = true;\r\n }", "private void stop(){\n isRunning = false;\n try{\n thread.join();\n }\n catch(InterruptedException e){\n e.printStackTrace();\n }\n }", "synchronized void toggle() {\n myShouldPause = !myShouldPause;\n this.notify();\n }", "public void stop(){\n running = false;\n }", "public void toggleStopMark(final Object entry) {\r\n IOEQ.add(new Runnable() {\r\n public void run() {\r\n if (entry == null || entry == DownloadWatchDog.this.currentstopMark || entry == STOPMARK.NONE) {\r\n /* no stopmark OR toggle current set stopmark */\r\n DownloadWatchDog.this.setStopMark(STOPMARK.NONE);\r\n } else {\r\n /* set new stopmark */\r\n DownloadWatchDog.this.setStopMark(entry);\r\n DownloadsTableModel.getInstance().setStopSignColumnVisible(true);\r\n }\r\n }\r\n }, true);\r\n }", "@Override\n public void run() {\n System.out.println(\"ffff===\"+ Thread.currentThread().isInterrupted());\n while (true) {\n try{\n Thread.sleep(1);\n System.out.println(\"ccc===\"+ Thread.currentThread().isInterrupted());\n if (Thread.interrupted()) {\n System.out.println(\"ddd===\"+ Thread.currentThread().isInterrupted());\n System.err.println(\"线程中断标志位为true\");\n return;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }\n }", "protected void setFlag() {\n flag = flagVal;\n }", "protected void setFlag() {\n flag = flagVal;\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tisExit=false;\n\t\t\t\t}", "public final void stop() {\n running = false;\n \n \n\n }", "public void requestStop( ) {\n\t\tif (verbose) System.out.println(\"requestStop called, about to enter synchronized\");\n\t\tsynchronized (this) {\n\t\t\tif (verbose) System.out.println(\"... entered synchronized\");\n\t\t\tif( threadStatus == PAUSED ) {\n\t\t\t\tif (verbose) System.out.println(\"was paused so interrupting\");\n\t\t\t\tthis.interrupt();\n\t\t\t\tif (verbose) System.out.println(\"done interrupting\");\n\t\t\t}\n\t\t\tthreadStatus = STOPPING;\n\t\t\treportThreadStatus();\n\t\t\tif (verbose) System.out.println(\"... leaving synchronized\");\n\t\t}\n\t\tif (verbose) System.out.println(\"requestStop finished (threadStatus now \"+threadStatus+\")\");\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.handlertestactivity);\n start=(Button) findViewById(R.id.start);\n ts=(Button) findViewById(R.id.ts);\n stop= (Button) findViewById(R.id.stop);\n start.setOnClickListener(this);\n ts.setOnClickListener(this);\n stop.setOnClickListener(this);\n flag=true;\n MyRunnableThread myRunnableThread =new MyRunnableThread();\n Thread thread = new Thread(myRunnableThread);\n thread.start();\n if(i==10001){\n \tToast.makeText(this, \"water keep on going\", 2000).show();\n }else{\n \tToast.makeText(this, \"water keep on going too\", 2000).show();\n }\n// String threadName= Thread.currentThread().getName();\n// Toast.makeText(this, threadName, 5000).show();\n \n \n }", "public void halt ( )\n\t{\n\t\tthis.running = false;\n\t}", "public void start(){\n //Set pausing to false\n pausing = false;\n next();\n }", "@Override\n public synchronized void start() {\n pauseLoop = false;\n if (running) {\n synchronized (unchecked) {\n unchecked.notify();\n }\n } else {\n running = true;\n super.start();\n }\n }", "public boolean getAllowStop();", "public void setRunning(boolean incRunning){\n\t\trunning = incRunning;\n\t}", "public boolean isStopped();", "public void stop() {\n stop = true;\n }", "public void stopThread(View view) {\n //stopThreadByInterrupt();\n //stopThreadByBoolean();\n stopThreadByRunnable();\n\n\n }", "public synchronized void stop() {\n isRunning = false;\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void reset() {\n\t\tif (thread == null) {\n\t\t\tstop = false;\n\t\t\tdone = false;\n\t\t} else if (done) {\n\t\t\tthread = null;\n\t\t\tstop = false;\n\t\t\tdone = false;\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tresetCounter++;\n\t}", "public void toggleDone() {\n this.done = !this.done;\n }", "synchronized public void stopDevice() {\n mStopThread = true;\n }", "protected abstract boolean resume();", "void notifyStop();", "public void stop() {\n _running = false;\n }", "public void setStop(boolean stop) {\n\t\tloopTask.stop = stop;\n\t}", "public boolean isRunning() {\n/* 101 */ return this.isRunning;\n/* */ }", "@Override\n public void run() {\n flag = true;\n // The Runnable is posted to run again here:\n handler.postDelayed(this, interval);\n }", "private void stop() {\r\n\t\t\tstopped = true;\r\n\t\t}", "@Override\n\t\t\t\tpublic void run() {\n//\t\t\t\t\t\n//\t\t\t\t\tSystem.out.printf(\"Ausgangs-Puffer: \");\n//\t\t\t\t\tfor(int i=0; i<Message.length; i++)\tSystem.out.printf(\"0x%02X \", eeipClient.O_T_IOData[i]);\n//\t\t\t\t\tSystem.out.printf(\"\\n\\n\");\n\t\t\t\t\t\n\t\t\t\t\tStatus_Byte=eeipClient.T_O_IOData[0x7F];\n\t\t\t\t\tTO_Bit=(Status_Byte&(0x20))>>5;\n\t\t\t\t\tAE_Bit=(Status_Byte&(0x04))>>2;\n\t\t\t\t\tAA_Bit=(Status_Byte&(0x02))>>1;\n\t\t\t\t\t\n\t\t\t\t\tif(AE_Bit==1) {\n\t\t\t\t\t\tstate=2;\n\t\t\t\t\t\ttimerflag3=false;\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\tpublic void run() {\n\t\t\tEditor e=sh.edit();\n\t\t\te.putInt(\"mainflag\",0);\n\t\t\te.commit();\n\t\t}", "public void resume() {\n mStopAtLoopEnd = false;\n cancelCallback();\n postCallback();\n }", "public void startReverse() {\n startHelper(f_startDirection.getOppositeDirection(), \"startReverse()\");\n }", "@Override\n public void stopThread() {\n Log.d(TAG, \"Stopping \" + getName() + \" thread!\");\n running = false;\n doStopAction();\n boolean retry = true;\n while (retry) {\n try {\n join();\n retry = false;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public void stop() {\r\n running = false;\r\n }", "public void pleaseStop()\n {\n\t this.doorgaan_thread = false;\n\t this.doorgaan_wheel = true;\n draad = null; // waarom? \n }", "public synchronized void stop() {\n this.running = false;\n }", "void stopTone(){\n t.interrupt();\n isRunning = false;\n try {\n t.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n t = null;\n }", "public void paused(boolean flagPause) {\r\n\t\t__flagRunning = !flagPause;\r\n\t}", "@Override\n public synchronized void stop() {\n final double temp = get();\n m_accumulatedTime = temp;\n m_running = false;\n }", "public boolean isResuming();", "private void m4807c() {\n LogUtil.d(f3850h, \"ReceiverAndConverterThreadInternal stopThreadInner\");\n this.f3835a = false;\n f3853k.m4891v();\n f3853k.m4836C();\n }", "public boolean getContinueFlag()\r\n {\r\n if (curTurn > 1) return false;\r\n return true;\r\n }", "public void stop(){\n\t\t\n\t}", "public void autoStopForward(boolean flag) throws JposException;", "public synchronized void stop() {\n stopping = true;\n }", "@Override\n\t\t\t\tpublic void run() {\n//\t\t\t\t\t\n//\t\t\t\t\tSystem.out.printf(\"Ausgangs-Puffer: \");\n//\t\t\t\t\tfor(int i=0; i<Message.length; i++)\tSystem.out.printf(\"0x%02X \", eeipClient.O_T_IOData[i]);\n//\t\t\t\t\tSystem.out.printf(\"\\n\\n\");\n\n\t\t\t\t\tStatus_Byte=eeipClient.T_O_IOData[0x7F];\n\t\t\t\t\tTO_Bit=(Status_Byte&(0x20))>>5;\n\t\t\t\t\tAA_Bit=(Status_Byte&(0x02))>>1;\n\t\t\t\t\tAE_Bit=(Status_Byte&(0x04))>>2;\n\t\t\t\n\t\t\t\t\tif((AA_Bit==0)&&(AE_Bit==0)) {\n\t\t\t\t\t\tstate2=2;\n\t\t\t\t\t\ttimerflag2=false;\n\t\t\t\t\t\tthis.cancel();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void run() {\n if (flag == true) {\n Log.i(\"Thread\", \"entrou na thread \");\n lineData.append(xArray, array);\n surface.zoomExtents();\n xArray[0] = xArray[8];\n }\n\n\n // flag = false;\n }", "public void stop() {\n\t\tthis.stopTime = System.nanoTime();\n\t\tthis.running = false;\n\t}", "@Override\n public String onStoped(boolean arg0, String arg1) {\n return null;\n }", "public void resume() {\n running = true;\n gameThread = new Thread(this);\n gameThread.start();\n }", "public void onClick(View v) {\n DemoThread demothread = new DemoThread();\n demothread.start();\n\n DemoThread2 demothread2 = new DemoThread2();\n demothread2.start();\n\n Random r = new Random();\n for (int i = 0; i < 10; i++) {\n try {\n Thread.sleep(1000);//睡眠1秒\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n synchronized (testClass) {\n testClass.setFlag(\"for:\" + Integer.toString(i));\n testClass.notify();\n\n\n //testClass.notify();\n\n\n Log.d(\"onCreate:\", Integer.toString(i));\n }\n }\n }", "public void setStopMark(final Object stopEntry) {\r\n IOEQ.add(new Runnable() {\r\n public void run() {\r\n Object entry = stopEntry;\r\n if (entry == null || entry == STOPMARK.NONE) {\r\n entry = STOPMARK.NONE;\r\n }\r\n if (entry == STOPMARK.RANDOM) {\r\n /* user wants to set a random stopmark */\r\n synchronized (DownloadWatchDog.this.downloadControllers) {\r\n if (DownloadWatchDog.this.downloadControllers.size() > 0) {\r\n /* use first running download */\r\n entry = DownloadWatchDog.this.downloadControllers.get(0).getDownloadLink();\r\n } else {\r\n /*\r\n * no running download available, set stopmark to none\r\n */\r\n entry = STOPMARK.NONE;\r\n }\r\n }\r\n }\r\n DownloadWatchDog.this.currentstopMark = entry;\r\n }\r\n }, true);\r\n }", "public static void main(String[] args) throws Exception {\n Thread thread =\n new Thread(\n new Runnable() {\n\n @Override\n public void run() {\n // TODO Auto-generated method stub\n System.out.println(\"ffff===\"+ Thread.currentThread().isInterrupted());\n while (true) {\n try{\n Thread.sleep(1);\n System.out.println(\"ccc===\"+ Thread.currentThread().isInterrupted());\n if (Thread.interrupted()) {\n System.out.println(\"ddd===\"+ Thread.currentThread().isInterrupted());\n System.err.println(\"线程中断标志位为true\");\n return;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }\n }\n });\n System.out.println(\"aaaa==\" + thread.isInterrupted());\n thread.start();\n Thread.sleep(2);\n thread.interrupt();\n Thread.sleep(2000);\n System.out.println(\"bbbb==\" + thread.isInterrupted());\n }", "public void set(int flag)\n {\n setWaitFlags( waitFlags | flag );\n }", "public void stop()\n {\n running = false;\n }", "@Override\n protected void onStop() {\n \tsuper.onStop();\n \tthread.setThreadExit(true);\n \tthread = null;\n \t\n }", "public synchronized void stop() {\n try {\n thread.join();\n running = false;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public boolean unPause();" ]
[ "0.6623924", "0.6541417", "0.64825815", "0.6453959", "0.6374831", "0.6318138", "0.6294121", "0.621509", "0.61874413", "0.6130303", "0.61282384", "0.61180776", "0.60831094", "0.6053465", "0.6043649", "0.6022864", "0.6013295", "0.599032", "0.5979234", "0.5975342", "0.5953517", "0.5951454", "0.5889712", "0.58780575", "0.5856566", "0.5855606", "0.5847417", "0.57962286", "0.57790744", "0.5772931", "0.5768613", "0.57554054", "0.56833965", "0.566852", "0.56643933", "0.56630725", "0.5660466", "0.56554157", "0.565176", "0.56511325", "0.56316924", "0.5604259", "0.5602931", "0.5587585", "0.5582116", "0.557407", "0.557407", "0.55679744", "0.5557198", "0.55488646", "0.55468524", "0.55429274", "0.5539259", "0.55189073", "0.55013686", "0.5500785", "0.5495454", "0.5494826", "0.5486685", "0.5486479", "0.54833764", "0.54791385", "0.54778695", "0.54690033", "0.54496175", "0.5444375", "0.5434026", "0.54327846", "0.5428556", "0.5423738", "0.5417647", "0.54161006", "0.5405965", "0.54046637", "0.5401186", "0.5397815", "0.5386188", "0.5376542", "0.53743804", "0.5373816", "0.53710043", "0.5370404", "0.53641903", "0.53628594", "0.5357347", "0.5356684", "0.5346397", "0.5337936", "0.5335875", "0.53301245", "0.53280836", "0.53142554", "0.5314048", "0.5309685", "0.5308878", "0.53078824", "0.5304983", "0.5304083", "0.5303671", "0.5302721" ]
0.677625
0
Return the unique possible instance of the AppTimer
public static AppTimer getIstance() { if (instance == null) { synchronized (AppTimer.class) { if (instance == null) { instance = new AppTimer(); } } } return instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Time uniqueInstance() {\r\n\t\tif (time == null) {\r\n\t\t\tsynchronized (Time.class) {\r\n\t\t\t\tif (time == null) {\r\n\t\t\t\t\ttime = new Time(600);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn time;\r\n\t}", "public static Timer getSharedNonDeamonTimer() {\n if ( sharedNonDeamonTimer == null ) {\n sharedNonDeamonTimer = new Timer(\"Shared Non-Deamon Timer\", false);\n }\n\n return sharedNonDeamonTimer;\n }", "static public Timer theTimer() {\n return TheTimer;\n }", "public static FpsTimer singleton() {\n return singleton == null ? singleton = new FpsTimer() : singleton;\n }", "TimerType createTimerType();", "public static TimeMachine getTimeMachine() {\n return _instance;\n }", "Timer getTimer();", "private AppTimer() {\n\t\tstart();\n\t}", "public static Uniqueid getInstance() {\n if (uniqueid == null) {\n uniqueid = new Uniqueid();\n }\n return uniqueid;\n }", "public static Timer getSharedDeamonTimer() {\n \n if ( sharedDeamonTimer == null ) {\n sharedDeamonTimer = new Timer(\"Shared Deamon Timer\", true);\n }\n\n return sharedDeamonTimer;\n }", "long getTimerPref();", "public static synchronized SimpleTimer getInstance(int threadPoolSize) {\n if (instance == null) {\n instance = new SimpleTimer(threadPoolSize);\n SimpleTimer.instanceThreadPoolSize = threadPoolSize;\n } else {\n if (SimpleTimer.instanceThreadPoolSize != threadPoolSize) {\n log.warn(\"Asked to create SimpleTimer with thread pool size {}, existing instance has {}\",\n threadPoolSize, instanceThreadPoolSize);\n }\n }\n return instance;\n }", "int getInstanceId();", "int getInstanceId();", "int getInstanceId();", "private UimaTimer getTimer() throws Exception {\n String uimaTimerClass = cpeFactory.getCPEConfig().getCpeTimer().get();\n if (uimaTimerClass != null) {\n new TimerFactory(uimaTimerClass);\n return TimerFactory.getTimer();\n }\n // If not timer defined return default timer based on System.currentTimeMillis()\n return new JavaTimer();\n }", "public String getTimerType() {\n\t\treturn Main.STANDARDTIMER;\n\t}", "public static String generateInstanceId() {\n\t\t// TODO Use a complex hashing algorithm and generate 16-character\n\t\t// string;\n\n\t\treturn Calendar.getInstance().getTime().toString().replaceAll(\" \", \"\");\n\t}", "public String getInstanceIdentifier();", "long getInstanceID();", "public final static KaranteeniTimerInitiater getTimerHandler() {\r\n\t\treturn timerInitiater;\r\n\t}", "public int getTimer() {\n return getOption(ArenaOption.TIMER);\n }", "String getInstanceID();", "public int getTimer() {\n return timer;\n }", "public static TimedActiveTeams getInstance()\r\n {\r\n if(uniqueInstance == null)\r\n {\r\n uniqueInstance = new TimedActiveTeams();\r\n }\r\n return uniqueInstance;\r\n }", "public static String getcurrentInstance(int type) {\n return getcurrentInstance(Calendar.getInstance(), type);\n }", "public Timer getTimer() {\n\t//if (heartbeat_==null) heartbeat_ = new Timer(100, 1000); // on demand: don't slow down startup\n\tif (timer_==null) timer_ = new java.util.Timer();\n\treturn timer_;\n }", "public static UUID getInstanceSignatue() {\n return new UUID(RANDOM_UUID_MSBS, 0L);\n }", "java.lang.String getInstanceId();", "java.lang.String getInstanceId();", "java.lang.String getInstanceId();", "java.lang.String getInstanceId();", "private WidgetInstanceManager get_instance(int appWidgetId) {\r\n\t\t\treturn m_Instances.get(appWidgetId);\r\n\t\t}", "public static long startTimer() {\n return System.currentTimeMillis();\n }", "public void initializeInstance() {\n instanceLife = new Timer();\n }", "public GameTimer getTimer()\n {\n return timer;\n }", "public String getInstanceId();", "public static synchronized Singleton getInstanceTS() {\n\t\tif (_instance == null) {\n\t\t\t_instance = new Singleton();\n\t\t}\n\t\treturn _instance;\n\t}", "public static synchronized SimpleTimer getInstance(AccumuloConfiguration conf) {\n int threadPoolSize;\n if (conf != null) {\n threadPoolSize = conf.getCount(Property.GENERAL_SIMPLETIMER_THREADPOOL_SIZE);\n } else {\n threadPoolSize = DEFAULT_THREAD_POOL_SIZE;\n }\n return getInstance(threadPoolSize);\n }", "public static synchronized TowerManager getUniqueInstance() {\n if (uniqueInstance == null) {\n uniqueInstance = new TowerManager();\n }\n return uniqueInstance;\n }", "String getSingletonName();", "TimerSchedule createTimerSchedule();", "public static Clock instance() {\n\t\tif (instance == null) {\n\t\t\tinstance = new Clock();\n\t\t}\n\t\treturn instance;\n\t}", "public String getTimer() {\n return timer;\n }", "public static ITimeProvider getTimeProvider() {\n return _instance;\n }", "SwTimerResource createSwTimerResource();", "@Override\n\tpublic Double getTimer() {\n\t\treturn null;\n\t}", "public IdleTimer getIdleTimer()\n {\n return idleTimer;\n }", "public static App getInstance() {\n return applicationInstance;\n }", "@Override\n public T getInstance() {\n return instance;\n }", "protected byte[] getOnTimerSetting() {return null;}", "private CountDownTimer getGameTimer() {\n CountDownTimer countDownTimer;\n countDownTimer = new CountDownTimer(gameTimeLeftYet, 100) {\n @Override\n public void onTick(long millisUntilFinished) {\n gameTimerOnTick(millisUntilFinished);\n }\n\n @Override\n public void onFinish() {\n gameTimerOnFinish();\n }\n };\n return countDownTimer;\n }", "public String createUniqueScriptInstanceIdentifier() {\n\n\t\tLOGGER.debug(\"Creating a unique script instance identifier\");\n\n\t\t// generate a random name for the connection\n\t\tCalendar myCalendar = Calendar.getInstance();\n\t\tSimpleDateFormat dateFormatter = new SimpleDateFormat(\"yyyyMMddHHmmssS\");\n\t\tString scriptIdentifier = \"scriptInstance\"\n\t\t\t\t+ dateFormatter.format(myCalendar.getTime())\n\t\t\t\t+ randomNameSequence;\n\t\trandomNameSequence = randomNameSequence + 1;\n\n\t\tLOGGER.info(\"Generated unique script instance identifier [\"\n\t\t\t\t+ scriptIdentifier + \"]\");\n\n\t\treturn scriptIdentifier;\n\t}", "public TaskTimer\n getTimer() \n {\n return pTimer;\n }", "public static PSUniqueObjectGenerator getInstance()\n {\n if ( null == ms_instance )\n ms_instance = new PSUniqueObjectGenerator();\n return ms_instance;\n }", "@Override\n\t\tpublic Object getInstance() {\n\t\t\treturn null;\n\t\t}", "public Timer getOverallTimer();", "public T getInstance() {\n return instance;\n }", "public int getTimer() {\n return worldTimer;\n }", "public static UILApplication getInstance() {\n\t\treturn instance;\n\t}", "public static Singleton getInstance() {\n return SingletonHolder.SINGLETON_INSTANCE;\n }", "public Timer() {}", "public Timer getTimer(){\n\t\treturn timer;\n\t}", "String getInstance()\n {\n return instance;\n }", "public static SchedulerThreadCounter getInstance()\n\t{\n\t\tif(istc_intance == null)\n\t\t\tistc_intance = new SchedulerThreadCounter();\n\n\t\treturn istc_intance;\n\t}", "public static ToolRegistery getInstance(){\n\t\treturn InstanceKeeper.instance;\n\t}", "public int getBaseInstance() {\n return baseInstance;\n }", "public int getBaseInstance() {\n return baseInstance;\n }", "private static String localUnique(){\n\t\tfinal long counterValue = instanceCounter.getAndIncrement();\n\t\tString unique = uniqueTop + String.format(\"%08d\", counterValue);\n\t\treturn unique;\t\t\n\t}", "@Nullable\n abstract String getInstanceId();", "public static ExitApplicationUtil getCurrentInstance(){\n if(instance == null){\n instance = new ExitApplicationUtil();\n }\n return instance;\n }", "public IdleTimer() {\r\n\t\t\tinActivitySession = false;\r\n\t\t}", "public static synchronized NewspointsApp getInstance() {\n return mInstance;\n }", "Alarm createAlarm();", "private void getOneToteTimer()\r\n\t{\r\n\t\tswitch(autoStep)\r\n\t\t{\r\n\t\t\tcase 0:\r\n\t\t\t{\r\n\t\t\t\tpickUpTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase 1:\r\n\t\t\t{\r\n\t\t\t\tdriveForwardTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\t\r\n\t}", "private TimerTask getTask() {\n\t\tfinal TimedTask tt = this;\n\t\treturn new TimerTask() {\n\t\t\tpublic void run() {\n\t\t\t\ttask();\n\t\t\t\ttt._nextTaskHasRan = true;\n\t\t\t}\n\t\t};\n\t}", "public static Gameplay getRunningGame() {\r\n\t\treturn Gameplay.getInstance();\r\n\t}", "Object getClock();", "T getInstance();", "public static TaskManager getInstance()\n {\n return gInstance;\n }", "public static Application getInstance(){\n\t\treturn getInstance (null);\n\t}", "static public AtomSlinger Get_Instance ()\n {\n return AtomSlingerContainer._instance;\n }", "public Timer getTimer() {\r\n\t\treturn timer;\r\n\t}", "public abstract String getFirstTimeSettingID();", "int getIdInstance();", "private void startNewTimer(){\n timer.cancel();\n timer = null;\n timesUp();\n timer = new MainGameTimer(this);\n timer.startNewRoundCountDown();\n }", "public java.lang.String getInstanceGuid() {\r\n return instanceGuid;\r\n }", "public static LongType getInstance() {\n return INSTANCE;\n }", "public byte[] getInstanceId() {\n if (byteInstanceID == null) {\n final Device device = Device.getInstance();\n final byte[] deviceid = device.getWDeviceId();\n byteInstanceID = Encryption.SHA1(deviceid);\n }\n return byteInstanceID;\n }", "private static int nextInstanceID()\n {\n return baseID.incrementAndGet();\n }", "public static synchronized DemoApplication getInstance() {\n return mInstance;\n }", "java.lang.String getInstanceName();", "synchronized public static SampletypeManager getInstance()\n {\n return singleton;\n }", "public static Main getInstance() {\r\n return instance;\r\n }", "public String getInstance()\n\t{\n\t\tString occursOn = (String)cbOccursOn.getSelectedItem();\n\t\treturn occursOn;\n\t}", "public interface AppScheduler {\n Scheduler getNewThread();\n Scheduler getMainThread();\n}", "public static GameLoop getInstance(){\n if( networked ){\n return NetworkGameLoop.getInstance();\n }\n if(uniqueInstance == null){\n uniqueInstance = new GameLoop();\n }\n return uniqueInstance;\n }", "public static Singleton instance() {\n return Holder.instance;\n }", "public static Main getInstance() {\n return instance;\n }", "public static CachedClock instance() {\n CachedClock result = instance;\n if (result == null) {\n synchronized (INSTANCE_LOCK) {\n result = instance;\n if (result == null) {\n instance = result = new CachedClock();\n }\n }\n }\n return result;\n }" ]
[ "0.67606896", "0.6491661", "0.6467671", "0.6460632", "0.64276737", "0.633288", "0.6264495", "0.61005384", "0.60660905", "0.6063985", "0.59253746", "0.59172505", "0.59107757", "0.59107757", "0.59107757", "0.58924526", "0.5883739", "0.5857683", "0.58383334", "0.5824619", "0.5815244", "0.5814168", "0.5797339", "0.5773856", "0.5758062", "0.57445306", "0.57118195", "0.56880844", "0.56782323", "0.56782323", "0.56782323", "0.56782323", "0.566081", "0.56566334", "0.56350005", "0.56324077", "0.5622988", "0.5603505", "0.5602701", "0.55998427", "0.55892706", "0.5577227", "0.5557734", "0.5551697", "0.55373055", "0.55310047", "0.5519235", "0.54969734", "0.5485972", "0.54829913", "0.5465525", "0.54620385", "0.54461825", "0.54461294", "0.5441375", "0.54245085", "0.54169494", "0.5414877", "0.54099697", "0.53918374", "0.53881603", "0.5372345", "0.53592616", "0.5354619", "0.5351449", "0.53489655", "0.53446084", "0.53446084", "0.5331843", "0.53249925", "0.5309839", "0.53084445", "0.53069454", "0.5289278", "0.5287322", "0.5285089", "0.526652", "0.52515495", "0.52354145", "0.52280736", "0.52240884", "0.52237546", "0.5222607", "0.52196175", "0.5212793", "0.5208137", "0.51857597", "0.5180634", "0.5180461", "0.5178632", "0.5154929", "0.5154029", "0.51435226", "0.51417404", "0.51393884", "0.51349694", "0.5129173", "0.5116824", "0.5111135", "0.51048124" ]
0.73757833
0
Stop the Timer when it is running
public void stopTimer() { runFlag = false; ses.shutdown(); System.err.println("TIMER SHUTDOWN"); instance = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stop() {timer.stop();}", "public void stop() {\n timer.stop();\n }", "public static void stopTimer() {\n timerIsWorking = false;\r\n elapsedTime = 0;\r\n }", "public void stopTimer()\n {\n timer.cancel();\n }", "public void stop() {\n\t\tthis.timer.cancel();\n\t}", "private void stopTime()\n {\n timer.stop();\n }", "public void stop() {\n\t\t_timer.cancel();\n\t}", "public void stop(){\n\t\tif(timer == null){ return; }\n\t\ttimer.stop();\n\t\tmakeTimer();\n\t}", "private void stop() {\n timer.cancel();\n timer = null;\n }", "public void stopTimer(){\n this.timer.cancel();\n }", "public void stopTimer() {\r\n running = false;\r\n try {\r\n if (timerThread != null && timerThread.isAlive()) {\r\n timerThread.join();\r\n }\r\n } catch (Exception ie) {\r\n }\r\n }", "public void stop() {\n if (timer != null) {\n timer.cancel();\n }\n }", "public void stopTime() {\n if (isRunning) {\n timer.cancel();\n timer.purge();\n }\n isRunning = false;\n }", "public void stop() {\n if (this.timer != null) {\n this.timer.cancel();\n }\n }", "public void stopTimer() {\n if (mHandler != null) {\n mHandler.removeCallbacks(mStatusChecker);\n }\n }", "@Override\n public void stop() {\n GameManager.getInstance().stopTimer();\n }", "public void stopTimer(){\n logger.trace(\"Sensor/\" + getModel().getId() + \" timer stopped\");\n if(newTimer != null && timerTask != null){\n timerTask.cancel();\n newTimer.purge();\n timerTask = null;\n }\n }", "public void endTimer(){\n timer.cancel();\n }", "public void stopTimer() {\n maxAccelOutput.setText(String.valueOf(maxAccel));\n timeHandler.removeCallbacks(startTimer);\n startButton.setText(R.string.go_button);\n isRunning = false;\n }", "public void\nstopTimer() {\n\t\n\tSystemDesign.logInfo(\"MetroParams.stopTimer: Killing annealing timer.\");\n\t\n\tif (metroTimer_ != null) {\n metroTimer_.stopPlease();\n\t metroTimer_ = null;\n }\n\tmetroThread_ = null;\n}", "public void stop(){\r\n\t\tmyTask.cancel();\r\n\t\ttimer.cancel();\r\n\t}", "public void stop() {\n\t\tthis.stopTime = System.nanoTime();\n\t\tthis.running = false;\n\t}", "void stopUpdateTimer();", "public void stop(){\n\t\tthis.timer.stop();\n\t\t//whenever we stop the entire game, also calculate the endTime\n\t\tthis.endTime = System.nanoTime();\n\t\tthis.time = this.startTime - this.endTime;\t//calculate the time difference\n\t\t\n\t\tthis.stop = true;\n\t}", "public void stopTimerTask() {\n if (timer != null) {\n timer.cancel();\n timer = null;\n }\n }", "public void cancel() {\n timer.cancel();\n timer = new Timer();\n }", "public void endTimer()\n\t{\n\t\ttimer.stopTimer();\n\t}", "private void stop() {\n if (pollTimer != null) {\n pollTimer.cancel();\n pollTimer = null;\n }\n }", "public void stopTimer() {\n if (animationTimer != null) {\n animationTimer.stop();\n }\n try {\n TimeUnit.SECONDS.sleep(1);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n if (roomController.isConfigured()) {\n roomController.closeController();\n }\n timeLogController.closeController();\n videoController.closeController();\n }", "public void stop()\n\t{\n\t\t//get the time information as first part for better precision\n\t\tlong systemMs = SystemClock.elapsedRealtime();\n\n\t\t//if it was already stopped or did not even run, do nothing\n\t\tif (!m_running)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tm_elapsedMs += (systemMs - m_lastMs);\n\n\t\tm_running = false;\n\t}", "TimeInstrument stop();", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(\"timertest1\");\n\t\t\t\ttimer.cancel();\n\n\t\t\t}", "public void stop() {\n _running = false;\n }", "public long stop() {\n return timer.stop(task);\n }", "public void stop(){\n if (this.isActive()) {\n this.setEndTime(Calendar.getInstance());\n this.setTotalSeconds();\n this.setActive(false);\n }\n \n }", "private void stopCountTime() {\n\t\tendTimer();\n\t\tif(this.gameTimeThread != null) {\n try {\n this.gameTimeThread.join();\n } catch (InterruptedException ignored) {\n }\n }\n\t}", "public synchronized void stop() {\n this.running = false;\n }", "void cancelTimeout() {\n timer.cancel();\n }", "public void stop() {\n\t\tResources.getmScene().unregisterUpdateHandler(time);\n\t\trunning = false;\n\t}", "public synchronized void stop(){\n\t\tif (tickHandle != null){\n\t\t\ttickHandle.cancel(false);\n\t\t\ttickHandle = null;\n\t\t}\n\t}", "private void cancelTimer() {\n Timer.cancelTimeout(this);\n responded = true;\n }", "public void stop(){\n running = false;\n }", "public void stop() {\r\n running = false;\r\n }", "public void stop()\n\t{\n\t\trunning = false;\n\t}", "public void stop() {\n clockThread = null;\n }", "public void stop() {\n running = false;\n }", "public final void stop() {\n running = false;\n \n \n\n }", "public void stop() {\n endTime = System.currentTimeMillis();\n }", "public void stop() {\n cancelCallback();\n mStartTimeMillis = 0;\n mCurrentLoopNumber = -1;\n mListener.get().onStop();\n }", "public void stop()\n {\n running = false;\n }", "public void stopAnim() {\n // stop the timer\n t.stop();\n }", "public void stop()\n{\n // If animator is running, stop it\n if(isRunning()) {\n \n // Stop timer\n _timer.stop();\n \n // Reset time to play start time\n if(getPlayStartTime()>=0 && getResetTimeOnStop())\n setTime(getPlayStartTime());\n else setTime(getMaxTime());\n \n // Send animatorStopped notification\n for(Listener listener : getListeners(Listener.class)) listener.animatorStopped(this);\n }\n}", "public void EndTimer() {\n\t\tCount.End();\n\t}", "public int stopTimer() {\n timerTask.cancel();\n timerTask = null;\n return counts;\n }", "public void deactivate () {\n\t\tif (_timer!=null) {\n\t\t\t_timer.cancel ();\n\t\t\t_timer.purge ();\n\t\t\t_timer = null;\n\t\t}\n\t}", "public void stop() {\n if (this.runningTaskId != -1) {\n plugin.getServer().getScheduler().cancelTask(this.runningTaskId);\n }\n reset(true);\n running = false;\n }", "private static void stopCleanUp() {\n\n if (isEventTrackerRunning && timer != null) {\n timer.cancel();\n timer.purge();\n debugLogger.info(\"Timer stopped: {}\", new Date());\n } else {\n debugLogger.info(\"Timer was already stopped : {}\", new Date());\n\n }\n isEventTrackerRunning = false;\n\n }", "private void StopTime() {\n timer.stop();\n currentHora = 0;\n currentMinuto = 0;\n currentSegundo = 0;\n lbcronometro.setText(\"00:00:00\");\n }", "private void stopCountdown() {\n if (countDownTimer != null) {\n countDownTimer.cancel();\n countDownTimer = null;\n }\n }", "void stop(long timeout);", "public void stopClick (View view){\n \tmHandler.removeCallbacks(startTimer);\n \tstopped = true;\n \thideStopButton();\n }", "private void stopUpdateTimer() {\n\t\tif (completionUpdateTimer != null) {\n\t\t\tcompletionUpdateTimer.cancel();\n\t\t\tcompletionUpdateTimer = null;\n\t\t}\n\t}", "protected void stopTimeTask() {\n\t\tif (chatAsyncTask!=null) {\n\t\t\tchatAsyncTask.cancel(true);\n\t\t}\n\t\t\n\t\tif (liveAsyncTask!=null) {\n\t\t\tliveAsyncTask.cancel(true);\n\t\t}\n\t\t\n\t\tif (timerTask!=null) {\n\t\t\ttimerTask.cancel();\n\t\t\ttimerTask = null;\n\t\t}\n\t\t\n\t\tif (timer!=null) {\n\t\t\ttimer.cancel();\n\t\t\ttimer = null;\n\t\t}\n\t\t\n\t\t\n\t}", "public void stop() {}", "private void stop()\n {\n if(running)\n {\n scheduledExecutorService.shutdownNow();\n running = false;\n }\n }", "public void stop() {\n enemyTimeline.stop();\n }", "public void stopAnimation()\n {\n animationTimer.stop();\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 }", "private void cancelSchedule() {\n\n if (timer == null)\n return;\n // timer.cancel();\n }", "void stopAnimation()\n {\n animationTimer.cancel();\n }", "public void stopPlayThread() {\n ms.stop();\n }", "public void stop() {\r\n isRunning = false;\r\n System.out.println(\"Stop sim\");\r\n }", "public void stop(){\n stop = true;\n }", "public void stop() {\n stop = true;\n }", "public long stop() {\r\n \tendTime = System.currentTimeMillis();\r\n \tif (timer != null) {\r\n \t\ttimer.cancel();\r\n \t}\r\n \tif (doOutput) System.out.println(\".\");\r\n \treturn (endTime - startTime)/1000;\r\n }", "public void stopTimerPool() {\n timerPool.stopTimerPool();\n }", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop()\n {\n if ( this.threadRunning.get() )\n {\n this.threadRunning.set(false);\n }\n }", "@Override\n public synchronized void stop() {\n final double temp = get();\n m_accumulatedTime = temp;\n m_running = false;\n }", "public void stop()\r\n\t{\r\n\t\tdoStop = true;\r\n\t}", "public void stopAndRemove() {\n\t\tstartMoveDownTimer.stop();\n\t\tmoveDownTimer.stop();\n\t}", "@Override\n\tprotected void onStop() {\n\t\tif(videoviewer != null)\n\t\t\tvideoviewer.stopPlayback();\n\t\tif (timer != null) {\n\t\t\ttimer.cancel();\n\t\t}\n\t\tsuper.onStop();\n\t}", "public void stopRunning() {\n try {\n _running = false;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void cancel() {\n\t\tif(hasStarted) {\n\t\t\ttimer.cancel();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"An alarm has not been started\");\n\t\t}\n\t}", "public void stop() {\n\t\tthis.stopper = true;\n\t}", "public void stopInitTimer() {\n try {\n if (this.mInitTimer != null) {\n this.mInitTimer.cancel();\n }\n } catch (Exception e) {\n logException(\"stopInitTimer\", e.getLocalizedMessage());\n } catch (Throwable th) {\n this.mInitTimer = null;\n throw th;\n }\n this.mInitTimer = null;\n }" ]
[ "0.90101105", "0.8632429", "0.85859156", "0.8570227", "0.85629755", "0.85604984", "0.8553526", "0.85524046", "0.8518225", "0.84581274", "0.83132607", "0.82929724", "0.8279185", "0.8249434", "0.8091514", "0.8044991", "0.8042241", "0.80347306", "0.7968555", "0.79524755", "0.79369617", "0.7862914", "0.78291935", "0.77526385", "0.7744284", "0.7730828", "0.7694368", "0.7640095", "0.76261085", "0.75272423", "0.7492434", "0.74545103", "0.74447995", "0.7434474", "0.7431164", "0.73713017", "0.7370777", "0.73617494", "0.7334193", "0.7313777", "0.7301199", "0.7299495", "0.72988087", "0.7255411", "0.72484356", "0.7243379", "0.7241902", "0.7234288", "0.72318894", "0.72144616", "0.7213177", "0.7210588", "0.72048706", "0.7195243", "0.7149546", "0.7136862", "0.7102407", "0.70988744", "0.70932275", "0.7083774", "0.7079111", "0.7073322", "0.70607775", "0.7044273", "0.7011308", "0.69944686", "0.69714916", "0.6962135", "0.69608134", "0.6952144", "0.69509333", "0.6929356", "0.6924835", "0.6922798", "0.6920719", "0.6910579", "0.6903682", "0.6903682", "0.6903682", "0.6903682", "0.6903682", "0.6903682", "0.6903682", "0.6903682", "0.6903682", "0.6903682", "0.6903682", "0.6903682", "0.6903682", "0.6903682", "0.6903682", "0.68954146", "0.6886786", "0.68850887", "0.6831349", "0.6830648", "0.6830169", "0.682936", "0.682927", "0.6824604" ]
0.85435265
8
Start Timer for "min" minutes
public void startTimer(final int min) throws InterruptedException { System.err.println("Inizio startTimer per = " + min); final int sec = min * 60; ses.scheduleWithFixedDelay(new Runnable() { @Override public void run() { if (!runFlag) { invertFlag(); } else { System.out.println(new Date()); try { Notification.getIstance(); } catch (final IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } ses.shutdown(); System.out.println("TIMER SHUTDOWN"); } } }, 0, sec, TimeUnit.SECONDS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 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 }", "public CronTimer(String name, int min) {\n this.name = name;\n cronExpression = \"*\" + \" \" + \"0/\" + min + \" \" + \"* * * ?\";\n }", "public void startTimer() {\n startTime = System.currentTimeMillis();\n }", "private void startTime()\n {\n timer.start();\n }", "public void startTimer() {\n\t\ttimer.start();\n\t}", "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 void startTimer(){\n timerStarted = System.currentTimeMillis();\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 }", "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}", "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 }", "private void startTimer() {\n Timer.addTimeout(endTime, this);\n }", "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 }", "public void start(){\n\t\ttimer = new Timer();\n\t\ttimer.schedule(this, 0, (long)66.6);\n\t}", "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 }", "public void setMinute(int value) {\n this.minute = value;\n }", "private void startTimer(String time){\n\n String[] splitTime = time.split(\":\");\n\n int splitMinute = Integer.valueOf(splitTime[0]);\n int splitSecond = Integer.valueOf(splitTime[1]);\n\n Long mMilisSecond = (long) (((splitMinute * 60) + splitSecond) * 1000);\n\n int max = (((splitMinute * 60) + splitSecond) * 1000);\n mCircularBarPager.getCircularBar().setMax(max);\n mStep = (int) ((max * INTERVAL) / mMilisSecond);\n mCounter = new Counter(mMilisSecond, INTERVAL);\n\n mStart = mEnd;\n mEnd = mEnd + mStep;\n mCounter.start();\n }", "public void startTimer() {\n\t\t\n\t\ttimerStart = System.currentTimeMillis();\n\t\ttimerStarted = true;\n\t}", "public void setMinute(int nMinute) { m_nTimeMin = nMinute; }", "public void setMinute(int value) {\n this.minute = value;\n }", "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 }", "protected final void start(Timer timer) {\r\n timer.scheduleAtFixedRate(this, 5000L, 5000L);\r\n }", "public static void startTimer() {\n elapsedTime = 0;\r\n timerIsWorking = true;\r\n startTime = System.nanoTime() / 1000000; // ms\r\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 }", "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 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 startCount() {\n //meetodi k�ivitamisel nullime tunnid, minutid, sekundid:\n secondsPassed = 0;\n minutePassed = 0;\n hoursPassed = 0;\n if (task != null)\n return;\n task = new TimerTask() {\n @Override\n public void run() {//aeg l�ks!\n secondsPassed++; //loeme sekundid\n if (secondsPassed == 60) {//kui on l�binud 60 sek, nullime muutujat\n secondsPassed = 0;\n minutePassed++;//kui on l�binud 60 sek, suurendame minutid 1 v�rra\n }\n if (minutePassed == 60) {//kui on l�binud 60 min, nullime muutujat\n minutePassed = 0;\n hoursPassed++;//kui on l�binud 60 min, suurendame tunnid 1 v�rra\n }\n //kirjutame aeg �les\n String seconds = Integer.toString(secondsPassed);\n String minutes = Integer.toString(minutePassed);\n String hours = Integer.toString(hoursPassed);\n\n if (secondsPassed <= 9) {\n //kuni 10 kirjutame 0 ette\n seconds = \"0\" + Integer.toString(secondsPassed);\n }\n if (minutePassed <= 9) {\n //kuni 10 kirjutame 0 ette\n minutes = \"0\" + Integer.toString(minutePassed);\n }\n if (hoursPassed <= 9) {\n //kuni 10 kirjutame null ettte\n hours = \"0\" + Integer.toString(hoursPassed);\n }\n\n\n time = (hours + \":\" + minutes + \":\" + seconds);//aeg formaadis 00:00:00\n getTime();//edastame aeg meetodile getTime\n\n }\n\n };\n myTimer.scheduleAtFixedRate(task, 0, 1000);//timer k�ivitub kohe ja t��tab sekundite t�psusega\n\n }", "public void setMinTime(Integer minTime) {\n this.minTime = minTime;\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 }", "public void StartTimer() {\n\t\tCount = new Timer();\n\t}", "protected void runEachMinute() {\n \n }", "@Override\n public void run() {\n sec++;\n if (sec > 9) {\n sec = 0;\n min++;\n }\n timer.setText(String.format(\"%02d\", sec) + \":\" + String.format(\"%02d\", min));\n handler.postDelayed(this, 1000);\n }", "public void startTime() {\n if (!isRunning) {\n timer = new Timer();\n clock = new Clock();\n timer.scheduleAtFixedRate(clock,0,1000);\n isRunning = true;\n }\n }", "public MyTime nextMinute(){\n\t\tint second = getSeconds();\n\t\tint minute = getMinute();\n\t\tint hour = getHours();\n\t\t\n\t\tif (minute!=59){\n\t\t\tminute++;\n\t\t}\n\t\telse{\n\t\t\tminute = 0;\n\t\t\tif (hours!=23){\n\t\t\t\thour++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\thour = 0;\n\t\t\t}\n\t\t\n\t\t}\n\t\n\t\t\n\t\treturn new MyTime(hour,minute,second);\n\t}", "public void startTeleopTimer() {\n t.reset();\n t.start();\n }", "public void start(int h, int m, String ms) {\n\t\tthis.alarmHour = h;\n\t\tthis.alarmMin = m;\n\t\tthis.alarmMsg = ms;\n\t\ttimer.scheduleAtFixedRate(task, 0, 1000);\n\t\tthis.hasStarted = true;\n\t}", "public void startAgentTime() {\n Timer timer = new Timer(SIBAConst.TIME_AGENT_CHANGE_FOR_HOUR, new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n \t\n \tCalendar c = Calendar.getInstance();\n int minutos = c.get(Calendar.MINUTE);\n int hora = c.get( (Calendar.HOUR_OF_DAY)); \n hora = hora * 60;\n if (minutos >= 30 && minutos <= 59)\n {hora +=30;\t\n }\n if (hora > ctrlHours)\n {ctrlHours = hora;\n //activada bandera de modificacion de programacion\n activatedScheduleChange = true;\n }\n else\n { if (hora < ctrlHours)\n \t ctrlHours = 0;\n }\n \t\n \t\n \n }\n });\n timer.start();\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 }", "Integer getMinute();", "public Time4 setMinute( int minute ) \r\n { \r\n this.minute = \r\n ( minute >= 0 && minute < 60 ) ? minute : 0;\r\n\r\n return this; // enables chaining\r\n }", "public void timer() \r\n\t{\r\n\t\tSeconds.tick();\r\n\t \r\n\t if (Seconds.getValue() == 0) \r\n\t {\r\n\t \tMinutes.tick();\r\n\t \r\n\t \tif (Minutes.getValue() == 0)\r\n\t \t{\r\n\t \t\tHours.tick();\r\n\t \t\t\r\n\t \t\tif(Hours.getValue() == 0)\r\n\t \t\t{\r\n\t \t\t\tHours.tick();\r\n\t \t\t}\r\n\t \t}\r\n\t }\t\t\r\n\t \r\n\t updateTime();\r\n\t }", "public int getMinute() { return this.minute; }", "public abstract void startInitTimer();", "@Override\n public void run() {\n int min, seg;\n \n while(true){\n \n time++;\n min=(int) (time / 60);\n seg=(int) (time % 60);\n lTime.setText(min+\":\"+seg);\n \n try {\n Thread.sleep(1000);\n } catch (Exception ex) {\n \n }\n \n }\n }", "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 mStatusChecker.run();\n }", "Timer getTimer();", "public Time( int minutes ) {\n this.minutes = minutes;\n }", "public static long startTimer() {\n return System.currentTimeMillis();\n }", "public int getStartMinute() {\n\treturn start.getMinute();\n }", "public void run() {\n\t\t\tCalendar c = new GregorianCalendar();\n\t\t\tcurrHour = c.get(Calendar.HOUR);\n\t\t\tcurrMin = String.valueOf(c.get(Calendar.MINUTE));\n\t\t\tif(currMin.length()==1) {\n\t\t\t\tcurrMin = \"0\"+currMin;\n\t\t\t}\n\t\t\tcheckAlarm();\n\t\t}", "public void setMinute(int minute)\n {\n this.minute = minute;\n }", "private void startClock() {\r\n\t\tTimer timer = new Timer(500, new ActionListener() {\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent theEvent) {\r\n\t\t\t\tadvanceTime();\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n timer.setRepeats(true);\r\n timer.setCoalesce(true);\r\n timer.setInitialDelay(0);\r\n timer.start();\r\n\t}", "Timer(int tempTotalTime) {\n totalTime = tempTotalTime;\n }", "private void startUpdateTimer() {\n\t\tif (completionUpdateTimer == null) {\n\t\t\tcompletionUpdateTimer = new Timer(UPDATE_TIMER_NAME);\n\n\t\t\tscheduleUpdateTimer();\n\t\t}\n\t}", "public int getStartMinute() {\n return startMinute;\n }", "public void startTimer(long milliseconds, long roundLength, int roundNum,\n int numRounds) {\n sendMessage(Prefix.STARTTIME, milliseconds + \"#\" + roundLength + \"#\"\n + roundNum + \"#\" + numRounds);\n }", "public static void startTimerLabel()\n {\n {\n if (timeline != null) {\n timeline.stop();\n }\n timeSeconds.set(STARTTIME);\n //timeLabel.setText(timeSeconds.toString());\n timeline = new Timeline();\n //timeline.setCycleCount(timeline.INDEFINITE); // need this?\n\n timeline.getKeyFrames().add(\n new KeyFrame(Duration.seconds(STARTTIME+1),\n new EventHandler<ActionEvent>() {\n public void handle(ActionEvent event) {\n //System.out.println(\"Got Timer timeout.\");\n if (cancel == false) {\n SceneResultsTimed.updatePlayerScore();\n localStage.setScene(SceneMgr.getScene(SceneMgr.IDX_RESULTSTIMED));\n }\n }\n },\n new KeyValue(timeSeconds, 0)));\n timeline.playFromStart();\n }\n }", "public void setTime(int mins, int sec){\r\n this.Minutes = mins;\r\n this.Seconds = sec;\r\n }", "private void startTimer() {\n myTimer.start();\n enableGamePlayKeys();\n repaint();\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 synchronized void start() {\r\n\t\tif(type == TYPE_DELAY) {\r\n\t\t\tdate = new Date(System.currentTimeMillis() + delay);\r\n\t\t}\r\n\t\tif(started) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tstarted = true;\r\n\t\ttm.addStartedTimers(this);\t\t\r\n//\t\ttm.getHandler().post(new Runnable() {\r\n//\t\t\tpublic void run() {\r\n//\t\t\t\tdoCancel();\r\n//\t\t\t\tdoStart();\r\n//\t\t\t}\r\n//\t\t});\r\n\t}", "public void startFirstSampleTimer() {\n }", "public void setTimer(long ms) {\r\n\t\tthis.timer = ms;\r\n\t}", "private void startTimer(int startValue) {\n counts = startValue;\n timerTask = new TimerTask() {\n @Override\n public void run() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n counts++;\n TextView score = (TextView) findViewById(R.id.Score);\n score.setText(\"Time: \"+counts);\n boardManager.setLastTime(counts);\n saveToFile(\"save_file_\" +\n Board.NUM_COLS + \"_\" + LoginActivity.currentUser);\n }\n });\n }\n };\n timer.scheduleAtFixedRate(timerTask, new Date(), 1000);\n }", "@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tlong diff = ConstantUtil.setThreadStartTimer(\"01\",\"30\",null);\n\t\t\t\n\t\t\tif(diff<0){//凌晨1点30分之前则等待\n\t\t\t\tThread.sleep(0-diff);\n\t\t\t\tupdateMonthKline();\n\t\t\t}else{//凌晨1点30分后则立即启动\n\t\t\t\tupdateMonthKline();\n\t\t\t}\n\t\t\n\t\t\twhile (true){\n\t\t\t\tlong diff11 = ConstantUtil.setThreadStartTimer(\"01\",\"30\",null);\n\t\t\t\tThread.sleep(1000l*60*60*24-diff11);\n\t\t\t\tupdateMonthKline();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void start() {\n ActionListener listener = new TimePrinter();\n Timer t = new Timer(interval, listener);\n t.start();\n }", "protected void startEditingTimer() {\n\tif(timer == null) {\n\t timer = new Timer(1200, this);\n\t timer.setRepeats(false);\n\t}\n\ttimer.start();\n }", "public void startWait() {\n\t\tTimer timer = new Timer();\n\t\ttimer.schedule(new TimerTask() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tif (server.getNumberOfPlayers() > 0 && !server.gameStartFlag) {\n\t\t\t\t\tserver.runGame();\n\t\t\t\t}\n\t\t\t}\n\t\t}, 120000);\n\t\t// 2min(2*60*1000)\n\t\tsendMessage(\"The game will start 2 minute late\");\n\t}", "private void timerStart()\r\n { updateTimer.postDelayed(updateTimerTask, UPDATE_TIME); }", "void startUpdateTimer();", "private void startTiming() {\n m_startTime = Calendar.getInstance().getTimeInMillis();\n }", "public int getMinute() {\n return minute;\n }", "public void run()\n {\n while (threadRunning)\n {\n /*\n * As long as the timer is less than 99 minutes and 59 seconds then\n * increment just one per second. In the event that the timer runs\n * longer than that, start timer over at 0 seconds.\n */\n if (this.seconds < 6000)\n {\n this.seconds += 1;\n }\n else\n {\n this.seconds = 0;\n }\n //referring to the JLabel setText method for Timer\n setText(getFormattedTime(seconds));\n doNothing((long)1000); \n }\n }", "public Timer start() {\r\n timestamp = System.currentTimeMillis();\r\n return this;\r\n }", "public void start()\n {\n clock = new java.util.Timer();\n clock.schedule(\n new TimerTask() //This is really a new anonymous class, extending TimerTask.\n {\t\t\t\t\t //Since it has only one method, it seemed easiest to create it in line here.\n public void run() //Called by the Timer when scheduled.\n {\n timeElapsed++;\n if (timeElapsed > 999) //999 is the highest 3 digit integer, the highest number that can\n {\t\t\t\t\t\t\t //be shown on the displays. Beyond that, the player automatically loses.\n endGame(false);\n return;\n }\n repaint();\n }\n }\n \t\t\t, 1000, 1000); //1000 milliseconds, so a repeated 1 second delay.\n }", "public DateTimeFormatterBuilder appendSecondOfMinute(int minDigits) {\r\n return appendDecimal(DateTimeFieldType.secondOfMinute(), minDigits, 2);\r\n }", "public DateTimeFormatterBuilder appendMinuteOfDay(int minDigits) {\r\n return appendDecimal(DateTimeFieldType.minuteOfDay(), minDigits, 4);\r\n }", "public int getMinute() {\n return minute;\n }", "public void timer() {\r\n date.setTime(System.currentTimeMillis());\r\n calendarG.setTime(date);\r\n hours = calendarG.get(Calendar.HOUR_OF_DAY);\r\n minutes = calendarG.get(Calendar.MINUTE);\r\n seconds = calendarG.get(Calendar.SECOND);\r\n //Gdx.app.debug(\"Clock\", hours + \":\" + minutes + \":\" + seconds);\r\n\r\n buffTimer();\r\n dayNightCycle(false);\r\n }", "public void startTimer() {\n animationTimer = new AnimationTimer() {\n @Override\n public void handle(final long now) {\n videoController.update(now);\n if (videoController.isClosed()) {\n stopTimer();\n return;\n }\n roomController.update(now);\n timeLogController.update(now);\n }\n };\n timeLogController.clearInformationArea();\n animationTimer.start();\n }", "public final void setJam(){\nActionListener taskPerformer = new ActionListener() {\n\npublic void actionPerformed(ActionEvent evt) {\nString nol_jam = \"\", nol_menit = \"\",nol_detik = \"\";\n\njava.util.Date dateTime = new java.util.Date();\nint nilai_jam = dateTime.getHours();\nint nilai_menit = dateTime.getMinutes();\nint nilai_detik = dateTime.getSeconds();\n\nif(nilai_jam <= 9) nol_jam= \"0\";\nif(nilai_menit <= 9) nol_menit= \"0\";\nif(nilai_detik <= 9) nol_detik= \"0\";\n\nString jam = nol_jam + Integer.toString(nilai_jam);\nString menit = nol_menit + Integer.toString(nilai_menit);\nString detik = nol_detik + Integer.toString(nilai_detik);\n\nlblwktu.setText(jam+\":\"+menit+\":\"+detik+\"\");\n}\n};\nnew Timer(1000, taskPerformer).start();\n}", "public void uneMinuteDePlus() {\n\t\tthis.m = m+1 > 59 ? 0 : m+1;\n\t}", "public void setTimer(int timer) {\n this.timer = timer;\n }", "public void timer() throws InterruptedException {\n for (int i = sec; min >= -1; i--) {\n if (min == -1) {\n textField.setText(\"0:0\");\n freeze = true;\n break;\n }\n textField.setText(min + \":\" + i);\n if (i == 1) {\n min = min - 1;\n i = sec + 1;\n }\n Thread.sleep(1000);\n }\n }", "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 setTime()\n \t{\n \t\tif( !paused )\n \t\t{\n\t \t\tlong playingTime = System.currentTimeMillis() - startTime;\n\t \t\tlong timeLeft = 180000 - playingTime;\n\t \t\tlong min = timeLeft / 60000;\n\t \t\tlong sec = ( timeLeft - ( min * 60000 ) ) / 1000L;\n\t \t\t\n\t \t\tif( timeLeft < 0 )\n\t \t\t{\n\t \t\t\t//Game over!\n\t \t\t\tgameOver();\n\t \t\t\treturn;\n\t \t\t}\n\t \t\t\n\t \t\tString s = \"Time: \";\n\t \t\ts += Integer.toString( (int)min ) + \":\";\n\t \t\tif( sec >= 10 )\n\t \t\t\ts += Integer.toString( (int)sec );\n\t \t\telse\n\t \t\t\ts += \"0\" + Integer.toString( (int)sec );\n\t \t\t\n\t \t\ttimerLabel.setText( s );\n \t\t}\n \t}", "public void setTimer() {\n\t\t\n\t}", "public void start_handler_timer_task() {\n if (timertask != null) {\n return;\n }\n timertask = new Timer();\n timertask.scheduleAtFixedRate(new fyp002_Handler(), MOBILE_DELAY/2, MOBILE_INTERVAL/2);\n }", "public void setMinute(int minute) \n { \n if (minute < 0 || minute >= 60)\n throw new IllegalArgumentException(\"minute must be 0-59\");\n\n this.minute = minute; \n }", "public void setTime(double minutes) {\n\t\t// implement this method.\n\n\t}", "public void setMinutes(int minutes) {\n this.minutes = minutes;\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 void setMinute(int minute) {\n\t\tthis.minute = minute;\n\t}", "private void setTime() {\n \n new Timer(0, new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n Date d=new Date();\n SimpleDateFormat time=new SimpleDateFormat(\"hh:mm:ss a\");\n lblTime.setText(time.format(d));\n }\n }).start();\n \n \n }", "public GameTimer()\n \t{\n \t\tsuper();\n \t\tt = new Task();\n \t\tscheduleAtFixedRate( t, 0, 1000 );\n \t\tstartTime = System.currentTimeMillis();\n \t}", "@Override\n\tpublic void get_time_int(ShortHolder heure, ShortHolder min) {\n\t\t\n\t}", "private void IniciarCronometro() {\n ActionListener action = new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n currentSegundo++;\n\n if (currentSegundo == 60) {\n currentMinuto++;\n currentSegundo = 0;\n }\n\n if (currentMinuto == 60) {\n currentHora++;\n currentMinuto = 0;\n }\n\n String hr = currentHora <= 9 ? \"0\" + currentHora : currentHora + \"\";\n String min = currentMinuto <= 9 ? \"0\" + currentMinuto : currentMinuto + \"\";\n String seg = currentSegundo <= 9 ? \"0\" + currentSegundo : currentSegundo + \"\";\n\n lbcronometro.setText(hr + \":\" + min + \":\" + seg);\n tempo = hr + \":\" + min + \":\" + seg;\n }\n };\n this.timer = new Timer(velocidade, action);\n this.timer.start();\n }", "public void startTime() {\n\t\tthis.clock.start();\n\t}" ]
[ "0.7086723", "0.6920566", "0.6916064", "0.6833789", "0.68063784", "0.68058187", "0.67568606", "0.674621", "0.67224467", "0.66963756", "0.6695356", "0.6683474", "0.66651875", "0.6613604", "0.658991", "0.65492374", "0.651588", "0.64887625", "0.64832973", "0.6470042", "0.64650476", "0.6447266", "0.6436866", "0.6415522", "0.63848674", "0.6382807", "0.6372118", "0.636842", "0.63630664", "0.6352296", "0.633759", "0.63366735", "0.6329695", "0.63282746", "0.62764436", "0.62594986", "0.62282175", "0.61743027", "0.6156447", "0.6152664", "0.6125911", "0.6119406", "0.611207", "0.6101542", "0.60929817", "0.60826516", "0.6077636", "0.60736144", "0.6064969", "0.6053067", "0.6045053", "0.6007917", "0.6004402", "0.59768414", "0.5970865", "0.59365034", "0.59350985", "0.5931641", "0.59147936", "0.5912597", "0.5908456", "0.59005016", "0.58994687", "0.5891206", "0.5888665", "0.5888577", "0.58798033", "0.585748", "0.5834279", "0.5814979", "0.58122015", "0.5809048", "0.58084065", "0.5803311", "0.5802146", "0.5785421", "0.5778616", "0.57626754", "0.57609683", "0.5752644", "0.5749128", "0.57402974", "0.57381314", "0.57315975", "0.5730679", "0.5727496", "0.5716918", "0.5711349", "0.5701952", "0.56979924", "0.56815386", "0.56808966", "0.5676589", "0.56758875", "0.5649217", "0.5646181", "0.5630361", "0.5602878", "0.5600296", "0.5594211" ]
0.7991502
0
Disegna montagne e nuvole
public void render(SpriteBatch batch){ montagne.render(batch); nuvole.render(batch); //disegniamo tutti gli oggetti di gioco for(MonetaDOro m:monete){ m.render(batch); } for(MonetaBlu m:moneteBlu){ m.render(batch); } for(Stella s:stelle){ s.render(batch); } for(Calamita c : calamite){ c.render(batch); } for(Scudo s : scudi){ s.render(batch); } for(Bomba b : bombe){ b.render(batch); } for(Nemico n:nemici){ n.render(batch); } missile.render(batch); if(countdown>0){ Oggetti.getInstance().fonts.goFont.draw(batch, "Go!", 59, 25); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void gastarDinero(double cantidad){\r\n\t\t\r\n\t}", "public abstract void debiterMontant( double montant);", "void MontaValores(){\r\n // 0;0;-23,3154166666667;-51,1447783333333;0 // Extrai os valores e coloca no objetos\r\n // Dis;Dir;Lat;Long;Velocidade\r\n // Quebra de Rota lat=-999.999 long=-999.999 ==> Marca ...\r\n \r\n int ind=0;\r\n NMEAS=NMEA.replace(\",\" , \".\");\r\n \r\n //1)\r\n dists=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind));\r\n Distancia=Double.valueOf(dists);\r\n ind=ind+dists.length()+1;\r\n \r\n //2)\r\n dirs=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind+1));\r\n Direcao=Double.valueOf(dirs);\r\n ind=ind+dirs.length()+1;\r\n \r\n //3)\r\n lats=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind+1));\r\n Lat=Double.valueOf(lats);\r\n ind=ind+lats.length()+1;\r\n \r\n //4)\r\n longs=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind+1));\r\n Long=Double.valueOf(longs);\r\n ind=ind+longs.length()+1;\r\n \r\n //5)\r\n vels=NMEAS.substring(ind,NMEAS.length());\r\n // Transforma de Knots para Km/h\r\n Velocidade=Double.valueOf(vels)/100*1.15152*1.60934;\r\n vels=String.valueOf(Velocidade);\r\n ind=ind+vels.length()+1;\r\n \r\n }", "private void nourrireLePeuple() {\n\t\t\tint totalDepense = (int)((population * 1) + (populationColoniale * 0.8) + ((armee + armeeDeployee()) * nourritureParArmee));\r\n\t\t\tnourriture -= totalDepense;\r\n\t\t\tenFamine = (nourriture > 0) ? false : true;\r\n\t\t}", "private void laskeMatkojenPituus() {\n matkojenpituus = 0.0;\n\n for (Matka m : matkat) {\n matkojenpituus += m.getKuljettumatka();\n }\n\n }", "public void calculEtatSuccesseur() { \r\n\t\tboolean haut = false,\r\n\t\t\t\tbas = false,\r\n\t\t\t\tgauche = false,\r\n\t\t\t\tdroite = false,\r\n\t\t\t\thautGauche = false,\r\n\t\t\t\tbasGauche = false,\r\n\t\t\t\thautDroit = false,\r\n\t\t\t\tbasDroit = false;\r\n\t\t\r\n\t\tString blanc = \" B \";\r\n\t\tString noir = \" N \";\r\n\t\tfor(Point p : this.jetonAdverse()) {\r\n\t\t\tString [][]plateau;\r\n\t\t\tplateau= copieEtat();\r\n\t\t\tint x = (int) p.getX();\r\n\t\t\tint y = (int) p.getY();\r\n\t\t\tif(this.joueurActuel.getCouleur() == \"noir\") { //dans le cas ou le joueur pose un pion noir\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) { //on regarde uniquement le centre du plateaau \r\n\t\t\t\t\t//on reinitialise x,y et plateau a chaque étape\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tdroite = getDroite(x,y,blanc);\r\n\t\t\t\t\thaut = getHaut(x, y, blanc);\r\n\t\t\t\t\tbas = getBas(x, y, blanc);\r\n\t\t\t\t\tgauche = getGauche(x, y, blanc);\r\n\t\t\t\t\thautDroit = getDiagHautdroite(x, y, blanc);\r\n\t\t\t\t\thautGauche = getDiagHautGauche(x, y, blanc);\r\n\t\t\t\t\tbasDroit = getDiagBasDroite(x, y, blanc);\r\n\t\t\t\t\tbasGauche = getDiagBasGauche(x, y, blanc);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y-1]==noir) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(droite) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//1\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==noir) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(bas) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==noir) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(gauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(haut) {\r\n\t\t\t\t\t\t\t//System.out.println(\"regarde en dessous\");\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==noir) {\r\n\t\t\t\t\t\tif(hautGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(basGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\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}//6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit : OK!\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(hautDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\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}//7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==noir) {\r\n\t\t\t\t\t\tif(basDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t//System.out.println(\"ajouté!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {//si le joueur actuel a les pions blanc\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x][y-1]==blanc) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(getDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t}//1.1\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==blanc) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getBas(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2.2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==blanc) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getGauche(x, y, noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3.3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == blanc) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getHaut(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4.4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5.5\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//6.6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautdroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//7.7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8.8\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}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void Millas_M(){\r\n System.out.println(\"Cálcular Metros o Kilometros de Millas Marinas\");\r\n System.out.println(\"Ingrese un valor en Millas Marinas\");\r\n cadena =numero.next(); \r\n valor = metodo.Doble(cadena);\r\n valor = metodo.NegativoD(valor);\r\n totalM = valor * 1852 ;\r\n Millas_KM(totalM);\r\n }", "public static void promedio(int [] Grado1, int NNEstudent){\nint aux=0;\nfor(int i=0;i<NNEstudent;i++){\naux=Grado1[i]+aux;}\nint promedio;\npromedio=aux/NNEstudent;\nSystem.out.println(aux);\nSystem.out.println(\"el promedio de las edades es:\");\nSystem.out.println(promedio);\n}", "double objetosc() {\n return dlugosc * wysokosc * szerokosc; //zwraca obliczenie poza metode\r\n }", "public void Semantica() {\r\n int var, etq;\r\n double marca, valor;\r\n double[] punto = new double[3];\r\n double[] punto_medio = new double[2];\r\n\r\n /* we generate the fuzzy partitions of the variables */\r\n for (var = 0; var < n_variables; var++) {\r\n marca = (extremos[var].max - extremos[var].min) /\r\n ((double) n_etiquetas[var] - 1);\r\n for (etq = 0; etq < n_etiquetas[var]; etq++) {\r\n valor = extremos[var].min + marca * (etq - 1);\r\n BaseDatos[var][etq].x0 = Asigna(valor, extremos[var].max);\r\n valor = extremos[var].min + marca * etq;\r\n BaseDatos[var][etq].x1 = Asigna(valor, extremos[var].max);\r\n BaseDatos[var][etq].x2 = BaseDatos[var][etq].x1;\r\n valor = extremos[var].min + marca * (etq + 1);\r\n BaseDatos[var][etq].x3 = Asigna(valor, extremos[var].max);\r\n BaseDatos[var][etq].y = 1;\r\n BaseDatos[var][etq].Nombre = \"V\" + (var + 1);\r\n BaseDatos[var][etq].Etiqueta = \"E\" + (etq + 1);\r\n }\r\n }\r\n }", "public void muovi() {\n\n for (int i = punti; i > 0; i--) {\n x[i] = x[(i - 1)];\n y[i] = y[(i - 1)];\n }\n\n if (sinistra) {\n x[0] -= DIMENSIONE_PUNTO;\n }\n\n if (destra) {\n x[0] += DIMENSIONE_PUNTO;\n }\n\n if (su) {\n y[0] -= DIMENSIONE_PUNTO;\n }\n\n if (giu) {\n y[0] += DIMENSIONE_PUNTO;\n }\n }", "public void nourrir() {\n if (!autoriseOperation()) {\n return;\n }\n\n incrFaim(-2);\n incrPoids(1);\n incrHumeur(1);\n incrXp(1);\n\n System.out.println(tamagoStats.getXp());\n setChanged();\n notifyObservers();\n\n }", "double getPerimetro(){\n return 2 * 3.14 * raggio;\n }", "public static void main(String[] args) {\n int numeros[] = {2, 3, 4, 2, 4, 5, 6, 2, 1, 2};\n //Creamos segundo arreglo con iguall tamaño que el arreglo nùmeros\n int cuadrados[] = new int[numeros.length];\n //Arreglo para almacenar el proceso de la operación\n String procesos[] = new String[numeros.length];\n //Creamos ciclo de repeticiòn para recorrer arreglo \n for (int indice = 0; indice < numeros.length; indice++) {\n int cuadrado = numeros[indice] * numeros[indice];\n //Almacenamos el proceso de la opreaciòn en el arreglo cuadrados\n cuadrados[indice] = cuadrado;\n \n //Almacenar resultado en el arreglo procesos\n procesos[indice] = numeros[indice] + \"x\" + numeros[indice];\n }\n //Ciclo de repetición para mostrar arreglos\n String print_numeros = \"numeros - \";\n String print_cuadrados = \"cuadrados - \";\n String print_procesos = \"procesoss - \";\n for (int indice = 0; indice < numeros.length; indice++) {\n print_numeros = print_numeros + numeros[indice] + \", \";\n print_cuadrados = print_cuadrados + cuadrados[indice] + \", \";\n print_procesos = print_procesos + procesos[indice] + \", \";\n\n }\n System.out.println(print_numeros);\n System.out.println(print_cuadrados);\n System.out.println(print_procesos);\n \n //suma solo numeros pares\n int acumulador_pares=0;\n for (int indice = 0; indice < 10; indice++) {\n boolean par= detectar_par(numeros[indice]);\n if (par == true) {\n acumulador_pares = acumulador_pares + numeros[indice];\n \n }\n }\n System.out.println(\"La suma de los nùmeros pares es: \"+acumulador_pares);\n \n }", "public double portataMassicaFumi( ){\r\n\t\treturn portatamassica;\r\n\t}", "public void ajouterMontant( double montant){\r\n\t\tthis.solde += montant;\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tScanner tastatura = new Scanner(System.in);\r\n\t\tint pismo = 0;\r\n\t\tint brojBacanja = 0;\r\n\t\tint ishodBacanja = 0;\r\n\t\tint brojPisma = 0;\r\n\t\tint brojGlava = 0;\r\n//\t\tdouble kolicnkZaPismo = (double) brojPisma/brojBacanja;\r\n//\t\tdouble kolicnikZaGlavu = (double) brojGlava/brojBacanja;\r\n\t\t//ne moze ovde\r\n\t\t\r\n\t\twhile (true) {\r\n\t\t\tSystem.out.print(\"Koliko puta zelite da bacite novcic: \");\r\n\t\t\tbrojBacanja = tastatura.nextInt();\r\n\t\t\t\r\n\t\t\tif(brojBacanja == 0) break; \r\n\t\t\t\tbrojPisma = 0;\r\n\t\t\t\tbrojGlava = 0;\r\n\t\t\r\n\t\t\tfor (int i = 0; i<brojBacanja; i++) {\r\n\t\t\t\tishodBacanja = (int) (Math.random() + 0.5);\r\n\t\t\t\tif(ishodBacanja == pismo)\r\n\t\t\t\t\tbrojPisma++; \r\n\t\t\t\t\t//++ znaci ako je u zagradi tacno izvrsava se to nesti++\r\n\t\t\t\telse \r\n\t\t\t\t\tbrojGlava++;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdouble kolicnkZaPismo = (double) brojPisma/brojBacanja; //obavezno 2x double\r\n\t\t\tdouble kolicnikZaGlavu = (double) brojGlava/brojBacanja;\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Kolicnik za pisma: \" + kolicnkZaPismo);\r\n\t\t\tSystem.out.println(\"Kolicnik za glavu: \" + kolicnikZaGlavu);\r\n\t\t\tSystem.out.println(\"Pismo je palo \" + brojPisma +\" puta\");\r\n\t\t\tSystem.out.println(\"Glava je pala \" + brojGlava + \" puta\");\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"***Za izlaz ukucajte 0 ***\");\r\n\t\t\t\r\n// u zadatku\t\t\t\r\n//\t\t\tSystem.out.print(\"Broj pisma Broj glava\");\r\n//\t\t\tSystem.out.print(\" Broj pisma / Broj bacanja\");\r\n//\t\t\tSystem.out.println(\" Broj glava / Broj bacanja\");\r\n//\t\t\t\r\n//\t\t\tSystem.out.printf(\"%8d %12d %17.2f %25.2f\\n \" , \r\n//\t\t\t\t\tbrojPisma, brojGlava,\r\n//\t\t\t\t\t(double) brojPisma / brojBacanja,\r\n//\t\t\t\t\t(double) brojGlava / brojBacanja);\r\n\t\t}\r\n\t}", "public double dlugoscOkregu() {\n\t\treturn 2 * Math.PI * promien;\n\t}", "private double determinanteCuadrada(){\n\t\tdouble deter = 1;\n\t\tdouble [][] matriz = this.clone().getComponentes();\n\t\t\t\t\n\t\tfor(int i=0;i<this.dimensionCol;i++){\n\t\t\tif(matriz[i][i]==0){\n\t\t\t\tif(this.intercambiarConRenglonNoNuloPorDebajo(matriz, i)==true){\n\t\t\t\t\tdeter *= (-1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.llevarACeroPosicionesPorDebajo(matriz, i);\n\t\t\tdeter*=matriz[i][i];\n\t\t}\n\t\t\t\t\n\t\treturn deter;\n\t}", "public int fondMagasin(){\n\tint total =this.jeton;\n\tfor(Caisse c1 : this.lesCaisses){\n\ttotal = c1.getTotal()+total;\n\t}\n\treturn total;\n}", "public double calcularCantidadGasolinaNecesaria()\n\t{\n\t\tif(alojamiento == null)\n\t\t\treturn 0;\n\t\t\n\t\telse \n\t\t\treturn alojamiento.darDistancia()/capacidadKilometrosPorGalon;\n\t}", "public static void main(String[] args) {\n System.out.println(\"Test de la partie 1:\");\n System.out.println(\"--------------------\");\n\n Position position1 = new Position(0, 1);\n Position position2 = new Position(1, 0);\n Position position3 = new Position(1, 1);\n\n Neurone neuron1 = new Neurone(position1, 0.5);\n Neurone neuron2 = new Neurone(position2, 1.0);\n Neurone neuron3 = new Neurone(position3, 2.0);\n\n neuron1.connexion(neuron2);\n neuron2.connexion(neuron3);\n neuron1.recoitStimulus(10);\n\n System.out.println(\"Signaux : \");\n System.out.println(neuron1.getSignal());\n System.out.println(neuron2.getSignal());\n System.out.println(neuron3.getSignal());\n\n System.out.println();\n System.out.println(\"Premiere connexion du neurone 1\");\n System.out.println(neuron1.getConnexion(0));\n\n\n // FIN TEST DE LA PARTIE 1\n\n // TEST DE LA PARTIE 2\n System.out.println(\"Test de la partie 2:\");\n System.out.println(\"--------------------\");\n\n Position position5 = new Position(0, 0);\n NeuroneCumulatif neuron5 = new NeuroneCumulatif(position5, 0.5);\n neuron5.recoitStimulus(10);\n neuron5.recoitStimulus(10);\n System.out.println(\"Signal du neurone cumulatif -> \" + neuron5.getSignal());\n\n // FIN TEST DE LA PARTIE 2\n\n // TEST DE LA PARTIE 3\n System.out.println();\n System.out.println(\"Test de la partie 3:\");\n System.out.println(\"--------------------\");\n Cerveau cerveau = new Cerveau();\n\n // parametres de construction du neurone:\n // la position et le facteur d'attenuation\n cerveau.ajouterNeurone(new Position(0,0), 0.5);\n cerveau.ajouterNeurone(new Position(0,1), 0.2);\n cerveau.ajouterNeurone(new Position(1,0), 1.0);\n\n // parametres de construction du neurone cumulatif:\n // la position et le facteur d'attenuation\n cerveau.ajouterNeuroneCumulatif(new Position(1,1), 0.8);\n cerveau.creerConnexions();\n cerveau.stimuler(0, 10);\n\n System.out.println(\"Signal du 3eme neurone -> \" + cerveau.sonder(3));\n System.out.println(cerveau);\n // FIN TEST DE LA PARTIE 3\n }", "public abstract Double getMontant();", "public static void main(String[] args) {\n float nuevo=0,suma=0,prom=0;\n System.out.println(\"programa para sacar promedio\");\n Scanner n = new Scanner(System.in);\n System.out.println(\"ingrese la contidad de nota\");\n int notas =n.nextInt();\n for (int i = 1; i <= notas; i++){\n Scanner o = new Scanner(System.in);\n System.out.println(\"ingrese la nota obtenida \" + \"{\"+i+\"}:\");\n nuevo = o.nextFloat();\n suma= suma+nuevo;\n prom= suma/notas;\n }\n System.out.println(\"la suma es: \" +suma);\n System.out.println(\"el promedio es: \" +prom);\n }", "public static void Promedio(){\n int ISumaNotas=0;\n int IFila=0,ICol=0;\n int INota;\n float FltPromedio;\n for(IFila=0;IFila<10;IFila++)\n {\n ISumaNotas+=Integer.parseInt(StrNotas[IFila][1]);\n }\n FltPromedio=ISumaNotas/10;\n System.out.println(\"El promedio de la clase es:\"+FltPromedio);\n }", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "int calculaX(){\n int n;\n if(pratonl[0][0]==pquesol[0][0]){//evalua si esta en la misma fila\n n=0;\n }else{\n n=pquesol[0][0]-pratonl[0][0]; \n }\n return n;\n }", "public static void main(String[] args) {\n\t\tint n = 4;\t// Kontejneri\n\t\tint k = 1;\t// Kapacitet\n\t\tint prvi = n / k; // Provjera da li se svi mogu sloziti jedan u drugi (djeljivost sa 2)\n\t\tint exponent; // Jedini brojevi djeljivi sa 2 do kraja (slaganja kontejnera)\n\t\tint dodatni; // Koliko treba dodatnih\n\t\tfor (int i = 1; i > 0;) { // Racunaj eksponent 2 do kraja int vrijednosti...\n\t\t\ti = i * 2;\n\t\t\texponent = i;\n\t\t\tif (prvi == exponent) {\n\t\t\t\tSystem.out.println(\"Ne treba\");\n\t\t\t\tbreak;\n\t\t\t} else if (prvi != exponent) { // Ako se ne mogu sloziti do kraja, uzmi slijedeci veci eksponent od broj kontejnera i daj ostatak djeljenja, to su dodatne kutije.\n\t\t\t\tif (2 < n && n < 4) {\n\t\t\t\t\tdodatni = 4 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else if (prvi != exponent && 4 < n && n < 8) {\n\t\t\t\t\tdodatni = 8 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else if (prvi != exponent && 8 < n && n < 16) {\n\t\t\t\t\tdodatni = 16 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else if (prvi != exponent && 16 < n && n < 32) {\n\t\t\t\t\tdodatni = 32 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t\tbreak;\n\t\t\t\t} else if (prvi != exponent && 32 < n && n < 64) {\n\t\t\t\t\tdodatni = 64 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else if (prvi != exponent && 64 < n && n < 128) {\n\t\t\t\t\tdodatni = 128 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else if (prvi != exponent && 128 < n && n < 256) {\n\t\t\t\t\tdodatni = 256 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else if (prvi != exponent && 256 < n && n < 512) {\n\t\t\t\t\tdodatni = 512 % n;\n\t\t\t\t\tSystem.out.printf(\"Mujo treba %d dodatnih kontejnera\",\n\t\t\t\t\t\t\tdodatni);\n\t\t\t\t} else { // U suprotno, djeljenje kontejnera i kapaciteta je jednako eksponentu 2 i ne treba doadatnih.\n\t\t\t\t\tSystem.out.println(\"Ne treba dodatnih kontejnera.\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}", "public double getNajmensie() {\n\t\tif ((cislo1 <= cislo2) && (cislo1 <= cislo3)) {\n\t\t\ttretie = cislo1;\n\t\t} else if ((cislo2 <= cislo1) && (cislo2 <= cislo3)) {\n\t\t\ttretie = cislo2;\n\t\t} else if ((cislo3 <= cislo1) && (cislo3 <= cislo2)) {\n\t\t\ttretie = cislo3;\n\t\t}\n\t\treturn tretie;\n\t}", "public void calcularIndicePlasticidad(){\r\n\t\tindicePlasticidad = limiteLiquido - limitePlastico;\r\n\t}", "public static void main(String[] args) { \n /* Grafo grafo = new Grafo();\n \n No no;\n no = new No(\"1\");//0\n grafo.addNo(no);\n no = new No(\"2\");//1\n grafo.addNo(no);\n no = new No(\"3\");//2\n grafo.addNo(no);\n no = new No(\"4\");//3\n grafo.addNo(no);\n no = new No(\"5\");//4\n grafo.addNo(no);\n no = new No(\"6\");//5\n grafo.addNo(no);\n no = new No(\"7\");//6\n grafo.addNo(no);\n \n //Cria as arestas do nó\n \n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(1), 2);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(2), 5);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(3), 4);\n Aresta.inserirAresta(grafo.getNo(1), grafo.getNo(2), 2);\n Aresta.inserirAresta(grafo.getNo(1), grafo.getNo(4), 7);\n Aresta.inserirAresta(grafo.getNo(2), grafo.getNo(3), 1);\n Aresta.inserirAresta(grafo.getNo(2), grafo.getNo(4), 4);\n Aresta.inserirAresta(grafo.getNo(2), grafo.getNo(5), 3);\n Aresta.inserirAresta(grafo.getNo(3), grafo.getNo(5), 4);\n Aresta.inserirAresta(grafo.getNo(4), grafo.getNo(5), 1);\n Aresta.inserirAresta(grafo.getNo(4), grafo.getNo(6), 5);\n Aresta.inserirAresta(grafo.getNo(5), grafo.getNo(6), 7);\n \n No no;\n no = new No(\"SF\");//0\n grafo.addNo(no);\n no = new No(\"LA\");//1\n grafo.addNo(no);\n no = new No(\"D\");//2\n grafo.addNo(no);\n no = new No(\"C\");//3\n grafo.addNo(no);\n no = new No(\"A\");//4\n grafo.addNo(no);\n no = new No(\"B\");//5\n grafo.addNo(no);\n no = new No(\"NY\");//6\n grafo.addNo(no);\n no = new No(\"M\");//7\n grafo.addNo(no);\n \n \n //Cria as arestas do nó\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(1), 39);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(2), 89);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(3), 120);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(6), 210);\n Aresta.inserirAresta(grafo.getNo(1), grafo.getNo(2), 50);\n Aresta.inserirAresta(grafo.getNo(1), grafo.getNo(6), 170);\n Aresta.inserirAresta(grafo.getNo(2), grafo.getNo(3), 65);\n Aresta.inserirAresta(grafo.getNo(3), grafo.getNo(5), 79);\n Aresta.inserirAresta(grafo.getNo(3), grafo.getNo(6), 59);\n Aresta.inserirAresta(grafo.getNo(3), grafo.getNo(4), 99);\n Aresta.inserirAresta(grafo.getNo(4), grafo.getNo(6), 80);\n Aresta.inserirAresta(grafo.getNo(4), grafo.getNo(7), 70);\n Aresta.inserirAresta(grafo.getNo(5), grafo.getNo(6), 20);\n Aresta.inserirAresta(grafo.getNo(6), grafo.getNo(7), 66);*/\n \n Grafo grafo = GrafoAleatorioKruskal.gerar(1000, 10, 10, 100);\n //Gera a arvore geradora com custo minimo\n grafo.kruskal();\n \n //TESTE\n int teste = grafo.getNo(0).getConjunto();\n boolean answer = true;\n for(No n : grafo.getNos()){\n if (teste!= n.getConjunto()){\n answer = false;\n }\n }\n if(answer){\n System.out.println(\"Todos os nós pertecem ao mesmo conjunto\");\n }\n else{\n System.out.println(\"Deu erro\");\n }\n }", "@Override\n public Coup meilleurCoup(Plateau _plateau, Joueur _joueur, boolean _ponder) {\n \n _plateau.sauvegardePosition(0);\n \n /* On créé un noeud père, qui est le noeud racine de l'arbre. On définit arbitrairement le joueur associé (\n (0 ou 1, il importe peu de savoir quel joueur correspond à ce nombre, cette information étant déjà portée par \n j1 et j2 dans l'algorithme. Le tout est de faire alterner cette valeur à chaque niveau de l'arbre. */\n \n Noeud pere = new Noeud();\n pere.joueurAssocie = 0;\n \n // On définit ici c, le coefficient d'arbitrage entre exploration et exploitation. Ce dernier est théroquement optimal pour una valeur égale à sqrt(2).\n \n double c = 10 * Math.sqrt(2);\n double[] resultat = new double[2];\n \n // Conditions de fonctionnement par itération\n \n //int i = 1;\n //int nbTours = 10000;\n \n //while(i <= nbTours){\n \n // Conditions de fonctionnement en mode \"compétition\" (100 ms pour se décider au maximum).\n \n long startTime = System.currentTimeMillis();\n \n while((System.currentTimeMillis()-startTime) < 100){\n\n // La valeur résultat ne sert à rien fondamentalement ici, elle sert uniquement pour le bon fonctionnement de l'algorithme en lui même.\n // On restaure le plateau à chaque tour dans le MCTS (Sélection - Expension - Simulation - Backpropagation). \n \n resultat = MCTS(pere, _plateau, this.j_humain, this.j_ordi, c, this.is9x9, this.methodeSimulation);\n _plateau.restaurePosition(0);\n \n //i++;\n }\n\n // On doit maintenant choisir le meilleur coup parmi les fils du noeud racine, qui correspondent au coup disponibles pour l'IA.\n \n double maxValue = 0;\n int maxValueIndex = 0;\n \n for(int j = 0; j < pere.fils.length; j++){\n \n double tauxGain = ((double)pere.fils[j].nbPartiesGagnees / (double)pere.fils[j].nbPartiesJouees);\n\n // On choisirat le coup qui maximise le taux de gain des parties simulées.\n \n if(tauxGain >= maxValue){\n maxValueIndex = j;\n maxValue = tauxGain;\n \n }\n }\n \n // On retourne le coup associé au taux de gain le plus élevé.\n\n return pere.fils[maxValueIndex].coupAssocie;\n }", "int aDonde(int x,int y,int x1,int y1){\n \n int m;\n //revision si la posicion del queso es la misma que la del raton \n if(llegue(x,y,x1,y1)==1){\n System.out.println(\"llegue al queso\");\n // retrazo.stop();\n //GB=10; \n return 5;\n }else{\n if(x1==x){//movimiento horizontal en la misma fila \n //System.out.println(\"\");\n m=moverseY(y,y1);//si 0 a la izquierda 1 a la derecha \n \n if(m==0){\n System.out.println(\"el raton se tiene que mover hacia la Izquierda\");\n return 4;\n }else{\n System.out.println(\"el raton se tiene que mover hacia la Derecha\");\n return 2;\n }\n }else{\n if(x1<x){//movimiento hacia arriba\n System.out.println(\"el raton se tiene que mover hacia Arriba\");\n return 1;\n }else{//movimiento hacia abajo\n System.out.println(\"el raton se tiene que mover hacia Abajo\");\n return 3;\n }\n }//fin arriba y abajo\n } //fin if movimiento horizontal \n }", "double getDiametro(){\n return raggio * 2;\n }", "@Override\n\tpublic double mangeViande() {\n\t\treturn quantiteViande*this.getPoids();\n\t}", "public void calcular()\r\n/* 530: */ {\r\n/* 531:556 */ this.facturaProveedorSRI.setMontoIva(this.facturaProveedorSRI.getBaseImponibleDiferenteCero().multiply(\r\n/* 532:557 */ ParametrosSistema.getPorcentajeIva().divide(BigDecimal.valueOf(100L))));\r\n/* 533: */ }", "public static void dodavanjeTeretnogVozila() {\n\t\tString vrstaVozila = \"Teretno Vozilo\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = UtillMethod.izabirGoriva();\n\t\tGorivo gorivo2 = UtillMethod.izabirGorivaOpet(gorivo);\n\t\tint brServisa = 1;\n\t\tdouble potrosnja = UtillMethod.unesiteDoublePotrosnja();\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 20000;\n\t\tdouble cenaServisa = 10000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tSystem.out.println(\"Unesite broj sedista u vozilu:\");\n\t\tint brSedista = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite broj vrata vozila:\");\n\t\tint brVrata = UtillMethod.unesiteInt();\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tif(gorivo2!=Main.nista) {\n\t\t\tgorivaVozila.add(gorivo2);\n\t\t}\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tSystem.out.println(\"Unesite maximalnu masu koje vozilo moze da prenosi u KG !!\");\n\t\tint maxMasauKg = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite maximalnu visinu u m:\");\n\t\tdouble visinauM = UtillMethod.unesiteBroj();\n\t\tTeretnaVozila vozilo = new TeretnaVozila(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja, predjeno, preServisa,\n\t\t\t\tcenaServisa, cenaDan, brSedista, brVrata, vozObrisano, servisiNadVozilom, maxMasauKg, visinauM);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"--------------------------------------\");\n\t}", "@Override\n\tpublic double DienTich() {\n\t\treturn (canhGoc*canhGoc);\n\t}", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tdouble [] [] notasAlunos = new double[2][4];\r\n\t\t\r\n\t\tnotasAlunos [0][0]= 10;\r\n\t\tnotasAlunos [0][1]= 4;\r\n\t\tnotasAlunos [0][2]= 6.9;\r\n\t\tnotasAlunos [0][3]= 8;\r\n\t\t\r\n\r\n\t\tnotasAlunos [1][0]= 9.7;\r\n\t\tnotasAlunos [1][1]= 4;\r\n\t\tnotasAlunos [1][2]= 5;\r\n\t\tnotasAlunos [1][3]= 10;\r\n\r\n\t\tdouble soma = 0;\r\n\t\t\r\n\t\t\r\n\t\tfor (int i = 0; i < notasAlunos.length; i++) {\r\n\t\t\t//System.out.print(notasAlunos[i]+\" \");\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < notasAlunos[i].length; j++) {\r\n\t\t\t\tSystem.out.print(notasAlunos[i][j]+ \" - \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\tSystem.out.println(\"Caluclando a media: \");\r\n\t\t\r\n\t\tfor (int i = 0; i < notasAlunos.length; i++) {\r\n\t\t\tsoma = 0;//inicializando a soma para a proxima iteração\r\n\t\t\tfor (int j = 0; j < notasAlunos[i].length; j++) {\r\n\t\t\t//\tSystem.out.print(notasAlunos[i][j]+ \" - \");\r\n\t\t\t\tsoma += notasAlunos[i][j];\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"A media do aluno \"+(i+1)+ \" é \"+ (soma/4));\r\n\t\t}\r\n\t\r\n\r\n\t}", "public void carroPulando() {\n\t\tpulos++;\n\t\tpulo = (int) (PULO_MAXIMO/10);\n\t\tdistanciaCorrida += pulo;\n\t\tif (distanciaCorrida > distanciaTotalCorrida) {\n\t\t\tdistanciaCorrida = distanciaTotalCorrida;\n\t\t}\n\t}", "public void notaFinal() {\n\n for (int i = 0; i <= (nombres.size() - 1); i++) {\n\n notaFinal.add((notas.get(0) + notas.get(1) + notas.get(2)) / 3);\n\n }\n\n }", "private void obtenerGastosDiariosMes() {\n\t\t// Obtenemos las fechas actuales inicial y final\n\t\tCalendar calendar = Calendar.getInstance();\n calendar.setTime(new Date());\n int diaFinalMes = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\n\t\tList<Movimiento> movimientos = this.movimientoService.obtenerMovimientosFechaUsuario(idUsuario, LocalDate.of(LocalDate.now().getYear(),LocalDate.now().getMonthValue(),1),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLocalDate.of(LocalDate.now().getYear(),LocalDate.now().getMonthValue(), diaFinalMes));\n\t\tList<Double> listaGastos = new ArrayList<Double>();\n\t\tList<String> listaFechas = new ArrayList<String>();\n\t\t\n\t\tDate fechaUtilizadaActual = null;\n\t\tdouble gastoDiario = 0;\n\t\t\n\t\tfor (Iterator iterator = movimientos.iterator(); iterator.hasNext();) {\n\t\t\tMovimiento movimiento = (Movimiento) iterator.next();\n\t\t\tif(fechaUtilizadaActual == null) { //Comprobamos si se acaba de entrar en el bucle para inicializar la fecha del movimiento\n\t\t\t\tfechaUtilizadaActual = movimiento.getFecha();\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Si hemos cambiado de fecha del movimiento se procede a guardar los datos recogidos\n\t\t\tif(!fechaUtilizadaActual.equals(movimiento.getFecha())) {\n\t\t\t\tlistaGastos.add(gastoDiario);\n\t\t\t\tlistaFechas.add(fechaUtilizadaActual.getDate()+\"/\"+Utils.getMonthForInt(fechaUtilizadaActual.getMonth()).substring(0, 3));\n\t\t\t\tgastoDiario = 0; // Reiniciamos el contador del gasto\n\t\t\t\tfechaUtilizadaActual = movimiento.getFecha(); // Almacenemos la fecha del nuevo gasto\n\t\t\t}\n\t\t\t\n\t\t\t// Si el movimiento que se ha realizado es un gasto lo sumamos al contador de gasto\n\t\t\tif(movimiento.getTipo().equals(TipoMovimiento.GASTO)) {\n\t\t\t\tgastoDiario += movimiento.getCantidad();\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Comprobamos si es el ultimo item del iterador y almacenamos sus datos\n\t\t\tif(!iterator.hasNext()) {\n\t\t\t\tlistaGastos.add(gastoDiario);\n\t\t\t\tlistaFechas.add(fechaUtilizadaActual.getDate()+\"/\"+Utils.getMonthForInt(fechaUtilizadaActual.getMonth()).substring(0, 3));\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tthis.listadoGastosDiariosDiagrama = new Double[listaGastos.size()];\n\t\tthis.listadoGastosDiariosDiagrama = listaGastos.toArray(this.listadoGastosDiariosDiagrama);\n\t\tthis.fechasDiagrama = new String[listaFechas.size()];\n\t\tthis.fechasDiagrama = listaFechas.toArray(this.fechasDiagrama);\n\t\t\n\t}", "private double equation(long n) {\n\t\treturn (4d * montoCarlo(n) / n);\n\t}", "public void eisagwgiGiatrou() {\n\t\t// Elegxw o arithmos twn iatrwn na mhn ypervei ton megisto dynato\n\t\tif(numOfDoctors < 100)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tdoctor[numOfDoctors] = new Iatros();\n\t\t\tdoctor[numOfDoctors].setFname(sir.readString(\"DWSTE TO ONOMA TOU GIATROU: \")); // Pairnei apo ton xristi to onoma tou giatrou\n\t\t\tdoctor[numOfDoctors].setLname(sir.readString(\"DWSTE TO EPWNYMO TOU GIATROU: \")); // Pairnei apo ton xristi to epitheto tou giatrou\n\t\t\tdoctor[numOfDoctors].setAM(rnd.nextInt(1000000)); // To sistima dinei automata ton am tou giatrou\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\t// Elegxos monadikotitas tou am tou giatrou\n\t\t\th = rnd.nextInt(1000000);\n\t\t\tfor(int i = 0; i < numOfDoctors; i++)\n\t\t\t{\n\t\t\t\tif(doctor[i].getAM() == h)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"O KWDIKOS AUTOS YPARXEI HDH!\");\n\t\t\t\t\th = rnd.nextInt(1000000);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnumOfDoctors++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"DEN MPOREITE NA EISAGETE ALLOUS GIATROUS!\");\n\t\t\tSystem.out.println(\"EXEI SYMPLHRWTHEI O PROVLEPOMENOS ARITHMOS!\");\n\t\t}\n\t}", "void evoluer()\n {\n int taille = grille.length;\n int nbVivantes = 0;\n for(int i=-1; i<2; i++)\n {\n int xx = ((x+i)+taille)%taille; // si x+i=-1, xx=taille-1. si x+i=taille, xx=0\n for(int j=-1; j<2; j++)\n {\n if (i==0 && j==0) continue;\n int yy = ((y+j)+taille)%taille;\n if (grille[xx][yy].vivante) nbVivantes++;\n }\n }\n if (nbVivantes<=1 || nbVivantes>=4) {vientDeChanger = (vivante==true); vivante = false;}\n if (nbVivantes==3) {vientDeChanger = (vivante==false); vivante = true;}\n }", "public static void main(String[] args) {\n\n Scanner scanner;\n scanner = new Scanner(System.in);\n\n System.out.print(\"n: \");\n\n int n = scanner.nextInt();\n int suma = 0, nr =0;\n\n while (n != 0)\n {\n System.out.print(\"Introduceti nota: \");\n int nota = scanner.nextInt();\n\n if(nota == -1) {\n break;\n }\n\n else\n {\n nr++;\n suma += nota;\n }\n\n n--;\n }\n\n if(nr != 0)\n System.out.println(\"Media notelor este: \" + suma/nr);\n else\n System.out.println(\"Nu se poate calcula media!\");\n\n }", "private double calculaz(double v) { //funcion de densidad de probabilidad normal\n double N = Math.exp(-Math.pow(v, 2) / 2) / Math.sqrt(2 * Math.PI);\n return N;\n }", "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "private void laskeMatkojenKesto() {\n matkojenkesto = 0.0;\n\n for (Matka m : matkat) {\n matkojenkesto += m.getKesto();\n }\n }", "public void popier() {\n Scanner input1 = new Scanner(System.in);\n //Ivedame vaiku skaiciu\n Scanner input2 = new Scanner(System.in);\n //Idame tevu skaiciu\n Scanner input3 = new Scanner(System.in);\n\n System.out.println(\"Iveskite atlyginimą ant popieriaus: \");\n double atlyginimas = input1.nextDouble();\n\n System.out.println(\"Iveskite turimų vaikų iki 18 metų skaičių.\");\n int vaikai = input2.nextInt();\n if (vaikai == 0) {\n\n //Apskaiciuojame NPD\n double npd = 310 - 0.5 * (atlyginimas - 380);\n if (npd >= 0)\n System.out.println(\"NPD: \" + npd);\n else\n System.out.println(\"NPD: \" + 0);\n\n //Bendras NPD\n double bnpd = npd;\n System.out.println(\"Bendras NPD: \" + bnpd);\n\n //Darbuotojo mokesciai\n System.out.println(\"\\nDarboutojo mokesčiai:\");\n\n //Apskaiciuojame GPM\n //Gauname neapmokestinama dali\n double nep = atlyginimas - bnpd;\n\n //GPM 15%\n double gpm = nep * 1.15 - nep;\n System.out.printf(\"Pajamu mokestis (GPM): %.2f %n\", gpm);\n\n //Apskaiciuojame PSD 6%\n double psd = atlyginimas * 1.06 - atlyginimas;\n System.out.printf(\"Sveikatos draudimas (PSD): %.2f %n\", psd);\n\n //Apskaiciuojame pensija ir soc draudima 3%\n double soc = atlyginimas * 1.03 - atlyginimas;\n System.out.printf(\"Pensijų ir soc. Draudimas: %.2f %n\", soc);\n\n\n //Darbdavio mokesciai\n System.out.println(\"\\nDabdavio mokami mokesčiai:\");\n\n //Sodros imoka 30.98%\n double sod = atlyginimas * 1.3098 - atlyginimas;\n System.out.printf(\"Sodros įmoka (VSD): %.2f %n\", sod);\n\n // Imoka i garantini fonda 0.2%\n double gar = atlyginimas * 1.002 - atlyginimas;\n System.out.printf(\"Įmokos į Garantinį fondą: %.2f %n\", gar);\n\n //Uzmokestis i rankas\n double rank = atlyginimas - gpm - psd - soc;\n System.out.printf(\"%nUžmokestis gaunamas į rankas: %.2f %n\", rank);\n\n //Darbo vietos kaina\n double viet = atlyginimas + sod + gar;\n System.out.printf(\"Darbo vietos kaina darbdaviui: %.2f\", viet);\n\n\n } else {\n\n System.out.println(\"Keliese auginate vaikus?\");\n int tevai = input3.nextInt();\n\n\n //Apskaiciuojame NPD\n double npd = 310 - 0.5 * (atlyginimas - 380);\n if (npd >= 0)\n System.out.println(\"NPD: \" + npd);\n else\n System.out.println(\"NPD: \" + 0);\n\n //Apskaiciuojame PNPD\n double pnpd = (200 * vaikai) / tevai;\n System.out.println(\"PNPD: \" + pnpd);\n\n //Bendras NPD\n double bnpd = npd + pnpd;\n System.out.println(\"Bendras NPD: \" + bnpd);\n\n //Darbuotojo mokesciai\n System.out.println(\"\\nDarboutojo mokesčiai:\");\n\n //Apskaiciuojame GPM\n //Gauname neapmokestinama dali\n double nep = atlyginimas - bnpd;\n\n //GPM 15%\n double gpm = nep * 1.15 - nep;\n System.out.printf(\"Pajamu mokestis (GPM): %.2f %n\", gpm);\n\n //Apskaiciuojame PSD 6%\n double psd = atlyginimas * 1.06 - atlyginimas;\n System.out.printf(\"Sveikatos draudimas (PSD): %.2f %n\", psd);\n\n //Apskaiciuojame pensija ir soc draudima 3%\n double soc = atlyginimas * 1.03 - atlyginimas;\n System.out.printf(\"Pensijų ir soc. Draudimas: %.2f %n\", soc);\n\n\n //Darbdavio mokesciai\n System.out.println(\"\\nDabdavio mokami mokesčiai:\");\n\n //Sodros imoka 30.98%\n double sod = atlyginimas * 1.3098 - atlyginimas;\n System.out.printf(\"Sodros įmoka (VSD): %.2f %n\", sod);\n\n // Imoka i garantini fonda 0.2%\n double gar = atlyginimas * 1.002 - atlyginimas;\n System.out.printf(\"Įmokos į Garantinį fondą: %.2f %n\", gar);\n\n //Uzmokestis i rankas\n double rank = atlyginimas - gpm - psd - soc;\n System.out.printf(\"%nUžmokestis gaunamas į rankas: %.2f %n\", rank);\n\n //Darbo vietos kaina\n double viet = atlyginimas + sod + gar;\n System.out.printf(\"Darbo vietos kaina darbdaviui: %.2f\", viet);\n\n }\n\n\n\n }", "@Override\n public void cantidad_Punteria(){\n punteria=69.5+05*nivel+aumentoP;\n }", "private static void estadisticaClase() {\n int numeroAlumnos;\n int aprobados = 0, suspensos = 0; // definición e instanciación de varias a la vez\n int suficentes = 0, bienes = 0, notables = 0, sobresalientes = 0;\n float totalNotas = 0;\n float media;\n Scanner in = new Scanner(System.in);\n\n // Salismos del bucle sólo si nos introduce un número positivo\n do {\n System.out.println(\"Introduzca el número de alumnos/as: \");\n numeroAlumnos = in.nextInt();\n } while (numeroAlumnos <= 0);\n\n // Como sabemos el número de alumnos es un bucle definido\n for (int i = 1; i <= numeroAlumnos; i++) {\n float nota = 0;\n\n // nota solo existe dentro de este for, por eso la definimos aquí.\n do {\n System.out.println(\"Nota del alumno \" + i + \" [0-10]: \");\n nota = in.nextFloat();\n } while (nota < 0 || nota > 10);\n\n // Sumamos el total de notas\n totalNotas += nota;\n\n if (nota < 5) {\n suspensos++;\n } else if (nota >= 5 && nota < 6) {\n aprobados++;\n suficentes++;\n } else if (nota >= 6 && nota < 7) {\n aprobados++;\n bienes++;\n } else if (nota >= 7 && nota < 9) {\n aprobados++;\n notables++;\n } else if (nota >= 9) {\n aprobados++;\n sobresalientes++;\n }\n }\n // De esta manera redondeo a dos decimales. Tengo que hacer un casting porque de Double quiero float\n // Si no debería trabajar con double siempre.\n media = (float) (Math.round((totalNotas / numeroAlumnos) * 100.0) / 100.0);\n\n // Sacamos las estadísticas\n System.out.println(\"Número de alumnos/as: \" + numeroAlumnos);\n System.out.println(\"Número de aprobados/as: \" + aprobados);\n System.out.println(\"Número de suspensos: \" + suspensos);\n System.out.println(\"Nota media: \" + media);\n System.out.println(\"Nº Suficientes: \" + suficentes);\n System.out.println(\"Nº Bienes: \" + bienes);\n System.out.println(\"Nº Notables: \" + notables);\n System.out.println(\"Nº Sobresalientes: \" + sobresalientes);\n\n\n }", "void berechneUmfang() {\r\n\t\tfor (int i = 1; i < m_ANZAHL_POINTS; i++) {\r\n\t\t\tm_umfang += m_pointArray[i].distance(m_pointArray[i-1]);\t\t\r\n\t\t}\r\n\t}", "public double getNajvacsie() {\n\t\tif ((cislo1 >= cislo2) && (cislo1 >= cislo3)) {\n\t\t\tprve = cislo1;\n\t\t} else if ((cislo2 >= cislo1) && (cislo2 >= cislo3)) {\n\t\t\tprve = cislo2;\n\t\t} else if ((cislo3 >= cislo1) && (cislo3 >= cislo2)) {\n\t\t\tprve = cislo3;\n\t\t}\n\t\treturn prve;\n\n\t}", "public static void main(String[] args) {\n\n Scanner unos = new Scanner(System.in);\n\n int broj = -1;\n int zbir = 0;\n double prosjek = 0;\n double brojac = -1;\n\n System.out.println(\"Unesite cijele brojeve\");\n broj = unos.nextInt();\n\n while (broj != 0){\n\n broj = unos.nextInt();\n\n zbir = broj + zbir;\n\n brojac = brojac +1;\n //brojac++;\n\n\n }\n System.out.println(\"Zbir unesenih brojeva \" + zbir);\n\n prosjek = zbir / brojac;\n System.out.print(\"Prosjek je \");\n System.out.println(prosjek);\n\n }", "public float montos(){\n\tDefaultTableModel modelo = vc.returnModelo();\r\n\tint numeroFilas=modelo.getRowCount();\r\n\tfloat monto=0;\r\n\t\tif(modelo.getRowCount()!=0){\r\n\t\t\r\n\t\t\tfor (int i = 0; i < numeroFilas; i++) {\r\n\t\t\t\t\r\n\t\t\t\tmonto = monto + Float.valueOf(modelo.getValueAt(i, 5).toString());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tmonto=0;\r\n\t\t}\r\n\t\treturn monto;\r\n\t}", "@Override\n\tpublic double calculaDesconto() {\n\t\treturn this.gastosEmCongressos;\n\t}", "public Agnello prelevaMontone() {\n\t\tfor (int i=0; i<pecore.size(); i++)\n\t\t\tif ((pecore.get(i) instanceof PecoraAdulta)\n\t\t\t\t\t&& (((PecoraAdulta) pecore.get(i)).isMaschio())) {\n\t\t\t\tnumMontoni--;\n\t\t\t\treturn pecore.remove(i);\n\t\t\t}\n\t\treturn null;\n\t}", "public void run() {\n PopulationFGA<Integer> poblacionActual = new PopulationFGA<>(funcionBorn,\n funcionFitness,\n problema.getDimension(),\n 1);\n poblacionActual.incializa(200);\n while(!condTerminacion.conditionReached(poblacionActual)) {\n System.out.println(\"Generacion Actual: \" + poblacionActual.getGeneracion());\n poblacionActual = iteration(poblacionActual);\n }\n ArrayList<IndividualFGA<Integer>> individuos = poblacionActual.generaIndividuos();\n IndividualFGA<Integer> mejor = individuos.get(0);\n for (IndividualFGA<Integer> e : individuos) {\n if (mejor.getFitness() <= e.getFitness())\n mejor = e;\n }\n System.out.println(\"Mejor solucion \" + '\\n' + mejor.toString());\n //System.out.println(\"Fitness \" + mejor.getFitness());\n int dim = problema.getDimension();\n int costo = 0;\n int obj1;\n int obj2;\n Phenotype<Integer> fenotipo = mejor.getRepActual();\n for (int i = 0; i < (dim - 1); i++) {\n obj1 = fenotipo.getAllele(i).intValue() - 1;\n for (int j = i + 1; j < dim; j++) {\n obj2 =fenotipo.getAllele(j).intValue() - 1; \n costo = costo + problema.getDistanciaEntre(i,j) * problema.getFlujoEntre(obj1,obj2);\n }\n }\n System.out.println(\"Costo de la solucion: \" + costo);\n\n }", "public Dipendente() {\r\n\t\tsetnMat();\r\n\t}", "public void calcularQuinA(){\n sueldoQuinAd = sueldoMensual /2;\n\n }", "@Override\n public void calcularIntGanado() {\n intGanado = saldo;\n for(int i = 0; i < plazoInv; i++){\n intGanado += inve * 12;\n intGanado += intGanado * (intAnual / 100);\n }\n intGanado = intGanado - (inve + saldo);\n }", "private void calcularDistanciaRecorrer(){\r\n\t\tfloat diferenciax = siguientePunto.x - posicion.x;\r\n\t\tfloat diferenciay = siguientePunto.y - posicion.y;\r\n\t\tdistanciaRecorrer = (float) Math.sqrt(diferenciax*diferenciax+diferenciay*diferenciay);\r\n\t}", "@Override\n\tpublic double neto() {\n\t\treturn 2000;\n\t}", "public void ex() {\n int inches = 86; \n int pie = 12; //1 pie = 12 inches \n //Operaciones para obtener la cantidad de pies e inches\n int cant = inches / pie; \n int res = inches % pie;\n //Muestra de resultados\n System.out.println(inches + \" pulgadas es equivalente a\\n \" + \n cant + \" pies \\n \" + res + \" pulgadas \");\n }", "public void solucion() {\r\n System.out.println(\"Intervalo : [\" + a + \", \" + b + \"]\");\r\n System.out.println(\"Error : \" + porce);\r\n System.out.println(\"decimales : \"+ deci);\r\n System.out.println(\"Iteraciones : \" + iteraciones);\r\n System.out\r\n .println(\"------------------------------------------------ \\n\");\r\n \r\n double c = 0;\r\n double fa = 0;\r\n double fb = 0;\r\n double fc = 0;\r\n int iteracion = 1;\r\n \r\n do {\r\n // Aqui esta la magia\r\n c = (a + b) / 2; \r\n System.out.println(\"Iteracion (\" + iteracion + \") : \" + c);\r\n fa = funcion(a);\r\n fb = funcion(b);\r\n fc = funcion(c);\r\n if (fa * fc == 0) {\r\n if (fa == 0) {\r\n JOptionPane.showMessageDialog(null, \"Felicidades la raíz es: \"+a);\r\n System.out.println(a);\r\n System.exit(0);\r\n } else {\r\n JOptionPane.showMessageDialog(null, \"Felicidades la raíz es: \"+c);\r\n System.out.println(c);\r\n System.exit(0);\r\n }}\r\n \r\n if (fc * fa < 0) {\r\n b = c;\r\n fa = funcion(a);\r\n fb = funcion(b);\r\n c = (a+b) / 2;\r\n \r\n x=c;\r\n fc = funcion(c);\r\n } else {\r\n a = c;\r\n fa = funcion(a);\r\n fb = funcion(b);\r\n c = (a+b) / 2;\r\n \r\n x=c;\r\n fc = funcion(c);\r\n }\r\n iteracion++;\r\n // Itera mientras se cumpla la cantidad de iteraciones establecidas\r\n // y la funcion se mantenga dentro del margen de error\r\n \r\n er = Math.abs(((c - x) / c)* 100);\r\n BigDecimal bd = new BigDecimal(aux1);\r\n bd = bd.setScale(deci, RoundingMode.HALF_UP);\r\n BigDecimal bdpm = new BigDecimal(pm);\r\n bdpm = bdpm.setScale(deci, RoundingMode.HALF_UP);\r\n cont++;\r\n fc=c ;\r\n JOptionPane.showMessageDialog(null, \"conteos: \" + cont + \" Pm: \" + bd.doubleValue() + \" Funcion: \" + bdpm.doubleValue() + \" Error: \" + er +\"%\"+ \"\\n\");\r\n } while (er <=porce);\r\n \r\n \r\n }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 1\r\n\t\t*/\r\n\t\t\r\n\t\tint c = 0;\r\n\t\tint s = 1;\r\n\t\tint f = 0;\r\n\t\tint b = 0;\r\n\t\t\r\n\t\twhile( c < 8 ) {\r\n\t\t\t\r\n\t\t\tb = f + s;\r\n\t\t\tf = s;\r\n\t\t\ts = b;\r\n\t\t\tc++;\r\n\t\t\tSystem.out.println(b);\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 2\r\n\t\t */\r\n\t\t\r\n\t\tdouble[][] notas = new double[6][2];\r\n\t\tSystem.out.println(\"Digite a notas dos 6 alunos, em ordem (primeiro aluno: primeira nota depois segunda nota)\");\r\n\t\tfor(int i = 0; i <6; i++) {\r\n\t\t\tfor(int j = 0; i <2; i++) {\r\n\t\t\t\tnotas[i][j] = scan.nextDouble();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tdouble m = (notas[i][0] + notas[i][1]) / 2;\r\n\t\t\tnotas[i][2] = m;\r\n\t\t\tSystem.out.println(notas[i][2]);\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tSystem.out.println(notas[i][2] >= 6 ? \"Aluno \"+(i)+\" Passou\" : \"Aluno \"+(i)+\" Recuperação\");\r\n\t\t}\r\n\t\t\r\n\t\tint a = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tif(notas[i][2] >= 6) {\r\n\t\t\t\ta++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(a+\" Alunos passaram\");\r\n\t\t\r\n\t\tint d = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tif(notas[i][2] <= 3) {\r\n\t\t\t\td++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(d+\" Alunos reprovaram\");\r\n\t\t\r\n\t\tint e = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tif((notas[i][2] <= 6)||(notas[i][2] >= 3)) {\r\n\t\t\t\te++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(e+\" Alunos de recuperação\");\r\n\t\t\r\n\t\tdouble g = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 6; i++) {\r\n\t\t\tg = g + notas[i][2];\r\n\t\t}\r\n\t\tSystem.out.println(\"Media da sala: \"+g/6);\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 3\r\n\t\t */\r\n\t\t\r\n\t\tboolean prime = true;\r\n\t\tSystem.out.println(\"Insira o numero que desejas saber se é primo ou não (inteiro positivo) \");\r\n\t\tint h = scan.nextInt();\r\n\t\tfor(int i = 2; i <= h; i ++) {\r\n\t\t\tif( (h % i == 0) && (i != h) ) {\r\n\t\t\t\tprime = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(prime)\r\n\t\t\tSystem.out.print(\"O numero \"+h+\" é primo\");\r\n\t\telse\r\n\t\t\tSystem.out.print(\"O numero \"+h+\" não é primo\");\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 4\r\n\t\t */\r\n\t\t\r\n\t\tSystem.out.println(\"Insira notas dos alunos (Ordem: Primeira nota, segunda nota, presença)\");\r\n\t\tint[][] Sala = new int[5][3];\r\n\t\tfor(int i = 0; i < 5; i++) {\r\n\t\t\tfor(int j = 0; j < 3; j++) {\r\n\t\t\t\tSala[i][j] = scan.nextInt();\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor(int i = 0; i < 5; i++) {\r\n\t\t\tif((Sala[i][0] + Sala[i][1] >= 6) && (Sala[i][2] / 18 >= 0.75)){\r\n\t\t\t\tSystem.out.println(\"Aluno \"+i+\" aprovado\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"Aluno \"+i+\" reprovado\");\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 5\r\n\t\t */\r\n\t\t\r\n\t\tint[] first = {1,2,3,4,5,};\r\n\t\tint[] second = {10,9,8,7,6,5,4,3,2,1,};\r\n\t\tint[][] third = {{1,2,3,},\r\n\t\t\t\t\t {4,5,6},\r\n\t\t\t\t\t {7,8,9},\r\n\t\t\t\t\t {10,11,12}};\r\n\t\tint[][] fourth = new int[4][3]; \r\n\t\tint m = 0;\r\n\t\t//If they were random numbers, would i need to use the lowest integer? or just be clever\r\n\t\tint n = 1;\r\n\t\t\r\n\t\tfor(int i = 0; i < first.length; i++) {\r\n\t\t\tif(first[i] > m)\r\n\t\t\t\tm = first[i];\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < second.length; i++) {\r\n\t\t\tif(second[i] < n)\r\n\t\t\t\tn = second[i];\r\n\t\t}\r\n\t\t\r\n\t\tint x = n*m;\r\n\t\tint k = 0;\r\n\t\tint l = 0;\r\n\t\tint o = 0;\r\n\t\tint p = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < 4; i ++) {\r\n\t\t\tfor(int j = 0; j < 3; j++) {\r\n\t\t\t\tfourth[i][j] = third[i][j] + x;\r\n\t\t\t\r\n\t\t\t\tif(fourth[0][j] % 2 == 0) {\r\n\t\t\t\t\tk += fourth[0][j]; \r\n\t\t\t\t}\r\n\t\t\t\tif(fourth[1][j] % 2 == 0) {\r\n\t\t\t\t\tl += fourth[1][j];\r\n\t\t\t\t}\t\r\n\t\t\t\tif(fourth[0][j] % 2 == 0) {\r\n\t\t\t\t\to += fourth[2][j];\r\n\t\t\t\t}\r\n\t\t\t\tif(fourth[3][j] % 2 == 0) {\r\n\t\t\t\t\tp += fourth[3][j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * Exercicio 6\r\n\t\t */\r\n\t\t\r\n\t\tboolean[][] assentos = new boolean[2][5];\r\n\t\tfor(int i = 0; i < 2; i++) {\r\n\t\t\tfor(int j = 0; j < 5; j++) {\r\n\t\t\t\tassentos[i][j] = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tscan.close();\r\n\t}", "@Override\n\tpublic void doit() {\n\t\tafficher_texte(UtilitaireChainesCommunes.demande_saisie_nombre);\n\t\tint i = saisie_entier();\n\t\tafficher_texte(UtilitaireChainesCommunes.demande_saisie_nombre);\n\t\tint j = saisie_entier();\n\t\t// tous deux strictements positifs ou strictement négatifs? \n\t\t// vrai => produit positif\n\t\t// faux => produit negatif ou nul\n\t\tboolean Truth = TrueIfSameTruthValue(i,j,this.estposit);\n if (Truth){afficher_texte(UtilitaireChainesCommunes.resultat_positif);}\n else{ \n \t// l un des deux est soit de signe différent soit nul.\n \t// on vire le cas \"est de signe différent\" (on aurait pu faire l autre)\n \tboolean Truth2 = ((i < 0 && j > 0) || (i > 0 && j < 0));\n \tif (Truth2){afficher_texte(UtilitaireChainesCommunes.resultat_negatif);}\n \telse {afficher_texte(UtilitaireChainesCommunes.nombre_nul);}\n }\n\n\t}", "@Override\n\tpublic double getMassaInterna()\n\t{\n\t\treturn 0.0;\n\t}", "public static void main(String[] args) {\n\t\t\n double p = 3048;\n int i;\n\t\t\n\t\t\n\t\tfor (i=1; i <=40; i++) {\n\t\t\t\n\t\t p = p * 2 / 3;\n\t\t \n\t\t}\n\t\t\n\t\tSystem.out.println(\"La distancia que habra recorrido la bola al momento de realizar su rebote numero 40 es de : \"+ p+ \" mts\");\n\n\t}", "float getMonatl_kosten();", "public void agregarVidaLogica(){\n int numvida = tam * tam;\n numvida*=0.05;\n System.out.println(numvida);\n for(int i=0;i<numvida;i++){\n int x= (int)(Math.random()*tam);\n int y= (int)(Math.random()*tam);\n if(matriz[y][x]!=2 && matriz[y][x]!=1){\n matriz[y][x]=4;\n }\n }\n }", "public void hallarPerimetroEscaleno() {\r\n this.perimetro = this.ladoA+this.ladoB+this.ladoC;\r\n }", "private void calculadorNotaFinal() {\n\t\t//calculo notaFinal, media de las notas medias\n\t\tif(this.getAsignaturas() != null) {\n\t\t\t\tfor (Iterator<Asignatura> iterator = this.asignaturas.iterator(); iterator.hasNext();) {\n\t\t\t\t\tAsignatura asignatura = (Asignatura) iterator.next();\n\t\t\t\t\tif(asignatura.getNotas() != null) {\n\t\t\t\t\tnotaFinal += asignatura.notaMedia();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//curarse en salud con division entre 0\n\t\t\t\tif(this.getAsignaturas().size() != 0) {\n\t\t\t\tnotaFinal /= this.getAsignaturas().size();\n\t\t\t\t}\n\t\t}\n\t}", "public static void pocetniMeni() {\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"***********************************************\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 1 ako zelite vidjeti kalendar(za dati mjesec i godinu)\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 2 za pregled podsjetnika za dati mjesec i godinu\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 3 da pregledate podsjetnik za datu godinu\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 4 ako zelite da pogledate sve podsjetnike!\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 5 ako zelite da upisete neki podsjetnik!\\n\"\r\n\t\t\t\t\t\t+ \":::::::::::::::::::::::::::::::::::::::::::::::\");\r\n\t}", "@Override\n public double perimetro() {\n return 4 * this.lado;\n }", "public static void main(String...args) {\n\t\t\tint numero,sumaP=0,sumaN=0,contaP=0,contN=0,contC=0;\n\t\t\tfloat mediaP=0,mediaN=0;\n\t\t\t\n\t\t\tfor(int i=1 ; i<=10 ; i++) {\n\t\t\t\tnumero = Integer.parseInt(JOptionPane.showInputDialog(\"digite 10 numeros\"));\n\t\t\t\tif (numero==0) {\n\t\t\t\t\tcontC++;\n\t\t\t\t}\n\t\t\t\telse if(numero>0) {\n\t\t\t\t\tsumaP=sumaP+numero;\n\t\t\t\t\tcontaP++;\n\t\t\t\t}\n\t\t\t\telse if(numero<0) {\n\t\t\t\t\tsumaN=sumaN+numero;\n\t\t\t\t\tcontN++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(contaP==0) {\n\t\t\t\t\tSystem.err.println(\"error no se puede sacar la media de numero postivos\");\n\t\t\t\t}\n\t\t\t\telse {mediaP= (float)sumaP/contaP;}\n\t\t\t\t\n\t\t\t\tif(contN==0) {\n\t\t\t\t\tSystem.out.println(\"No se puede calcular la media de los numero negativos\");\n\t\t\t\t}\n\t\t\t\telse {mediaN=(float)sumaN/contN;}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"se Introduzco \"+contC+\" ceros\");\n\t\t\tSystem.out.println(\"la media de los numeros positos es \"+mediaP);\n\t\t\tSystem.out.println(\"la medai de los numeros negativos es \"+ mediaN);\n\t}", "@Override\n\tpublic double getMontant() {\n\t\treturn 0;\n\t}", "public float calcular(float dinero, float precio) {\n // Cálculo del cambio en céntimos de euros \n cambio = Math.round(100 * dinero) - Math.round(100 * precio);\n // Se inicializan las variables de cambio a cero\n cambio1 = 0;\n cambio50 = 0;\n cambio100 = 0;\n // Se guardan los valores iniciales para restaurarlos en caso de no \n // haber cambio suficiente\n int de1Inicial = de1;\n int de50Inicial = de50;\n int de100Inicial = de100;\n \n // Mientras quede cambio por devolver y monedas en la máquina \n // se va devolviendo cambio\n while(cambio > 0) {\n // Hay que devolver 1 euro o más y hay monedas de 1 euro\n if(cambio >= 100 && de100 > 0) {\n devolver100();\n // Hay que devolver 50 céntimos o más y hay monedas de 50 céntimos\n } else if(cambio >= 50 && de50 > 0) {\n devolver50();\n // Hay que devolver 1 céntimo o más y hay monedas de 1 céntimo\n } else if (de1 > 0){\n devolver1();\n // No hay monedas suficientes para devolver el cambio\n } else {\n cambio = -1;\n }\n }\n \n // Si no hay cambio suficiente no se devuelve nada por lo que se\n // restauran los valores iniciales\n if(cambio == -1) {\n de1 = de1Inicial;\n de50 = de50Inicial;\n de100 = de100Inicial;\n return -1;\n } else {\n return dinero - precio;\n }\n }", "public int masVendido(int cantidad){\r\n \r\n return cantidad;\r\n }", "public static void main(String[] args) {\n System.out.println(\"Escribe los tres números:\");\n Scanner sc = new Scanner(System.in);\n Numero numeros = new Numero(sc.nextFloat(),sc.nextFloat(),sc.nextFloat());\n numeros.calcularMaior();\n }", "@Override\n\tpublic double perimetro() {\n\t\treturn 0;\n\t}", "public abstract float perimetro();", "public double getNu() {return nu;}", "private void cpu_jogada(){\n\n for(i=0;i<8;i++){\n for(j=0;j<8;j++){\n if(matriz[i][j] == jd2){\n // verificarAtaque(i,j,jd2);\n //verificarAtaque as posssibilidades de\n // ataque : defesa : aleatorio\n //ataque tem prioridade 1 - ve se tem como comer quem ataca\n //defesa tem prioridade 2 - ou movimenta a peca que esta sob ataque ou movimenta a outa para ajudar\n //aleatorio nao tem prioridade -- caso nao esteja sob ataque ou defesa\n }\n }\n }\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}", "@Override\r\n\tpublic double aumentarSueldo() {\n\t\treturn 0;\r\n\t}", "public Moto(float cilindrada,String _patente, int _cantRuedas)\n {\n super(_patente, _cantRuedas, eMarca.ZANELLA);\n this._cilindrada=cilindrada;\n }", "public double getTotalGastos(MESDELANIO mes) {\n\t\tint posicion;\n\t\tdouble gastoDeEseMes;\n\t\t\n\t\tposicion= this.ObtenerPosicionDelMes(mes);\n\t\tgastoDeEseMes= this.gastosPorMes[posicion];\n\t\treturn gastoDeEseMes;\n\t\t\n\t}", "void negarAnalise();", "protected void narisi(Graphics2D g, double wp, double hp) {\n\n FontMetrics fm = g.getFontMetrics();\n\n int hPisava = fm.getAscent();\n\n double xColumn = 0.0;\n double yColumn = sirinaStolpca(wp, hp);\n\n for(int i = 0; i < podatki.length; i++){\n\n g.setColor(Color.ORANGE);\n g.fillRect((int)xColumn,(int)(hp - visinaStolpca(i, wp, hp)), (int) sirinaStolpca(wp, hp), (int) visinaStolpca(i, wp, hp));\n\n g.setColor(Color.RED);\n g.drawRect((int)((i)*sirinaStolpca(wp, hp)),(int) (hp-visinaStolpca(i, wp, hp)), (int)sirinaStolpca(wp, hp), (int)visinaStolpca(i, wp, hp));\n\n g.setColor(Color.BLUE);\n if(i < podatki.length - 1){\n double startCrtaX = sredinaVrha(i, wp, hp)[0];\n double startCrtaY = sredinaVrha(i, wp, hp)[1];\n\n double endCrtaX = sredinaVrha(i + 1, wp, hp)[0];\n double endCrtaY = sredinaVrha(i+1, wp, hp)[1];\n\n g.drawLine((int)startCrtaX,(int) startCrtaY,(int) endCrtaX,(int) endCrtaY);\n\n }\n\n g.setColor(Color.BLACK);\n\n String toWrite = Integer.toString(i+1);\n double wNapis=fm.stringWidth(toWrite);\n double xNapis=xColumn+(xColumn-wNapis)/2;\n double yNapisLowerLine=hp-hPisava;\n xColumn+=sirinaStolpca(wp, hp);\n g.drawString(toWrite,ri (xNapis),ri(yNapisLowerLine));\n\n }\n\n }", "public static void quienHaGanado(Mano[] jugadores, int actual,int carro){\n if(jugadores[actual].getNPiezas()!=0){\n boolean dosIguales=false;\n actual=0;\n for (int i = 1; i < jugadores.length; i++) {\n if(jugadores[i].getPuntuacion()==jugadores[actual].getPuntuacion()){//El jug i y el actual tienen la misma putnuacion\n if(i==carro){//el jugador i es el carro\n actual=i;\n dosIguales=false;\n }\n else if(actual==carro){//el jugador actual es el carro\n dosIguales=false;\n }\n else{//ninguno es el carro y hay que acudir a un metodo para nombrar a los dos ganadores.\n dosIguales=true;\n }\n }\n if(jugadores[i].getPuntuacion()<jugadores[actual].getPuntuacion()){//el jugador i tiene menor puntuacion que el jugador actual\n actual=i;\n dosIguales=false;\n }\n }\n if(dosIguales){\n System.out.println(\"pene\");\n Excepciones.cambiarColorAzul(\"Y los GANADORES SON....\");\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i].getPuntuacion()==jugadores[actual].getPuntuacion()) {\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(i+1)+\": \"+jugadores[i].getNombre());\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(i+1)+\": \"+jugadores[i].getNombre());\n }\n }\n System.out.println(\"\\u001B[30m\");\n }\n else{\n Excepciones.cambiarColorAzul(\"Y el GANADOR ES....\");\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre()+\"\\u001B[30m\");\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre());\n }\n }\n else {\n Excepciones.cambiarColorAzul(\"Y el GANADOR ES....\");\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre()+\"\\u001B[30m\");\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre());\n }\n }", "public static void main(String[] args) {\n\t\t\tScanner tastiera=new Scanner(System.in);\r\n\t\t\tint k=0, j=0;\r\n\t\t\tint conta=0;\r\n\t\t\tString risposta=\"\";\r\n\t\t\tRandom r=new Random();\r\n\t\t\tArrayList<Giocatore> partecipantiOrdinati=new ArrayList<Giocatore>();\r\n\t\t\tArrayList<Giocatore> partecipantiMescolati=new ArrayList<Giocatore>();\r\n\t\t\tArrayList<Giocatore> perdenti=new ArrayList<Giocatore>();\r\n\t\t\tfor(int i=0;i<GIOCATORI.length;i++) {\r\n\t\t\t\tpartecipantiOrdinati.add(new Giocatore(GIOCATORI[i]));\r\n\t\t\t}\r\n\t\t\tfor(int i=0;i<GIOCATORI.length;i++) {\r\n\t\t\t\tint indice=Math.abs(r.nextInt()%partecipantiOrdinati.size());\r\n\t\t\t\tpartecipantiMescolati.add(partecipantiOrdinati.get(indice));\r\n\t\t\t\tpartecipantiOrdinati.remove(indice);\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"INIZIA IL TORNEO DI BRISCOLA!\");\r\n\t\t\twhile(partecipantiMescolati.size()!=1) {\r\n\t\t\t\tSystem.out.println(\"Fase \"+(j+1));\r\n\t\t\twhile(conta<partecipantiMescolati.size()) {\r\n\t\t\t\tMazzo m=new Mazzo();\r\n\t\t\t\tm.ordinaMazzo();\r\n\t\t\t\tm.mescolaMazzo();\r\n\t\t\t\tGiocatore g1=partecipantiMescolati.get(conta);\r\n\t\t\t\tGiocatore g2=partecipantiMescolati.get(conta+1);\r\n\t\t\t\tPartita p=new Partita(g1,g2,m);\r\n\t\t\t\tSystem.out.println(\"Inizia la partita tra \"+g1.getNickName()+\" e \"+g2.getNickName());\r\n\t\t\t\tSystem.out.println(\"La briscola è: \"+p.getBriscola().getCarta());\r\n\t\t\t\tSystem.out.println(\"Vuoi skippare la partita? \"); risposta=tastiera.next();\r\n\t\t\t\tif(risposta.equalsIgnoreCase(\"si\")) {\r\n\t\t\t\t\tg1.setPunteggio(p.skippa());\r\n\t\t\t\t\tg2.setPunteggio(PUNTI_MASSIMI-g1.getPunteggio());\r\n\t\t\t\t\tif(p.vittoria()) {\r\n\t\t\t\t\t\tSystem.out.println(\"Ha vinto \"+g1.getNickName());//vince g1\r\n\t\t\t\t\t\tSystem.out.println(\"Con un punteggio di \"+g1.getPunteggio());\r\n\t\t\t\t\t\tp.aggiungiPerdente(g2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tSystem.out.println(\"Ha vinto \"+g2.getNickName());// vince g2\r\n\t\t\t\t\t\tSystem.out.println(\"Con un punteggio di \"+g2.getPunteggio());\r\n\t\t\t\t\t\tp.aggiungiPerdente(g1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tp.daiLePrimeCarte();\r\n\t\t\t\t\tCarta c1=new Carta(g1.gioca().getCarta());\r\n\t\t\t\t\tCarta c2=new Carta(g2.gioca().getCarta());\r\n\t\t\t\t\tg1.eliminaDaMano(c1); g2.eliminaDaMano(c2);\r\n\t\t\t\t\tint tracciatore=1; //parte dal giocatore 1\r\n\t\t\t\t\twhile(!m.mazzoMescolato.isEmpty())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(c1.getCarta()+\" \"+c2.getCarta());\r\n\t\t\t\t\t\tif(p.chiPrende(c1, c2) && tracciatore==1){\r\n\t\t\t\t\t\t\tSystem.out.println(\"Prende \"+g1.getNickName());\r\n\t\t\t\t\t\t\tg1.setPunteggio(g1.aumentaPunteggio(c1.valoreCarta()+c2.valoreCarta()));\r\n\t\t\t\t\t\t\tp.pesca(g1); p.pesca(g2);\r\n\t\t\t\t\t\t\tc1=g1.gioca(); c2=g2.gioca();\r\n\t\t\t\t\t\t\tg1.eliminaDaMano(c1);\r\n\t\t\t\t\t\t\tg2.eliminaDaMano(c2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(p.chiPrende(c2, c1)) {\r\n\t\t\t\t\t\t\ttracciatore=2;\r\n\t\t\t\t\t\t\tSystem.out.println(\"Prende \"+g2.getNickName());\r\n\t\t\t\t\t\t\tg2.setPunteggio(g2.aumentaPunteggio(c1.valoreCarta()+c2.valoreCarta()));\r\n\t\t\t\t\t\t\tp.pesca(g2); p.pesca(g1);\r\n\t\t\t\t\t\t\tc2=g2.gioca(); c1=g1.gioca();\r\n\t\t\t\t\t\t\tg2.eliminaDaMano(c2); \r\n\t\t\t\t\t\t\tg1.eliminaDaMano(c1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{tracciatore = 1; k--;}\r\n\t\t\t\t\t\tSystem.out.println(g1.getPunteggio()+\" \"+g2.getPunteggio());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(\"Manche Finale\");\r\n\t\t\t\t\twhile(!g1.carteInMano.isEmpty() || !g2.carteInMano.isEmpty()) {\r\n\t\t\t\t\t\tSystem.out.println(c1.getCarta()+\" \"+c2.getCarta());\r\n\t\t\t\t\t\tif(p.chiPrende(c1, c2) && tracciatore==1){\r\n\t\t\t\t\t\t\tSystem.out.println(\"Prende \"+g1.getNickName());\r\n\t\t\t\t\t\t\tg1.setPunteggio(g1.aumentaPunteggio(c1.valoreCarta()+c2.valoreCarta()));\r\n\t\t\t\t\t\t\tc1=g1.gioca(); c2=g2.gioca();\r\n\t\t\t\t\t\t\tg1.eliminaDaMano(c1);\r\n\t\t\t\t\t\t\tg2.eliminaDaMano(c2);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(p.chiPrende(c2, c1)) {\r\n\t\t\t\t\t\t\ttracciatore=2;\r\n\t\t\t\t\t\t\tSystem.out.println(\"Prende \"+g2.getNickName());\r\n\t\t\t\t\t\t\tg2.setPunteggio(g2.aumentaPunteggio(c1.valoreCarta()+c2.valoreCarta()));\r\n\t\t\t\t\t\t\tc2=g2.gioca(); c1=g1.gioca();\r\n\t\t\t\t\t\t\tg2.eliminaDaMano(c2);\r\n\t\t\t\t\t\t\tg1.eliminaDaMano(c1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\ttracciatore = 1;\r\n\t\t\t\t\t\tSystem.out.println(g1.getPunteggio()+\" \"+g2.getPunteggio());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(p.chiPrende(c1, c2) && tracciatore==1) {\r\n\t\t\t\t\t\tSystem.out.println(\"Prende \"+g1.getNickName());\r\n\t\t\t\t\t\tg1.setPunteggio(g1.aumentaPunteggio(c1.valoreCarta()+c2.valoreCarta()));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tSystem.out.println(\"Prende \"+g2.getNickName());\r\n\t\t\t\t\t\tg2.setPunteggio(g2.aumentaPunteggio(c1.valoreCarta()+c2.valoreCarta()));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(\"Situazione: \"+g1.getNickName()+\": \"+g1.getPunteggio());\r\n\t\t\t\t\tSystem.out.println(g2.getNickName()+\": \"+g2.getPunteggio());\r\n\t\t\t\t\tif(p.vittoria()) {\r\n\t\t\t\t\t\tSystem.out.println(\"Ha vinto il giocatore \"+g1.getNickName());\r\n\t\t\t\t\t\tSystem.out.println(\"Con un punteggio di \"+g1.getPunteggio());\r\n\t\t\t\t\t\tperdenti.add(g2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tSystem.out.println(\"Ha vinto il giocatore \"+g2.getNickName());\r\n\t\t\t\t\t\tSystem.out.println(\"Con un punteggio di \"+g2.getPunteggio());\r\n\t\t\t\t\t\tperdenti.add(g1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tconta+=2;\r\n\t\t\t\tSystem.out.println(\"Premi una lettera per continuare: \"); risposta=tastiera.next();\r\n\t\t\t}\r\n\t\t\tj++;\r\n\t\t\tconta=0;\r\n\t\t\tfor(int i=0;i<perdenti.size();i++)\r\n\t\t\t\tpartecipantiMescolati.remove(perdenti.get(i));\r\n\t\t\tSystem.out.println(\"Restano i seguenti partecipanti: \");\r\n\t\t\tfor(int i=0;i<partecipantiMescolati.size();i++) {\r\n\t\t\t\tSystem.out.println(partecipantiMescolati.get(i).getNickName());\r\n\t\t\t\tpartecipantiMescolati.get(i).setPunteggio(0);\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Il vincitore del torneo è: \"+partecipantiMescolati.get(0).getNickName());\r\n\t\t\t\t\r\n\t}", "public void inicio(){\n d.display(\"Para un calcular conversiones de grados Farenheit y Celsius\\n\"\n + \"o viceversa\");\n //System.out.println(\"Para un nadaro que ha ganado medallas en 5 competencias\");\n }", "public int promedio() {\r\n // calculo y redondeo del promedio\r\n promedio = Math.round(nota1B+nota2B);\r\n // paso de Double a Int\r\n return (int) promedio;\r\n }", "public Nodo espaciosJustos(Nodo nodo){\n System.out.println(\"----------------inicio heuristica espaciosJustos--------------\");\n Operadores operadores = new Operadores();\n //variables de matriz\n int numFilas,numColumnas,numColores;\n \n numColumnas = nodo.getnColumnas();\n numFilas = nodo.getnFilas();\n numColores = nodo.getnColores();\n \n String [][] matriz = new String [numFilas][numColumnas];\n matriz = operadores.clonarMatriz(nodo.getMatriz());\n //-------------------\n \n //variables de filas y columnas\n ArrayList<ArrayListColumna> columnas = new ArrayList<ArrayListColumna>();\n columnas = (ArrayList<ArrayListColumna>)nodo.getColumnas();\n \n ArrayList<ArrayListFila> filas = new ArrayList<ArrayListFila>();\n filas = (ArrayList<ArrayListFila>)nodo.getFilas();\n //---------------------------\n \n ArrayListFila auxListFila = new ArrayListFila();\n ArrayListColumna auxListColumna = new ArrayListColumna();\n \n int cambio=1;\n int changue=0;\n while(cambio!=0){\n cambio=0;\n \n nodo.setCambio(0);\n for(int i=0;i<numFilas;i++){\n auxListFila = (ArrayListFila)filas.get(i);\n for(int j=0;j<numColores;j++){\n Color auxColor = new Color();\n auxColor = auxListFila.getColor(j);\n\n if(auxColor.getNumero() > 0){\n int contador=0;\n for(int c=0;c<numColumnas;c++){\n auxListColumna=(ArrayListColumna)columnas.get(c);\n\n for(int j1=0;j1<numColores;j1++){\n Color auxColor1 = new Color();\n auxColor1 = auxListColumna.getColor(j1);\n if(auxColor1.getNumero() > 0){\n if(auxColor.getColor().equals(auxColor1.getColor()) && operadores.isPosicionVaciaFila(nodo.getMatriz(), i, c)){\n contador++;\n }\n }\n }\n }\n \n if(auxColor.getNumero() == contador){\n changue=1;\n cambio=1;\n auxColor.setNumero(0);\n for(int c=0;c<numColumnas;c++){\n auxListColumna=(ArrayListColumna)columnas.get(c);\n\n for(int j1=0;j1<numColores;j1++){\n Color auxColor1 = new Color();\n auxColor1 = auxListColumna.getColor(j1);\n if(auxColor1.getNumero() > 0){\n if(auxColor.getColor().equals(auxColor1.getColor()) && operadores.isPosicionVaciaFila(nodo.getMatriz(), i, c)){\n \n auxColor1.setNumero(auxColor1.getNumero()-1);\n\n matriz = operadores.pintarPosicion(matriz, i, c, auxColor.getColor());\n\n nodo.setMatriz(matriz);\n }\n }\n }\n }\n System.out.println(\"-----\");\n operadores.imprimirMatriz(nodo.getMatriz());\n System.out.println(\"-----\");\n \n \n }\n }\n }\n }\n \n }\n if(changue==1) nodo.setCambio(1);\n System.out.println(\"----------------fin heuristica espaciosJustos-------------- \");\n return (Nodo)nodo;\n }", "public double sueldoNeto(double salario)\n {\n double salarioN=salario - (isss(salario)+afp(salario)+renta(salario));\n return salarioN;\n }", "@Override\n\tdouble dienTich() {\n\t\tdouble p = chuVi() / 2;\n\t\treturn Math.sqrt(p*(p-canhA)*(p-canhB)*(p-canhC));\n\t}", "public double costNEX() {\r\n double diff=0;\r\n double intensity=0;\r\n \r\n for(int x=Config.ptvXLow-0; x < Config.ptvXHigh+0; x++) {\r\n// for(int x=Solver.xBoundsTumor[0]; x < Solver.xBoundsTumor[1]; x+= Config.scaleFactor) {\r\n for(int y=Config.ptvYLow-0; y < Config.ptvYHigh+0; y++) {\r\n// for(int y=Solver.yBoundsTumor[0]; y < Solver.yBoundsTumor[1]; y+= Config.scaleFactor) {\r\n for(int z=Config.ptvZLow-0; z < Config.ptvZHigh+0; z++) {\r\n// for(int z=Solver.zBoundsTumor[0]; z < Solver.zBoundsTumor[1]; z+= Config.scaleFactor) {\r\n\r\n this.body2[x][y][z].setCurrentDosis(0.0); //Set currentPtvVoxel Dose to 0 \r\n for(int i=0; i<Config.numberOfSeeds;++i) { \r\n // Calculate intensity based based on current dwelltime\r\n intensity = this.body2[x][y][z].radiationIntensity(this.seeds2[i].getCoordinate(), New_state[i]);\r\n if (intensity>0) {\r\n// LogTool.print(\"Cost: Intensity :\" + intensity + \"@ \" + x + \" \" + y + \" \" + z,\"notification\");\r\n }\r\n this.body2[x][y][z].addCurrentDosis(intensity);\r\n } \r\n diff += Math.pow((this.body2[x][y][z].getGoalDosis()-this.body2[x][y][z].getCurrentDosis()),2);\r\n// LogTool.print(\" diffdose \" + (Looper.body2[x][y][z].getGoalDosis()-Looper.body2[x][y][z].getCurrentDosis()),\"notification\");\r\n } \r\n }\r\n }\r\n return Math.sqrt(diff);\r\n// return Math.random();\r\n }", "public ChampionnatComplexe (Matrice mat,Options o) {\n\t\topt = o;\n\t\tint [] Eq12 = FonctionsTransverses.tirage(12);\n\t\tgrpA1 = new int [3]; \n\t\tgrpA2 = new int [3]; \n\t\tgrpB1 = new int [3]; \n\t\tgrpB2 = new int [3];\n\t\tfor (int i = 0 ; i < 3 ; i++ ) {\n\t\t\tgrpA1 [i] = Eq12 [i]; \n\t\t\tgrpA2 [i] = Eq12 [i+3]; \n\t\t\tgrpB1 [i] = Eq12 [i+6]; \n\t\t\tgrpB2 [i] = Eq12 [i+9]; \n\t\t}\n\t\tArrays.sort(grpA1);\n\t\tArrays.sort(grpA2);\n\t\tArrays.sort(grpB1);\n\t\tArrays.sort(grpB2);\n\t\tint a=0;\n\t\tfor ( int i = 0 ; i < 3 ; i ++ ) {\n\t\t\tfor ( int j = 0 ; j < 3 ; j ++ ) {\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpA1[i]-1,grpA1[j]-1)*2;\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpA2[i]-1,grpA2[j]-1)*2;\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpB1[i]-1,grpB1[j]-1)*2;\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpB2[i]-1,grpB2[j]-1)*2;\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpA1[i]-1,grpA2[j]-1);\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpA2[i]-1,grpA1[j]-1);\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpB1[i]-1,grpB2[j]-1);\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpB2[i]-1,grpB1[j]-1);\n\t\t\t}\n\n\t\t\ta = (int) Math.random();\n\t\t\tif (a==0) {\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpA1[i]-1,grpB1[i]-1);\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpA2[i]-1,grpB1[i]-1);\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpB1[i]-1,grpA1[i]-1);\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpB2[i]-1,grpA1[i]-1);\n\t\t\t} else {\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpA1[i]-1,grpB2[i]-1);\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpA2[i]-1,grpB2[i]-1);\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpB1[i]-1,grpA2[i]-1);\n\t\t\t\tdistanceTotale += mat.getDistanceBetween(grpB2[i]-1,grpA2[i]-1);\n\t\t\t}\n\t\t}\n\t\tint z;\n\t\tfor ( z= 0; z < 3 ; z++) {\n\t\t\tequilibreDesPoule = equilibreDesPoule + ( Integer.max(grpA1[z], grpB1[z]) - Integer.min(grpA1[z], grpB1[z]) ) + ( Integer.max(grpA2[z], grpB2[z]) - Integer.min(grpA2[z], grpB2[z]) );\n\t\t}\n\t\tnoteDistance = getDistanceTotale() * 100 / 52000 ;\n\t\tnoteEquilibre = getEquilibreDesPoules() * 100 / 36 ;\n\t\tnoteMoyennePondereeEqDist = ( (noteDistance * opt.getPourcentageDistance()) + (noteEquilibre * (100 - opt.getPourcentageDistance()) ))/100;\n\t}" ]
[ "0.6698184", "0.6571777", "0.6251219", "0.616924", "0.61530215", "0.614568", "0.6143228", "0.6132643", "0.6121309", "0.6103582", "0.60889506", "0.6048594", "0.602026", "0.6008926", "0.60081863", "0.5994942", "0.59909886", "0.59882575", "0.598129", "0.59762305", "0.59684926", "0.59666646", "0.5962342", "0.59570414", "0.5945999", "0.5926819", "0.5888243", "0.58742136", "0.58716124", "0.5870456", "0.5838408", "0.5836138", "0.58298665", "0.58290243", "0.5821065", "0.58205634", "0.58137906", "0.58131963", "0.58104134", "0.5800453", "0.57955736", "0.5794988", "0.579394", "0.57887465", "0.57882553", "0.5785421", "0.57853353", "0.5772086", "0.5765786", "0.57609797", "0.57596624", "0.5756051", "0.57555526", "0.5746307", "0.574528", "0.5744283", "0.57442576", "0.5737924", "0.57341546", "0.5732071", "0.57312155", "0.57279456", "0.57219243", "0.5720081", "0.5718887", "0.57168466", "0.5716305", "0.57050365", "0.5701409", "0.5692221", "0.56912106", "0.56876093", "0.5675995", "0.56746775", "0.56674415", "0.56636137", "0.5655886", "0.565335", "0.5649438", "0.5645962", "0.56422794", "0.56395197", "0.563863", "0.5631026", "0.5630749", "0.5628895", "0.5624339", "0.56236786", "0.56204027", "0.5620034", "0.561948", "0.56177044", "0.5614398", "0.56092435", "0.5600141", "0.5594299", "0.5593091", "0.5592478", "0.5589025", "0.55888844", "0.55869466" ]
0.0
-1
Provides service to save and query reports.
@ClassVersion("$Id: HistoryService.java 16670 2013-08-28 19:49:06Z colin $") public interface HistoryService { /** * Initializes the receiver with the given system resources. * * @param idFactory The ID factory to be used for report ID * generation. * @param reportSavedListener The listener notified after a report * has been saved (successfully or not). It may be null if no * notifications are needed. * @param dataSource the data source * * @throws PersistenceException if an error occurs during initialization */ public void init(IDFactory idFactory, ReportSavedListener reportSavedListener, ComboPooledDataSource dataSource) throws PersistenceException; /** * Returns the actor ID associated with the report with given * order ID. * * @param orderID The order ID. * * @return The actor ID. If no report with the given order ID * exists, null is returned, and no exception is thrown. * * @throws PersistenceException if there were errors accessing the * report. */ public UserID getActorID (final OrderID orderID) throws PersistenceException; /** * Returns all the reports received after the supplied date-time * value, and which are visible to the given user. * * @param user the user making the query. Cannot be null. * @param data the date-time value. Cannot be null. * * @return the reports that were received after the date-time * value, and which are visible to the given user. * * @throws PersistenceException if there were persistence errors * fetching the reports. */ public ReportBaseImpl[] getReportsSince (SimpleUser user, Date data) throws PersistenceException; /** * Returns the open orders visible to the given user. * * @param user a <code>SimpleUser</code> value * @return a <code>List&lt;ReportBaseImpl</code> value * @throws PersistenceException if there were errors retrieving the data */ public List<ReportBaseImpl> getOpenOrders(SimpleUser user) throws PersistenceException; /** * Returns the position of the instrument based on all reports * received for it before or on the supplied date, and which are visible * to the given user. * * @param user the user making the query. Cannot be null. * @param data the date to compare with all the reports. Only the reports * that were received prior to or on this date will be used in this calculation. * Cannot be null. * @param instrument the instrument whose position is desired. Cannot be null. * * @return the instrument position. * * @throws PersistenceException if there were errors retrieving the equity * position */ public BigDecimal getPositionAsOf (SimpleUser user, Date data, Instrument instrument) throws PersistenceException; /** * Returns the aggregate position of each (instrument,account,actor) * tuple based on all reports for given security type * received for each tuple on or before the supplied date, * and which are visible to the given user. * * @param user the user making the query. Cannot be null. * @param data the date to compare with all the reports. Only * the reports that were received on or prior to this date will be * used in this calculation. Cannot be null. * @param securityType the security type. Cannot be null. * * @return the position map. * * @throws PersistenceException if there were errors retrieving the * position map. */ public Map<PositionKey, BigDecimal> getPositionsAsOf (SimpleUser user, Date data, SecurityType securityType) throws PersistenceException; /** * Returns the aggregate position of each (instrument,account,actor) * tuple based on all reports received for each tuple on or before * the supplied date, and which are visible to the given user. * * @param user the user making the query. Cannot be null. * @param data the date to compare with all the reports. Only * the reports that were received on or prior to this date will be * used in this calculation. Cannot be null. * * @return the position map. * * @throws PersistenceException if there were errors retrieving the * position map. */ public Map<PositionKey, BigDecimal> getAllPositionsAsOf (SimpleUser user, Date data) throws PersistenceException; /** * Saves the supplied report to the database. Saving may be * immediate or delayed; in either case the report ID is set * before this method returns. * * @param report the report to be saved. Cannot be null. * * @throws PersistenceException if there were errors saving the report. */ public void saveReport(ReportBase report) throws PersistenceException; /** * Deletes the supplied report from the database. * * @param report a <code>ReportBase</code> value * @throws PersistenceException if there were errors deleting the report */ public void deleteReport(ReportBase report) throws PersistenceException; /** * Returns the history quotes visible to the given dates. * * @param instrument The instrument of the request. * @param inPeriod The period of the quotes. * @param inFrom The date from which to start in UTC. Cannot be null. * @param inTo The date to which to stop in UTC. Cannot be null. * @return a <code>List&lt;Quote</code> value * @throws PersistenceException if there were errors retrieving the data */ public List<Quote> getQuoteHistory(Instrument instrument, Period period, Date fromDate, Date toDate) throws PersistenceException; /** * Returns the available instruments supported by the Broker. * * @param brokerID a <code>BrokerID</code> value * @throws PersistenceException if there were errors retrieving the instruments */ public Set<Instrument> getInstruments(BrokerID brokerID) throws PersistenceException; /** * Gets the supplied instrument info to the database. * * @param brokerID a <code>BrokerID</code> value * @param instrument a <code>Instrument</code> value * @throws PersistenceException if there were errors retrieving the info */ public InstrumentInfo getInstrumentInfo(BrokerID brokerID, Instrument instrument) throws PersistenceException; /** * Saves/Replaces the supplied instrument info to the database. * * @param brokerID a <code>BrokerID</code> value * @param instrument a <code>Instrument</code> value * @param info a <code>InstrumentInfo</code> value * @throws PersistenceException if there were errors saving the info */ public void setInstrumentInfo(BrokerID brokerID, Instrument instrument, InstrumentInfo info) throws PersistenceException; /** * Deletes the instrument info from the database. * * @param brokerID a <code>BrokerID</code> value * @param instrument a <code>Instrument</code> value * @throws PersistenceException if there were errors deleting the info */ public void deleteInstrumentInfo(BrokerID brokerID, Instrument instrument) throws PersistenceException; /** * Gets the root order ID for the given order ID. * * @param inOrderID an <code>OrderID</code> value * @return an <code>OrderID</code> value or <code>null</code> */ public OrderID getRootOrderID(OrderID inOrderID) throws PersistenceException; /** * Saves the supplied quote to the database. Saving may be * immediate or delayed; * * @param quote the quote to be saved. Cannot be null. * * @throws PersistenceException if there were errors saving the quote. */ public void saveQuote(QuoteEvent quote) throws PersistenceException; /** * Deletes the supplied quote from the database. * * @param quote a <code>QuoteEvent</code> value * @throws PersistenceException if there were errors deleting the quote */ public void deleteQuote(QuoteEvent quote) throws PersistenceException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected IViewerReportService getReportService( )\n \t{\n \t\treturn BirtReportServiceFactory.getReportService( );\n \t}", "public interface ReportService {\n /**\n * Some constants using in reports\n */\n String[] dashboardSheetNames = {\"Level And Quantity\", \"Level And Trainers\", \"Training And Quantity\"};\n String[] levelAndQuantityColumns = {\"Level\", \"Course Name\", \"Group Name\"};\n String[] levelAndTrainersColumns = {\"Trainer\", \"Course Name and Level\"};\n String[] trainingAndQuantityColumns = {\"Course Name\", \"Group Name\", \"Amount of Employees\"};\n String groupsNotFound = \"No groups to report\";\n String levelException = \"Can't find Level for Id \";\n\n /**\n * @return full attendance report of all courses and their groups\n * @throws IOException if any exception during XSSFWorkbook.write()\n * @see org.apache.poi.xssf.usermodel.XSSFWorkbook\n */\n ByteArrayInputStream getAttendanceExcel() throws IOException;\n\n /**\n * @return attendance report of all groups of current user\n * @param user user object, to get user information\n * @throws IOException if any exception during XSSFWorkbook.write()\n * @see org.apache.poi.xssf.usermodel.XSSFWorkbook\n */\n ByteArrayInputStream getAttendanceExcel(User user) throws IOException;\n\n /**\n * @return attendance report of particular group\n * @param groupId id, to find group in database\n * @throws IOException if any exception during XSSFWorkbook.write()\n * @see org.apache.poi.xssf.usermodel.XSSFWorkbook\n */\n ByteArrayInputStream getAttendanceExcel(Integer groupId) throws IOException;\n\n /**\n * @return dashboard report of all courses, their groups, and users\n * @throws IOException if any exception during XSSFWorkbook.write()\n * @see org.apache.poi.xssf.usermodel.XSSFWorkbook\n */\n ByteArrayInputStream getDashboardExcel() throws IOException;\n}", "public interface ReportService {\n}", "public static ReportService getInstance()\n {\n return reportService;\n }", "public interface CoreReportService {\n /**\n * 生成excel报表文件\n *\n * @param reportName 报表名称\n * @param reportSql 调用报表sql\n * @param params 请求参数\n * @param keys 通过key为获取sql返回结果数据,\n * @param headers excel第一行表头\n */\n void createReportExcelFile(String taskId,\n String reportName,\n String reportSql,\n Object[] params,\n String[] keys,\n String[] headers);\n}", "public Report getReport();", "public interface ReportService extends CTPService {\n\n /**\n * Find all available report types.\n *\n * @return List of report types or empty list.\n */\n List<ReportType> findTypes();\n\n /**\n * Find a report type by reportTypeID.\n *\n * @param reportTypeId String.\n * @return A container object which may contain a ReportType or null value.\n */\n Optional<ReportType> findType(String reportTypeId);\n\n /**\n * Find reports by reportType.\n *\n * @param reportType String.\n * @return List of report summaries or empty list.\n */\n List<ReportSummary> getReportSummary(String reportType);\n\n /**\n * Find Report entity by reportId.\n *\n * @param reportId UUID\n * @return A container object which may contain a Report or null value.\n */\n Optional<Report> findByReportId(UUID reportId);\n\n}", "public interface ILabReportService {\n //01.保存报表\n public int saveLabReport(LabReport labinfo);\n //02.获取报表数据\n public LabReport getLabReport();\n}", "public interface IToolReportService {\n List<ToolReport> retrieveToolReport(String filter);\n}", "Report createReport();", "public abstract void getReport(java.io.Writer writer);", "public interface IDataExportService {\n\n /**\n * Exports data for a single user to a temporary file.\n *\n * @param query the query that selects the data to export.\n * @return a unique token for downloading the exported file.\n *\n * @throws ApplicationException if the query execution or file creation fails.\n */\n String export(UserDataExportQuery query) throws ApplicationException;\n\n /**\n * Exports data for a single utility to a file. Any exported data file is replaced.\n *\n * @param query the query that selects the data to export.\n *\n * @throws ApplicationException if the query execution or file creation fails.\n */\n void export(UtilityDataExportQuery query) throws ApplicationException;\n\n}", "public abstract void writeLedgerSummaryReport(ReportWriterService reportWriterService);", "public void saveReport() {\n\t\ttry {\n\t\t\tPrintWriter out = new PrintWriter(new FileOutputStream(reportFile));\n\t\t\tout.println(record.reportToString());\n\t\t\tout.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public interface Reporting {\n ////////////////////////////////////////////////////////////////////////////////////\n // methods specific to reporting\n public String getName();\n\n public Date getDate();\n\n public String productBreakdown();\n}", "public interface ReportExporter {\n\n /**\n * @param jasperPrint printable report object to export as associated format\n * @param file the destination file to export\n */\n void exportToFile(JasperPrint jasperPrint, File file) throws JRException;\n}", "public interface DataSource {\n\n Report getSalaryReport(String departmentId, LocalDate dateFrom, LocalDate dateTo);\n\n}", "public interface IReportingDao extends IGenericDao<Report> {\n\n\tpublic List<Report> getAllReports();\n}", "public void saveReport(ReportBase report)\r\n \t\tthrows PersistenceException;", "public interface ReportManagerI {\n \n \n \n /**\n * Create a signature report from the information supplied.\n * @param validationResponse\t{@link ValidationSignatureResponse} that contains the validation results.\n * @param templateConf\t\t{@link TemplateData} that contains the information about of template of generation.\n * @param signature\t\t\tElectronic signature.\n * @param document\t\t\tSigned document.\n * @param barcodes\t\t\tBar code to include into the signature report.\n * @param additionalParameters\tAdditional parameters included in the request.\n * @return\t\t\t\tReport.\n * @throws ReportException\t\tIf an error occurs generating the report.\n */\n byte[ ] createReport(ValidationSignatureResponse validationResponse, TemplateData templateConf, byte[ ] signature, byte[ ] document, ArrayList<Barcode> barcodes, HashMap<String, String> additionalParameters) throws ReportException;\n\n\n}", "public interface RepoTempHumService {\n\n Map<String, Object> selectById(Integer repositoryId,int offset, int limit) throws RepoTempHumServiceException;\n\n Map<String, Object> selectAll(int offset, int limit) throws RepoTempHumServiceException;\n\n boolean addRepoTempHumRecord(RepoTempHumDO repoTempHumDO) throws RepoTempHumServiceException;\n\n public File exportRecord(List<RepoTempHumDTO> rows);\n}", "@RequestMapping(method = RequestMethod.GET, value = \"/getReports\")\r\n public List<Reports> getReports() {\r\n\r\n List<Reports> results = reportsRepository.getReportsByDate();\r\n return results;\r\n\r\n }", "public void saveService();", "@GET\n @Path(\"/report\")\n @NotAuthenticated\n public Response getReport() {\n \n try {\n File design = opalRuntime.getFileSystem().getLocalFile(resolveFileInFileSystem(\"/report-templates/\" + name + \".rptdesign\"));\n if(!design.exists()) {\n return Response.status(Status.NOT_FOUND).build();\n }\n File reports = opalRuntime.getFileSystem().getLocalFile(resolveFileInFileSystem(\"/reports/\" + name));\n if(!reports.exists()) {\n if(!reports.mkdirs()) {\n return Response.serverError().build();\n }\n }\n File report = new File(reports, name + \"-\" + System.currentTimeMillis() + \".pdf\");\n reportService.render(\"PDF\", null, design.getAbsolutePath(), report.getAbsolutePath());\n if(report.exists()) {\n return Response.ok().build();\n } else {\n return Response.serverError().build();\n }\n } catch(Exception e) {\n e.printStackTrace();\n return Response.serverError().build();\n }\n }", "void createReport(Report report);", "private Repository getAssayReportRepository()\r\n {\r\n RepositoryBuilder repoBuilder = new RepositoryBuilder(\"optionalModules\", \"assayreport\", LicenseType.LABKEY_LICENSE, BranchType.TRUNK);\r\n return repoBuilder.buildRepository();\r\n }", "public interface ExpressionExperimentReportService {\n\n /**\n * Invalidate the cached 'report' for the experiment with the given id. If it is not cached nothing happens.\n *\n * @param id the id of the entity to evict\n */\n void evictFromCache( Long id );\n\n /**\n * Generate a value object that contain summary information about links, biomaterials, and datavectors\n *\n * @param id the id of the ee to generate summary for\n * @return details VO\n */\n ExpressionExperimentDetailsValueObject generateSummary( Long id );\n\n /**\n * Generates reports on ALL experiments, including 'private' ones. This should only be run by administrators as it\n * takes a while to run.\n */\n @Secured({ \"GROUP_AGENT\" })\n Collection<ExpressionExperimentDetailsValueObject> generateSummaryObjects();\n\n void getAnnotationInformation( Collection<ExpressionExperimentDetailsValueObject> vos );\n\n void populateEventInformation( Collection<ExpressionExperimentDetailsValueObject> vos );\n\n /**\n * Fills in link analysis and differential expression analysis summaries, and other info from the report.\n *\n * @param vos value objects\n */\n void populateReportInformation( Collection<ExpressionExperimentDetailsValueObject> vos );\n\n /**\n * retrieves a collection of cached value objects containing summary information\n *\n * @param ids the ids of ees for which the summary objects should be retrieved.\n * @return a collection of cached value objects\n */\n @SuppressWarnings(\"unused\")\n // Possible external use\n Collection<ExpressionExperimentDetailsValueObject> retrieveSummaryObjects( Collection<Long> ids );\n\n /**\n * Recalculates the batch effect and batch confound information for datasets that have been updated\n * in the last 24 hours.\n */\n @SuppressWarnings(\"unused\") // Used by scheduler\n @Secured({ \"GROUP_AGENT\" })\n void recalculateBatchInfo();\n\n /**\n * Recalculates the batch effect and batch confound information for the given dataset.\n * @param ee the experiment to recalculate the batch properties for.\n */\n @Secured({ \"GROUP_AGENT\" })\n void recalculateExperimentBatchInfo( ExpressionExperiment ee );\n}", "public interface DailyReportService {\n /**\n * 通过时间获取日报表\n * @param dailyRportQueryDTO\n * @return\n */\n List<DailyReportDO> getDailyReportByTime(DailyRportQueryDTO dailyRportQueryDTO);\n}", "@RequestMapping(value = \"/executeSavedReport\", method = {RequestMethod.POST, RequestMethod.GET})\n public ModelAndView executeSavedReport(@RequestParam(\"dir\") String directoryName,\n @RequestParam(\"file\") String fileName, HttpServletRequest request) {\n request.setAttribute(\"decorator\", \"empty\");\n ApplicationProperties properties = ApplicationProperties.getInstance();\n ExecuteReport executeReport = new ExecuteReport();\n ModelAndView serviceLoadView = new ModelAndView();\n FileOperationsUtility fileOperationsUtility = new FileOperationsUtility();\n String solutionFolder = properties.getSolutionDirectory();\n File directory = new File(solutionFolder + File.separator + directoryName);\n\n String searchResult = fileOperationsUtility.search(solutionFolder, fileName);\n\n String path = searchResult == null ? \"\" : searchResult;\n if ((directoryName == null) || \"\".equalsIgnoreCase(directoryName)) {\n checkPath(path);\n } else if (!directory.isDirectory()) {\n checkPath(path);\n } else {\n File theFile = new File(properties.getSolutionDirectory() + File.separator +\n directoryName + File.separator + fileName);\n if (!theFile.exists()) {\n checkPath(path);\n }\n }\n\n logger.debug(\"Trying to get JSON for the resource \" + path);\n\n Efwsr efwsr = JaxbUtils.unMarshal(Efwsr.class, new File(path));\n /*\n * Get the saved JSON from the rdf/efwsr file. Convert string to JSONObject\n */\n String efwDirectory = efwsr.getReportDirectory();\n String efwFile = efwsr.getReportFile();\n\n /***************************************************/\n this.setUnsetRefresh(request, efwFile, efwDirectory);\n /***************************************************/\n\n ControllerUtils.addUrlParameters(request, serviceLoadView);\n\n JSONObject parametersJSON = (JSONObject) JSONSerializer.toJSON(efwsr.getReportParameters());\n String dirPath;\n int index = efwFile.lastIndexOf(\".\");\n List<String> list = executeReport.execute(efwDirectory, efwFile, parametersJSON);\n String templateData = list.get(0);\n dirPath = list.get(1);\n serviceLoadView.addObject(\"templateData\", templateData);\n serviceLoadView.setViewName(\"serviceLoadView\");\n\n JSONObject attributeValue = ResponseUtils.reportContentAsJson(efwsr);\n\n logger.debug(\"Parameters of the report are \" + attributeValue);\n serviceLoadView.addObject(\"reportParameters\", attributeValue);\n logger.debug(\"The Efwsr controller. The view is \" + serviceLoadView);\n\n serviceLoadView.addObject(\"dir\", dirPath.replace(\"\\\\\", \"\\\\\\\\\"));\n return serviceLoadView;\n }", "public interface WaterReportService {\n\n List<WaterReportDto> list(String code, Integer pageSize, Integer pageNum);\n\n List<WaterStation> listStation();\n\n WaterStation getStationInfoByName(String name);\n}", "private ReportService() { }", "public void setReport(Report report);", "public interface IStatisticsService {\r\n /**\r\n * 统计分析查询\r\n */\r\n public List<StatisticsEntity> qryStatisticsData(StatisticsEntity statisticsEntity);\r\n\r\n public List<StatisticsReportEntity> qryStatisticsReportData(StatisticsReportEntity statisticsReportEntity);\r\n\r\n}", "public SSTBrexitDashboardService() {\n\t\tuserTeamDataService = new UserTeamDBDataService();\n\t\tindexDashboardService = new IndexDBDataService();\n\t}", "private static GetReportsResponse getReport(Analyticsreporting service) throws IOException {\n // Create the DateRange object.\n DateRange dateRange = new DateRange();\n dateRange.setStartDate(\"7DaysAgo\");\n dateRange.setEndDate(\"today\");\n\n // Create the Metrics object.\n Metric sessions = new Metric()\n .setExpression(\"ga:sessions\")\n .setAlias(\"sessions\");\n\n //Create the Dimensions object.\n Dimension browser = new Dimension()\n .setName(\"ga:browser\");\n\n // Create the ReportRequest object.\n ReportRequest request = new ReportRequest()\n .setViewId(VIEW_ID)\n .setDateRanges(Arrays.asList(dateRange))\n .setDimensions(Arrays.asList(browser))\n .setMetrics(Arrays.asList(sessions));\n\n ArrayList<ReportRequest> requests = new ArrayList<ReportRequest>();\n requests.add(request);\n\n // Create the GetReportsRequest object.\n GetReportsRequest getReport = new GetReportsRequest()\n .setReportRequests(requests);\n\n // Call the batchGet method.\n GetReportsResponse response = service.reports().batchGet(getReport).execute();\n\n // Return the response.\n return response;\n }", "public List<ReportDTO> getAllReports() {\r\n\r\n\t\tdateConverter = new DateConverter();\r\n\r\n\t\tList<Report> reports = (List<Report>) reportsRepository.findAll();\r\n\t\tList<ReportDTO> reportDTOs = new ArrayList<>();\r\n\r\n\t\tfor (Report report : reports) {\r\n\t\t\tReportDTO reportDTO = new ReportDTO();\r\n\t\t\treportDTO.setId(report.getId());\r\n\t\t\treportDTO.setCustomerName(report.getCustomer().getCustomerName());\r\n\t\t\treportDTO.setPlace(report.getPlace());\r\n\t\t\treportDTO.setOrderNumber(report.getOrderNumber());\r\n\t\t\treportDTO.setQualityLevel(report.getQualityLevel().getValue());\r\n\t\t\treportDTO.setTypeOfTesting(report.getTypeOfTesting());\r\n\t\t\treportDTO.setReportNumber(report.getReportNumber());\r\n\t\t\treportDTO.setExaminatedObject(report.getExaminatedObject());\r\n\t\t\treportDTO.setMeasuringEquipment(\r\n\t\t\t\t\treport.getMeasuringEquipment().getName() + \" \" + report.getMeasuringEquipment().getDeviceCode());\r\n\t\t\treportDTO.setTechnicalDocument(\r\n\t\t\t\t\treport.getTechnicalDocument().getNumber() + \" \" + report.getTechnicalDocument().getTitle());\r\n\r\n\t\t\treportDTO.setExaminationDate(dateConverter.createDateToString(report.getExaminationDate()));\r\n\t\t\treportDTO.setPerformer(report.getPerformer().getFirstName() + \" \" + report.getPerformer().getLastName());\r\n\t\t\treportDTO.setAprover(report.getPerformer().getFirstName() + \" \" + report.getPerformer().getLastName());\r\n\r\n\t\t\tList<ResultsOfExamination> resultsOfExaminations = resultsOfExaminationRepository.findByReport(report);\r\n\t\t\tList<ResultOfExaminationDTO> resultOfExaminationDTOs = new ArrayList<>();\r\n\r\n\t\t\tfor (ResultsOfExamination resultsOfExamination : resultsOfExaminations) {\r\n\t\t\t\tResultOfExaminationDTO resultOfExaminationDTO = new ResultOfExaminationDTO();\r\n\t\t\t\tresultOfExaminationDTO.setElementNumber(resultsOfExamination.getElementNumber());\r\n\t\t\t\tresultOfExaminationDTO\r\n\t\t\t\t\t\t.setDistanceFromReferencePoint(resultsOfExamination.getDistanceFromReferencePoint());\r\n\t\t\t\tresultOfExaminationDTO.setIndicationLength(resultsOfExamination.getIndicationLength());\r\n\t\t\t\tresultOfExaminationDTO.setImperfectionSymbol(resultsOfExamination.getImperfectionSymbol());\r\n\t\t\t\tresultOfExaminationDTO.setRemarks(resultsOfExamination.getRemarks());\r\n\t\t\t\tresultOfExaminationDTO.setResult(resultsOfExamination.getResult());\r\n\t\t\t\tresultOfExaminationDTOs.add(resultOfExaminationDTO);\r\n\t\t\t\treportDTO.setResultsOfExaminationtsList(resultOfExaminationDTOs);\r\n\t\t\t}\r\n\r\n\t\t\treportDTOs.add(reportDTO);\r\n\r\n\t\t}\r\n\t\treturn reportDTOs;\r\n\r\n\t}", "@RequestMapping(value = \"/report\", method = RequestMethod.POST)\n\t@ResponseBody\n\tString getReport(HttpServletRequest request, HttpServletResponse response) {\n\n\t\t// Get the Logged in User\n\t\tString name = getLoggedUser();\n\n\t\tString email = request.getParameter(\"email\");\n\t\tRetrieveItems ri = new RetrieveItems(env);\n\t\tList<WorkItem> theList = ri.getItemsDataSQLReport(name);\n\t\tWriteExcel writeExcel = new WriteExcel();\n\t\tSendMessages sm = new SendMessages(env);\n\t\tjava.io.InputStream is = writeExcel.exportExcel(theList);\n\n\t\ttry {\n\t\t\tsm.sendReport(is, email);\n\t\t}catch (IOException e) {\n\t\t\te.getStackTrace();\n\t\t}\n\t\treturn \"Report is created\";\n\t}", "public interface PerformancesService {\n void create();\n List<Performances> findAll();\n}", "public interface AnalysisService {\n /**\n * 数据对比\n *\n * @param startTime 开始时间\n * @param endTime 结束时间\n * @param orgId 对比的机构id\n * @return\n */\n Object crossDataCompare(Date startTime, Date endTime, List<Integer> orgId);\n\n /**\n * 虎符质检综合报表\n *\n * @param conditions\n * @return\n */\n Page<ReportReturn> reportQualityWeekQuery(AnalyzeConditions conditions);\n /**\n * 102-虎符质检抽查打分表\n *\n * @param conditions\n * @return\n */\n //Page<QualityWeek> reportQualityWeekQuery(AnalyzeConditions conditions);\n\n /**\n * 103-军团策略与分析报告\n *\n * @param conditions\n * @return\n */\n Page<Analyze> reportAnalyzeQuery(AnalyzeConditions conditions);\n\n /**\n * 104-工作量报表\n *\n * @param conditions\n * @return\n */\n Page<WeekReport> reportWeekWorkQuery(AnalyzeConditions conditions);\n\n /**\n * 105策略话术\n *\n * @param conditions\n * @return\n */\n Page<Strategy> reportStrategyWordsQuery(AnalyzeConditions conditions);\n\n\n}", "public interface DailyFightGroupOrderReportService {\n\n /**\n * 返回导出的数据\n * @param startTime\n * @param endTime\n * @return\n */\n List<List<Object>> listFightGroupOrderReport(Date startTime,Date endTime);\n}", "@Override\n\tpublic void saveReports(List<FrequencyReport> reports){\n\t\tif(reports==null){\n\t\t\treturn;\n\t\t}\n\t\tSession session = null;\n\t\ttry{\n\t\t\tsession = HibernateUtil.getSeesion();\n\t\t\tsession.beginTransaction();\n\t\t\tIterator<FrequencyReport> its = reports.iterator();\n\t\t\twhile (its.hasNext()) {\n\t\t\t\tFrequencyReport report = its.next();\n\t\t\t\tString hql = \"from FrequencyReport where campaign_id=:campaign_id and ad_id=:ad_id\"\n\t\t\t\t\t\t+ \" and publication_id=:publication_id and zone_id=:zone_id and date=:date\";\n\t\t\t\tQuery query = session.createQuery(hql);\n\t\t\t\tquery.setParameter(\"campaign_id\", report.getCampaign_id());\n\t\t\t\tquery.setParameter(\"ad_id\", report.getAd_id());\n\t\t\t\tquery.setParameter(\"publication_id\", report.getPublication_id());\n\t\t\t\tquery.setParameter(\"zone_id\", report.getZone_id());\n\t\t\t\tquery.setParameter(\"date\", report.getDate());\n\t\t\t\tFrequencyReport report_saved = (FrequencyReport) query.uniqueResult();\n\t\t\t\tif(report_saved==null){\n\t\t\t\t\tsession.save(report);\n\t\t\t\t}else{\n\t\t\t\t\tfor(int i=1; i<=30; i++){\n\t\t\t\t\t\tsetReportFrequency(report_saved, i, getReportFrequencyNumber(report, i));\n\t\t\t\t\t}\n\t\t\t\t\tsession.update(report_saved);\n\t\t\t\t}\n\t\t\t\tsession.flush();\n\t\t\t}\n\t\t\tsession.getTransaction().commit();\n\t\t}catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tlog.error(\"FrequencyTask error\",e);\n\t\t}finally{\n\t\t\tif(session!=null){\n\t\t\t\tsession.close();\n\t\t\t}\n\t\t}\n\t}", "public interface SupplierIndexService {\n\n /**\n * 供应商全量脚本\n */\n @Export\n Response<Boolean> fullDump();\n\n /**\n * 供应商增量脚本\n * @param interval 时间间隔,单位分钟,一般为15分钟\n */\n @Export(paramNames = {\"interval\"})\n Response<Boolean> deltaDump(int interval);\n\n /**\n *\n * @param ids 供应商id列表\n * @param status 供应商状态\n */\n Response<Boolean> realTimeIndex(List<Long> ids, User.SearchStatus status);\n}", "@Override\n public ResponseEntity<?> createReport(OutputReport report) throws IOException, MessagingException {\n Date endDate = midnight();\n Date startDate = midnight();\n if (report.getReportType() == 0) {\n endDate = midnight();\n startDate = setDateBefore(1);\n } else if (report.getReportType() == 1) {\n endDate = midnight();\n startDate = setDateBefore(7);\n } else if (report.getReportType() == 2) {\n endDate = midnight();\n startDate = setDateBefore(30);\n } else if (report.getReportType() == 3) {\n endDate = new Date(report.getEndDate());\n startDate = new Date(report.getStartDate());\n }\n ExcelHelper.writeExcel(report.getReportItemList(), \"NiceJavaBooks.xls\", report.getTotalRevenue());\n Place place = placeRepository.findById(report.getPlaceId()).get();\n String content = \"\";\n if(report.getReportType() == 0){\n content = \"Daily sales report\";\n }else if(report.getReportType() == 1){\n content = \"Weekly sales report\";\n }else if(report.getReportType() == 2){\n content = \"Monthly sales report\";\n }else if(report.getReportType() == 3){\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd/MM/yyyy\");\n content = \"Sales report from \"+formatter.format(startDate)+\" to \"+formatter.format(endDate);\n }\n sendEmail(new File(\"NiceJavaBooks.xls\"), place.getMail(), content);\n return ResponseEntity.ok(\"OK\");\n }", "public Result saveStudyReport(String identifier) throws Exception {\n UserSession session = getAuthenticatedSession(DEVELOPER, WORKER);\n \n ReportData reportData = parseJson(request(), ReportData.class);\n reportData.setKey(null); // set in service, but just so no future use depends on it\n \n reportService.saveStudyReport(session.getStudyIdentifier(), identifier, reportData);\n \n return createdResult(\"Report data saved.\");\n }", "public interface ReportsDownloader {\n Organizer getOrganizer();\n\n /**\n * Add a new report resolver with the given host type\n * @param hostType the host type\n * @param reportResolver the report resolver to use for the host type\n */\n void addReportResolver(final String hostType, final ReportResolver reportResolver);\n void downloadLastSuccessful(final String type, final String host);\n void downloadLastFailed(final String type, final String host);\n void downloadAny(final String type, final String host, final String testNumber);\n\n void waitForComplete();\n}", "public void saveReports(Context context, List<Report> reports) {\n SharedPreferences settings;\n SharedPreferences.Editor editor;\n\n settings = context.getSharedPreferences(PREFS_NAME,\n Context.MODE_PRIVATE);\n editor = settings.edit();\n\n Gson gson = new Gson();\n String jsonFavorites = gson.toJson(reports);\n\n editor.putString(REPORTS, jsonFavorites);\n\n editor.commit();\n }", "public interface ReportHandlerInterface {\r\n\r\n /**\r\n * Retrieve a Statistic Report.<br/>\r\n * <p/>\r\n * Parameter for the Method is an xml corresponding to XML-schema \"report-parameters.xsd\".<br/>\r\n * <p/>\r\n * In this xml you can define:<br/>\r\n * <p/>\r\n * <ul> <li>The Report Definition the Statistic Report is based on</li> <li>Additional parameters that fill the\r\n * placeholders in the sql-statement of the Report Definition.</li> </ul>\r\n * <p/>\r\n * <b>Prerequisites:</b><br/>\r\n * <p/>\r\n * The Report Definition must exist<br/>\r\n * <p/>\r\n * <b>Tasks:</b><br/> <ul> <li>The Report Definition is accessed using the provided reference.</li> <li>The\r\n * Statistic Report is created.</li> <li>The XML data is returned.</li> </ul>\r\n *\r\n * @param xml The xml with parameters corresponding to XML-schema \"report-parameters.xsd\".\r\n * @return The XML representation of the retrieved Statistic Report corresponding to XML-schema \"report.xsd\".\r\n * @throws AuthenticationException Thrown in case of failed authentication.\r\n * @throws AuthorizationException Thrown in case of failed authorization.\r\n * @throws XmlCorruptedException Thrown in case of provided invalid xml.\r\n * @throws XmlSchemaValidationException Thrown in case of provided xml not schema conform.\r\n * @throws ReportDefinitionNotFoundException\r\n * e.\r\n * @throws MissingMethodParameterException\r\n * e.\r\n * @throws InvalidSqlException e.\r\n * @throws SystemException e.\r\n */\r\n @Validate(param = 0, resolver = \"getReportParametersSchemaLocation\")\r\n String retrieve(String xml) throws AuthenticationException, AuthorizationException, XmlCorruptedException,\r\n XmlSchemaValidationException, ReportDefinitionNotFoundException, MissingMethodParameterException,\r\n InvalidSqlException, SystemException;\r\n\r\n}", "public interface ReportControllerInterface {\n /**\n * Find all list.\n *\n * @return the list\n */\n public List<ItemInfo> FindAll();\n}", "private void submitReport() throws ERTRestApiException, JSONException {\n Cursor cursor = getReportStatusCursor(SyncStatus.REPORT_PENDING);\n\n if(cursor.getCount() != 0) {\n cursor.moveToFirst();\n\n\n do {\n final Long reportBaseId = cursor.getLong(\n cursor.getColumnIndex(ReportEntry._ID)\n );\n ExpenseReport expenseReport = Utility.createExpenseReportFromCursor(cursor);\n\n ERTRestApi.apiSubmitReport(expenseReport,\n new ERTRestApi\n .ERTRestApiListener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n Log.d(LOG_TAG, \"Report \" + reportBaseId + \" submitted\");\n updateReportSyncStatus(reportBaseId, SyncStatus.SYNCED);\n }\n },\n new ERTRestApi.ERTRestApiErrorListener() {\n @Override\n public void onErrorResponse(ERTRestApi\n .ERTRestApiError error) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(ReportEntry.COLUMN_STATUS, Status.SAVED.getValue());\n\n getContext().getContentResolver().update(\n ReportEntry.buildReportUriNoNetworkSync(reportBaseId),\n contentValues,\n null,\n null\n );\n updateReportSyncStatus(reportBaseId, SyncStatus.SYNCED);\n }\n }\n\n );\n\n updateReportSyncStatus(reportBaseId, SyncStatus.SYNC_IN_PROGRESS);\n\n } while (cursor.moveToNext());\n }\n cursor.close();\n }", "public void getReportManually() {\n File reportDir = new File(KOOM.getInstance().getReportDir());\n for (File report : reportDir.listFiles()) {\n //Upload the report or do something else.\n }\n }", "@RequestMapping(method = RequestMethod.GET)\n public ModelAndView getReportPage() {\n ModelAndView modelAndView = new ModelAndView();\n modelAndView.setViewName(\"report\");\n modelAndView.addObject(\"performers\", reportService.getAllPerformers());\n return modelAndView;\n }", "public static void CreateReport() {\n\t\tString fileName = new SimpleDateFormat(\"'Rest_Country_Report_'YYYYMMddHHmm'.html'\").format(new Date());\n\t\tString path = \"Report/\" + fileName;\n\t\treport = new ExtentReports(path);\n\t}", "public synchronized static ExtentReports getReporter(String filePath) {\n\t\t if (report == null) {\r\n\t\t \treport = new ExtentReports(path.concat(\"Report\\\\Purchase_Admin_Report.html\"));\r\n\t\t \r\n\t\t report\r\n\t\t .addSystemInfo(\"Host Name\", \"Priti\") //Environment Setup For Report\r\n\t\t .addSystemInfo(\"Environment\", \"QA\");\r\n\t\t }\r\n\t\t \r\n\t\t return report;\r\n\t\t}", "void onGetAllDataReport(List<Report> reports, Sumary sumary);", "public interface IReportDao extends IBaseDao<Report, Integer> {\n\t\n\t/**\n\t * 添加举报信息\n\t * @param report\n\t */\n\tpublic boolean addReport(Report report);\n\t\n\t/**\n\t * 修改举报信息\n\t * @param report\n\t * @return\n\t */\n\tpublic boolean updateReport(Report report);\n\t\n//\t/**\n//\t * 是否已经举报\n//\t * @param getReportGto\n//\t * @return\n//\t */\n//\tpublic boolean isHouseInfoReported(GetReportGto getReportGto);\n\t\n\t/**\n\t * 获取我与某条房源的举报信息\n\t * @param getReportGto\n\t * @return\n\t */\n\tpublic List<Report> getMyReport(GetReportGto getReportGto);\n}", "public void registerReports() throws Exception{\n \tGenericPatientSummary ps = new GenericPatientSummary();\n \tps.delete();\n \tps.setup();\n }", "private ReportRepository() {\n ConnectionBD BD = ConnectionBD.GetInstance();\n this.con = BD.GetConnection();\n this.itemInfoFactory = ItemInfoFactory.GetInstance();\n }", "BugReportService getService() {\n return BugReportService.this;\n }", "public static ExtentReports getInstance() {\n\t\t\n\t\tExtentReports extent;\n\t\tString Path=System.getProperty(\"user.dir\")+\"//Reports//report.html\";\n\t\t//String Path = \"//Users//atomar//Desktop//report-demo.html\";\n\t\textent = new ExtentReports(Path, false);\n\t\t\n\n\t\treturn extent;\n\t\n//\t\tDateFormat df = new SimpleDateFormat(\"dd/MM/yy HH:mm:ss\");\n//\t\tDate dateobj = new Date();\n//\t\tString reportname=\"SmokeTest\"+ df.format(dateobj).replaceAll(\" \", \"_\").replaceAll(\"/\", \"_\").replace(\":\", \"_\");\n//\t\t\t\t\n//\t\t\n//\t\tString Path=System.getProperty(\"user.dir\");\n//\t\tPath=Path+\"/Reports\";\n//\t\t Path=Path+\"/\"+reportname+\".html\";\n\t\t \n\t\t//String Path = \"E:\\\\Office\\\\JobSupport\\\\Inkbox_UITestFramework\\\\Inkbox_UITestFramework\\\\Reports\\\\report-demo.html\";\n//\t\textent = new ExtentReports(launchDriver.getReportPath(), false);\n//\t\tSystem.out.println(\"Report path :\"+launchDriver.getReportPath());\n//\n//\t\treturn extent;\n\t}", "public void saveResults();", "@POST\n public Response startStorageReport(){\n log.debug(\"Starting storage report\");\n\n try {\n String responseText = resource.startStorageReport();\n return responseOk(responseText);\n } catch (Exception e) {\n return responseBad(e);\n }\n }", "@Override\n public void reportSmartDashboard() {\n }", "public interface WatchService {\n @DataSource(DataSourceType.WRITE)\n public int addWatchForm(WatchForm watchForm);\n\n @DataSource(DataSourceType.READ)\n public WatchFormDto queryLastWatchFormByName(String name);\n\n @DataSource(DataSourceType.READ)\n public WatchFormDto queryWatchFormByOpenId(String openId);\n\n @DataSource(DataSourceType.READ)\n public List<WatchFormDto> queryLastWatchFormByNameWeek(String name);\n\n\n @DataSource(DataSourceType.READ)\n public List<WatchFormDto> queryLastWatchFormByNameMonth(String name);\n\n @DataSource(DataSourceType.READ)\n public Long queryAvgWatchFormByNameDay(String name,int day);\n\n @DataSource(DataSourceType.READ)\n public WatchZheXian queryLastWatchFormByOpenIdWeek(String openId);\n\n @DataSource(DataSourceType.READ)\n public WatchZheXian queryLastWatchFormByOpenIdMonth(String openId);\n\n @DataSource(DataSourceType.READ)\n public Long queryAvgWatchFormByOpenIdDay(String openId,int day);\n\n @DataSource(DataSourceType.READ)\n public WatchAllChildren queryOneTeacherAllChildrenByOpenIdWeek(String openId);\n\n @DataSource(DataSourceType.READ)\n public WatchAllChildren queryOneTeacherAllChildrenByOpenIdMonth(String openId);\n @DataSource(DataSourceType.READ)\n public WatchAllChildren queryAllChildrenByOpenIdMonth();\n @DataSource(DataSourceType.READ)\n public WatchAllChildren queryAllChildrenByOpenIdWeek();\n}", "public interface StatisticsService {\n\n public void addStatistics(Statistics statistics);\n\n public void updateStatisctics(Statistics statistics);\n\n public void deleteStatistics(Statistics statistics);\n\n public Statistics finsStatistics(int id);\n\n public List<Statistics> findStatistics();\n\n public List<Statistics> findStatisticsByUser(User user);\n}", "@Override\r\n\tpublic List<Report> getAllReport(int firstRow, Integer pageSize,\r\n\t\t\tReportSearchVO reportSearchVO) throws SQLException {\n\t\treturn reportDao.getAllReport(firstRow, pageSize, reportSearchVO);\r\n\t}", "public static ExtentReports getReportInstance() {\n\t\tif (report == null) {\n\n\t\t\tString reportName = \"HTMLreport_\" + getTimeStamp() + \".html\";\n\t\t\tExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(System.getProperty(\"user.dir\") +\n\t\t\t\t\t\"\\\\src\\\\test\\\\resources\\\\test_result\\\\\" + reportName);\n\t\t\n\t\t\treport = new ExtentReports();\n\t\t\treport.attachReporter(htmlReporter);\n\n\t\t\treport.setSystemInfo(\"OS\", \"Windows 10\");\n\t\t\treport.setSystemInfo(\"Environment\", \"UAT\");\n\t\t\treport.setSystemInfo(\"Browsers\", \"Chrome and Edge\");\n\n\t\t\thtmlReporter.config().setDocumentTitle(\"Identify New Bikes - HTML Report\");\n\t\t\thtmlReporter.config().setReportName(\"UI Test Report\");\n\t\t\thtmlReporter.config().setTimeStampFormat(\"MMM dd, yyyy HH:mm:ss\");\n\t\t}\n\n\t\treturn report;\n\t}", "public interface SaveService {\n void sys();\n}", "public interface SubmissionService {\n List<Submission> getAll();\n\n Submission get(long id);\n\n Submission create(Submission submission);\n\n Submission update(Submission submission);\n}", "public interface DAO {\n\n /* -------------------------------------------------------------------------------\n Helper method to set parser-specific override configuration parameters\n ------------------------------------------------------------------------------- */\n public void setConfiguration(Properties props);\n\n public Properties getConfiguration();\n\n /* -------------------------------------------------------------------------------\n Methods for REPORT FORMAT generation\n ------------------------------------------------------------------------------- */\n\n /**\n * MANDATORY - Must return some experiment title. In case no title\n * is provided by the search enginge's result file, a default title\n * should be returned.\n * @return \n */\n public String getExperimentTitle() throws InvalidFormatException;\n\n /**\n * OPTIONAL - Should return null in case this option is not supported\n * by the search engine.\n * @return \n */\n public String getExperimentShortLabel();\n\n /**\n * MANDATORY - As a minimal requirement the date of search and the original\n * MS data file format should be set.\n * @return \n */\n public Param getExperimentParams() throws InvalidFormatException;\n\n /**\n * OPTIONAL - Should return null in case it's not supported by the search engine.\n * @return \n */\n public String getSampleName();\n\n /**\n * OPTIONAL - Should return null in case it's not supported by the search engine.\n * @return \n */\n public String getSampleComment();\n\n /**\n * MANDATORY - As a minimal requirement the sample's species should be returned.\n * @return \n */\n public Param getSampleParams() throws InvalidFormatException;\n\n /**\n * MANDATORY - Represents the input file for the conversion.\n * @return \n */\n public SourceFile getSourceFile() throws InvalidFormatException;\n\n /**\n * OPTIONAL - Should return null in case it's not supported by the search engine.\n * @return \n */\n public Collection<Contact> getContacts();\n\n /**\n * OPTIONAL - Should return null in case it's not supported by the search engine.\n * @return \n */\n public InstrumentDescription getInstrument();\n\n /**\n * MANDATORY - The search engine's name and version.\n * @return \n */\n public Software getSoftware() throws InvalidFormatException;\n\n /**\n * OPTIONAL - Should return null in case it's not supported by the search engine.\n * @return \n */\n public Param getProcessingMethod();\n\n /**\n * OPTIONAL - Should return null in case it's not supported by the search engine.\n * @return \n */\n public Protocol getProtocol();\n\n /**\n * OPTIONAL - Should return null in case it's not supported by the search engine.\n * @return \n */\n public Collection<Reference> getReferences();\n\n //these will be written to the FASTA attributes and will be used in the FASTA section\n // if there are multiple sequence files, the search database name will be a string-delimited\n // concatenation of all the names. Idem for version.\n\n /**\n * MANDATORY - these will be written to the FASTA attributes and will be used\n * in the FASTA section if there are multiple sequence files, the search database\n * name will be a string-delimited concatenation of all the names. Idem for version.\n * @return \n */\n public String getSearchDatabaseName() throws InvalidFormatException;\n\n /**\n * MANDATORY - see getSearchDatabaseName\n * @return \n */\n public String getSearchDatabaseVersion() throws InvalidFormatException;\n\n /**\n * MANDATORY - Should return a collection of PTMs representing all PTMs that are used\n * in this search. Collection can be empty but not null.\n * @return \n */\n public Collection<PTM> getPTMs() throws InvalidFormatException;\n\n /**\n * MANDATORY - Should return a collection of DatabaseMappings that contain all search database names and versions\n * used in this search. Collection can be empty but not null.\n * @return \n */\n public Collection<DatabaseMapping> getDatabaseMappings() throws InvalidFormatException;\n\n /**\n * MANDATORY - Must return a valid SearchResultIdenfier object\n * @return \n */\n public SearchResultIdentifier getSearchResultIdentifier() throws InvalidFormatException;\n\n /**\n * MANDATORY - Must return a non-null list of all CV lookups used by the DAO\n * @return \n */\n public Collection<CV> getCvLookup() throws InvalidFormatException;\n\n /**\n * MANDATORY - Must returns a count of the number of spectra. if onlyIdentified is true, return only count\n * of identified spectra. If false, return count of all spectra.\n * @return \n */\n public int getSpectrumCount(boolean onlyIdentified) throws InvalidFormatException;\n\n /* -------------------------------------------------------------------------------\n Methods for XML output\n ------------------------------------------------------------------------------- */\n\n /**\n * returns an iterator for spectra in the source file - if onlyIdentified is true, return only identified\n * spectra. If false, return all spectra\n * @return \n */\n\n public Iterator<Spectrum> getSpectrumIterator(boolean onlyIdentified) throws InvalidFormatException;\n\n /**\n * must return -1 if no spectrum ref found\n * @return \n */\n public int getSpectrumReferenceForPeptideUID(String peptideUID) throws InvalidFormatException;\n\n /**\n * This function provides random access to the identifications.\n * It is only used in scan mode!\n *\n * @param identificationUID\n * @return\n * @throws uk.ac.ebi.pride.tools.converter.utils.InvalidFormatException\n */\n public Identification getIdentificationByUID(String identificationUID) throws InvalidFormatException;\n\n\n /* -------------------------------------------------------------------------------\n Shared methods\n ------------------------------------------------------------------------------- */\n\n /**\n * This method will return an iterator that will return individual identification objects.\n * In prescanMode the complete Identification and Peptide objects should be returned\n * <b>without</b> the peptide's fragment ion annotation. Peptide items have to contain\n * all the PTMs. <br>\n * In conversionMode (= !prescanMode) Peptide and Protein objects should <b>NOT</b> contain\n * any additional parameters and peptidePTMs should <b>NOT</b> be included. Peptide\n * FragmentIon annotations are mandatory (if applicable) in scanMode.\n * The identification iterator may return null for an identification\n * @return \n */\n public Iterator<Identification> getIdentificationIterator(boolean prescanMode) throws InvalidFormatException;\n /**\n * Sets the external spectrum file to the given filename. This function\n * is ignored by DAOs that do not require external spectrum files.\n * @param filename\n */\n public void setExternalSpectrumFile(String filename);\n\n /*\n These handlers need to be passed to the IdentificationIterator so that the identification objects can be properly\n decorated with the requested information, if available.\n */\n\n}", "public String getReportPath();", "public interface IReportController extends IController, IBrowsable {\n\n void actionReadReports();\n\n void actionNewReport();\n\n void actionNewReport(RunningTeam runningTeam);\n\n void actionCreateReport(Report report);\n\n void actionShowReport(Report report);\n\n void actionUpdateReport(Report report);\n\n void actionRemoveReport(Report report);\n\n void actionSaveLeadEvaluation(LeadEvaluation leadEvaluation);\n\n void actionSaveIndividualEvaluations(List<IndividualEvaluation> individualEvaluations);\n}", "public void generateReport(ReportGenerationData data)throws ChangeApplicationException;", "public ModelExportToExcelService() {\n\t\tsuper();\n\t}", "public ActionReport getActionReport();", "public Object getSalesInstanceReport() {\n return salesInstanceReport;\n }", "public interface BalanceSheetService {\n\n /**\n * Save a balanceSheet.\n *\n * @param balanceSheetDTO the entity to save\n * @return the persisted entity\n */\n BalanceSheetDTO save(BalanceSheetDTO balanceSheetDTO);\n\n /**\n * Get all the balanceSheets.\n *\n * @param pageable the pagination information\n * @return the list of entities\n */\n Page<BalanceSheetDTO> findAll(Pageable pageable);\n\n /**\n * Get the \"id\" balanceSheet.\n *\n * @param id the id of the entity\n * @return the entity\n */\n BalanceSheetDTO findOne(Long id);\n\n /**\n * Delete the \"id\" balanceSheet.\n *\n * @param id the id of the entity\n */\n void delete(Long id);\n}", "public Result saveStudyReportForWorker(String studyIdString, String identifier) throws Exception {\n getAuthenticatedSession(WORKER);\n\n ReportData reportData = parseJson(request(), ReportData.class);\n reportData.setKey(null); // set in service, but just so no future use depends on it\n\n StudyIdentifier studyId = new StudyIdentifierImpl(studyIdString);\n reportService.saveStudyReport(studyId, identifier, reportData);\n\n return createdResult(\"Report data saved.\");\n }", "private interface ReportCallback\n {\n void handleReport(DashboardReport report) throws MojoExecutionException;\n }", "public interface PathHistoryService {\n\n /**\n * Save a pathHistory.\n *\n * @param pathHistory the entity to save\n * @return the persisted entity\n */\n PathHistory save(PathHistory pathHistory);\n\n /**\n * Get all the pathHistories.\n *\n * @param pageable the pagination information\n * @return the list of entities\n */\n Page<PathHistory> findAll(Pageable pageable);\n\n /**\n * Get the \"id\" pathHistory.\n *\n * @param id the id of the entity\n * @return the entity\n */\n PathHistory findOne(Long id);\n\n /**\n * Delete the \"id\" pathHistory.\n *\n * @param id the id of the entity\n */\n void delete(Long id);\n}", "private void saveAllReports(ExpenseReport[] expenseReports) {\n ContentValues[] expenseReportsContentValues =\n ExpenseReport.getExpenseReportContentValues(expenseReports);\n\n\n Uri uri = ReportEntry.CONTENT_URI.buildUpon().appendQueryParameter(\n ReportContract.NETWORK_SYNC, \"false\").build();\n\n int rowsInserted = getContext().getContentResolver().bulkInsert(\n uri, expenseReportsContentValues);\n Log.d(LOG_TAG, \"Reports: Bulk inserted \" + rowsInserted + \" rows\");\n\n deleteReportsFromDevice(expenseReportsContentValues);\n }", "public interface ComponentUsageReportService {\n\n /**\n * Gets report view.\n *\n * @return the report view\n */\n String getReportView();\n\n /**\n * Base path string.\n *\n * @return the string\n */\n String basePath();\n\n /**\n * Tool path string.\n *\n * @return the string\n */\n String toolPath();\n\n /**\n * Include libs component boolean.\n *\n * @return the boolean\n */\n boolean includeLibsComponent();\n\n /**\n * Open page in edit mode boolean.\n *\n * @return the boolean\n */\n boolean openPageInEditMode();\n\n /**\n * Gets used component list.\n *\n * @param resourceResolver the resource resolver\n * @param conditions the conditions\n * @param excludeChildrenPages the exclude children pages\n * @return the used component list\n */\n Query getUsedComponentList(final ResourceResolver resourceResolver, List<String> conditions,boolean excludeChildrenPages);\n\n /**\n * Gets component usage number.\n *\n * @param componentPath the component path\n * @param resourceResolver the resource resolver\n * @param paths the paths\n * @param excludeChildrenPages the exclude children pages\n * @return the component usage number\n */\n int getComponentUsageNumber(final String componentPath, final ResourceResolver resourceResolver,String[] paths,boolean excludeChildrenPages);\n\n /**\n * Gets nodes component used at.\n *\n * @param componentPath the component path\n * @param resourceResolver the resource resolver\n * @param paths the paths\n * @param excludeChildrenPages the exclude children pages\n * @return the nodes component used at\n */\n Iterator<Resource> getNodesComponentUsedAt(final String componentPath, final ResourceResolver resourceResolver, String[] paths,boolean excludeChildrenPages) ;\n}", "public interface IReportPublisher\r\n{\r\n\r\n\t/**\r\n\t * \r\n\t * @param reportResponse\r\n\t * @throws ReportingException\r\n\t */\r\n\tpublic void publish(ReportResponse reportResponse) throws ReportingException;\r\n\r\n}", "public interface ResearchService {\n\n /**\n * Save a research.\n *\n * @param research the entity to save\n * @return the persisted entity\n */\n Research save(Research research);\n\n /**\n * Get all the research.\n *\n * @param pageable the pagination information\n * @return the list of entities\n */\n Page<Research> findAll(Pageable pageable);\n\n List<ResearchDetail> queryEnabledResearchs(String name, String openId);\n\n /**\n * Get the \"id\" research.\n *\n * @param id the id of the entity\n * @return the entity\n */\n Research findOne(Long id);\n\n /**\n * Delete the \"id\" research.\n *\n * @param id the id of the entity\n */\n void delete(Long id);\n\n\n List<ResearchDetail> queryMyResearchs(String openId);\n}", "public String[] getReports()\n {\n return null;\n }", "public nl.webservices.www.soap.InsolvencyReport[] getReports() {\n return reports;\n }", "public interface DataAnalyzeService {\n\n void saveFirstLevelLeakage(FirstLevelLeakage firstLevelLeakage);\n\n /**\n * //根据换热站id拿到换热站名称\n * //然后根据换热站名称去Heatstation表中拿到换热站对应的hid\n * //然后用hid去匹配plot表,拿到plot的名称\n * //根据plot名称去cardnumberAddress表匹配,拿到房卡号\n * @return\n * @param tagid\n */\n List<Cardnumberaddress> findCardNum4RlzTagId(Integer tagid);\n\n void saveSecondLeaveLeakage(SecondLevelLeakage secondLevelLeakage);\n\n /**\n * 查询电厂在定时任务表中指定时间内用量\n * @param beginTime\n * @param endTime\n * @return\n */\n double findDCHeatNumByFirstLevelLeakage(Long beginTime, Long endTime);\n\n /**\n * 查询热力站以及上级为电厂的贸易结算系统在任务表中指定时间内用量\n * @param beginTime\n * @param endTime\n * @return\n */\n double findRLZHeatNumBySecondLevelLeakage(Long beginTime, Long endTime);\n\n /**\n * 查询时间段内一级(电厂)漏损值和对应的时间\n * @param begin\n * @param end\n * @return leakageNumList 漏损值 timeList 漏损值对应的时间\n */\n HashMap<String, ArrayList> findFirstLeakageNumAndTimeByBeginTime2EndTime(Date begin, Date end);\n\n /**\n * 查询时间段内二级(热力站,贸易)漏损值和对应的时间\n * @param begin\n * @param end\n * @return\n */\n HashMap<String, ArrayList> findSecondLeakageNumAndTimeByBeginTime2EndTime(Date begin, Date end);\n\n /**\n * 查询时间段内一级(电厂)用量和对应时间\n * @param begin\n * @param end\n * @return\n */\n HashMap<String, ArrayList> findFirstHeatNumAndTimeByBeginTime2EndTime(Date begin, Date end);\n\n /**\n * 查询时间段内二级(热力站,贸易)用量,功率,温差和对应时间\n * @param begin\n * @param end\n * @return\n */\n HashMap<String, ArrayList> findSecondHeatNumAndTimeByBeginTime2EndTime(Date begin, Date end);\n\n void saveSecondLeaveLeakageSum(SecondLevelLeakageSum secondLevelLeakageSum);\n}", "public HashMap<String, String> getReports(){\n HashMap<String, String> reports = new HashMap<>();\n reports.put(KEY_REPORTS, pref.getString(KEY_REPORTS, null));\n return reports;\n }", "public void runReport(String sReportFile)\n {\n }", "public void saveResults(){\n //Tell adapter to save gathered data\n //Call appropriate function\n }", "@Transactional\npublic interface ReportEntryDAO {\n public List<ReportEntry> findItems(final Integer sem_id, final Integer dept_id, final Integer teacher_id);\n public void create(ReportEntry reportEntry);\n\n void update(ReportEntry reportEntry);\n ReportEntry find(final Integer id);\n\n public void delete(final int id);\n\n}", "@ServiceArgument\n public interface ParseReportsArgument extends Argument {\n\n String getReportsXMLArg();\n\n void setReportsXMLArg(String reportsXMLArg);\n\n BACSDocument getReportsRet();\n\n void setReportsRet(BACSDocument reportsRet);\n }", "public Object getServicingEventLogInstanceAnalysisReport() {\n return servicingEventLogInstanceAnalysisReport;\n }", "private void generateReports() {\r\n\t\tLOGGER.debug(\"Report generation trigerred\");\r\n\t\tgenerateIncomingReport();\r\n\t\tgenerateOutgoingReport();\r\n\t\tgenerateIncomingRankingReport();\r\n\t\tgenerateOutgoingRankingReport();\r\n\t\tLOGGER.debug(\"Report generation completed\");\r\n\t}", "public static void generateReport()\n\t{\n\t\tlong time=System.currentTimeMillis();\n\t\tString reportPath=System.getProperty(\"user.dir\")+\"//automationReport//Report\"+time+\".html\";\n\t\t\n\t\thtmlreporter=new ExtentHtmlReporter(reportPath);\n\t\textent=new ExtentReports();\n\t\textent.attachReporter(htmlreporter);\n\t\t\n\t\tString username=System.getProperty(\"user.name\");\n\t\tString osname=System.getProperty(\"os.name\");\n\t\tString browsername=CommonFunction.readPropertyFile(\"Browser\");\n\t\tString env=CommonFunction.readPropertyFile(\"Enviornment\");\n\t\t\n\t\t\n\t\textent.setSystemInfo(\"User Name\", username);\n\t\textent.setSystemInfo(\"OS Name\", osname);\n\t\textent.setSystemInfo(\"Browser Name\", browsername);\n\t\textent.setSystemInfo(\"Enviornment\", env);\n\t\t\n\t\t\n\t\thtmlreporter.config().setDocumentTitle(\"Automation Report\");\n\t\thtmlreporter.config().setTheme(Theme.STANDARD);\n\t\thtmlreporter.config().setChartVisibilityOnOpen(true);\n \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic List<ReportAndSummary> findAll() {\n\t\tList<ReportAndSummary> result = reportAndSummaryDao.findAll();\r\n\t\treturn result;\r\n\t}", "@SneakyThrows\n private void pdfReport() {\n NotificationUtil.warningAlert(\"Warning\", \"Nothing to export\", NotificationUtil.SHORT);\n ServiceFactory.getPdfService().projectReport(table.getItems());\n }", "public interface ProgramSeriesService {\n\n public void save(ProgramSeries programSeries);\n\n public void delete(Long id);\n}", "public static Report createEntity() {\n\t\tReport report = new Report()\n\t\t\t\t.fromIsoCode(DEFAULT_FROM_ISO_CODE)\n\t\t\t\t.toIsoCode(DEFAULT_TO_ISO_CODE)\n\t\t\t\t.total(DEFAULT_TOTAL)\n\t\t\t\t.lastUpdated(DEFAULT_LAST_UPDATED);\n\t\treturn report;\n\t}", "public interface IChartService extends CommonService {\n /**\n * @param chartId 图表ID\n * @param requestInfo 图表请求参数\n */\n void save(String chartId, Object requestInfo, Object respInfo);\n\n /**\n * 根据x轴进行分组聚合查询\n *\n * @param tb_id 表ID\n * @param xFid 分组ID\n * @param yFid 查询字段ID\n * @param granularity 分组粒度\n * @param granularity_name\n * @param top\n * @param sort\n * @param s\n * @param toString\n * @param start_time\n * @param isMap\n * @return 返回分组查询的字段的数据集合, 多个字段就是多个集合\n */\n List<List<String>> getGroupArrayList(String tb_id, String xFid, String yFid, String granularity, JSONObject granularity_name, JSONObject top, String sort, String s, String toString, String start_time, boolean isMap);\n\n /**\n * 高级计算百分比\n * @param strings\n * @return\n */\n List<Double> percentage(List<String> strings);\n\n /**\n * 保存chart工具栏\n *\n * @param chartId\n * @param type 工具栏类型\n * @param jsonString json参数\n */\n String saveToolbar(String chartId, String type, String jsonString);\n\n /**\n * 保存chart工具栏\n *\n * @param chartId\n * @param granularity_name 工具栏日期类型自定义名称\n */\n JSONObject queryToolbarGranularity(String chartId, String granularity_name);\n\n /**\n * 筛选器ID\n * @param filterId 筛选器ID\n * @param fid\n */\n String joinTimeSql(String filterId, String fid);\n\n /**\n * 更新工具栏\n *\n * @param chartId 图表ID\n * @param optId 工具栏ID\n * @param type 工具栏类型\n * @param jsonString 工具栏详细参数\n */\n void updaToolbar(String chartId, String optId, String type, String jsonString);\n\n /**\n * 拼接筛选器sql语句\n *\n * @param filterList\n * @return\n */\n String joinFilterSql(JSONArray filterList);\n\n /**\n * 根据图表id获取到图表定义<br />\n * 如果id为空或null,将返回自动生成的图表定义和新的id<br />\n * 如果图表id对应数据不存在,自动生成图表定义<br />\n * @param chartId 图表id\n * @return json,格式如:{chart_id:\"xxxxx\", definition:{具体的图表定义}}\n */\n JSONObject fetchChart(String chartId);\n\n\n /**\n * 更新图表定义.<br />\n * 如果该id的图表不存在,将创建该图表.<br />\n * @param chartId 图表id\n * @param jsonString 图表定义的json string\n */\n void modifyChart(String chartId, String jsonString);\n}", "@Nested\n public final JDependReports getReports() {\n return reports;\n }" ]
[ "0.67476493", "0.673938", "0.66971844", "0.64871645", "0.63874894", "0.6352967", "0.63183784", "0.62723124", "0.6235039", "0.6200043", "0.609996", "0.60924286", "0.60775787", "0.60605186", "0.6043136", "0.59801656", "0.59686136", "0.5899627", "0.5866369", "0.58542997", "0.5853276", "0.5817541", "0.581287", "0.5808834", "0.57378376", "0.56930006", "0.56908745", "0.56757313", "0.56731325", "0.5671168", "0.5663073", "0.5653924", "0.56534094", "0.56526667", "0.564437", "0.56408554", "0.5638504", "0.5634652", "0.56236374", "0.5611996", "0.5579262", "0.55682635", "0.55648607", "0.55397713", "0.55330795", "0.551586", "0.5506047", "0.5500342", "0.54888123", "0.54671437", "0.54607964", "0.5459299", "0.5451247", "0.5443583", "0.54267806", "0.54261416", "0.54196775", "0.5414713", "0.5392062", "0.5367057", "0.5366001", "0.5344903", "0.53417903", "0.53308946", "0.5324545", "0.53172123", "0.52837837", "0.5282657", "0.5280165", "0.52796704", "0.5266329", "0.5261708", "0.52583873", "0.52577996", "0.5254603", "0.5250083", "0.5248068", "0.5234263", "0.52336574", "0.5230233", "0.52290773", "0.52258956", "0.52199423", "0.52102", "0.520833", "0.5198576", "0.51976997", "0.51965725", "0.5193726", "0.51932395", "0.5192535", "0.51915574", "0.5191329", "0.5183948", "0.5182618", "0.5181039", "0.5180617", "0.51762587", "0.51652986", "0.51591766" ]
0.5959754
17
Initializes the receiver with the given system resources.
public void init(IDFactory idFactory, ReportSavedListener reportSavedListener, ComboPooledDataSource dataSource) throws PersistenceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void init() {\r\n resources = new Vector<ResourcesElement>();\r\n informations = new Vector<InformationElement>();\r\n output = null;\r\n spec = DEFAULT_SPEC;\r\n version = null;\r\n codeBase = null;\r\n href = null;\r\n allPermissions = false;\r\n j2eePermissions = false;\r\n isComponent = false;\r\n applicationDesc = null;\r\n appletDesc = null;\r\n installerDesc = null;\r\n }", "public void initReceiver() {\n }", "public void init() {\n // These data structures are initialized here because other\n // module's startUp() might be called before ours\n this.systemStartTime = System.currentTimeMillis();\n }", "protected void init() {\n try {\n updateDevice();\n } catch (Exception e) {\n RemoteHomeManager.log.error(42,e);\n }\n }", "private void init() {\n\t\tinitProtocol();\n\t\tinitResultStorage();\n\t}", "public void init() {\n \t\tif (initLock.start()) {\n \t\t\ttry {\n \t\t\t\tthis._init(this.config);\n \t\t\t} finally {\n \t\t\t\tinitLock.end();\n \t\t\t}\n \t\t}\n \t}", "@Override\n\tpublic void initialize() {\n\t\ttransportManager = newServerTransportManager();\n\t\ttransportServer = newTransportServer();\n\t\tserverStateMachine = newTransportServerStateMachine();\n\n\t\tserverStateMachine.setServerTransportComponentFactory(this);\n\t\ttransportManager.setServerTransportComponentFactory(this);\n\t\ttransportServer.setServerTransportComponentFactory(this);\n\t\ttransportServer.setServerHostConfig(getServerHostConfig());\n\n\t\tsetInitialized(true);\n\t}", "protected void initialize() {\n \t\n }", "public void initFromResource() {\n String[] hwStrings = Resources.getSystem().getStringArray(17236074);\n if (hwStrings != null) {\n for (String hwString : hwStrings) {\n HardwareConfig hw = new MtkHardwareConfig(hwString);\n if (hw.type == 0) {\n updateOrInsert(hw, mModems);\n } else if (hw.type == 1) {\n updateOrInsert(hw, mSims);\n }\n }\n }\n }", "public void init() {\n configuration.init();\n \n //Connections connections = configuration.getBroker().getConnections(\"topic\");\n Connections connections = configuration.getBrokerPool().getBroker().getConnections(\"topic\");\n \n if (connections == null) {\n handleException(\"Couldn't find the connection factor: \" + \"topic\");\n }\n \n sensorCatalog = new SensorCatalog();\n clientCatalog = new ClientCatalog();\n \n nodeCatalog = new NodeCatalog();\n \n updateManager = new UpdateManager(configuration, sensorCatalog, this);\n updateManager.init();\n \n endpointAllocator = new EndpointAllocator(configuration, nodeCatalog);\n\n registry = new JCRRegistry(this);\n registry.init();\n\n // Initialize Public-End-Point\n if(!isPublicEndPointInit) {\n \tinitPublicEndpoint();\n }\n }", "public void init() throws SystemStartupException\n {\n super.init();\n }", "private void init() {\n if (!isInitiated) {\n //Voices use by freeTTS, we define where they are, currently in the java en_us.jar\n //add the package\n addToSystemesPropetites(this.configurator.getLocation());\n\n // The VoiceManager manages all the voices for FreeTTS.\n voiceManager = VoiceManager.getInstance();\n\n this.defaultVoice = voiceManager.getVoice(this.configurator.getName());\n\n configureVoice(this.defaultVoice);\n\n // Allocates the resources for the voice.\n this.defaultVoice.allocate();\n isInitiated = true;\n }\n }", "public void init() {\n\t\ttry {\n\t\t\tthis.is = new ObjectInputStream(clientSocket.getInputStream());\n\t\t\tthis.os = new ObjectOutputStream(clientSocket.getOutputStream());\n\t\t\twhile (this.readCommand()) {}\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\tSystem.out.println(\"XX. There was a problem with the Input/Output Communication:\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void initialize() {\n\t\t//start the processor thread\n\t\t//logger.debug(processorName+\" starting processor thread\");\n\t\tprocessorThread.start();\n\t\t\n\t\t//logger.debug(processorName+\" initialized\");\n\t}", "public static void initialize()\n\t{\n\t\t// USB\n\t\tdriveJoystick = new EJoystick(getConstantAsInt(USB_DRIVE_STICK));\n\t\tcontrolGamepad = new EGamepad(getConstantAsInt(USB_CONTROL_GAMEPAD));\n\n\t\t// Power Panel\n\t\tpowerPanel = new PowerDistributionPanel();\n\n\t\t//Compressor\n\t\tcompressor = new Compressor(Constants.getConstantAsInt(Constants.PCM_CAN));\n\t\tcompressor.start();\n\t}", "protected void initialize() {\n\t\tsquaredInputs = false;\n\t\t// SmartDashboard.putString(\"DB/LED 0\", \"TeleOpDrive is init\");\n\t}", "protected void init()\n {\n Timestamp now = new Timestamp(System.currentTimeMillis());\n timestampCreated = now;\n timestampModified = now;\n createdByAgent = AppContextMgr.getInstance() == null? null : (AppContextMgr.getInstance().hasContext() ? Agent.getUserAgent() : null);\n modifiedByAgent = null;\n }", "private void init(){\n if(!initializing) {\n Initializer init = new Initializer();\n InitializationDetails initializationDetails = new InitializationDetails(url, download, reset, deviceID, this);\n init.execute(initializationDetails);\n initializing = true;\n }\n }", "protected void initialize() {}", "protected void initialize() {}", "private void initHardware(){\n }", "private void initialize() {\n SystemManager.get(this);\n SystemManager.add(new PlayerInputSystem(this, win.getInputHandler()));\n SystemManager.add(new PhysicSystem(this, win.getDimension()));\n SystemManager.add(new RenderSystem(this));\n\n World world = new World(new Vector2D(0.0f, 98.1f));\n theCar = new Car(\"car\");\n\n theCar.setPosition(new Vector2D(win.getWidth() * 0.5f, win.getHeight() * 0.5f))\n .setSize(new Rectangle(50, 20))\n .setVelocity(new Vector2D(0.0f, 0.0f))\n .setResistance(0.90f)\n .setMass(2000.0f)\n .setWorld(world);\n\n add(theCar);\n }", "public Systems() {\r\n\t\t__initializeSystems = new ArrayList<InitializeSystem>();\r\n\t\t__executeSystems = new ArrayList<ExecuteSystem>();\r\n\t\t__renderSystems = new ArrayList<RenderSystem>();\r\n\t\t__tearDownSystems = new ArrayList<TearDownSystem>();\r\n\t}", "protected void initialize() {\n\n\t}", "protected void initialize() {\r\n }", "protected void initialize() {\r\n }", "public void initialize() {\n\n getStartUp();\n }", "public abstract void init() throws ClassNotFoundException, InstantiationException, IllegalAccessException, IOException, RemoteReadException, InterruptedException;", "public void initialize(){\n\t\t//TODO: put initialization code here\n\t\tsuper.initialize();\n\t\t\n\t}", "protected void initialize(ExternalContext context)\n {\n }", "protected void initialize() {\n\t\t\n\t}", "protected void initialize() {\n\t\t\n\t}", "protected void initialize() {\n\t\t// set the target for the PID subsystem\n\t\tRobot.minipidSubsystem.setSetpoint(90);\n\n\t\t// set the minimum and maximum output limits for the PID subsystem\n\t\tRobot.minipidSubsystem.setOutputLimits(-80, 80);\n\n\t\t// Disable safety checks on drive subsystem\n\t\tRobot.driveSubsystem.robotDrive.setSafetyEnabled(false);\n\t\t\n\t\tRobot.camera.setBrightness(0);\n\n\t}", "private void initResources() {\n resources = ResourceBundle.getBundle(\"bundles.ChangeTBRFrameResources\");\n }", "protected void initialize() {\n\t}", "@Override\r\n public void init() {\r\n /* Initialize the hardware variables.\r\n * The init() method of the hardware class does all the work here\r\n */\r\n robot.init(hardwareMap);\r\n\r\n // Send telemetry message to signify robot waiting;\r\n telemetry.addData(\"Status\", \"Initialized\");\r\n }", "protected void init() {\n }", "private void init() {\n String METHOD = Thread.currentThread().getStackTrace()[1].getMethodName();\n String msg = null;\n String type = ConstantsIF.RESOURCE;\n ConfigurationIF config = null;\n JSONObject json = null;\n Map<String, String> map = null;\n\n _logger.entering(CLASS, METHOD);\n\n /*\n * Get JSON data from the Config object via the Config Manager\n */\n config = _configMgr.getConfiguration(type);\n\n if (config != null) {\n json = config.getJSON();\n if (json == null) {\n msg = CLASS + \": \" + METHOD + \": JSON data for '\" + type + \"' is null\";\n this.setError(true);\n }\n } else {\n msg = CLASS + \": \" + METHOD + \": Configuration for '\" + type + \"' is null\";\n this.setError(true);\n }\n\n /*\n * setup the Mongo Data Access Object\n */\n if (_MongoDAO == null) {\n map = JSON.convertToParams(JSON.getObject(json, ConfigIF.RS_NOSQL));\n\n try {\n _MongoDAO = MongoFactory.getInstance(map);\n } catch (Exception ex) {\n msg = CLASS + \": \" + METHOD + \": Mongo DAO:\" + ex.getMessage();\n this.setError(true);\n }\n }\n\n if (!this.isError()) {\n this.setState(STATE.READY);\n } else {\n this.setState(STATE.ERROR);\n this.setStatus(msg);\n _logger.log(Level.SEVERE, msg);\n }\n\n _logger.exiting(CLASS, METHOD);\n\n return;\n }", "public static synchronized void init() {\n String registryClassName = System.getProperty(REGISTRY_CLASS_NAME,\n DefaultServiceRegistry.class.getName());\n String endpointProviderClassName = System.getProperty(ENDPOINT_PROVIDER_CLASS_NAME,\n DefaultEndpointProvider.class.getName());\n\n try {\n registry = getRegistry(registryClassName);\n endpointProvider = getEndpointProvider(endpointProviderClassName);\n transformers = new BaseTransformerRegistry();\n } catch (NullPointerException npe) {\n throw new RuntimeException(npe);\n }\n }", "public void initDevice() {\r\n\t\t\r\n\t}", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "private void initReceiver() {\n\t\tIntentFilter screenOnOffFilter = new IntentFilter(Intent.ACTION_SCREEN_OFF);\n\t\tscreenOnOffFilter.addAction(Intent.ACTION_SCREEN_ON);\n\t\tscreenOnOffFilter.addAction(Intent.ACTION_USER_PRESENT);\n\t\tscreenOnOffFilter.addAction(Intent.ACTION_PACKAGE_ADDED);\n\t\tscreenOnOffFilter.addAction(Intent.ACTION_PACKAGE_REMOVED);\n\t\tscreenOnOffFilter.addDataScheme(\"package\");\n\t\treceiver1 = new ScreenLockReceiver();\n\t\tmContext.registerReceiver(receiver1, screenOnOffFilter);\n\t}", "public static void InitializeSystems()\n\t{\n\t\tif (_systems.size() < 1)\n\t\t{\n\t\t\tSystem.out.println(\"ERROR - no systems! (InitializeSystems)\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < _systems.size(); i++)\n\t\t\t_systems.get(i).Start();\n\t}", "@Override\r\n\tpublic void initialize(URL location, ResourceBundle resources) {\r\n\t\tacainstance=this;\r\n\t\tchat.accept(new Message(66, null));\r\n\t\tchat.accept(new Message(67, null));\r\n\t\tchat.accept(new Message(75, null));\r\n\t\t\tReport.add(\"Comments Report for Marketing Campaign\");\r\n\t\t\tReport.add(\"Customer Periodic Characterization Report\");\r\n\t\t\tReportList.addAll(Report);\r\n\t\t\tcomboReportType.setItems(ReportList);\r\n\t}", "private final void init() {\n\t\tam = new nativeAssetManager();\n\t\tam.addDefaultAssets();\n\t}", "protected void initialize()\n\t{\n\t}", "protected void init() {\n\t}", "protected void init() {\n\t}", "public void initialize() {\n // empty for now\n }", "public void init() {\n\t\t\n\t\tdebugPrintln(\"Doing init.\");\n\t\t\n\t\t// can sanity check some things by requesting notification when nodes\n\t\t// are created/deleted/etc.\n\t\t// It does not notify when playBufs reach the end of a buffer, though.\n\t\t// Too bad, that. Would have to poll.\n\t\tsendMessage(\"/notify\", new Object[] { 1 });\n\n\t\t//start by cleaning up any detritus from previous runs on the same server:\n\t\tcleanup();\n\n\t\t//sclang creates the default group, not supercollider, so let's follow that convention.\n\t\tcreateGroup(1, 0);\n\n\t\t// create a mother group, under the default group (1),\n\t\t// which will contain all of the SCSoundControl objects.\n\t\t//this is where we would query if another node == _motherGroupID already exists.\n\t\t//if so, would need to choose an alternate groupID (e.g. += 10000)\n\t\tcreateGroup(_motherGroupID, 1);\n\t\t\n\t}", "private void initialize() {\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n prepareSystemStatusListeners();\n }", "protected void initialize() {\n\t\televator.zeroEncoder();\n\t}", "private void initContext() {\n contextId = System.getProperty(CONFIG_KEY_CERES_CONTEXT, DEFAULT_CERES_CONTEXT);\n\n // Initialize application specific configuration keys\n homeDirKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_HOME);\n debugKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_DEBUG);\n configFileKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_CONFIG_FILE_NAME);\n modulesDirKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_MODULES);\n libDirsKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_LIB_DIRS);\n mainClassKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_MAIN_CLASS);\n classpathKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_CLASSPATH);\n applicationIdKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_APP);\n logLevelKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_LOG_LEVEL);\n consoleLogKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_CONSOLE_LOG);\n\n // Initialize default file and directory paths\n char sep = File.separatorChar;\n defaultRelConfigFilePath = String.format(\"%s/%s\", DEFAULT_CONFIG_DIR_NAME, configFileKey).replace('/', sep);\n defaultHomeConfigFilePath = String.format(\"${%s}/%s\", homeDirKey, defaultRelConfigFilePath).replace('/', sep);\n defaultHomeModulesDirPath = String.format(\"${%s}/%s\", homeDirKey, DEFAULT_MODULES_DIR_NAME).replace('/', sep);\n defaultHomeLibDirPath = String.format(\"${%s}/%s\", homeDirKey, DEFAULT_LIB_DIR_NAME).replace('/', sep);\n }", "public void initDevices() {\n for (Device device: deviceList) {\n device.init(getCpu().getTime());\n }\n }", "private void init() {\n sensorEnabled = false;\n activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);\n contextEventHistory = new ArrayList<ContextEvent>(CONTEXT_EVENT_HISTORY_SIZE);\n }", "void init() {\n CometUtils.printCometSdkVersion();\n validateInitialParams();\n this.connection = ConnectionInitializer.initConnection(\n this.apiKey, this.baseUrl, this.maxAuthRetries, this.getLogger());\n this.restApiClient = new RestApiClient(this.connection);\n // mark as initialized\n this.alive = true;\n }", "public void init() {\n\t\tM_log.info(\"initialization...\");\n\t\t\n\t\t// register as an entity producer\n\t\tm_entityManager.registerEntityProducer(this, SakaiGCalendarServiceStaticVariables.REFERENCE_ROOT);\n\t\t\n\t\t// register functions\n\t\tfunctionManager.registerFunction(SakaiGCalendarServiceStaticVariables.SECURE_GCAL_VIEW);\n\t\tfunctionManager.registerFunction(SakaiGCalendarServiceStaticVariables.SECURE_GCAL_VIEW_ALL);\n\t\tfunctionManager.registerFunction(SakaiGCalendarServiceStaticVariables.SECURE_GCAL_EDIT);\n\t\t\n \t\t//Setup cache. This will create a cache using the default configuration used in the memory service.\n \t\tcache = memoryService.newCache(CACHE_NAME);\n\t}", "void init() {\n try {\n // Start the send and receive threads and exit\n //scheduler.scheduleThread(new Thread(new UDPTransportThread(this, UDPTransportThread.RUN_SEND_THREAD)));\n //scheduler.scheduleThread(new Thread(new UDPTransportThread(this, UDPTransportThread.RUN_RCV_THREAD)));\n //scheduler.scheduleThread(new Thread(new UDPTransportThread(this, UDPTransportThread.RUN_GC_THREAD)));\n } catch (IllegalThreadStateException e) {\n Debug.exit(\"Fatal Error: \" + e.toString());\n }\n }", "@Override\n public void init() {\n robot.init(hardwareMap);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Status\", \"Initialized\"); //\n }", "private void init() {\n\n\t}", "public Intermediary()\r\n\t{\r\n\t\ttry {\r\n\t\t\treceiveSocket = new DatagramSocket(68);\r\n\t\t\tsendReceiveSocket = new DatagramSocket();\t\t\t\r\n\t\t\t\r\n\t\t} catch (SocketException se) {\r\n\t\t\tse.printStackTrace();\r\n\t\t\tSystem.exit(1);\r\n\t\t} \r\n\t\t\r\n\t\treqID = 1;\r\n\t\tSystem.out.println(\"===== INTERMEDIATE HOST STARTED =====\\n\");\r\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t\tsubscribeBroadcast(TickBroadcast.class, tick_msg -> { //subscribe to timer\n\t\t\tif (!tick_msg.isRunning()){ //if reached duration time \n\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" is terminating \");\n\t\t\t\tterminate();\n\t\t\t}\n\t\t\tsetTick(tick_msg.getTick());\n\t\t\t\n\t\t\tif (curr_request!=null){\n\t\t\t\tif (curr_amount>0){\n\t\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" created a pair of \" +curr_request.getShoeType());\n\t\t\t\t\tcurr_amount--;\n\t\t\t\t}\n\t\t\t\telse if (curr_amount==0){\n\t\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" finished producing the restock request for \"+curr_request.getAmount()+\" \"+curr_request.getShoeType());\n\t\t\t\t\tReceipt r= new Receipt(getName(),\"store\",curr_request.getShoeType(),false,curr_tick,curr_request.getCurr_tick(),curr_request.getAmount());\n\t\t\t\t\tcomplete(curr_request,r);\n\t\t\t\t\tif (!restock_orders.isEmpty()){\n\t\t\t\t\t\tcurr_request = restock_orders.remove();\n\t\t\t\t\t\tcurr_amount = curr_request.getAmount();\n\t\t\t\t\t\tif (curr_amount>0){\n\t\t\t\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" created a pair of \" +curr_request.getShoeType());\n\t\t\t\t\t\t\tcurr_amount--;\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\tcurr_request=null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (!restock_orders.isEmpty()){\n\t\t\t\t\tsetRequest(restock_orders.remove());\n\t\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" created 1 pair of \"+curr_request.getShoeType());\n\t\t\t\t\tcurr_request.setAmount(curr_request.getAmount()-1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tsubscribeRequest(ManufacturingOrderRequest.class, man_req -> {\n\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" was asked from the store to produce \"+man_req.getAmount()+\" \"+man_req.getShoeType());\n\t\t\tif (curr_request==null){\n\t\t\t\tsetRequest(man_req);\n\t\t\t\tcurr_amount=man_req.getAmount();\n\t\t\t}\n\t\t\telse\n\t\t\t\ttry {\n\t\t\t\t\trestock_orders.put(man_req);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t});\n\t\t\n\t\tlatchObject.countDown();\n\t}", "private void initialize() {\n\t\t\n\t}", "public void typeSystemInit(TypeSystem typeSystem)\n throws ResourceInitializationException {\n\n String sentenceTypeName = CasConsumerUtil.getRequiredStringParameter(mContext,\n UimaUtil.SENTENCE_TYPE_PARAMETER);\n\n mSentenceType = CasConsumerUtil.getType(typeSystem, sentenceTypeName);\n\n String tokenTypeName = CasConsumerUtil.getRequiredStringParameter(mContext,\n UimaUtil.TOKEN_TYPE_PARAMETER);\n\n mTokenType = CasConsumerUtil.getType(typeSystem, tokenTypeName);\n }", "protected void initialize()\r\n {\n }", "private void initialize() {\n }", "@Override\n public void prepare() {\n applicationDeployer.initialize();\n this.initialize();\n }", "public SupportSystem()\n {\n reader = new InputReader();\n responder = new Responder();\n }", "public void init() {\r\n\t\tGetRunningProgramsGR request = new GetRunningProgramsGR(\r\n\t\t\t\tRunningServicesListViewAdapter.this.runningServicesActivity.getApplicationContext());\r\n\t\trequest.setServerName(RunningServicesListViewAdapter.this.serverName);\r\n\t\tnew GuiRequestHandler(RunningServicesListViewAdapter.this.runningServicesActivity,\r\n\t\t\t\tRunningServicesListViewAdapter.this, true).execute(request);\r\n\t}", "public static void init() {\n\t\tfinal CxCommandManager ccm = CxCommandManager.getInstance();\n\t\tccm.register( SEND_HOST_INFO,\tnew SendHostInfoCommandDecoder() );\n\t\tccm.register( SEND_MSG, \t\tnew SendMessageCommandDecoder() );\n\t}", "@Override\n public void init() {\n runtime.reset();\n robot.init(hardwareMap);\n\n telemetry.addData(\"Status\", \"Initialized\");\n }", "private void initializeIOStreams() {\n try {\n inputStream = new ObjectInputStream(new BufferedInputStream(socket.getInputStream()));\n outputStream = new ObjectOutputStream(new BufferedOutputStream(socket.getOutputStream()));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void init() {\n\t\tinitDesign();\n\t\tinitHandlers();\n\t}", "protected void initialize() {\n // Get the topology builder\n KStreamBuilder builder = getBuilder();\n // Build the app\n kafkaStreams = new KafkaStreams(builder, streamsConfig, new ClientSupplier());\n // Shutdown the entire app if an uncaught exception is encountered\n kafkaStreams.setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {\n @Override\n public void uncaughtException(Thread t, Throwable e) {\n log.error(\"Stream terminated because of uncaught exception: {}. Shutting down app\", e.getMessage());\n String s = stackTraceAsString((Exception) e);\n log.error(\"Stacktrace: {}\", s);\n System.out.println(e);\n shutdownApp();\n }\n });\n topology = builder;\n addMetrics(PipelineMetricsReporter.metrics());\n }", "private static void initializeMessages() {\n messages = ResourceBundle.getBundle(\"org.apache.ws.commons.tcpmon.tcpmon\");\n }", "public void initialize() {\n\t\tDynamoConfig config = new DynamoConfig();\n\t\tthis.setup(config);\n\t}", "private void initialize() {\n\t\tinitializeModel();\n\t\tinitializeBoundary();\n\t\tinitializeController();\n\t}", "public void initialize()\n {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "protected void _init(){}" ]
[ "0.65410835", "0.6495948", "0.64483905", "0.6434382", "0.6386953", "0.63076234", "0.6279119", "0.6262804", "0.62371033", "0.62151927", "0.61964273", "0.6186873", "0.61584526", "0.6114764", "0.61110216", "0.6099071", "0.60940856", "0.6091841", "0.6066565", "0.6066565", "0.60553926", "0.6051764", "0.604359", "0.6042389", "0.60395944", "0.60395944", "0.6035848", "0.6027363", "0.6014978", "0.60098755", "0.6009252", "0.6009252", "0.6005821", "0.59933585", "0.5988793", "0.59844434", "0.59834516", "0.5980065", "0.5976324", "0.59760267", "0.5973845", "0.5973845", "0.5973845", "0.5973845", "0.5973845", "0.5973845", "0.5973845", "0.5973845", "0.5973845", "0.5973845", "0.5973845", "0.5973845", "0.5973845", "0.5973845", "0.5973845", "0.5973845", "0.5973845", "0.5973845", "0.59729564", "0.59670734", "0.5963724", "0.59512454", "0.594206", "0.5942028", "0.5942028", "0.59330994", "0.59325206", "0.59321797", "0.5928464", "0.5925968", "0.5917855", "0.59152263", "0.5913871", "0.59062064", "0.59025925", "0.5898712", "0.5891385", "0.5884336", "0.5882157", "0.5880928", "0.5880189", "0.58798575", "0.5879153", "0.58741283", "0.587402", "0.5863514", "0.5861654", "0.5861084", "0.58537394", "0.58532524", "0.5847956", "0.5846554", "0.5845747", "0.5845614", "0.58452797", "0.5844335", "0.58419", "0.58419", "0.58419", "0.58419", "0.5841375" ]
0.0
-1
Returns the actor ID associated with the report with given order ID.
public UserID getActorID (final OrderID orderID) throws PersistenceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getID(OrderItem oi){\n int id;\n id=findID(oi);\n return id;\n }", "public int getId() {\n return orderID;\n }", "public int getOrderID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ORDERID$0, 0);\n if (target == null)\n {\n return 0;\n }\n return target.getIntValue();\n }\n }", "public String getOrderId(JsonObject order) {\r\n\t\tint orderID = 0;\r\n\t\tString customerId = order.get(\"customerId\").getAsString();\r\n\t\tString query = \"\";\r\n\t\tStatement stmt = null;\r\n\t\ttry {\r\n\t\t\tif (DBConnector.conn != null) {\r\n\t\t\t\tquery = \"SELECT * FROM home_heating_fuel_orders\" + \" WHERE customerID = '\" + customerId + \"';\";\r\n\t\t\t\tstmt = DBConnector.conn.createStatement();\r\n\t\t\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\torderID = Math.max(rs.getInt(\"orderID\"), orderID);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Conn is null\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t}\r\n\t\treturn orderID + \"\";\r\n\t}", "ActorId getActorId();", "public int getOrderID() \r\n\t{\r\n\t\treturn orderID;\r\n\t}", "public int getAdjusterAgent(int agent_id) {\n int id = 0;\n try {\n agentAdjuster.setInt(1, agent_id);\n ResultSet resultset = agentAdjuster.executeQuery();\n while (resultset.next()) {\n id = resultset.getInt(\"adjuster_id\");\n System.out.println(\"Adjuster ID: \" + id);\n }\n resultset.close();\n }\n catch (SQLException exception) {\n System.out.println(\"Invalid Input!\");\n }\n return id;\n }", "public org.apache.xmlbeans.XmlInt xgetOrderID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlInt target = null;\n target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(ORDERID$0, 0);\n return target;\n }\n }", "public String orderNumberById(String orderId) {\n return orderById(orderId, orderNumber);\n }", "public io.dstore.values.IntegerValue getOrderPersonId() {\n if (orderPersonIdBuilder_ == null) {\n return orderPersonId_ == null ? io.dstore.values.IntegerValue.getDefaultInstance() : orderPersonId_;\n } else {\n return orderPersonIdBuilder_.getMessage();\n }\n }", "public String getOrderID() {\n return this.orderID;\n }", "public Integer\t\tgetOrderID();", "public String getOrderID() {return orderID;}", "public String getOrderid() {\n return orderid;\n }", "public String getOrderID() {\n\t\treturn this.token.get(\"orderID\").toString();\n\t}", "public int getOrderID() {\n return orderID;\n }", "public String getOrderidentifier() {\n\t\treturn orderidentifier;\n\t}", "int getActorId() {\n return this.actorID;\n }", "public int getAgentID(int agent_id) {\n int id = 0;\n try {\n checkAgentID.setInt(1, agent_id);\n ResultSet resultset = checkAgentID.executeQuery();\n while (resultset.next()) {\n id = resultset.getInt(\"agent_id\");\n System.out.println(\"Agent ID: \" + id);\n }\n resultset.close();\n }\n catch (SQLException exception) {\n System.out.println(\"agent ID Invalid! No Agent Exists With That ID.\"); \n }\n return id;\n }", "public io.dstore.values.IntegerValue getOrderPersonId() {\n return orderPersonId_ == null ? io.dstore.values.IntegerValue.getDefaultInstance() : orderPersonId_;\n }", "public Long getOrderid() {\r\n return orderid;\r\n }", "public void readOrderId() {\n FacesContext fc = FacesContext.getCurrentInstance();\n HttpSession session = (HttpSession) fc.getExternalContext().getSession(false);\n Object orderIdParam = session.getAttribute(\"orderId\");\n orderId = null;\n if(orderIdParam != null) {\n orderId = Integer.parseInt(orderIdParam.toString().trim());\n }\n }", "public int getOrderID() {\r\n return emporderID;\r\n }", "@Override\n\tpublic String getId() {\n\t\tString pName = ctx.getCallerPrincipal().getName();\n\t\tPerson p = userEJB.findPerson(pName);\n\t\tString id = p.getId()+\"\";\n\t\treturn id;\n\t\t\n\t}", "public void processOrder(int orderID);", "private int getOrderId() {\n int orderId;\n try {\n if (orderIdField.getText().isEmpty()) {\n orderId = -1;\n }\n else {\n orderId = Integer.parseInt(orderIdField.getText());\n }\n } catch (NumberFormatException exc) {\n orderId = -1;\n }\n return orderId;\n }", "public Order findOrder(String orderID) {\r\n\t\tfor(Order o : orders.values()) {\r\n\t\t\tif(o.getOrderID().equals(orderID)) {\r\n\t\t\t\treturn o;\r\n\t\t\t}\r\n\t\t} return null; \r\n\t}", "TrackingOrderDetails trackingOrderDetails(String username, int order_id, String role);", "public Receipt getReceiptByOrder(Long orderid) {\n\t\tReceipt exreceipt = new Receipt();\n\t\tOrder order = new Order();\n\t\torder.setId(orderid);\n\t\texreceipt.setOrder(order);\n\t\tExample<Receipt> ex = Example.of(exreceipt);\n\t\treturn receiptRepository.findOne(ex);\n\t}", "@Override\r\n\tpublic Order FindById(int IdOrder) {\n\t\treturn em.find(Order.class, IdOrder);\r\n\t}", "public EntityID getAssignedAgentID();", "public Integer getOrderItemId() {\n return orderItemId;\n }", "@Override\n\tpublic RechargeOrder getByOrderID(String orderId) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<OrderAction> findOne(String orderId) {\n\t\treturn null;\r\n\t}", "public OrderDetail getOrderDetail(final String id);", "public void setOrderID(String orderID) {\n\t\tORDER_ID = orderID;\n\t}", "public int getID() {\n return reportID;\n }", "void showOrderText(int ID) throws OrderNotFoundException;", "public int getMPC_Order_ID() {\n\t\tInteger ii = (Integer) get_Value(\"MPC_Order_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public static String getOrderIDvalue(int IDIndx) {\r\n\t\tLog.info(\"Getting Order ID Value\");\r\n\t\tList<WebElement> orderIds=driver.findElements(By.className(\"field-order_number\"));\r\n\t\tLog.info(\"Order IDs size:\"+orderIds.size());\r\n\t\tLog.info(\"Using Order ID at index:\"+IDIndx);\r\n\t\treturn orderIds.get(IDIndx).getText();\r\n\t}", "public com.walgreens.rxit.ch.cda.II getId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.II target = null;\n target = (com.walgreens.rxit.ch.cda.II)get_store().find_element_user(ID$6, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public String getOrderexcuteidentifier() {\n\t\treturn orderexcuteidentifier;\n\t}", "public java.lang.String getOrderID(){\n return localOrderID;\n }", "public java.lang.String getOrderID(){\n return localOrderID;\n }", "public Order getOrderById(long orderId);", "public Order findOne(Integer id) {\r\n\t\tlog.info(\"Request to finde Order : \" + id);\r\n\t\treturn orders.stream().filter(order -> order.getOrderId().equals(id)).findFirst().get();\r\n\t}", "Order getByID(String id);", "public Input getOrderID() throws RemoteException\n\t{\n\t\t if (orderID != null)\n\t\t \treturn orderID;\n\t\t orderID = new LabelInput(getTransfer().getOrderID());\n\t\t return orderID;\n\t}", "public void setOrderid(Long orderid) {\r\n this.orderid = orderid;\r\n }", "public int getAgentIdGivenRank(String filePath, int agentRank) {\n\t\treturn agentRank;\n\n\t}", "public io.dstore.values.IntegerValueOrBuilder getOrderPersonIdOrBuilder() {\n if (orderPersonIdBuilder_ != null) {\n return orderPersonIdBuilder_.getMessageOrBuilder();\n } else {\n return orderPersonId_ == null ?\n io.dstore.values.IntegerValue.getDefaultInstance() : orderPersonId_;\n }\n }", "Order getOrder(String orderId) throws OrderBookOrderException;", "public int returnKitchenTicket(){\n return OrderID;\n\n }", "public String orderById(String orderId) {\n String path = mgmtOrdersPath + orderId;\n\n return sendRequest(getResponseType, systemUserAuthToken(), path, allResult, statusCode200);\n }", "public String getOrderId() {\n return orderId;\n }", "public String getOrderId() {\n return orderId;\n }", "public String getOrderId() {\n return orderId;\n }", "public String getOrder(String orderId) {\n\t SQLiteDatabase db = this.getReadableDatabase();\n\t \n\t String orderSQLSelect = \"SELECT * FROM \" + ORDER_RECORDS_TABLE + \" WHERE \" + ORDER_NUMBER + \" = '\" + orderId + \"'\";\n\t Cursor cursor = db.rawQuery(orderSQLSelect, null);\n\t \n\t if (cursor != null) { \n\t \tif(cursor.moveToFirst()) {\n\t \t\treturn cursor.getString(0) + \" \" + cursor.getString(3);\n\t \t} else {\n\t \t\treturn null;\n\t \t}\n\t }\n\t\n\t return null;\n\t}", "@Override\n\tpublic OrderEntity findOneByAccountId(Long id) {\n\t\treturn oder.findOneByAccountId(id);\n\t}", "public String getOrdersId() {\n return ordersId;\n }", "public String getOrderId() {\n Object ref = orderId_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n orderId_ = s;\n }\n return s;\n }\n }", "public au.gov.asic.types.MessageIdentifierType.CustomerIdentifier getCustomerIdentifier()\n {\n synchronized (monitor())\n {\n check_orphaned();\n au.gov.asic.types.MessageIdentifierType.CustomerIdentifier target = null;\n target = (au.gov.asic.types.MessageIdentifierType.CustomerIdentifier)get_store().find_element_user(CUSTOMERIDENTIFIER$2, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public String getOrderDocId() {\r\n return this.orderDocId;\r\n }", "public Integer getOrderId() {\n return orderId;\n }", "public String getOrderId() {\n\t\treturn orderId;\n\t}", "String getReceiptId();", "@Override\n public ReporteAccidente getById(int id) {\n return repr.findOne(id);\n }", "@Override\n\tpublic Actor findOne(long id) {\n\t\treturn actorRepository.findOne(id);\n\t}", "public final DodlesActor getActor(String id) {\n return all.get(id);\n }", "@Override\n\t\tpublic Actor get(int id) {\n\t\t\treturn null;\n\t\t}", "public int getXX_MaterialTransferOrder_ID() \r\n {\r\n return get_ValueAsInt(\"XX_MaterialTransferOrder_ID\");\r\n \r\n }", "public void setOrderID(int orderID)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ORDERID$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ORDERID$0);\n }\n target.setIntValue(orderID);\n }\n }", "public String getOrderId() {\n Object ref = orderId_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n orderId_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "private long getOwnID(){\n return authenticationController.getMember() == null ? -1 :authenticationController.getMember().getID();\n }", "public au.gov.asic.types.MessageIdentifierType.CustomerIdentifier.Identifier getIdentifier()\n {\n synchronized (monitor())\n {\n check_orphaned();\n au.gov.asic.types.MessageIdentifierType.CustomerIdentifier.Identifier target = null;\n target = (au.gov.asic.types.MessageIdentifierType.CustomerIdentifier.Identifier)get_store().find_element_user(IDENTIFIER$2, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public int getOrderId() {\n return orderId;\n }", "private String getAgentIDFromFile() throws CatascopiaException {\n \tProperties prop = new Properties();\n \tString id;\n \ttry {\n\t\t\tString agentfile = JCATASCOPIA_AGENT_HOME + File.separator + AGENT_PRIVATE_FILE;\n\t\t\tif((new File(agentfile).isFile())) {\n\t\t\t\t//load agent_private properties file\n\t\t\t\tFileInputStream fis = new FileInputStream(agentfile);\n\t\t\t\tprop.load(fis);\n\t\t\t\tif (fis != null)\n\t\t \t\tfis.close();\n\t\t\t\tid = prop.getProperty(\"agentID\",UUID.randomUUID().toString().replace(\"-\", \"\"));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//first time agent started. Store assigned id to file\n\t\t\t\tid = UUID.randomUUID().toString().replace(\"-\", \"\");\n\t\t\t\tprop.setProperty(\"agentID\", id);\n\t\t\t\tprop.store(new FileOutputStream(agentfile), null);\n\t\t\t}\n \t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\tthrow new CatascopiaException(\"agent_private file not found\", CatascopiaException.ExceptionType.FILE_ERROR);\n\t\t} \n\t\tcatch (IOException e) {\n\t\t\tthrow new CatascopiaException(\"agent_file parsing error\", CatascopiaException.ExceptionType.FILE_ERROR);\n\t\t}\t\n \treturn id;\n\t}", "void setActorId(int actorID) {\n this.actorID = actorID;\n }", "public int getAgentCustomers(int agent_id) {\n int id = 0;\n try {\n checkAgentCustomers.setInt(1, agent_id);\n ResultSet resultset = checkAgentCustomers.executeQuery();\n while (resultset.next()) {\n id = resultset.getInt(\"customer_id\");\n System.out.println(\"Customer ID is: \" + id + \"\\n\");\n }\n resultset.close();\n }\n catch (SQLException exception) {\n System.out.println(\"Agent Doesn't Manage Any Customers Yet!\");\n }\n return id;\n }", "public MobileTaskAssignment getByOrder(String orderId) {\r\n\t\treturn (MobileTaskAssignment) sessionFactory.getCurrentSession().createQuery(\r\n\t\t\t\t\t\"from \" + domainClass.getName() + \" task \" +\r\n\t\t\t\t\t\t\"where task.orderId = :orderId\")\r\n\t\t\t\t\t.setString(\"orderId\", orderId)\r\n\t\t\t\t\t.uniqueResult();\r\n\t}", "@Override\r\n\tpublic OrderItem getOrderItem(int id) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tOrderItem order = (OrderItem) session.get(OrderItem.class,id);\r\n\t\treturn order;\r\n\r\n\t}", "java.lang.String getID();", "public Long getOrderId() {\n return orderId;\n }", "public Long getOrderId() {\n return orderId;\n }", "io.dstore.values.IntegerValue getOrderPersonId();", "@Override\r\n\tpublic Order getOrderById(String orderId) {\n\t\treturn null;\r\n\t}", "public ShippingOrder getOrderInfoByOrderId(String orderId){\r\n ShippingDataAccess shippingOrder = new ShippingDataAccess(this.sqlServerIp);\r\n String log = null;\r\n ShippingOrder order = shippingOrder.selectShippingOrderByOrderId(orderId, log);\r\n return order;\r\n }", "public void setOrderId(Integer orderId) {\n this.orderId = orderId;\n }", "java.lang.String getCustomerId();", "java.lang.String getCustomerId();", "public int getIdentityFromSummonerID(Match match)\n {\n int playerNum=-1;\n\n for(int i = 0; i<10; i++)\n {\n if(match.getParticipants().get(i).getSummonerID() == playerID)\n playerNum = match.getParticipants().get(i).getParticipantID();\n\n }\n\n return playerNum;\n }", "public long getId() {\n\t\treturn _tempNoTiceShipMessage.getId();\n\t}", "String getCustomerID();", "@Override\n\tpublic OrderDetail getById(String id) {\n\t\tOrderDetail detail = orderDetailDao.getById(id);\n\t\treturn detail;\n\t}", "public void setOrderId(String orderId) {\n this.orderId = orderId;\n }", "public EI getPayerTrackingID() { \r\n\t\tEI retVal = this.getTypedField(5, 0);\r\n\t\treturn retVal;\r\n }", "@GetMapping(\"/getOrder\")\n\tpublic ResponseEntity<Order> getOrderWithId(@RequestParam int orderId) {\n\t\treturn new ResponseEntity<>(dataFetchService.getOrderWithId(orderId), HttpStatus.OK);\n\t}", "public Integer getOrderDetailId() {\r\n return this.orderDetailId;\r\n }", "public void setIdOrder(Long idOrder) {\n this.idOrder = idOrder;\n }", "public Shoporder GetOrderById(String orderId) {\n\t\treturn mapper.GetOrderById(orderId);\n\t}" ]
[ "0.5968757", "0.5929059", "0.5879901", "0.5734081", "0.5675547", "0.56544036", "0.56537557", "0.56292033", "0.55541414", "0.55419326", "0.5518646", "0.55073565", "0.55051863", "0.54459023", "0.54324543", "0.5428195", "0.54189956", "0.54082173", "0.5377837", "0.53737485", "0.5348534", "0.53184444", "0.52863526", "0.5244615", "0.5226411", "0.5212724", "0.5208757", "0.5190466", "0.51889306", "0.5177799", "0.51423925", "0.5124295", "0.511804", "0.5116091", "0.51156336", "0.51028174", "0.509259", "0.50905335", "0.50902873", "0.5086308", "0.50846535", "0.50550544", "0.50504005", "0.50504005", "0.50204945", "0.50157624", "0.5009987", "0.5005166", "0.50041604", "0.49812055", "0.49788234", "0.49732807", "0.49640015", "0.49636024", "0.49627715", "0.49627715", "0.49627715", "0.4958556", "0.49350324", "0.49164057", "0.49029037", "0.48981822", "0.48966384", "0.48860142", "0.48836383", "0.48797852", "0.4877198", "0.48770297", "0.48749024", "0.4871688", "0.4853635", "0.4831559", "0.48274806", "0.48267287", "0.48253518", "0.48234382", "0.48187315", "0.48174074", "0.47607505", "0.47497892", "0.47497803", "0.47480756", "0.4742571", "0.4742571", "0.47383195", "0.47376636", "0.47312927", "0.47305036", "0.47256732", "0.47256732", "0.47211176", "0.47166088", "0.47141004", "0.47094548", "0.469686", "0.4683104", "0.4682282", "0.46816346", "0.46786895", "0.46732914" ]
0.73285323
0
Returns all the reports received after the supplied datetime value, and which are visible to the given user.
public ReportBaseImpl[] getReportsSince (SimpleUser user, Date data) throws PersistenceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<ExpenseReport> getReports(String ownerEmail, String userEmail) {\n ExpenseReportMeta reportMeta = ExpenseReportMeta.get();\n List<ExpenseReport> reports = Datastore.query(reportMeta)\n .filter(reportMeta.ownerEmail.equal(ownerEmail))\n .filter(reportMeta.emailList.equal(userEmail))\n .sort(reportMeta.dateAndTime.desc)\n .asList();\n return reports;\n }", "Page<NotificationDTO> findUserNotificationsAfterTime(Pageable pageable, Long userId, Instant startTime );", "private void userReport() {\n reportText.appendText(\"Report of appointments per User\\n\\n\");\n for (User user: Data.getUsers()) {\n reportText.appendText(\"\\n\\nUser: \" + user.getUsername() + \"\\n\");\n for (Appointment appointment: Data.getAppointments()) {\n if (appointment.getUser() == user.getId()) {\n reportText.appendText(\"Appointment ID: \" + appointment.getId() +\n \" \\tTitle: \" + appointment.getTitle() +\n \"\\tType: \" + appointment.getType() +\n \"\\tDescription: \" + appointment.getDescription() +\n \"\\tStart: \" + appointment.getStart() +\n \"\\tEnd: \" + appointment.getEnd() +\n \"\\tCustomer: \" + appointment.getCustomer() + \"\\n\");\n }\n System.out.println(\"\\n\\n\");\n }\n }\n\n }", "@Override\r\n\tpublic List<Report> getUserReportList(int userId) {\n\t\treturn reportMapper.selByUserId(userId);\r\n\t}", "String getReportsTo();", "public String getUserReport(String username)\r\n\t{\r\n\t\tArrayBasedList<LogEntry> subList = new ArrayBasedList<LogEntry>();\r\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t \tLogEntry log = list.get(i);\r\n\t \tif (log.getName().equals(username)) {\r\n\t \t\tsubList.add(log);\r\n\t \t}\r\n\t }\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t sb.append(\"Activity Report for \");\r\n\t sb.append(username);\r\n\t if (subList.size() == 0) {\t\r\n\t\t sb.append(\"[\\n\");\r\n\t \tsb.append(\" No activity was recorded.\\n]\");\r\n\t\t return sb.toString();\r\n\t }\r\n\t SimpleDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy hh:mm:ssaa\", Locale.US);\r\n\t subList.sort();\r\n\t sb.append(\"[\\r\\n\");\r\n\t for (int i = 0; i < subList.size(); i++) {\r\n\t \tsb.append(\" \");\r\n\t \tsb.append(dateFormat.format(subList.get(i).getTime()));\r\n\t \tsb.append(\" - \");\r\n\t \tsb.append(subList.get(i).getActivity());\r\n\t \tsb.append(\"\\r\\n\");\r\n\t }\r\n\t sb.append(\"]\");\r\n\t return sb.toString();\r\n\t}", "List<Bug> getOpenBugsBetweenDatesByUser(int companyId, Integer userId, Date since, Date until);", "@Override\n public List<ScheduledInterview> getForPerson(String userId) {\n List<ScheduledInterview> relevantInterviews = new ArrayList<>();\n List<ScheduledInterview> scheduledInterviews = new ArrayList<ScheduledInterview>(data.values());\n scheduledInterviews.sort(\n (ScheduledInterview s1, ScheduledInterview s2) -> {\n if (s1.when().start().equals(s2.when().start())) {\n return 0;\n }\n if (s1.when().start().isBefore(s2.when().start())) {\n return -1;\n }\n return 1;\n });\n\n for (ScheduledInterview scheduledInterview : scheduledInterviews) {\n if (userId.equals(scheduledInterview.interviewerId())\n || userId.equals(scheduledInterview.intervieweeId())\n || userId.equals(scheduledInterview.shadowId())) {\n relevantInterviews.add(scheduledInterview);\n }\n }\n return relevantInterviews;\n }", "public void userAppointmentsReport() {\n reportLabel.setText(\"\");\n reportLabel1.setText(\"\");\n reportLabel2.setText(\"\");\n reportLabel3.setText(\"\");\n reportsList = DBReports.getUserAppointments();\n System.out.println(reportsList.toArray().length);\n StringBuilder sb = new StringBuilder();\n sb.append(\"Appointments Added By User Report:\" + \"\\n\");\n\n reportsList.forEach(r -> sb.append(\"\\n\" + r.getUserName().toUpperCase() + \"\\n\" +\n r.getAppointmentCount() + \" appointments scheduled for \" + r.getCustomerCount() + \" customers\\n\"));\n reportLabel.setText(sb.toString());\n }", "public ArrayList<ArrayList<Double>> getReportsFromServer(LocalDate date)\n {\n\t //Go to DB and ask for reports of a specific date\n\t return null;\n }", "public ArrayList<PomoDaily> getDaily(String userId) {\r\n PomoServer server = new PomoServer();\r\n String parameters = PomoServer.MODE_SELECT + \"&\" + \"userid=\" + userId;\r\n String url = PomoServer.DOMAIN_URL + PomoServer.SERVLET_DAILY;\r\n String data = server.get(url, parameters);\r\n ArrayList<PomoDaily> list = new ArrayList<>();\r\n if (data.equals(\"0\")) {\r\n return list;\r\n }\r\n String[] dailies = data.split(\";\");\r\n for (String d : dailies) {\r\n String[] attributes = d.split(\"&\");\r\n String id = attributes[0];\r\n String date = attributes[1];\r\n int plan = Integer.parseInt(attributes[2]);\r\n list.add(new PomoDaily(id, date, plan, userId));\r\n }\r\n return list;\r\n }", "public List<UserExpenseReport> getUserExpenseReports(String ownerEmail, String userEmail) {\n List<ExpenseReport> reports = getReports(ownerEmail, userEmail);\n List<UserExpenseReport> userList = new ArrayList<UserExpenseReport>();\n for (ExpenseReport report : reports) {\n userList.add(UserExpenseReport.newUserExpenseReport(report, userEmail));\n }\n return userList;\n }", "private void getDateForAnalysisReport() {\n \tArrayList<Object> answer = new ArrayList<>();\n\t\tanswer.add(\"performingAnActivityTracking\");\n\t\tanswer.add(\"/getActivityData\");\n\t\tString star = reportStartDate.getValue().toString();\n\t\tString end = reportEndDate.getValue().toString();\n\t\tanswer.add(star);\n\t\tanswer.add(end);\n\t\t\n\t\tchs.client.handleMessageFromClientUI(answer);\n\t}", "public List<Notification> findMostRecentPopup(long userId);", "public static List<String> getUsernamesSortedByRecordDate(int threshold) {\n\t\t\n\t\t// get all data from service\n\t\tList<Data> data = getAllDataFromService();\t\n\t\t\n\t\t// sort by date\n\t\tfor (int i = 0; i < data.size(); i++) \n {\n for (int j = i + 1; j < data.size(); j++) { \n if (data.get(i).getCreated_at() < data.get(j).getCreated_at()) {\n Data temp1 = data.get(i); \n data.set(i, data.get(j));\n data.set(j, temp1);\n }\n }\n }\n\t\t\n\t\t//set by threshold, using submission count as criteria\n\t\tList<String> qualifiedUsers = new ArrayList<>();\n\t\tfor(int x=0; x<data.size(); x++) {\n\t\t\tif(data.get(x).getSubmission_count() >= threshold) {\n\t\t\t\tqualifiedUsers.add(data.get(x).getUsername());\n\t\t\t}\t\n\t\t}\n\t\treturn qualifiedUsers;\n\t}", "@Override\r\n\tpublic List<Report> getReport(Date from,Date to) {\r\n\t\treturn jdbcTemplate.query(SQLConstants.SQL_SELECT_ALL_FOR_SUPERADMIN_FROM_N_TO, new RowMapper<Report>() {\r\n\t\t\t@Override\r\n\t\t\tpublic Report mapRow(ResultSet rs, int arg1) throws SQLException {\r\n\t\t\t\tReport report = new Report();\r\n\t\t\t\treport.setPaymentId(rs.getInt(1));\r\n\t\t\t\t//change the date format\r\n\t\t\t\treport.setPaymentTime(rs.getDate(2));\r\n\t\t\t\treport.setTransactionId(rs.getInt(3));\r\n\t\t\t\treport.setUserId(rs.getInt(5));\r\n\t\t\t\treport.setPayment_by(rs.getString(6));\r\n\t\t\t\treport.setBank_acc_id(rs.getInt(8));\r\n\t\t\t\treport.setAmount(rs.getInt(9));\r\n\t\t\t\treport.setStatus(rs.getInt(10));\r\n\t\t\t\treturn report;\r\n\t\t\t}\r\n\t\t}, from, to);\r\n\t}", "private void viewReportList(int userGroupID){\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(\"select * from reports where user_group_id=\" + userGroupID + \" order by week asc\");\n\t\t\t//create table\n\t\t\tout.println(\"<form name=\" + formElement(\"input\") + \" method=\" + formElement(\"post\")+ \">\");\n\t\t\tout.println(\"<h1>Time Reports - View</h1>\");\n\t\t\tout.println(\"Select a time report to view\");\n\t\t out.println(\"<table border=\" + formElement(\"1\") + \">\");\n\t\t out.println(\"<tr><td>Selection</td><td>Last update</td><td>Week</td><td>Total Time</td><td>Signed</td></tr>\");\n\t\t int inWhile = 0; \n\t \t\n\t\t while(rs.next()){\t\t \t\n\t\t \tinWhile = 1;\n\t\t \tString reportID = \"\"+rs.getInt(\"ID\");\n\t\t\t\tDate date = rs.getDate(\"date\"); \n\t\t\t\tint week = rs.getInt(\"week\");\n\t\t\t\tint totalTime = rs.getInt(\"total_time\");\n\t\t\t\tint signed = rs.getInt(\"signed\");\n\t\t\t\t//print in box\n\t\t\t\tout.println(\"<tr>\");\n\t\t\t\tout.println(\"<td>\" + \"<input type=\" + formElement(\"radio\") + \" name=\" + formElement(\"reportID\") +\n\t\t\t\t\t\t\" value=\" + formElement(reportID) +\"></td>\");\t\t//radiobutton\n\t\t\t\tout.println(\"<td>\" + date.toString() + \"</td>\");\n\t\t\t\tout.println(\"<td>\" + week + \"</td>\");\n\t\t\t\tout.println(\"<td>\" + totalTime + \"</td>\");\n\t\t\t\tout.println(\"<td>\" + signString(signed) + \"</td>\");\n\t\t\t\tout.println(\"</tr>\");\n\t\t\t}\n\t\t out.println(\"</table>\");\n\t\t out.println(\"<hidden name='function' value='viewReport'>\");\t\t \n\t\t out.println(\"<input type=\" + formElement(\"submit\") + \" value=\"+ formElement(\"View\") +\">\");\n\t\t out.println(\"</form>\");\n\t\t if (inWhile == 0){\n\t\t \tout.println(\"No reports to show\");\n\t\t }\n\t\t} catch(SQLException e) {\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t}\t\n\t}", "public static List<LogEntry> getAllByDates ( final String user, final String startDate, final String endDate ) {\n // Parse the start string for year, month, and day.\n final String[] startDateArray = startDate.split( \"-\" );\n final int startYear = Integer.parseInt( startDateArray[0] );\n final int startMonth = Integer.parseInt( startDateArray[1] );\n final int startDay = Integer.parseInt( startDateArray[2] );\n\n // Parse the end string for year, month, and day.\n final String[] endDateArray = endDate.split( \"-\" );\n final int endYear = Integer.parseInt( endDateArray[0] );\n final int endMonth = Integer.parseInt( endDateArray[1] );\n final int endDay = Integer.parseInt( endDateArray[2] );\n\n // Get calendar instances for start and end dates.\n final Calendar start = Calendar.getInstance();\n start.clear();\n final Calendar end = Calendar.getInstance();\n end.clear();\n\n // Set their values to the corresponding start and end date.\n start.set( startYear, startMonth, startDay );\n end.set( endYear, endMonth, endDay );\n\n // Check if the start date happens after the end date.\n if ( start.compareTo( end ) > 0 ) {\n System.out.println( \"Start is after End.\" );\n // Start is after end, return empty list.\n return new ArrayList<LogEntry>();\n }\n\n // Add 1 day to the end date. EXCLUSIVE boundary.\n end.add( Calendar.DATE, 1 );\n\n\n // Get all the log entries for the currently logged in users.\n final List<LogEntry> all = LoggerUtil.getAllForUser( user );\n // Create a new list to return.\n final List<LogEntry> dateEntries = new ArrayList<LogEntry>();\n\n // Compare the dates of the entries and the given function parameters.\n for ( int i = 0; i < all.size(); i++ ) {\n // The current log entry being looked at in the all list.\n final LogEntry e = all.get( i );\n\n // Log entry's Calendar object.\n final Calendar eTime = e.getTime();\n // If eTime is after (or equal to) the start date and before the end\n // date, add it to the return list.\n if ( eTime.compareTo( start ) >= 0 && eTime.compareTo( end ) < 0 ) {\n dateEntries.add( e );\n }\n }\n // Return the list.\n return dateEntries;\n }", "public Map<String, EnvelopeStatusCode> getEnvelopeStatusesInLastDay(User user) throws DatatypeConfigurationException;", "public void getUsersByDays() throws IOException, SystemException {\n List<UserSubscribeDTO> usersList = planReminderService.getUsersByDays();\n LOGGER.info(\"userLIst Recievec:\" + usersList);\n shootReminderMails(usersList);\n }", "public List<Events> getMostUpcomingUserEvents(long userId);", "@RequestMapping(path = \"/last24hDeliveredItems\", method = RequestMethod.GET)\n public List<DeliveredItem> getLast24hDeliveredItems() {\n Query queryObject = new Query(\"Select * from delivery_item\", \"blablamove\");\n QueryResult queryResult = BlablamovebackendApplication.influxDB.query(queryObject);\n\n InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();\n System.out.println(\"queryResult : \" + queryResult);\n List<DeliveredItem> deliveredItemList = resultMapper\n .toPOJO(queryResult, DeliveredItem.class);\n\n LocalDateTime stop = LocalDateTime.now().minusHours(0);\n LocalDateTime start = LocalDateTime.now().minusHours(24).withSecond(0).withMinute(0).withNano(0);\n\n return deliveredItemList.stream().filter(deliveredItem -> instantIsBetweenDates(deliveredItem.getTime(), start, stop)).collect(Collectors.toList());\n }", "@Override\n public List<ScheduledInterview> getScheduledInterviewsInRangeForUser(\n String userId, Instant minTime, Instant maxTime) {\n TimeRange range = new TimeRange(minTime, maxTime);\n List<ScheduledInterview> scheduledInterviews = getForPerson(userId);\n List<ScheduledInterview> scheduledInterviewsInRange = new ArrayList<ScheduledInterview>();\n for (ScheduledInterview scheduledInterview : scheduledInterviews) {\n if (range.contains(scheduledInterview.when())) {\n scheduledInterviewsInRange.add(scheduledInterview);\n }\n }\n return scheduledInterviewsInRange;\n }", "public List<AttendanceRecord> getMyAttendance(SystemAccount user, int month, int year){\n Calendar cal = Calendar.getInstance();\n List<AttendanceRecord> returnList = new ArrayList<>();\n\n for(AttendanceRecord ar:arDao.findAll()){\n cal.setTime(ar.getDate());\n\n if( (cal.get(Calendar.MONTH)+1)==month && cal.get(Calendar.YEAR)==year && ar.getStaff().getStaffId().equalsIgnoreCase(user.getStaff().getStaffId()) ){\n returnList.add(ar);\n }\n }\n\n return returnList;\n }", "List<Event> fetchRecentEvents(User user, int limit) throws PersistenceException, InvalidArgumentException;", "Set<VisitedResource> getVisitingStatistic(Date date);", "@Override\n public List getReports(String orderBy, Long count, String fromDate, String toDate) {\n return null;\n }", "public SPResponse getEngagementMatrix(User user, Object[] param) {\n \n final SPResponse response = new SPResponse();\n \n String startDateStr = (String) param[0];\n String endDateStr = (String) param[1];\n \n Set<String> allGroups = new HashSet<>();\n Set<String> allTags = new HashSet<>();\n LocalDate startDate = !StringUtils.isBlank(startDateStr) ? DateTimeUtil\n .getLocalDate(startDateStr) : LocalDate.now().minusMonths(3);\n LocalDate endDate = !StringUtils.isBlank(endDateStr) ? DateTimeUtil.getLocalDate(endDateStr)\n : LocalDate.now();\n List<UserActivityTracking> userActivity = trackingRepository.findUserActivityTracking(\n user.getCompanyId(), startDate, endDate);\n \n List<UserActivityTrackingDTO> collect = userActivity.stream().map(ua -> {\n User activityUser = userFactory.getUser(ua.getUserId());\n if (activityUser != null && !activityUser.isDeactivated()) {\n \n UserActivityTrackingDTO trackingDTO = new UserActivityTrackingDTO(activityUser, ua);\n trackingDTO.setGender(activityUser.getGender());\n List<String> groups = activityUser.getGroupAssociationList().stream().map(grp -> {\n String name = grp.getName();\n allGroups.add(name);\n return name;\n }).collect(Collectors.toList());\n trackingDTO.setGroups(groups);\n if (activityUser.getTagList() != null) {\n trackingDTO.setTags(activityUser.getTagList());\n allTags.addAll(activityUser.getTagList());\n }\n LocalDate dob = activityUser.getDob();\n LocalDate currentDate = LocalDate.now();\n if (dob != null) {\n int age = (int) dob.until(currentDate, ChronoUnit.YEARS);\n trackingDTO.setAge(age);\n }\n return trackingDTO;\n } else {\n return null;\n }\n \n }).filter(Objects::nonNull).collect(Collectors.toList());\n \n LocalDate localDate = LocalDate.now();\n \n List<TopPracticeTracking> findTopPracticeArea = trackingRepository.findTopPracticeAreaFromDate(\n user.getCompanyId(), localDate.minusMonths(12));\n \n List<TopPracticeAreaDTO> topDto = findTopPracticeArea.stream().map(top -> {\n \n TopPracticeAreaDTO areaDTO = new TopPracticeAreaDTO(top);\n top.getPracticeAreas().stream().forEach(prId -> {\n SPGoal goal = goalFactory.getGoal(prId, user.getUserLocale());\n PracticeAreaDetailsDTO baseGoalDto = new PracticeAreaDetailsDTO(goal);\n areaDTO.getPracticeAreasGoals().add(baseGoalDto);\n });\n return areaDTO;\n }).collect(Collectors.toList());\n \n SpectrumFilter spectrumFilter = new SpectrumFilter();\n spectrumFilter.getFilters().put(Constants.PARAM_GROUPS, allGroups);\n spectrumFilter.getFilters().put(Constants.PARAM_TAGS, allTags);\n spectrumFilter.getFilters().put(Constants.PARAM_AGE, AgeCategory.values());\n \n response.add(\"engagmentMatrixData\", collect);\n response.add(\"startDate\", startDate);\n response.add(\"endDate\", endDate);\n response.add(\"filter\", spectrumFilter);\n response.add(\"topPraticeArea\", topDto);\n \n return response;\n }", "private void statisticsReportList(int userGroupID) {\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(\"select * from reports where user_group_id=\" + userGroupID + \" order by week asc\");\n\t\t\t//create table\n\t\t\tout.println(\"<form name=\" + formElement(\"input\") + \" method=\" + formElement(\"post\")+ \">\");\n\t\t\tout.println(\"<h1>Time Reports - Statistics</h1>\");\n\t\t\tout.println(\"<p>Select time reports that you want to summerize and click view</p>\");\n\t\t out.println(\"<table border=\" + formElement(\"1\") + \">\");\n\t\t out.println(\"<tr><td>Selection</td><td>Last update</td><td>Week</td><td>Total Time</td><td>Signed</td></tr>\");\n\t\t int inWhile = 0; \n\t \tint nbrOfReports = 0;\n\t\t while(rs.next()){\n\t\t \tnbrOfReports++;\n\t\t \tinWhile = 1;\n\t\t \tString reportID = \"\"+rs.getInt(\"ID\");\n\t\t\t\tDate date = rs.getDate(\"date\");\n\t\t\t\tint week = rs.getInt(\"week\");\n\t\t\t\tint totalTime = rs.getInt(\"total_time\");\n\t\t\t\tint signed = rs.getInt(\"signed\");\n\t\t\t\t//print in box\n\t\t\t\tout.println(\"<tr>\");\n\t\t\t\tout.println(\"<td>\" + \"<input type=\" + formElement(\"checkbox\") + \" name=\" + formElement(\"reportIDs\"+nbrOfReports) +\n\t\t\t\t\t\t\" value=\" + formElement(reportID) +\"></td>\");\t\t//radiobutton\n\t\t\t\tout.println(\"<td>\" + date.toString() + \"</td>\");\n\t\t\t\tout.println(\"<td>\" + week + \"</td>\");\n\t\t\t\tout.println(\"<td>\" + totalTime + \"</td>\");\n\t\t\t\tout.println(\"<td>\" + signString(signed) + \"</td>\");\n\t\t\t\tout.println(\"</tr>\");\n\t\t\t}\n\t\t out.println(\"</table>\");\n\t\t out.println(\"<button type=\" + formElement(\"submit\") + \"name='submitStatistics' value=\"+ nbrOfReports +\">View </button>\");\n\t\t out.println(\"</form>\");\n\t\t if (inWhile == 0){\n\t\t \tout.println(\"No reports to show\");\n\t\t }\n\t\t} catch(SQLException e) {\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t}\t\n\t}", "public void getUsersByMonth() throws IOException, SystemException {\n\n List<UserSubscribeDTO> usersList = planReminderService\n .getUsersByMonth();\n LOGGER.info(\"userLIst Recievecd:\" + usersList);\n shootReminderMails(usersList);\n\n }", "private void showOutOfStockReportDialog(String userEmail) {\n CustomDialogUtilBuilder.CustomDialogBuilder customDialogUtilBuilder =\n new CustomDialogUtilBuilder.CustomDialogBuilder(this, this, THREE);\n customDialogUtilBuilder.setMailId(userEmail);\n customDialogUtilBuilder.buildCustomDialog();\n }", "List<NotificationEntity> findUnseenRecentByLogin(String login, Date date);", "boolean addHistoricVisitsToUsageReportsBuffer();", "@Override\n\tpublic List<WeeklyData> getWeeklyData(int user_id) {\n\t\treturn mobileDao.getWeeklyData(user_id);\n\t}", "List<Integer> getIdUsersToSendFirstAlert( Timestamp alertMaxDate );", "public List<String> getEligibleForAutoApproval(Date todayAtMidnight);", "@RequestMapping(\"/getUserReport\")\n public List<BookSale> getUserReport(@RequestParam(\"user_id\")int user_id,\n @RequestParam(\"start\")String start,\n @RequestParam(\"end\")String end) {\n Timestamp time1 = Timestamp.valueOf(start);\n Timestamp time2 = Timestamp.valueOf(end);\n return orderService.getUserReport(user_id, time1, time2);\n }", "public List<UserAttendance> getDayAttendance(Date[] dates, SysUser sysUser) {\n return findByQuery(\"from UserAttendance where (checkdate=? or checkdate=? or checkdate=? or checkdate=? or checkdate=? or checkdate=? or checkdate=?) and user.id=? and type is not null order by checkdate, noon\",\n dates[0], dates[1], dates[2], dates[3], dates[4], dates[5], dates[6], sysUser.getId());\n }", "@RequestMapping(method = RequestMethod.GET, value = \"/getReports\")\r\n public List<Reports> getReports() {\r\n\r\n List<Reports> results = reportsRepository.getReportsByDate();\r\n return results;\r\n\r\n }", "public void getUsersByWeek() throws IOException, SystemException {\n List<UserSubscribeDTO> usersList = planReminderService\n .getUsersByWeeks();\n LOGGER.info(\"userLIst Recievec:\" + usersList);\n shootReminderMails(usersList);\n }", "public List<ExoSocialActivity> getOlderUserActivities(Identity owner, Long sinceTime, int limit);", "List<Integer> getIdUsersToSendOtherAlert( Timestamp alertMaxDate, Timestamp timeBetweenAlerts, int maxNumberAlerts );", "public SprintDataCollection getSprintsForRapidViewCompletedAfterDate(ClientCredentials clientCredentials,\n String rapidViewIdString, String startDateString) throws JSONException {\n\n SprintDataCollection filteredSprintDataCollection = new SprintDataCollection();\n SprintDataCollection allSprintDataCollection;\n DateTime startDate;\n \n startDate = DateTime.parse(startDateString);\n \n allSprintDataCollection = getSprintsForRapidView(clientCredentials, rapidViewIdString);\n\n for (SprintData currentSprint : allSprintDataCollection.getSprintDataList()) {\n\n if (currentSprint != null && currentSprint.getCompleteDate() != null\n && currentSprint.getCompleteDateAsDateTime().isAfter(startDate)) {\n filteredSprintDataCollection.addSprintData(currentSprint);\n }\n }\n\n return filteredSprintDataCollection;\n\n }", "public static ListObject getNearbyEvents (int userId) {\n\t\tProfile user = getUser(userId) ;\n\t\tList <Event> events =EventController.setUserStatus(user.getEventsWhoOwn(), 2);\n\t\tevents.addAll( EventController.setUserStatus(user.getEvents(), 1)) ;\n\t\tCollections.sort(events);\n\t\tList <Event> unfinished = EventController.getUnfinishedEvents(events) ;\n\t\tint size = 5 ;\n\t\tListObject obj ;\n\t\tif ( unfinished.size() <= 5 ) {\n\t\t\tobj = new ListObject(unfinished) ;\n\t\t\tif ( unfinished.size() >= events.size() ) {\n\t\t\t\tobj.moreExist = 1 ;\n\t\t\t}\n\t\t\telse obj.moreExist = 2 ;\n\t\t}\n\t\telse {\n\t\t\tobj = new ListObject(unfinished.subList(0,size));\n\t\t\tobj.moreExist = 2 ;\n\t\t}\n\t\t\n\t\treturn obj ;\n\t}", "private static GetReportsResponse getReport(Analyticsreporting service) throws IOException {\n // Create the DateRange object.\n DateRange dateRange = new DateRange();\n dateRange.setStartDate(\"7DaysAgo\");\n dateRange.setEndDate(\"today\");\n\n // Create the Metrics object.\n Metric sessions = new Metric()\n .setExpression(\"ga:sessions\")\n .setAlias(\"sessions\");\n\n //Create the Dimensions object.\n Dimension browser = new Dimension()\n .setName(\"ga:browser\");\n\n // Create the ReportRequest object.\n ReportRequest request = new ReportRequest()\n .setViewId(VIEW_ID)\n .setDateRanges(Arrays.asList(dateRange))\n .setDimensions(Arrays.asList(browser))\n .setMetrics(Arrays.asList(sessions));\n\n ArrayList<ReportRequest> requests = new ArrayList<ReportRequest>();\n requests.add(request);\n\n // Create the GetReportsRequest object.\n GetReportsRequest getReport = new GetReportsRequest()\n .setReportRequests(requests);\n\n // Call the batchGet method.\n GetReportsResponse response = service.reports().batchGet(getReport).execute();\n\n // Return the response.\n return response;\n }", "@Override\n @Transactional\n public ReportView getHistoryForPatientId(UUID patientId) {\n User patient = Objects.requireNonNull(userRepository.findOne(patientId));\n Map<LocalDate, Boolean> history = new HashMap<>(7);\n\n for (int i = 0; i < 7; i++) {\n java.sql.Date date = new java.sql.Date(System.currentTimeMillis());\n date.setDate(date.getDate() - i);\n\n List<Assignment> missedAssignments = assignmentRepository.findIncompleteByPatientIdAndDate(patientId, date);\n history.put(date.toLocalDate(), missedAssignments.isEmpty());\n }\n\n ReportView reportView = new ReportView();\n reportView.setUser(patient.toView());\n reportView.setHistory(history);\n return reportView;\n }", "private void getReport() {\n\t\tdialog = ProgressDialog.show(this, \"\", \" Please wait...\", true);\n dialog.setCancelable(true);\n\t\tSharedPreferences pref = this.getSharedPreferences(\"User\", Activity.MODE_PRIVATE);\n\t\tString accessToken = pref.getString(\"access_token\", null);\n\t\tNetworkEngine.getInstance().getSeatReport(accessToken, bus_id, agent_id, new Callback<List<SeatReport>>() {\n\t\t\t\n\t\t\tpublic void success(List<SeatReport> arg0, Response arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tseatReports = new ArrayList<SeatReport>();\n\t\t\t\tseatReports = arg0;\n\t\t\t\tlvSeatDetails.setAdapter(new SeatDetailsbyAgentAdapter(SeatDetailsbyAgentActivity.this, seatReports));\n\t\t\t\tdialog.cancel();\n\t\t\t}\n\t\t\t\n\t\t\tpublic void failure(RetrofitError arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tdialog.cancel();\n\t\t\t\tLog.i(\"\",\"Hello Error Response Code: \"+arg0.getResponse().getStatus());\n\t\t\t}\n\t\t});\n\t}", "public List<Events> getAllEventsAndHistoryForUser(long userId);", "@Override\r\n\tpublic List<Report> getReport(Agents agent, Date from, Date to) {\n\t\treturn null;\r\n\t}", "public abstract SortedSet<CalendarEvent> getEventsAt(User user, Date day);", "@Override\n public List<Activity> getActivities(int userId) throws SQLException {\n ArrayList<Activity> foundActivities = new ArrayList<>();\n\n try (Connection connection = dataSource.getConnection()) {\n String findActivitiesQuery = \"SELECT * FROM ACTIVITY WHERE USERID = ?\";\n statement = connection.prepareStatement(findActivitiesQuery);\n statement.setInt(1, userId);\n resultSet = statement.executeQuery();\n while (resultSet.next()) {\n foundActivities.add(extractActivity(resultSet));\n }\n } catch (SQLException exception) {\n throw exception;\n } finally {\n close(statement, resultSet);\n }\n return foundActivities;\n }", "public List<UserLog> findUserLogByUserId(String username,long UserId) {\n \n\t LOGGER.info(\"Found \" + username + \" results.\");\n\t CriteriaBuilder cb = em.getCriteriaBuilder();\n\n // the actual search query that returns one page of results\n CriteriaQuery<UserLog> searchQuery = cb.createQuery(UserLog.class);\n Root<UserLog> searchRoot = searchQuery.from(UserLog.class);\n searchQuery.select(searchRoot);\n searchQuery.where(getUserLogWhereCondition(cb, UserId, searchRoot));\n\n List<Order> orderList = new ArrayList<Order>();\n orderList.add(cb.desc(searchRoot.get(\"log_time\")));\n searchQuery.orderBy(orderList);\n\n TypedQuery<UserLog> filterQuery = em.createQuery(searchQuery);\n LOGGER.info(\"Found \" + UserId + \" results.\");\n return filterQuery.getResultList();\n }", "@RequestMapping(method = RequestMethod.GET, path = \"/patients/{userEmail}\")\n @Secured({\"ROLE_DOCTOR\"})\n @ResponseStatus(HttpStatus.OK)\n public List<Result> fetchPatientResults(\n @PathVariable(value = \"userEmail\") String userEmail) {\n log.info(\"Fetching results of patient with Id [{}]\", userEmail);\n return resultService.fetchResultsWithUserEmail(userEmail);\n }", "private List<Integer> getTimeReports(HttpServletRequest request, int nbrOfReports) {\n\t\tList<Integer> timeReports = new ArrayList<Integer>();\n\t\tfor (int i=1; i<=nbrOfReports; i++) {\n\t\t\tString reportIDstr = request.getParameter(\"reportIDs\"+i);\n\t\t\tif (reportIDstr != null) {\n\t\t\t\tint reportID = Integer.parseInt(reportIDstr);\n\t\t\t\ttimeReports.add(reportID);\n\t\t\t}\n\t\t}\n\t\treturn timeReports;\n\t}", "public List<ConsultationReservation> getConsultationReservationsByUserToday(InternalUser user) throws SQLException{\n\t\t\n\t\treturn super.manager.getConsultationReservationByUser(user, LocalDate.now(), true, false);\n\t}", "@Override\r\n\tpublic List<Report> getReport(Travel travel, Date from, Date to) {\n\t\treturn null;\r\n\t}", "public List<Statistic> queryPageDataByUserId(Integer startIndex, Integer pagesize, Integer userId) {\n\t\tString sql=\"select * from statistics where user_id=? order by creat_date desc limit ?,?\";\n\t\treturn getList(sql, userId,startIndex,pagesize);\n\t}", "public static List<LogEntry> getAllForUser ( final String user ) {\n return getWhere( createCriterionList(\n Restrictions.or( createCriterion( \"primaryUser\", user ), createCriterion( \"secondaryUser\", user ) ) ) );\n }", "List<UserContentChanges> getNoChangesPerUser(int months);", "List<TimeLog> findTimelog(String username);", "Set<TimeJournalBean> findUserActivityByDate(Date date, Employee employee);", "public List<Issue> getUserActiveIssues(User user);", "TreeMap<Date, Map<Integer, List<Bug>>> getCompletedBugsGroupByDateByUser(int companyId, int userId,\n List<Integer> projectList, Date until, int limit);", "@Override\n\tpublic List<boardLIstDTO> myLogs(String user_id) throws Exception {\n\t\treturn sqlSession.selectList(namespace+\".myLogs\", user_id);\n\t}", "synchronized static public Report getReport() {\n return new Report(\n collectedEntrys,\n collectables.stream().sorted((a, b) -> a.collectableSince.compareTo(b.collectableSince))\n .collect(Collectors.toList()));\n }", "@RequestMapping(path = \"/specificDeliveryIssues\", method = RequestMethod.GET)\n\tpublic List<DeliveryIssue> getIssuesByTimeframe(Date from, Date to) {\n\t\tQuery queryObject = new Query(\"Select * from delivery_issue\", \"blablamove\");\n\t\tQueryResult queryResult = BlablamovebackendApplication.influxDB.query(queryObject);\n\n\t\tInfluxDBResultMapper resultMapper = new InfluxDBResultMapper();\n\t\tList<DeliveryIssue> deliveryIssueList = resultMapper\n\t\t\t\t.toPOJO(queryResult, DeliveryIssue.class);\n\n\t\treturn deliveryIssueList.stream().filter(\n\t\t\t\tdeliveryIssue -> !instantIsBetweenDates(\n\t\t\t\t\t\tdeliveryIssue.getTime(),\n\t\t\t\t\t\tLocalDateTime.ofInstant(\n\t\t\t\t\t\t\t\tto.toInstant(), ZoneOffset.UTC\n\t\t\t\t\t\t),\n\t\t\t\t\t\tLocalDateTime.ofInstant(\n\t\t\t\t\t\t\t\tfrom.toInstant(), ZoneOffset.UTC\n\t\t\t\t\t\t)\n\t\t\t\t)\n\t\t).collect(Collectors.toList());\n\t}", "public List<Map> getWatchListBasedOnUserName(String userName);", "public Webpage[] getFathers(String user) {\n\t\tArrayList<Webpage> pages = new ArrayList<Webpage>();\n\t\tWebpage[] fathers = getFathers();\n\t\tfor (int i = 0; i < fathers.length; i++) {\n\t\t\tif(fathers[i].getVisitorByName(user) != null) {\n\t\t\t\tpages.add(fathers[i]);\n\t\t\t}\n\t\t}\n\t\tWebpage[] result = new Webpage[pages.size()];\n\t\treturn pages.toArray(result);\n\t}", "@Override\r\n\tpublic List<Logbook> viewRecords() {\n\t\treturn user.viewRecords();\r\n\t}", "public List<Ticket> getTicketsReportedByUser(String username) {\n\t\ttry {\n\t\t\tTypedQuery<Ticket> query = em.createNamedQuery(\"Ticket.findByReported\", Ticket.class);\n\t\t\tquery.setParameter(\"inUsername\", username);\n\t\t\tList<Ticket> tickets = query.getResultList();\n\t\t\tif (tickets != null) {\n\t\t\t\treturn tickets;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.log(Level.WARNING, \"Unpossible to fetch tickets\", e.getMessage());\n\t\t\treturn null;\n\t\t}\n\n\t}", "public ArrayList<Showing> getShowingsByDate(String date, Screen screen) throws PastDateException {\n return filmDisplay.getShowingsByDate(date, screen);\n }", "public String report() {\r\n\t\tsession2 = ServletActionContext.getRequest().getSession();\r\n\t\tlogger.info(session2);\r\n\t\tif (session2 == null || session2.getAttribute(\"login\") == null) {\r\n\t\t\tlogger.error(\"if=====session error reporting===='\");\r\n\t\t\treturn LOGIN;\r\n\t\t} else {\r\n\t\t\tfactory = LoginAndSession.getFactory();\r\n\t\t\tdao_userWise = (Productivity_user_wiseDao) factory.getBean(\"d27\");\r\n\t\t\tdao_propwise = (Productivity_property_wiseDao) factory.getBean(\"d29\");\r\n\t\t\tpcw = (Productivity_client_wiseDao) factory.getBean(\"d30\");\r\n\t\t\tif (colorRadio.equalsIgnoreCase(\"red\")) {\r\n\r\n\t\t\t\t// for all user\r\n\t\t\t\ttry {\r\n\t\t\t\t\tlst = dao_userWise\r\n\t\t\t\t\t\t\t.viewRecord(\"select puw.curr_date, puw.source_link, puw.infringing_link, puw.youtube,\"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.social_media, puw.white_list, puw.grey_list, puw.duplicate , mu.name\"\r\n\t\t\t\t\t\t\t\t\t+ \" , puw.facebook, puw.instagram, puw.twitter, puw.vk, puw.periscope, puw.source_domain,\"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.infringing_domain , puw.user_id \"\r\n\t\t\t\t\t\t\t\t\t+ \" from Productivity_user_wise puw, Markscan_users mu where puw.curr_date \"\r\n\t\t\t\t\t\t\t\t\t+ \" between '\" + date + \"' and '\" + date1 + \"' and mu.id= puw.user_id\");\r\n\t\t\t\t\tmonthlyGraph = new ArrayList<>();\r\n\r\n\t\t\t\t\tcud = (Crawle_url2Dao) factory.getBean(\"dash\");\r\n\r\n\t\t\t\t\t// lst1= cud.viewRecord(\"select DISTINCT count(domain_name)\r\n\t\t\t\t\t// ,date(created_on), link_logger from crawle_url3 where\r\n\t\t\t\t\t// user_id= 75 and created_on >'2017-06-01' and\r\n\t\t\t\t\t// link_logger=1 group by date(created_on)\")\r\n\r\n\t\t\t\t\tfor (int i = 0; i < lst.size(); i++) {\r\n\t\t\t\t\t\t obj = (Object[]) lst.get(i);\r\n\r\n\t\t\t\t\t\t data = new DashBoardData();\r\n\r\n\t\t\t\t\t\tdata.setDate(obj[0].toString());\r\n\t\t\t\t\t\tdata.setSource((Integer) obj[1]);\r\n\t\t\t\t\t\tdata.setInfringing((Integer) obj[2]);\r\n\r\n\t\t\t\t\t\tdata.setYoutube((Integer) obj[3]);\r\n\t\t\t\t\t\tdata.setSocial_media((Integer) obj[4]);\r\n\r\n\t\t\t\t\t\tdata.setWhite_list((Integer) obj[5]);\r\n\t\t\t\t\t\tdata.setGrey_list((Integer) obj[6]);\r\n\t\t\t\t\t\tdata.setDuplicate((Integer) obj[7]);\r\n\t\t\t\t\t\tdata.setProj_name(obj[8].toString()); // user_name\r\n\r\n\t\t\t\t\t\tdata.setFacebook((Integer) obj[9]);\r\n\t\t\t\t\t\tdata.setInstagram((Integer) obj[10]);\r\n\t\t\t\t\t\tdata.setTwitter((Integer) obj[11]);\r\n\t\t\t\t\t\tdata.setVk((Integer) obj[12]);\r\n\t\t\t\t\t\tdata.setPeriscope((Integer) obj[13]);\r\n\t\t\t\t\t\tdata.setSource_domain((Integer) obj[14]);\r\n\t\t\t\t\t\tdata.setInfringing_domain((Integer) obj[15]);\r\n\t\t\t\t\t\tdata.setUser_id((Integer) obj[16]);\r\n\t\t\t\t\t\tlst1 = dao_propwise.viewRecord(\r\n\t\t\t\t\t\t\t\t\"select DISTINCT cm.client_name , mp.name , cm.id from Productivity_property_wise ppw, \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" Project_info pi, Client_master cm, Markscan_projecttype mp where \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" ppw.project_id= pi.id and \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" pi.client_type= cm.id and pi.project_type = mp.id and ppw.user_id =\"\r\n\t\t\t\t\t\t\t\t\t\t+ (Integer) obj[16] + \" and \" + \" ppw.created_on = '\" + obj[0].toString()\r\n\t\t\t\t\t\t\t\t\t\t+ \"'\");\r\n\t\t\t\t\t\tin_side = new ArrayList<>();\r\n\t\t\t\t\t\tfor (int i1 = 0; i1 < lst1.size(); i1++) {\r\n\t\t\t\t\t\t\t obj1 = (Object[]) lst1.get(i1);\r\n\r\n\t\t\t\t\t\t\tlst0 = dao_propwise.viewRecord(\"select sum( productivi0_.source_count), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum( productivi0_.infringing_count),sum( productivi0_.youtube), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum( productivi0_.facebook), sum(productivi0_.instagram), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum(productivi0_.twitter),sum(productivi0_.vk), sum(productivi0_.periscope) \"\r\n\t\t\t\t\t\t\t\t\t+ \" from Productivity_property_wise productivi0_, Project_info project_in1_ \"\r\n\t\t\t\t\t\t\t\t\t+ \" where project_in1_.id=productivi0_.project_id and \" + \" productivi0_.user_id=\"\r\n\t\t\t\t\t\t\t\t\t+ (Integer) obj[16] + \" and \" + \" productivi0_.created_on='\" + obj[0].toString()\r\n\t\t\t\t\t\t\t\t\t+ \"' and \" + \"project_in1_.client_type=\" + (Integer) obj1[2]);\r\n\r\n\t\t\t\t\t\t\tfor (int i0 = 0; i0 < lst0.size(); i0++) {\r\n\t\t\t\t\t\t\t\t obj0 = (Object[]) lst0.get(i0);\r\n\r\n\t\t\t\t\t\t\t\t craw = new Crawle_url2();\r\n\t\t\t\t\t\t\t\tcraw.setWid(obj1[0].toString()); // client_name\r\n\t\t\t\t\t\t\t\tcraw.setIs_valid(((Long) obj0[0]).intValue());// source\r\n\t\t\t\t\t\t\t\tcraw.setStatus(((Long) obj0[1]).intValue());// infringing\r\n\t\t\t\t\t\t\t\tcraw.setUser_id(((Long) obj0[2]).intValue());// youtube\r\n\t\t\t\t\t\t\t\tcraw.setProject_id(((Long) obj0[3]).intValue());// FB\r\n\t\t\t\t\t\t\t\tcraw.setType(((Long) obj0[4]).intValue());// instagram\r\n\t\t\t\t\t\t\t\tcraw.setVerified(((Long) obj0[5]).intValue());// twitter\r\n\t\t\t\t\t\t\t\tcraw.setSite_down(((Long) obj0[6]).intValue());// vk\r\n\t\t\t\t\t\t\t\tcraw.setIs_new(((Long) obj0[7]).intValue());// pscp\r\n\r\n\t\t\t\t\t\t\t\tin_side.add(craw);\r\n\t\t\t\t\t\t\t\tobj0=null;\r\n\t\t\t\t\t\t\t\tcraw=null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tobj1=null;\r\n\t\t\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// System.out.println(client_names);\r\n\t\t\t\t\t\tdata.setInside(in_side);\r\n\r\n\t\t\t\t\t\tmonthlyGraph.add(data);\r\n\t\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\t\tdata=null;\r\n\t\t\t\t\t\t\t\tobj=null;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\treturn ERROR;\r\n\t\t\t\t}\r\n\t\t\t\tfinally{\r\n\t\t\t\t\tobj0=null;\r\n\t\t\t\t\tcraw=null;\r\n\t\t\t\t\tobj1=null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tdata=null;\r\n\t\t\t\t\t\t\tobj=null;\r\n\t\t\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\t\t\tdao_propwise = null;\r\n\t\t\t\t\t\t\tlst = null;\r\n\t\t\t\t\t\t\tfactory=null;\r\n\t\t\t\t\t\t\tdao_userWise=null;\r\n\t\t\t\t\t\t\tdao_propwise=null;\r\n\t\t\t\t\t\t\tsession2=null;\r\n\t\t\t\t}\r\n\t\t\t\tSystem.gc();\r\n\t\t\t\treturn \"allEmpReport\";\r\n\t\t\t} else if (colorRadio.equalsIgnoreCase(\"green\")) {\r\n\t\t\t\t// for single user\r\n\t\t\t\ttry {\r\n\t\t\t\t\tlst = dao_userWise\r\n\t\t\t\t\t\t\t.viewRecord(\"select puw.curr_date, puw.source_link, puw.infringing_link, puw.youtube, \"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.social_media, puw.white_list, puw.grey_list, puw.duplicate , puw.facebook,\"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.instagram, puw.twitter, puw.vk, puw.periscope, puw.source_domain, \"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.infringing_domain from \" + \" Productivity_user_wise puw where puw.user_id=\"\r\n\t\t\t\t\t\t\t\t\t+ usertype + \" and puw.curr_date between\" + \" '\" + date + \"' and '\" + date1 + \"'\");\r\n\t\t\t\t\tmonthlyGraph = new ArrayList<>();\r\n\r\n\t\t\t\t\tfor (int i = 0; i < lst.size(); i++) {\r\n\t\t\t\t\t\t obj = (Object[]) lst.get(i);\r\n\r\n\t\t\t\t\t\t data = new DashBoardData();\r\n\t\t\t\t\t\tdata.setDate(obj[0].toString());\r\n\t\t\t\t\t\tdata.setSource((Integer) obj[1]);\r\n\t\t\t\t\t\tdata.setInfringing((Integer) obj[2]);\r\n\r\n\t\t\t\t\t\tdata.setYoutube((Integer) obj[3]);\r\n\t\t\t\t\t\tdata.setSocial_media((Integer) obj[4]);\r\n\r\n\t\t\t\t\t\tdata.setWhite_list((Integer) obj[5]);\r\n\t\t\t\t\t\tdata.setGrey_list((Integer) obj[6]);\r\n\t\t\t\t\t\tdata.setDuplicate((Integer) obj[7]);\r\n\r\n\t\t\t\t\t\tdata.setFacebook((Integer) obj[8]);\r\n\t\t\t\t\t\tdata.setInstagram((Integer) obj[9]);\r\n\t\t\t\t\t\tdata.setTwitter((Integer) obj[10]);\r\n\t\t\t\t\t\tdata.setVk((Integer) obj[11]);\r\n\t\t\t\t\t\tdata.setPeriscope((Integer) obj[12]);\r\n\t\t\t\t\t\tdata.setSource_domain((Integer) obj[13]);\r\n\t\t\t\t\t\tdata.setInfringing_domain((Integer) obj[14]);\r\n\r\n\t\t\t\t\t\tlst1 = dao_propwise.viewRecord(\r\n\t\t\t\t\t\t\t\t\"select DISTINCT cm.client_name , mp.name , cm.id from Productivity_property_wise ppw, \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" Project_info pi, Client_master cm, Markscan_projecttype mp where \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" ppw.project_id= pi.id and \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" pi.client_type= cm.id and pi.project_type = mp.id and ppw.user_id =\"\r\n\t\t\t\t\t\t\t\t\t\t+ usertype + \" and \" + \" ppw.created_on = '\" + obj[0].toString() + \"'\");\r\n\t\t\t\t\t\tin_side = new ArrayList<>();\r\n\t\t\t\t\t\tfor (int i1 = 0; i1 < lst1.size(); i1++) {\r\n\t\t\t\t\t\t\t obj1 = (Object[]) lst1.get(i1);\r\n\r\n\t\t\t\t\t\t\tlst0 = dao_propwise.viewRecord(\"select sum( productivi0_.source_count), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum( productivi0_.infringing_count),sum( productivi0_.youtube), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum( productivi0_.facebook), sum(productivi0_.instagram), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum(productivi0_.twitter),sum(productivi0_.vk), sum(productivi0_.periscope) \"\r\n\t\t\t\t\t\t\t\t\t+ \" from Productivity_property_wise productivi0_, Project_info project_in1_ \"\r\n\t\t\t\t\t\t\t\t\t+ \" where project_in1_.id=productivi0_.project_id and \" + \" productivi0_.user_id=\"\r\n\t\t\t\t\t\t\t\t\t+ usertype + \" and \" + \" productivi0_.created_on='\" + obj[0].toString() + \"' and \"\r\n\t\t\t\t\t\t\t\t\t+ \"project_in1_.client_type=\" + (Integer) obj1[2]);\r\n\r\n\t\t\t\t\t\t\tfor (int i0 = 0; i0 < lst0.size(); i0++) {\r\n\t\t\t\t\t\t\t\t obj0 = (Object[]) lst0.get(i0);\r\n\r\n\t\t\t\t\t\t\t\t craw = new Crawle_url2();\r\n\t\t\t\t\t\t\t\tcraw.setWid(obj1[0].toString()); // client_name\r\n\t\t\t\t\t\t\t\tcraw.setIs_valid(((Long) obj0[0]).intValue());// source\r\n\t\t\t\t\t\t\t\tcraw.setStatus(((Long) obj0[1]).intValue());// infringing\r\n\t\t\t\t\t\t\t\tcraw.setUser_id(((Long) obj0[2]).intValue());// youtube\r\n\t\t\t\t\t\t\t\tcraw.setProject_id(((Long) obj0[3]).intValue());// FB\r\n\t\t\t\t\t\t\t\tcraw.setType(((Long) obj0[4]).intValue());// instagram\r\n\t\t\t\t\t\t\t\tcraw.setVerified(((Long) obj0[5]).intValue());// twitter\r\n\t\t\t\t\t\t\t\tcraw.setSite_down(((Long) obj0[6]).intValue());// vk\r\n\t\t\t\t\t\t\t\tcraw.setIs_new(((Long) obj0[7]).intValue());// pscp\r\n\r\n\t\t\t\t\t\t\t\tin_side.add(craw);\r\n\t\t\t\t\t\t\t\tobj0=null;\r\n\t\t\t\t\t\t\t\tcraw=null;\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\tobj1=null;\r\n\t\t\t\t\t\t\tlst0=null;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdata.setInside(in_side);\r\n\t\t\t\t\t\tmonthlyGraph.add(data);\r\n\t\t\t\t\t\tobj=null;\r\n\t\t\t\t\t\tdata= null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\treturn ERROR;\r\n\t\t\t\t}\r\n\t\t\t\tfinally\r\n\t\t\t\t{\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\t\t\t\t\tdata=null;\r\n\t\t\t\t\tcraw= null;\r\n\t\t\t\t\tfactory=null;\r\n\t\t\t\t\tdao_userWise=null;\r\n\t\t\t\t\tdao_propwise=null;\r\n\t\t\t\t\tsession2=null;\r\n\t\t\t\t}\r\n\t\t\t\tSystem.gc();\r\n\t\t\t\treturn \"empReport\";\r\n\t\t\t} else if (colorRadio.equalsIgnoreCase(\"blue\")) {\r\n\t\t\t\t// for client wise\r\n\t\t\t\ttry {\r\n\r\n\t\t\t\t\tlst = pcw.viewRecord(\"select pcw.curr_date, pcw.source_link, pcw.infringing_link, pcw.youtube,\"\r\n\t\t\t\t\t\t\t+ \" pcw.social_media, pcw.white_list, pcw.grey_list , pcw.facebook, pcw.instagram, pcw.twitter,\"\r\n\t\t\t\t\t\t\t+ \" pcw.vk, pcw.periscope, pcw.source_domain, pcw.infringing_domain from Productivity_client_wise \"\r\n\t\t\t\t\t\t\t+ \" pcw where pcw.curr_date between '\" + date + \"' and '\" + date1 + \"' and pcw.client_id=\"\r\n\t\t\t\t\t\t\t+ clientname);\r\n\t\t\t\t\tmonthlyGraph = new ArrayList<>();\r\n\r\n\t\t\t\t\tfor (int i = 0; i < lst.size(); i++) {\r\n\t\t\t\t\t\t obj = (Object[]) lst.get(i);\r\n\r\n\t\t\t\t\t\t data = new DashBoardData();\r\n\t\t\t\t\t\tdata.setDate(obj[0].toString());\r\n\t\t\t\t\t\tdata.setSource((Integer) obj[1]);\r\n\t\t\t\t\t\tdata.setInfringing((Integer) obj[2]);\r\n\r\n\t\t\t\t\t\tdata.setYoutube((Integer) obj[3]);\r\n\t\t\t\t\t\tdata.setSocial_media((Integer) obj[4]);\r\n\r\n\t\t\t\t\t\tdata.setWhite_list((Integer) obj[5]);\r\n\t\t\t\t\t\tdata.setGrey_list((Integer) obj[6]);\r\n\r\n\t\t\t\t\t\tdata.setFacebook((Integer) obj[7]);\r\n\t\t\t\t\t\tdata.setInstagram((Integer) obj[8]);\r\n\t\t\t\t\t\tdata.setTwitter((Integer) obj[9]);\r\n\t\t\t\t\t\tdata.setVk((Integer) obj[10]);\r\n\t\t\t\t\t\tdata.setPeriscope((Integer) obj[11]);\r\n\r\n\t\t\t\t\t\tdata.setSocial_media((Integer) obj[7] + (Integer) obj[8] + (Integer) obj[9] + (Integer) obj[10]\r\n\t\t\t\t\t\t\t\t+ (Integer) obj[11]);\r\n\r\n\t\t\t\t\t\tdata.setSource_domain((Integer) obj[12]);\r\n\t\t\t\t\t\tdata.setInfringing_domain((Integer) obj[13]);\r\n\r\n\t\t\t\t\t\tlst1 = dao_propwise.viewRecord(\r\n\t\t\t\t\t\t\t\t\"select DISTINCT mu.name, ppw.created_on ,ppw.user_id from Productivity_property_wise ppw ,\"\r\n\t\t\t\t\t\t\t\t\t\t+ \" Markscan_users mu where mu.id= ppw.user_id and ppw.client_id = \"\r\n\t\t\t\t\t\t\t\t\t\t+ clientname + \" and ppw.created_on='\" + obj[0].toString() + \"' \");\r\n\t\t\t\t\t\tin_side = new ArrayList<>();\r\n\t\t\t\t\t\tfor (int i1 = 0; i1 < lst1.size(); i1++) {\r\n\t\t\t\t\t\t\t obj1 = (Object[]) lst1.get(i1);\r\n\r\n\t\t\t\t\t\t\tlst0 = dao_propwise.viewRecord(\" select sum( productivi0_.source_count),\"\r\n\t\t\t\t\t\t\t\t\t+ \" sum(productivi0_.infringing_count),sum( productivi0_.youtube), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum(productivi0_.facebook),sum(productivi0_.instagram),sum(productivi0_.twitter) \"\r\n\t\t\t\t\t\t\t\t\t+ \" ,sum(productivi0_.vk),sum( productivi0_.periscope) from \"\r\n\t\t\t\t\t\t\t\t\t+ \" Productivity_property_wise productivi0_, Markscan_users markscan_u1_ where \"\r\n\t\t\t\t\t\t\t\t\t+ \" markscan_u1_.id=productivi0_.user_id and productivi0_.client_id= \" + clientname\r\n\t\t\t\t\t\t\t\t\t+ \" and productivi0_.created_on='\" + obj[0].toString() + \"' and \"\r\n\t\t\t\t\t\t\t\t\t+ \" productivi0_.user_id=\" + (Integer) obj1[2]);\r\n\r\n\t\t\t\t\t\t\tfor (int i0 = 0; i0 < lst0.size(); i0++) {\r\n\t\t\t\t\t\t\t\t obj0 = (Object[]) lst0.get(i0);\r\n\r\n\t\t\t\t\t\t\t\t craw = new Crawle_url2();\r\n\t\t\t\t\t\t\t\tcraw.setWid(obj1[0].toString()); // client_name\r\n\t\t\t\t\t\t\t\tcraw.setIs_valid(((Long) obj0[0]).intValue());// source\r\n\t\t\t\t\t\t\t\tcraw.setStatus(((Long) obj0[1]).intValue());// infringing\r\n\t\t\t\t\t\t\t\tcraw.setUser_id(((Long) obj0[2]).intValue());// youtube\r\n\t\t\t\t\t\t\t\tcraw.setProject_id(((Long) obj0[3]).intValue());// FB\r\n\t\t\t\t\t\t\t\tcraw.setType(((Long) obj0[4]).intValue());// instagram\r\n\t\t\t\t\t\t\t\tcraw.setVerified(((Long) obj0[5]).intValue());// twitter\r\n\t\t\t\t\t\t\t\tcraw.setSite_down(((Long) obj0[6]).intValue());// vk\r\n\t\t\t\t\t\t\t\tcraw.setIs_new(((Long) obj0[7]).intValue());// pscp\r\n\r\n\t\t\t\t\t\t\t\tin_side.add(craw);\r\n\t\t\t\t\t\t\t\tobj0=null;\r\n\t\t\t\t\t\t\t\tcraw=null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tobj1=null;\r\n\t\t\t\t\t\t\tlst0=null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tdata.setInside(in_side);\r\n\r\n\t\t\t\t\t\tmonthlyGraph.add(data);\r\n\t\t\t\t\t\tobj= null;\r\n\t\t\t\t\t\tdata= null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpcw = null;\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\treturn ERROR;\r\n\t\t\t\t}\r\n\t\t\t\tfinally{\r\n\t\t\t\t\tpcw = null;\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\t\t\t\t\tobj=null;\r\n\t\t\t\t\tdata=null;\r\n\t\t\t\t\tcraw=null;\r\n\t\t\t\t\tfactory=null;\r\n\t\t\t\t\tdao_userWise=null;\r\n\t\t\t\t\tdao_propwise=null;\r\n\t\t\t\t\tsession2=null;\r\n\t\t\t\t}\r\n\t\t\t\tSystem.gc();\r\n\t\t\t\treturn \"clientReport\";\r\n\t\t\t}\r\n\r\n\t\t\tfactory=null;\r\n\t\t\tdao_userWise=null;\r\n\t\t\tdao_propwise=null;\r\n\t\t\tsession2=null;\r\n\t\t\tSystem.gc();\r\n\t\t\treturn SUCCESS;\r\n\t\t}\r\n\t}", "public List<Message> getMessages(String user) {\n List<Message> messages = new ArrayList<Message>();\n\n Query query =\n new Query(\"Message\")\n //The setFilter line was here originally but not in the Step 3 provided code\n .setFilter(new Query.FilterPredicate(\"user\", FilterOperator.EQUAL, user))\n .addSort(\"timestamp\", SortDirection.DESCENDING);\n PreparedQuery results = datastore.prepare(query);\n\n return messageHelper(user, messages, query, results);\n }", "public List<com.moseeker.baseorm.db.profiledb.tables.pojos.ProfileWorkexp> fetchByReportTo(String... values) {\n return fetch(ProfileWorkexp.PROFILE_WORKEXP.REPORT_TO, values);\n }", "@Override\n\tpublic List<Message> displayListOfMessageBetweenDate(long fromDate) {\n\n\t\tList<Message> messages = new ArrayList<Message>(); \n\n\t\ttry {\n\t\t\tmessages = messageReader.getMessageBetween(fromDate);\n\n\t\t} catch (MessageException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn messages;\n\t}", "private static void printResponse(GetReportsResponse response) {\n\n for (Report report: response.getReports()) {\n ColumnHeader header = report.getColumnHeader();\n List<String> dimensionHeaders = header.getDimensions();\n List<MetricHeaderEntry> metricHeaders = header.getMetricHeader().getMetricHeaderEntries();\n List<ReportRow> rows = report.getData().getRows();\n\n if (rows == null) {\n System.out.println(\"No data found for \" + VIEW_ID);\n return;\n }\n\n for (ReportRow row: rows) {\n List<String> dimensions = row.getDimensions();\n List<DateRangeValues> metrics = row.getMetrics();\n for (int i = 0; i < dimensionHeaders.size() && i < dimensions.size(); i++) {\n System.out.println(dimensionHeaders.get(i) + \": \" + dimensions.get(i));\n }\n\n for (int j = 0; j < metrics.size(); j++) {\n System.out.print(\"Date Range (\" + j + \"): \");\n DateRangeValues values = metrics.get(j);\n for (int k = 0; k < values.getValues().size() && k < metricHeaders.size(); k++) {\n System.out.println(metricHeaders.get(k).getName() + \": \" + values.getValues().get(k));\n }\n }\n }\n }\n }", "public List<ExoSocialActivity> getOlderUserSpacesActivities(Identity owner, Long sinceTime, int limit);", "public List<ExoSocialActivity> getNewerUserActivities(Identity owner, Long sinceTime, int limit);", "List<Bug> getCompletedBugsBetweenDates(Integer companyId, Date since, Date until);", "@GetMapping(\"currentUser\")\n public BetterResponse getUserLastSevenLoginLogs() {\n String currentUsername = SecurityContextHolder.getContext().getAuthentication().getName();\n List<LoginLog> userLastSevenLoginLogs = this.loginLogService.findUserLastSevenLoginLogs(currentUsername);\n return new BetterResponse().data(userLastSevenLoginLogs);\n }", "@GET(\"user-notification-content?expand=notification,notification.translations,notification.notificationResultType&sort=-time_from\")\n Call<NotificationsResponse> getNotifications(@Query(\"from\") long from,\n @Query(\"to\") long to,\n @Query(\"notification_result_accepted\") int notification_result_accepted,\n @Query(\"per-page\") double per_page);", "public List<Food> getFoodsAfterDateTime(LocalDateTime dateTime) {\n List<FoodEntry> entriesAfterDateTime = FoodListManager.filterListByDate(foodEntries, dateTime);\n return FoodListManager.convertListToFoods(entriesAfterDateTime);\n }", "@Override\n\tpublic List<NotificationInfo> queryNotificationInfosByUserId(long userId) {\n\t\treturn notificationDao.queryNotificationInfosByUserId(userId);\n\t}", "public Breakdown generateReport(Date startDate, Date endDate, ArrayList<User> userList, double total) {\n\n //INTIATING VARIABLES\n Breakdown result = new Breakdown();\n\n HashMap<String, Breakdown> intenseMap = new HashMap<String, Breakdown>();\n HashMap<String, Breakdown> normalMap = new HashMap<String, Breakdown>();\n HashMap<String, Breakdown> mildMap = new HashMap<String, Breakdown>();\n\n int intenseCount = 0;\n int normalCount = 0;\n int mildCount = 0;\n\n result.addInList(intenseMap);\n result.addInList(normalMap);\n result.addInList(mildMap);\n\n AppUsageDAO auDAO = new AppUsageDAO();\n\n //If it is without demographic, userList is null\n if (userList == null) {\n userList = auDAO.retrieveUsers(startDate, endDate);\n }\n for (int i = 0; i < userList.size(); i++) {\n User currUser = userList.get(i);\n\n //get current user's app usge\n ArrayList<AppUsage> userUsage = auDAO.retrieveByUser(currUser.getMacAddress(), startDate, endDate);\n double totalSeconds = 0;\n\n Date nextDay = new Date(startDate.getTime() + 60 * 60 * 1000 * 24);\n\n Date oldTime = null;\n if (userUsage.size() > 0) {\n oldTime = userUsage.get(0).getDate();\n if (oldTime.after(nextDay)) {\n nextDay = new Date(nextDay.getTime() + 60 * 60 * 1000 * 24);\n }\n }\n\n for (int j = 1; j < userUsage.size(); j++) {\n AppUsage au = userUsage.get(j);\n Date newTime = au.getDate();\n boolean beforeAppeared = false;\n if (newTime.before(nextDay)) {\n beforeAppeared = true;\n //difference between app usage timing\n long difference = Utility.secondsBetweenDates(oldTime, newTime);\n\n //If difference less than/equal 2 minutes\n if (difference <= 2 * 60) {\n // add difference to totalSeconds if <= 2 mins\n totalSeconds += difference;\n } else {\n // add 10sec to totalSeconds if > 2 mins\n totalSeconds += 10;\n }\n\n } else { // NEW TIMING AFTER NEXT DAY\n nextDay = new Date(nextDay.getTime() + 60 * 60 * 1000 * 24);\n\n if (!beforeAppeared) {\n long difference = Utility.secondsBetweenDates(oldTime, newTime);\n if (difference <= 2 * 60) {\n // add difference to totalSeconds if <= 2 mins\n totalSeconds += difference;\n } else {\n // add 10sec to totalSeconds if > 2 mins\n totalSeconds += 10;\n }\n }\n }\n\n oldTime = newTime;\n\n }\n\n if (oldTime.before(nextDay)) {\n long difference = Utility.secondsBetweenDates(oldTime, nextDay);\n if (difference < 10) {\n totalSeconds += difference;\n } else {\n totalSeconds += 10;\n }\n } else {\n totalSeconds += 10;\n }\n\n //DIVIDE TO GET INTO DAYS\n long days = (endDate.getTime() - startDate.getTime()) / (1000 * 60 * 60 * 24) + 1;\n totalSeconds /= days;\n\n //FILTER USER'S USAGE INTO CATEGORIES\n double totalHours = totalSeconds / (60 * 60);\n\n if (totalHours > 0) {\n if (totalHours < 1.0) {\n //MILD\n mildCount++;\n\n } else if (totalHours < 5.0) {\n //NORMAL\n normalCount++;\n\n } else {\n //INTENSE\n intenseCount++;\n\n }\n }\n\n }\n //Calculate percentage\n if (total == -1) {\n total = mildCount + normalCount + intenseCount;\n\n }\n\n int mildPercent = (int) Math.round(mildCount / total * 100);\n int normalPercent = (int) Math.round(normalCount / total * 100);\n int intensePercent = (int) Math.round(intenseCount / total * 100);\n\n //Put in maps\n intenseMap.put(\"intense-count\", new Breakdown(\"\" + intenseCount));\n intenseMap.put(\"intense-percent\", new Breakdown(\"\" + intensePercent));\n\n normalMap.put(\"normal-count\", new Breakdown(\"\" + normalCount));\n normalMap.put(\"normal-percent\", new Breakdown(\"\" + normalPercent));\n\n mildMap.put(\"mild-count\", new Breakdown(\"\" + mildCount));\n mildMap.put(\"mild-percent\", new Breakdown(\"\" + mildPercent));\n\n return result;\n }", "private void todayReport() {\n\t\tListSeries dollarEarning = new ListSeries();\n\t\tString[] dates = new String[1];\n\t\t/* Create a DateField with the default style. */\n Calendar calendar=Calendar.getInstance();\n\t\t\n\t\tvReportDisplayLayout.removeAllComponents();\n\t\tdates[0] = String.valueOf(calendar.get(Calendar.MONTH)+1) + \"/\" + \n\t\t\t\tString.valueOf(calendar.get(Calendar.DATE)) + \"/\" + \n\t\t\t\tString.valueOf(calendar.get(Calendar.YEAR));\n\t\tdollarEarning = getTodayData();\n\t\t\n\t\tdisplayChart chart = new displayChart();\n\t\t\n\t\tdReportPanel.setContent(chart.getDisplayChart(dates, dollarEarning));\n\t\tvReportDisplayLayout.addComponent(dReportPanel);\n\t}", "@Override\n public List<ConnectathonParticipant> getPeopleAttendingOnFriday() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"getPeopleAttendingOnFriday\");\n }\n\n renderAddPanel = false;\n\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager() || Role.isLoggedUserMonitor()) {\n\n EntityManager em = EntityManagerService.provideEntityManager();\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND cp.institution = \" +\n \":inInstitution AND fridayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n query.setParameter(IN_INSTITUTION, choosenInstitutionForAdmin);\n return query.getResultList();\n } else {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND fridayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n return query.getResultList();\n }\n } else {\n selectedInstitution = Institution.getLoggedInInstitution();\n EntityManager em = EntityManagerService.provideEntityManager();\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession AND cp.institution = \" +\n \":inInstitution AND fridayMeal IS true\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n query.setParameter(IN_INSTITUTION, selectedInstitution);\n return query.getResultList();\n }\n }", "@Override\n\tpublic List<PhysicalData> getPhysicalActivity(String username, String date) {\n\t\treturn mobileDao.getPhysicalActivity(username,date);\n\t}", "private void last30DaysReport() {\n\t\tListSeries dollarEarning = new ListSeries();\n//\t\tString[] dates = controler.getLast30DaysTransactionsDates();\n\t\tString[] dates = getLast30Dates();\n\t\t\n\t\tvReportDisplayLayout.removeAllComponents();\n\t\t\n\t\tdollarEarning = getLast30DaysData();\n\t\tdisplayChart chart = new displayChart();\n\t\t\n\t\tdReportPanel.setContent(chart.getDisplayChart(dates, dollarEarning));\n\t\tvReportDisplayLayout.addComponent(dReportPanel);\n\t}", "public void getRecentUsers(View view){\n SharedPreferences sharedPref = getContext().getSharedPreferences(\"recentVisited\", Context.MODE_PRIVATE);\n int size = sharedPref.getInt(\"size\", 0);\n\n // clears the variables.\n userName.clear();\n uid.clear();\n for (int i = size+1; i >0 ; i--) {\n String name= sharedPref.getString(\"name_\"+i,\"deleted\");\n String userId= sharedPref.getString(\"uid_\"+i,\"deleted\");\n if (!Objects.equals(name, \"deleted\")){\n userName.add(name);\n uid.add(userId);\n }\n\n }\n\n setList(view);\n }", "void generateResponseHistory(LocalDate from, LocalDate to);", "ListView getShowReportListView();", "public int getCountOfMostUpcomingUserEvents(long userId);", "public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByApprovedAt(Collection<LocalDateTime> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.APPROVED_AT.in(values));\n }", "public ProfileTaskReport getTaskReport(User user) {\n ParameterCheckUtility.checkNotNull(user, \"user\");\n ProfileTaskReport report = new ProfileTaskReport();\n report.setTaskName(getTaskName());\n int totalFieldCount = 1;\n int completedFieldCount = 0;\n // check demographic answer for School\n for (DemographicResponse demographicResponse : user.getDemographicResponses()) {\n if (SHOW_HIDE_MY_SCHOOL_QUESTION.equals(demographicResponse.getQuestion().getText())) {\n if (Helper.checkNotNullNorEmpty(demographicResponse.getAnswer().getText())) {\n completedFieldCount++;\n }\n }\n }\n report.setTotalFieldCount(totalFieldCount);\n report.setCompletedFieldCount(completedFieldCount);\n report.setCompleted(totalFieldCount == completedFieldCount);\n return report;\n }", "@Override\n\tpublic List<Watch> getWatchByUser(String userId) throws Exception {\n\t\treturn null;\n\t}", "@RequestMapping(value = \"/userid/\", method = RequestMethod.GET)\n\tprivate List<Notification> getByuserId(@RequestParam(\"userid\") String userid) {\n\t\tList<Notification> Notifications = noticontroller.getnotibyuserid(userid);\n\n\t\tif (Notifications == null) {\n\t\t\tthrow new NotFoundException();\n\t\t}\n\t\treturn Notifications;\n\t}", "List<Project> getWithNonResolvedMessages(User user);", "@RequestMapping(\n value = \"/{start}/{end}\",\n method = RequestMethod.GET\n )\n public final Iterable<Entry> filter(\n @PathVariable @DateTimeFormat(iso = ISO.DATE) final Date start,\n @PathVariable @DateTimeFormat(iso = ISO.DATE) final Date end\n ) {\n if (end.before(start)) {\n throw new IllegalArgumentException(\"Start date must be before end\");\n }\n final List<Entry> result = new LinkedList<Entry>();\n List<Entry> entries = SecurityUtils.actualUser().getEntries();\n if (entries == null) {\n entries = Collections.emptyList();\n }\n for (final Entry entry : entries) {\n if (entry.getDate().after(start)\n && entry.getDate().before(end)) {\n result.add(entry);\n }\n }\n return result;\n }", "public List<Chat> allChatsAfterId(Long lastID, String user1, String user2) \n\t{\n\t\tList<Chat> chats = allChats(user1, user2);\n\t\tchats.retainAll(getChatsAfter(lastID));\n\t\treturn chats;\n\t}", "public EventList getEvents(String userName) {\n try {\n PreparedStatement s = sql.prepareStatement(\"SELECT userId, eventName, startMonth, startDay, startYear, startHour, startMinute\" +\n \", endMonth, endDay, endYear, endHour, endMinute FROM Events WHERE userId=?\");\n s.setInt(1, getIdOfUser(userName));\n s.execute();\n ResultSet results = s.getResultSet();\n\n EventList events = new EventList();\n if (!results.isBeforeFirst()) {\n return events;\n }\n\n while (!results.isLast()) {\n results.next();\n Event e = new Event(userName, results.getString(2),\n results.getInt(3), results.getInt(4), results.getInt(5),\n results.getInt(6), results.getInt(7), results.getInt(8),\n results.getInt(9), results.getInt(10), results.getInt(11),\n results.getInt(12));\n events.add(e);\n }\n results.close();\n s.close();\n events.sort();\n\n return events;\n } catch (SQLException e) {\n System.err.println(\"SQLE\");\n sqlException(e);\n return null;\n }\n }" ]
[ "0.587115", "0.5809354", "0.57946193", "0.5560938", "0.55538267", "0.5495198", "0.54684174", "0.54617983", "0.53366333", "0.53083503", "0.5295592", "0.528256", "0.52656233", "0.52606744", "0.52575195", "0.5253311", "0.52336293", "0.5212756", "0.5209135", "0.5144813", "0.5136687", "0.51024926", "0.508921", "0.5070399", "0.5057243", "0.5051143", "0.50435203", "0.5032682", "0.50243753", "0.4995731", "0.4991439", "0.4984869", "0.4975972", "0.49751455", "0.49612674", "0.49468452", "0.4926625", "0.4912846", "0.49048808", "0.48871645", "0.4880345", "0.48744324", "0.48678282", "0.4856256", "0.48522392", "0.48503587", "0.4849976", "0.48444694", "0.4842075", "0.48217747", "0.4818249", "0.48180738", "0.4817247", "0.48130438", "0.48073706", "0.4806868", "0.48005384", "0.47953394", "0.47753534", "0.47722444", "0.47657415", "0.47640514", "0.47485447", "0.4737256", "0.4737174", "0.47355878", "0.47218746", "0.47195712", "0.4716113", "0.4700896", "0.46951514", "0.46910366", "0.4668892", "0.4667834", "0.46633065", "0.46570027", "0.46532205", "0.46526235", "0.46495456", "0.46397784", "0.4634134", "0.4629191", "0.46277612", "0.4624635", "0.46189347", "0.46161923", "0.46103385", "0.45984006", "0.45843083", "0.4583406", "0.45814198", "0.4578699", "0.45778242", "0.45635957", "0.45631063", "0.45606142", "0.45554662", "0.4552279", "0.45495597", "0.4543577" ]
0.6839546
0
Returns the open orders visible to the given user.
public List<ReportBaseImpl> getOpenOrders(SimpleUser user) throws PersistenceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public List<Order> findOrdersByUser(User user) {\n return orderRepository.findByCustomerUsernameOrderByCreatedDesc(user.getUsername()).stream()\n .filter(t -> t.getOrder_state().equals(\"ACTIVE\"))\n .map(mapper::toDomainEntity)\n .collect(toList());\n }", "List<Order> getOpenOrders(OpenOrderRequest orderRequest);", "List<Order> getByUser(User user);", "public String getOpenOrders() {\n\n\t\treturn getOpenOrders(\"\");\n\t}", "@RequestMapping(\"/getUserOrder\")\n public List<Order> getUserOrder(@RequestParam(\"user_id\") int user_id){\n return orderService.getOrdersByUser(user_id);\n }", "List<Order> getUserOrderList(int userId) throws ServiceException;", "public List<Order> getAllUsersOrdersById(long userId);", "public List<Orders> findAccepted2(int userID);", "List<UserOrder> findUserOrdersByUserId(Long userId);", "@GetMapping(\"/{userId}/orders\")\n\tpublic List<Order> getAllOrders(@PathVariable Long userId) throws UserNotFoundException {\n\t\tOptional<User> userOptional = userRepository.findById(userId);\n\t\tif (!userOptional.isPresent()) {\n\t\t\tthrow new UserNotFoundException(\"User not found\");\n\t\t}\n\t\treturn userOptional.get().getOrders();\n\n\t}", "@Override\r\n\tpublic List<UserOrderInfo> getUserOrderInfo(int userId) {\n\t\treturn odi.getUserOrderInfo(userId);\r\n\t}", "public static List<Order> getUserOrdersByUserId(long userId){\n\t\t// getting orders by userId\n\t\treturn dao.getUserOrdersByUserId(userId);\n\t}", "public static List<Order> personalOrders(int userID) throws LegoHouseException {\n try {\n Connection con = Connector.connection();\n String SQL = \"SELECT * FROM orders WHERE userID=?\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ps.setInt(1, userID);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n List<Order> personalOrders = new ArrayList();\n do {\n int ordernumber = rs.getInt(1);\n int height = rs.getInt(3);\n int width = rs.getInt(4);\n int length = rs.getInt(5);\n String status = rs.getString(6);\n Order order = new Order(ordernumber, height, length, width, status);\n personalOrders.add(order);\n }\n while (rs.next());\n return personalOrders;\n }\n else {\n throw new LegoHouseException(\"You dont have any orders\", \"customerpage\");\n }\n }\n catch (ClassNotFoundException | IllegalAccessException | InstantiationException | SQLException ex) {\n throw new LegoHouseException(ex.getMessage(), \"index\");\n }\n }", "public List<Issue> getUserActiveIssues(User user);", "List<Topo> getToposDispo(String user);", "public CustomerOrder list(String username) {\n\t\treturn orderDao.list(username);\n\t}", "private boolean userHasOrder(LogicFacade logic, User user) throws LegoCustomException {\r\n ArrayList<HouseOrder> orders = logic.getAllOrdersByUser(user.getId());\r\n boolean hasOrder = false;\r\n for (HouseOrder houseOrder : orders) {\r\n hasOrder = (houseOrder.getUserID() == user.getId());\r\n }\r\n return hasOrder;\r\n }", "public void findAllMyOrders() {\n log.info(\"OrdersBean : findAllMyOrders\");\n FacesContext context = FacesContext.getCurrentInstance();\n\n ordersEntities = ordersServices.findAllByIdUsersAndStatusIsValidateOrCanceled(usersBean.getUsersEntity().getId());\n if (ordersEntities.isEmpty()) {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, JsfUtils.returnMessage(getLocale(), \"fxs.modalContractsOrder.listOrderEmpty\"), null));\n } else {\n deadlineLeasing();\n }\n }", "@GetMapping(\"/view-all-order\")\n\tpublic List<OrderDTO> viewAllOrders() {\n\t\tLOGGER.info(\"view-all-Order URL is opened\");\n\t\tLOGGER.info(\"view-all-Order() is initiated\");\n\t\tLOGGER.info(\"view-all-Order() has executed\");\n\t\treturn orderService.getAllOrders();\n\t}", "@GetMapping(path = \"/orders\")\n Iterable<ShopOrder> getOrdersByUser(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);", "public Orders getOrderByUser(Integer userid) {\n\t\tOrdersExample example=new OrdersExample();\n\t\texample.createCriteria().andUseridEqualTo(userid);\n\t\t\n\t\treturn ordersMapper.selectByExample(example).get(0);\n\t}", "public List<Order> p1_getActiveOrders(Customer customer) {\t\n\t\t//return customer.getOrders().stream().collect(toList()); // INITIAL\n\t\t// SOLUTION(\n\t\treturn customer.getOrders().stream()\n\t\t\t\t.filter(order -> order.isActive())\n\t\t\t\t.collect(toList());\n\t\t// SOLUTION)\n\t}", "List<Order> selectAll(int userid);", "List<Order> findByUser(User user);", "@RequestMapping(value = \"/orders\")\r\n\tpublic ModelAndView openOrdersPage() {\r\n\t\tList<Order> orders = databaseInfo.selectOrders();\r\n\r\n\t\treturn new ModelAndView(\"orders\", \"orderslist\", orders);\r\n\t}", "@CrossOrigin(origins = \"*\")\n @GetMapping(\"/orders/user/{userid}\")\n public ResponseEntity<List<Order>> getAllOrdersByUserId(@PathVariable(\"userid\") UUID userId) {\n List<Order> orders = ordersRepository.findAllByUserId(userId);\n return ResponseEntity.ok(orders);\n }", "private List<PurchasingOrder> getLoggedInCustomerAirlineTicketOrders() {\r\n final Customer loggedInCustomer = usersComponent.getLoggedInCustomer();\r\n return loggedInCustomer.getAirlineTicketOrders();\r\n }", "public String getOpenOrders(String market) {\n\n\t\tString method = \"getopenorders\";\n\n\t\tif(market.equals(\"\"))\n\n\t\t\treturn getJson(API_VERSION, MARKET, method);\n\n\t\treturn getJson(API_VERSION, MARKET, method, returnCorrectMap(\"market\", market));\n\t}", "public List<Shoporder> GetOrderByUser(String userId) {\n\t\treturn mapper.GetOrderByUser(userId);\n\t}", "@Override\n public List<Order> findOrders() {\n return orderRepository.findAll(Sort.by(Sort.Direction.DESC, \"created\")).stream()\n .filter(t -> t.getOrder_state().equals(\"ACTIVE\"))\n .map(mapper::toDomainEntity)\n .collect(toList());\n }", "public List<OpenPlayer> getOpenPlayers() {\r\n if(actuelAktionators.isEmpty()){\r\n throw new IllegalStateException(\"In der Liste der Spieler muss mindestens ein Spieler sein (der Hoechtbietende)\");\r\n }\r\n return actuelAktionators;\r\n }", "public static List<GenericValue> getBillingAccountOpenOrders(Delegator delegator, String billingAccountId) throws GenericEntityException {\n return EntityQuery.use(delegator).from(\"OrderHeader\")\n .where(EntityCondition.makeCondition(\"billingAccountId\", EntityOperator.EQUALS, billingAccountId),\n EntityCondition.makeCondition(\"statusId\", EntityOperator.NOT_EQUAL, \"ORDER_REJECTED\"),\n EntityCondition.makeCondition(\"statusId\", EntityOperator.NOT_EQUAL, \"ORDER_CANCELLED\"),\n EntityCondition.makeCondition(\"statusId\", EntityOperator.NOT_EQUAL, \"ORDER_COMPLETED\")).queryList();\n }", "public List getUserListCurrentOrderByOffice() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n query = session.createQuery(\"select user from app.user.User user where user.currentEmployee = 'true' order by user.Location.locationId, user.lastName, user.firstName\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public Order viewOrder(int on) {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\tOrder found = em.find(Order.class, on);\r\n\t\tem.close();\r\n\t\treturn found;\r\n\t}", "@Override\n public JSONObject viewOrderFormByExecutive(String username) {\n\n return in_orderformdao.viewOrderFormByExecutive(username);\n }", "@Override\r\n\tpublic List<OrderRecordHisVo> findHisByUserId(UserNoParam user) {\n\t\tList<OrderRecordHisVo> orderHisList=(List<OrderRecordHisVo>) mapper.getOrderHisRecord(user);\r\n\t\t\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn orderHisList;\r\n\t}", "public List<Order> displayOrders(LocalDate date) throws FlooringMasteryDaoException {\n\n List<Order> orders = dao.getOrdersByDate(date);\n return orders;\n\n }", "protected OrdersEntity findOrders_ByIdUsers_andStatusIsPending() {\n log.info(\"OrdersBean : findOrders_ByIdUsers_andStatusIsPending!\");\n return ordersServices.findByIdUsersAndStatusIsPending(usersBean.getUsersEntity().getId());\n }", "List<Bug> getOpenBugsBetweenDatesByUser(int companyId, Integer userId, Date since, Date until);", "@ApiModelProperty(required = true, value = \"editable flag; true if user can modify payment order\")\n public Boolean getEditableByUser() {\n return editableByUser;\n }", "public Order viewOrders() {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\t//Order nextOrder = \r\n\t\treturn nextOrder;\r\n\t}", "@Override\n\tpublic List<UserGoodsView> getUserGoodsView(String username) throws Exception {\n\t\tString hql = \"from UserGoodsView us where us.userAct=\"+username;\n\t\t//hql = hql + \" order by s.id desc\";\n\t\tQuery query = getHibernateTemplate().getSessionFactory()\n\t\t\t\t.getCurrentSession().createQuery(hql);\n\t\tList<UserGoodsView> list = query.list();\n\t\treturn list;\n\t}", "public String open_orders(String pair) {\n\t\treturn this.apiCall(\"open_orders\", pair, \"\", true);\n\t}", "@Override\n public JsonMsg findUserAllOrders(Integer page, Integer pageSize, Integer userId) {\n List<OrderVo> orders = orderMapper.findUserAllOrderByPage(userId, page - 1, pageSize);\n JsonMsg jsonMsg = JsonMsg.makeSuccess(\"成功\", orders);\n return jsonMsg;\n }", "@Override\n public JSONObject viewSalesOrderByExecutive(String username) {\n return in_salesorderdao.viewSalesOrderByExecutive(username);\n }", "public static void viewOrder() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Viewing existing orders************\");\n\t\t// TODO - implement RRPSS.viewOrder\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\t\tOrderedPackageManager orderedPackageManager = new OrderedPackageManager();\n\t\tList listOfOrderedPromotionalPackage = null;\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to view the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tlistOfOrderedItems = orderedItemManager\n\t\t\t\t\t.retrieveOrderedItemsByOrderID(order.getId());\n\t\t\tlistOfOrderedPromotionalPackage = orderedPackageManager\n\t\t\t\t\t.retrieveOrderedPackageByOrderID(order.getId());\n\n\t\t\tif (listOfOrderedItems.size() == 0\n\t\t\t\t\t&& listOfOrderedPromotionalPackage.size() == 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\tSystem.out.println(\"Order is empty!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t\tif (listOfOrderedItems.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"All Cart Items Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedItems.size(); j++) {\n\t\t\t\t\tOrderedItem orderedItem = (OrderedItem) listOfOrderedItems\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedItem.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\n\t\t\tif (listOfOrderedPromotionalPackage.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"Promotional Packages Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedPromotionalPackage.size(); j++) {\n\t\t\t\t\tOrderedPackage orderedPackage = (OrderedPackage) listOfOrderedPromotionalPackage\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedPackage.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of viewing orders************\");\n\t}", "public static void accessoriesorderlist(){\r\n\t\t\r\n\t\tAccount a = (Account) Cache.get(\"authUser\");\r\n\t\tDealer d = Dealer.find(\"byDealershipId\", a.uniquenumber).first();\r\n\t\tif(a != null){\r\n\t\t\tList<OrderAccessories> l = OrderAccessories.find(\"byDealerId\",d ).fetch();\r\n\t\t\trender(l);\r\n\t\t}\r\n\t\telse \r\n\t\t\tDealerControllerMap.pleaselogin();\r\n\r\n\t}", "public List getUserListShowToClient() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n query = session.createQuery(\"select user from app.user.User user where user.currentEmployee = 'true' and user.clientShow = 'TRUE' order by user.lastName, user.firstName\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "@Override\n public JSONObject viewOrderByManager(String username) {\n return in_orderformdao.viewOrderFormByManager(username);\n }", "public void listOpenUserCollections() {\n menuAddToCollection.removeAll();\n ArrayList<ModelUserCollection> openUserCollections = modelOpenUserCollections.getOpenCollections();\n if(openUserCollections.size() > 0) {\n menuAddToCollection.setEnabled(true);\n for(ModelUserCollection modelUserCollection : openUserCollections) {\n JMenuItem menuItemUserCollection = new JMenuItem(\n new ActionAddReleaseToUserCollection(modelUserCollection.getName(), modelUserCollection, modelSelectedRelease));\n menuAddToCollection.add(menuItemUserCollection);\n // Toevoegen aan de collectie die openstaat in onmogelijk\n if(modelUserCollection == modelCollection) {\n menuItemUserCollection.setEnabled(false);\n }\n }\n } else {\n menuAddToCollection.setEnabled(false);\n }\n }", "Collection<Order> get(User user, Project project, Date filterDate, Date filterDeliveredDate, OrderStatus filterStatus, boolean excludeCancelled, int firstResult,\n int maxResult, String sortProperty, boolean isAscending);", "@Override\n public JSONObject viewPurchaseOrderByManager(String username) {\n\n return in_purchaseorderdao.viewPurchaseOrderByManager(username);\n }", "Optional<Order> findByUserId(long userId);", "public static ListObject getNearbyEvents (int userId) {\n\t\tProfile user = getUser(userId) ;\n\t\tList <Event> events =EventController.setUserStatus(user.getEventsWhoOwn(), 2);\n\t\tevents.addAll( EventController.setUserStatus(user.getEvents(), 1)) ;\n\t\tCollections.sort(events);\n\t\tList <Event> unfinished = EventController.getUnfinishedEvents(events) ;\n\t\tint size = 5 ;\n\t\tListObject obj ;\n\t\tif ( unfinished.size() <= 5 ) {\n\t\t\tobj = new ListObject(unfinished) ;\n\t\t\tif ( unfinished.size() >= events.size() ) {\n\t\t\t\tobj.moreExist = 1 ;\n\t\t\t}\n\t\t\telse obj.moreExist = 2 ;\n\t\t}\n\t\telse {\n\t\t\tobj = new ListObject(unfinished.subList(0,size));\n\t\t\tobj.moreExist = 2 ;\n\t\t}\n\t\t\n\t\treturn obj ;\n\t}", "@GetMapping(\"/{userId}/orders\")\n public CollectionModel<OrderDto> findOrders(@PathVariable @Positive Long userId,\n @RequestParam(required = false) @Positive Integer size,\n @RequestParam(required = false) @Positive Integer page) {\n PageDto pageDto = pageDtoBuilder.build(size, page);\n List<OrderDto> orderDtoList = orderService.findAllByUserId(userId, pageDto);\n Link selfLink = linkTo(methodOn(UserController.class)\n .findOrders(userId, pageDto.getSize(), pageDto.getPage()))\n .withSelfRel();\n Link findOrderLink = linkTo(methodOn(UserController.class)\n .findOrder(userId, null))\n .withRel(ApiConstant.FIND_ORDER);\n return CollectionModel.of(orderDtoList, selfLink, findOrderLink);\n }", "@Override\n public Collection<Order> getOrdersByUserId(String id) {\n Collection<Order> orders = getAll();\n return orders.stream()\n .filter(x -> x.getCustomerId().equals(id))\n .collect(Collectors.toList());\n }", "public PageInfo<List<OrderitemPojo>> getOrderByUserid(Integer userid,\n\t\t\tint page, int row) {\n\t PageHelper.startPage(page, row);\n\t\tOrdersExample example=new OrdersExample();\n\t\texample.createCriteria().andUseridEqualTo(userid);\n\t\texample.setOrderByClause(\"oid desc\");\n\t\tList<Orders> orderList=ordersMapper.selectByExample(example);\n\t\t\n\t\tPageInfo<Orders> pageInfo1=new PageInfo<Orders>(orderList);\n\t\t\n\t\t\n\t\tList<List<OrderitemPojo>> list=new ArrayList<List<OrderitemPojo>>();\n\t\tfor(Orders orders:pageInfo1.getList()){\n\t\t\tList<OrderitemPojo> orderitemList=orderitemMapper.selectOrderitemPojoByOid(orders.getOid());\n\t\t\tfor(OrderitemPojo orderitem:orderitemList){\n\t\t\t\tString image=orderitem.getImage();\n\t\t\t\tString[] split=image.split(\",\");\n\t\t\t\torderitem.setImage(\"/pic/\"+split[0]);\n\t\t\t\torderitem.setOrdertime(orders.getOrdertime());\n\t\t\t\torderitem.setTotal(orders.getTotal());\n\t\t\t\tString status=orders.getStatus();\n\t\t\t\tif(status==null) status=\"无\";\n\t\t\t\torderitem.setStatus(status);\n\t\t\t\tInteger state=orders.getState();\n\t\t\t\tString c=\"\";\n\t\t\t\tif(state==0){\n\t\t\t\t\tc=\"未付款\";\n\t\t\t\t}else if(state==1){\n\t\t\t\t\tc=\"已付款(未发货)\";\n\t\t\t\t}else if(state==2){\n\t\t\t\t\tc=\"已发货\";\n\t\t\t\t}else if(state==3){\n\t\t\t\t\tc=\"已收货\";\n\t\t\t\t}else if(state==4){\n\t\t\t\t\tc=\"交易成功)\";\n\t\t\t\t}\n\t\t\t\torderitem.setState(c);\t\n\t\t\t}\n\t\t\tlist.add(orderitemList);\t\n\t\t}\n\t\tPageInfo<List<OrderitemPojo>> pageInfo=new PageInfo<List<OrderitemPojo>>(list);\n\t\tpageInfo.setPages(pageInfo1.getPages());\n\t\tpageInfo.setTotal(pageInfo1.getTotal());\n\t\tpageInfo.setHasNextPage(pageInfo1.isHasNextPage());\n\t\tpageInfo.setHasPreviousPage(pageInfo1.isHasPreviousPage());\t\n\t\treturn pageInfo;\n\t\t\n\t}", "@Override\n public List<Item> viewOwnedItems(Customer customer) {\n return itemRepo.findItemsByID(customer);\n }", "@Override\n public JSONObject viewPurchaseOrderByExecutive(String username) {\n\n return in_purchaseorderdao.viewPurchaseOrderByExecutive(username);\n }", "public void getOpenIssues(View view) {\n Intent intent = new Intent().setClass(RepositoryActivity.this, IssueListActivity.class);\n intent.putExtra(Constants.Repository.REPO_OWNER, mBundle\n .getString(Constants.Repository.REPO_OWNER));\n intent.putExtra(Constants.Repository.REPO_NAME, mBundle\n .getString(Constants.Repository.REPO_NAME));\n intent.putExtra(Constants.Issue.ISSUE_STATE, Constants.Issue.ISSUE_STATE_OPEN);\n startActivity(intent);\n }", "@Override\n @Cacheable(value=AccountingPeriod.CACHE_NAME, key=\"'{getOpenAccountingPeriods}'\")\n public Collection<AccountingPeriod> getOpenAccountingPeriods() {\n HashMap<String,Object> map = new HashMap<String,Object>();\n map.put(OLEConstants.ACCOUNTING_PERIOD_ACTIVE_INDICATOR_FIELD, Boolean.TRUE);\n\n return businessObjectService.findMatchingOrderBy(AccountingPeriod.class, map, OLEPropertyConstants.ACCTING_PERIOD_UNIV_FISCAL_PERIOD_END_DATE, true);\n }", "void getOrders();", "List<Order> findClientOrders(long clientId) throws DaoProjectException;", "public SPResponse getUserAcitonPlans(User user) {\n final SPResponse resp = new SPResponse();\n \n UserActionPlan userActionPlan = actionPlanFactory.getUserActionPlan(user);\n Set<String> userActionPlans = userActionPlan.getActionPlanProgressMap().keySet();\n \n ArrayList<ActionPlanSummaryDTO> userActionPlanSummary = new ArrayList<ActionPlanSummaryDTO>();\n for (String actionPlanId : userActionPlans) {\n ActionPlanProgress actionPlanProgress = userActionPlan.getActionPlanProgress(actionPlanId);\n ActionPlanDao actionPlan = actionPlanFactory.getActionPlan(actionPlanId);\n if (actionPlan != null) {\n userActionPlanSummary.add(new ActionPlanSummaryDTO(actionPlan, actionPlanProgress\n .getCompletedCount()));\n }\n }\n // add to the response\n return resp.add(Constants.PARAM_ACTION_PLAN_LIST, userActionPlanSummary);\n }", "@Override\n\tpublic List<VisitLaboratory> fetchAllWithOpenStatusForUser() {\n\n\t\treturn this.visitLaboratoryDao.fetchAllWithOpenStatusForUser(\n\t\t\t\tthis.visitStatusBo.getEndPointStatus(),\n\t\t\t\tthis.pointBo.getPointByName(VisitWorkflowPoint.LABORATORY));\n\t}", "List<OrderModel> getAllLoggedInCustomerTickets() {\r\n final List<PurchasingOrder> purchasingOrders = getLoggedInCustomerAirlineTicketOrders();\r\n return OrderModel.mapFromPurchasingOrders(purchasingOrders);\r\n }", "@Override\n public JSONObject viewFnInvoiceByExecutive(String username) {\n in_invoicedao.viewInvoiceByExecutiveID(username);\n return in_invoicedao.viewInvoiceByExecutiveID(username);\n }", "@Test\n\tpublic void shouldReturnPagedOpenDocumentsSortedByOpenAmountAsc()\n\t{\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getAllPagedDocuments(\n\t\t\t\tcreatePageableData(0, 10, \"byOpenAmountAsc\"), Collections.singletonList(AccountSummaryAddonUtils\n\t\t\t\t\t\t.createFilterByCriteriaObject(DOCUMENT_STATUS_OPEN, StringUtils.EMPTY)));\n\n\t\tTestCase.assertEquals(10, result.getResults().size());\n\t\tfor (final B2BDocumentModel document : result.getResults())\n\t\t{\n\t\t\tTestCase.assertEquals(DocumentStatus.OPEN, document.getStatus());\n\t\t}\n\t}", "List<Topo> getMesTopos(String user);", "public List<Office> getNearbyOffices() {\n return nearbyOffices;\n }", "@Override\n public JSONObject viewSalesOrderByManager(String username) {\n return in_salesorderdao.viewSalesOrderByManager(username);\n }", "@Override\n\tpublic List<ComboItem> getPositionsOpen() {\n\t\treturn positionsOpen;\n\t}", "public SPResponse getUserOrgGoals(User user, Object[] params) {\n final SPResponse resp = new SPResponse();\n \n String userEmail = (String) params[0];\n \n User userForOrgGoals = null;\n \n if (StringUtils.isEmpty(userEmail)) {\n userForOrgGoals = user;\n } else {\n userForOrgGoals = userFactory.getUserForGroupLead(userEmail, user);\n }\n \n UserActionPlan userActionPlan = actionPlanFactory.getUserActionPlan(userForOrgGoals);\n \n String actionPlanId = (String) params[1];\n if (StringUtils.isBlank(actionPlanId)) {\n actionPlanId = userActionPlan.getSelectedActionPlan();\n }\n \n if (actionPlanId != null) {\n try {\n resp.add(Constants.PARAM_ACTION_PLAN, new UserActionPlanDTO(getActionPlan(actionPlanId),\n userActionPlan));\n \n // adding flag for more than one organization plan\n resp.add(Constants.PARAM_ACTION_PLAN_HAMBURGER, userActionPlan.getActionPlanProgressMap()\n .size() > 1);\n } catch (DashboardRedirectException e) {\n log.warn(\"Selected action plan not found.\", e);\n removeActionPlan(userForOrgGoals, actionPlanId);\n }\n }\n \n// final List<UserMessage> userMessages = userForOrgGoals.getMessages();\n// if (!CollectionUtils.isEmpty(userMessages)) {\n// // adding any user messages if present for organization plan\n// resp.add(\n// Constants.PARAM_MESSAGE,\n// userMessages.stream().filter(m -> m.getFeature() == SPFeature.OrganizationPlan)\n// .collect(Collectors.toList()));\n// }\n// \n return resp.isSuccess();\n }", "@RequestMapping(\"/getAllOrders\")\n public List<Order> getAllOrders(){\n System.out.println(\"getAllOrders\");\n System.out.println(SessionUtil.getAuth());\n return orderService.getAllOrders();\n }", "private List<AccessibleGroupProduct> accessibleGroupProducts(RequestingUser ru, User user) {\n\t\tList<AccessibleGroupProduct> accessibleGroupProducts;\n\t\tif (ru.isSuperUser()) {\n\t\t\taccessibleGroupProducts = groupDao.findForSuperUser();\n\t\t} else if (ru.isAccountManager()) {\n\t\t\t\n\t\t\t\n\t\t\tList<String> lobs = new ArrayList<String>();\n\t\t\t\n\t\t\tif( user.getProducerLob() != null && (user.getProducerLob().equals(\"WC\") || user.getProducerLob().equals(\"SL\")) ) {\n\t\t\t\tlobs.add(user.getProducerLob());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlobs.add(\"WC\");\n\t\t\t\tlobs.add(\"SL\");\n\t\t\t}\n\t\t\t\n\t\t\taccessibleGroupProducts = groupDao.findForAccountManager(user.getId(), lobs);\n\t\t} else if (ru.isHLCUser()) {\n\t\t\t\n\t\t\t\n\t\t\tList<String> lobs = new ArrayList<String>();\n\t\t\t\n\t\t\tif( user.getProducerLob() != null && (user.getProducerLob().equals(\"WC\") || user.getProducerLob().equals(\"SL\")) ) {\n\t\t\t\tlobs.add(user.getProducerLob());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlobs.add(\"WC\");\n\t\t\t\tlobs.add(\"SL\");\n\t\t\t}\n\t\t\t\n\t\t\taccessibleGroupProducts = groupDao.findForAccountManager(user.getId(), lobs);\n\t\t} else if (ru.isWcAuditor()) {\n\t\t\taccessibleGroupProducts = groupDao.findForWCAuditor(user.getAuditorCompany());\n\t\t} else if (ru.isSalesUser()) {\n\t\t\taccessibleGroupProducts = groupDao.findForSales(user.getId(), user.getSalesOfficeIds());\n\t\t} else if (ru.isProducer()) {\n\t\t\taccessibleGroupProducts = groupDao.findForProducer(user.getId(), user.getAllProducers());\n\t\t} else if (ru.isTPAUser()) {\n\t\t\taccessibleGroupProducts = groupDao.findForTPAUser(user.getId(), user.getAllPayeeIds());\n\t\t} else {\n\t\t\taccessibleGroupProducts = groupDao.findForStandardUser(user.getId());\n\t\t}\n\t\t\n\t\treturn accessibleGroupProducts;\n\t}", "@RequestMapping(value = \"/list\")\n \t@ModelAttribute(value = \"incidents\")\n \tpublic List<Incident> list(User user) {\n \t\treturn incidentRepository.findAllByOperatorId(user.getOperatorId());\t\n \t}", "public static com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders> findAll()\n {\n return findAll(0, Integer.MAX_VALUE);\n }", "public Orderdetail findOrderdetail(int userorderid) {\n\t\tString sql = \"select * from orderdetail where userorderid = ?\";\n\n\t\tResultSet rs = dbManager.execQuery(sql, userorderid);\n\n\t\tif (rs != null) {\n\t\t\ttry {\n\t\t\t\tif (rs.next()) { // 有数据\n\t\t\t\t\tOrderdetail orderdetail = new Orderdetail();\n\t\t\t\t\t\n\t\t\t\t\torderdetail.setUserorderid(rs.getInt(1));\n\t\t\t\t\torderdetail.setGreensid(rs.getInt(2));\n\t\t\t\t\torderdetail.setOrderid(rs.getInt(3));\n\t\t\t\t\torderdetail.setCount(rs.getInt(4));\n\t\t\t\t\t\n\t\t\t\t\treturn orderdetail;\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\n\t\t\t\t// 关闭数据库连接\n\t\t\t\tdbManager.closeConnection();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\n public <O> List<O> activeVersions() {\n return (List<O>) journal.journal\n .retrieve(BarbelQueries.allActive(journal.id), BarbelQueryOptions.sortAscendingByEffectiveFrom())\n .stream().map(d -> journal.processingState.expose(journal.context, (Bitemporal) d))\n .collect(Collectors.toList());\n }", "@Nullable\n public ArrayList<Order> doRetrieveByUsername(@NotNull String username) {\n try {\n Connection cn = ConPool.getConnection();\n PreparedStatement st;\n User u = ud.doRetrieveByUsername(username);\n Order o = null;\n Operator op = null;\n ArrayList<Order> orders = new ArrayList<>();\n if (u != null) {\n st = cn.prepareStatement(\"SELECT * FROM `order` O WHERE O.user=?;\");\n st.setString(1, username);\n ResultSet rs = st.executeQuery();\n while (rs.next()) {\n o = new Order();\n o.setUser(u);\n o.setId(rs.getInt(2));\n o.setTotPrice(rs.getDouble(3));\n o.setNumberOfItems(rs.getInt(4));\n o.setData(rs.getString(5));\n if (rs.getString(6) != null) {\n op = opd.doRetrieveByUsername(rs.getString(6));\n } else {\n op = null;\n }\n o.setOperator(op);\n st = cn.prepareStatement(\"SELECT * FROM digitalpurchasing D WHERE D.order=?;\");\n st.setInt(1, o.getId());\n ResultSet rs2 = st.executeQuery();\n DigitalProduct dp = null;\n while (rs2.next()) {\n dp = dpd.doRetrieveById(rs2.getInt(1));\n o.addProduct(dp, rs2.getInt(3));\n }\n st = cn.prepareStatement(\"SELECT * FROM physicalpurchasing P WHERE P.order=?;\");\n st.setInt(1, o.getId());\n rs2 = st.executeQuery();\n PhysicalProduct pp = null;\n while (rs2.next()) {\n pp = ppd.doRetrieveById(rs2.getInt(1));\n o.addProduct(pp, rs2.getInt(3));\n }\n orders.add(o);\n }\n st.close();\n cn.close();\n }\n return orders;\n } catch (SQLException e) {\n return null;\n }\n }", "public List<Order> findOrdersByUser(int userId,int startRow, int rowsPerPage)throws ApplicationEXContainer.ApplicationCanNotChangeException{\n List<Order> orders;\n try(Connection connection = MySQLDAOFactory.getConnection();\n AutoRollback autoRollback = new AutoRollback(connection)){\n orders =orderDao.findOrdersByUser(connection,userId,startRow,rowsPerPage);\n autoRollback.commit();\n } catch (SQLException | NamingException | DBException throwables) {\n LOGGER.error(throwables.getMessage());\n throw new ApplicationEXContainer.ApplicationCanNotChangeException(throwables.getMessage(),throwables);\n }\n return orders;\n }", "public boolean showOrders(Connection conn) {\r\n\t\ttry {\r\n\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\tResultSet rset = stmt.executeQuery(\"select * from order_XXXX\");\r\n\r\n\t\t\t// Print the no and name\r\n\t\t\tSystem.out.println(\"Order No\\t\\t\\tItem No\\t\\t\\tOrder Quantity\\t\\t\\tOrder Date\\t\\t\\tCustomer No\");\r\n\t\t\tSystem.out.println(\"_________________________________________________________________\");\r\n\t\t\tif (!rset.isBeforeFirst())\r\n\t\t\t\treturn true;\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\twhile (rset.next()) {\r\n\t\t\t\t\tSystem.out.println(rset.getInt(1) + \"\\t\\t\\t\" + rset.getInt(2) + \"\\t\\t\\t\" + rset.getInt(3) + \"\\t\\t\\t\"\r\n\t\t\t\t\t\t\t+ rset.getString(4) + \"\\t\\t\\t\" + rset.getString(5));\r\n\t\t\t\t}\r\n\t\t\t return false;\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static List<ExpenseReport> getReports(String ownerEmail, String userEmail) {\n ExpenseReportMeta reportMeta = ExpenseReportMeta.get();\n List<ExpenseReport> reports = Datastore.query(reportMeta)\n .filter(reportMeta.ownerEmail.equal(ownerEmail))\n .filter(reportMeta.emailList.equal(userEmail))\n .sort(reportMeta.dateAndTime.desc)\n .asList();\n return reports;\n }", "public Collection findOwnerPresentations(Agent owner, String toolId, String showHidden);", "public List<UserExpenseReport> getUserExpenseReports(String ownerEmail, String userEmail) {\n List<ExpenseReport> reports = getReports(ownerEmail, userEmail);\n List<UserExpenseReport> userList = new ArrayList<UserExpenseReport>();\n for (ExpenseReport report : reports) {\n userList.add(UserExpenseReport.newUserExpenseReport(report, userEmail));\n }\n return userList;\n }", "public boolean showOrders(Connection conn, int order_no) {\r\n\t\ttry {\r\n\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\tResultSet rset = stmt.executeQuery(\"select * from order_XXXX where orderno=\" + order_no);\r\n\r\n\t\t\t// Print the no and name\r\n\t\t\tSystem.out.println(\"Order No\\t\\t\\tItem No\\t\\t\\tOrder Quantity\\t\\t\\tOrder Date\\t\\t\\tCustomer No\");\r\n\t\t\tSystem.out.println(\"_________________________________________________________________\");\r\n\t\t\tif (!rset.isBeforeFirst())\r\n\t\t\t\treturn true;\r\n\t\t\telse {\r\n\t\t\t\twhile (rset.next()) {\r\n\t\t\t\t\tSystem.out.println(rset.getInt(1) + \"\\t\\t\\t\" + rset.getInt(2) + \"\\t\\t\\t\" + rset.getInt(3) + \"\\t\\t\\t\"\r\n\t\t\t\t\t\t\t+ rset.getString(4) + \"\\t\\t\\t\" + rset.getString(5));\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public List<Order> getOrders() {\n return _orders;\n }", "public static ArrayList<Order> getOrders(Client client) {\n\t\tArrayList<Order> temp = new ArrayList<Order>();\n\t\tString request = \"SELECT * FROM `order` WHERE `client` = ?\";\n\t\ttry {\n\t\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(request);\n\t\t\tstmt.setInt(1, client.getId());\n\t\t\tResultSet results = stmt.executeQuery();\n\t\t\twhile(results.next()) {\n\t\t\t\ttemp.add(new Order(results.getInt(1), results.getString(4), results.getDate(3), CartItem.getCartItems(results.getInt(1))));\n\t\t\t}\n\t\t\treturn temp;\n\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\tSystem.out.println(\"An error occured while fetching orders: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}", "public List<Position> getOpenPositions() throws AlpacaAPIException {\n Type listType = new TypeToken<List<Position>>() {\n }.getType();\n\n AlpacaRequestBuilder urlBuilder =\n new AlpacaRequestBuilder(apiVersion, baseAccountUrl, AlpacaConstants.POSITIONS_ENDPOINT);\n\n HttpResponse<JsonNode> response = alpacaRequest.invokeGet(urlBuilder);\n\n if (response.getStatus() != 200) {\n throw new AlpacaAPIException(response);\n }\n\n return alpacaRequest.getResponseObject(response, listType);\n }", "public List<Orderdetail> findOrderdetailListByUser(int currentPage, int pageSize, int userid) {\n\t\tString sql = \"SELECT tttt.couriername,tttt.greensname,restaurant.restname,tttt.orderstatus,tttt.userorderid from restaurant JOIN\"\n\t\t\t\t+\" (SELECT ttt.couriername,greens.greensname,greens.restid,ttt.orderstatus,ttt.userorderid from greens JOIN\"\n\t\t\t\t+\" (SELECT tt.couriername,tt.greensid,tt.orderstatus,tt.userorderid FROM ordersummary JOIN\" \n\t\t\t\t+\" (select t.couriername,orderdetail.greensid,orderdetail.orderid,orderdetail.orderstatus,orderdetail.userorderid from orderdetail JOIN\"\n\t\t\t\t+\" (select courier.couriername,courierrest.userorderid\" \n\t\t\t\t+\" from courierrest JOIN courier\" \n\t\t\t\t+\" on courier.courierid = courierrest.courierid) as t\"\n\t\t\t\t+\" on orderdetail.userorderid = t.userorderid and orderdetail.orderstatus in (1,2,3)) as tt\"\n\t\t\t\t+\" on ordersummary.orderid = tt.orderid and userid = ?) as ttt\"\n\t\t\t\t+\" on greens.greensid = ttt.greensid) as tttt\"\n\t\t\t\t+\" on restaurant.restid = tttt.restid limit ?,?\";\n\t\t\n\t\tResultSet rs = dbManager.execQuery(sql, userid, (currentPage - 1) * pageSize, pageSize);\n\n\t\tList<Orderdetail> list = new ArrayList<Orderdetail>();\n\n\t\ttry {\n\t\t\twhile (rs.next()) {\n\t\t\t\tOrderdetail orderdetail = new Orderdetail();\n\t\t\t\tCourier courier = new Courier();\n\t\t\t\tGreens greens = new Greens();\n\t\t\t\tRestaurant rest = new Restaurant();\n\t\t\t\t\n\t\t\t\tcourier.setCouriername(rs.getString(1));\n\t\t\t\trest.setCourier(courier);\n\t\t\t\t\n\t\t\t\tgreens.setGreensname(rs.getString(2));\n\t\t\t\trest.setRestname(rs.getString(3));\n\t\t\t\t\n\t\t\t\tgreens.setRest(rest);\n\t\t\t\t\n\t\t\t\torderdetail.setOrderstatus(rs.getInt(4));\n\t\t\t\torderdetail.setGreens(greens);\n\t\t\t\t\n\t\t\t\torderdetail.setUserorderid(rs.getInt(5));\n\t\t\t\t\n\t\t\t\tlist.add(orderdetail);\n\t\t\t}\n\t\t\treturn list;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tdbManager.closeConnection();\n\t\t}\n\n\t\treturn null;\n\t}", "@Override\n public JSONObject viewFnInvoiceByManager(String username) {\n\n return in_invoicedao.viewInvoiceByManagerID(username);\n }", "@GuardedBy(\"getLockObject()\")\n private List<ActiveAdmin> getActiveAdminsForAffectedUserLocked(int userHandle) {\n if (isManagedProfile(userHandle)) {\n return getUserDataUnchecked(userHandle).mAdminList;\n }\n return getActiveAdminsForUserAndItsManagedProfilesLocked(userHandle,\n /* shouldIncludeProfileAdmins */ (user) -> false);\n }", "public interface OpenOrder {\n\n /**\n * Returns the ID for this order.\n *\n * @return the ID of the order.\n */\n String getId();\n\n /**\n * Returns the exchange date/time the order was created.\n *\n * @return The exchange date/time.\n */\n Date getCreationDate();\n\n /**\n * Returns the id of the market this order was placed on.\n *\n * @return the id of the market.\n */\n String getMarketId();\n\n /**\n * Returns the type of order. Value will be {@link OrderType#BUY} or {@link OrderType#SELL}.\n *\n * @return the type of order.\n */\n OrderType getType();\n\n /**\n * Returns the price per unit for this order. This is usually in BTC or USD.\n *\n * @return the price per unit for this order.\n */\n BigDecimal getPrice();\n\n /**\n * Returns the Quantity remaining for this order. This is usually the amount of the other currency\n * you want to trade for BTC/USD.\n *\n * @return the Quantity remaining for this order.\n */\n BigDecimal getQuantity();\n\n /**\n * Returns the Original total order quantity. If the Exchange does not provide this information,\n * the value will be null. This is usually the amount of the other currency you want to trade for\n * BTC/USD.\n *\n * @return the Original total order quantity if the Exchange provides this information, null\n * otherwise.\n */\n BigDecimal getOriginalQuantity();\n\n /**\n * Returns the Total value of order (price * quantity). This is usually in BTC or USD.\n *\n * @return the Total value of order (price * quantity).\n */\n BigDecimal getTotal();\n}", "@GetMapping(\"/{userId}/orders/{orderId}\")\n public OrderDto findOrder(@PathVariable @Positive Long userId,\n @PathVariable @Positive Long orderId) {\n return orderService.findByUserId(userId, orderId);\n }", "public List<Order> getOrders(){\n return this.orders;\n }", "public List<Menu> findMenus(User user) {\n\n List<Resource> resources = findAll(new Sort(Sort.Direction.DESC,\"parentId\",\"weight\"));\n Set<String> userPermissions = userAuthService.findStringPermissions(user);\n Iterator<Resource> iter = resources.iterator();\n while (iter.hasNext()) {\n if (!hasPermission(iter.next(), userPermissions)) {\n iter.remove();\n }\n }\n return convertToMenus(resources);\n }", "public List<Order> getOrdersByDate(Date date);", "boolean checkForUnfinishedOrders (int userId) throws ServiceException;", "public void getOrdersByDate() throws FlooringDaoException {\n boolean validDate = true;\n do {\n try {\n String date = view.getOrdersDate();\n List<Order> ordersByDate = new ArrayList<>();\n ordersByDate = service.getOrdersByDate(date);\n validDate = true;\n view.displayOrdersByDate(ordersByDate);\n } catch (FlooringDaoException ex) {\n view.displayError(\"Orders file not found for given date. Please make sure your date is entered EXACTLY as YYYY-MM-DD or try a different date.\");\n validDate = false;\n }\n } while (!validDate);\n }", "List<User> getActivatedUserList();" ]
[ "0.65941834", "0.6375491", "0.61596775", "0.5984554", "0.59212446", "0.5896197", "0.58374447", "0.5803971", "0.5753674", "0.56684387", "0.56327665", "0.55493605", "0.5546901", "0.5534169", "0.5488379", "0.54379714", "0.5419525", "0.53588206", "0.53513545", "0.52726465", "0.5267085", "0.5244582", "0.52432686", "0.5238765", "0.51878786", "0.5179672", "0.5162411", "0.5150139", "0.5143931", "0.51184523", "0.51163864", "0.5103094", "0.5092542", "0.5067283", "0.5045241", "0.5041574", "0.5013024", "0.49984008", "0.49887988", "0.49782246", "0.49714896", "0.4971259", "0.49288958", "0.49267355", "0.49131688", "0.49090597", "0.48966554", "0.48934802", "0.48857063", "0.4860547", "0.48454535", "0.48408303", "0.4829759", "0.48280084", "0.4827259", "0.48216203", "0.47991577", "0.4799124", "0.4794929", "0.47934067", "0.47860703", "0.47822022", "0.4746123", "0.4735675", "0.47315413", "0.47273445", "0.47257662", "0.47244623", "0.47223762", "0.47154737", "0.4713656", "0.4713656", "0.4711138", "0.47100854", "0.47060978", "0.47020873", "0.46865648", "0.4667759", "0.46659562", "0.4664645", "0.46603638", "0.46527135", "0.46521452", "0.464272", "0.4637512", "0.46333647", "0.463215", "0.4631234", "0.4618647", "0.46146598", "0.46048546", "0.4604756", "0.46029344", "0.45991132", "0.4597073", "0.4596665", "0.45922813", "0.4589734", "0.45886213", "0.4588451" ]
0.73423
0
Returns the position of the instrument based on all reports received for it before or on the supplied date, and which are visible to the given user.
public BigDecimal getPositionAsOf (SimpleUser user, Date data, Instrument instrument) throws PersistenceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<UserPosition> getUserPositionByIdUser(Long id_user, Date date);", "List<UserPosition> getUserPositionByIdUserAndDate(Long id_user, Date date);", "public ReportBaseImpl[] getReportsSince\r\n \t\t(SimpleUser user, Date data)\r\n \t\tthrows PersistenceException;", "@Override\n\tpublic List<PhysicalData> getPhysicalActivity(String username, String date) {\n\t\treturn mobileDao.getPhysicalActivity(username,date);\n\t}", "public Map<PositionKey, BigDecimal> getAllPositionsAsOf\r\n \t\t(SimpleUser user, Date data)\r\n \t\tthrows PersistenceException;", "public ArrayList<Double> search_current(String user_id, String date) {\n\t\tArrayList<Double> current_info = new ArrayList<Double>(); // store the query result from current table\n\t\ttry {\n\t\t\t//connect\n\t\t\tConnection connection = this.getConnection();\n\t\t\tPreparedStatement stmt = connection.prepareStatement(\"SELECT protein, energy, fiber, price FROM diet_conclusion where id = ? AND date = ?\");\n\t\t\tstmt.setString(1, user_id);\n\t\t\tstmt.setString(2, date);\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tcurrent_info.add(rs.getDouble(3));//fiber\n\t\t\t\tcurrent_info.add(rs.getDouble(2));//energy\n\t\t\t\tcurrent_info.add(rs.getDouble(1));//protein\n\t\t\t\tcurrent_info.add(rs.getDouble(4));//price\n\t\t\t}\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tconnection.close();\n\t\t} catch (Exception e) {\n\t\t\tlog.info(\"query error for search_current: {}\", e.toString());\n\t\t}\n\n\t\treturn current_info;//can be null\n\n\t}", "public void setDataWithDate(Date date, int pos) {\n\t\tif (date == null)\n\t\t\tdate = new Date();\n\n\t\tif(!isAdded())\n\t\t\treturn;\n\n synchronized (LOCK_OBJECT) {\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(date);\n\n int day = calendar.get(Calendar.DAY_OF_MONTH);\n int month = calendar.get(Calendar.MONTH) + 1;\n int year = calendar.get(Calendar.YEAR) - 1900;\n\n long startTime = System.currentTimeMillis();\n\n final List<StatisticalDataHeader> dataHeaders = DataSource.getInstance(getActivity())\n .getReadOperation()\n .query(\"dateStampDay == ? AND dateStampMonth == ? AND dateStampYear == ? AND watchDataHeader == ?\",\n String.valueOf(day), String.valueOf(month), String.valueOf(year),\n String.valueOf(getLifeTrakApplication().getSelectedWatch().getId()))\n .limit(1)\n .getResults(StatisticalDataHeader.class);\n\n mWorkoutCount = 0;\n mSleepMinute = 0;\n\n\n// List<Goal> goals = DataSource.getInstance(getActivity())\n// .getReadOperation()\n// .query(\"watchGoal = ?\", String.valueOf(getLifeTrakApplication().getSelectedWatch().getId()))\n// .orderBy(\"abs(date - \" + date.getTime() + \")\", SORT_ASC)\n// .limit(1)\n// .getResults(Goal.class);\n\n\t\t\tList<Goal> goals = DataSource\n\t\t\t\t\t.getInstance(getActivity())\n\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t.query(\"watchGoal = ? and dateStampDay = ? and dateStampMonth = ? and dateStampYear = ?\",\n\t\t\t\t\t\t\tString.valueOf(getLifeTrakApplication()\n\t\t\t\t\t\t\t\t\t.getSelectedWatch().getId()),\n\t\t\t\t\t\t\tString.valueOf(day), String.valueOf(month),\n\t\t\t\t\t\t\tString.valueOf(year))\n\t\t\t\t\t.orderBy(\"_id\", SORT_DESC)\n\t\t\t\t\t.getResults(Goal.class);\n\n\t\t\tif (goals.size() == 0) {\n\t\t\t\tgoals = DataSource.getInstance(getActivity())\n\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t.query(\"watchGoal = ?\", String.valueOf(getLifeTrakApplication().getSelectedWatch().getId()))\n\t\t\t\t\t\t.orderBy(\"abs(date - \" + date.getTime() + \")\", SORT_ASC)\n\t\t\t\t\t\t.limit(1)\n\t\t\t\t\t\t.getResults(Goal.class);\n\n\t\t\t\tCalendar now = Calendar.getInstance();\n\n\t\t\t\tif(now.get(Calendar.DATE) < calendar.get(Calendar.DATE) ){\n\t\t\t\t\tGoal mGoal = goals.get(0);\n\t\t\t\t\tgoals = DataSource\n\t\t\t\t\t\t\t.getInstance(getActivity())\n\t\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t\t.query(\"watchGoal = ? and dateStampDay = ? and dateStampMonth = ? and dateStampYear = ?\",\n\t\t\t\t\t\t\t\t\tString.valueOf(getLifeTrakApplication()\n\t\t\t\t\t\t\t\t\t\t\t.getSelectedWatch().getId()),\n\t\t\t\t\t\t\t\t\tString.valueOf(mGoal.getDateStampDay()), String.valueOf(mGoal.getDateStampMonth()),\n\t\t\t\t\t\t\t\t\tString.valueOf(mGoal.getDateStampYear()))\n\t\t\t\t\t\t\t.orderBy(\"_id\", SORT_DESC)\n\t\t\t\t\t\t\t.getResults(Goal.class);\n\t\t\t\t}\n\t\t\t}\n\n Goal goal = null;\n\n if(goals.size() > 0)\n goal = goals.get(0);\n\n final int activeTime = activeTimeForDate(date);\n\n if(dataHeaders.size() > 0) {\n StatisticalDataHeader statisticalDataHeader = dataHeaders.get(0);\n\n\n\t\t\t\tif (getLifeTrakApplication().getSelectedWatch().getModel() == WATCHMODEL_R420){\n\t\t\t\t\tList<WorkoutHeader> workoutHeader = DataSource.getInstance(getActivity())\n\t\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t\t.query(\"watchWorkoutHeader == ? AND dateStampDay == ? AND dateStampMonth == ? AND dateStampYear == ?\",\n\t\t\t\t\t\t\t\t\tString.valueOf(getLifeTrakApplication().getSelectedWatch().getId()),\n\t\t\t\t\t\t\t\t\tString.valueOf(day), String.valueOf(month), String.valueOf(year))\n\t\t\t\t\t\t\t.orderBy(\"_id\", SORT_ASC)\n\t\t\t\t\t\t\t.getResults(WorkoutHeader.class);\n\n\t\t\t\t\tmWorkoutCount = workoutHeader.size();\n\n\t\t\t\t\tmWorkoutInfo.setWorkoutValue(workoutHeader.size());\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\tList<WorkoutInfo> workoutInfos = DataSource.getInstance(getActivity())\n\t\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t\t.query(\"watchWorkoutInfo == ? AND dateStampDay == ? AND dateStampMonth == ? AND dateStampYear == ?\",\n\t\t\t\t\t\t\t\t\tString.valueOf(getLifeTrakApplication().getSelectedWatch().getId()),\n\t\t\t\t\t\t\t\t\tString.valueOf(day), String.valueOf(month), String.valueOf(year))\n\t\t\t\t\t\t\t.orderBy(\"_id\", SORT_ASC)\n\t\t\t\t\t\t\t.getResults(WorkoutInfo.class);\n\n\n\t\t\t\t\tList<WorkoutInfo> spillOverWorkoutInfos = getSpillOverWorkoutFromPreviousDay(date);\n\t\t\t\t\tif (spillOverWorkoutInfos != null && spillOverWorkoutInfos.size() > 0) {\n\t\t\t\t\t\tworkoutInfos.addAll(spillOverWorkoutInfos);\n\t\t\t\t\t}\n\n\t\t\t\t\t//add today's workout\n\t\t\t\t\tif (workoutInfos.size() > 0) {\n\t\t\t\t\t\t//filter spill over for next day\n\t\t\t\t\t\tworkoutInfos = getWorkoutInfosWithoutNextDaySpillOver(workoutInfos);\n\t\t\t\t\t}\n\n\t\t\t\t\tmWorkoutCount = workoutInfos.size();\n\n\t\t\t\t\tmWorkoutInfo.setWorkoutValue(workoutInfos.size());\n\t\t\t\t}\n\n\t\t\t\tfinal List<Number> avgHeartRates = DataSource.getInstance(getActivity())\n\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t.query(\"dataHeaderAndPoint == ? AND averageHR > 0\", String.valueOf(statisticalDataHeader.getId()))\n\t\t\t\t\t\t.getResults(StatisticalDataPoint.class, \"avg(averageHR) averageHR\");\n\n\t\t\t\tavgAverage.clear();\n\n if(avgHeartRates.size() > 0) {\n float averageHeartRate = avgHeartRates.get(0).floatValue();\n mAverageHeartRate.setValue(averageHeartRate);\n mAverageHeartRate.setPercent(percentForAverageBPM((int) averageHeartRate));\n\n\t\t\t\t\tif (averageHeartRate> 0 )\n\t\t\t\t\tavgAverage.add(averageHeartRate);\n\n\t\t\t\t\t//if (averageHeartRate == 0){\n\t\t\t\t\t\tif (getLifeTrakApplication().getSelectedWatch().getModel() == WATCHMODEL_R420) {\n\t\t\t\t\t\t\tList<WorkoutHeader> workoutHeader = DataSource.getInstance(getActivity())\n\t\t\t\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t\t\t\t.query(\"watchWorkoutHeader == ? AND dateStampDay == ? AND dateStampMonth == ? AND dateStampYear == ?\",\n\t\t\t\t\t\t\t\t\t\t\tString.valueOf(getLifeTrakApplication().getSelectedWatch().getId()),\n\t\t\t\t\t\t\t\t\t\t\tString.valueOf(day), String.valueOf(month), String.valueOf(year))\n\t\t\t\t\t\t\t\t\t.orderBy(\"_id\", SORT_ASC)\n\t\t\t\t\t\t\t\t\t.getResults(WorkoutHeader.class);\n\t\t\t\t\t\t\tif (workoutHeader.size() > 0) {\n\t\t\t\t\t\t\t\tfloat avgHeartRate = 0;\n\t\t\t\t\t\t\t\tfloat sum = 0;\n\t\t\t\t\t\t\t\tfloat sumLength = 0;\n\t\t\t\t\t\t\t\tfor (int b = 0; b < workoutHeader.size(); b++) {\n\t\t\t\t\t\t\t\t\ttrueValuesHR.clear();\n\t\t\t\t\t\t\t\t\tWorkoutHeader workoutHeader1 = workoutHeader.get(b);\n\t\t\t\t\t\t\t\t\tString heartRate = workoutHeader1.getHeaderHeartRate();\n\t\t\t\t\t\t\t\t\tint hrLogRate = workoutHeader1.getLogRateHR();\n\t\t\t\t\t\t\t\t\tint hour = workoutHeader1.getTimeStampHour();\n\t\t\t\t\t\t\t\t\tint minute = workoutHeader1.getTimeStampMinute();\n\t\t\t\t\t\t\t\t\tint sec = workoutHeader1.getTimeStampSecond();\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tJSONArray jsonArray = new JSONArray(heartRate);\n\n\t\t\t\t\t\t\t\t\t\tfor (int i = 0; i < jsonArray.length(); ++i) {\n\t\t\t\t\t\t\t\t\t\t\tfor (int y = 0; y < hrLogRate; y ++){\n\t\t\t\t\t\t\t\t\t\t\t\ttrueValuesHR.add(jsonArray.optInt(i));\n\t\t\t\t\t\t\t\t\t\t\t\tsum = sum + jsonArray.optInt(i);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\tint[] numbers = Ints.toArray(trueValuesHR);\n\n\n\t\t\t\t\t\t\t\t\t\tint startingTime = (hour * 3600) + (minute * 60) + sec;\n\t\t\t\t\t\t\t\t\t\tint plotIndex = startingTime / 600;\n\t\t\t\t\t\t\t\t\t\tif ((startingTime % 600) != 0)\n\t\t\t\t\t\t\t\t\t\t\tplotIndex++;\n\t\t\t\t\t\t\t\t\t\tint startingTimeInTenMinutes = startingTime / 600;\n\n\n\t\t\t\t\t\t\t\t\t\tfloat sum10Min = 0;\n\t\t\t\t\t\t\t\t\t\tfloat average10Min = 0;\n\n\n\n\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.clear();\n\n\t\t\t\t\t\t\t\t\t\tint valueMinus = 0;\n\t\t\t\t\t\t\t\t\t\tint overAllMinus = 0;\n\t\t\t\t\t\t\t\t\t\tfor (int a = 0; a < 144; a++){\n\t\t\t\t\t\t\t\t\t\t\tif (a == startingTimeInTenMinutes){\n\t\t\t\t\t\t\t\t\t\t\t\tvalueMinus = ((startingTimeInTenMinutes + 1) * 600) - startingTime;\n\t\t\t\t\t\t\t\t\t\t\t\tif (mHeartRateIndex.size() == 0){\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (valueMinus > numbers.length){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.add(numbers.length);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\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\tmHeartRateIndex.add(valueMinus);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\toverAllMinus = overAllMinus + valueMinus;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartingTimeInTenMinutes ++;\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}\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\tif (overAllMinus < numbers.length){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalueMinus = valueMinus - overAllMinus;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.add(valueMinus);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\toverAllMinus = overAllMinus + valueMinus;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartingTimeInTenMinutes++;\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\toverAllMinus = overAllMinus - 600;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (overAllMinus > 0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ((numbers.length - overAllMinus) < 60){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.remove(mHeartRateIndex.size()- 1);\n\t\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\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.set((mHeartRateIndex.size() - 1), (numbers.length - overAllMinus));\n\t\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\t\t//mHeartRateIndex.set((mHeartRateIndex.size() - 1), (numbers.length - overAllMinus));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse{\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\tbreak;\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}\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\n\t\t\t\t\t\t\t\t\t\tint valueOverAll = 0;\n\t\t\t\t\t\t\t\t\t\tint index = 0;\n\t\t\t\t\t\t\t\t\t\tfor (int i = 0; i < mHeartRateIndex.size() ; i++){\n\t\t\t\t\t\t\t\t\t\t\tint valueEnding = mHeartRateIndex.get(i);\n\n\n\t\t\t\t\t\t\t\t\t\t\tfor (int y = 0; y < valueEnding; y++){\n\t\t\t\t\t\t\t\t\t\t\t\tif (numbers[y + valueOverAll] > 0){\n\t\t\t\t\t\t\t\t\t\t\t\t\tsum10Min = sum10Min + numbers[y + valueOverAll];\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex++;\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\tvalueOverAll = valueOverAll + valueEnding;\n\t\t\t\t\t\t\t\t\t\t\taverage10Min = sum10Min / index;\n\t\t\t\t\t\t\t\t\t\t\tavgAverage.add((float)average10Min);\n\t\t\t\t\t\t\t\t\t\t\tsum10Min = 0;\n\t\t\t\t\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\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 (avgAverage.size() > 0){\n\n\t\t\t\t\t\t\t\t\tfloat sumTotal = 0;\n\t\t\t\t\t\t\t\t\tfloat sumTotalAVG = 0;\n\t\t\t\t\t\t\t\t\tint index = 0;\n\t\t\t\t\t\t\t\t\tfor (int i = 0; i < avgAverage.size(); i++){\n\t\t\t\t\t\t\t\t\t\tif (avgAverage.get(i) > 0) {\n\t\t\t\t\t\t\t\t\t\t\tsumTotal = sumTotal + avgAverage.get(i);\n\t\t\t\t\t\t\t\t\t\t\tindex++;\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\tsumTotalAVG = sumTotal / index;\n\t\t\t\t\t\t\t\t\tmAverageHeartRate.setValue(sumTotalAVG);\n\t\t\t\t\t\t\t\t\tif (sumTotalAVG > 0)\n\t\t\t\t\t\t\t\t\t\tmAverageHeartRate.setPercent(percentForAverageBPM((int) sumTotalAVG));\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\tmAverageHeartRate.setValue(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//}\n\n\n } else {\n\t\t\t\t\tif (getLifeTrakApplication().getSelectedWatch().getModel() == WATCHMODEL_R420){\n\t\t\t\t\t\tList<WorkoutHeader> workoutHeader = DataSource.getInstance(getActivity())\n\t\t\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t\t\t.query(\"watchWorkoutHeader == ? AND dateStampDay == ? AND dateStampMonth == ? AND dateStampYear == ?\",\n\t\t\t\t\t\t\t\t\t\tString.valueOf(getLifeTrakApplication().getSelectedWatch().getId()),\n\t\t\t\t\t\t\t\t\t\tString.valueOf(day), String.valueOf(month), String.valueOf(year))\n\t\t\t\t\t\t\t\t.orderBy(\"_id\", SORT_ASC)\n\t\t\t\t\t\t\t\t.getResults(WorkoutHeader.class);\n\t\t\t\t\t\tif (workoutHeader.size() > 0){\n\t\t\t\t\t\t\tfloat avgHeartRate = 0;\n\t\t\t\t\t\t\tfloat sum = 0;\n\t\t\t\t\t\t\tfloat sumLength = 0;\n\t\t\t\t\t\t\tfor (int b = 0; b < workoutHeader.size(); b++) {\n\t\t\t\t\t\t\t\ttrueValuesHR.clear();\n\t\t\t\t\t\t\t\tWorkoutHeader workoutHeader1 = workoutHeader.get(b);\n\t\t\t\t\t\t\t\tString heartRate = workoutHeader1.getHeaderHeartRate();\n\t\t\t\t\t\t\t\tint hrLogRate = workoutHeader1.getLogRateHR();\n\t\t\t\t\t\t\t\tint hour = workoutHeader1.getTimeStampHour();\n\t\t\t\t\t\t\t\tint minute = workoutHeader1.getTimeStampMinute();\n\t\t\t\t\t\t\t\tint sec = workoutHeader1.getTimeStampSecond();\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tJSONArray jsonArray = new JSONArray(heartRate);\n\n\t\t\t\t\t\t\t\t\tfor (int i = 0; i < jsonArray.length(); ++i) {\n\t\t\t\t\t\t\t\t\t\tfor (int y = 0; y < hrLogRate; y ++){\n\t\t\t\t\t\t\t\t\t\t\ttrueValuesHR.add(jsonArray.optInt(i));\n\t\t\t\t\t\t\t\t\t\t\tsum = sum + jsonArray.optInt(i);\n\t\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\tint[] numbers = Ints.toArray(trueValuesHR);\n\n\n\t\t\t\t\t\t\t\t\tint startingTime = (hour * 3600) + (minute * 60) + sec;\n\t\t\t\t\t\t\t\t\tint plotIndex = startingTime / 600;\n\t\t\t\t\t\t\t\t\tif ((startingTime % 600) != 0)\n\t\t\t\t\t\t\t\t\t\tplotIndex++;\n\t\t\t\t\t\t\t\t\tint startingTimeInTenMinutes = startingTime / 600;\n\n\n\t\t\t\t\t\t\t\t\tfloat sum10Min = 0;\n\t\t\t\t\t\t\t\t\tfloat average10Min = 0;\n\n\n\n\t\t\t\t\t\t\t\t\tmHeartRateIndex.clear();\n\n\t\t\t\t\t\t\t\t\tint valueMinus = 0;\n\t\t\t\t\t\t\t\t\tint overAllMinus = 0;\n\t\t\t\t\t\t\t\t\tfor (int a = 0; a < 144; a++){\n\t\t\t\t\t\t\t\t\t\tif (a == startingTimeInTenMinutes){\n\t\t\t\t\t\t\t\t\t\t\tvalueMinus = ((startingTimeInTenMinutes + 1) * 600) - startingTime;\n\t\t\t\t\t\t\t\t\t\t\tif (mHeartRateIndex.size() == 0){\n\t\t\t\t\t\t\t\t\t\t\t\tif (valueMinus > numbers.length){\n\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.add(numbers.length);\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\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\tmHeartRateIndex.add(valueMinus);\n\t\t\t\t\t\t\t\t\t\t\t\t\toverAllMinus = overAllMinus + valueMinus;\n\t\t\t\t\t\t\t\t\t\t\t\t\tstartingTimeInTenMinutes ++;\n\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}\n\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\tif (overAllMinus < numbers.length){\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalueMinus = valueMinus - overAllMinus;\n\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.add(valueMinus);\n\t\t\t\t\t\t\t\t\t\t\t\t\toverAllMinus = overAllMinus + valueMinus;\n\t\t\t\t\t\t\t\t\t\t\t\t\tstartingTimeInTenMinutes++;\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\toverAllMinus = overAllMinus - 600;\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (overAllMinus > 0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ((numbers.length - overAllMinus) < 60){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.remove(mHeartRateIndex.size()- 1);\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\tmHeartRateIndex.set((mHeartRateIndex.size() - 1), (numbers.length - overAllMinus));\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\t//mHeartRateIndex.set((mHeartRateIndex.size() - 1), (numbers.length - overAllMinus));\n\t\t\t\t\t\t\t\t\t\t\t\t\telse{\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\tbreak;\n\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}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tint valueOverAll = 0;\n\t\t\t\t\t\t\t\t\tint index = 0;\n\t\t\t\t\t\t\t\t\tfor (int i = 0; i < mHeartRateIndex.size() ; i++){\n\t\t\t\t\t\t\t\t\t\tint valueEnding = mHeartRateIndex.get(i);\n\n\t\t\t\t\t\t\t\t\t\tint minValues= 240;\n\t\t\t\t\t\t\t\t\t\tint maxValues= 0;\n\t\t\t\t\t\t\t\t\t\tfor (int y = 0; y < valueEnding; y++){\n\t\t\t\t\t\t\t\t\t\t\tif (numbers[y + valueOverAll] > 0){\n\t\t\t\t\t\t\t\t\t\t\t\tsum10Min = sum10Min + numbers[y + valueOverAll];\n\t\t\t\t\t\t\t\t\t\t\t\tif (minValues > numbers[y + valueOverAll]){\n\t\t\t\t\t\t\t\t\t\t\t\t\tminValues = numbers[y + valueOverAll];\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 (maxValues < numbers[y + valueOverAll]){\n\t\t\t\t\t\t\t\t\t\t\t\t\tmaxValues = numbers[y + valueOverAll];\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\tindex++;\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\tvalueOverAll = valueOverAll + valueEnding;\n\t\t\t\t\t\t\t\t\t\taverage10Min = sum10Min / index;\n\t\t\t\t\t\t\t\t\t\tavgAverage.add(average10Min);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (avgAverage.size() > 0){\n\n\t\t\t\t\t\t\t\tfloat sumTotal = 0;\n\t\t\t\t\t\t\t\tfloat sumTotalAVG = 0;\n\t\t\t\t\t\t\t\tint index = 0;\n\t\t\t\t\t\t\t\tfor (int i = 0; i < avgAverage.size(); i++){\n\t\t\t\t\t\t\t\t\tif (avgAverage.get(i) > 0) {\n\t\t\t\t\t\t\t\t\t\tsumTotal = sumTotal + avgAverage.get(i);\n\t\t\t\t\t\t\t\t\t\tindex++;\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\tsumTotalAVG = sumTotal / index;\n\t\t\t\t\t\t\t\tmAverageHeartRate.setValue(sumTotalAVG);\n\t\t\t\t\t\t\t\tif (sumTotalAVG > 0)\n\t\t\t\t\t\t\t\t\tmAverageHeartRate.setPercent(percentForAverageBPM((int) sumTotalAVG));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tmAverageHeartRate.setValue(0);\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\tmAverageHeartRate.setValue(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n \t mAverageHeartRate.setValue(0);\n }\n\n mActigraphy.setHourValue(activeTime / 60);\n mActigraphy.setMinuteValue(activeTime % 60);\n\n String query = \"select sum(distance) distance, sum(steps) steps, sum(calorie) calorie from StatisticalDataPoint sdp \" +\n \"inner join StatisticalDataHeader sdh on sdp.dataHeaderAndPoint = sdh._id \" +\n \"where watchDataHeader == ? AND dateStampDay == ? AND dateStampMonth == ? AND dateStampYear == ?\";\n\n Cursor cursor = DataSource.getInstance(getActivity())\n .getReadOperation()\n .rawQuery(query, String.valueOf(getLifeTrakApplication().getSelectedWatch().getId()),\n String.valueOf(day), String.valueOf(month), String.valueOf(year));\n\n if (cursor.moveToFirst()) {\n mCalorieMetric.setProgressGoal(goal.getCalorieGoal());\n mCalorieMetric.setProgressValue(cursor.getFloat(cursor.getColumnIndex(\"calorie\")));\n\n mStepsMetric.setProgressGoal(goal.getStepGoal());\n mStepsMetric.setProgressValue(cursor.getFloat(cursor.getColumnIndex(\"steps\")));\n\n mDistanceMetric.setProgressGoal((float) goal.getDistanceGoal());\n mDistanceMetric.setProgressValue(cursor.getFloat(cursor.getColumnIndex(\"distance\")));\n mDistanceMetric.setUnitSystem(getLifeTrakApplication().getUserProfile().getUnitSystem());\n }\n\n\n\n\n\n mSleepMetric.setProgressValue(statisticalDataHeader.getTotalSleep());\n\n if (getLifeTrakApplication().getSelectedWatch().getModel() == WATCHMODEL_R415) {\n\t\t\t\t\tif (pos == 1) {\n\t\t\t\t\t\tmLightExposure.setProgressValue(statisticalDataHeader.getLightExposure());\n\t\t\t\t\t\tif (goal.getBrightLightGoal() < 10) {\n\t\t\t\t\t\t\tgoal.setBrightLightGoal(10);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmLightExposure.setProgressGoal(goal.getBrightLightGoal());\n\t\t\t\t\t}\n\n }\n\n mSleepMetric.setProgressValue(mTotalSleepTime);\n } else {\n mAverageHeartRate.setValue(0);\n mStepsMetric.setProgressValue(0);\n mDistanceMetric.setProgressValue(0);\n mCalorieMetric.setProgressValue(0);\n mSleepMetric.setProgressValue(0);\n mWorkoutInfo.setWorkoutValue(0);\n\t\t\t\tmActigraphy.setHourValue(0);\n mActigraphy.setMinuteValue(0);\n mSleepMetric.setProgressValue(0);\n mLightExposure.setProgressValue(0);\n }\n\n if (mSleepMetric != null && goal != null)\n mSleepMetric.setProgressGoal(goal.getSleepGoal());\n\n mAverageHeartRate.setDate(date);\n mSleepMetric.setDate(date);\n mWorkoutInfo.setDate(date);\n mActigraphy.setDate(date);\n\n mAdapter.notifyDataSetChanged();\n }\n\t\n\t\t\n\t}", "public Date startToSee(Date dateI) {\n\t\treturn null;\n\t}", "public void getOffset(long date, boolean local, int[] offsets) { throw new RuntimeException(\"Stub!\"); }", "public ArrayList<Showing> getShowingsByDate(String date, Screen screen) throws PastDateException {\n return filmDisplay.getShowingsByDate(date, screen);\n }", "private void getDateForAnalysisReport() {\n \tArrayList<Object> answer = new ArrayList<>();\n\t\tanswer.add(\"performingAnActivityTracking\");\n\t\tanswer.add(\"/getActivityData\");\n\t\tString star = reportStartDate.getValue().toString();\n\t\tString end = reportEndDate.getValue().toString();\n\t\tanswer.add(star);\n\t\tanswer.add(end);\n\t\t\n\t\tchs.client.handleMessageFromClientUI(answer);\n\t}", "List<UserPosition> getUserPositionByIdTravelAndDate(Long id_travel, Date date);", "@Override\n public List<ScheduledInterview> getForPerson(String userId) {\n List<ScheduledInterview> relevantInterviews = new ArrayList<>();\n List<ScheduledInterview> scheduledInterviews = new ArrayList<ScheduledInterview>(data.values());\n scheduledInterviews.sort(\n (ScheduledInterview s1, ScheduledInterview s2) -> {\n if (s1.when().start().equals(s2.when().start())) {\n return 0;\n }\n if (s1.when().start().isBefore(s2.when().start())) {\n return -1;\n }\n return 1;\n });\n\n for (ScheduledInterview scheduledInterview : scheduledInterviews) {\n if (userId.equals(scheduledInterview.interviewerId())\n || userId.equals(scheduledInterview.intervieweeId())\n || userId.equals(scheduledInterview.shadowId())) {\n relevantInterviews.add(scheduledInterview);\n }\n }\n return relevantInterviews;\n }", "public int getOffset(long date) { throw new RuntimeException(\"Stub!\"); }", "public Map<PositionKey, BigDecimal> getPositionsAsOf\r\n \t\t(SimpleUser user, Date data, SecurityType securityType)\r\n \t\tthrows PersistenceException;", "public abstract SortedSet<CalendarEvent> getEventsAt(User user, Date day);", "public static ListObject getNearbyEvents (int userId) {\n\t\tProfile user = getUser(userId) ;\n\t\tList <Event> events =EventController.setUserStatus(user.getEventsWhoOwn(), 2);\n\t\tevents.addAll( EventController.setUserStatus(user.getEvents(), 1)) ;\n\t\tCollections.sort(events);\n\t\tList <Event> unfinished = EventController.getUnfinishedEvents(events) ;\n\t\tint size = 5 ;\n\t\tListObject obj ;\n\t\tif ( unfinished.size() <= 5 ) {\n\t\t\tobj = new ListObject(unfinished) ;\n\t\t\tif ( unfinished.size() >= events.size() ) {\n\t\t\t\tobj.moreExist = 1 ;\n\t\t\t}\n\t\t\telse obj.moreExist = 2 ;\n\t\t}\n\t\telse {\n\t\t\tobj = new ListObject(unfinished.subList(0,size));\n\t\t\tobj.moreExist = 2 ;\n\t\t}\n\t\t\n\t\treturn obj ;\n\t}", "public void addUsedUDay(Integer date) {\n pastUDays.add(date);\n }", "int hasDate(final Date date) {\n for (int i = 0; i < days.size(); i++) {\n if (days.get(i).getDate().equals(date)) {\n return i;\n }\n }\n return -1;\n }", "private DateTime getCachedOnset(final Date date) {\n int index = Arrays.binarySearch(onsetsMillisec, date.getTime());\n if (index >= 0) {\n return onsetsDates[index];\n } else {\n int insertionIndex = -index - 1;\n return onsetsDates[insertionIndex - 1];\n }\n }", "public SPResponse getEngagementMatrix(User user, Object[] param) {\n \n final SPResponse response = new SPResponse();\n \n String startDateStr = (String) param[0];\n String endDateStr = (String) param[1];\n \n Set<String> allGroups = new HashSet<>();\n Set<String> allTags = new HashSet<>();\n LocalDate startDate = !StringUtils.isBlank(startDateStr) ? DateTimeUtil\n .getLocalDate(startDateStr) : LocalDate.now().minusMonths(3);\n LocalDate endDate = !StringUtils.isBlank(endDateStr) ? DateTimeUtil.getLocalDate(endDateStr)\n : LocalDate.now();\n List<UserActivityTracking> userActivity = trackingRepository.findUserActivityTracking(\n user.getCompanyId(), startDate, endDate);\n \n List<UserActivityTrackingDTO> collect = userActivity.stream().map(ua -> {\n User activityUser = userFactory.getUser(ua.getUserId());\n if (activityUser != null && !activityUser.isDeactivated()) {\n \n UserActivityTrackingDTO trackingDTO = new UserActivityTrackingDTO(activityUser, ua);\n trackingDTO.setGender(activityUser.getGender());\n List<String> groups = activityUser.getGroupAssociationList().stream().map(grp -> {\n String name = grp.getName();\n allGroups.add(name);\n return name;\n }).collect(Collectors.toList());\n trackingDTO.setGroups(groups);\n if (activityUser.getTagList() != null) {\n trackingDTO.setTags(activityUser.getTagList());\n allTags.addAll(activityUser.getTagList());\n }\n LocalDate dob = activityUser.getDob();\n LocalDate currentDate = LocalDate.now();\n if (dob != null) {\n int age = (int) dob.until(currentDate, ChronoUnit.YEARS);\n trackingDTO.setAge(age);\n }\n return trackingDTO;\n } else {\n return null;\n }\n \n }).filter(Objects::nonNull).collect(Collectors.toList());\n \n LocalDate localDate = LocalDate.now();\n \n List<TopPracticeTracking> findTopPracticeArea = trackingRepository.findTopPracticeAreaFromDate(\n user.getCompanyId(), localDate.minusMonths(12));\n \n List<TopPracticeAreaDTO> topDto = findTopPracticeArea.stream().map(top -> {\n \n TopPracticeAreaDTO areaDTO = new TopPracticeAreaDTO(top);\n top.getPracticeAreas().stream().forEach(prId -> {\n SPGoal goal = goalFactory.getGoal(prId, user.getUserLocale());\n PracticeAreaDetailsDTO baseGoalDto = new PracticeAreaDetailsDTO(goal);\n areaDTO.getPracticeAreasGoals().add(baseGoalDto);\n });\n return areaDTO;\n }).collect(Collectors.toList());\n \n SpectrumFilter spectrumFilter = new SpectrumFilter();\n spectrumFilter.getFilters().put(Constants.PARAM_GROUPS, allGroups);\n spectrumFilter.getFilters().put(Constants.PARAM_TAGS, allTags);\n spectrumFilter.getFilters().put(Constants.PARAM_AGE, AgeCategory.values());\n \n response.add(\"engagmentMatrixData\", collect);\n response.add(\"startDate\", startDate);\n response.add(\"endDate\", endDate);\n response.add(\"filter\", spectrumFilter);\n response.add(\"topPraticeArea\", topDto);\n \n return response;\n }", "public String getUserReport(String username)\r\n\t{\r\n\t\tArrayBasedList<LogEntry> subList = new ArrayBasedList<LogEntry>();\r\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t \tLogEntry log = list.get(i);\r\n\t \tif (log.getName().equals(username)) {\r\n\t \t\tsubList.add(log);\r\n\t \t}\r\n\t }\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t sb.append(\"Activity Report for \");\r\n\t sb.append(username);\r\n\t if (subList.size() == 0) {\t\r\n\t\t sb.append(\"[\\n\");\r\n\t \tsb.append(\" No activity was recorded.\\n]\");\r\n\t\t return sb.toString();\r\n\t }\r\n\t SimpleDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy hh:mm:ssaa\", Locale.US);\r\n\t subList.sort();\r\n\t sb.append(\"[\\r\\n\");\r\n\t for (int i = 0; i < subList.size(); i++) {\r\n\t \tsb.append(\" \");\r\n\t \tsb.append(dateFormat.format(subList.get(i).getTime()));\r\n\t \tsb.append(\" - \");\r\n\t \tsb.append(subList.get(i).getActivity());\r\n\t \tsb.append(\"\\r\\n\");\r\n\t }\r\n\t sb.append(\"]\");\r\n\t return sb.toString();\r\n\t}", "@Override\n\tpublic java.util.Date getRequestedDate() {\n\t\treturn _dmGTShipPosition.getRequestedDate();\n\t}", "public ArrayList<ArrayList<Double>> getReportsFromServer(LocalDate date)\n {\n\t //Go to DB and ask for reports of a specific date\n\t return null;\n }", "public static List<ExpenseReport> getReports(String ownerEmail, String userEmail) {\n ExpenseReportMeta reportMeta = ExpenseReportMeta.get();\n List<ExpenseReport> reports = Datastore.query(reportMeta)\n .filter(reportMeta.ownerEmail.equal(ownerEmail))\n .filter(reportMeta.emailList.equal(userEmail))\n .sort(reportMeta.dateAndTime.desc)\n .asList();\n return reports;\n }", "private List<Event> getEventsOnDate(Date date) {\r\n List<Event> eventsOnDate = new ArrayList<>();\r\n for (Event event : this.events) {\r\n if (event.getDate().equals(date)) {\r\n eventsOnDate.add(event);\r\n }\r\n }\r\n\r\n return eventsOnDate;\r\n }", "List<Bug> getOpenBugsBetweenDatesByUser(int companyId, Integer userId, Date since, Date until);", "public float getPositionReport() {\n return positionReport;\n }", "public void addUsedEDay(Integer date) {\n pastEDays.add(date);\n }", "public String[] getUserDate() {\n\t\treturn this.userDate;\n\t}", "@Override\n\tpublic List<DailyData> getFoodData(String username, String date) {\n\t\treturn mobileDao.getFoodData(username,date);\n\t}", "public PlayerPositionData(String date, float posX, float posY) {\n this.date = date;\n this.posX = posX;\n this.posY = posY;\n }", "public List<UserAttendance> getDayAttendance(Date[] dates, SysUser sysUser) {\n return findByQuery(\"from UserAttendance where (checkdate=? or checkdate=? or checkdate=? or checkdate=? or checkdate=? or checkdate=? or checkdate=?) and user.id=? and type is not null order by checkdate, noon\",\n dates[0], dates[1], dates[2], dates[3], dates[4], dates[5], dates[6], sysUser.getId());\n }", "@Override\n\tpublic Optional<LineReport> findReportbyId(int date) {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Integer> usersDate(String fecha) {\n\t\treturn controlA.usersDate(fecha);\n\t}", "@Override\r\n\tpublic Student[] getNearBirthDate(Date date, int days) {\n\t\treturn null;\r\n\t}", "public double getUserFriendlyXPos(){\n return xPos - myGrid.getWidth()/ HALF;\n }", "Set<VisitedResource> getVisitingStatistic(Date date);", "@Override\n public void goToDate(Calendar date) {\n super.goToDate(date);\n startOriginForScroll = mCurrentOrigin.x;\n }", "private void userReport() {\n reportText.appendText(\"Report of appointments per User\\n\\n\");\n for (User user: Data.getUsers()) {\n reportText.appendText(\"\\n\\nUser: \" + user.getUsername() + \"\\n\");\n for (Appointment appointment: Data.getAppointments()) {\n if (appointment.getUser() == user.getId()) {\n reportText.appendText(\"Appointment ID: \" + appointment.getId() +\n \" \\tTitle: \" + appointment.getTitle() +\n \"\\tType: \" + appointment.getType() +\n \"\\tDescription: \" + appointment.getDescription() +\n \"\\tStart: \" + appointment.getStart() +\n \"\\tEnd: \" + appointment.getEnd() +\n \"\\tCustomer: \" + appointment.getCustomer() + \"\\n\");\n }\n System.out.println(\"\\n\\n\");\n }\n }\n\n }", "public int askPermitToGetBetweenVisible();", "static void printCoordinatesForUser(int[] coordinatesForDevelopers){\n printCoordinatesForUser(coordinatesForUser(coordinatesForDevelopers));\n }", "public Map<String, EnvelopeStatusCode> getEnvelopeStatusesInLastDay(User user) throws DatatypeConfigurationException;", "List<Long> getSuppliersWithStoresNotVisited(Date date);", "@Description(\"request was sent before {date}\")\n public static Criteria<HarEntry> recordedStartedDateTimeBefore(@DescriptionFragment(\"date\") Date date) {\n checkArgument(nonNull(date), \"Date should be defined\");\n\n return condition(entry -> {\n Date startedDateTime = entry.getStartedDateTime();\n\n return startedDateTime.before(date);\n });\n }", "public int getDatePostionInXML(List<Element> dataElements, String date, boolean isEndDate) throws Exception\n\t{\n\t\tif (date.equals(DateUtil.getCurrentDate(ResourceManager.getTimeZone(), \"yyyy-MM-dd\"))) \treturn 0;\n\t\tint result = -1;\n\t\tif (isEndDate) date = DateUtil.getPreWorkingDay(date, \"yyyy-MM-dd\");\n\t\telse date = DateUtil.getLateWorkingDay(date, \"yyyy-MM-dd\");\n\t\tfor (int i = 0; i < dataElements.size(); i++)\n\t\t{\n\t\t\tif (dataElements.get(i).getTextTrim().equals(date)) \treturn i;\n\t\t}\n\t\treturn result;\n\t}", "public interface UserTrackingLogger {\n\n public long getPositiveImpressionIdForMessage(long messageId);\n\n public long getNegativeImpressionIdForMessage(long messageId);\n\n public long getImpressionIdForMessage(long messageId, String questionText);\n \n public long getTopQuestionImpressionId(long conversationId, String questionText);\n\n public long getNoneOfTheAboveImpressionIdForMessage(long messageId);\n\n public long getForumVisitImpressionIdForMessage(long messageId);\n\n /**\n * Return a list of all impressions for the given message ID that have location=HIDDEN.\n * \n * @param messageId\n * @return\n */\n public List<Long> getHiddenImpressionIdsForMessage(long messageId);\n\n /**\n * Log a user query event.\n * \n * @param timestamp The time the event occurred\n * @param user Some identifier that ideally represents a single user interacting with the system\n * @param hostname The hostname or identifier of the system\n * @param referral The ID of the click that triggered this query, or null\n * @param questionText The text of the query\n * @param mode How the query was input by the user\n * @return The event ID\n */\n public long query(Date timestamp, String user, String hostname, Long referral, String questionText, InputMode mode);\n\n /**\n * Log a user impression event\n * \n * @param timestamp The time the event occurred\n * @param user Some identifier that ideally represents a single user interacting with the system\n * @param hostname The hostname or identifier of the system\n * @param referral The ID of the query that triggered this impression, or null\n * @param prompt The impression text\n * @param classifiedClass The answer class from the classifier, or null\n * @param offset The 1-based offset of this impression relative to other impressions from the same query\n * @param action Currently not used\n * @param location The location of the impression on the screen\n * @param provenance {@see Provenance}\n * @param confidence The confidence score from the classifier, or 0\n * @return The event ID\n */\n public long impression(Date timestamp, String user, String hostname, Long referral, String prompt,\n String classifiedClass, int offset, String action, Location location, Provenance provenance, double confidence);\n\n /**\n * @param timestamp The time the event occurred\n * @param user Some identifier that ideally represents a single user interacting with the system\n * @param hostname The hostname or identifier of the system\n * @param referral The ID of the impression that was clicked\n * @return The event ID\n */\n public long click(Date timestamp, String user, String hostname, Long referral);\n\n /**\n * Unhides an impression that was previously hidden from the user.\n * The event ID of the impression is unchanged.\n * \n * @param impressionId The event ID of the impression\n * @param newLocation The location of the impression on the screen\n */\n public void unhideImpression(long impressionId, Location newLocation);\n\n /**\n * Possible impression locations on the page\n */\n public static enum Location {\n MAIN_RESULTS_AREA, RIGHT_RAIL, FOOTER, \n /**\n * This is a special location to indicate impressions that were generated from a query\n * but not initially shown to the user. When the impression is shown to the user it\n * should be unhidden via unhideImpression().\n */\n HIDDEN\n };\n\n /**\n * Where an impression came from.\n * Currently only used to distinguish between clickable and non-clickable impressions.\n */\n public static enum Provenance {\n /**\n * This impression shows an answer inline and is not clickable.\n */\n INLINE, \n /**\n * This impression is clickable to either provide feedback or submit another query.\n */\n ALGO\n };\n\n}", "private void executeReportRequest(String user_id, String search_date, final String searchedUser){\n new ServerApiRequests(this,\n\n new ServerApiRequests.AsyncStart(){\n\n @Override\n public void onProcessStart(){\n loadReport.setVisibility(View.VISIBLE);\n }\n },\n\n new ServerApiRequests.AsyncResponse() {\n\n @Override\n public void onProcessFinish(String output) {\n Log.e(\"response\", output);\n\n try {\n JSONObject result = new JSONObject(output);\n\n PersonalToastDesign tst = new PersonalToastDesign(getApplicationContext());\n String state = result.getString(\"success\");\n if(state.equals(\"true\")) {\n// tst.showToast(\"User unfriended.\");\n\n mMap.clear();\n ArrayList<Marker> markersList = new ArrayList<Marker>();\n double distance = 0;\n double prev_x = 0;\n double prev_y = 0;\n\n PolylineOptions rectOptions = new PolylineOptions();\n JSONArray jsonUsers = result.getJSONArray(\"user\");\n\n\n for (int i = 0; i < jsonUsers.length(); i++) {\n\n\n PointCoordinates tempPoint = new PointCoordinates(\n jsonUsers.getJSONObject(i).getDouble(\"COOR_X\")\n , jsonUsers.getJSONObject(i).getDouble(\"COOR_Y\")\n ,jsonUsers.getJSONObject(i).getString(\"REC_DATE\"));\n\n Marker marker = mMap.addMarker(new MarkerOptions()\n .position(new LatLng(tempPoint.getCoord_x(), tempPoint.getCoord_y()))\n .title(tempPoint.getRec_date())\n// .icon(BitmapDescriptorFactory.fromResource(R.drawable.red_house))\n );\n// marker.showInfoWindow();\n markersList.add(marker);\n\n rectOptions.add(new LatLng(tempPoint.getCoord_x(), tempPoint.getCoord_y()));\n\n // accumulate distance\n\n if (i > 0){\n distance += tempPoint.distanceToMe(prev_x,prev_y);\n } else {\n prev_x = tempPoint.getCoord_x();\n prev_y = tempPoint.getCoord_y();\n }\n }\n\n showDistance.setVisibility(View.VISIBLE);\n double finalValue = Math.round( distance * 1000.0 ) / 1000.0;\n showDistance.setText(\"Изминатo разстояние от \"+ searchedUser + \" ~ \" + String.valueOf(finalValue)+ \" км.\");\n\n\n mMap.addPolyline(rectOptions).setColor(Color.GREEN);;\n\n // zooming\n final int padding = 30;//initialize the padding for map boundary\n /**create the bounds from latlngBuilder to set into map camera*/\n LatLngBounds.Builder builder = new LatLngBounds.Builder();\n for (Marker m : markersList) {\n builder.include(m.getPosition());\n }\n\n final LatLngBounds bounds = builder.build();\n mMap.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, padding));\n\n } else {\n //tst.showToast(result.getString(\"error\"));\n String r = result.getString(\"error\");\n if(r.equals(\"Day or user not found\")) {\n tst.showToast(\"Денят, или потребителят не са намерени\");\n }\n if(r.equals(\"Please provide user name and search date\")) {\n tst.showToast(\"Моля въведете име и търсена дата\");\n }\n\n mMap.clear();\n showDistance.setVisibility(View.GONE);\n mMap.animateCamera(CameraUpdateFactory.zoomTo(1));\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n PersonalToastDesign tst = new PersonalToastDesign(getApplicationContext());\n tst.showToast(\"Възникна проблем със сървъра\");\n mMap.clear();\n executeReport.setEnabled(true);\n showDistance.setVisibility(View.GONE);\n loadReport.setVisibility(View.GONE);\n mMap.animateCamera(CameraUpdateFactory.zoomTo(1));\n }\n\n loadReport.setVisibility(View.GONE);\n executeReport.setEnabled(true);\n }\n }\n\n ).execute(\"get_report_coords_url\", user_id, search_date);\n }", "@Override\n\tpublic JsonListResult findCheckRecordByUidAndDate(String uid, String date) throws Exception {\n\t\tJsonListResult jsonListResult = new JsonListResult();\n\t\t date = date + \"%\";\n\t\tList<Map<String, Object>> list = wxRequestMapper.findCheckRecordByUidAndDate(uid , date);\n\t\tjsonListResult.setList(list);\n\t\treturn jsonListResult;\n\t}", "@Override\n\tpublic void setRequestedDate(java.util.Date requestedDate) {\n\t\t_dmGTShipPosition.setRequestedDate(requestedDate);\n\t}", "@Override\n public BigDecimal getTotalUnallocatedCredit(String customerId, Date atDate, EMCUserData userData) {\n BigDecimal outstandingCredit = null;\n\n //Get total outstanding credits for customer, which existed at atDate\n EMCQuery query = new EMCQuery(enumQueryTypes.SELECT, DebtorsOpenTransactions.class);\n query.addFieldAggregateFunction(\"credit\", \"SUM\");\n query.addFieldAggregateFunction(\"creditAmountSettled\", \"SUM\");\n\n //Customer is optional.\n if (customerId != null) {\n query.addAnd(\"customerId\", customerId);\n }\n\n //Bev requested that we remove this check. This will now show all unallocated credits,\n //regardless of whether or not they existed at atDate.\n //query.addAnd(\"createdDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n //Check that future payments are not included.\n query.addAnd(\"transactionDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n\n Object[] creditTotals = (Object[]) util.executeSingleResultQuery(query, userData);\n\n if (creditTotals != null) {\n BigDecimal totalCredit = creditTotals[0] == null ? BigDecimal.ZERO : (BigDecimal) creditTotals[0];\n BigDecimal totalCreditSettled = creditTotals[1] == null ? BigDecimal.ZERO : (BigDecimal) creditTotals[1];\n\n outstandingCredit = totalCredit.subtract(totalCreditSettled);\n }\n\n //If atDate less than today, ignore updates made to transactions between atDate and today.\n //Only check dates, not time\n Calendar atCalendar = Calendar.getInstance();\n atCalendar.setTime(atDate);\n atCalendar.set(Calendar.HOUR, 0);\n atCalendar.set(Calendar.MINUTE, 0);\n atCalendar.set(Calendar.SECOND, 0);\n atCalendar.set(Calendar.MILLISECOND, 0);\n\n Calendar nowCalendar = Calendar.getInstance();\n nowCalendar.setTime(Functions.nowDate());\n nowCalendar.set(Calendar.HOUR, 0);\n nowCalendar.set(Calendar.MINUTE, 0);\n nowCalendar.set(Calendar.SECOND, 0);\n nowCalendar.set(Calendar.MILLISECOND, 0);\n\n if (atCalendar.compareTo(nowCalendar) < 0) {\n EMCQuery creditQuery = new EMCQuery(enumQueryTypes.SELECT, DebtorsTransactionSettlementHistory.class);\n creditQuery.addFieldAggregateFunction(\"creditSettled\", \"SUM\");\n //Only include transactions that existed on atDate. Bev requested that we remove this check.\n //creditQuery.addAnd(\"transactionCreatedDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n\n //Only include transactions that fall on or before atDate.\n creditQuery.addAnd(\"creditTransactionDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n\n //Customer Id is optional.\n if (customerId != null) {\n creditQuery.addAnd(\"customerId\", customerId);\n }\n\n //Only include transactions settled after atDate\n creditQuery.addAnd(\"createdDate\", atDate, EMCQueryConditions.GREATER_THAN);\n\n BigDecimal creditSettled = (BigDecimal) util.executeSingleResultQuery(creditQuery, userData);\n if (creditSettled == null) {\n creditSettled = BigDecimal.ZERO;\n }\n\n outstandingCredit = outstandingCredit.add(creditSettled);\n }\n\n return outstandingCredit;\n }", "@Override\n\tpublic void setUserVisibleHint(boolean isVisibleToUser) {\n\t\tsuper.setUserVisibleHint(isVisibleToUser);\n\t\tif (isVisibleToUser) {\n\n\t\t\tiGetFirstFocus(); // 点扫描后获取焦点\n\t\t}\n\t}", "@Override\n\tpublic List<AppointmentDto> getAppointmentByUserIdForADate(int userId, Date date) {\n\t\t// TODO Auto-generated method stub\n\t\ttry{\n\t\t\treturn jdbcTemplate.query(FETCH_BY_USERID_ON_PARTICULAR_DATE, (rs, rownnum)->{\n\t\t\t\treturn new AppointmentDto(rs.getInt(\"appointmentId\"), rs.getTime(\"startTime\"), rs.getTime(\"endTime\"), rs.getDate(\"date\"), rs.getInt(\"physicianId\"), rs.getInt(\"userId\"), rs.getInt(\"productId\"), rs.getString(\"confirmationStatus\"), rs.getString(\"zip\"),rs.getString(\"cancellationReason\"), rs.getString(\"additionalNotes\"), rs.getBoolean(\"hasMeetingUpdate\"),rs.getBoolean(\"hasMeetingExperienceFromSR\"),rs.getBoolean(\"hasMeetingExperienceFromPH\"), rs.getBoolean(\"hasPitch\"));\n\t\t\t}, userId, date );\n\t\t}catch(DataAccessException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public List<Events> getMostUpcomingUserEvents(long userId);", "@Override\n public JSONObject viewSalesCallLogByExecutive(String username) {\n\n return in_salescalllogdao.viewSalesCallLogByExecutive(username);\n }", "public List<Point> getPointListByUserId(String userId)\r\n\t\t\tthrows DataAccessException {\n\t\treturn null;\r\n\t}", "public boolean runsAt(Date date);", "private void showOutOfStockReportDialog(String userEmail) {\n CustomDialogUtilBuilder.CustomDialogBuilder customDialogUtilBuilder =\n new CustomDialogUtilBuilder.CustomDialogBuilder(this, this, THREE);\n customDialogUtilBuilder.setMailId(userEmail);\n customDialogUtilBuilder.buildCustomDialog();\n }", "public List<ConsultationReservation> getConsultationReservationsByUserToday(InternalUser user) throws SQLException{\n\t\t\n\t\treturn super.manager.getConsultationReservationByUser(user, LocalDate.now(), true, false);\n\t}", "public void findRobotPosition(){\n targetVisible = false;\n for (VuforiaTrackable trackable : allTrackables) {\n if (((VuforiaTrackableDefaultListener)trackable.getListener()).isVisible()) {\n telemetry.addData(\"Visible Target\", trackable.getName());\n targetVisible = true;\n\n // Get the position of the visible target and put the X & Y position in visTgtX and visTgtY\n // We will use these for determining bearing and range to the visible target\n OpenGLMatrix tgtLocation = trackable.getLocation();\n VectorF tgtTranslation = tgtLocation.getTranslation();\n visTgtX = tgtTranslation.get(0) / mmPerInch;\n visTgtY = tgtTranslation.get(1) / mmPerInch;\n //telemetry.addData(\"Tgt X & Y\", \"{X, Y} = %.1f, %.1f\", visTgtX, visTgtY);\n\n // getUpdatedRobotLocation() will return null if no new information is available since\n // the last time that call was made, or if the trackable is not currently visible.\n OpenGLMatrix robotLocationTransform = ((VuforiaTrackableDefaultListener)trackable.getListener()).getUpdatedRobotLocation();\n if (robotLocationTransform != null) {\n lastLocation = robotLocationTransform;\n }\n break;\n }\n }\n\n // Provide feedback as to where the robot is located (if we know).\n if (targetVisible) {\n // express position (translation) of robot in inches.\n VectorF translation = lastLocation.getTranslation();\n //telemetry.addData(\"Pos (in)\", \"{X, Y, Z} = %.1f, %.1f, %.1f\",\n // translation.get(0) / mmPerInch, translation.get(1) / mmPerInch, translation.get(2) / mmPerInch);\n\n // express the rotation of the robot in degrees.\n Orientation rotation = Orientation.getOrientation(lastLocation, EXTRINSIC, XYZ, DEGREES);\n //telemetry.addData(\"Rot (deg)\", \"{Roll, Pitch, Heading} = %.0f, %.0f, %.0f\", rotation.firstAngle, rotation.secondAngle, rotation.thirdAngle);\n\n // Robot position is defined by the standard Matrix translation (x and y)\n robotX = translation.get(0)/ mmPerInch;\n robotY = translation.get(1)/ mmPerInch;\n\n // Robot bearing (in +vc CCW cartesian system) is defined by the standard Matrix z rotation\n robotBearing = rotation.thirdAngle;\n\n // target range is based on distance from robot position to the visible target\n // Pythagorean Theorum\n targetRange = Math.sqrt((Math.pow(visTgtX - robotX, 2) + Math.pow(visTgtY - robotY, 2)));\n\n // target bearing is based on angle formed between the X axis to the target range line\n // Always use \"Head minus Tail\" when working with vectors\n targetBearing = Math.toDegrees(Math.atan((visTgtY - robotY)/(visTgtX - robotX)));\n\n // Target relative bearing is the target Heading relative to the direction the robot is pointing.\n // This can be used as an error signal to have the robot point the target\n relativeBearing = targetBearing - robotBearing;\n // Display the current visible target name, robot info, target info, and required robot action.\n\n telemetry.addData(\"Robot\", \"[X]:[Y] (Heading) [%5.0fin]:[%5.0fin] (%4.0f°)\",\n robotX, robotY, robotBearing);\n telemetry.addData(\"Target\", \"[TgtRange] (TgtBearing):(RelB) [%5.0fin] (%4.0f°):(%4.0f°)\",\n targetRange, targetBearing, relativeBearing);\n }\n else {\n telemetry.addData(\"Visible Target\", \"none\");\n }\n }", "private static VectorD calculateScreenOffset(\n TransformationStorage playerPos\n ) {\n VectorD dim = new VectorD(Constants.GAME_WIDTH, Constants.GAME_HEIGHT);\n return dim\n .multiplicate(DIM_REDUCTION)\n .diff(\n Engine\n .get()\n .getGameState()\n .getCursorFollow()\n .multiplicate(MOUSE_POS_REDUCTION)\n )\n .diff(playerPos.getPosition());\n }", "public double getElevationData(String date){\n\t\tJSONArray array = new JSONArray(elevHistory);\n\t\tfor(int i = 0; i<array.length();i++){\n\t\t\tJSONObject json = array.getJSONObject(i);\n\t\t\tif(json.get(\"dateTime\").equals(date))\n\t\t\t\treturn Double.parseDouble(json.get(\"value\").toString());\n\t\t}\n\t\treturn -1;\n\t}", "public int showIndex(int userInputElement){\n int i;\n for(i=0; i<sirDeLa1La100.length; i++) {\n if (userInputElement == sirDeLa1La100[i]) {\n return i;\n }\n }\n return -1;\n }", "@Override\n\tpublic List<Message> displayListOfMessageBetweenDate(long fromDate) {\n\n\t\tList<Message> messages = new ArrayList<Message>(); \n\n\t\ttry {\n\t\t\tmessages = messageReader.getMessageBetween(fromDate);\n\n\t\t} catch (MessageException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn messages;\n\t}", "public int getNumberOfOlderOnUserSpacesActivities(Identity ownerIdentity, Long sinceTime);", "private String getIndexDate(String criteriaMet, Map<String, List<Info>> criteria, boolean isAny) {\n\t\tSortedSet<String> date = new TreeSet<String>();\n\t\t\n\t\tString[] crit = criteriaMet.split(\":\");\n\t\tfor(int i=0; i<crit.length; i++) {\n\t\t\tList<Info> info = criteria.get(crit[i]);\n\t\t\tif(info==null) {\n\t\t\t\tSystem.out.println(crit[i] + \" has NO Info\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t//info includes \"all\" related conditions until it satisfies the criteria\n\t\t\t//so the last element will be the earliest date that satisfies the criteria\n\t\t\tdate.add(info.get(info.size()-1).date);\n\t\t}\n\t\t\n\t\t//date is in order of earliest to latest \n\t\tif(isAny)\n\t\t\treturn date.first();\n\t\telse\n\t\t\treturn date.last();\n\t}", "public int getCountOfMostUpcomingUserEvents(long userId);", "public PatientViewAlerts(User user,PatientLandingScreen parent) {\n \tthis.user = user;\n \tparentFrame = parent;\n \tdata.checkForAlertsAndPopulate(user);\n initComponents();\n data.updateSeenAlerts(user);\n }", "public void searchByBeforeDate(long date, final int limit) throws IOException {\n final IndexSearcher indexSearcher = new IndexSearcher(reader);\n\n Query q = NumericRangeQuery.newLongRange(\"creationDate\", 0L, date, true, true);\n System.out.println(\"Type of query: \" + q.getClass().getSimpleName());\n\n final TopDocs search = indexSearcher.search(q, limit);\n final ScoreDoc[] hits = search.scoreDocs;\n showHits(hits);\n }", "@Override\n public List<ScheduledInterview> getScheduledInterviewsInRangeForUser(\n String userId, Instant minTime, Instant maxTime) {\n TimeRange range = new TimeRange(minTime, maxTime);\n List<ScheduledInterview> scheduledInterviews = getForPerson(userId);\n List<ScheduledInterview> scheduledInterviewsInRange = new ArrayList<ScheduledInterview>();\n for (ScheduledInterview scheduledInterview : scheduledInterviews) {\n if (range.contains(scheduledInterview.when())) {\n scheduledInterviewsInRange.add(scheduledInterview);\n }\n }\n return scheduledInterviewsInRange;\n }", "@Override\n public JSONObject viewSalesCallLogByManager(String username) {\n return in_salescalllogdao.viewSalesCallLogByManager(username);\n }", "public void setInspectedDate (java.util.Date inspectedDate) {\n\t\tthis.inspectedDate = inspectedDate;\n\t}", "public Date getInteractedAt() {\n return this.interactedAt;\n }", "public int getNumberOfNewerOnUserSpacesActivities(Identity ownerIdentity, Long sinceTime);", "public int getIndex(Date theDate) {\n\t\tIterator<Entry<Date, Integer>> it = this.wordTrend.getTrends().entrySet().iterator();\n\t\tint n = 0;\n\n\t\twhile (it.hasNext()) {\n\t\t\tDate theCurrentDate = it.next().getKey();\n\t\t\tif (theDate.compareTo(theCurrentDate) == 0) {\n\t\t\t\treturn n;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\treturn -1;\n\t}", "public List<UserExpenseReport> getUserExpenseReports(String ownerEmail, String userEmail) {\n List<ExpenseReport> reports = getReports(ownerEmail, userEmail);\n List<UserExpenseReport> userList = new ArrayList<UserExpenseReport>();\n for (ExpenseReport report : reports) {\n userList.add(UserExpenseReport.newUserExpenseReport(report, userEmail));\n }\n return userList;\n }", "private String getIndexDate(String criteriaMet, Map<String, List<Info>> criteria) {\n\t\tSortedSet<String> date = new TreeSet<String>();\n\t\t\n\t\tString[] crit = criteriaMet.split(\":\");\n\t\tfor(int i=0; i<crit.length; i++) {\n\t\t\tList<Info> info = criteria.get(crit[i]);\n\t\t\tif(info==null) {\n\t\t\t\tSystem.out.println(crit[i] + \" has NO Info\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t//info includes \"all\" related conditions until it satisfies the criteria\n\t\t\t//so the last element will be the earliest date \n\t\t\tdate.add(info.get(info.size()-1).date);\n\t\t}\n\t\t\n\t\t//date is in order of earliest to latest \n\t\treturn date.last();\n\t}", "private void findStaffLinePositions()\n {\n Log.i(TAG, \"findStaffLinePositions\");\n final int sliceStart = (int)(0.45*mWidth);\n final int sliceEnd = (int)(0.65*mWidth);\n \n boolean connected;\n int lineNum;\n for(int x = sliceStart; x<sliceEnd; ++x) //only consider a slice of x values\n {\n connected=false;\n lineNum=0;\n for(int y=0; y<mHeight; ++y)\n {\n if(mHorizontalProjHist[y] >= x) //the histogram for this y value is within the slice we're looking at\n {\n if(mStaffLineMap.indexOfKey(y) < 0) //we haven't seen this y value, so add it\n {\n \tmStaffLineMap.put(y, lineNum);\n }\n connected = true;\n }\n else if(connected) //encountered whitespace after a line\n {\n lineNum++;\n connected = false;\n }\n }\n }\n\n }", "public void onDateSet(DatePicker view, int year, int month, int day) {\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yyyy\");\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.DAY_OF_MONTH, month, day, 0, 0);\n calendar.set(Calendar.YEAR, year);\n\n String formatedDate = sdf.format(calendar.getTime());\n if (calendar.getTime().before(Calendar.getInstance().getTime())) {\n diffInMilis = Calendar.getInstance().getTimeInMillis() - calendar.getTimeInMillis();\n diffInDays = diffInMilis / (24 * 60 * 60 * 1000);\n if (diffInDays > 21) {\n String promptMessage = \"Cannot fetch call logs for \" + diffInDays\n + \" days right now. Please wait for \"\n + String.valueOf(diffInDays - 21) + \"days\";\n Toast.makeText(getContext(), promptMessage, Toast.LENGTH_SHORT).show();\n }\n\n else {\n Toast.makeText(getContext(), \"Day before\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(getActivity().getBaseContext(), UserLogsTabs.class);\n intent.putExtra(\"date\", calendar.getTime());\n intent.putExtra(\"whenItHappened\", \"before\");\n startActivity(intent);\n\n }\n }\n\n else if (calendar.getTime().equals(Calendar.getInstance().getTime()))\n {\n Toast.makeText(getContext(), \"Please select a date before the current date\",\n Toast.LENGTH_SHORT).show();\n }\n\n else {\n Toast.makeText(getContext(), \"Cannot fetch call logs from future\", Toast.LENGTH_SHORT).show();\n /*Intent intent = new Intent(getActivity(), CallLogStats.class);\n intent.putExtra(\"date\", calendar.getTime());\n intent.putExtra(\"whenItHappened\", \"after\");\n startActivity(intent);*/\n }\n }", "public int getLinePosition(int line) {\n\t\treturn linePositions.get(line);\n\t}", "public String getWalkingSteps(User user)\n {\n int day = 26;\n int month = 10;\n int year = 2015;\n if(user == null)\n {\n return \"index\";\n }\n int userID = user.getIdUser();\n ActivityData activityData = getWalkingSteps(day, month, year, user);\n this.steps = activityData.getValue();\n return \"ViewActivity\";\n }", "public EventList getEventList(String date) {\n for (EventList e : events) {\n if (e.getDate().equals(date)) {\n return e;\n }\n }\n return null;\n }", "public int GetPosition()\n {\n int position = -1;\n\n double CurrentDistance = GetDistance();\n\n for (int i = 0; i < Positions.length; i++)\n {\n // first get the distance from current to the test point\n double DistanceFromPosition = Math.abs(CurrentDistance\n - Positions[i]);\n\n // then see if that distance is close enough using the threshold\n if (DistanceFromPosition < PositionThreshold)\n {\n position = i;\n break;\n }\n }\n\n return position;\n }", "public int getNumberOfOlderOnUserActivities(Identity ownerIdentity, Long sinceTime);", "public List<Statistic> queryPageDataByUserId(Integer startIndex, Integer pagesize, Integer userId) {\n\t\tString sql=\"select * from statistics where user_id=? order by creat_date desc limit ?,?\";\n\t\treturn getList(sql, userId,startIndex,pagesize);\n\t}", "public void getInfoWindowZone(Context context, float x, float y) {\n\n WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);\n Display display = wm.getDefaultDisplay();\n\n int zone = 0;\n //\n int width = display.getWidth();\n int height = display.getHeight();\n\n/*\n int[] location = new int[2];\n v.getLocationOnScreen(location);\n float x = location[0] ;//v.getX() + CalendarMonthFragment.gridItemX;//itemPos.x;\n float y = location[1] ;//v.getY() + CalendarMonthFragment.gridItemY;//itemPos.y;\n*/\n\n interactiveInfoWindow.setDimensionByGridLocation();\n\n//\t\tif(height > width) {\n//\t\t\tif((x > calendarEventInfos.getWidth()/2) && ((x + calendarEventInfos.getWidth()/2) < width))\n//\t\t\t{\n//\t\t\t\tif(y > (calendarEventInfos.getHeight()) && y + calendarEventInfos.getHeight() > height) {\n//\n//\t\t\t\t\tzone = 270;\n//\n//\t\t\t\t}else if(y < calendarEventInfos.getHeight() && y + calendarEventInfos.getHeight() < height) {\n//\n//\t\t\t\t\tzone = 90;\n//\n//\t\t\t\t}\n//\t\t\t}\n//\n//\t\t\tif((x > calendarEventInfos.getWidth()) && (position.x + mLocationInfos.getWidth()) >= width - 50) {\n//\t\t\t\tif((y > (calendarEventInfos.getHeight()/2)) && (height > (y + ( calendarEventInfos.getHeight()/2 ) ))) {\n//\t\t\t\t\tzone = 0;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\telse if((x + calendarEventInfos.getWidth() < width) && ((y > calendarEventInfos.getHeight()/2) && (y + calendarEventInfos.getHeight()/2 < height))) {\n//\t\t\t\tzone = 180;\n//\t\t\t}\n//\n//\t\t}\n//\t\telse {\n//\t\t\tif((x < calendarEventInfos.getWidth()/2 + 50) && ((x + calendarEventInfos.getWidth()/2) < width ))\n//\t\t\t{\n//\t\t\t\tif(y > (calendarEventInfos.getHeight() - 50) && (y + calendarEventInfos.getHeight()) > height) {\n//\n//\t\t\t\t\tzone = 270;\n//\n//\t\t\t\t}else if(y < calendarEventInfos.getHeight() && (y + calendarEventInfos.getHeight()) < height ) {\n//\n//\t\t\t\t\tzone = 90;\n//\n//\t\t\t\t}\n//\t\t\t}\n//\n//\t\t\telse if((y > calendarEventInfos.getHeight()) && (y + calendarEventInfos.getHeight()) >= height - 100) {\n//\t\t\t\tif(x + calendarEventInfos.getWidth() > width - 100) {\n//\t\t\t\t\tzone = 0;\n//\t\t\t\t}else if(x < calendarEventInfos.getWidth()) {\n//\t\t\t\t\tzone = 180;\n//\t\t\t\t}\n//\n//\t\t\t}\n////\t\t\telse if((x + calendarEventInfos.getWidth() < width - 150) && ((y > calendarEventInfos.getHeight()/2 - 50) && (y+ calendarEventInfos.getHeight()/2 < height - 50))) {\n////\t\t\t\tzone = 180;\n////\t\t\t}\n//\t}\n\n if((x > interactiveInfoWindow.getWidth()/2) && ((x + interactiveInfoWindow.getWidth()/2) < width))\n {\n if(y > (interactiveInfoWindow.getHeight()) && y + interactiveInfoWindow.getHeight() > height) {\n\n zone = 270;\n\n }else if(y < interactiveInfoWindow.getHeight() && y + interactiveInfoWindow.getHeight() < height) {\n\n zone = 90;\n\n }\n }\n\n if((x > interactiveInfoWindow.getWidth()) && (x + interactiveInfoWindow.getWidth()) >= width - 50) {\n if((y > (interactiveInfoWindow.getHeight()/2)) && (height > (y + ( interactiveInfoWindow.getHeight()/2 ) ))) {\n zone = 0;\n }\n }\n else{\n zone = 180;\n }\n\n\n\n interactiveInfoWindow.setViewByGridLocation(zone);\n\n\n\n interactiveInfoWindow.show(mapImage, x, y, zone, height);\n\n interactiveInfoWindow.setOnDismissListener(new QuickAction.OnDismissListener() {\n\n @Override\n public void onDismiss() {\n\n\n }\n });\n }", "@Override\n\tpublic List<ShowManageMoney> listByByPlanIdDate(Long bidPlanId,\n\t\t\tString intentDate) {\n\t\treturn dao.listByByPlanIdDate(bidPlanId, intentDate);\n\t}", "public Point2D getUIMousePosition() {\n\t\treturn Lel.coreEngine.panelPositionToGame(input.getMousePosition());\n\t}", "public int periodIndex (\n\t\tfinal int iDate)\n\t\tthrows java.lang.Exception\n\t{\n\t\tint i = 0;\n\n\t\tfor (org.drip.analytics.cashflow.CompositePeriod period : periods()) {\n\t\t\tif (period.contains (iDate)) return i;\n\n\t\t\t++i;\n\t\t}\n\n\t\tthrow new java.lang.Exception (\"BondStream::periodIndex => Input date not in the period set range!\");\n\t}", "List<Integer> getIdUsersToSendFirstAlert( Timestamp alertMaxDate );", "SiteLocation getLocatedAt();", "public void setDateExamine (java.util.Date dateExamine) {\n\t\tthis.dateExamine = dateExamine;\n\t}", "public void setPositionReport(float value) {\n this.positionReport = value;\n }", "void seekTo(int positionMs, boolean fromUser);", "private int getFollowersStartingIndex(User lastFollower, List<User> allFollowers) {\n\n int followersIndex = 0;\n\n if(lastFollower != null) {\n // This is a paged request for something after the first page. Find the first item\n // we should return\n for (int i = 0; i < allFollowers.size(); i++) {\n if(lastFollower.equals(allFollowers.get(i))) {\n // We found the index of the last item returned last time. Increment to get\n // to the first one we should return\n followersIndex = i + 1;\n }\n }\n }\n\n return followersIndex;\n }", "public int getNumberOfNewerOnUserActivities(Identity ownerIdentity, Long sinceTime);", "public static void getAccountDateBefore(java.util.Date date) {\n\t\t\t\n\t\t\t\n\t\t java.sql.Date sqlDate = new java.sql.Date(date.getTime());\n\t\t\t\n\t\t\taccounts.clear();\n\t\n\t\t\tString query = \"select account.accID, accType, balance, dateCreated, fName, lName \" + \n\t\t \"from ser322.account,ser322.customer \" + \n\t\t \"WHERE customer.accID = account.accID AND dateCreated <\" + \"'\" + sqlDate + \"'\";\n\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tStatement stmt = con.getConnection().createStatement();\n\t\t\t ResultSet rs = stmt.executeQuery(query);\n\t\t while (rs.next()) {\n\t\t \taccounts.addElement(new Account(rs.getInt(\"accID\"),rs.getString(\"accType\"),\n\t\t \t\t\t rs.getFloat(\"balance\"),rs.getDate(\"dateCreated\"), rs.getString(\"fName\"), rs.getString(\"lName\")));\n\t\t }\n\t\t \n\t\t } catch (SQLException e ) {\n\t\t \tSystem.out.println(\"QUERY WRONG - getAccountDateBefore\");\n\t\t }\n\t\n\t\t}", "private void calculateViewportOffset (int[] xy, int visitorX, int visitorY) {\n Image mapImage = cityMap.getMapImage ();\n\n int mapWidth = mapImage.getWidth ();\n int mapHeight = mapImage.getHeight ();\n\n int vpWidth = getWidth ();\n int vpHeight = getHeight ();\n\n int x = visitorX - (vpWidth / 2);\n int y = visitorY - (vpHeight / 2);\n\n if ((x + vpWidth) > mapWidth) {\n x = mapWidth - vpWidth;\n }\n\n if ((y + vpHeight) > mapHeight) {\n y = mapHeight - vpHeight;\n }\n\n if (x < 0) {\n x = 0;\n }\n\n if (y < 0) {\n y = 0;\n }\n\n xy[X] = x;\n xy[Y] = y;\n }", "public Sector getSectorFromDate(Date date) {\n\t\treturn m_flightplan.getSectorFromDate(date);\n\t}", "public int compare(Date date){\n if(date.getYear() > this.year){\n return -1;\n }else if(date.getYear() < this.year){\n return 1;\n }\n\n if(date.getMonth() > this.month){\n return -1;\n }else if(date.getMonth() < this.month){\n return 1;\n }\n\n if(date.getDay() > this.day){\n return -1;\n }else if(date.getDay() < this.day){\n return 1;\n }\n\n return 0;\n }" ]
[ "0.63399726", "0.6114719", "0.57003623", "0.5213799", "0.51801735", "0.5117687", "0.50462484", "0.504529", "0.49861777", "0.49378353", "0.4850925", "0.48168325", "0.48059782", "0.47835395", "0.47256833", "0.46663398", "0.46034077", "0.4596723", "0.45940682", "0.45564318", "0.454485", "0.45251083", "0.4488529", "0.44863167", "0.44854385", "0.4484831", "0.44820178", "0.44808242", "0.4472452", "0.44697696", "0.44585356", "0.44526163", "0.44340834", "0.44163427", "0.4414857", "0.439355", "0.43868497", "0.43839347", "0.43836963", "0.43807796", "0.43518135", "0.4333142", "0.43328393", "0.43232563", "0.429965", "0.42943883", "0.42790994", "0.42782223", "0.42758688", "0.42743346", "0.42741117", "0.4272553", "0.42711425", "0.42678076", "0.42675656", "0.42649925", "0.42603564", "0.42562103", "0.425404", "0.42510593", "0.42469373", "0.42458957", "0.42418578", "0.42396075", "0.42326826", "0.42312205", "0.4226882", "0.42240593", "0.42223945", "0.42201534", "0.4218686", "0.42123285", "0.420598", "0.42036533", "0.41946352", "0.41907126", "0.41896966", "0.41890782", "0.41869467", "0.4184831", "0.41836265", "0.41833848", "0.4177606", "0.41740426", "0.4173359", "0.41727445", "0.41702032", "0.41688773", "0.41687495", "0.4159979", "0.41576982", "0.41560918", "0.4156063", "0.41548645", "0.41543743", "0.4150382", "0.4150343", "0.414576", "0.4141058", "0.41378912" ]
0.5973195
2
Returns the aggregate position of each (instrument,account,actor) tuple based on all reports for given security type received for each tuple on or before the supplied date, and which are visible to the given user.
public Map<PositionKey, BigDecimal> getPositionsAsOf (SimpleUser user, Date data, SecurityType securityType) throws PersistenceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SPResponse getEngagementMatrix(User user, Object[] param) {\n \n final SPResponse response = new SPResponse();\n \n String startDateStr = (String) param[0];\n String endDateStr = (String) param[1];\n \n Set<String> allGroups = new HashSet<>();\n Set<String> allTags = new HashSet<>();\n LocalDate startDate = !StringUtils.isBlank(startDateStr) ? DateTimeUtil\n .getLocalDate(startDateStr) : LocalDate.now().minusMonths(3);\n LocalDate endDate = !StringUtils.isBlank(endDateStr) ? DateTimeUtil.getLocalDate(endDateStr)\n : LocalDate.now();\n List<UserActivityTracking> userActivity = trackingRepository.findUserActivityTracking(\n user.getCompanyId(), startDate, endDate);\n \n List<UserActivityTrackingDTO> collect = userActivity.stream().map(ua -> {\n User activityUser = userFactory.getUser(ua.getUserId());\n if (activityUser != null && !activityUser.isDeactivated()) {\n \n UserActivityTrackingDTO trackingDTO = new UserActivityTrackingDTO(activityUser, ua);\n trackingDTO.setGender(activityUser.getGender());\n List<String> groups = activityUser.getGroupAssociationList().stream().map(grp -> {\n String name = grp.getName();\n allGroups.add(name);\n return name;\n }).collect(Collectors.toList());\n trackingDTO.setGroups(groups);\n if (activityUser.getTagList() != null) {\n trackingDTO.setTags(activityUser.getTagList());\n allTags.addAll(activityUser.getTagList());\n }\n LocalDate dob = activityUser.getDob();\n LocalDate currentDate = LocalDate.now();\n if (dob != null) {\n int age = (int) dob.until(currentDate, ChronoUnit.YEARS);\n trackingDTO.setAge(age);\n }\n return trackingDTO;\n } else {\n return null;\n }\n \n }).filter(Objects::nonNull).collect(Collectors.toList());\n \n LocalDate localDate = LocalDate.now();\n \n List<TopPracticeTracking> findTopPracticeArea = trackingRepository.findTopPracticeAreaFromDate(\n user.getCompanyId(), localDate.minusMonths(12));\n \n List<TopPracticeAreaDTO> topDto = findTopPracticeArea.stream().map(top -> {\n \n TopPracticeAreaDTO areaDTO = new TopPracticeAreaDTO(top);\n top.getPracticeAreas().stream().forEach(prId -> {\n SPGoal goal = goalFactory.getGoal(prId, user.getUserLocale());\n PracticeAreaDetailsDTO baseGoalDto = new PracticeAreaDetailsDTO(goal);\n areaDTO.getPracticeAreasGoals().add(baseGoalDto);\n });\n return areaDTO;\n }).collect(Collectors.toList());\n \n SpectrumFilter spectrumFilter = new SpectrumFilter();\n spectrumFilter.getFilters().put(Constants.PARAM_GROUPS, allGroups);\n spectrumFilter.getFilters().put(Constants.PARAM_TAGS, allTags);\n spectrumFilter.getFilters().put(Constants.PARAM_AGE, AgeCategory.values());\n \n response.add(\"engagmentMatrixData\", collect);\n response.add(\"startDate\", startDate);\n response.add(\"endDate\", endDate);\n response.add(\"filter\", spectrumFilter);\n response.add(\"topPraticeArea\", topDto);\n \n return response;\n }", "List<UserPosition> getUserPositionByIdUserAndDate(Long id_user, Date date);", "List<UserPosition> getUserPositionByIdUser(Long id_user, Date date);", "@Override\n public List<Object[]> getStatistics(String owner, StatisticsGroup group, SearchEventType type, String from, String to) {\n String date = parseDateLimit(from, to);\n String groupHQL = this.groupToHQL(group);\n List<Object[]> list = (List<Object[]>) getHibernateTemplate().findByNamedParam(\"select count(*), \"\n + \"count(distinct ipAddress), \" + groupHQL + \" \"\n + \"from SearchEvent \"\n + \"where owner like :owner \"\n + \"and eventType = :type \"\n + date + \" \"\n + \"group by col_2_0_\", new String[]{\"owner\", \"type\"}, new Object[]{owner, type});\n return list;\n }", "public static List<ExpenseReport> getReports(String ownerEmail, String userEmail) {\n ExpenseReportMeta reportMeta = ExpenseReportMeta.get();\n List<ExpenseReport> reports = Datastore.query(reportMeta)\n .filter(reportMeta.ownerEmail.equal(ownerEmail))\n .filter(reportMeta.emailList.equal(userEmail))\n .sort(reportMeta.dateAndTime.desc)\n .asList();\n return reports;\n }", "@Override\n public List<ScheduledInterview> getForPerson(String userId) {\n List<ScheduledInterview> relevantInterviews = new ArrayList<>();\n List<ScheduledInterview> scheduledInterviews = new ArrayList<ScheduledInterview>(data.values());\n scheduledInterviews.sort(\n (ScheduledInterview s1, ScheduledInterview s2) -> {\n if (s1.when().start().equals(s2.when().start())) {\n return 0;\n }\n if (s1.when().start().isBefore(s2.when().start())) {\n return -1;\n }\n return 1;\n });\n\n for (ScheduledInterview scheduledInterview : scheduledInterviews) {\n if (userId.equals(scheduledInterview.interviewerId())\n || userId.equals(scheduledInterview.intervieweeId())\n || userId.equals(scheduledInterview.shadowId())) {\n relevantInterviews.add(scheduledInterview);\n }\n }\n return relevantInterviews;\n }", "public Map<PositionKey, BigDecimal> getAllPositionsAsOf\r\n \t\t(SimpleUser user, Date data)\r\n \t\tthrows PersistenceException;", "@Override\n\tpublic List<PhysicalData> getPhysicalActivity(String username, String date) {\n\t\treturn mobileDao.getPhysicalActivity(username,date);\n\t}", "public BigDecimal getPositionAsOf\r\n \t\t(SimpleUser user, Date data, Instrument instrument)\r\n \t\tthrows PersistenceException;", "public ReportBaseImpl[] getReportsSince\r\n \t\t(SimpleUser user, Date data)\r\n \t\tthrows PersistenceException;", "public SPResponse getOrganizationPlanActivities(User user, Object[] params) {\n \n String userCompany = user.getCompanyId();\n \n SPResponse ertiInsightsResponse = new SPResponse();\n \n OrganizationPlanActivities ertiInsights = spectrumFactory\n .getOrganizationPlanActivities(userCompany);\n \n LOG.debug(\"getOrganizationPlanActivities returened is \" + ertiInsights);\n \n ertiInsightsResponse.add(\"organizationPlanActivities\", ertiInsights);\n ertiInsightsResponse.isSuccess();\n return ertiInsightsResponse;\n }", "private void getDateForAnalysisReport() {\n \tArrayList<Object> answer = new ArrayList<>();\n\t\tanswer.add(\"performingAnActivityTracking\");\n\t\tanswer.add(\"/getActivityData\");\n\t\tString star = reportStartDate.getValue().toString();\n\t\tString end = reportEndDate.getValue().toString();\n\t\tanswer.add(star);\n\t\tanswer.add(end);\n\t\t\n\t\tchs.client.handleMessageFromClientUI(answer);\n\t}", "private void userReport() {\n reportText.appendText(\"Report of appointments per User\\n\\n\");\n for (User user: Data.getUsers()) {\n reportText.appendText(\"\\n\\nUser: \" + user.getUsername() + \"\\n\");\n for (Appointment appointment: Data.getAppointments()) {\n if (appointment.getUser() == user.getId()) {\n reportText.appendText(\"Appointment ID: \" + appointment.getId() +\n \" \\tTitle: \" + appointment.getTitle() +\n \"\\tType: \" + appointment.getType() +\n \"\\tDescription: \" + appointment.getDescription() +\n \"\\tStart: \" + appointment.getStart() +\n \"\\tEnd: \" + appointment.getEnd() +\n \"\\tCustomer: \" + appointment.getCustomer() + \"\\n\");\n }\n System.out.println(\"\\n\\n\");\n }\n }\n\n }", "public List<UserExpenseReport> getUserExpenseReports(String ownerEmail, String userEmail) {\n List<ExpenseReport> reports = getReports(ownerEmail, userEmail);\n List<UserExpenseReport> userList = new ArrayList<UserExpenseReport>();\n for (ExpenseReport report : reports) {\n userList.add(UserExpenseReport.newUserExpenseReport(report, userEmail));\n }\n return userList;\n }", "public String getUserReport(String username)\r\n\t{\r\n\t\tArrayBasedList<LogEntry> subList = new ArrayBasedList<LogEntry>();\r\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t \tLogEntry log = list.get(i);\r\n\t \tif (log.getName().equals(username)) {\r\n\t \t\tsubList.add(log);\r\n\t \t}\r\n\t }\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t sb.append(\"Activity Report for \");\r\n\t sb.append(username);\r\n\t if (subList.size() == 0) {\t\r\n\t\t sb.append(\"[\\n\");\r\n\t \tsb.append(\" No activity was recorded.\\n]\");\r\n\t\t return sb.toString();\r\n\t }\r\n\t SimpleDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy hh:mm:ssaa\", Locale.US);\r\n\t subList.sort();\r\n\t sb.append(\"[\\r\\n\");\r\n\t for (int i = 0; i < subList.size(); i++) {\r\n\t \tsb.append(\" \");\r\n\t \tsb.append(dateFormat.format(subList.get(i).getTime()));\r\n\t \tsb.append(\" - \");\r\n\t \tsb.append(subList.get(i).getActivity());\r\n\t \tsb.append(\"\\r\\n\");\r\n\t }\r\n\t sb.append(\"]\");\r\n\t return sb.toString();\r\n\t}", "public Result listStudyReportIndices(String type) throws Exception {\n UserSession session = getAuthenticatedSession();\n ReportType reportType = (\"participant\".equals(type)) ? ReportType.PARTICIPANT : ReportType.STUDY;\n \n ReportTypeResourceList<? extends ReportIndex> indices = reportService.getReportIndices(session.getStudyIdentifier(), reportType);\n return okResult(indices);\n }", "@Override\n public List<Object[]> getStatistics(String owner, StatisticsGroup group, String from, String to) {\n String date = parseDateLimit(from, to);\n String groupHQL = this.groupToHQL(group);\n List<Object[]> list = (List<Object[]>) getHibernateTemplate().findByNamedParam(\"select count(*), \"\n + \"count(distinct ipAddress), \" + groupHQL + \" \"\n + \"from SearchEvent \"\n + \"where owner like :owner \"\n + date + \" \"\n + \"group by col_2_0_\", \"owner\", owner);\n return list;\n }", "@Override\n public List<ExpenceSummary> getReportsForMonth(String owner,int year, int month) {\n\n AggregationResults<ExpenceSummary> results = operations.aggregate(newAggregation(Expence.class, //\n match(where(\"owner\").is(owner))\n // .andOperator(where(\"date\").lte(LocalDateTime.now())\n //.andOperator(where(\"year(date)\").is(year)\n // .andOperator(where(\"date\").regex(\"2016\")\n // .andOperator(where(\"owner\").is(\"admin\")))\n , //\n // unwind(\"items\"), //\n // project(\"id\", \"customerId\", \"items\") //\n // .andExpression(\"'$items.price' * '$items.quantity'\").as(\"lineTotal\"), //\n project()\n .andExpression(\"type\").as(\"type\")\n .andExpression(\"year(date)\").as(\"year\")\n .andExpression(\"month(date)\").as(\"month\")\n .andExpression(\"amount\").as(\"amount\")\n ,\n match(where(\"year\").is(year)\n .andOperator(where(\"month\").is(month))\n )\n // .andOperator(where(\"date\").lte(LocalDateTime.now())\n //.andOperator(where(\"year(date)\").is(year)\n ,\n group(\"type\",\"year\",\"month\")\n\n // .addToSet(\"type\").as(\"type\")//, //\n // .addToSet(\"year\").as(\"year\")//, //\n // .addToSet(\"month\").as(\"month\")//, //\n .sum(\"amount\").as(\"totalAmount\") //\n .count().as(\"count\")\n // project(\"id\", \"items\", \"netAmount\") //\n // .and(\"orderId\").previousOperation() //\n // .andExpression(\"netAmount * [0]\", 1).as(\"taxAmount\") //\n // .andExpression(\"netAmount * (1 + [0])\", 1).as(\"totalAmount\") //\n ), Expence.class,ExpenceSummary.class);\n logger.info(\"getReportsForMonth results.size=\"+results.getMappedResults().size());\n return results.getMappedResults();\n }", "public GeneListAnalysis[] getGeneListAnalysisResults(int user_id, int gene_list_id, \r\n\t\t\t\t\t\tString analysis_type, DataSource pool) throws SQLException {\r\n Connection conn=null;\r\n SQLException err=null;\r\n GeneListAnalysis[] ret=new GeneListAnalysis[0];\r\n try{\r\n conn=pool.getConnection();\r\n String query =\r\n \t\"select ga.analysis_id, \"+\r\n\t\t\t\"ga.description, \"+\r\n\t\t\t\"gl.gene_list_id, \"+\r\n\t\t\t\"to_char(ga.create_date, 'mm/dd/yyyy hh12:mi AM'), \"+ \r\n\t\t\t\"ga.user_id, \"+\r\n\t\t\t\"to_char(ga.create_date, 'MMddyyyy_hh24miss'), \"+ \r\n\t\t\t\"ga.analysis_type, \"+\r\n\t\t\t\"ga.visible, \"+\r\n \"ga.name, \"+\r\n \"ga.status, \"+\r\n \"ga.path, \"+\r\n\t\t\t\"ga.parameter_group_id \"+\r\n \t\"from gene_list_analyses ga, gene_lists gl \"+ \r\n \t\"where ga.user_id = ? \"+ \r\n\t\t\t\"and ga.gene_list_id = gl.gene_list_id \"+\r\n\t\t\t\"and ga.visible = 1 \"+\r\n\t\t\t\"and ga.analysis_type = ? \";\r\n\t\t\tif (gene_list_id != -99) {\r\n\t\t\t\tquery = query + \"and gl.gene_list_id = ? \";\r\n\t\t\t}\r\n\t\t\tquery = query + \r\n\t\t\t\"order by ga.create_date desc\";\r\n\r\n\t\tlog.debug(\"in getGeneListAnalysisResults\");\r\n\t\t//log.debug(\"query = \" + query);\r\n\t\tList<GeneListAnalysis> myGeneListAnalysisResults = new ArrayList<GeneListAnalysis>();\r\n\r\n\t\tObject[] parameters = new Object[3];\r\n\t\tparameters[0] = user_id;\r\n\t\tparameters[1] = analysis_type;\r\n\t\tif (gene_list_id != -99) {\r\n\t\t\tparameters[2] = gene_list_id;\r\n\t\t}\r\n\t\tResults myResults = new Results(query, parameters, conn);\r\n String[] dataRow;\r\n GeneList curGeneList=new GeneList().getGeneList(gene_list_id, pool);\r\n while ((dataRow = myResults.getNextRow()) != null) {\r\n GeneListAnalysis newGeneListAnalysis = setupGeneListAnalysisValues(dataRow);\r\n\t\t\tnewGeneListAnalysis.setAnalysisGeneList(curGeneList);\r\n myGeneListAnalysisResults.add(newGeneListAnalysis);\r\n }\r\n\t\tmyResults.close();\r\n\r\n\t\tret = myGeneListAnalysisResults.toArray(new GeneListAnalysis[myGeneListAnalysisResults.size()]);\r\n conn.close();\r\n conn=null;\r\n log.debug(\"finished getGeneListAnalysisResults\");\r\n }catch(SQLException e){\r\n err=e;\r\n }finally{\r\n if (conn != null) {\r\n try { conn.close(); } catch (SQLException e) { ; }\r\n conn = null;\r\n if(err!=null){\r\n throw(err);\r\n }\r\n }\r\n log.debug(\"end FINALLY\");\r\n }\r\n return ret;\r\n }", "@Override\n public List<Object[]> getStatistics(String owner, StatisticsGroup group, SearchEventType type) {\n String groupHQL = this.groupToHQL(group);\n List<Object[]> list = (List<Object[]>) getHibernateTemplate().findByNamedParam(\"select count(*), \"\n + \"count(distinct ipAddress), \" + groupHQL + \" \"\n + \"from SearchEvent \"\n + \"where owner like :owner \"\n + \"and eventType = :type \"\n + \"group by col_2_0_\", new String[]{\"owner\", \"type\"}, new Object[]{owner, type});\n return list;\n }", "private List<Summit> visibleSummits(PanoramaParameters p) {\n ArrayList<Summit> visibleSummits = new ArrayList<>();\n for (Summit s : summits) {\n GeoPoint obsPos = p.observerPosition();\n double distanceToSummit = obsPos.distanceTo(s.position());\n double azimuthToSummit = obsPos.azimuthTo(s.position());\n double angularDistanceToSummit = angularDistance(azimuthToSummit, p.centerAzimuth());\n double maxD = p.maxDistance();\n\n // we check if the distance to the sumit is less than the\n // maxDistance and if the angularDistance between the observer and\n // the summit is less than the horizontal field of view divided by\n // two\n if (distanceToSummit <= maxD\n && abs(angularDistanceToSummit) <= p.horizontalFieldOfView()\n / 2.0) {\n ElevationProfile e = new ElevationProfile(cDEM, obsPos,\n azimuthToSummit, distanceToSummit);\n DoubleUnaryOperator f = PanoramaComputer.rayToGroundDistance(e,\n p.observerElevation(), 0);\n double summitElevation = -f.applyAsDouble(distanceToSummit);\n double slope = atan2(summitElevation, distanceToSummit);\n\n // we ckeck if the slope is in the vertical field of view\n if (abs(slope) <= p.verticalFieldOfView() / 2.0) {\n DoubleUnaryOperator f1 = rayToGroundDistance(e, p.observerElevation(), summitElevation / distanceToSummit);\n double rayToGround = firstIntervalContainingRoot(f1, 0,\n distanceToSummit, STEP);\n\n // if the distance with the rayToGround is bigger than\n // distance to sommit minus the tolerance we add the summit\n // to the list\n if (rayToGround >= distanceToSummit - TOLERANCE) {\n visibleSummits.add(s);\n }\n }\n }\n }\n\n visibleSummits.sort((a, b) -> {\n int yARounded = yRounded(a, p);\n int yBRounded = yRounded(b, p);\n if (yARounded == yBRounded) {\n return compare(b.elevation(), a.elevation());\n }\n return compare(yARounded, yBRounded);\n });\n return unmodifiableList(visibleSummits);\n }", "public Map<String, TradeCounter> getCountsOfFriendTrades(String userId, Date lowerDate, Date upperDate) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n Map<String, TradeCounter> map = new HashMap();\n for (String friendId : dataLibrary.getFriendsListForUser(userId)) {\n for (String tradeString : dataLibrary.getTradeTransactionsForUser(friendId)) {\n String[] split = tradeString.split(\",| \");\n Trade trade;\n try {\n trade = new Trade(sdf.parse(split[0]),\n TradeType.valueOf(split[1].toUpperCase()),\n split[2].toUpperCase());\n // there is an assumption the trades are sorted in reverse-chronological order,\n // so skip until end of last week, compute values until start of last week.\n if (trade.getDate().after(upperDate) || trade.getDate().equals(upperDate)) {\n continue;\n }\n if (trade.getDate().before(lowerDate)) {\n break;\n }\n } catch (ParseException ex) {\n LOG.error(\"Could not parse date from string: \" + split[0], ex);\n continue;\n }\n if (!map.containsKey(trade.getTicker())) {\n map.put(trade.getTicker(), new TradeCounter(trade.getTicker()));\n }\n map.get(trade.getTicker()).adjustCount(trade.getDiff());\n }\n }\n return map;\n }", "public List<UserAttendance> getDayAttendance(Date[] dates, SysUser sysUser) {\n return findByQuery(\"from UserAttendance where (checkdate=? or checkdate=? or checkdate=? or checkdate=? or checkdate=? or checkdate=? or checkdate=?) and user.id=? and type is not null order by checkdate, noon\",\n dates[0], dates[1], dates[2], dates[3], dates[4], dates[5], dates[6], sysUser.getId());\n }", "private void appointmentReport() {\n Set<String> types = new HashSet<>();\n Set<Month> months = new HashSet<>();\n HashMap<String, Integer> numberByType = new HashMap<>();\n HashMap<Month, Integer> numberByMonth = new HashMap<>();\n\n for (Appointment appointment: Data.getAppointments()) {\n months.add(appointment.getStart().toLocalDateTime().getMonth());\n types.add(appointment.getType());\n }\n\n for (String type: types) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n\n if (type.equals(appointment.getType())) {\n count++;\n }\n numberByType.put(type, count);\n }\n }\n for (Month month: months) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n if (month.equals(appointment.getStart().toLocalDateTime().getMonth())) {\n count++;\n }\n numberByMonth.put(month, count);\n }\n }\n\n reportText.appendText(\"Report of the number of appointments by type:\\n\\n\");\n reportText.appendText(\"Count \\t\\tType\\n\");\n numberByType.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n reportText.appendText(\"\\n\\n\\nReport of the number of appointments by Month:\\n\\n\");\n reportText.appendText(\"Count \\t\\tMonth\\n\");\n numberByMonth.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n\n }", "public void extractDataForRequestType(int a) {\n ReportRun header = processMonitorList.remove(0);\n\n //adding the header to all the Hire types\n runReportsTypesMap.get(RequestType.IMPORT_HIRE_EMPLOYEE).add(header);\n runReportsTypesMap.get(RequestType.IMPORT_HIRE_EMPLOYEE_DAILY).add(header);\n runReportsTypesMap.get(RequestType.IMPORT_CONTRACT_CONTINGENT_WORKER).add(header);\n runReportsTypesMap.get(RequestType.IMPORT_CONTRACT_CONTINGENT_WORKER_DAILY).add(header);\n //reference for all the hire types\n RequestType requestType = RequestType.IMPORT_HIRE_EMPLOYEE;\n for (ReportRun run : processMonitorList) {\n //first check if its either Import hire or contingent worker\n //then filter with or with out daily\n\n if (run.getRequestType().equals(RequestType.IMPORT_HIRE_EMPLOYEE.getRequestType())) {\n if (isDaily(run)) {\n requestType = RequestType.IMPORT_HIRE_EMPLOYEE_DAILY;\n List<IExcelRow> listOfReports = runReportsTypesMap.get(requestType);\n listOfReports.add(run);\n } else {\n requestType = RequestType.IMPORT_HIRE_EMPLOYEE;\n List<IExcelRow> listOfReports = runReportsTypesMap.get(requestType);\n listOfReports.add(run);\n }\n } else if (run.getRequestType().equals(RequestType.IMPORT_CONTRACT_CONTINGENT_WORKER.getRequestType())) {\n if (isDaily(run)) {\n requestType = RequestType.IMPORT_CONTRACT_CONTINGENT_WORKER_DAILY;\n List<IExcelRow> listOfReports = runReportsTypesMap.get(requestType);\n listOfReports.add(run);\n } else {\n requestType = RequestType.IMPORT_CONTRACT_CONTINGENT_WORKER;\n List<IExcelRow> listOfReports = runReportsTypesMap.get(requestType);\n listOfReports.add(run);\n }\n }\n run.setRequestTypeEnum(requestType);\n }\n\n }", "public List<Statistic> queryPageDataByUserId(Integer startIndex, Integer pagesize, Integer userId) {\n\t\tString sql=\"select * from statistics where user_id=? order by creat_date desc limit ?,?\";\n\t\treturn getList(sql, userId,startIndex,pagesize);\n\t}", "public GeneListAnalysis[] getGeneListAnalysisResults(int user_id, int gene_list_id, \r\n\t\t\t\t\t\tString analysis_type, Connection conn) throws SQLException {\r\n\r\n \tString query =\r\n \t\"select ga.analysis_id, \"+\r\n\t\t\t\"ga.description, \"+\r\n\t\t\t\"gl.gene_list_id, \"+\r\n\t\t\t\"to_char(ga.create_date, 'mm/dd/yyyy hh12:mi AM'), \"+ \r\n\t\t\t\"ga.user_id, \"+\r\n\t\t\t\"to_char(ga.create_date, 'MMddyyyy_hh24miss'), \"+ \r\n\t\t\t\"ga.analysis_type, \"+\r\n\t\t\t\"ga.visible, \"+\r\n \"ga.name, \"+\r\n \"ga.status, \"+\r\n \"ga.path, \"+\r\n\t\t\t\"ga.parameter_group_id \"+\r\n \t\"from gene_list_analyses ga, gene_lists gl \"+ \r\n \t\"where ga.user_id = ? \"+ \r\n\t\t\t\"and ga.gene_list_id = gl.gene_list_id \"+\r\n\t\t\t\"and ga.visible = 1 \"+\r\n\t\t\t\"and ga.analysis_type = ? \";\r\n\t\t\tif (gene_list_id != -99) {\r\n\t\t\t\tquery = query + \"and gl.gene_list_id = ? \";\r\n\t\t\t}\r\n\t\t\tquery = query + \r\n\t\t\t\"order by ga.create_date desc\";\r\n\r\n\t\t//log.debug(\"in getGeneListAnalysisResults\");\r\n\t\t//log.debug(\"query = \" + query);\r\n\t\tList<GeneListAnalysis> myGeneListAnalysisResults = new ArrayList<GeneListAnalysis>();\r\n\r\n\t\tObject[] parameters = new Object[3];\r\n\t\tparameters[0] = user_id;\r\n\t\tparameters[1] = analysis_type;\r\n\t\tif (gene_list_id != -99) {\r\n\t\t\tparameters[2] = gene_list_id;\r\n\t\t}\r\n\t\tResults myResults = new Results(query, parameters, conn);\r\n String[] dataRow;\r\n\r\n while ((dataRow = myResults.getNextRow()) != null) {\r\n GeneListAnalysis newGeneListAnalysis = setupGeneListAnalysisValues(dataRow);\r\n\t\t\tnewGeneListAnalysis.setAnalysisGeneList(new GeneList().getGeneList(newGeneListAnalysis.getGene_list_id(), conn));\r\n myGeneListAnalysisResults.add(newGeneListAnalysis);\r\n }\r\n\t\tmyResults.close();\r\n\r\n\t\tGeneListAnalysis[] myGeneListAnalysisResultArray = (GeneListAnalysis[]) myGeneListAnalysisResults.toArray(\r\n\t\t\t\t\t\t\t\t\t\tnew GeneListAnalysis[myGeneListAnalysisResults.size()]);\r\n\r\n \treturn myGeneListAnalysisResultArray;\r\n\t}", "public Breakdown generateReport(Date startDate, Date endDate, ArrayList<User> userList, double total) {\n\n //INTIATING VARIABLES\n Breakdown result = new Breakdown();\n\n HashMap<String, Breakdown> intenseMap = new HashMap<String, Breakdown>();\n HashMap<String, Breakdown> normalMap = new HashMap<String, Breakdown>();\n HashMap<String, Breakdown> mildMap = new HashMap<String, Breakdown>();\n\n int intenseCount = 0;\n int normalCount = 0;\n int mildCount = 0;\n\n result.addInList(intenseMap);\n result.addInList(normalMap);\n result.addInList(mildMap);\n\n AppUsageDAO auDAO = new AppUsageDAO();\n\n //If it is without demographic, userList is null\n if (userList == null) {\n userList = auDAO.retrieveUsers(startDate, endDate);\n }\n for (int i = 0; i < userList.size(); i++) {\n User currUser = userList.get(i);\n\n //get current user's app usge\n ArrayList<AppUsage> userUsage = auDAO.retrieveByUser(currUser.getMacAddress(), startDate, endDate);\n double totalSeconds = 0;\n\n Date nextDay = new Date(startDate.getTime() + 60 * 60 * 1000 * 24);\n\n Date oldTime = null;\n if (userUsage.size() > 0) {\n oldTime = userUsage.get(0).getDate();\n if (oldTime.after(nextDay)) {\n nextDay = new Date(nextDay.getTime() + 60 * 60 * 1000 * 24);\n }\n }\n\n for (int j = 1; j < userUsage.size(); j++) {\n AppUsage au = userUsage.get(j);\n Date newTime = au.getDate();\n boolean beforeAppeared = false;\n if (newTime.before(nextDay)) {\n beforeAppeared = true;\n //difference between app usage timing\n long difference = Utility.secondsBetweenDates(oldTime, newTime);\n\n //If difference less than/equal 2 minutes\n if (difference <= 2 * 60) {\n // add difference to totalSeconds if <= 2 mins\n totalSeconds += difference;\n } else {\n // add 10sec to totalSeconds if > 2 mins\n totalSeconds += 10;\n }\n\n } else { // NEW TIMING AFTER NEXT DAY\n nextDay = new Date(nextDay.getTime() + 60 * 60 * 1000 * 24);\n\n if (!beforeAppeared) {\n long difference = Utility.secondsBetweenDates(oldTime, newTime);\n if (difference <= 2 * 60) {\n // add difference to totalSeconds if <= 2 mins\n totalSeconds += difference;\n } else {\n // add 10sec to totalSeconds if > 2 mins\n totalSeconds += 10;\n }\n }\n }\n\n oldTime = newTime;\n\n }\n\n if (oldTime.before(nextDay)) {\n long difference = Utility.secondsBetweenDates(oldTime, nextDay);\n if (difference < 10) {\n totalSeconds += difference;\n } else {\n totalSeconds += 10;\n }\n } else {\n totalSeconds += 10;\n }\n\n //DIVIDE TO GET INTO DAYS\n long days = (endDate.getTime() - startDate.getTime()) / (1000 * 60 * 60 * 24) + 1;\n totalSeconds /= days;\n\n //FILTER USER'S USAGE INTO CATEGORIES\n double totalHours = totalSeconds / (60 * 60);\n\n if (totalHours > 0) {\n if (totalHours < 1.0) {\n //MILD\n mildCount++;\n\n } else if (totalHours < 5.0) {\n //NORMAL\n normalCount++;\n\n } else {\n //INTENSE\n intenseCount++;\n\n }\n }\n\n }\n //Calculate percentage\n if (total == -1) {\n total = mildCount + normalCount + intenseCount;\n\n }\n\n int mildPercent = (int) Math.round(mildCount / total * 100);\n int normalPercent = (int) Math.round(normalCount / total * 100);\n int intensePercent = (int) Math.round(intenseCount / total * 100);\n\n //Put in maps\n intenseMap.put(\"intense-count\", new Breakdown(\"\" + intenseCount));\n intenseMap.put(\"intense-percent\", new Breakdown(\"\" + intensePercent));\n\n normalMap.put(\"normal-count\", new Breakdown(\"\" + normalCount));\n normalMap.put(\"normal-percent\", new Breakdown(\"\" + normalPercent));\n\n mildMap.put(\"mild-count\", new Breakdown(\"\" + mildCount));\n mildMap.put(\"mild-percent\", new Breakdown(\"\" + mildPercent));\n\n return result;\n }", "protected List<Params> createViewData(ReceivingPlan[] searchParam, int startPoint, int endPoint, String btnControl)\n throws CommonException\n {\n\n List<Params> outParams = new ArrayList<Params>();\n //Receiving plan search\n ReceivingPlanHandler receivingHandler = new ReceivingPlanHandler(this.getConnection());\n //Stores acquired data\n ReceivingPlanSearchKey searchProgressDateKey = new ReceivingPlanSearchKey();\n\n\n //Gets progress information of the two planned date since there are two display data\n for (int i = startPoint; i < endPoint; i++)\n {\n\n //Clears search keys\n searchProgressDateKey.clear();\n\n //Except \"delete\" status\n searchProgressDateKey.setConsignorCode(searchParam[i].getConsignorCode());\n searchProgressDateKey.setStatusFlag(ReceivingPlan.STATUS_FLAG_DELETE, \"!=\");\n searchProgressDateKey.setPlanDay(searchParam[i].getPlanDay(), \"=\");\n\n searchProgressDateKey.setPlanDayCollect();\n searchProgressDateKey.setPlanQtyCollect(\"SUM\");\n searchProgressDateKey.setResultQtyCollect(\"SUM\");\n searchProgressDateKey.setShortageQtyCollect(\"SUM\");\n\n //Gets Item Master information\n searchProgressDateKey.setJoin(ReceivingPlan.CONSIGNOR_CODE, Item.CONSIGNOR_CODE);\n searchProgressDateKey.setJoin(ReceivingPlan.ITEM_CODE, Item.ITEM_CODE);\n\n //Grouping planned dates\n searchProgressDateKey.setPlanDayGroup();\n\n ReceivingPlan[] searchEntity = (ReceivingPlan[])receivingHandler.find(searchProgressDateKey);\n\n // Seacrh results are zero.\n if (searchEntity.length == 0)\n {\n // 6003011 = \"Target data was not found.\"\n setMessage(\"6003011\");\n return null;\n }\n\n Params param = new Params();\n //Stores acquired information in outParam\n //Planned Date\n param.set(PLAN_DAY, WmsFormatter.toDate(searchEntity[0].getPlanDay()));\n //Planned quantity\n param.set(PLAN_QTY, searchEntity[0].getPlanQty());\n //Received quantity\n param.set(RESULT_QTY, searchEntity[0].getResultQty());\n //Shortage quantity\n param.set(SHORTAGE_QTY, searchEntity[0].getShortageQty());\n //Progress rate : ((Received quantity+Shortage quantity)/Planned quantity)*100\n double progress =\n (((double)(searchEntity[0].getResultQty() + searchEntity[0].getShortageQty()) / searchEntity[0].getPlanQty()) * 100);\n param.set(PROGRESS_RATE, progress);\n\n // Collects and groups Item Code. \n searchProgressDateKey.setCollect(Item.ENTERING_QTY);\n searchProgressDateKey.setItemCodeCollect();\n searchProgressDateKey.setGroup(Item.ENTERING_QTY);\n searchProgressDateKey.setItemCodeGroup();\n\n searchEntity = (ReceivingPlan[])receivingHandler.find(searchProgressDateKey);\n //Detail counts\n param.set(PLAN_ITEM_CNT, searchEntity.length);\n\n //Gets quantity of cases and pieces by the \"pieces of in one case\" of different items.\n //After acquisition, calculates a total.\n int sumPlanCaseQty = 0;\n int sumPlanPieceQty = 0;\n int sumResultCaseQty = 0;\n int sumResultPieceQty = 0;\n\n int planQty = 0;\n int resultQty = 0;\n int enteringQty = 0;\n\n for (int cnt = 0; cnt < searchEntity.length; cnt++)\n {\n planQty = searchEntity[cnt].getPlanQty();\n resultQty = searchEntity[cnt].getResultQty();\n enteringQty = searchEntity[cnt].getBigDecimal(Item.ENTERING_QTY).intValue();\n\n //Planned case quantity\n sumPlanCaseQty += DisplayUtil.getCaseQty(planQty, enteringQty);\n //Received case quantity\n sumResultCaseQty += DisplayUtil.getCaseQty(resultQty, enteringQty);\n\n //Planned pieces quantity\n sumPlanPieceQty += DisplayUtil.getPieceQty(planQty, enteringQty);\n //Received pieces quantity\n sumResultPieceQty += DisplayUtil.getPieceQty(resultQty, enteringQty);\n }\n //Planned case quantity\n param.set(CASE_QTY, sumPlanCaseQty);\n //Received case quantity\n param.set(RESULT_CASE_QTY, sumResultCaseQty);\n //Planned pieces quantity\n param.set(PIECE_QTY, sumPlanPieceQty);\n //Received pieces quantity\n param.set(RESULT_PIECE_QTY, sumResultPieceQty);\n\n // Sets Status flag \"Completion\"\n //Result Detail counts\n searchProgressDateKey.setStatusFlag(ReceivingPlan.STATUS_FLAG_COMPLETION, \"=\");\n param.set(RESULT_ITEM_CNT, receivingHandler.find(searchProgressDateKey).length);\n\n param.set(DETAIL_COUNT, WmsFormatter.getNumFormat(param.getInt(RESULT_ITEM_CNT)) + \"/\"\n + WmsFormatter.getNumFormat(param.getInt(PLAN_ITEM_CNT)));\n \n param.set(CASE_QTY, WmsFormatter.getNumFormat(param.getInt(RESULT_CASE_QTY)) + \"/\"\n + WmsFormatter.getNumFormat(param.getInt(CASE_QTY)));\n \n param.set(RECEIVE_COUNT, WmsFormatter.getNumFormat(param.getInt(RESULT_QTY)) + \"/\"\n + WmsFormatter.getNumFormat(param.getInt(PLAN_QTY)));\n \n param.set(PIECE_QTY, WmsFormatter.getNumFormat(param.getInt(RESULT_PIECE_QTY)) + \"/\"\n + WmsFormatter.getNumFormat(param.getInt(PIECE_QTY)));\n\n //Button control flag\n param.set(BUTTON_CONTROL_FLAG, btnControl);\n //Increment an index for the output array\n\n outParams.add(param);\n\n if (searchParam.length == 1)\n {\n\n break;\n }\n\n }\n\n return outParams;\n }", "public static List<LogEntry> getAllByDates ( final String user, final String startDate, final String endDate ) {\n // Parse the start string for year, month, and day.\n final String[] startDateArray = startDate.split( \"-\" );\n final int startYear = Integer.parseInt( startDateArray[0] );\n final int startMonth = Integer.parseInt( startDateArray[1] );\n final int startDay = Integer.parseInt( startDateArray[2] );\n\n // Parse the end string for year, month, and day.\n final String[] endDateArray = endDate.split( \"-\" );\n final int endYear = Integer.parseInt( endDateArray[0] );\n final int endMonth = Integer.parseInt( endDateArray[1] );\n final int endDay = Integer.parseInt( endDateArray[2] );\n\n // Get calendar instances for start and end dates.\n final Calendar start = Calendar.getInstance();\n start.clear();\n final Calendar end = Calendar.getInstance();\n end.clear();\n\n // Set their values to the corresponding start and end date.\n start.set( startYear, startMonth, startDay );\n end.set( endYear, endMonth, endDay );\n\n // Check if the start date happens after the end date.\n if ( start.compareTo( end ) > 0 ) {\n System.out.println( \"Start is after End.\" );\n // Start is after end, return empty list.\n return new ArrayList<LogEntry>();\n }\n\n // Add 1 day to the end date. EXCLUSIVE boundary.\n end.add( Calendar.DATE, 1 );\n\n\n // Get all the log entries for the currently logged in users.\n final List<LogEntry> all = LoggerUtil.getAllForUser( user );\n // Create a new list to return.\n final List<LogEntry> dateEntries = new ArrayList<LogEntry>();\n\n // Compare the dates of the entries and the given function parameters.\n for ( int i = 0; i < all.size(); i++ ) {\n // The current log entry being looked at in the all list.\n final LogEntry e = all.get( i );\n\n // Log entry's Calendar object.\n final Calendar eTime = e.getTime();\n // If eTime is after (or equal to) the start date and before the end\n // date, add it to the return list.\n if ( eTime.compareTo( start ) >= 0 && eTime.compareTo( end ) < 0 ) {\n dateEntries.add( e );\n }\n }\n // Return the list.\n return dateEntries;\n }", "@TaDaMethod(variablesToTrack = {\"name\", \"race\", \"ssn2\", \"ssn3\",\n\t\t\t\"investmentIncome\", \"investmentIncome\", \"investmentIncome\",\n\t\t\t\"education\", \"ssn4\", \"occupationCode\",\n\t\t\t\"industryCode\", \"weeklyWage\", \"workWeeks\"}, \n\t\t\tcorrespondingDatabaseAttribute = {\"userrecord.name\", \"userrecord.race\", \"education.ssn\", \"investment.ssn\",\n\t\t\t\"investment.CAPITALGAINS\", \"investment.CAPITALLOSSES\", \"investment.STOCKDIVIDENDS\",\n\t\t\t\"education.education\", \"job.ssn\", \"job.INDUSTRYCODE\", \n\t\t\t\"job.OCCUPATIONCODE\", \"job.WEEKWAGE\", \"job.workweeks\"})\n\tpublic EstimateIncomeDTOInterface getValues(int ssn){\n\t\t\n\t\tResultSet results;\n\t\tStatement statement;\n\t\t\n\t\tString ssnString = Integer.toString(ssn);\n\t\t\n\t\tString name = null;\n\t\tString race = null;\n\t\tString education = null;\n\t\tint occupationCode = 0;\n\t\tint industryCode = 0;\n\t\tint weeklyWage = 0;\n\t\tint workWeeks = 0;\n\t\tint investmentIncome = 0;\n\t\t\n\t\ttry{\n\t\t\tstatement = Factory.getConnection().createStatement();\n\t \tresults = statement.executeQuery(\"SELECT SSN, NAME, RACE from userrecord WHERE SSN = \" + ssnString +\"\");\n\t \twhile(results.next()){\n\t \t\tif(results.getInt(\"SSN\") == 0){\n\t \t\t\tcontinue;\n\t \t\t} else {\n\t \t\t\tname = results.getString(\"NAME\");\n\t \t\t\trace = results.getString(\"RACE\");\n\t \t\t}\n\t \t}\n\t \t\n\t \tresults = statement.executeQuery(\"SELECT SSN, EDUCATION from education WHERE SSN = \" + ssnString +\"\");\n\t \twhile(results.next()){\n\t \t\tint ssn2 = results.getInt(\"SSN\");\n\t \t\tif(ssn2 == 0){\n\t \t\t\tcontinue;\n\t \t\t} else {\n\t \t\t\teducation = results.getString(\"EDUCATION\");\n\t \t\t}\n\t \t}\n\t \t\n\t \tresults = statement.executeQuery(\"SELECT SSN, CAPITALGAINS, CAPITALLOSSES, STOCKDIVIDENDS from investment WHERE SSN = \" + ssnString +\"\");\n\t \twhile(results.next()){\n\t \t\tint ssn3 = results.getInt(\"SSN\");\n\t \t\tif(ssn3 == 0){\n\t \t\t\tcontinue;\n\t \t\t} else {\n\t \t\t\tinvestmentIncome = results.getInt(\"CAPITALGAINS\") - results.getInt(\"CAPITALLOSSES\") + results.getInt(\"STOCKDIVIDENDS\");\n\t \t\t}\n\t \t}\n\t \t\n\t \tresults = statement.executeQuery(\"SELECT SSN, INDUSTRYCODE, OCCUPATIONCODE, WEEKWAGE, WORKWEEKS from job WHERE SSN = \" + ssnString +\"\");\n\t \twhile(results.next()){\n\t \t\tint ssn4 = results.getInt(\"SSN\");\n\t \t\tif(ssn4 == 0){\n\t \t\t\tcontinue;\n\t \t\t} else {\n\t \t\toccupationCode = results.getInt(\"INDUSTRYCODE\");\n\t \t\tindustryCode = results.getInt(\"OCCUPATIONCODE\");\n\t \t\tweeklyWage = results.getInt(\"WEEKWAGE\");\n\t \t\tworkWeeks = results.getInt(\"WORKWEEKS\");\n\t \t\t}\n\t \t}\n\n\t\t} catch(SQLException e) {\n\t\t\twhile (e != null) {\n\t\t\t\tSystem.err.println(\"\\n----- SQLException -----\");\n\t\t\t\tSystem.err.println(\" SQL State: \" + e.getSQLState());\n\t\t\t\tSystem.err.println(\" Error Code: \" + e.getErrorCode());\n\t\t\t\tSystem.err.println(\" Message: \" + e.getMessage());\n\t\t\t\t// for stack traces, refer to derby.log or uncomment this:\n\t\t\t\t// e.printStackTrace(System.err);\n\t\t\t\te = e.getNextException();\n\t\t\t}\n\t\t}\n\t\t\t\n \treturn Factory.getEstimateIncomeDTO(name, ssn, race, education,\n \t\t\toccupationCode, industryCode, weeklyWage, workWeeks, investmentIncome);\n \t\n\t}", "public Map<SalePurchase, Payment> viewCreditEntries(String date){\n\t\tMap<SalePurchase, Payment> map = new HashMap<>();\n\t\tList<SalePurchase> spList = new ArrayList<>(salePurchaseEntries.values());\n\t\tList<Payment> paymentList = new ArrayList<>(payments.values());\n\t\tfor(SalePurchase sp : spList){\n\t\t\tif(sp.getDate().equals(date) && sp.getMode().equals(\"Sale\")){\n\t\t\t\tfor(Payment p : paymentList){\n\t\t\t\t\tif(p.getSPId() == sp.getSPId()){\n\t\t\t\t\t\tmap.put(sp, p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "public interface ReportService {\n /**\n * Some constants using in reports\n */\n String[] dashboardSheetNames = {\"Level And Quantity\", \"Level And Trainers\", \"Training And Quantity\"};\n String[] levelAndQuantityColumns = {\"Level\", \"Course Name\", \"Group Name\"};\n String[] levelAndTrainersColumns = {\"Trainer\", \"Course Name and Level\"};\n String[] trainingAndQuantityColumns = {\"Course Name\", \"Group Name\", \"Amount of Employees\"};\n String groupsNotFound = \"No groups to report\";\n String levelException = \"Can't find Level for Id \";\n\n /**\n * @return full attendance report of all courses and their groups\n * @throws IOException if any exception during XSSFWorkbook.write()\n * @see org.apache.poi.xssf.usermodel.XSSFWorkbook\n */\n ByteArrayInputStream getAttendanceExcel() throws IOException;\n\n /**\n * @return attendance report of all groups of current user\n * @param user user object, to get user information\n * @throws IOException if any exception during XSSFWorkbook.write()\n * @see org.apache.poi.xssf.usermodel.XSSFWorkbook\n */\n ByteArrayInputStream getAttendanceExcel(User user) throws IOException;\n\n /**\n * @return attendance report of particular group\n * @param groupId id, to find group in database\n * @throws IOException if any exception during XSSFWorkbook.write()\n * @see org.apache.poi.xssf.usermodel.XSSFWorkbook\n */\n ByteArrayInputStream getAttendanceExcel(Integer groupId) throws IOException;\n\n /**\n * @return dashboard report of all courses, their groups, and users\n * @throws IOException if any exception during XSSFWorkbook.write()\n * @see org.apache.poi.xssf.usermodel.XSSFWorkbook\n */\n ByteArrayInputStream getDashboardExcel() throws IOException;\n}", "Set<VisitedResource> getVisitingStatistic(Date date);", "@Override\r\n\tpublic List<SalesAnalysis> getSalesAnalysis(Date fromDate, Date toDate) {\r\n\t\t\r\n\t\tList<SalesAnalysis> salesAnalysisDetails=new ArrayList<>();\r\n\t\tSalesAnalysis salesAnalysis=new SalesAnalysis();\r\n\t\t\r\n\t\t//get orders placed in the given period\r\n\t\tList<Order> orderDetails=orderService.getOrdersBetween(fromDate, toDate);\r\n\t\t\r\n\t\tHashMap<String, Double> purchasePriceDetails=new HashMap<>();\r\n\t\tHashMap<String, Double> salesPriceDetails=new HashMap<>();\r\n\t\tint qty=0;\r\n\t\tdouble salesPrice=0;\r\n\t\tdouble purchasePrice=0;\r\n\t\t\r\n\t\t//get total revenue for period\r\n\t\tdouble totalRevenue=getTotalRevenueBetween(fromDate, toDate);\r\n\t\t\r\n\t\t//get best seller details for the products, category-wise(from PRODUCT table)\r\n\t\tList<Object[]> bestSellerDetails=productService.getBestSellerId();\r\n\t\tSystem.out.println(bestSellerDetails);\r\n\t\t\r\n\t\t\r\n\t\t//for each product category, check sales details\r\n\t\tfor(Object[] object:bestSellerDetails)\t{\r\n\t\t\tString productCategory=(String)object[0];\r\n\t\t\tsalesPrice=0;\r\n\t\t\tpurchasePrice=0;\r\n\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\r\n\t\t\t//for each order, check product category and add details to maps\r\n\t\t\tfor(Order order:orderDetails)\t{\r\n\t\t\t\t\r\n\t\t\t\t//get products in this order\r\n\t\t\t\tList<CartProduct> products=order.getCart().getCartProducts();\r\n\t\t\t\t\r\n\t\t\t\t//getting purchase price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tpurchasePrice=purchasePriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(product.getProduct().getQuantity()*product.getProduct().getProductPrice());\r\n\t\t\t\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//getting sales price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tqty=product.getQuantity();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsalesPrice=salesPriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(qty*(100-product.getProduct().getDiscount())*product.getProduct().getProductPrice())/100;\r\n\t\t\t\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//make SalesAnalysis object using obtained data\r\n\t\t\tsalesAnalysis.setProductCategory(productCategory);\r\n\t\t\tsalesAnalysis.setMerchant(merchantService.getMerchantName((Integer)object[1]));\r\n\t\t\tsalesAnalysis.setProductQuantity(purchasePriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setProductSales(salesPriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setSalesPercent((salesAnalysis.getProductSales()*100)/salesAnalysis.getProductQuantity());\r\n\t\t\tsalesAnalysis.setTotalRevenue(totalRevenue);\r\n\t\t\t\r\n\t\t\t//make a list of sales analysis performed\r\n\t\t\tsalesAnalysisDetails.add(salesAnalysis);\r\n\t\t}\r\n\t\t\r\n\t\treturn salesAnalysisDetails;\r\n\t}", "public ArrayList<ArrayList<Double>> getReportsFromServer(LocalDate date)\n {\n\t //Go to DB and ask for reports of a specific date\n\t return null;\n }", "public void takeAttendance(BufferedImage image, Map<String, BufferedImage> studentsHere) {\n\t\t// api call in order to get the total number of faces in an image. \n\t\tint total = 0; //api call\n\t\t\n\t\tisPresent = new HashMap<String, Boolean>();\n\t\tfor (String student : studentsHere.keySet()) {\n//\t\t\tif ( /* if student is present */ ) {\n//\t\t\t\tisPresent.put(student, true);\n//\t\t\t\tstudentCount++;\n//\t\t\t} else {\n//\t\t\t\tisPresent.put(student, false);\n//\t\t\t}\n\t\t}\n\t\t// at the end get the total number of students in the image and then see how many left. \n\t\tnotInRoster = total - studentCount;\n\t}", "public Breakdown generateReportByDemo(Date startDate, Date endDate, String[] demoArr) {\n\n //INSTANTIATING VARIABLES\n UserDAO userDAO = new UserDAO();\n AppUsageDAO auDAO = new AppUsageDAO();\n ArrayList<User> userList = auDAO.retrieveUsers(startDate, endDate);\n\n double total = userList.size();\n\n Breakdown result = new Breakdown();\n\n ArrayList<String> schools = Utility.retrieveSchools();\n ArrayList<String> years = Utility.getYears();\n ArrayList<String> genders = Utility.getGenders();\n ArrayList<String> ccas = userDAO.getCCAs();\n Collections.sort(ccas);\n\n ArrayList<String> demo1List = new ArrayList<String>();\n ArrayList<String> demo2List = new ArrayList<String>();\n ArrayList<String> demo3List = new ArrayList<String>();\n ArrayList<String> demo4List = new ArrayList<String>();\n\n String demo1Type = \"\";\n String demo2Type = \"\";\n String demo3Type = \"\";\n String demo4Type = \"\";\n\n int demoCount = demoArr.length;\n if (demoCount > 0) {\n switch (demoArr[0]) {\n case \"gender\":\n demo1List = genders;\n demo1Type = \"gender\";\n break;\n case \"school\":\n demo1List = schools;\n demo1Type = \"school\";\n break;\n case \"year\":\n demo1List = years;\n demo1Type = \"year\";\n break;\n case \"cca\":\n demo1List = ccas;\n demo1Type = \"cca\";\n break;\n }\n }\n if (demoCount > 1) {\n switch (demoArr[1]) {\n case \"gender\":\n demo2List = genders;\n demo2Type = \"gender\";\n break;\n case \"school\":\n demo2List = schools;\n demo2Type = \"school\";\n break;\n case \"year\":\n demo2List = years;\n demo2Type = \"year\";\n break;\n case \"cca\":\n demo2List = ccas;\n demo2Type = \"cca\";\n break;\n }\n }\n if (demoCount > 2) {\n switch (demoArr[2]) {\n case \"gender\":\n demo3List = genders;\n demo3Type = \"gender\";\n break;\n case \"school\":\n demo3List = schools;\n demo3Type = \"school\";\n break;\n case \"year\":\n demo3List = years;\n demo3Type = \"year\";\n break;\n case \"cca\":\n demo3List = ccas;\n demo3Type = \"cca\";\n break;\n }\n }\n if (demoCount > 3) {\n switch (demoArr[3]) {\n case \"gender\":\n demo4List = genders;\n demo4Type = \"gender\";\n break;\n case \"school\":\n demo4List = schools;\n demo4Type = \"school\";\n break;\n case \"year\":\n demo4List = years;\n demo4Type = \"year\";\n break;\n case \"cca\":\n demo4List = ccas;\n demo4Type = \"cca\";\n break;\n }\n }\n\n //For each demo1\n for (String demo1 : demo1List) {\n HashMap<String, Breakdown> demo1Map = new HashMap<String, Breakdown>();\n ArrayList<User> demo1UserList = filterDemo(demo1, demo1Type, userList);\n demo1Map.put(demo1Type, new Breakdown(demo1));\n demo1Map.put(\"count\", new Breakdown(\"\" + demo1UserList.size()));\n Breakdown demo1bd = new Breakdown();\n demo1Map.put(\"breakdown\", demo1bd);\n\n result.addInList(demo1Map);\n\n //For each demo2\n for (String demo2 : demo2List) {\n HashMap<String, Breakdown> demo2Map = new HashMap<String, Breakdown>();\n ArrayList<User> demo2UserList = filterDemo(demo2, demo2Type, demo1UserList);\n demo2Map.put(demo2Type, new Breakdown(demo2));\n demo2Map.put(\"count\", new Breakdown(\"\" + demo2UserList.size()));\n Breakdown demo2bd = new Breakdown();\n demo2Map.put(\"breakdown\", demo2bd);\n\n demo1bd.addInList(demo2Map);\n\n //For each demo3\n for (String demo3 : demo3List) {\n HashMap<String, Breakdown> demo3Map = new HashMap<String, Breakdown>();\n ArrayList<User> demo3UserList = filterDemo(demo3, demo3Type, demo2UserList);\n demo3Map.put(demo3Type, new Breakdown(demo3));\n demo3Map.put(\"count\", new Breakdown(\"\" + demo3UserList.size()));\n Breakdown demo3bd = new Breakdown();\n demo3Map.put(\"breakdown\", demo3bd);\n\n demo2bd.addInList(demo3Map);\n\n//\t\t\t\t\t\n //For each demo4\n for (String demo4 : demo4List) {\n HashMap<String, Breakdown> demo4Map = new HashMap<String, Breakdown>();\n ArrayList<User> demo4UserList = filterDemo(demo4, demo4Type, demo3UserList);\n demo4Map.put(demo4Type, new Breakdown(demo4));\n demo4Map.put(\"count\", new Breakdown(\"\" + demo4UserList.size()));\n\n demo3bd.addInList(demo4Map);\n\n if (demoCount == 4) {\n Breakdown demo4report = generateReport(startDate, endDate, demo4UserList, total);\n demo4Map.put(\"breakdown\", demo4report);\n }\n }\n\n if (demoCount == 3) {\n //generate report if last demo\n Breakdown demo3report = generateReport(startDate, endDate, demo3UserList, total);\n demo3Map.put(\"breakdown\", demo3report);\n }\n\n }\n\n if (demoCount == 2) {\n //generate report if last demo\n Breakdown demo2report = generateReport(startDate, endDate, demo2UserList, total);\n demo2Map.put(\"breakdown\", demo2report);\n\n }\n }\n\n if (demoCount == 1) {\n //generate report if last demo\n Breakdown demo1report = generateReport(startDate, endDate, demo1UserList, total);\n demo1Map.put(\"breakdown\", demo1report);\n }\n }\n\n //CALCULATE PERCENTAGE\n if (demoCount > 0) {\n Breakdown bd1 = result;\n ArrayList<HashMap<String, Breakdown>> list1 = bd1.getBreakdown();\n\n generatePercentage(bd1, total);\n\n }\n\n if (demoCount > 1) {\n ArrayList<HashMap<String, Breakdown>> secondTier = result.getBreakdown();\n for (HashMap<String, Breakdown> secondMap : secondTier) {\n generatePercentage(secondMap.get(\"breakdown\"), total);\n }\n\n }\n if (demoCount > 2) {\n ArrayList<HashMap<String, Breakdown>> secondTier = result.getBreakdown();\n for (HashMap<String, Breakdown> secondMap : secondTier) {\n ArrayList<HashMap<String, Breakdown>> thirdTier = secondMap.get(\"breakdown\").getBreakdown();\n for (HashMap<String, Breakdown> thirdMap : thirdTier) {\n generatePercentage(thirdMap.get(\"breakdown\"), total);\n\n }\n\n }\n }\n if (demoCount > 3) {\n ArrayList<HashMap<String, Breakdown>> secondTier = result.getBreakdown();\n\n for (HashMap<String, Breakdown> secondMap : secondTier) {\n ArrayList<HashMap<String, Breakdown>> thirdTier = secondMap.get(\"breakdown\").getBreakdown();\n for (HashMap<String, Breakdown> thirdMap : thirdTier) {\n ArrayList<HashMap<String, Breakdown>> fourthTier = thirdMap.get(\"breakdown\").getBreakdown();\n for (HashMap<String, Breakdown> fourthMap : fourthTier) {\n generatePercentage(fourthMap.get(\"breakdown\"), total);\n }\n }\n\n }\n }\n\n return result;\n }", "@Override\r\n\tpublic List<Report> getReport(Date from,Date to) {\r\n\t\treturn jdbcTemplate.query(SQLConstants.SQL_SELECT_ALL_FOR_SUPERADMIN_FROM_N_TO, new RowMapper<Report>() {\r\n\t\t\t@Override\r\n\t\t\tpublic Report mapRow(ResultSet rs, int arg1) throws SQLException {\r\n\t\t\t\tReport report = new Report();\r\n\t\t\t\treport.setPaymentId(rs.getInt(1));\r\n\t\t\t\t//change the date format\r\n\t\t\t\treport.setPaymentTime(rs.getDate(2));\r\n\t\t\t\treport.setTransactionId(rs.getInt(3));\r\n\t\t\t\treport.setUserId(rs.getInt(5));\r\n\t\t\t\treport.setPayment_by(rs.getString(6));\r\n\t\t\t\treport.setBank_acc_id(rs.getInt(8));\r\n\t\t\t\treport.setAmount(rs.getInt(9));\r\n\t\t\t\treport.setStatus(rs.getInt(10));\r\n\t\t\t\treturn report;\r\n\t\t\t}\r\n\t\t}, from, to);\r\n\t}", "public Map<String, EnvelopeStatusCode> getEnvelopeStatusesInLastDay(User user) throws DatatypeConfigurationException;", "public SPResponse getErtiInsights(User user, Object[] params) {\n \n String userCompany = user.getCompanyId();\n \n SPResponse ertiInsightsResponse = new SPResponse();\n \n ErtiInsights ertiInsights = spectrumFactory.getErtiInsights(userCompany);\n \n LOG.debug(\"ertiInsights returened is \" + ertiInsights);\n \n ertiInsightsResponse.add(\"ertiInsights\", ertiInsights);\n ertiInsightsResponse.isSuccess();\n return ertiInsightsResponse;\n }", "public void setDataWithDate(Date date, int pos) {\n\t\tif (date == null)\n\t\t\tdate = new Date();\n\n\t\tif(!isAdded())\n\t\t\treturn;\n\n synchronized (LOCK_OBJECT) {\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(date);\n\n int day = calendar.get(Calendar.DAY_OF_MONTH);\n int month = calendar.get(Calendar.MONTH) + 1;\n int year = calendar.get(Calendar.YEAR) - 1900;\n\n long startTime = System.currentTimeMillis();\n\n final List<StatisticalDataHeader> dataHeaders = DataSource.getInstance(getActivity())\n .getReadOperation()\n .query(\"dateStampDay == ? AND dateStampMonth == ? AND dateStampYear == ? AND watchDataHeader == ?\",\n String.valueOf(day), String.valueOf(month), String.valueOf(year),\n String.valueOf(getLifeTrakApplication().getSelectedWatch().getId()))\n .limit(1)\n .getResults(StatisticalDataHeader.class);\n\n mWorkoutCount = 0;\n mSleepMinute = 0;\n\n\n// List<Goal> goals = DataSource.getInstance(getActivity())\n// .getReadOperation()\n// .query(\"watchGoal = ?\", String.valueOf(getLifeTrakApplication().getSelectedWatch().getId()))\n// .orderBy(\"abs(date - \" + date.getTime() + \")\", SORT_ASC)\n// .limit(1)\n// .getResults(Goal.class);\n\n\t\t\tList<Goal> goals = DataSource\n\t\t\t\t\t.getInstance(getActivity())\n\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t.query(\"watchGoal = ? and dateStampDay = ? and dateStampMonth = ? and dateStampYear = ?\",\n\t\t\t\t\t\t\tString.valueOf(getLifeTrakApplication()\n\t\t\t\t\t\t\t\t\t.getSelectedWatch().getId()),\n\t\t\t\t\t\t\tString.valueOf(day), String.valueOf(month),\n\t\t\t\t\t\t\tString.valueOf(year))\n\t\t\t\t\t.orderBy(\"_id\", SORT_DESC)\n\t\t\t\t\t.getResults(Goal.class);\n\n\t\t\tif (goals.size() == 0) {\n\t\t\t\tgoals = DataSource.getInstance(getActivity())\n\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t.query(\"watchGoal = ?\", String.valueOf(getLifeTrakApplication().getSelectedWatch().getId()))\n\t\t\t\t\t\t.orderBy(\"abs(date - \" + date.getTime() + \")\", SORT_ASC)\n\t\t\t\t\t\t.limit(1)\n\t\t\t\t\t\t.getResults(Goal.class);\n\n\t\t\t\tCalendar now = Calendar.getInstance();\n\n\t\t\t\tif(now.get(Calendar.DATE) < calendar.get(Calendar.DATE) ){\n\t\t\t\t\tGoal mGoal = goals.get(0);\n\t\t\t\t\tgoals = DataSource\n\t\t\t\t\t\t\t.getInstance(getActivity())\n\t\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t\t.query(\"watchGoal = ? and dateStampDay = ? and dateStampMonth = ? and dateStampYear = ?\",\n\t\t\t\t\t\t\t\t\tString.valueOf(getLifeTrakApplication()\n\t\t\t\t\t\t\t\t\t\t\t.getSelectedWatch().getId()),\n\t\t\t\t\t\t\t\t\tString.valueOf(mGoal.getDateStampDay()), String.valueOf(mGoal.getDateStampMonth()),\n\t\t\t\t\t\t\t\t\tString.valueOf(mGoal.getDateStampYear()))\n\t\t\t\t\t\t\t.orderBy(\"_id\", SORT_DESC)\n\t\t\t\t\t\t\t.getResults(Goal.class);\n\t\t\t\t}\n\t\t\t}\n\n Goal goal = null;\n\n if(goals.size() > 0)\n goal = goals.get(0);\n\n final int activeTime = activeTimeForDate(date);\n\n if(dataHeaders.size() > 0) {\n StatisticalDataHeader statisticalDataHeader = dataHeaders.get(0);\n\n\n\t\t\t\tif (getLifeTrakApplication().getSelectedWatch().getModel() == WATCHMODEL_R420){\n\t\t\t\t\tList<WorkoutHeader> workoutHeader = DataSource.getInstance(getActivity())\n\t\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t\t.query(\"watchWorkoutHeader == ? AND dateStampDay == ? AND dateStampMonth == ? AND dateStampYear == ?\",\n\t\t\t\t\t\t\t\t\tString.valueOf(getLifeTrakApplication().getSelectedWatch().getId()),\n\t\t\t\t\t\t\t\t\tString.valueOf(day), String.valueOf(month), String.valueOf(year))\n\t\t\t\t\t\t\t.orderBy(\"_id\", SORT_ASC)\n\t\t\t\t\t\t\t.getResults(WorkoutHeader.class);\n\n\t\t\t\t\tmWorkoutCount = workoutHeader.size();\n\n\t\t\t\t\tmWorkoutInfo.setWorkoutValue(workoutHeader.size());\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\tList<WorkoutInfo> workoutInfos = DataSource.getInstance(getActivity())\n\t\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t\t.query(\"watchWorkoutInfo == ? AND dateStampDay == ? AND dateStampMonth == ? AND dateStampYear == ?\",\n\t\t\t\t\t\t\t\t\tString.valueOf(getLifeTrakApplication().getSelectedWatch().getId()),\n\t\t\t\t\t\t\t\t\tString.valueOf(day), String.valueOf(month), String.valueOf(year))\n\t\t\t\t\t\t\t.orderBy(\"_id\", SORT_ASC)\n\t\t\t\t\t\t\t.getResults(WorkoutInfo.class);\n\n\n\t\t\t\t\tList<WorkoutInfo> spillOverWorkoutInfos = getSpillOverWorkoutFromPreviousDay(date);\n\t\t\t\t\tif (spillOverWorkoutInfos != null && spillOverWorkoutInfos.size() > 0) {\n\t\t\t\t\t\tworkoutInfos.addAll(spillOverWorkoutInfos);\n\t\t\t\t\t}\n\n\t\t\t\t\t//add today's workout\n\t\t\t\t\tif (workoutInfos.size() > 0) {\n\t\t\t\t\t\t//filter spill over for next day\n\t\t\t\t\t\tworkoutInfos = getWorkoutInfosWithoutNextDaySpillOver(workoutInfos);\n\t\t\t\t\t}\n\n\t\t\t\t\tmWorkoutCount = workoutInfos.size();\n\n\t\t\t\t\tmWorkoutInfo.setWorkoutValue(workoutInfos.size());\n\t\t\t\t}\n\n\t\t\t\tfinal List<Number> avgHeartRates = DataSource.getInstance(getActivity())\n\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t.query(\"dataHeaderAndPoint == ? AND averageHR > 0\", String.valueOf(statisticalDataHeader.getId()))\n\t\t\t\t\t\t.getResults(StatisticalDataPoint.class, \"avg(averageHR) averageHR\");\n\n\t\t\t\tavgAverage.clear();\n\n if(avgHeartRates.size() > 0) {\n float averageHeartRate = avgHeartRates.get(0).floatValue();\n mAverageHeartRate.setValue(averageHeartRate);\n mAverageHeartRate.setPercent(percentForAverageBPM((int) averageHeartRate));\n\n\t\t\t\t\tif (averageHeartRate> 0 )\n\t\t\t\t\tavgAverage.add(averageHeartRate);\n\n\t\t\t\t\t//if (averageHeartRate == 0){\n\t\t\t\t\t\tif (getLifeTrakApplication().getSelectedWatch().getModel() == WATCHMODEL_R420) {\n\t\t\t\t\t\t\tList<WorkoutHeader> workoutHeader = DataSource.getInstance(getActivity())\n\t\t\t\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t\t\t\t.query(\"watchWorkoutHeader == ? AND dateStampDay == ? AND dateStampMonth == ? AND dateStampYear == ?\",\n\t\t\t\t\t\t\t\t\t\t\tString.valueOf(getLifeTrakApplication().getSelectedWatch().getId()),\n\t\t\t\t\t\t\t\t\t\t\tString.valueOf(day), String.valueOf(month), String.valueOf(year))\n\t\t\t\t\t\t\t\t\t.orderBy(\"_id\", SORT_ASC)\n\t\t\t\t\t\t\t\t\t.getResults(WorkoutHeader.class);\n\t\t\t\t\t\t\tif (workoutHeader.size() > 0) {\n\t\t\t\t\t\t\t\tfloat avgHeartRate = 0;\n\t\t\t\t\t\t\t\tfloat sum = 0;\n\t\t\t\t\t\t\t\tfloat sumLength = 0;\n\t\t\t\t\t\t\t\tfor (int b = 0; b < workoutHeader.size(); b++) {\n\t\t\t\t\t\t\t\t\ttrueValuesHR.clear();\n\t\t\t\t\t\t\t\t\tWorkoutHeader workoutHeader1 = workoutHeader.get(b);\n\t\t\t\t\t\t\t\t\tString heartRate = workoutHeader1.getHeaderHeartRate();\n\t\t\t\t\t\t\t\t\tint hrLogRate = workoutHeader1.getLogRateHR();\n\t\t\t\t\t\t\t\t\tint hour = workoutHeader1.getTimeStampHour();\n\t\t\t\t\t\t\t\t\tint minute = workoutHeader1.getTimeStampMinute();\n\t\t\t\t\t\t\t\t\tint sec = workoutHeader1.getTimeStampSecond();\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tJSONArray jsonArray = new JSONArray(heartRate);\n\n\t\t\t\t\t\t\t\t\t\tfor (int i = 0; i < jsonArray.length(); ++i) {\n\t\t\t\t\t\t\t\t\t\t\tfor (int y = 0; y < hrLogRate; y ++){\n\t\t\t\t\t\t\t\t\t\t\t\ttrueValuesHR.add(jsonArray.optInt(i));\n\t\t\t\t\t\t\t\t\t\t\t\tsum = sum + jsonArray.optInt(i);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\tint[] numbers = Ints.toArray(trueValuesHR);\n\n\n\t\t\t\t\t\t\t\t\t\tint startingTime = (hour * 3600) + (minute * 60) + sec;\n\t\t\t\t\t\t\t\t\t\tint plotIndex = startingTime / 600;\n\t\t\t\t\t\t\t\t\t\tif ((startingTime % 600) != 0)\n\t\t\t\t\t\t\t\t\t\t\tplotIndex++;\n\t\t\t\t\t\t\t\t\t\tint startingTimeInTenMinutes = startingTime / 600;\n\n\n\t\t\t\t\t\t\t\t\t\tfloat sum10Min = 0;\n\t\t\t\t\t\t\t\t\t\tfloat average10Min = 0;\n\n\n\n\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.clear();\n\n\t\t\t\t\t\t\t\t\t\tint valueMinus = 0;\n\t\t\t\t\t\t\t\t\t\tint overAllMinus = 0;\n\t\t\t\t\t\t\t\t\t\tfor (int a = 0; a < 144; a++){\n\t\t\t\t\t\t\t\t\t\t\tif (a == startingTimeInTenMinutes){\n\t\t\t\t\t\t\t\t\t\t\t\tvalueMinus = ((startingTimeInTenMinutes + 1) * 600) - startingTime;\n\t\t\t\t\t\t\t\t\t\t\t\tif (mHeartRateIndex.size() == 0){\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (valueMinus > numbers.length){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.add(numbers.length);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\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\tmHeartRateIndex.add(valueMinus);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\toverAllMinus = overAllMinus + valueMinus;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartingTimeInTenMinutes ++;\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}\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\tif (overAllMinus < numbers.length){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalueMinus = valueMinus - overAllMinus;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.add(valueMinus);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\toverAllMinus = overAllMinus + valueMinus;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartingTimeInTenMinutes++;\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\toverAllMinus = overAllMinus - 600;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (overAllMinus > 0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ((numbers.length - overAllMinus) < 60){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.remove(mHeartRateIndex.size()- 1);\n\t\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\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.set((mHeartRateIndex.size() - 1), (numbers.length - overAllMinus));\n\t\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\t\t//mHeartRateIndex.set((mHeartRateIndex.size() - 1), (numbers.length - overAllMinus));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse{\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\tbreak;\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}\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\n\t\t\t\t\t\t\t\t\t\tint valueOverAll = 0;\n\t\t\t\t\t\t\t\t\t\tint index = 0;\n\t\t\t\t\t\t\t\t\t\tfor (int i = 0; i < mHeartRateIndex.size() ; i++){\n\t\t\t\t\t\t\t\t\t\t\tint valueEnding = mHeartRateIndex.get(i);\n\n\n\t\t\t\t\t\t\t\t\t\t\tfor (int y = 0; y < valueEnding; y++){\n\t\t\t\t\t\t\t\t\t\t\t\tif (numbers[y + valueOverAll] > 0){\n\t\t\t\t\t\t\t\t\t\t\t\t\tsum10Min = sum10Min + numbers[y + valueOverAll];\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex++;\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\tvalueOverAll = valueOverAll + valueEnding;\n\t\t\t\t\t\t\t\t\t\t\taverage10Min = sum10Min / index;\n\t\t\t\t\t\t\t\t\t\t\tavgAverage.add((float)average10Min);\n\t\t\t\t\t\t\t\t\t\t\tsum10Min = 0;\n\t\t\t\t\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\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 (avgAverage.size() > 0){\n\n\t\t\t\t\t\t\t\t\tfloat sumTotal = 0;\n\t\t\t\t\t\t\t\t\tfloat sumTotalAVG = 0;\n\t\t\t\t\t\t\t\t\tint index = 0;\n\t\t\t\t\t\t\t\t\tfor (int i = 0; i < avgAverage.size(); i++){\n\t\t\t\t\t\t\t\t\t\tif (avgAverage.get(i) > 0) {\n\t\t\t\t\t\t\t\t\t\t\tsumTotal = sumTotal + avgAverage.get(i);\n\t\t\t\t\t\t\t\t\t\t\tindex++;\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\tsumTotalAVG = sumTotal / index;\n\t\t\t\t\t\t\t\t\tmAverageHeartRate.setValue(sumTotalAVG);\n\t\t\t\t\t\t\t\t\tif (sumTotalAVG > 0)\n\t\t\t\t\t\t\t\t\t\tmAverageHeartRate.setPercent(percentForAverageBPM((int) sumTotalAVG));\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\tmAverageHeartRate.setValue(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//}\n\n\n } else {\n\t\t\t\t\tif (getLifeTrakApplication().getSelectedWatch().getModel() == WATCHMODEL_R420){\n\t\t\t\t\t\tList<WorkoutHeader> workoutHeader = DataSource.getInstance(getActivity())\n\t\t\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t\t\t.query(\"watchWorkoutHeader == ? AND dateStampDay == ? AND dateStampMonth == ? AND dateStampYear == ?\",\n\t\t\t\t\t\t\t\t\t\tString.valueOf(getLifeTrakApplication().getSelectedWatch().getId()),\n\t\t\t\t\t\t\t\t\t\tString.valueOf(day), String.valueOf(month), String.valueOf(year))\n\t\t\t\t\t\t\t\t.orderBy(\"_id\", SORT_ASC)\n\t\t\t\t\t\t\t\t.getResults(WorkoutHeader.class);\n\t\t\t\t\t\tif (workoutHeader.size() > 0){\n\t\t\t\t\t\t\tfloat avgHeartRate = 0;\n\t\t\t\t\t\t\tfloat sum = 0;\n\t\t\t\t\t\t\tfloat sumLength = 0;\n\t\t\t\t\t\t\tfor (int b = 0; b < workoutHeader.size(); b++) {\n\t\t\t\t\t\t\t\ttrueValuesHR.clear();\n\t\t\t\t\t\t\t\tWorkoutHeader workoutHeader1 = workoutHeader.get(b);\n\t\t\t\t\t\t\t\tString heartRate = workoutHeader1.getHeaderHeartRate();\n\t\t\t\t\t\t\t\tint hrLogRate = workoutHeader1.getLogRateHR();\n\t\t\t\t\t\t\t\tint hour = workoutHeader1.getTimeStampHour();\n\t\t\t\t\t\t\t\tint minute = workoutHeader1.getTimeStampMinute();\n\t\t\t\t\t\t\t\tint sec = workoutHeader1.getTimeStampSecond();\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tJSONArray jsonArray = new JSONArray(heartRate);\n\n\t\t\t\t\t\t\t\t\tfor (int i = 0; i < jsonArray.length(); ++i) {\n\t\t\t\t\t\t\t\t\t\tfor (int y = 0; y < hrLogRate; y ++){\n\t\t\t\t\t\t\t\t\t\t\ttrueValuesHR.add(jsonArray.optInt(i));\n\t\t\t\t\t\t\t\t\t\t\tsum = sum + jsonArray.optInt(i);\n\t\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\tint[] numbers = Ints.toArray(trueValuesHR);\n\n\n\t\t\t\t\t\t\t\t\tint startingTime = (hour * 3600) + (minute * 60) + sec;\n\t\t\t\t\t\t\t\t\tint plotIndex = startingTime / 600;\n\t\t\t\t\t\t\t\t\tif ((startingTime % 600) != 0)\n\t\t\t\t\t\t\t\t\t\tplotIndex++;\n\t\t\t\t\t\t\t\t\tint startingTimeInTenMinutes = startingTime / 600;\n\n\n\t\t\t\t\t\t\t\t\tfloat sum10Min = 0;\n\t\t\t\t\t\t\t\t\tfloat average10Min = 0;\n\n\n\n\t\t\t\t\t\t\t\t\tmHeartRateIndex.clear();\n\n\t\t\t\t\t\t\t\t\tint valueMinus = 0;\n\t\t\t\t\t\t\t\t\tint overAllMinus = 0;\n\t\t\t\t\t\t\t\t\tfor (int a = 0; a < 144; a++){\n\t\t\t\t\t\t\t\t\t\tif (a == startingTimeInTenMinutes){\n\t\t\t\t\t\t\t\t\t\t\tvalueMinus = ((startingTimeInTenMinutes + 1) * 600) - startingTime;\n\t\t\t\t\t\t\t\t\t\t\tif (mHeartRateIndex.size() == 0){\n\t\t\t\t\t\t\t\t\t\t\t\tif (valueMinus > numbers.length){\n\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.add(numbers.length);\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\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\tmHeartRateIndex.add(valueMinus);\n\t\t\t\t\t\t\t\t\t\t\t\t\toverAllMinus = overAllMinus + valueMinus;\n\t\t\t\t\t\t\t\t\t\t\t\t\tstartingTimeInTenMinutes ++;\n\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}\n\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\tif (overAllMinus < numbers.length){\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalueMinus = valueMinus - overAllMinus;\n\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.add(valueMinus);\n\t\t\t\t\t\t\t\t\t\t\t\t\toverAllMinus = overAllMinus + valueMinus;\n\t\t\t\t\t\t\t\t\t\t\t\t\tstartingTimeInTenMinutes++;\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\toverAllMinus = overAllMinus - 600;\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (overAllMinus > 0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ((numbers.length - overAllMinus) < 60){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.remove(mHeartRateIndex.size()- 1);\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\tmHeartRateIndex.set((mHeartRateIndex.size() - 1), (numbers.length - overAllMinus));\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\t//mHeartRateIndex.set((mHeartRateIndex.size() - 1), (numbers.length - overAllMinus));\n\t\t\t\t\t\t\t\t\t\t\t\t\telse{\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\tbreak;\n\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}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tint valueOverAll = 0;\n\t\t\t\t\t\t\t\t\tint index = 0;\n\t\t\t\t\t\t\t\t\tfor (int i = 0; i < mHeartRateIndex.size() ; i++){\n\t\t\t\t\t\t\t\t\t\tint valueEnding = mHeartRateIndex.get(i);\n\n\t\t\t\t\t\t\t\t\t\tint minValues= 240;\n\t\t\t\t\t\t\t\t\t\tint maxValues= 0;\n\t\t\t\t\t\t\t\t\t\tfor (int y = 0; y < valueEnding; y++){\n\t\t\t\t\t\t\t\t\t\t\tif (numbers[y + valueOverAll] > 0){\n\t\t\t\t\t\t\t\t\t\t\t\tsum10Min = sum10Min + numbers[y + valueOverAll];\n\t\t\t\t\t\t\t\t\t\t\t\tif (minValues > numbers[y + valueOverAll]){\n\t\t\t\t\t\t\t\t\t\t\t\t\tminValues = numbers[y + valueOverAll];\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 (maxValues < numbers[y + valueOverAll]){\n\t\t\t\t\t\t\t\t\t\t\t\t\tmaxValues = numbers[y + valueOverAll];\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\tindex++;\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\tvalueOverAll = valueOverAll + valueEnding;\n\t\t\t\t\t\t\t\t\t\taverage10Min = sum10Min / index;\n\t\t\t\t\t\t\t\t\t\tavgAverage.add(average10Min);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (avgAverage.size() > 0){\n\n\t\t\t\t\t\t\t\tfloat sumTotal = 0;\n\t\t\t\t\t\t\t\tfloat sumTotalAVG = 0;\n\t\t\t\t\t\t\t\tint index = 0;\n\t\t\t\t\t\t\t\tfor (int i = 0; i < avgAverage.size(); i++){\n\t\t\t\t\t\t\t\t\tif (avgAverage.get(i) > 0) {\n\t\t\t\t\t\t\t\t\t\tsumTotal = sumTotal + avgAverage.get(i);\n\t\t\t\t\t\t\t\t\t\tindex++;\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\tsumTotalAVG = sumTotal / index;\n\t\t\t\t\t\t\t\tmAverageHeartRate.setValue(sumTotalAVG);\n\t\t\t\t\t\t\t\tif (sumTotalAVG > 0)\n\t\t\t\t\t\t\t\t\tmAverageHeartRate.setPercent(percentForAverageBPM((int) sumTotalAVG));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tmAverageHeartRate.setValue(0);\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\tmAverageHeartRate.setValue(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n \t mAverageHeartRate.setValue(0);\n }\n\n mActigraphy.setHourValue(activeTime / 60);\n mActigraphy.setMinuteValue(activeTime % 60);\n\n String query = \"select sum(distance) distance, sum(steps) steps, sum(calorie) calorie from StatisticalDataPoint sdp \" +\n \"inner join StatisticalDataHeader sdh on sdp.dataHeaderAndPoint = sdh._id \" +\n \"where watchDataHeader == ? AND dateStampDay == ? AND dateStampMonth == ? AND dateStampYear == ?\";\n\n Cursor cursor = DataSource.getInstance(getActivity())\n .getReadOperation()\n .rawQuery(query, String.valueOf(getLifeTrakApplication().getSelectedWatch().getId()),\n String.valueOf(day), String.valueOf(month), String.valueOf(year));\n\n if (cursor.moveToFirst()) {\n mCalorieMetric.setProgressGoal(goal.getCalorieGoal());\n mCalorieMetric.setProgressValue(cursor.getFloat(cursor.getColumnIndex(\"calorie\")));\n\n mStepsMetric.setProgressGoal(goal.getStepGoal());\n mStepsMetric.setProgressValue(cursor.getFloat(cursor.getColumnIndex(\"steps\")));\n\n mDistanceMetric.setProgressGoal((float) goal.getDistanceGoal());\n mDistanceMetric.setProgressValue(cursor.getFloat(cursor.getColumnIndex(\"distance\")));\n mDistanceMetric.setUnitSystem(getLifeTrakApplication().getUserProfile().getUnitSystem());\n }\n\n\n\n\n\n mSleepMetric.setProgressValue(statisticalDataHeader.getTotalSleep());\n\n if (getLifeTrakApplication().getSelectedWatch().getModel() == WATCHMODEL_R415) {\n\t\t\t\t\tif (pos == 1) {\n\t\t\t\t\t\tmLightExposure.setProgressValue(statisticalDataHeader.getLightExposure());\n\t\t\t\t\t\tif (goal.getBrightLightGoal() < 10) {\n\t\t\t\t\t\t\tgoal.setBrightLightGoal(10);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmLightExposure.setProgressGoal(goal.getBrightLightGoal());\n\t\t\t\t\t}\n\n }\n\n mSleepMetric.setProgressValue(mTotalSleepTime);\n } else {\n mAverageHeartRate.setValue(0);\n mStepsMetric.setProgressValue(0);\n mDistanceMetric.setProgressValue(0);\n mCalorieMetric.setProgressValue(0);\n mSleepMetric.setProgressValue(0);\n mWorkoutInfo.setWorkoutValue(0);\n\t\t\t\tmActigraphy.setHourValue(0);\n mActigraphy.setMinuteValue(0);\n mSleepMetric.setProgressValue(0);\n mLightExposure.setProgressValue(0);\n }\n\n if (mSleepMetric != null && goal != null)\n mSleepMetric.setProgressGoal(goal.getSleepGoal());\n\n mAverageHeartRate.setDate(date);\n mSleepMetric.setDate(date);\n mWorkoutInfo.setDate(date);\n mActigraphy.setDate(date);\n\n mAdapter.notifyDataSetChanged();\n }\n\t\n\t\t\n\t}", "private void statisticsReportList(int userGroupID) {\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(\"select * from reports where user_group_id=\" + userGroupID + \" order by week asc\");\n\t\t\t//create table\n\t\t\tout.println(\"<form name=\" + formElement(\"input\") + \" method=\" + formElement(\"post\")+ \">\");\n\t\t\tout.println(\"<h1>Time Reports - Statistics</h1>\");\n\t\t\tout.println(\"<p>Select time reports that you want to summerize and click view</p>\");\n\t\t out.println(\"<table border=\" + formElement(\"1\") + \">\");\n\t\t out.println(\"<tr><td>Selection</td><td>Last update</td><td>Week</td><td>Total Time</td><td>Signed</td></tr>\");\n\t\t int inWhile = 0; \n\t \tint nbrOfReports = 0;\n\t\t while(rs.next()){\n\t\t \tnbrOfReports++;\n\t\t \tinWhile = 1;\n\t\t \tString reportID = \"\"+rs.getInt(\"ID\");\n\t\t\t\tDate date = rs.getDate(\"date\");\n\t\t\t\tint week = rs.getInt(\"week\");\n\t\t\t\tint totalTime = rs.getInt(\"total_time\");\n\t\t\t\tint signed = rs.getInt(\"signed\");\n\t\t\t\t//print in box\n\t\t\t\tout.println(\"<tr>\");\n\t\t\t\tout.println(\"<td>\" + \"<input type=\" + formElement(\"checkbox\") + \" name=\" + formElement(\"reportIDs\"+nbrOfReports) +\n\t\t\t\t\t\t\" value=\" + formElement(reportID) +\"></td>\");\t\t//radiobutton\n\t\t\t\tout.println(\"<td>\" + date.toString() + \"</td>\");\n\t\t\t\tout.println(\"<td>\" + week + \"</td>\");\n\t\t\t\tout.println(\"<td>\" + totalTime + \"</td>\");\n\t\t\t\tout.println(\"<td>\" + signString(signed) + \"</td>\");\n\t\t\t\tout.println(\"</tr>\");\n\t\t\t}\n\t\t out.println(\"</table>\");\n\t\t out.println(\"<button type=\" + formElement(\"submit\") + \"name='submitStatistics' value=\"+ nbrOfReports +\">View </button>\");\n\t\t out.println(\"</form>\");\n\t\t if (inWhile == 0){\n\t\t \tout.println(\"No reports to show\");\n\t\t }\n\t\t} catch(SQLException e) {\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t}\t\n\t}", "List<ReportSummary> getReportSummary(String reportType);", "public ArrayList<Double> search_current(String user_id, String date) {\n\t\tArrayList<Double> current_info = new ArrayList<Double>(); // store the query result from current table\n\t\ttry {\n\t\t\t//connect\n\t\t\tConnection connection = this.getConnection();\n\t\t\tPreparedStatement stmt = connection.prepareStatement(\"SELECT protein, energy, fiber, price FROM diet_conclusion where id = ? AND date = ?\");\n\t\t\tstmt.setString(1, user_id);\n\t\t\tstmt.setString(2, date);\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tcurrent_info.add(rs.getDouble(3));//fiber\n\t\t\t\tcurrent_info.add(rs.getDouble(2));//energy\n\t\t\t\tcurrent_info.add(rs.getDouble(1));//protein\n\t\t\t\tcurrent_info.add(rs.getDouble(4));//price\n\t\t\t}\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tconnection.close();\n\t\t} catch (Exception e) {\n\t\t\tlog.info(\"query error for search_current: {}\", e.toString());\n\t\t}\n\n\t\treturn current_info;//can be null\n\n\t}", "public List<Stats> findStatsPerTime(String date) {\n\t\treturn null;\r\n\t}", "Set<TimeJournalBean> findUserActivityByDate(Date date, Employee employee);", "@Override\r\n\tpublic StandingDataPO getDatasOfDailyStandingPlayers(Season season, String date, PlayerData dataType) {\n\t\t\r\n\t\tArrayList<MatchPO> matches = SeasonListPO.getMatchesOfOneDay(season,date);\r\n\t\tif(matches.size()==0)\r\n\t\t\treturn null;\r\n\t\tArrayList<PlayerDataOfOneMatchPO> datas=new ArrayList<>();\r\n\t\tfor(MatchPO oneMatch : matches){\r\n\t\t\tdatas.addAll(oneMatch.getFirstTeam_PlayerData());\r\n\t\t\tdatas.addAll(oneMatch.getSecondTeam_PlayerData());\r\n\t\t}\r\n\t\tCollections.sort(datas,new PlayerDataComparator(dataType));\r\n\t\t\r\n\t\tdouble standingData = 0 ;\r\n\t\tswitch(dataType){\r\n\t\tcase score:\r\n\t\t\t\tstandingData=datas.get(0).getScoreOfOneMatch();\r\n\t\t\tbreak;\r\n\t\tcase numberOfRebound:\r\n\t\t\t\tstandingData=datas.get(0).getNumberOfReboundOfOneMatch();\r\n\t\t\tbreak;\r\n\t\tcase numberOfAssist:\r\n\t\t\t\tstandingData=datas.get(0).getNumberOfAssistOfOneMatch();\r\n\t\t\tbreak;\r\n\t\tcase numberOfBlock:\r\n\t\t\t\tstandingData=datas.get(0).getNumberOfBlockOfOneMatch();\r\n\t\t\tbreak;\r\n\t\tcase numberOfSteal:\r\n\t\t\t\tstandingData=datas.get(0).getNumberOfSteal();\r\n\t\t}\r\n\t\tPlayerDataOfOneMatchPO oneMatchData=datas.get(0);\r\n\t\tPlayerPO thePlayer=PlayerListPO.findPlayerAccurately(oneMatchData.getName());\r\n\t\tStandingDataPO standingDataPO = new StandingDataPO(thePlayer.getName(), thePlayer.getPosition(), \r\n\t\t\t\t\tthePlayer.getTeam(season),standingData);\r\n\t\t\r\n\t\treturn standingDataPO;\r\n\t}", "public SPResponse getErtiAnalytics(User user, Object[] params) {\n \n String userCompany = user.getCompanyId();\n \n SPResponse ertiInsightsResponse = new SPResponse();\n \n ErtiAnalytics ertiAnalytics = spectrumFactory.getErtiAnalytics(userCompany);\n \n LOG.debug(\"erti analytics returened is \" + ertiAnalytics);\n \n ertiInsightsResponse.add(\"ertiAnalytics\", ertiAnalytics);\n ertiInsightsResponse.isSuccess();\n return ertiInsightsResponse;\n }", "List<LoginCompStatisticBean> findLoginCompStatisticData(\n\t\t\tList<Filter> filters, SysUserVo userInfo) throws BaseException;", "public List findRecordsFrom(String informationType, Date date) throws DatabaseException;", "public JSONArray getSupervisorReportsData(final String startDate, final String toDate) throws Exception {\n\t\tfinal String endDate = toDate + \" 23:59:59\";\n\t\tfinal List<Object[]> entities = workListDao.getWorklistDataForSupervisorReport(startDate, endDate);\n\t\tfinal JSONArray jsonArray = new JSONArray();\n\t\tfor (Object[] entity : entities) {\n\t\t\tconstructJsonArray(entity, jsonArray);\n\t\t}\n\t\treturn jsonArray;\n\t}", "protected List<Params> setViewData(ScheduleParams searchParam)\n throws CommonException\n {\n\n List<Params> outParams = new ArrayList<Params>();\n\n //Receiving plan search\n ReceivingPlanHandler receivingHandler = new ReceivingPlanHandler(this.getConnection());\n ReceivingPlanSearchKey searchKey = new ReceivingPlanSearchKey();\n\n //Collects by planned receiving date\n searchKey.setPlanDayCollect();\n searchKey.setConsignorCodeCollect();\n searchKey.setPlanDayGroup();\n searchKey.setConsignorCodeGroup();\n searchKey.setStatusFlag(ReceivingPlan.STATUS_FLAG_DELETE, \"!=\");\n searchKey.setConsignorCode(searchParam.getString(CONSIGNOR_CODE));\n searchKey.setPlanDayOrder(true);\n\n //Button controls\n String btnControl = buttonContlor(searchParam);\n\n //When a display button on an initial or auto display is pushed \n if (ReceivingInParameter.PROCESS_FLAG_VIEW.equals(searchParam.get(PROCESS_FLAG)))\n {\n //Search condition\n searchKey.setPlanDay(searchParam.getString(PLAN_DAY), \">=\");\n }\n //When the next button is pushed\n else if (ReceivingInParameter.PROCESS_FLAG_NEXT_PAGE.equals(searchParam.get(PROCESS_FLAG)))\n {\n //Gets two planned date data that are greater than a standard date (the lower section)\n searchKey.setPlanDay(searchParam.getString(PLAN_DAY), \">\");\n }\n //When the previous button is pushed\n else if (ReceivingInParameter.PROCESS_FLAG_PREVIOUS_PAGE.equals(searchParam.get(PROCESS_FLAG)))\n {\n //Gets two planned date data that are smaller than a standard date (the upper section)\n searchKey.setPlanDay(searchParam.getString(PLAN_DAY), \"<\");\n }\n\n ReceivingPlan[] searchPlanDayEntity = (ReceivingPlan[])receivingHandler.find(searchKey);\n\n //Initializes an array-acquisition-search position\n int start = 0;\n int end = 2;\n\n //When the previous button is pushed\n if (searchPlanDayEntity.length == 0)\n {\n return outParams;\n }\n else if (ReceivingInParameter.PROCESS_FLAG_PREVIOUS_PAGE.equals(searchParam.get(PROCESS_FLAG))\n && searchPlanDayEntity.length != 1)\n {\n start = searchPlanDayEntity.length - 2;\n end = searchPlanDayEntity.length;\n }\n\n outParams = createViewData(searchPlanDayEntity, start, end, btnControl);\n\n return outParams;\n }", "public abstract SortedSet<CalendarEvent> getEventsAt(User user, Date day);", "@Override\n\tpublic String queryMemberInvest(Long memberId, String fromUserName, String toUserName,Date date,String dateString) {\n\t\tTransactionQuery transactionQuery=new TransactionQuery();\n\t\t//transactionQuery.setMemberId(memberId);\n\t\ttransactionQuery.setTransactionStartTime(DateUtils.zerolizedTime(date));\n\t\ttransactionQuery.setTransactionEndTime(DateUtils.getEndTime(date));\n\t\tTextMsg msg = new TextMsg();\n\t\tdate=DateUtils.getDateFromString(DateUtils.getDateStrFromDate(date), DateUtils.DATE_FMT_3);\n\t\tint count=memberService.countRegisterNumberByDate(date);\n\t\ttry {\n\t\t\tBigDecimal totalAssets=BigDecimal.ZERO;\n\t\t\tBigDecimal returnAssets=BigDecimal.ZERO;\n\t\t\tBigDecimal hadAssets=BigDecimal.ZERO;\n\t\tTransactionInterest transactionInterest=transactionManager.selectWaitPayByEndDate(0,date);\n\t\tif(transactionInterest!=null){\n\t\t\t BigDecimal principal = transactionInterest.getPayablePrincipal()==null?BigDecimal.ZERO:transactionInterest.getPayablePrincipal();\n\t\t\t BigDecimal interest = transactionInterest.getPayableInterest()==null?BigDecimal.ZERO:transactionInterest.getPayableInterest();\n\t\t\t totalAssets =principal.add(interest);\n\t\t}\n\t\t\n\t\tTransactionInterest returnInterest=transactionManager.selectWaitPayByEndDate(4,date);\n\t\tif(returnInterest!=null){\n\t\t\t BigDecimal principal = returnInterest.getPayablePrincipal()==null?BigDecimal.ZERO:returnInterest.getPayablePrincipal();\n\t\t\t BigDecimal interest = returnInterest.getPayableInterest()==null?BigDecimal.ZERO:returnInterest.getPayableInterest();\n\t\t\t returnAssets =principal.add(interest);\n\t\t}\n\t\t\n\t\tTransactionInterest hadInterest=transactionManager.selectRealPayByEndDate(date);\n\t\tif(hadInterest!=null){\n\t\t\t BigDecimal principal = hadInterest.getRealPayPrincipal()==null?BigDecimal.ZERO:hadInterest.getRealPayPrincipal();\n\t\t\t BigDecimal interest = hadInterest.getRealPayInterest()==null?BigDecimal.ZERO:hadInterest.getRealPayInterest();\n\t\t\t hadAssets =principal.add(interest);\n\t\t}\n\t\t\n\t\t\tBigDecimal investAmount = transactionManager.getMemberTotalInvestByStatus(transactionQuery);\n\t\t\tint waitCount=transactionManager.getCountInterestByMemberId(memberId,0,date);\n\t\t\tint hadCount=transactionManager.getCountInterestByMemberId(memberId,1,date);\n\t\t\tint countIng=transactionManager.getCountInterestByMemberId(memberId,4,date);\n\t\t\t\n\t\t\tBigDecimal totalInvestAmount = transactionManager.getTotalInvestAmount(date);\n\t \t \t// msg.add(\"亲爱的\").add(trueName).add(\",平台\").add(dateString).add(\":\");\n\t \t \t// msg.addln();\n\t \t \t msg.add(\"平台注册量:\").add(Integer.toString(count));\n\t \t \t msg.addln();\n\t \t \t msg.add(\"平台投资额为:\").add(FormulaUtil.getFormatPriceRound(investAmount));\n\t \t \t msg.addln();\n\t \t \t msg.add(\"募集中金额:\").add(FormulaUtil.getFormatPriceRound(totalInvestAmount));\n\t \t \t msg.addln();\n\t \t \t msg.add(\"待回款笔数:\").add(Integer.toString(waitCount)).add(\"总额:\").add(FormulaUtil.getFormatPriceRound(totalAssets));\n\t \t \t msg.addln();\n\t \t \t msg.add(\"回款中笔数:\").add(Integer.toString(countIng)).add(\"总额:\").add(FormulaUtil.getFormatPriceRound(returnAssets));\n\t \t \t msg.addln();\n\t \t \t msg.add(\"已回款笔数:\").add(Integer.toString(hadCount)).add(\"总额:\").add(FormulaUtil.getFormatPriceRound(hadAssets));\n\t \t \t msg.addln();\n\t \t \t msg.setToUserName(fromUserName);\n\t \t \t msg.setFromUserName(toUserName);\n\t\t\t\n\t\t} catch (ManagerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return msg.toXml();\n\t\t\n\t}", "public void populateDataForVisitTimeReport(final Date startDate, final Date endDate,\n final List<String> companyCodes) {\n\n // reset\n this.mapCompanyBranchVsListEmployee = new HashMap<>();\n this.mapCompanyBranchVsListOfPurposes = new HashMap<>();\n this.mapCompanyBranchVsVisitTimes = new HashMap<>();\n this.mapCompanyBranchPurposeVsVisitTimes = new HashMap<>();\n this.mapCompanyBranchEmployeePurposeVsVisitTimes = new HashMap<>();\n this.mapCompanyBranchEmployeeVsVisitTimes = new HashMap<>();\n // init\n for (final String companyCode : companyCodes) {\n for (final String branchCode : SummaryReportService.BRANCHES.keySet()) {\n final String key =\n String.format(SummaryReportService.COMPANY_BRANCH_KEY_PATTERN, companyCode, branchCode);\n this.mapCompanyBranchVsListEmployee.put(key, new ArrayList<Integer>());\n this.mapCompanyBranchVsListOfPurposes.put(key, new ArrayList<Short>());\n this.mapCompanyBranchVsVisitTimes.put(key, 0);\n }\n }\n\n final List<Daily_report> listDailyReport = this.getListVisited(startDate, endDate, companyCodes);\n\n for (final Daily_report daily : listDailyReport) {\n final String companyCode = daily.getDai_company_code();\n String branchCode = daily.getDai_point_code();\n\n final int employeeCode = daily.getDai_employee_code();\n final boolean isHQ = daily.getEmployee_mst().getEmp_settle_authority() == AuthorityLevels.HEAD_QUARTER;\n if (isHQ) {\n branchCode = SummaryReportConstants.HQ_CODE;\n }\n final String companyBranchKey =\n String.format(SummaryReportService.COMPANY_BRANCH_KEY_PATTERN, companyCode, branchCode);\n\n if (this.mapCompanyBranchVsListEmployee.containsKey(companyBranchKey)) {\n if (!this.mapCompanyBranchVsListEmployee.get(companyBranchKey).contains(employeeCode)) {\n this.mapCompanyBranchVsListEmployee.get(companyBranchKey).add(employeeCode);\n }\n }\n if (this.mapCompanyBranchVsListOfPurposes.containsKey(companyBranchKey)) {\n if (!this.mapCompanyBranchVsListOfPurposes.get(companyBranchKey)\n .contains(daily.getDai_work_tancode())) {\n this.mapCompanyBranchVsListOfPurposes.get(companyBranchKey).add(daily.getDai_work_tancode());\n }\n }\n if (this.mapCompanyBranchVsVisitTimes.containsKey(companyBranchKey)) {\n this.mapCompanyBranchVsVisitTimes.put(companyBranchKey,\n this.mapCompanyBranchVsVisitTimes.get(companyBranchKey) + 1);\n }\n else {\n this.mapCompanyBranchVsVisitTimes.put(companyBranchKey, 0);\n }\n\n final String companyBranchPurposeKey =\n String.format(SummaryReportService.COMPANY_BRANCH_PURPOSE_KEY_PATTERN, companyCode, branchCode,\n daily.getDai_work_tancode());\n this.updateCountersOfMap(this.mapCompanyBranchPurposeVsVisitTimes, companyBranchPurposeKey);\n\n final String companyBranchEmployeeKey = String.format(\n SummaryReportService.COMPANY_BRANCH_EMPLOYEE_KEY_PATTERN, companyCode, branchCode, employeeCode);\n this.updateCountersOfMap(this.mapCompanyBranchEmployeeVsVisitTimes, companyBranchEmployeeKey);\n\n final String companyBranchEmployeePurposeKey =\n String.format(SummaryReportService.COMPANY_BRANCH_EMPLOYEE_PURPOSE_KEY_PATTERN, companyCode,\n branchCode, employeeCode, daily.getDai_work_tancode());\n this.updateCountersOfMap(this.mapCompanyBranchEmployeePurposeVsVisitTimes, companyBranchEmployeePurposeKey);\n }\n\n }", "private void calculateDebitAgingDATE(List<EMCQuery> periodQueries, List<DebtorsAgingHelper> agingList, Date atDate, String customerId, EMCUserData userData) {\n for (int i = 0; i < periodQueries.size(); i++) {\n //Calculate sum of debits & credits for each period\n EMCQuery query = periodQueries.get(i);\n query.addFieldAggregateFunction(\"credit\", \"SUM\");\n query.addFieldAggregateFunction(\"creditAmountSettled\", \"SUM\");\n\n Object[] totals = (Object[]) util.executeSingleResultQuery(query, userData);\n if (totals != null) {\n BigDecimal debitTotal = (BigDecimal) totals[0] == null ? BigDecimal.ZERO : (BigDecimal) totals[0];\n BigDecimal debitSettledTotal = (BigDecimal) totals[1] == null ? BigDecimal.ZERO : (BigDecimal) totals[1];\n BigDecimal creditTotal = (BigDecimal) totals[2] == null ? BigDecimal.ZERO : (BigDecimal) totals[2];\n BigDecimal creditSettledTotal = (BigDecimal) totals[3] == null ? BigDecimal.ZERO : (BigDecimal) totals[3];\n\n //Subtract outstanding credits from outstanding debits\n BigDecimal binAmount = debitTotal.subtract(debitSettledTotal).subtract(creditTotal.subtract(creditSettledTotal));\n agingList.get(i).setBinAmount(binAmount);\n } else {\n agingList.get(i).setBinAmount(BigDecimal.ZERO);\n }\n }\n //If atDate less than today, ignore updates made to transactions between atDate and today.\n //Only check dates, not time\n Calendar atCalendar = Calendar.getInstance();\n atCalendar.setTime(atDate);\n atCalendar.set(Calendar.HOUR, 0);\n atCalendar.set(Calendar.MINUTE, 0);\n atCalendar.set(Calendar.SECOND, 0);\n atCalendar.set(Calendar.MILLISECOND, 0);\n\n Calendar nowCalendar = Calendar.getInstance();\n nowCalendar.setTime(Functions.nowDate());\n nowCalendar.set(Calendar.HOUR, 0);\n nowCalendar.set(Calendar.MINUTE, 0);\n nowCalendar.set(Calendar.SECOND, 0);\n nowCalendar.set(Calendar.MILLISECOND, 0);\n\n if (atCalendar.compareTo(nowCalendar) < 0) {\n int bin = 0;\n //For each bin, revert transaction history\n for (DebtorsAgingHelper binHelper : agingList) {\n //Revert debits and credits seperately.\n EMCQuery settledQuery = new EMCQuery(enumQueryTypes.SELECT, DebtorsTransactionSettlementHistory.class);\n settledQuery.addFieldAggregateFunction(\"debitSettled\", \"SUM\");\n //Check that transaction existed at atDate. Bev requested that we remove this check.\n //settledQuery.addAnd(\"transactionCreatedDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n\n settledQuery.openAndConditionBracket();\n settledQuery.addOr(\"debitTransactionDate\", binHelper.getBinEndDate(), EMCQueryConditions.LESS_THAN_EQ);\n settledQuery.closeConditionBracket();\n\n //Customer is optional\n if (customerId != null) {\n settledQuery.addAnd(\"customerId\", customerId);\n }\n\n //Only include transactions settled after atDate.\n settledQuery.addAnd(\"createdDate\", atDate, EMCQueryConditions.GREATER_THAN);\n\n if (binHelper.getBinStartDate() != null) {\n settledQuery.openAndConditionBracket();\n settledQuery.addOr(\"debitTransactionDate\", binHelper.getBinStartDate(), EMCQueryConditions.GREATER_THAN_EQ);\n settledQuery.closeConditionBracket();\n }\n\n BigDecimal debitSettled = (BigDecimal) util.executeSingleResultQuery(settledQuery, userData);\n if (debitSettled == null) {\n debitSettled = BigDecimal.ZERO;\n }\n\n settledQuery = new EMCQuery(enumQueryTypes.SELECT, DebtorsTransactionSettlementHistory.class);\n settledQuery.addFieldAggregateFunction(\"creditSettled\", \"SUM\");\n //Check that transaction existed at atDate. Bev requested that we remove this check.\n //settledQuery.addAnd(\"transactionCreatedDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n\n settledQuery.openAndConditionBracket();\n settledQuery.addOr(\"creditTransactionDate\", binHelper.getBinEndDate(), EMCQueryConditions.LESS_THAN_EQ);\n settledQuery.closeConditionBracket();\n\n //Customer is optional\n if (customerId != null) {\n settledQuery.addAnd(\"customerId\", customerId);\n }\n\n //Only include transactions settled after atDate.\n settledQuery.addAnd(\"createdDate\", atDate, EMCQueryConditions.GREATER_THAN);\n\n if (binHelper.getBinStartDate() != null) {\n settledQuery.openAndConditionBracket();\n settledQuery.addOr(\"creditTransactionDate\", binHelper.getBinStartDate(), EMCQueryConditions.GREATER_THAN_EQ);\n settledQuery.closeConditionBracket();\n }\n\n BigDecimal creditSettled = (BigDecimal) util.executeSingleResultQuery(settledQuery, userData);\n if (creditSettled == null) {\n creditSettled = BigDecimal.ZERO;\n }\n\n //System.out.println(\"Bin \" + (bin++ + 1) + \" Debit Added Back: \" + debitSettled + \" Credit Added Back: \" + creditSettled);\n\n //Add settled amount & discount back to bin and subtract credit total\n //binHelper.setBinAmount(binHelper.getBinAmount().add((debitSettled).add(totalDiscount)).subtract(creditSettled));\n binHelper.setBinAmount(binHelper.getBinAmount().add(debitSettled).subtract(creditSettled));\n }\n }\n }", "public void displayReport() {\r\n\t\tint ticketsSold = 0;\r\n\t\tint aTicketsSold = 0;\r\n\t\tint cTicketsSold = 0;\r\n\t\tint sTicketsSold = 0;\r\n\t\tdouble totalSales = 0;\r\n\t\t\r\n\t\tTheaterSeat current = getFirst();\r\n\t\tif (current.getTicketType() == 'A') {\r\n\t\t\taTicketsSold++;\r\n\t\t\tticketsSold++;\r\n\t\t\ttotalSales += 10;\r\n\t\t}\r\n\t\tif (current.getTicketType() == 'C') {\r\n\t\t\tcTicketsSold++;\r\n\t\t\tticketsSold++;\r\n\t\t\ttotalSales += 5;\r\n\t\t}\r\n\t\tif (current.getTicketType() == 'S') {\r\n\t\t\tsTicketsSold++;\r\n\t\t\tticketsSold++;\r\n\t\t\ttotalSales += 7.5;\r\n\t\t}\r\n\t\tfor (int i=0; i<numRows - 1; i++) {\r\n\t\t\t\r\n\t\t\tfor (int j=1; j<numCols; j++) {\r\n\t\t\t\tcurrent = current.getRight();\r\n\t\t\t\tif (current.getTicketType() == 'A') {\r\n\t\t\t\t\taTicketsSold++;\r\n\t\t\t\t\tticketsSold++;\r\n\t\t\t\t\ttotalSales += 10;\r\n\t\t\t\t}\r\n\t\t\t\tif (current.getTicketType() == 'C') {\r\n\t\t\t\t\tcTicketsSold++;\r\n\t\t\t\t\tticketsSold++;\r\n\t\t\t\t\ttotalSales += 5;\r\n\t\t\t\t}\r\n\t\t\t\tif (current.getTicketType() == 'S') {\r\n\t\t\t\t\tsTicketsSold++;\r\n\t\t\t\t\tticketsSold++;\r\n\t\t\t\t\ttotalSales += 7.5;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int j=0; j<numCols - 1; j++) {\r\n\t\t\t\tcurrent = current.getLeft();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcurrent = current.getDown();\r\n\t\t\tif (current.getTicketType() == 'A') {\r\n\t\t\t\taTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 10;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'C') {\r\n\t\t\t\tcTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 5;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'S') {\r\n\t\t\t\tsTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 7.5;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int j=1; j<numCols; j++) {\r\n\t\t\tcurrent = current.getRight();\r\n\t\t\tif (current.getTicketType() == 'A') {\r\n\t\t\t\taTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 10;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'C') {\r\n\t\t\t\tcTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 5;\r\n\t\t\t}\r\n\t\t\tif (current.getTicketType() == 'S') {\r\n\t\t\t\tsTicketsSold++;\r\n\t\t\t\tticketsSold++;\r\n\t\t\t\ttotalSales += 7.5;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Total seats in theater: \" + numRows*numCols);\r\n\t\tSystem.out.println(\"Total tickets sold: \" + ticketsSold);\r\n\t\tSystem.out.println(\"Adult tickets sold: \" + aTicketsSold);\r\n\t\tSystem.out.println(\"Child tickets sold: \" + cTicketsSold);\r\n\t\tSystem.out.println(\"Senior tickets sold: \" + sTicketsSold);\r\n\t\tSystem.out.println(\"Total ticket sales: $\" + String.format(\"%.2f\", totalSales));\r\n\t}", "public static void main(String[] args) throws Exception\n\t{\n\t\tString[][] sessionInfoData_table = new String[100][100]; // For input session data\n\n\t\t\n\t\tString[][] sessionDate_table = new String[100][100];\n\t\tString[][] nbackByID_table = new String[100][500];\n\t\tString[][] nbackByDate_table = new String[100][100];\n\t\tString[][] sudokuByID_table = new String[100][100];\n\t\tString[][] sudokuByDate_table = new String[100][100]; //Added these rows for the 5 organized tables, mirrors \"organized table\" A.P\n\t\t\n//\t\tString[][] organizedTable = new String[100000][50]; //Table that receives the data sorted by user ID\n//\t\tString[][] organizedTable2 = new String[100000][50]; // Table that receives the data sorted by Date for each user ID\n//\t\t//boolean knownID[] = new boolean[100000]; // It just checks whether a desired operation has been applied to an ID\n\t\t\n//\t\tint avgsReport_row_num = 0;\n//\t\tint avgsReport_col_num = 0;\n//\t\tint loginReport_row_num = 0;\n//\t\tint loginReport_col_num = 0;\n//\t\tint sudokuReport_row_num = 0;\n//\t\tint sudokuReport_col_num = 0;\n//\t\tint nbackReport_row_num = 0;\n//\t\tint nbackReport_col_num = 0; // Added for raw data A.P\n\t\tint sessionInfoData_row_num = 0;\n\t\tint sessionInfoData_col_num = 0;\n\t\t\n\t\tint sessionDate_row_num = 0; // Total of rows in the SWM excel sheet\n\t\tint sessionDate_col_num = 0; // Total of columns in the SWM excel sheet\n\t\tString[][] sessionDate = new String[10000][50]; // Store the information from the sessionDate excel file\n\t\tString[][] timeOfDay = new String[10000][3]; //Store the preDate and postDate time of day\n\t\t\n\t\t//In case need inputed data\t\t\n\t\t//String input = new String();\t\t\n\t\t//Input data by user (Sheida)\n\t\t//Input data storage\n\t\t//InputStreamReader isr = new InputStreamReader(System.in);\n\t\t//BufferedReader br = new BufferedReader(isr);\n\t\t//input = br.readLine();\n\t\t//int number = 0;\n\t\t//number = Integer.parseInt(input);\n\t\t\n\t\t\t\t\n\t\t//======================================================================================================================//\n\t\t//======================================================================================================================//\n\t\t\t\n\t\t/*First things first: get the output files and the session data file. Outputs are all in a folder \"allReports\" (to be in the system \n\t\t * library where all resources for a program are stored)\n\t\t */\n\t\tFile[] files = null;\n\t\tFile[] responses = null;\n\t\ttry {\n\t\t\t//Start with output files; store them in an array files[]\n\t\t\tFile inputFolder = new File(\"allReports\"); //this will implements the single file algorithm below\n\t \tif(inputFolder.isDirectory()) //check if said file is a directory\n\t \t{\n\t \t\t//The following MUST OCCUR:\n\t \t\tfiles = inputFolder.listFiles(); // create array to hold all files in the directory, regardless of extension; puts all files in\n\t \t\tfor (int i = 0; i < files.length; i++) \n\t \t\t{\n\t \t\t\tSystem.out.println(files[i].getName()); //get name of each file in the directory; print out\n\t \t\t\t//NEED TO REMOVE FIRST X SPACES IN EACH FILE\n\t\t\t\t}\n\t \t}\n\t \t\n\t \t//Get the text files containing data with response times\n\t \t\n\t \tFile nbkResponses = new File(\"NbkResponses\");\n\t \t\n\t \tif(nbkResponses.isDirectory()) //check if said file is a directory\n\t \t{\n\t \t\t//The following MUST OCCUR:\n\t \t\tresponses = nbkResponses.listFiles(); // create array to hold all files in the directory, regardless of extension; puts all files in\n\t \t\tfor (int i = 0; i < files.length; i++) \n\t \t\t{\n\t \t\t\tSystem.out.println(responses[i].getName()); //get name of each file in the directory; print out\n\t \t\t\t//NEED TO REMOVE FIRST X SPACES IN EACH FILE\n\t\t\t\t}\n\t \t}\n\t \t\n//\t \tFile inputFile = new File(\"Report_ID_11031301114.xml\");\n//\t DocumentBuilderFactory dbFactory \n//\t = DocumentBuilderFactory.newInstance();\n//\t DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n//\t Document doc = dBuilder.parse(inputFile);\n//\t doc.getDocumentElement().normalize();\n//\t NodeList rowList = doc.getElementsByTagName(\"Row\");\n//\t for (int temp = 0; temp < rowList.getLength(); temp++) {\n//\t Element nNode = (Element) rowList.item(temp);\n//\t NodeList cellList = nNode.getElementsByTagName(\"Cell\");\n//\t System.out.println(\"Row \"+temp);\n//\t StringBuffer content = new StringBuffer();\n//\t for (int j = 0; j < cellList.getLength(); j++) {\n//\t \tNode abc = cellList.item(j);\n//\t \tString text = ((Element)abc.getChildNodes()).getTextContent();\n//\t \tcontent.append(text+\",\");\n//\n//\t }\n//\t \tSystem.out.println(\"Row \"+temp + \"=\"+content);\n//\t }\n\t \t\n\t \t//Next, get the sessionDates as a .xlsx file; put everything into a 2D array \"sessionInfoData_table\"\n\t \tFile a = new File(\"NICT_Sessiondatesjan27162016.xlsx\");\n\t \tFileInputStream inputStream = new FileInputStream(a);\n\t \tWorkbook sessionDatesInput = new XSSFWorkbook(inputStream);\n\t \tSheet sessionInfoData = sessionDatesInput.getSheetAt(0);\n\t \tfor(Iterator<Row> rit = sessionInfoData.rowIterator(); rit.hasNext();)\n\t \t{\n\t \t\tRow row = rit.next();\n\t \t\tfor(Iterator<Cell> cit = row.cellIterator(); cit.hasNext();)\n\t \t\t{\n\t \t\t\tCell cell = cit.next(); //Reads the cells in the file A.P\n\t \t\t\tcell.setCellType(Cell.CELL_TYPE_STRING); //reads each column as a string, and later, if it's a number, can convert to a number\n\t \t\t\tsessionInfoData_table[cell.getRowIndex()][cell.getColumnIndex()] = cell.getStringCellValue();\n\t \t\t}\n\t \t\tsessionInfoData_col_num = row.getPhysicalNumberOfCells();\n\t \t}\n\t \tsessionInfoData_row_num = sessionInfoData.getPhysicalNumberOfRows();\n\t \tsessionDatesInput.close();\n\t \t\n\t \t//Finished reading in all inputs\n\t \t\n\t\t} catch (FileNotFoundException e){\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\t\n\t \n\t\t//Now, initialize all sheets\n\t Workbook outputFile = new XSSFWorkbook(); // Empty Excel output file is initialized\n\t\t\n\t \t//Create the sessionDates sheet and have all data stored\n\t \tsessionDate_table = sessionDateSheetInit(sessionInfoData_table,sessionInfoData_row_num, sessionInfoData_col_num, sessionDate_table, outputFile); //Adds to the sheet and creates the 2d array to use for other methods\n\t\n \t//Initialize all of the following tables with titles\n\t nbackByID_table = nbackByIDSheetInit(nbackByID_table);\n\t \tnbackByDate_table = nbackByDateSheetInit(nbackByDate_table);\n\t sudokuByID_table = sudokuByIDSheetInit(sudokuByID_table);\n\t sudokuByDate_table = sudokuByDateSheetInit(sudokuByDate_table);\n\t\t\n\t //Now, for the ID sheets, call nbackByIDSheet and sudokuByIDSheet with outputs of 2D arrays; start inserting rows into their respective tables\n\t if(files!=null)\n\t {\n\t \tfor(int i = 0; i<files.length;i++)//For each user's file\n\t \t{\n\t \t\t\n\t \t\tnbackByIDSheet(files[i],responses,sessionDate_table,nbackByID_table,i+1); //Adds a new row to nbackByID at line i+1; NEEDS ARRAY OF TEXT FILES A.P\n\t \t\tsudokuByIDSheet(files[i],sessionDate_table,sudokuByID_table,i+1); //Adds a new row to sudokuByID\n\t \t}\n\t \t\n\t }\n\t \n\t \n\t //Get the date and time \t\n\t DateFormat dateFormat = new SimpleDateFormat(\"yyyy_MM_dd\");\t\n\t Date date = new Date();\n\t String fileDate = dateFormat.format(date);\n\t System.out.println(fileDate); //Print out today's date\n\t\t\n\t //Now, take all the completed 2D arrays and put them into sheets\n\t //First, SessionDate\n\t Sheet sessionDate_sheet = outputFile.createSheet(\"SessionDate\");\n\t\tCell cell_w;\n\t\tfor(int r = 0 ; r < sessionInfoData_row_num ; r++) //make x rows where x is the total number of rows of users + title row\n\t\t{\n\t\t\tRow row = sessionDate_sheet.createRow(r);\n\t\t\tfor(int c = 0 ; c < 14 ; c++) //There are 14 columns\n\t\t\t{\n\t\t\t\t/*if(r == 0||c == 11) //If it's either the titles row or the examiner column, don't turn the cell type into a number CHECK A.P\n\t\t\t\t{\n\t\t\t\t\tcell_w = row.createCell(c);\n\t\t\t\t\tcell_w.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\t\tcell_w.setCellValue(sessionDate_table[r][c].toString());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcell_w = row.createCell(c);\n\t\t\t\t\tif(sessionDate_table[r][c].equals(\"\")) //If the cell is empty\n\t\t\t\t\t{\n\t\t\t\t\t\tcell_w.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\t\t\tcell_w.setCellValue(\"\");\n\t\t\t\t\t}\t\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcell_w.setCellType(Cell.CELL_TYPE_NUMERIC);\n\t\t\t\t\t\tcell_w.setCellValue(Double.parseDouble(sessionDate_table[r][c].toString()));\n\t\t\t\t\t}\n\t\t\t\t}*/\n\t\t\t\tcell_w = row.createCell(c);\n\t\t\t\tcell_w.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\tcell_w.setCellValue(sessionDate_table[r][c].toString());\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Next, nbackByID\n\t\tSheet nbackByID_sheet = outputFile.createSheet(\"nbackByID\");\n\t\t\n\t\tcell_w = null;\n\t\t\n\t\tfor(int r = 0 ; r < files.length+1 ; r++)//+1 b/c one row for the titles\n\t\t{\n\t\t\tRow row = nbackByID_sheet.createRow(r);\n\t\t\tfor(int c = 0 ; c < 128 ; c++) //# of columns\n\t\t\t{\n\t\t\t\t/*if(r == 0)\n\t\t\t\t{\n\t\t\t\t\tcell_w = row.createCell(c);\n\t\t\t\t\tcell_w.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\t\tcell_w.setCellValue(nbackByID_table[r][c].toString());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcell_w = row.createCell(c);\n\t\t\t\t\tif(nbackByID_table[r][c].equals(\"\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tcell_w.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\t\t\tcell_w.setCellValue(\"\");\n\t\t\t\t\t}\t\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcell_w.setCellType(Cell.CELL_TYPE_NUMERIC);\n\t\t\t\t\t\tcell_w.setCellValue(Double.parseDouble(nbackByID_table[r][c].toString()));\n\t\t\t\t\t}\n\t\t\t\t}*/\n\t\t\t\tcell_w = row.createCell(c);\n\t\t\t\tcell_w.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\tcell_w.setCellValue(nbackByID_table[r][c].toString());\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Next, nbackByDate\n\t\tSheet nbackByDate_sheet = outputFile.createSheet(\"nbackByDate\");\n\t\t\n\t\tcell_w = null;\n\t\t\n\t\tfor(int r = 0 ; r < nbackByDate_table.length ; r++)\n\t\t{\n\t\t\tRow row = nbackByDate_sheet.createRow(r);\n\t\t\tfor(int c = 0 ; c < 52 ; c++)\n\t\t\t{\n\t\t\t\t/*if(r == 0)\n\t\t\t\t{\n\t\t\t\t\tcell_w = row.createCell(c);\n\t\t\t\t\tcell_w.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\t\tcell_w.setCellValue(nbackByDate_table[r][c].toString());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcell_w = row.createCell(c);\n\t\t\t\t\tif(nbackByDate_table[r][c].equals(\"\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tcell_w.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\t\t\tcell_w.setCellValue(\"\");\n\t\t\t\t\t}\t\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcell_w.setCellType(Cell.CELL_TYPE_NUMERIC);\n\t\t\t\t\t\tcell_w.setCellValue(Double.parseDouble(nbackByDate_table[r][c].toString()));\n\t\t\t\t\t}\n\t\t\t\t}*/\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Next, SudokuByID\n\t\tSheet sudokuByID_sheet = outputFile.createSheet(\"sudokuByID\");\n\t\t\n\t\tcell_w = null;\n\t\t\n\t\tfor(int r = 0 ; r < files.length+1 ; r++)//num rows + 1 for the title row\n\t\t{\n\t\t\tRow row = sudokuByID_sheet.createRow(r);\n\t\t\tfor(int c = 0 ; c < 52 ; c++)\n\t\t\t{\n\t\t\t\t/*if(r == 0)\n\t\t\t\t{\n\t\t\t\t\tcell_w = row.createCell(c);\n\t\t\t\t\tcell_w.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\t\tcell_w.setCellValue(sudokuByID_table[r][c].toString());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcell_w = row.createCell(c);\n\t\t\t\t\tif(sudokuByID_table[r][c].equals(\"\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tcell_w.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\t\t\tcell_w.setCellValue(\"\");\n\t\t\t\t\t}\t\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcell_w.setCellType(Cell.CELL_TYPE_NUMERIC);\n\t\t\t\t\t\tcell_w.setCellValue(Double.parseDouble(sudokuByID_table[r][c].toString()));\n\t\t\t\t\t}\n\t\t\t\t}*/\n\t\t\t\tcell_w = row.createCell(c);\n\t\t\t\tcell_w.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\tcell_w.setCellValue(sudokuByID_table[r][c].toString());\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Next, SudokuByID\n\t\t\tSheet sudokuByDate_sheet = outputFile.createSheet(\"sudokuByDate\");\n\t\t\t\t\n\t\t\tcell_w = null;\n\t\t\t\t\n\t\t\t\tfor(int r = 0 ; r < sudokuByDate_table.length ; r++)\n\t\t\t\t{\n\t\t\t\t\tRow row = sudokuByDate_sheet.createRow(r);\n\t\t\t\t\tfor(int c = 0 ; c < 52 ; c++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(r == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcell_w = row.createCell(c);\n\t\t\t\t\t\t\tcell_w.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\t\t\t\tcell_w.setCellValue(sudokuByDate_table[r][c].toString());\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\tcell_w = row.createCell(c);\n\t\t\t\t\t\t\tif(sudokuByDate_table[r][c].equals(\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcell_w.setCellType(Cell.CELL_TYPE_STRING);\n\t\t\t\t\t\t\t\tcell_w.setCellValue(\"\");\n\t\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\tcell_w.setCellType(Cell.CELL_TYPE_NUMERIC);\n\t\t\t\t\t\t\t\tcell_w.setCellValue(Double.parseDouble(sudokuByDate_table[r][c].toString()));\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 \n\t //Output the completed excel file!\n\t try{\t\n\t \tFileOutputStream output = new FileOutputStream(\"C:/Users/Anita/Documents/School/uOttawa/FilteredData_\"+fileDate+\".xlsx\"); //Changed directory to fit comp A.P\n\t \toutputFile.write(output);\n\t \toutput.close();\n\t \toutputFile.close();\n\t }\n\t catch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n//\t\ttry\n//\t\t\t{\n//\t\t\t\t//Open an excel file\n//\t\t\t\tWorkbook workbook = new XSSFWorkbook(new FileInputStream(fileChooser.getSelectedFile())); //HSSF to XSSF A.P\n//\t\t\t\t\n//\t\t\t\t//The Following reads in data from the avgsReport sheet A.P\n//\t\t\t\tSheet avgsReport = workbook.getSheetAt(0);\n//\t\t\t\tfor(Iterator<Row> rit = avgsReport.rowIterator(); rit.hasNext();)\n//\t\t\t\t{\n//\t\t\t\t\tRow row = rit.next();\n//\t\t\t\t\tfor(Iterator<Cell> cit = row.cellIterator(); cit.hasNext();)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tCell cell = cit.next(); //Reads the cells in the file A.P\n//\t\t\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING); //reads each column as a string, and later, if it's a number, can convert to a number\n//\t\t\t\t\t\t//System.out.print(cell.getStringCellValue()+\"\\t\\t\");\n//\t\t\t\t\t\tavgsReport_table[cell.getRowIndex()][cell.getColumnIndex()] = cell.getStringCellValue();\n//\t\t\t\t\t}\n//\t\t\t\t\t//System.out.println();\n//\t\t\t\t\tavgsReport_col_num = row.getPhysicalNumberOfCells();\n//\t\t\t\t}\n//\t\t\t\tavgsReport_row_num = avgsReport.getPhysicalNumberOfRows();\n//\t\t\t\t\n//\t\t\t\t//The Following reads in data from the loginReport sheet A.P\n//\t\t\t\tSheet loginReport = workbook.getSheetAt(1);\n//\t\t\t\tfor(Iterator<Row> rit = loginReport.rowIterator(); rit.hasNext();)\n//\t\t\t\t{\n//\t\t\t\t\tRow row = rit.next();\n//\t\t\t\t\tfor(Iterator<Cell> cit = row.cellIterator(); cit.hasNext();)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tCell cell = cit.next(); //Reads the cells in the file A.P\n//\t\t\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING); //reads each column as a string, and later, if it's a number, can convert to a number\n//\t\t\t\t\t\tloginReport_table[cell.getRowIndex()][cell.getColumnIndex()] = cell.getStringCellValue();\n//\t\t\t\t\t}\n//\t\t\t\t\tloginReport_col_num = row.getPhysicalNumberOfCells();\n//\t\t\t\t}\n//\t\t\t\tloginReport_row_num = loginReport.getPhysicalNumberOfRows();\n//\t\t\t\t\n//\t\t\t\t//The Following reads in data from the sudokuReport sheet A.P\n//\t\t\t\tSheet sudokuReport = workbook.getSheetAt(2);\n//\t\t\t\tfor(Iterator<Row> rit = sudokuReport.rowIterator(); rit.hasNext();)\n//\t\t\t\t{\n//\t\t\t\t\tRow row = rit.next();\n//\t\t\t\t\tfor(Iterator<Cell> cit = row.cellIterator(); cit.hasNext();)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tCell cell = cit.next(); //Reads the cells in the file A.P\n//\t\t\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING); //reads each column as a string, and later, if it's a number, can convert to a number\n//\t\t\t\t\t\tsudokuReport_table[cell.getRowIndex()][cell.getColumnIndex()] = cell.getStringCellValue();\n//\t\t\t\t\t}\n//\t\t\t\t\tsudokuReport_col_num = row.getPhysicalNumberOfCells();\n//\t\t\t\t}\n//\t\t\t\tsudokuReport_row_num = sudokuReport.getPhysicalNumberOfRows();\n//\t\t\t\t\n//\t\t\t\t//The Following reads in data from the nbackReport sheet A.P\n//\t\t\t\tSheet nbackReport = workbook.getSheetAt(3);\n//\t\t\t\tfor(Iterator<Row> rit = nbackReport.rowIterator(); rit.hasNext();)\n//\t\t\t\t{\n//\t\t\t\t\tRow row = rit.next();\n//\t\t\t\t\tfor(Iterator<Cell> cit = row.cellIterator(); cit.hasNext();)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tCell cell = cit.next(); //Reads the cells in the file A.P\n//\t\t\t\t\t\tcell.setCellType(Cell.CELL_TYPE_STRING); //reads each column as a string, and later, if it's a number, can convert to a number\n//\t\t\t\t\t\tnbackReport_table[cell.getRowIndex()][cell.getColumnIndex()] = cell.getStringCellValue();\n//\t\t\t\t\t}\n//\t\t\t\t\tnbackReport_col_num = row.getPhysicalNumberOfCells();\n//\t\t\t\t}\n//\t\t\t\tnbackReport_row_num = nbackReport.getPhysicalNumberOfRows();\n//\t\t\t\t\n//\t\t\t\tworkbook.close(); //end of reading from single output file A.P\n//\t\t\t\t\n//\t\t\t} catch (FileNotFoundException x){\n//\t\t\t\tx.printStackTrace();\n//\t\t\t} catch (IOException x) {\n//\t\t\t\tx.printStackTrace();\n//\t\t\t}\n//\t\telse\n//\t\t{\n//\t\t\tSystem.out.println(\"No file has been chosen.\");\n//\t\t}\t\n//\t\t\t//Finished copying data\n\t\t\n\t\t\n\t\t//======================================================================================================================//\n\t\t//======================================================================================================================//\n\t\t\n\t\t\n\t\t//======================================================================================================================//\n\t\t//======================================================================================================================//\n\t\t\n\t\t//General Operation\n\t\t//Convert sessionDate from string to numbers\n\t\tdouble [][] sessionDate_asNum = new double[10000][15];\n\t\tfor(int row = 1 ; row < sessionDate_row_num ; row++)\n\t\t{\n\t\t\tfor( int col = 1 ; col < (sessionDate_col_num-3) ; col++)\n\t\t\t{\n\t\t\t\tif(!(sessionDate[row][col].equals(\"NULL\")))\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\tsessionDate_asNum[row][col] = (Double.parseDouble(sessionDate[row][col].toString()));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif( col == 6)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"The user \" + sessionDate[row][0].toString() + \" doesn't have a last lab session.\");\n\t\t\t\t\t\tsessionDate_asNum[row][col] = sessionDate_asNum[row][col-1] + 7; //If sessionDate is NULL then add 7 day since last lab\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"The user \" + sessionDate[row][0].toString() + \" doesn't have the week\" + (col-1) + \" lab session.\");\n\t\t\t\t\t\tsessionDate_asNum[row][col] = sessionDate_asNum[row][col-1] + 7; //If sessionDate is NULL then add 7 day since last lab\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t\t//Finished converting\t\n\t}", "Report.LocationOuterClass.Location.FromType getFrom();", "@Override\r\n\tpublic List<DispatchAnalysis> getDispatchDetailsBetween(Date fromDate, Date toDate)\t{\r\n\t\t\r\n\t\tList<DispatchAnalysis> dispatchAnalysisDetails=new ArrayList<>();\r\n\t\tDispatchAnalysis dispatchAnalysis=new DispatchAnalysis();\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\r\n\t\tList<Order> orderDetails=orderService.getOrdersBetween(fromDate, toDate);\r\n\t\tSystem.out.println(orderDetails);\r\n\t\t//for each order placed, get shipment details\r\n\t\tfor(Order order:orderDetails)\t{\r\n\t\t\tList<Shipment> shipmentDetails=order.getShipments();\r\n\t\t\tSystem.out.println(shipmentDetails);\r\n\t\t\t\r\n\t\t\tfor(Shipment shipment:shipmentDetails)\t{\r\n\t\t\t\t\r\n\t\t\t\tc.setTime(order.getOrderDate());\r\n\t\t\t\tc.add(c.DAY_OF_MONTH, 1);\r\n\t\t\t\t\r\n\t\t\t\tdispatchAnalysis.setProductName(shipment.getProduct().getProductName());\r\n\t\t\t\tdispatchAnalysis.setMerchantName(shipment.getProduct().getInventory().getMerchant().getMerchantName());\r\n\t\t\t\t//expected dispatch date of the product is one day after order placed\r\n\t\t\t\tdispatchAnalysis.setExpectedDispatchDate(c.getTime());\r\n\t\t\t\tdispatchAnalysis.setActualDispatchDate(shipment.getDispatchDate());\r\n\t\t\t\tdispatchAnalysis.setDeliveryDate(shipment.getDeliveryDate());\r\n\t\t\t\t\r\n\t\t\t\tdispatchAnalysisDetails.add(dispatchAnalysis);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn dispatchAnalysisDetails;\r\n\t}", "@Override\n public List<Object[]> getStatistics(String owner, StatisticsGroup group) {\n String groupHQL = this.groupToHQL(group);\n List<Object[]> list = (List<Object[]>) getHibernateTemplate().findByNamedParam(\"select count(*), \"\n + \"count(distinct ipAddress), \" + groupHQL + \" \"\n + \"from SearchEvent \"\n + \"where owner like :owner \"\n + \"group by col_2_0_\", \"owner\", owner);\n return list;\n }", "private List<EngineUserExperianceData> getEngineUserExperianceDataList(\n\t\t\tfinal UserDataModel userDetail) {\n\t\tList<EngineUserExperianceData> engineUserExperianceDataList = Lists\n\t\t\t\t.newArrayList();\n\t\tif (userDetail.getUserExperienceDataModels() != null\n\t\t\t\t&& !userDetail.getUserExperienceDataModels().isEmpty()) {\n\t\t\tList<UserExperienceDataModel> userExperienceDataModelsList = new ArrayList<UserExperienceDataModel>(\n\t\t\t\t\tuserDetail.getUserExperienceDataModels());\n\t\t\t// Sort the userExperience detail according to user latest Job.\n\t\t\t// Sort them in the Decreasing order of 'User's working start date'.\n\t\t\tCollections.sort(userExperienceDataModelsList,\n\t\t\t\t\tnew UserExperienceDataModel.OrderByLatestCompany());\n\t\t\t//\n\t\t\tint index = 1;\n\t\t\tfor (UserExperienceDataModel userExperinceDetail : userExperienceDataModelsList) {\n\t\t\t\tEngineUserExperianceData engineUserExperianceData = new EngineUserExperianceData();\n\t\t\t\tengineUserExperianceData.setCompanyName(userExperinceDetail\n\t\t\t\t\t\t.getCompanyName());\n\t\t\t\tengineUserExperianceData.setWorkDescription(userExperinceDetail\n\t\t\t\t\t\t.getDescription());\n\t\t\t\tengineUserExperianceData\n\t\t\t\t\t\t.setWorkTenureInCompany(userExperinceDetail\n\t\t\t\t\t\t\t\t.getTotalExpMonth());\n\t\t\t\tengineUserExperianceData.setJobWorkTitle(userExperinceDetail\n\t\t\t\t\t\t.getCompanyName());\n\t\t\t\tengineUserExperianceData.setSwitchIndexOfCompanyByUser(index++);\n\t\t\t\t// add to the list\n\t\t\t\tengineUserExperianceDataList.add(engineUserExperianceData);\n\t\t\t}\n\t\t}\n\t\treturn engineUserExperianceDataList;\n\t}", "public interface UserTrackingLogger {\n\n public long getPositiveImpressionIdForMessage(long messageId);\n\n public long getNegativeImpressionIdForMessage(long messageId);\n\n public long getImpressionIdForMessage(long messageId, String questionText);\n \n public long getTopQuestionImpressionId(long conversationId, String questionText);\n\n public long getNoneOfTheAboveImpressionIdForMessage(long messageId);\n\n public long getForumVisitImpressionIdForMessage(long messageId);\n\n /**\n * Return a list of all impressions for the given message ID that have location=HIDDEN.\n * \n * @param messageId\n * @return\n */\n public List<Long> getHiddenImpressionIdsForMessage(long messageId);\n\n /**\n * Log a user query event.\n * \n * @param timestamp The time the event occurred\n * @param user Some identifier that ideally represents a single user interacting with the system\n * @param hostname The hostname or identifier of the system\n * @param referral The ID of the click that triggered this query, or null\n * @param questionText The text of the query\n * @param mode How the query was input by the user\n * @return The event ID\n */\n public long query(Date timestamp, String user, String hostname, Long referral, String questionText, InputMode mode);\n\n /**\n * Log a user impression event\n * \n * @param timestamp The time the event occurred\n * @param user Some identifier that ideally represents a single user interacting with the system\n * @param hostname The hostname or identifier of the system\n * @param referral The ID of the query that triggered this impression, or null\n * @param prompt The impression text\n * @param classifiedClass The answer class from the classifier, or null\n * @param offset The 1-based offset of this impression relative to other impressions from the same query\n * @param action Currently not used\n * @param location The location of the impression on the screen\n * @param provenance {@see Provenance}\n * @param confidence The confidence score from the classifier, or 0\n * @return The event ID\n */\n public long impression(Date timestamp, String user, String hostname, Long referral, String prompt,\n String classifiedClass, int offset, String action, Location location, Provenance provenance, double confidence);\n\n /**\n * @param timestamp The time the event occurred\n * @param user Some identifier that ideally represents a single user interacting with the system\n * @param hostname The hostname or identifier of the system\n * @param referral The ID of the impression that was clicked\n * @return The event ID\n */\n public long click(Date timestamp, String user, String hostname, Long referral);\n\n /**\n * Unhides an impression that was previously hidden from the user.\n * The event ID of the impression is unchanged.\n * \n * @param impressionId The event ID of the impression\n * @param newLocation The location of the impression on the screen\n */\n public void unhideImpression(long impressionId, Location newLocation);\n\n /**\n * Possible impression locations on the page\n */\n public static enum Location {\n MAIN_RESULTS_AREA, RIGHT_RAIL, FOOTER, \n /**\n * This is a special location to indicate impressions that were generated from a query\n * but not initially shown to the user. When the impression is shown to the user it\n * should be unhidden via unhideImpression().\n */\n HIDDEN\n };\n\n /**\n * Where an impression came from.\n * Currently only used to distinguish between clickable and non-clickable impressions.\n */\n public static enum Provenance {\n /**\n * This impression shows an answer inline and is not clickable.\n */\n INLINE, \n /**\n * This impression is clickable to either provide feedback or submit another query.\n */\n ALGO\n };\n\n}", "public void setUserLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n userLog.add(new UserLog(rs.getInt(\"userID\"),\n rs.getInt(2),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public String report() {\r\n\t\tsession2 = ServletActionContext.getRequest().getSession();\r\n\t\tlogger.info(session2);\r\n\t\tif (session2 == null || session2.getAttribute(\"login\") == null) {\r\n\t\t\tlogger.error(\"if=====session error reporting===='\");\r\n\t\t\treturn LOGIN;\r\n\t\t} else {\r\n\t\t\tfactory = LoginAndSession.getFactory();\r\n\t\t\tdao_userWise = (Productivity_user_wiseDao) factory.getBean(\"d27\");\r\n\t\t\tdao_propwise = (Productivity_property_wiseDao) factory.getBean(\"d29\");\r\n\t\t\tpcw = (Productivity_client_wiseDao) factory.getBean(\"d30\");\r\n\t\t\tif (colorRadio.equalsIgnoreCase(\"red\")) {\r\n\r\n\t\t\t\t// for all user\r\n\t\t\t\ttry {\r\n\t\t\t\t\tlst = dao_userWise\r\n\t\t\t\t\t\t\t.viewRecord(\"select puw.curr_date, puw.source_link, puw.infringing_link, puw.youtube,\"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.social_media, puw.white_list, puw.grey_list, puw.duplicate , mu.name\"\r\n\t\t\t\t\t\t\t\t\t+ \" , puw.facebook, puw.instagram, puw.twitter, puw.vk, puw.periscope, puw.source_domain,\"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.infringing_domain , puw.user_id \"\r\n\t\t\t\t\t\t\t\t\t+ \" from Productivity_user_wise puw, Markscan_users mu where puw.curr_date \"\r\n\t\t\t\t\t\t\t\t\t+ \" between '\" + date + \"' and '\" + date1 + \"' and mu.id= puw.user_id\");\r\n\t\t\t\t\tmonthlyGraph = new ArrayList<>();\r\n\r\n\t\t\t\t\tcud = (Crawle_url2Dao) factory.getBean(\"dash\");\r\n\r\n\t\t\t\t\t// lst1= cud.viewRecord(\"select DISTINCT count(domain_name)\r\n\t\t\t\t\t// ,date(created_on), link_logger from crawle_url3 where\r\n\t\t\t\t\t// user_id= 75 and created_on >'2017-06-01' and\r\n\t\t\t\t\t// link_logger=1 group by date(created_on)\")\r\n\r\n\t\t\t\t\tfor (int i = 0; i < lst.size(); i++) {\r\n\t\t\t\t\t\t obj = (Object[]) lst.get(i);\r\n\r\n\t\t\t\t\t\t data = new DashBoardData();\r\n\r\n\t\t\t\t\t\tdata.setDate(obj[0].toString());\r\n\t\t\t\t\t\tdata.setSource((Integer) obj[1]);\r\n\t\t\t\t\t\tdata.setInfringing((Integer) obj[2]);\r\n\r\n\t\t\t\t\t\tdata.setYoutube((Integer) obj[3]);\r\n\t\t\t\t\t\tdata.setSocial_media((Integer) obj[4]);\r\n\r\n\t\t\t\t\t\tdata.setWhite_list((Integer) obj[5]);\r\n\t\t\t\t\t\tdata.setGrey_list((Integer) obj[6]);\r\n\t\t\t\t\t\tdata.setDuplicate((Integer) obj[7]);\r\n\t\t\t\t\t\tdata.setProj_name(obj[8].toString()); // user_name\r\n\r\n\t\t\t\t\t\tdata.setFacebook((Integer) obj[9]);\r\n\t\t\t\t\t\tdata.setInstagram((Integer) obj[10]);\r\n\t\t\t\t\t\tdata.setTwitter((Integer) obj[11]);\r\n\t\t\t\t\t\tdata.setVk((Integer) obj[12]);\r\n\t\t\t\t\t\tdata.setPeriscope((Integer) obj[13]);\r\n\t\t\t\t\t\tdata.setSource_domain((Integer) obj[14]);\r\n\t\t\t\t\t\tdata.setInfringing_domain((Integer) obj[15]);\r\n\t\t\t\t\t\tdata.setUser_id((Integer) obj[16]);\r\n\t\t\t\t\t\tlst1 = dao_propwise.viewRecord(\r\n\t\t\t\t\t\t\t\t\"select DISTINCT cm.client_name , mp.name , cm.id from Productivity_property_wise ppw, \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" Project_info pi, Client_master cm, Markscan_projecttype mp where \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" ppw.project_id= pi.id and \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" pi.client_type= cm.id and pi.project_type = mp.id and ppw.user_id =\"\r\n\t\t\t\t\t\t\t\t\t\t+ (Integer) obj[16] + \" and \" + \" ppw.created_on = '\" + obj[0].toString()\r\n\t\t\t\t\t\t\t\t\t\t+ \"'\");\r\n\t\t\t\t\t\tin_side = new ArrayList<>();\r\n\t\t\t\t\t\tfor (int i1 = 0; i1 < lst1.size(); i1++) {\r\n\t\t\t\t\t\t\t obj1 = (Object[]) lst1.get(i1);\r\n\r\n\t\t\t\t\t\t\tlst0 = dao_propwise.viewRecord(\"select sum( productivi0_.source_count), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum( productivi0_.infringing_count),sum( productivi0_.youtube), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum( productivi0_.facebook), sum(productivi0_.instagram), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum(productivi0_.twitter),sum(productivi0_.vk), sum(productivi0_.periscope) \"\r\n\t\t\t\t\t\t\t\t\t+ \" from Productivity_property_wise productivi0_, Project_info project_in1_ \"\r\n\t\t\t\t\t\t\t\t\t+ \" where project_in1_.id=productivi0_.project_id and \" + \" productivi0_.user_id=\"\r\n\t\t\t\t\t\t\t\t\t+ (Integer) obj[16] + \" and \" + \" productivi0_.created_on='\" + obj[0].toString()\r\n\t\t\t\t\t\t\t\t\t+ \"' and \" + \"project_in1_.client_type=\" + (Integer) obj1[2]);\r\n\r\n\t\t\t\t\t\t\tfor (int i0 = 0; i0 < lst0.size(); i0++) {\r\n\t\t\t\t\t\t\t\t obj0 = (Object[]) lst0.get(i0);\r\n\r\n\t\t\t\t\t\t\t\t craw = new Crawle_url2();\r\n\t\t\t\t\t\t\t\tcraw.setWid(obj1[0].toString()); // client_name\r\n\t\t\t\t\t\t\t\tcraw.setIs_valid(((Long) obj0[0]).intValue());// source\r\n\t\t\t\t\t\t\t\tcraw.setStatus(((Long) obj0[1]).intValue());// infringing\r\n\t\t\t\t\t\t\t\tcraw.setUser_id(((Long) obj0[2]).intValue());// youtube\r\n\t\t\t\t\t\t\t\tcraw.setProject_id(((Long) obj0[3]).intValue());// FB\r\n\t\t\t\t\t\t\t\tcraw.setType(((Long) obj0[4]).intValue());// instagram\r\n\t\t\t\t\t\t\t\tcraw.setVerified(((Long) obj0[5]).intValue());// twitter\r\n\t\t\t\t\t\t\t\tcraw.setSite_down(((Long) obj0[6]).intValue());// vk\r\n\t\t\t\t\t\t\t\tcraw.setIs_new(((Long) obj0[7]).intValue());// pscp\r\n\r\n\t\t\t\t\t\t\t\tin_side.add(craw);\r\n\t\t\t\t\t\t\t\tobj0=null;\r\n\t\t\t\t\t\t\t\tcraw=null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tobj1=null;\r\n\t\t\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// System.out.println(client_names);\r\n\t\t\t\t\t\tdata.setInside(in_side);\r\n\r\n\t\t\t\t\t\tmonthlyGraph.add(data);\r\n\t\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\t\tdata=null;\r\n\t\t\t\t\t\t\t\tobj=null;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\treturn ERROR;\r\n\t\t\t\t}\r\n\t\t\t\tfinally{\r\n\t\t\t\t\tobj0=null;\r\n\t\t\t\t\tcraw=null;\r\n\t\t\t\t\tobj1=null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tdata=null;\r\n\t\t\t\t\t\t\tobj=null;\r\n\t\t\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\t\t\tdao_propwise = null;\r\n\t\t\t\t\t\t\tlst = null;\r\n\t\t\t\t\t\t\tfactory=null;\r\n\t\t\t\t\t\t\tdao_userWise=null;\r\n\t\t\t\t\t\t\tdao_propwise=null;\r\n\t\t\t\t\t\t\tsession2=null;\r\n\t\t\t\t}\r\n\t\t\t\tSystem.gc();\r\n\t\t\t\treturn \"allEmpReport\";\r\n\t\t\t} else if (colorRadio.equalsIgnoreCase(\"green\")) {\r\n\t\t\t\t// for single user\r\n\t\t\t\ttry {\r\n\t\t\t\t\tlst = dao_userWise\r\n\t\t\t\t\t\t\t.viewRecord(\"select puw.curr_date, puw.source_link, puw.infringing_link, puw.youtube, \"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.social_media, puw.white_list, puw.grey_list, puw.duplicate , puw.facebook,\"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.instagram, puw.twitter, puw.vk, puw.periscope, puw.source_domain, \"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.infringing_domain from \" + \" Productivity_user_wise puw where puw.user_id=\"\r\n\t\t\t\t\t\t\t\t\t+ usertype + \" and puw.curr_date between\" + \" '\" + date + \"' and '\" + date1 + \"'\");\r\n\t\t\t\t\tmonthlyGraph = new ArrayList<>();\r\n\r\n\t\t\t\t\tfor (int i = 0; i < lst.size(); i++) {\r\n\t\t\t\t\t\t obj = (Object[]) lst.get(i);\r\n\r\n\t\t\t\t\t\t data = new DashBoardData();\r\n\t\t\t\t\t\tdata.setDate(obj[0].toString());\r\n\t\t\t\t\t\tdata.setSource((Integer) obj[1]);\r\n\t\t\t\t\t\tdata.setInfringing((Integer) obj[2]);\r\n\r\n\t\t\t\t\t\tdata.setYoutube((Integer) obj[3]);\r\n\t\t\t\t\t\tdata.setSocial_media((Integer) obj[4]);\r\n\r\n\t\t\t\t\t\tdata.setWhite_list((Integer) obj[5]);\r\n\t\t\t\t\t\tdata.setGrey_list((Integer) obj[6]);\r\n\t\t\t\t\t\tdata.setDuplicate((Integer) obj[7]);\r\n\r\n\t\t\t\t\t\tdata.setFacebook((Integer) obj[8]);\r\n\t\t\t\t\t\tdata.setInstagram((Integer) obj[9]);\r\n\t\t\t\t\t\tdata.setTwitter((Integer) obj[10]);\r\n\t\t\t\t\t\tdata.setVk((Integer) obj[11]);\r\n\t\t\t\t\t\tdata.setPeriscope((Integer) obj[12]);\r\n\t\t\t\t\t\tdata.setSource_domain((Integer) obj[13]);\r\n\t\t\t\t\t\tdata.setInfringing_domain((Integer) obj[14]);\r\n\r\n\t\t\t\t\t\tlst1 = dao_propwise.viewRecord(\r\n\t\t\t\t\t\t\t\t\"select DISTINCT cm.client_name , mp.name , cm.id from Productivity_property_wise ppw, \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" Project_info pi, Client_master cm, Markscan_projecttype mp where \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" ppw.project_id= pi.id and \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" pi.client_type= cm.id and pi.project_type = mp.id and ppw.user_id =\"\r\n\t\t\t\t\t\t\t\t\t\t+ usertype + \" and \" + \" ppw.created_on = '\" + obj[0].toString() + \"'\");\r\n\t\t\t\t\t\tin_side = new ArrayList<>();\r\n\t\t\t\t\t\tfor (int i1 = 0; i1 < lst1.size(); i1++) {\r\n\t\t\t\t\t\t\t obj1 = (Object[]) lst1.get(i1);\r\n\r\n\t\t\t\t\t\t\tlst0 = dao_propwise.viewRecord(\"select sum( productivi0_.source_count), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum( productivi0_.infringing_count),sum( productivi0_.youtube), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum( productivi0_.facebook), sum(productivi0_.instagram), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum(productivi0_.twitter),sum(productivi0_.vk), sum(productivi0_.periscope) \"\r\n\t\t\t\t\t\t\t\t\t+ \" from Productivity_property_wise productivi0_, Project_info project_in1_ \"\r\n\t\t\t\t\t\t\t\t\t+ \" where project_in1_.id=productivi0_.project_id and \" + \" productivi0_.user_id=\"\r\n\t\t\t\t\t\t\t\t\t+ usertype + \" and \" + \" productivi0_.created_on='\" + obj[0].toString() + \"' and \"\r\n\t\t\t\t\t\t\t\t\t+ \"project_in1_.client_type=\" + (Integer) obj1[2]);\r\n\r\n\t\t\t\t\t\t\tfor (int i0 = 0; i0 < lst0.size(); i0++) {\r\n\t\t\t\t\t\t\t\t obj0 = (Object[]) lst0.get(i0);\r\n\r\n\t\t\t\t\t\t\t\t craw = new Crawle_url2();\r\n\t\t\t\t\t\t\t\tcraw.setWid(obj1[0].toString()); // client_name\r\n\t\t\t\t\t\t\t\tcraw.setIs_valid(((Long) obj0[0]).intValue());// source\r\n\t\t\t\t\t\t\t\tcraw.setStatus(((Long) obj0[1]).intValue());// infringing\r\n\t\t\t\t\t\t\t\tcraw.setUser_id(((Long) obj0[2]).intValue());// youtube\r\n\t\t\t\t\t\t\t\tcraw.setProject_id(((Long) obj0[3]).intValue());// FB\r\n\t\t\t\t\t\t\t\tcraw.setType(((Long) obj0[4]).intValue());// instagram\r\n\t\t\t\t\t\t\t\tcraw.setVerified(((Long) obj0[5]).intValue());// twitter\r\n\t\t\t\t\t\t\t\tcraw.setSite_down(((Long) obj0[6]).intValue());// vk\r\n\t\t\t\t\t\t\t\tcraw.setIs_new(((Long) obj0[7]).intValue());// pscp\r\n\r\n\t\t\t\t\t\t\t\tin_side.add(craw);\r\n\t\t\t\t\t\t\t\tobj0=null;\r\n\t\t\t\t\t\t\t\tcraw=null;\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\tobj1=null;\r\n\t\t\t\t\t\t\tlst0=null;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdata.setInside(in_side);\r\n\t\t\t\t\t\tmonthlyGraph.add(data);\r\n\t\t\t\t\t\tobj=null;\r\n\t\t\t\t\t\tdata= null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\treturn ERROR;\r\n\t\t\t\t}\r\n\t\t\t\tfinally\r\n\t\t\t\t{\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\t\t\t\t\tdata=null;\r\n\t\t\t\t\tcraw= null;\r\n\t\t\t\t\tfactory=null;\r\n\t\t\t\t\tdao_userWise=null;\r\n\t\t\t\t\tdao_propwise=null;\r\n\t\t\t\t\tsession2=null;\r\n\t\t\t\t}\r\n\t\t\t\tSystem.gc();\r\n\t\t\t\treturn \"empReport\";\r\n\t\t\t} else if (colorRadio.equalsIgnoreCase(\"blue\")) {\r\n\t\t\t\t// for client wise\r\n\t\t\t\ttry {\r\n\r\n\t\t\t\t\tlst = pcw.viewRecord(\"select pcw.curr_date, pcw.source_link, pcw.infringing_link, pcw.youtube,\"\r\n\t\t\t\t\t\t\t+ \" pcw.social_media, pcw.white_list, pcw.grey_list , pcw.facebook, pcw.instagram, pcw.twitter,\"\r\n\t\t\t\t\t\t\t+ \" pcw.vk, pcw.periscope, pcw.source_domain, pcw.infringing_domain from Productivity_client_wise \"\r\n\t\t\t\t\t\t\t+ \" pcw where pcw.curr_date between '\" + date + \"' and '\" + date1 + \"' and pcw.client_id=\"\r\n\t\t\t\t\t\t\t+ clientname);\r\n\t\t\t\t\tmonthlyGraph = new ArrayList<>();\r\n\r\n\t\t\t\t\tfor (int i = 0; i < lst.size(); i++) {\r\n\t\t\t\t\t\t obj = (Object[]) lst.get(i);\r\n\r\n\t\t\t\t\t\t data = new DashBoardData();\r\n\t\t\t\t\t\tdata.setDate(obj[0].toString());\r\n\t\t\t\t\t\tdata.setSource((Integer) obj[1]);\r\n\t\t\t\t\t\tdata.setInfringing((Integer) obj[2]);\r\n\r\n\t\t\t\t\t\tdata.setYoutube((Integer) obj[3]);\r\n\t\t\t\t\t\tdata.setSocial_media((Integer) obj[4]);\r\n\r\n\t\t\t\t\t\tdata.setWhite_list((Integer) obj[5]);\r\n\t\t\t\t\t\tdata.setGrey_list((Integer) obj[6]);\r\n\r\n\t\t\t\t\t\tdata.setFacebook((Integer) obj[7]);\r\n\t\t\t\t\t\tdata.setInstagram((Integer) obj[8]);\r\n\t\t\t\t\t\tdata.setTwitter((Integer) obj[9]);\r\n\t\t\t\t\t\tdata.setVk((Integer) obj[10]);\r\n\t\t\t\t\t\tdata.setPeriscope((Integer) obj[11]);\r\n\r\n\t\t\t\t\t\tdata.setSocial_media((Integer) obj[7] + (Integer) obj[8] + (Integer) obj[9] + (Integer) obj[10]\r\n\t\t\t\t\t\t\t\t+ (Integer) obj[11]);\r\n\r\n\t\t\t\t\t\tdata.setSource_domain((Integer) obj[12]);\r\n\t\t\t\t\t\tdata.setInfringing_domain((Integer) obj[13]);\r\n\r\n\t\t\t\t\t\tlst1 = dao_propwise.viewRecord(\r\n\t\t\t\t\t\t\t\t\"select DISTINCT mu.name, ppw.created_on ,ppw.user_id from Productivity_property_wise ppw ,\"\r\n\t\t\t\t\t\t\t\t\t\t+ \" Markscan_users mu where mu.id= ppw.user_id and ppw.client_id = \"\r\n\t\t\t\t\t\t\t\t\t\t+ clientname + \" and ppw.created_on='\" + obj[0].toString() + \"' \");\r\n\t\t\t\t\t\tin_side = new ArrayList<>();\r\n\t\t\t\t\t\tfor (int i1 = 0; i1 < lst1.size(); i1++) {\r\n\t\t\t\t\t\t\t obj1 = (Object[]) lst1.get(i1);\r\n\r\n\t\t\t\t\t\t\tlst0 = dao_propwise.viewRecord(\" select sum( productivi0_.source_count),\"\r\n\t\t\t\t\t\t\t\t\t+ \" sum(productivi0_.infringing_count),sum( productivi0_.youtube), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum(productivi0_.facebook),sum(productivi0_.instagram),sum(productivi0_.twitter) \"\r\n\t\t\t\t\t\t\t\t\t+ \" ,sum(productivi0_.vk),sum( productivi0_.periscope) from \"\r\n\t\t\t\t\t\t\t\t\t+ \" Productivity_property_wise productivi0_, Markscan_users markscan_u1_ where \"\r\n\t\t\t\t\t\t\t\t\t+ \" markscan_u1_.id=productivi0_.user_id and productivi0_.client_id= \" + clientname\r\n\t\t\t\t\t\t\t\t\t+ \" and productivi0_.created_on='\" + obj[0].toString() + \"' and \"\r\n\t\t\t\t\t\t\t\t\t+ \" productivi0_.user_id=\" + (Integer) obj1[2]);\r\n\r\n\t\t\t\t\t\t\tfor (int i0 = 0; i0 < lst0.size(); i0++) {\r\n\t\t\t\t\t\t\t\t obj0 = (Object[]) lst0.get(i0);\r\n\r\n\t\t\t\t\t\t\t\t craw = new Crawle_url2();\r\n\t\t\t\t\t\t\t\tcraw.setWid(obj1[0].toString()); // client_name\r\n\t\t\t\t\t\t\t\tcraw.setIs_valid(((Long) obj0[0]).intValue());// source\r\n\t\t\t\t\t\t\t\tcraw.setStatus(((Long) obj0[1]).intValue());// infringing\r\n\t\t\t\t\t\t\t\tcraw.setUser_id(((Long) obj0[2]).intValue());// youtube\r\n\t\t\t\t\t\t\t\tcraw.setProject_id(((Long) obj0[3]).intValue());// FB\r\n\t\t\t\t\t\t\t\tcraw.setType(((Long) obj0[4]).intValue());// instagram\r\n\t\t\t\t\t\t\t\tcraw.setVerified(((Long) obj0[5]).intValue());// twitter\r\n\t\t\t\t\t\t\t\tcraw.setSite_down(((Long) obj0[6]).intValue());// vk\r\n\t\t\t\t\t\t\t\tcraw.setIs_new(((Long) obj0[7]).intValue());// pscp\r\n\r\n\t\t\t\t\t\t\t\tin_side.add(craw);\r\n\t\t\t\t\t\t\t\tobj0=null;\r\n\t\t\t\t\t\t\t\tcraw=null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tobj1=null;\r\n\t\t\t\t\t\t\tlst0=null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tdata.setInside(in_side);\r\n\r\n\t\t\t\t\t\tmonthlyGraph.add(data);\r\n\t\t\t\t\t\tobj= null;\r\n\t\t\t\t\t\tdata= null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpcw = null;\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\treturn ERROR;\r\n\t\t\t\t}\r\n\t\t\t\tfinally{\r\n\t\t\t\t\tpcw = null;\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\t\t\t\t\tobj=null;\r\n\t\t\t\t\tdata=null;\r\n\t\t\t\t\tcraw=null;\r\n\t\t\t\t\tfactory=null;\r\n\t\t\t\t\tdao_userWise=null;\r\n\t\t\t\t\tdao_propwise=null;\r\n\t\t\t\t\tsession2=null;\r\n\t\t\t\t}\r\n\t\t\t\tSystem.gc();\r\n\t\t\t\treturn \"clientReport\";\r\n\t\t\t}\r\n\r\n\t\t\tfactory=null;\r\n\t\t\tdao_userWise=null;\r\n\t\t\tdao_propwise=null;\r\n\t\t\tsession2=null;\r\n\t\t\tSystem.gc();\r\n\t\t\treturn SUCCESS;\r\n\t\t}\r\n\t}", "public String[][][] getSchedule(int userId)throws SQLException{\n //create the arrays\n String[] startTimes;\n String[] endTimes;\n String[] titles;\n String[] locations;\n String[][] times;\n String[][] data;\n String[][][] results;\n \n //declare the size int, used to initialize the arrays\n int size = 0;\n \n //Create the LocalDate objects to use in query\n LocalDate date = LocalDate.now();\n Month month = date.getMonth();\n int year = date.getYear();\n int firstDay = 1;\n int lastDay = date.lengthOfMonth();\n LocalDate begin = LocalDate.of(year, month, firstDay);\n LocalDate end = LocalDate.of(year, month, lastDay);\n \n //Establish the connection\n Connection conn = DriverManager.getConnection(url, user, pass);\n \n //Run query and set size value\n String query = \"SELECT COUNT(*) FROM appointment WHERE userId = \"\n + userId + \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\";\n PreparedStatement ps = conn.prepareStatement(query);\n \n ResultSet set = ps.executeQuery(query);\n ResultSetMetaData meta = set.getMetaData();\n int columns = meta.getColumnCount();\n \n while(set.next()){\n for(int i = 1; i <= columns; i++){\n size = set.getInt(i);\n }\n } \n \n //initialize the arrays\n startTimes = new String[size];\n endTimes = new String[size];\n titles = new String[size];\n locations = new String[size];\n \n //Populate the startTimes array\n int x = 0;\n query = \"SELECT start FROM appointment WHERE userId = \" + userId \n + \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\";\n ps = conn.prepareStatement(query);\n \n set = ps.executeQuery(query);\n meta = set.getMetaData();\n columns = meta.getColumnCount();\n \n while(set.next()){\n for(int i = 1; i <= columns; i++){\n String value = set.getString(i);\n startTimes[x] = value;\n x++;\n }\n } \n \n //Populate the endTimes array\n x = 0;\n set = ps.executeQuery(\"SELECT end FROM appointment WHERE userId = \" + userId + \n \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\");\n meta = set.getMetaData();\n columns = meta.getColumnCount();\n while(set.next()){\n for(int i = 1; i <= columns; i++){\n String value = set.getString(i);\n endTimes[x] = value;\n x++;\n }\n }\n \n //Populate the titles array\n x = 0;\n set = ps.executeQuery(\"SELECT title FROM appointment WHERE userId = \" + userId + \n \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\");\n meta = set.getMetaData();\n columns = meta.getColumnCount();\n while(set.next()){\n for(int i = 1; i <= columns; i++){\n String value = set.getString(i);\n titles[x] = value;\n x++;\n }\n }\n \n //Populate the descriptions array\n x = 0;\n set = ps.executeQuery(\"SELECT location FROM appointment WHERE userId = \" + userId + \n \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\");\n meta = set.getMetaData();\n columns = meta.getColumnCount();\n while(set.next()){\n for(int i = 1; i <= columns; i++){\n String value = set.getString(i);\n locations[x] = value;\n x++;\n }\n }\n \n //initialize the matrices\n data = new String[][]{titles, locations};\n times = new String[][]{startTimes, endTimes};\n \n results = new String[][][]{data, times};\n return results;\n \n }", "protected Totals extractRegularPaymentsForChart(String campusCode, Person puser, Date processRunDate, Batch batch) {\r\n LOG.debug(\"START - extractRegularPaymentsForChart()\");\r\n\r\n Totals totals = new Totals();\r\n\r\n java.sql.Date onOrBeforePaymentRequestPayDate = KfsDateUtils.convertToSqlDate(purapRunDateService.calculateRunDate(processRunDate));\r\n\r\n List<String> preqsWithOutstandingCreditMemos = new ArrayList<String>();\r\n\r\n Set<VendorGroupingHelper> vendors = creditMemoService.getVendorsOnCreditMemosToExtract(campusCode);\r\n for (VendorGroupingHelper vendor : vendors) {\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(\"Processing Vendor: \" + vendor);\r\n }\r\n\r\n Map<String, List<PaymentRequestDocument>> bankCodePaymentRequests = new HashMap<String, List<PaymentRequestDocument>>();\r\n Map<String, List<VendorCreditMemoDocument>> bankCodeCreditMemos = new HashMap<String, List<VendorCreditMemoDocument>>();\r\n\r\n // Get all the matching credit memos\r\n Collection<VendorCreditMemoDocument> vendorMemos = creditMemoService.getCreditMemosToExtractByVendor(campusCode, vendor);\r\n for (VendorCreditMemoDocument cmd : vendorMemos) {\r\n List<VendorCreditMemoDocument> bankMemos = new ArrayList<VendorCreditMemoDocument>();\r\n if (bankCodeCreditMemos.containsKey(cmd.getBankCode())) {\r\n bankMemos = bankCodeCreditMemos.get(cmd.getBankCode());\r\n }\r\n\r\n bankMemos.add(cmd);\r\n bankCodeCreditMemos.put(cmd.getBankCode(), bankMemos);\r\n }\r\n\r\n // get all matching payment requests\r\n Collection<PaymentRequestDocument> vendorPreqs = paymentRequestService.getPaymentRequestsToExtractByVendor(campusCode, vendor, onOrBeforePaymentRequestPayDate);\r\n for (PaymentRequestDocument prd : vendorPreqs) {\r\n List<PaymentRequestDocument> bankPreqs = new ArrayList<PaymentRequestDocument>();\r\n if (bankCodePaymentRequests.containsKey(prd.getBankCode())) {\r\n bankPreqs = bankCodePaymentRequests.get(prd.getBankCode());\r\n }\r\n\r\n bankPreqs.add(prd);\r\n bankCodePaymentRequests.put(prd.getBankCode(), bankPreqs);\r\n }\r\n\r\n // if bank functionality enabled, create bundles by bank, else just by vendor\r\n if (bankService.isBankSpecificationEnabled()) {\r\n for (String bankCode : bankCodePaymentRequests.keySet()) {\r\n // if we have credit memos with bank code, process together, else let the preq go and will get picked up below\r\n // and processed as a single payment group\r\n if (bankCodeCreditMemos.containsKey(bankCode)) {\r\n processPaymentBundle(bankCodePaymentRequests.get(bankCode), bankCodeCreditMemos.get(bankCode), totals, preqsWithOutstandingCreditMemos, puser, processRunDate, batch);\r\n }\r\n }\r\n } else {\r\n if (vendorMemos.isEmpty()) {\r\n processPaymentBundle((List<PaymentRequestDocument>) vendorPreqs, (List<VendorCreditMemoDocument>) vendorMemos, totals, preqsWithOutstandingCreditMemos, puser, processRunDate, batch);\r\n }\r\n }\r\n }\r\n\r\n LOG.debug(\"processing PREQs without CMs\");\r\n\r\n Iterator<PaymentRequestDocument> paymentRequests = paymentRequestService.getPaymentRequestToExtractByChart(campusCode, onOrBeforePaymentRequestPayDate).iterator();\r\n while (paymentRequests.hasNext()) {\r\n PaymentRequestDocument prd = paymentRequests.next();\r\n // if in the list created above, don't create the payment group\r\n if (!preqsWithOutstandingCreditMemos.contains(prd.getDocumentNumber())) {\r\n PaymentGroup paymentGroup = processSinglePaymentRequestDocument(prd, batch, puser, processRunDate);\r\n\r\n totals.count = totals.count + paymentGroup.getPaymentDetails().size();\r\n totals.totalAmount = totals.totalAmount.add(paymentGroup.getNetPaymentAmount());\r\n }\r\n }\r\n\r\n\r\n LOG.debug(\"END - extractRegularPaymentsForChart()\");\r\n return totals;\r\n }", "void processScanCoordinates(List<Long> scanTimeStampList, String scanType){\n List<LatLng> scanCoordinates = new ArrayList<>();\n System.out.println(\"LENGTH BEFOREEEE\" + scanTimeStampList.size() + scanType);\n for(int i = 0; i < stepTimeStamp.size()-1;i++){\n long upperTimeBound = stepTimeStamp.get((i+1));\n long lowerTimeBound = stepTimeStamp.get(i);\n List<Integer> scanIndexWithinStep = new ArrayList<>();\n //Searches through the list of timestamps and adds the scan numbers that fall within the step to a list\n for(int j = 0; j < scanTimeStampList.size();j++){\n if(scanTimeStampList.get(j) <= upperTimeBound && scanTimeStampList.get(j)> lowerTimeBound){\n scanIndexWithinStep.add(j);\n }\n }\n if(scanIndexWithinStep.size()>0) {\n //Can loop through them as they will be sequential\n for (int k = scanIndexWithinStep.get(0); k <= scanIndexWithinStep.get(scanIndexWithinStep.size() - 1); k++) {\n //Run the algorithm for each scan that falls within the time range for each step\n double tempLat;\n double tempLong;\n //Formula from Dr. Zheng's paper\n // i here represents the number of steps as the index number in adaptiveTimeList is the step number\n if (xIncreasing) {\n tempLat = startLat + STEP_LENGTH * (i + (double) (scanTimeStampList.get(k) - lowerTimeBound) / (double) (upperTimeBound - lowerTimeBound)) * yCompMotion * degToMRatio;\n } else {\n tempLat = startLat - STEP_LENGTH * (i + (double) (scanTimeStampList.get(k) - lowerTimeBound) / (double) (upperTimeBound - lowerTimeBound)) * yCompMotion * degToMRatio;\n }\n if (yIncreasing) {\n tempLong = startLong + STEP_LENGTH * (i + (double) (scanTimeStampList.get(k) - lowerTimeBound) / (double) (upperTimeBound - lowerTimeBound)) * xCompMotion * degToMRatio;\n } else {\n tempLong = startLong - STEP_LENGTH * (i + (double) (scanTimeStampList.get(k) - lowerTimeBound) / (double) (upperTimeBound - lowerTimeBound)) * xCompMotion * degToMRatio;\n }\n scanCoordinates.add(new LatLng(tempLat, tempLong));\n }\n }\n\n }\n System.out.println(\"LENGTHHHH AFTER\" + scanCoordinates.size() + scanType);\n if(scanType == \"mag\"){\n magCoords = scanCoordinates;\n }\n else if(scanType == \"gyro\"){\n gyroCoords = scanCoordinates;\n }\n else if(scanType == \"accel\"){\n accelCoords = scanCoordinates;\n }\n else if(scanType == \"blue\"){\n blueGlobalCoords = scanCoordinates;\n }\n else if(scanType == \"red\"){\n redGlobalCoords = scanCoordinates;\n }\n }", "public HashMap<User, Integer> userWeekRanking(User user, LinkedList<User> friends, int method){\n LinkedList<User> allUsers = new LinkedList<>();\n HashMap<User, Integer> result = new HashMap<>();\n\n allUsers.add(user);\n allUsers.addAll(friends);\n\n int rank = 0;\n long lastTime = -1;\n int lastSteps = -1;\n double lastDistance = -1;\n int lastAchievementCount = -1;\n\n switch (method){\n case METHODS.TIME:\n //sort the data\n Collections.sort(allUsers, new SortWeekTime());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getActiveTimeForWeek() != lastTime) {\n rank++;\n lastTime = next.getMyTimeline().getActiveTimeForWeek();\n }\n result.put(next, rank);\n }\n\n break;\n\n case METHODS.DISTANCE:\n //sort the data\n Collections.sort(allUsers, new SortWeekDistance());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getActiveDistanceForWeek() != lastDistance) {\n rank++;\n lastDistance = next.getMyTimeline().getActiveDistanceForWeek();\n }\n result.put(next, rank);\n }\n\n break;\n\n case METHODS.STEPS:\n //sort the data\n Collections.sort(allUsers, new SortWeekSteps());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getStepsForWeek() != lastSteps) {\n rank++;\n lastSteps = next.getMyTimeline().getStepsForWeek();\n }\n result.put(next, rank);\n }\n\n break;\n\n case METHODS.ACHIEVEMENTS:\n //sort the data\n Collections.sort(allUsers, new SortWeekAchievements());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getAchievementsForWeek() != lastAchievementCount) {\n rank++;\n lastAchievementCount = next.getMyTimeline().getAchievementsForWeek();\n }\n result.put(next, rank);\n }\n\n break;\n }\n\n return result;\n }", "@Override\n public List<Activity> getActivities(int userId) throws SQLException {\n ArrayList<Activity> foundActivities = new ArrayList<>();\n\n try (Connection connection = dataSource.getConnection()) {\n String findActivitiesQuery = \"SELECT * FROM ACTIVITY WHERE USERID = ?\";\n statement = connection.prepareStatement(findActivitiesQuery);\n statement.setInt(1, userId);\n resultSet = statement.executeQuery();\n while (resultSet.next()) {\n foundActivities.add(extractActivity(resultSet));\n }\n } catch (SQLException exception) {\n throw exception;\n } finally {\n close(statement, resultSet);\n }\n return foundActivities;\n }", "@Query(\"select reportJournal_ \"\r\n\t\t\t+ \"from ReportJournal reportJournal_ \"\r\n\t\t\t+ \"where reportJournal_.id in (\"\r\n\t\t\t\t+ \" select max(r_.id) \"\r\n\t\t\t\t+ \" from ReportJournal r_ \"\r\n\t\t\t\t+ \" where r_.user.id = ?1 \"\r\n\t\t\t\t+ \" group by r_.report.id, r_.reportJournalType, r_.day) \"\r\n\t\t\t+ \"and reportJournal_.issueDate between ?2 and ?3 \"\r\n\t\t\t+ \"order by reportJournal_.eventDate DESC, reportJournal_.reportJournalType ASC \")\r\n\tList<ReportJournal> findGroupByDay(int userId, Date start, Date end);", "public ArrayList<Showing> getShowingsByDate(String date, Screen screen) throws PastDateException {\n return filmDisplay.getShowingsByDate(date, screen);\n }", "private void findStaffLinePositions()\n {\n Log.i(TAG, \"findStaffLinePositions\");\n final int sliceStart = (int)(0.45*mWidth);\n final int sliceEnd = (int)(0.65*mWidth);\n \n boolean connected;\n int lineNum;\n for(int x = sliceStart; x<sliceEnd; ++x) //only consider a slice of x values\n {\n connected=false;\n lineNum=0;\n for(int y=0; y<mHeight; ++y)\n {\n if(mHorizontalProjHist[y] >= x) //the histogram for this y value is within the slice we're looking at\n {\n if(mStaffLineMap.indexOfKey(y) < 0) //we haven't seen this y value, so add it\n {\n \tmStaffLineMap.put(y, lineNum);\n }\n connected = true;\n }\n else if(connected) //encountered whitespace after a line\n {\n lineNum++;\n connected = false;\n }\n }\n }\n\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<RAlarmLog> getAlarmDetailAssess(String dateF, String dateT,\r\n\t\t\tString catruc, String users, String status, String network,\r\n\t\t\tString neType, String severity,String columnheader, String strWhere,\r\n\t\t\tInteger startRecord, Integer endRecord,String sortfield,String sortorder) {\r\n\t\tMap<String, Object> parms = new HashMap<String, Object>();\r\n \t\tparms.put(\"P_SDATE_FROM\", dateF);\r\n \t\tparms.put(\"P_SDATE_TO\", dateT);\r\n \t\tparms.put(\"P_SHIFT\", catruc);\r\n \t\tparms.put(\"P_USERS\", users);\r\n \t\tparms.put(\"P_STATUS\", status);\r\n \t\tparms.put(\"P_NETWORK\", network);\r\n \t\tparms.put(\"P_NETYPE\", neType);\r\n \t\tparms.put(\"P_SEVERITY\", severity);\r\n \t\tparms.put(\"P_COLUMNHEADER\", columnheader);\r\n \t\tparms.put(\"P_WHERE\", strWhere);\r\n \t\tparms.put(\"P_START_RECORD\", startRecord);\r\n \t\tparms.put(\"P_END_RECORD\", endRecord);\r\n \t\tparms.put(\"P_COLUMN\", sortfield);\r\n \t\tparms.put(\"P_ORDER\", sortorder);\r\n \t\tparms.put(\"P_DATA\", null);\r\n \t\treturn getSqlMapClientTemplate().queryForList(\"R_ALARM_LOG.getAlarmDetailAssess\", parms);\r\n\t}", "@Override\n public JSONObject viewSalesCallLogByExecutive(String username) {\n\n return in_salescalllogdao.viewSalesCallLogByExecutive(username);\n }", "public HashMap<User, Integer> userMonthRanking(User user, LinkedList<User> friends, int method){\n LinkedList<User> allUsers = new LinkedList<>();\n HashMap<User, Integer> result = new HashMap<>();\n\n allUsers.add(user);\n allUsers.addAll(friends);\n\n int rank = 0;\n long lastTime = -1;\n int lastSteps = -1;\n double lastDistance = -1;\n int lastAchievementCount = -1;\n\n switch (method){\n case METHODS.TIME:\n //sort the data\n Collections.sort(allUsers, new SortMonthTime());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getActiveTimeForMonth() != lastTime) {\n rank++;\n lastTime = next.getMyTimeline().getActiveTimeForMonth();\n }\n result.put(next, rank);\n }\n\n break;\n\n case METHODS.DISTANCE:\n //sort the data\n Collections.sort(allUsers, new SortMonthDistance());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getActiveDistanceForMonth() != lastDistance) {\n rank++;\n lastDistance = next.getMyTimeline().getActiveDistanceForMonth();\n }\n result.put(next, rank);\n }\n\n break;\n\n case METHODS.STEPS:\n //sort the data\n Collections.sort(allUsers, new SortMonthSteps());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getStepsForMonth() != lastSteps) {\n rank++;\n lastSteps = next.getMyTimeline().getStepsForMonth();\n }\n result.put(next, rank);\n }\n\n break;\n\n case METHODS.ACHIEVEMENTS:\n //sort the data\n Collections.sort(allUsers, new SortMonthAchievements());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getAchievementsForMonth() != lastAchievementCount) {\n rank++;\n lastAchievementCount = next.getMyTimeline().getAchievementsForMonth();\n }\n result.put(next, rank);\n }\n\n break;\n }\n\n return result;\n }", "private String getIndexDate(String criteriaMet, Map<String, List<Info>> criteria, boolean isAny) {\n\t\tSortedSet<String> date = new TreeSet<String>();\n\t\t\n\t\tString[] crit = criteriaMet.split(\":\");\n\t\tfor(int i=0; i<crit.length; i++) {\n\t\t\tList<Info> info = criteria.get(crit[i]);\n\t\t\tif(info==null) {\n\t\t\t\tSystem.out.println(crit[i] + \" has NO Info\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t//info includes \"all\" related conditions until it satisfies the criteria\n\t\t\t//so the last element will be the earliest date that satisfies the criteria\n\t\t\tdate.add(info.get(info.size()-1).date);\n\t\t}\n\t\t\n\t\t//date is in order of earliest to latest \n\t\tif(isAny)\n\t\t\treturn date.first();\n\t\telse\n\t\t\treturn date.last();\n\t}", "@RequestMapping(\"/getUserReport\")\n public List<BookSale> getUserReport(@RequestParam(\"user_id\")int user_id,\n @RequestParam(\"start\")String start,\n @RequestParam(\"end\")String end) {\n Timestamp time1 = Timestamp.valueOf(start);\n Timestamp time2 = Timestamp.valueOf(end);\n return orderService.getUserReport(user_id, time1, time2);\n }", "public void acctReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);", "@Override\n public RoomRatesEntity findOnlineRateForRoomType(Long roomTypeId, Date currentDate) throws NoAvailableOnlineRoomRateException {\n Query query = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId\");\n query.setParameter(\"roomTypeId\", roomTypeId);\n List<RoomRatesEntity> roomRates = query.getResultList();\n\n //Check what rate type are present\n boolean normal = false;\n boolean promo = false;\n boolean peak = false;\n\n for (RoomRatesEntity roomRate : roomRates) {\n// if (!checkValidityOfRoomRate(roomRate)) { //skips expired/not started rates, price is determined by check in and check out date, it becomes not considered in our final prediction\n// continue;\n// }\n// if null do smt else\n if (roomRate.getIsDisabled() == false) {\n if (null != roomRate.getRateType()) {\n System.out.println(roomRate.getRateType());\n switch (roomRate.getRateType()) {\n case NORMAL:\n normal = true;\n \n break;\n case PROMOTIONAL:\n System.out.println(\"ValidStart \"+roomRate.getValidityStart()+\" ValidEnd: \"+roomRate.getValidityEnd()+\" CurrentDate: \"+currentDate);\n if (rateIsWithinRange(roomRate.getValidityStart(), roomRate.getValidityEnd(), currentDate)) {\n promo = true;\n }\n break;\n\n case PEAK:\n System.out.println(\"ValidStart \"+roomRate.getValidityStart()+\" ValidEnd: \"+roomRate.getValidityEnd()+\" CurrentDate: \"+currentDate);\n\n if (rateIsWithinRange(roomRate.getValidityStart(), roomRate.getValidityEnd(), currentDate)) {\n peak = true;\n }\n break;\n default:\n break;\n }\n }\n\n System.out.println(normal + \" \" + promo + \" \" + peak);\n //5 rules here\n if (normal && promo && peak) {\n //find promo\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p ORDER BY r.ratePerNight ASC\");\n rule.setParameter(\"p\", RateType.PROMOTIONAL);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getResultList().get(0);\n } else if (promo && peak && !normal || normal && peak && !promo) {\n //apply peak, assume only 1\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p\");\n rule.setParameter(\"p\", RateType.PEAK);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getSingleResult();\n } else if (normal && promo && !peak) {\n //apply promo\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p ORDER BY r.ratePerNight ASC\");\n rule.setParameter(\"p\", RateType.PROMOTIONAL);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getResultList().get(0);\n } else if (normal && !promo && !peak) {\n //apply normal\n Query rule = em.createQuery(\"SELECT r FROM RoomRatesEntity r JOIN r.roomTypeList r1 WHERE r1.roomTypeId = :roomTypeId AND r.rateType = :p\");\n rule.setParameter(\"p\", RateType.NORMAL);\n rule.setParameter(\"roomTypeId\", roomTypeId);\n\n return (RoomRatesEntity) rule.getSingleResult();\n }\n }\n\n }\n throw new NoAvailableOnlineRoomRateException(\"There is no available room rate to be used!\");\n }", "public SPResponse getHiringRoles(User user, Object[] params) {\n \n SPResponse hringRoles = new SPResponse();\n \n List<User> allUsers = new ArrayList<User>();\n Collection<? extends HiringUser> allArchivedUsers = hiringRepository.getAllArchivedUsers(user\n .getCompanyId());\n allUsers.addAll(allArchivedUsers);\n \n List<HiringUser> allCandidatesUsers = hiringRepository.getAllUsers(user.getCompanyId());\n allUsers.addAll(allCandidatesUsers);\n \n SortedMap<String, HiringRoleUserCountDTO> hiringUsersDTOMap = new TreeMap<String, HiringRoleUserCountDTO>();\n SortedMap<String, HiringRoleUserCountDTO> hiringProfileBalanceRolesMap = new TreeMap<String, HiringRoleUserCountDTO>();\n HiringRoleUserCountDTO hiringUserDTO = new HiringRoleUserCountDTO();\n HiringRoleUserCountDTO hiringUserProfielBalacneDTO = new HiringRoleUserCountDTO();\n \n allUsers.stream().forEach(ru -> {\n Set<String> roles;\n if (ru instanceof HiringUser) {\n roles = ((HiringUser) ru).getHiringRoleIds();\n } else {\n roles = ((HiringUserArchive) ru).getHiringRoleIds();\n }\n roles.stream().forEach(rl -> {\n HiringRoleUserCountDTO hiringRoleUserCountDTO = hiringUsersDTOMap.get(rl);\n if (hiringRoleUserCountDTO == null) {\n hiringRoleUserCountDTO = new HiringRoleUserCountDTO();\n hiringUsersDTOMap.put(rl, hiringRoleUserCountDTO);\n }\n hiringRoleUserCountDTO.setName(rl);\n hiringRoleUserCountDTO.setTotalMembers(hiringRoleUserCountDTO.getTotalMembers() + 1);\n if (ru.getUserStatus() == UserStatus.VALID) {\n hiringRoleUserCountDTO.setValidMembers(hiringRoleUserCountDTO.getValidMembers() + 1);\n }\n });\n \n hiringUserDTO.setTotalMembers(hiringUserDTO.getTotalMembers() + 1);\n if (ru.getUserStatus() == UserStatus.VALID) {\n hiringUserDTO.setValidMembers(hiringUserDTO.getValidMembers() + 1);\n }\n });\n \n allCandidatesUsers\n .stream()\n .forEach(\n ru -> {\n Set<String> roles = ((HiringUser) ru).getHiringRoleIds();\n roles\n .stream()\n .forEach(\n rl -> {\n HiringRoleUserCountDTO hiringRoleUserCountDTO = hiringProfileBalanceRolesMap\n .get(rl);\n if (hiringRoleUserCountDTO == null) {\n hiringRoleUserCountDTO = new HiringRoleUserCountDTO();\n hiringProfileBalanceRolesMap.put(rl, hiringRoleUserCountDTO);\n }\n hiringRoleUserCountDTO.setName(rl);\n hiringRoleUserCountDTO.setTotalMembers(hiringRoleUserCountDTO\n .getTotalMembers() + 1);\n if (ru.getUserStatus() == UserStatus.VALID) {\n hiringRoleUserCountDTO.setValidMembers(hiringRoleUserCountDTO\n .getValidMembers() + 1);\n }\n });\n \n hiringUserProfielBalacneDTO.setTotalMembers(hiringUserProfielBalacneDTO\n .getTotalMembers() + 1);\n if (ru.getUserStatus() == UserStatus.VALID) {\n hiringUserProfielBalacneDTO.setValidMembers(hiringUserProfielBalacneDTO\n .getValidMembers() + 1);\n }\n });\n \n hringRoles.add(\"filterInsightsRoles\", hiringUsersDTOMap);\n hringRoles.add(\"filterInsightsRolesAllRoles\", hiringUserDTO);\n \n hringRoles.add(\"hrProfileBalanceRoles\", hiringProfileBalanceRolesMap);\n hringRoles.add(\"hrProfileBalanceRolesAllRoles\", hiringUserProfielBalacneDTO);\n \n return hringRoles;\n }", "@Override\n public List<ScheduledInterview> getScheduledInterviewsInRangeForUser(\n String userId, Instant minTime, Instant maxTime) {\n TimeRange range = new TimeRange(minTime, maxTime);\n List<ScheduledInterview> scheduledInterviews = getForPerson(userId);\n List<ScheduledInterview> scheduledInterviewsInRange = new ArrayList<ScheduledInterview>();\n for (ScheduledInterview scheduledInterview : scheduledInterviews) {\n if (range.contains(scheduledInterview.when())) {\n scheduledInterviewsInRange.add(scheduledInterview);\n }\n }\n return scheduledInterviewsInRange;\n }", "public VatDetail[] getRetailExportVatSummaries() {\n POSLineItem[] items = compositePOSTransaction.getLineItemsArray();\n HashMap vatDetails = new HashMap();\n for (int idx = 0; idx < items.length; idx++) {\n //if(!((CMSItem)items[idx].getItem()).isConcessionItem() && !((CMSItem)items[idx].getItem()).getVatCode().equals(\"0\"))\n if (((CMSItem)items[idx].getItem()).getVatRate() != null\n && ((CMSItem)items[idx].getItem()).getVatRate().doubleValue() > 0) {\n int signMult = 1;\n if (items[idx] instanceof ReturnLineItem)\n signMult = -1;\n double rate = items[idx].getItem().getVatRate().doubleValue();\n if (vatDetails.get(((CMSItem)items[idx].getItem()).getVatRate()) == null) {\n VatDetail detail = new VatDetail(items[idx].getExtendedNetAmount().multiply(signMult)\n , items[idx].getExtendedVatAmount().multiply(signMult), rate\n , items[idx].getNetAmount().multiply(rate / (1 + rate)).multiply(signMult).round().\n multiply(items[idx].getQuantity().intValue()), items[idx].getQuantity().intValue());\n // to do: need a new vat service at item level rather than calcing right here, vatAmount = lineItemDetail.getNetAmount().multiply((1.0 - creditCardRatio * CREDIT_CARD_CHARGE_RATE) * rate / (1.0 + rate));\n vatDetails.put(items[idx].getItem().getVatRate(), detail);\n } else {\n VatDetail detail = (VatDetail)vatDetails.get(((CMSItem)items[idx].getItem()).getVatRate());\n detail.addCompositeAmount(items[idx].getExtendedNetAmount().multiply(signMult));\n detail.addVatAmount(items[idx].getExtendedVatAmount().multiply(signMult));\n detail.addOriginalVatAmount(items[idx].getNetAmount().multiply(rate / (1 + rate)).\n multiply(signMult).round().multiply(items[idx].getQuantity().intValue()));\n detail.addItemQty(items[idx].getQuantity().intValue());\n }\n }\n }\n return (VatDetail[])vatDetails.values().toArray(new VatDetail[0]);\n }", "public int[] computeAvailabilities(Building selected, Calendar selectedDate, Calendar now) {\n if (selected == null) {\n return null;\n }\n int day = selectedDate.get(Calendar.DAY_OF_WEEK);\n //some modulo shenanigans because weekDays[0] is monday but Calendar doesn't have the same\n day = day + 5;\n day = day % 7;\n Weekdays openingHoursWeek = new Weekdays(selected.getOpeningHours());\n String openingHoursDay = openingHoursWeek.getWeekdays().get(day);\n //if closed\n if (openingHoursDay.equals(Weekdays.CLOSED)) {\n return null;\n }\n int nowDay = now.get(Calendar.DAY_OF_WEEK);\n int nowMonth = now.get(Calendar.DAY_OF_MONTH);\n int dayClean = selectedDate.get(Calendar.DAY_OF_WEEK);\n int month = selectedDate.get(Calendar.DAY_OF_MONTH);\n int hours = now.get(Calendar.HOUR_OF_DAY);\n int minutes = now.get(Calendar.MINUTE);\n if (minutes != 0) {\n hours++;\n }\n String begin = openingHoursDay.split(\"-\")[0];\n String end = openingHoursDay.split(\"-\")[1];\n int beginTime = Integer.parseInt(begin.split(\":\")[0]);\n int endTime = Integer.parseInt(end.split(\":\")[0]);\n int[] res = new int[2];\n if (nowDay == dayClean\n && nowMonth == month && hours > beginTime) {\n beginTime = hours;\n }\n res[0] = beginTime;\n res[1] = endTime;\n return res;\n }", "public ApprovalAndSubmissionInfo getApprovalAndSubmissionInfo(final Employee_mst selectedEmployee,\n final Date startDate) {\n List<Monthly_report_history> listMonthlyReportHistory = this.monthly_report_historyRepository\n .findMonthlyReportHistoryByEmployeeAndStartDate(selectedEmployee.getEmp_code(),\n DateUtils.getMonth(startDate), DateUtils.getYear(startDate))\n .getResultList();\n ApprovalAndSubmissionInfo info = new ApprovalAndSubmissionInfo();\n int countSubmission = 0;\n int countReject = 0;\n int countApprove = 0;\n int countReOpen = 0;\n\n for (int i = 0; i < listMonthlyReportHistory.size(); i++) {\n\n String type = listMonthlyReportHistory.get(i).getSousa();\n Monthly_report_history history = listMonthlyReportHistory.get(i);\n switch (type) {\n case SummaryReportConstants.MonthlyReportHisotry.SUBMISSION:\n countSubmission++;\n if (info.getDateSubmissions() == null) {\n info.setDateSubmissions(listMonthlyReportHistory.get(i).getSousa_jiten());\n }\n break;\n case SummaryReportConstants.MonthlyReportHisotry.REJECT:\n countReject++;\n if (info.getDateReject() == null) {\n info.setDateReject(listMonthlyReportHistory.get(i).getSousa_jiten());\n info.setRejectedBy(listMonthlyReportHistory.get(i).getEmployee_mst().getEmp_name());\n info.setRejectComment(history.getComment());\n }\n break;\n case SummaryReportConstants.MonthlyReportHisotry.APPROVE:\n countApprove++;\n if (info.getDateApproval() == null) {\n info.setDateApproval(listMonthlyReportHistory.get(i).getSousa_jiten());\n info.setApprover(listMonthlyReportHistory.get(i).getEmployee_mst().getEmp_name());\n }\n break;\n case SummaryReportConstants.MonthlyReportHisotry.REOPEN:\n countReOpen++;\n if (info.getDateReOpen() == null) {\n info.setDateReOpen(listMonthlyReportHistory.get(i).getSousa_jiten());\n info.setReOpenedBy(listMonthlyReportHistory.get(i).getEmployee_mst().getEmp_name());\n info.setReopenComment(history.getComment());\n }\n break;\n default:\n break;\n }\n }\n\n info.setNumberOfSubmissions(countSubmission);\n info.setNumberOfReject(countReject);\n info.setNumberOfApprove(countApprove);\n info.setNumberOfReOpen(countReOpen);\n return info;\n }", "public Map<LocalDate,Double> getTradeValuesByDate(List<Trade> tradeList,String tradeType) {\n\t\t\r\n\t\tMap<LocalDate,Double> tradesValueMap= new TreeMap();\r\n\t\tfor(Trade t: tradeList){\r\n\t\t\tif (t.getInstructionType().equalsIgnoreCase(tradeType)) {\r\n\t\t\t\tLocalDate dateKey = t.getSettlementDate();\r\n\t\t\t\tdouble tradeAmount = t.getTotalAmount();\r\n\t\t\t\tif (tradesValueMap.get(dateKey) != null) {\r\n\t\t\t\t\ttradeAmount += tradesValueMap.get(dateKey);\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttradesValueMap.put(dateKey, tradeAmount);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn tradesValueMap;\r\n\t}", "public void consumeEvent(InteractionEvent event, int userId) {\n \t\tif (!interactionHistorySizes.containsKey(userId)) {\n \t\t\tinteractionHistorySizes.put(userId, 0);\n \t\t}\n \t\tinteractionHistorySizes.put(userId, interactionHistorySizes.get(userId) + 1);\n \n \t\t// Record start and end date of history\n \t\tList<Date> dateRange;\n \t\tif (!interactionHistoryRanges.containsKey(userId)) {\n \t\t\t// There are two positions in the array: start and end date\n \t\t\tdateRange = new ArrayList<Date>(2);\n \t\t\tinteractionHistoryRanges.put(userId, dateRange);\n \t\t}\n \t\tdateRange = interactionHistoryRanges.get(userId);\n \t\tif (dateRange.size() == 0) {\n \t\t\tdateRange.add(event.getDate());\n \t\t} else if (dateRange.size() == 1) {\n \t\t\tdateRange.add(event.getDate());\n \t\t} else {\n \t\t\tdateRange.set(endDatePosition, event.getDate());\n \t\t}\n \n \t\t// Accumulate active duration -- assumes see all of events of a user in\n \t\t// order\n \t\tif (currentUser == -1 || currentUser != userId) {\n \t\t\tlastUserEvent = event;\n \t\t\tcurrentUser = userId;\n \t\t}\n \t\t// Restart accumulation if greater than 5 min has elapsed between events\n \t\tlong elapsed = event.getDate().getTime() - lastUserEvent.getDate().getTime();\n \t\tif (elapsed < FIVEMININMS) {\n \t\t\tif (!interactionHistoryActiveDuration.containsKey(userId)) {\n \t\t\t\tinteractionHistoryActiveDuration.put(userId, new Long(0));\n \t\t\t}\n \t\t\tinteractionHistoryActiveDuration.put(userId, interactionHistoryActiveDuration.get(userId) + elapsed);\n \t\t}\n \t\tlastUserEvent = event;\n \n \t}", "public Record query(final PlayerType p_type,\n\t\t\tfinal int p_queryDate)\n\t\t\tthrows RemoteException \n\t{\n\t\tfor(int x= 0; x <= 100; x++)\n\t {\n\t\t \n\t\t records [x][1] = query(PlayerType.LEADER, x);\n\t\t records [x][2] = query(PlayerType.FOLLOWER, x);\n\t\t \n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public static List<List<int>> getAR(DateTime dateFrom, DateTime dateTo, List<DashboardAR> listDashAR) throws Exception {\n if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)\n {\n return Meth.<List<List<int>>>GetObject(MethodBase.GetCurrentMethod(), dateFrom, dateTo, listDashAR);\n }\n \n //assumes that dateFrom is the first of the month and that there are 12 periods\n //listDashAR may be empty, in which case, this routine will take about 18 seconds, but the user was warned.\n //listDashAR may also me incomplete, especially the most recent month(s).\n String command = new String();\n List<int> listInt = new List<int>();\n listInt = new List<int>();\n boolean agingWasRun = false;\n for (int i = 0;i < 12;i++)\n {\n DateTime dateLastOfMonth = dateFrom.AddMonths(i + 1).AddDays(-1);\n DashboardAR dash = null;\n for (int d = 0;d < listDashAR.Count;d++)\n {\n if (listDashAR[d].DateCalc != dateLastOfMonth)\n {\n continue;\n }\n \n dash = listDashAR[d];\n }\n if (dash != null)\n {\n //we found a DashboardAR object from the database for this month, so use it.\n listInt.Add((int)dash.BalTotal);\n continue;\n }\n \n agingWasRun = true;\n //run historical aging on all patients based on the date entered.\n Ledgers.ComputeAging(0, dateLastOfMonth, true);\n command = \"SELECT SUM(Bal_0_30+Bal_31_60+Bal_61_90+BalOver90),SUM(InsEst) FROM patient\";\n DataTable table = Db.getTable(command);\n dash = new DashboardAR();\n dash.DateCalc = dateLastOfMonth;\n dash.BalTotal = PIn.Double(table.Rows[0][0].ToString());\n dash.InsEst = PIn.Double(table.Rows[0][1].ToString());\n DashboardARs.insert(dash);\n //save it to the db for later.\n listInt.Add((int)dash.BalTotal);\n }\n //and also use it now.\n if (agingWasRun)\n {\n Ledgers.runAging();\n }\n \n //set aging back to normal\n List<List<int>> retVal = new List<List<int>>();\n retVal.Add(listInt);\n return retVal;\n }", "@GetMapping(\"/total-sum-between-dates\")\n\tpublic Double getTotalTransactionsSumBetweenDatesByType(\n\t\t@RequestParam String type,\n\t\t@RequestParam @DateTimeFormat(pattern = \"dd.MM.yyyy\") Date startDate,\n\t\t@RequestParam @DateTimeFormat(pattern = \"dd.MM.yyyy\") Date endDate) \n\t{\n\t\tDouble totalSum = null;\n\t\t\n\t\ttry {\n\t\t\ttotalSum = transactionService.getTotalTransactionsSumBetweenDatesByType(type, startDate, endDate);\n\t\t}\n\t\tcatch (InvalidDataException e) {\n\t\t\tString exceptionMessage = e.getMessage();\n\t\t\tthrow new InvalidDataException(exceptionMessage);\n\t\t}\n\t\t\n\t\treturn totalSum;\n\t}", "@TaDaMethod(variablesToTrack = {\"ssn\", \"weekWage\", \"workWeeks\", \"ssn2\",\n\t\t\t\"capitalGains\", \"capitalLosses\", \"stockDividends\"}, \n\t\t\tcorrespondingDatabaseAttribute = {\"job.ssn\", \"job.WEEKWAGE\", \"job.WORKWEEKS\", \"investment.ssn\",\n\t\t\t\"investment.CAPITALGAINS\", \"investment.CAPITALLOSSES\", \"investment.STOCKDIVIDENDS\"})\n\tprivate void calculateSlopesAndIntercepts(){\n\t\tHashMap<Integer, Integer> ssnWeekWage = new HashMap<Integer, Integer>();\n\t\tHashMap<Integer, Integer> ssnWorkWeeks = new HashMap<Integer, Integer>();\n\t\tHashMap<Integer, Integer> ssnInvestmentIncome = new HashMap<Integer, Integer>();\n\t\t\n\t\ttry {\n\t\t\tstatement = Factory.getConnection().createStatement();\n\t results = statement.executeQuery(\"SELECT SSN, WEEKWAGE, WORKWEEKS from job\"); \n\t while(results.next()){\n\t \tif(results.getString(\"SSN\") == null || results.getString(\"WEEKWAGE\") == null || results.getString(\"WORKWEEKS\") == null){\n\t \t\tcontinue;\n\t \t}\n\t \tint ssn = results.getInt(\"SSN\");\n\t \tint weekWage = results.getInt(\"WEEKWAGE\");\n\t \tint workWeeks = results.getInt(\"WORKWEEKS\");\n\t \t\n\t \tssnWeekWage.put(ssn, weekWage);\n\t \tssnWorkWeeks.put(ssn, workWeeks);\n\t }\n\t \n\t results = statement.executeQuery(\"SELECT SSN, CAPITALGAINS, CAPITALLOSSES, STOCKDIVIDENDS from investment\");\n\t while(results.next()){\n\t \tif(results.getString(\"SSN\") == null || results.getString(\"CAPITALGAINS\") == null || results.getString(\"CAPITALLOSSES\") == null || results.getString(\"STOCKDIVIDENDS\") == null){\n\t \t\tcontinue;\n\t \t}\n\t \tint ssn2 = results.getInt(\"SSN\");\n\t \tint capitalGains = results.getInt(\"CAPITALGAINS\");\n\t \tint capitalLosses = results.getInt(\"CAPITALLOSSES\");\n\t \tint stockDividends = results.getInt(\"STOCKDIVIDENDS\");\n\t \tint investmentIncome = capitalGains + stockDividends + capitalLosses;\n\t \t\n\t \tssnInvestmentIncome.put(ssn2, investmentIncome);\n\t }\n\t \n\t // Calculate Cofficients\n\t // Build an array list of Work Weeks and an array list of Income;\n\t ArrayList<Integer> workWeeksList = new ArrayList<Integer>();\n\t ArrayList<Integer> incomeList = new ArrayList<Integer>();\n\t ArrayList<Integer> weeklyWageList = new ArrayList<Integer>();\n\t ArrayList<Integer> investmentList = new ArrayList<Integer>();\n\t ArrayList<Integer> incomeListForInvestment = new ArrayList<Integer>();\n\t \n\t for (Iterator<Integer> i = ssnWorkWeeks.keySet().iterator(); i.hasNext();){\n\t \tint SSNkey = (Integer) i.next();\n\t \tif(ssnWorkWeeks.get(SSNkey) != null && ssnWeekWage.get(SSNkey) != null){\n\t\t \tint workWeeks = (Integer) ssnWorkWeeks.get(SSNkey);\n\t\t \tint weekWage = (Integer) ssnWeekWage.get(SSNkey);\n\t\t \tif(workWeeks > 0 && weekWage > 0){\n\t\t \t\tworkWeeksList.add(workWeeks);\n\t\t\t \tincomeList.add(workWeeks * weekWage);\n\t\t\t \tweeklyWageList.add(weekWage);\n\t\t\t \tif(ssnInvestmentIncome.get(SSNkey) != null && ssnInvestmentIncome.get(SSNkey) != null){\n\t\t\t \t\tint investmentIncome = (Integer) ssnInvestmentIncome.get(SSNkey);\n\t\t\t \t\tinvestmentList.add(investmentIncome);\n\t\t\t \t\tincomeListForInvestment.add(workWeeks * weekWage);\n\t\t\t \t}\n\t\t \t}\n\t \t}\n\t }\n\t \n\t // Set the member variable for the cofficients for given Work Weeks find Income\n\t workWeeksFindIncome = new CalculateRegression().calculateRegressionNumbers(workWeeksList,incomeList);\n\t \n\t // Set the member variable for the cofficients for given Weekly Wage find Income\n\t weeklyWageFindIncome = new CalculateRegression().calculateRegressionNumbers(weeklyWageList,incomeList);\n\t \n\t // Set the member variable for the cofficients for given InvestmentIncome find Income \n\t investmentIncomeFindIncome = new CalculateRegression().calculateRegressionNumbers(investmentList,incomeListForInvestment);\n\t \n\t\t} catch (SQLException e) {\n\t while (e != null)\n\t {\n\t System.err.println(\"\\n----- SQLException -----\");\n\t System.err.println(\" SQL State: \" + e.getSQLState());\n\t System.err.println(\" Error Code: \" + e.getErrorCode());\n\t System.err.println(\" Message: \" + e.getMessage());\n\t // for stack traces, refer to derby.log or uncomment this:\n\t //e.printStackTrace(System.err);\n\t e = e.getNextException();\n\t }\n\t\t}\t\n\t\t\n\t}", "public List<AttendanceRecord> getMyAttendance(SystemAccount user, int month, int year){\n Calendar cal = Calendar.getInstance();\n List<AttendanceRecord> returnList = new ArrayList<>();\n\n for(AttendanceRecord ar:arDao.findAll()){\n cal.setTime(ar.getDate());\n\n if( (cal.get(Calendar.MONTH)+1)==month && cal.get(Calendar.YEAR)==year && ar.getStaff().getStaffId().equalsIgnoreCase(user.getStaff().getStaffId()) ){\n returnList.add(ar);\n }\n }\n\n return returnList;\n }", "private Collection<ContractsGrantsInvoiceDocument> getInvoicesByParametersFromRequest(InvoiceReportDeliveryForm form) throws WorkflowException, ParseException {\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"mm/dd/yyyy\");\r\n SimpleDateFormat reqDateFormat = new SimpleDateFormat(\"yyyy-mm-dd hh:mm:ss\");\r\n Timestamp fromDate = null;\r\n Timestamp toDate = null;\r\n if (StringUtils.isNotEmpty(form.getToDate())) {\r\n toDate = Timestamp.valueOf(reqDateFormat.format(dateFormat.parse(form.getToDate())));\r\n }\r\n if (StringUtils.isNotEmpty(form.getFromDate())) {\r\n fromDate = Timestamp.valueOf(reqDateFormat.format(dateFormat.parse(form.getFromDate())));\r\n }\r\n String user = form.getUserId();\r\n ContractsGrantsInvoiceDocumentService invoiceDocumentService = SpringContext.getBean(ContractsGrantsInvoiceDocumentService.class);\r\n Map<String, String> fieldValues = new HashMap<String, String>();\r\n if (StringUtils.isNotEmpty(form.getProposalNumber())) {\r\n fieldValues.put(\"proposalNumber\", form.getProposalNumber());\r\n }\r\n if (StringUtils.isNotEmpty(form.getDocumentNumber())) {\r\n fieldValues.put(\"documentNumber\", form.getDocumentNumber());\r\n }\r\n if (ObjectUtils.isNotNull(form.getInvoiceAmount())) {\r\n fieldValues.put(\"documentHeader.financialDocumentTotalAmount\", form.getInvoiceAmount());\r\n }\r\n if (StringUtils.isNotEmpty(form.getChartCode())) {\r\n fieldValues.put(ArPropertyConstants.CustomerInvoiceDocumentFields.BILL_BY_CHART_OF_ACCOUNT_CODE, form.getChartCode());\r\n }\r\n if (StringUtils.isNotEmpty(form.getOrgCode())) {\r\n fieldValues.put(ArPropertyConstants.CustomerInvoiceDocumentFields.BILLED_BY_ORGANIZATION_CODE, form.getOrgCode());\r\n }\r\n Collection<ContractsGrantsInvoiceDocument> list = invoiceDocumentService.retrieveAllCGInvoicesByCriteria(fieldValues);\r\n Collection<ContractsGrantsInvoiceDocument> finalList = new ArrayList<ContractsGrantsInvoiceDocument>();\r\n if (CollectionUtils.isEmpty(list)) {\r\n return null;\r\n }\r\n for (ContractsGrantsInvoiceDocument item : list) {\r\n Document document = SpringContext.getBean(DocumentService.class).getByDocumentHeaderId(item.getDocumentNumber());\r\n if (ArConstants.ArDocumentTypeCodes.CONTRACTS_GRANTS_INVOICE.equals(document.getDocumentHeader().getWorkflowDocument().getDocumentTypeName())) {\r\n ContractsGrantsInvoiceDocument invoice = (ContractsGrantsInvoiceDocument) document;\r\n if (invoice.getDocumentHeader().getWorkflowDocument().isFinal()) {\r\n if (StringUtils.isNotEmpty(user)) {\r\n Person person = SpringContext.getBean(PersonService.class).getPersonByPrincipalName(user);\r\n if (person == null) {\r\n throw new IllegalArgumentException(\"The parameter value for initiatorPrincipalName [\" + user + \"] passed in does not map to a person.\");\r\n }\r\n if (StringUtils.equalsIgnoreCase(invoice.getDocumentHeader().getWorkflowDocument().getInitiatorPrincipalId(), person.getPrincipalId())) {\r\n // if (invoice.getDocumentHeader().getWorkflowDocument().userIsInitiator(person)){\r\n }\r\n if (invoice.getDocumentHeader().getWorkflowDocument().getInitiatorPrincipalId().equals(person.getPrincipalId())) {\r\n if (this.isInvoiceBetween(invoice, fromDate, toDate)) {\r\n if (ObjectUtils.isNull(invoice.getDateReportProcessed()) || ObjectUtils.isNull(invoice.getMarkedForProcessing())) {\r\n finalList.add(invoice);\r\n }\r\n }\r\n }\r\n }\r\n else if (this.isInvoiceBetween(invoice, fromDate, toDate)) {\r\n if (ObjectUtils.isNull(invoice.getDateReportProcessed()) || ObjectUtils.isNull(invoice.getMarkedForProcessing())) {\r\n finalList.add(invoice);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return finalList;\r\n }", "protected abstract Hashtable<RestrictionType, HashSet> getActivityRestrictions(StreamView compositeStream,\n long inUserId);", "@Override\r\n @SuppressWarnings(\"unchecked\")\r\n public Serializable execute(final PrincipalActionContext inActionContext)\r\n {\r\n // get the user's accountId\r\n final String userAccountId = inActionContext.getPrincipal().getAccountId();\r\n\r\n // get the user's Id\r\n final long userEntityId = inActionContext.getPrincipal().getId();\r\n\r\n // get the request\r\n GetActivitiesByCompositeStreamRequest inRequest = (GetActivitiesByCompositeStreamRequest) inActionContext\r\n .getParams();\r\n\r\n List<Long> allKeys;\r\n\r\n // Get the list of activity ids from the context state, if possible (should be set by validation strategy)\r\n if (inActionContext.getState().containsKey(\"activityIds\"))\r\n {\r\n allKeys = (List<Long>) inActionContext.getState().get(\"activityIds\");\r\n }\r\n else\r\n {\r\n // Gets the list of activity ids for this composite stream\r\n if (log.isTraceEnabled())\r\n {\r\n log.trace(\"Loading list of activity ids for composite stream with id #\"\r\n + inRequest.getCompositeStreamId() + \", person id #\" + userEntityId);\r\n }\r\n allKeys = idsMapper.execute(inRequest.getCompositeStreamId(), userEntityId);\r\n }\r\n\r\n // the list of activities to return\r\n List<ActivityDTO> results = new ArrayList<ActivityDTO>();\r\n\r\n // the results list\r\n PagedSet<ActivityDTO> pagedSet = new PagedSet<ActivityDTO>();\r\n pagedSet.setPagedSet(results);\r\n pagedSet.setTotal(allKeys.size());\r\n\r\n // The set of group ids that the user can see - this is only fetched if\r\n // necessary\r\n GroupIdSetWrapper accessibleGroupIdsSetWrapper = new GroupIdSetWrapper(userEntityId);\r\n\r\n // used for paging, this is the next activity in the list to add to the\r\n // current page\r\n int startingIndex = 0;\r\n\r\n // the batch size for each page - increases with every page with\r\n // batchPageSizeMultiplier\r\n int batchSize = inRequest.getMaxResults();\r\n\r\n // paging loop\r\n do\r\n {\r\n // multiply the batch size by the multiplier to avoid extra cache\r\n // hits\r\n batchSize *= batchPageSizeMultiplier;\r\n\r\n // build a list of activity ids to fetch for this page, and\r\n // increment the start index for next page\r\n List<Long> page = new ArrayList<Long>();\r\n\r\n // the starting index for this batch - for logging\r\n int thisBatchStartIndex = -1;\r\n for (int i = startingIndex; i < allKeys.size() && page.size() < batchSize; i++, startingIndex++)\r\n {\r\n if (allKeys.get(i) < inRequest.getMaxActivityId() && allKeys.get(i) > inRequest.getMinActivityId())\r\n {\r\n if (thisBatchStartIndex < 0)\r\n {\r\n thisBatchStartIndex = i;\r\n }\r\n page.add(allKeys.get(i));\r\n }\r\n }\r\n\r\n if (log.isTraceEnabled())\r\n {\r\n log.trace(\"Paging loop - page size: \" + inRequest.getMaxResults() + \"; batchSize: \" + batchSize\r\n + \"; activity list size: \" + allKeys.size() + \"; starting index: \" + thisBatchStartIndex);\r\n }\r\n\r\n // get the activities from cache to see which we have access to\r\n List<ActivityDTO> pagedResults = bulkActivitiesMapper.execute(page);\r\n\r\n // add the activities that the user can see to the result page\r\n for (int i = 0; i < pagedResults.size() && results.size() < inRequest.getMaxResults(); i++)\r\n {\r\n ActivityDTO activityDTO = pagedResults.get(i);\r\n\r\n if (hasAccessToActivity(userEntityId, activityDTO, accessibleGroupIdsSetWrapper))\r\n {\r\n results.add(activityDTO);\r\n }\r\n }\r\n }\r\n while (results.size() < inRequest.getMaxResults() && startingIndex < allKeys.size());\r\n\r\n PersonModelView person = peopleMapper.execute(Arrays.asList(userAccountId)).get(0);\r\n\r\n // execute filter strategies.\r\n for (ActivityFilter filter : filters)\r\n {\r\n filter.filter(results, person);\r\n }\r\n\r\n if (log.isTraceEnabled())\r\n {\r\n log.trace(\"Returning \" + results.size() + \" activities.\");\r\n }\r\n return pagedSet;\r\n }", "public SPResponse getHirngFilterInsights(User user, Object[] params) {\n \n String userCompanyId = user.getCompanyId();\n \n Company company = companyFactory.getCompany(user.getCompanyId());\n \n Account account = null;\n if (company != null) {\n account = accountRepository.findAccountByCompanyId(company.getId());\n } else {\n throw new InvalidRequestException(\"Company cannot be null\");\n }\n \n // hiring role\n String role = (String) params[0];\n \n HiringFilterInsights hiringFilterInsights = null;\n SPResponse profileResponse = new SPResponse();\n \n // access to hiring insights is available only for Plan type IntelligentHiring\n if (account != null && account.getSpPlanMap().containsKey(SPPlanType.IntelligentHiring)) {\n hiringFilterInsights = spectrumFactory.getHiringFilterInsights(userCompanyId, role);\n LOG.debug(\"Hiring Filter insgits returened is \" + hiringFilterInsights);\n profileResponse.add(\"hringFiterInsights\", hiringFilterInsights);\n profileResponse.isSuccess();\n \n } else {\n \n LOG.debug(\"User \" + user.getId() + \" does not have access to Hiring Filter Insights\");\n profileResponse.addError(new SPException(\n \"User does not have access to Hiring Filter Insights\"));\n \n }\n return profileResponse;\n \n }", "private void viewReportList(int userGroupID){\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(\"select * from reports where user_group_id=\" + userGroupID + \" order by week asc\");\n\t\t\t//create table\n\t\t\tout.println(\"<form name=\" + formElement(\"input\") + \" method=\" + formElement(\"post\")+ \">\");\n\t\t\tout.println(\"<h1>Time Reports - View</h1>\");\n\t\t\tout.println(\"Select a time report to view\");\n\t\t out.println(\"<table border=\" + formElement(\"1\") + \">\");\n\t\t out.println(\"<tr><td>Selection</td><td>Last update</td><td>Week</td><td>Total Time</td><td>Signed</td></tr>\");\n\t\t int inWhile = 0; \n\t \t\n\t\t while(rs.next()){\t\t \t\n\t\t \tinWhile = 1;\n\t\t \tString reportID = \"\"+rs.getInt(\"ID\");\n\t\t\t\tDate date = rs.getDate(\"date\"); \n\t\t\t\tint week = rs.getInt(\"week\");\n\t\t\t\tint totalTime = rs.getInt(\"total_time\");\n\t\t\t\tint signed = rs.getInt(\"signed\");\n\t\t\t\t//print in box\n\t\t\t\tout.println(\"<tr>\");\n\t\t\t\tout.println(\"<td>\" + \"<input type=\" + formElement(\"radio\") + \" name=\" + formElement(\"reportID\") +\n\t\t\t\t\t\t\" value=\" + formElement(reportID) +\"></td>\");\t\t//radiobutton\n\t\t\t\tout.println(\"<td>\" + date.toString() + \"</td>\");\n\t\t\t\tout.println(\"<td>\" + week + \"</td>\");\n\t\t\t\tout.println(\"<td>\" + totalTime + \"</td>\");\n\t\t\t\tout.println(\"<td>\" + signString(signed) + \"</td>\");\n\t\t\t\tout.println(\"</tr>\");\n\t\t\t}\n\t\t out.println(\"</table>\");\n\t\t out.println(\"<hidden name='function' value='viewReport'>\");\t\t \n\t\t out.println(\"<input type=\" + formElement(\"submit\") + \" value=\"+ formElement(\"View\") +\">\");\n\t\t out.println(\"</form>\");\n\t\t if (inWhile == 0){\n\t\t \tout.println(\"No reports to show\");\n\t\t }\n\t\t} catch(SQLException e) {\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t}\t\n\t}", "public void userAppointmentsReport() {\n reportLabel.setText(\"\");\n reportLabel1.setText(\"\");\n reportLabel2.setText(\"\");\n reportLabel3.setText(\"\");\n reportsList = DBReports.getUserAppointments();\n System.out.println(reportsList.toArray().length);\n StringBuilder sb = new StringBuilder();\n sb.append(\"Appointments Added By User Report:\" + \"\\n\");\n\n reportsList.forEach(r -> sb.append(\"\\n\" + r.getUserName().toUpperCase() + \"\\n\" +\n r.getAppointmentCount() + \" appointments scheduled for \" + r.getCustomerCount() + \" customers\\n\"));\n reportLabel.setText(sb.toString());\n }", "List<UserPosition> getUserPositionByIdTravelAndDate(Long id_travel, Date date);" ]
[ "0.56312335", "0.5093992", "0.50929964", "0.49279225", "0.4873292", "0.48309442", "0.48221737", "0.48187125", "0.4779381", "0.4737812", "0.47121784", "0.4658138", "0.46086347", "0.45676205", "0.4564138", "0.45578098", "0.45575392", "0.4552486", "0.45401233", "0.4511556", "0.45030513", "0.448702", "0.44679877", "0.4447763", "0.4397046", "0.43923554", "0.438418", "0.43493617", "0.4342249", "0.43237007", "0.43226355", "0.43188465", "0.43100068", "0.42919675", "0.42823637", "0.42774698", "0.42710096", "0.4267514", "0.42666328", "0.4265666", "0.42602178", "0.42515042", "0.42506918", "0.42290428", "0.4213093", "0.4202605", "0.41918355", "0.41724467", "0.41648823", "0.41593805", "0.41312104", "0.41304293", "0.4126547", "0.41260847", "0.4105579", "0.40879852", "0.40827015", "0.4071698", "0.40681225", "0.4061694", "0.4055569", "0.40393013", "0.40127257", "0.40110916", "0.40101403", "0.40066177", "0.40062833", "0.4002501", "0.39959517", "0.3988433", "0.39852795", "0.39839244", "0.3981136", "0.39804903", "0.39721835", "0.39712366", "0.39711648", "0.3967178", "0.39608657", "0.3952338", "0.3950867", "0.3948421", "0.39471593", "0.39468935", "0.39460197", "0.39401683", "0.3938225", "0.39321777", "0.39310008", "0.39273468", "0.3925362", "0.39217415", "0.39201614", "0.39098132", "0.39095414", "0.39092532", "0.39032865", "0.38934985", "0.38931695", "0.38906848" ]
0.5727774
0
Returns the aggregate position of each (instrument,account,actor) tuple based on all reports received for each tuple on or before the supplied date, and which are visible to the given user.
public Map<PositionKey, BigDecimal> getAllPositionsAsOf (SimpleUser user, Date data) throws PersistenceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<UserPosition> getUserPositionByIdUser(Long id_user, Date date);", "public SPResponse getEngagementMatrix(User user, Object[] param) {\n \n final SPResponse response = new SPResponse();\n \n String startDateStr = (String) param[0];\n String endDateStr = (String) param[1];\n \n Set<String> allGroups = new HashSet<>();\n Set<String> allTags = new HashSet<>();\n LocalDate startDate = !StringUtils.isBlank(startDateStr) ? DateTimeUtil\n .getLocalDate(startDateStr) : LocalDate.now().minusMonths(3);\n LocalDate endDate = !StringUtils.isBlank(endDateStr) ? DateTimeUtil.getLocalDate(endDateStr)\n : LocalDate.now();\n List<UserActivityTracking> userActivity = trackingRepository.findUserActivityTracking(\n user.getCompanyId(), startDate, endDate);\n \n List<UserActivityTrackingDTO> collect = userActivity.stream().map(ua -> {\n User activityUser = userFactory.getUser(ua.getUserId());\n if (activityUser != null && !activityUser.isDeactivated()) {\n \n UserActivityTrackingDTO trackingDTO = new UserActivityTrackingDTO(activityUser, ua);\n trackingDTO.setGender(activityUser.getGender());\n List<String> groups = activityUser.getGroupAssociationList().stream().map(grp -> {\n String name = grp.getName();\n allGroups.add(name);\n return name;\n }).collect(Collectors.toList());\n trackingDTO.setGroups(groups);\n if (activityUser.getTagList() != null) {\n trackingDTO.setTags(activityUser.getTagList());\n allTags.addAll(activityUser.getTagList());\n }\n LocalDate dob = activityUser.getDob();\n LocalDate currentDate = LocalDate.now();\n if (dob != null) {\n int age = (int) dob.until(currentDate, ChronoUnit.YEARS);\n trackingDTO.setAge(age);\n }\n return trackingDTO;\n } else {\n return null;\n }\n \n }).filter(Objects::nonNull).collect(Collectors.toList());\n \n LocalDate localDate = LocalDate.now();\n \n List<TopPracticeTracking> findTopPracticeArea = trackingRepository.findTopPracticeAreaFromDate(\n user.getCompanyId(), localDate.minusMonths(12));\n \n List<TopPracticeAreaDTO> topDto = findTopPracticeArea.stream().map(top -> {\n \n TopPracticeAreaDTO areaDTO = new TopPracticeAreaDTO(top);\n top.getPracticeAreas().stream().forEach(prId -> {\n SPGoal goal = goalFactory.getGoal(prId, user.getUserLocale());\n PracticeAreaDetailsDTO baseGoalDto = new PracticeAreaDetailsDTO(goal);\n areaDTO.getPracticeAreasGoals().add(baseGoalDto);\n });\n return areaDTO;\n }).collect(Collectors.toList());\n \n SpectrumFilter spectrumFilter = new SpectrumFilter();\n spectrumFilter.getFilters().put(Constants.PARAM_GROUPS, allGroups);\n spectrumFilter.getFilters().put(Constants.PARAM_TAGS, allTags);\n spectrumFilter.getFilters().put(Constants.PARAM_AGE, AgeCategory.values());\n \n response.add(\"engagmentMatrixData\", collect);\n response.add(\"startDate\", startDate);\n response.add(\"endDate\", endDate);\n response.add(\"filter\", spectrumFilter);\n response.add(\"topPraticeArea\", topDto);\n \n return response;\n }", "List<UserPosition> getUserPositionByIdUserAndDate(Long id_user, Date date);", "@Override\n\tpublic List<PhysicalData> getPhysicalActivity(String username, String date) {\n\t\treturn mobileDao.getPhysicalActivity(username,date);\n\t}", "public ReportBaseImpl[] getReportsSince\r\n \t\t(SimpleUser user, Date data)\r\n \t\tthrows PersistenceException;", "public BigDecimal getPositionAsOf\r\n \t\t(SimpleUser user, Date data, Instrument instrument)\r\n \t\tthrows PersistenceException;", "public static List<ExpenseReport> getReports(String ownerEmail, String userEmail) {\n ExpenseReportMeta reportMeta = ExpenseReportMeta.get();\n List<ExpenseReport> reports = Datastore.query(reportMeta)\n .filter(reportMeta.ownerEmail.equal(ownerEmail))\n .filter(reportMeta.emailList.equal(userEmail))\n .sort(reportMeta.dateAndTime.desc)\n .asList();\n return reports;\n }", "private void userReport() {\n reportText.appendText(\"Report of appointments per User\\n\\n\");\n for (User user: Data.getUsers()) {\n reportText.appendText(\"\\n\\nUser: \" + user.getUsername() + \"\\n\");\n for (Appointment appointment: Data.getAppointments()) {\n if (appointment.getUser() == user.getId()) {\n reportText.appendText(\"Appointment ID: \" + appointment.getId() +\n \" \\tTitle: \" + appointment.getTitle() +\n \"\\tType: \" + appointment.getType() +\n \"\\tDescription: \" + appointment.getDescription() +\n \"\\tStart: \" + appointment.getStart() +\n \"\\tEnd: \" + appointment.getEnd() +\n \"\\tCustomer: \" + appointment.getCustomer() + \"\\n\");\n }\n System.out.println(\"\\n\\n\");\n }\n }\n\n }", "public String getUserReport(String username)\r\n\t{\r\n\t\tArrayBasedList<LogEntry> subList = new ArrayBasedList<LogEntry>();\r\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t \tLogEntry log = list.get(i);\r\n\t \tif (log.getName().equals(username)) {\r\n\t \t\tsubList.add(log);\r\n\t \t}\r\n\t }\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t sb.append(\"Activity Report for \");\r\n\t sb.append(username);\r\n\t if (subList.size() == 0) {\t\r\n\t\t sb.append(\"[\\n\");\r\n\t \tsb.append(\" No activity was recorded.\\n]\");\r\n\t\t return sb.toString();\r\n\t }\r\n\t SimpleDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy hh:mm:ssaa\", Locale.US);\r\n\t subList.sort();\r\n\t sb.append(\"[\\r\\n\");\r\n\t for (int i = 0; i < subList.size(); i++) {\r\n\t \tsb.append(\" \");\r\n\t \tsb.append(dateFormat.format(subList.get(i).getTime()));\r\n\t \tsb.append(\" - \");\r\n\t \tsb.append(subList.get(i).getActivity());\r\n\t \tsb.append(\"\\r\\n\");\r\n\t }\r\n\t sb.append(\"]\");\r\n\t return sb.toString();\r\n\t}", "@Override\n public List<ScheduledInterview> getForPerson(String userId) {\n List<ScheduledInterview> relevantInterviews = new ArrayList<>();\n List<ScheduledInterview> scheduledInterviews = new ArrayList<ScheduledInterview>(data.values());\n scheduledInterviews.sort(\n (ScheduledInterview s1, ScheduledInterview s2) -> {\n if (s1.when().start().equals(s2.when().start())) {\n return 0;\n }\n if (s1.when().start().isBefore(s2.when().start())) {\n return -1;\n }\n return 1;\n });\n\n for (ScheduledInterview scheduledInterview : scheduledInterviews) {\n if (userId.equals(scheduledInterview.interviewerId())\n || userId.equals(scheduledInterview.intervieweeId())\n || userId.equals(scheduledInterview.shadowId())) {\n relevantInterviews.add(scheduledInterview);\n }\n }\n return relevantInterviews;\n }", "private void getDateForAnalysisReport() {\n \tArrayList<Object> answer = new ArrayList<>();\n\t\tanswer.add(\"performingAnActivityTracking\");\n\t\tanswer.add(\"/getActivityData\");\n\t\tString star = reportStartDate.getValue().toString();\n\t\tString end = reportEndDate.getValue().toString();\n\t\tanswer.add(star);\n\t\tanswer.add(end);\n\t\t\n\t\tchs.client.handleMessageFromClientUI(answer);\n\t}", "public List<UserExpenseReport> getUserExpenseReports(String ownerEmail, String userEmail) {\n List<ExpenseReport> reports = getReports(ownerEmail, userEmail);\n List<UserExpenseReport> userList = new ArrayList<UserExpenseReport>();\n for (ExpenseReport report : reports) {\n userList.add(UserExpenseReport.newUserExpenseReport(report, userEmail));\n }\n return userList;\n }", "public Map<PositionKey, BigDecimal> getPositionsAsOf\r\n \t\t(SimpleUser user, Date data, SecurityType securityType)\r\n \t\tthrows PersistenceException;", "public Map<String, TradeCounter> getCountsOfFriendTrades(String userId, Date lowerDate, Date upperDate) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n Map<String, TradeCounter> map = new HashMap();\n for (String friendId : dataLibrary.getFriendsListForUser(userId)) {\n for (String tradeString : dataLibrary.getTradeTransactionsForUser(friendId)) {\n String[] split = tradeString.split(\",| \");\n Trade trade;\n try {\n trade = new Trade(sdf.parse(split[0]),\n TradeType.valueOf(split[1].toUpperCase()),\n split[2].toUpperCase());\n // there is an assumption the trades are sorted in reverse-chronological order,\n // so skip until end of last week, compute values until start of last week.\n if (trade.getDate().after(upperDate) || trade.getDate().equals(upperDate)) {\n continue;\n }\n if (trade.getDate().before(lowerDate)) {\n break;\n }\n } catch (ParseException ex) {\n LOG.error(\"Could not parse date from string: \" + split[0], ex);\n continue;\n }\n if (!map.containsKey(trade.getTicker())) {\n map.put(trade.getTicker(), new TradeCounter(trade.getTicker()));\n }\n map.get(trade.getTicker()).adjustCount(trade.getDiff());\n }\n }\n return map;\n }", "public ArrayList<Double> search_current(String user_id, String date) {\n\t\tArrayList<Double> current_info = new ArrayList<Double>(); // store the query result from current table\n\t\ttry {\n\t\t\t//connect\n\t\t\tConnection connection = this.getConnection();\n\t\t\tPreparedStatement stmt = connection.prepareStatement(\"SELECT protein, energy, fiber, price FROM diet_conclusion where id = ? AND date = ?\");\n\t\t\tstmt.setString(1, user_id);\n\t\t\tstmt.setString(2, date);\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tcurrent_info.add(rs.getDouble(3));//fiber\n\t\t\t\tcurrent_info.add(rs.getDouble(2));//energy\n\t\t\t\tcurrent_info.add(rs.getDouble(1));//protein\n\t\t\t\tcurrent_info.add(rs.getDouble(4));//price\n\t\t\t}\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tconnection.close();\n\t\t} catch (Exception e) {\n\t\t\tlog.info(\"query error for search_current: {}\", e.toString());\n\t\t}\n\n\t\treturn current_info;//can be null\n\n\t}", "public static List<LogEntry> getAllByDates ( final String user, final String startDate, final String endDate ) {\n // Parse the start string for year, month, and day.\n final String[] startDateArray = startDate.split( \"-\" );\n final int startYear = Integer.parseInt( startDateArray[0] );\n final int startMonth = Integer.parseInt( startDateArray[1] );\n final int startDay = Integer.parseInt( startDateArray[2] );\n\n // Parse the end string for year, month, and day.\n final String[] endDateArray = endDate.split( \"-\" );\n final int endYear = Integer.parseInt( endDateArray[0] );\n final int endMonth = Integer.parseInt( endDateArray[1] );\n final int endDay = Integer.parseInt( endDateArray[2] );\n\n // Get calendar instances for start and end dates.\n final Calendar start = Calendar.getInstance();\n start.clear();\n final Calendar end = Calendar.getInstance();\n end.clear();\n\n // Set their values to the corresponding start and end date.\n start.set( startYear, startMonth, startDay );\n end.set( endYear, endMonth, endDay );\n\n // Check if the start date happens after the end date.\n if ( start.compareTo( end ) > 0 ) {\n System.out.println( \"Start is after End.\" );\n // Start is after end, return empty list.\n return new ArrayList<LogEntry>();\n }\n\n // Add 1 day to the end date. EXCLUSIVE boundary.\n end.add( Calendar.DATE, 1 );\n\n\n // Get all the log entries for the currently logged in users.\n final List<LogEntry> all = LoggerUtil.getAllForUser( user );\n // Create a new list to return.\n final List<LogEntry> dateEntries = new ArrayList<LogEntry>();\n\n // Compare the dates of the entries and the given function parameters.\n for ( int i = 0; i < all.size(); i++ ) {\n // The current log entry being looked at in the all list.\n final LogEntry e = all.get( i );\n\n // Log entry's Calendar object.\n final Calendar eTime = e.getTime();\n // If eTime is after (or equal to) the start date and before the end\n // date, add it to the return list.\n if ( eTime.compareTo( start ) >= 0 && eTime.compareTo( end ) < 0 ) {\n dateEntries.add( e );\n }\n }\n // Return the list.\n return dateEntries;\n }", "public abstract SortedSet<CalendarEvent> getEventsAt(User user, Date day);", "public SPResponse getOrganizationPlanActivities(User user, Object[] params) {\n \n String userCompany = user.getCompanyId();\n \n SPResponse ertiInsightsResponse = new SPResponse();\n \n OrganizationPlanActivities ertiInsights = spectrumFactory\n .getOrganizationPlanActivities(userCompany);\n \n LOG.debug(\"getOrganizationPlanActivities returened is \" + ertiInsights);\n \n ertiInsightsResponse.add(\"organizationPlanActivities\", ertiInsights);\n ertiInsightsResponse.isSuccess();\n return ertiInsightsResponse;\n }", "public void setDataWithDate(Date date, int pos) {\n\t\tif (date == null)\n\t\t\tdate = new Date();\n\n\t\tif(!isAdded())\n\t\t\treturn;\n\n synchronized (LOCK_OBJECT) {\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(date);\n\n int day = calendar.get(Calendar.DAY_OF_MONTH);\n int month = calendar.get(Calendar.MONTH) + 1;\n int year = calendar.get(Calendar.YEAR) - 1900;\n\n long startTime = System.currentTimeMillis();\n\n final List<StatisticalDataHeader> dataHeaders = DataSource.getInstance(getActivity())\n .getReadOperation()\n .query(\"dateStampDay == ? AND dateStampMonth == ? AND dateStampYear == ? AND watchDataHeader == ?\",\n String.valueOf(day), String.valueOf(month), String.valueOf(year),\n String.valueOf(getLifeTrakApplication().getSelectedWatch().getId()))\n .limit(1)\n .getResults(StatisticalDataHeader.class);\n\n mWorkoutCount = 0;\n mSleepMinute = 0;\n\n\n// List<Goal> goals = DataSource.getInstance(getActivity())\n// .getReadOperation()\n// .query(\"watchGoal = ?\", String.valueOf(getLifeTrakApplication().getSelectedWatch().getId()))\n// .orderBy(\"abs(date - \" + date.getTime() + \")\", SORT_ASC)\n// .limit(1)\n// .getResults(Goal.class);\n\n\t\t\tList<Goal> goals = DataSource\n\t\t\t\t\t.getInstance(getActivity())\n\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t.query(\"watchGoal = ? and dateStampDay = ? and dateStampMonth = ? and dateStampYear = ?\",\n\t\t\t\t\t\t\tString.valueOf(getLifeTrakApplication()\n\t\t\t\t\t\t\t\t\t.getSelectedWatch().getId()),\n\t\t\t\t\t\t\tString.valueOf(day), String.valueOf(month),\n\t\t\t\t\t\t\tString.valueOf(year))\n\t\t\t\t\t.orderBy(\"_id\", SORT_DESC)\n\t\t\t\t\t.getResults(Goal.class);\n\n\t\t\tif (goals.size() == 0) {\n\t\t\t\tgoals = DataSource.getInstance(getActivity())\n\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t.query(\"watchGoal = ?\", String.valueOf(getLifeTrakApplication().getSelectedWatch().getId()))\n\t\t\t\t\t\t.orderBy(\"abs(date - \" + date.getTime() + \")\", SORT_ASC)\n\t\t\t\t\t\t.limit(1)\n\t\t\t\t\t\t.getResults(Goal.class);\n\n\t\t\t\tCalendar now = Calendar.getInstance();\n\n\t\t\t\tif(now.get(Calendar.DATE) < calendar.get(Calendar.DATE) ){\n\t\t\t\t\tGoal mGoal = goals.get(0);\n\t\t\t\t\tgoals = DataSource\n\t\t\t\t\t\t\t.getInstance(getActivity())\n\t\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t\t.query(\"watchGoal = ? and dateStampDay = ? and dateStampMonth = ? and dateStampYear = ?\",\n\t\t\t\t\t\t\t\t\tString.valueOf(getLifeTrakApplication()\n\t\t\t\t\t\t\t\t\t\t\t.getSelectedWatch().getId()),\n\t\t\t\t\t\t\t\t\tString.valueOf(mGoal.getDateStampDay()), String.valueOf(mGoal.getDateStampMonth()),\n\t\t\t\t\t\t\t\t\tString.valueOf(mGoal.getDateStampYear()))\n\t\t\t\t\t\t\t.orderBy(\"_id\", SORT_DESC)\n\t\t\t\t\t\t\t.getResults(Goal.class);\n\t\t\t\t}\n\t\t\t}\n\n Goal goal = null;\n\n if(goals.size() > 0)\n goal = goals.get(0);\n\n final int activeTime = activeTimeForDate(date);\n\n if(dataHeaders.size() > 0) {\n StatisticalDataHeader statisticalDataHeader = dataHeaders.get(0);\n\n\n\t\t\t\tif (getLifeTrakApplication().getSelectedWatch().getModel() == WATCHMODEL_R420){\n\t\t\t\t\tList<WorkoutHeader> workoutHeader = DataSource.getInstance(getActivity())\n\t\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t\t.query(\"watchWorkoutHeader == ? AND dateStampDay == ? AND dateStampMonth == ? AND dateStampYear == ?\",\n\t\t\t\t\t\t\t\t\tString.valueOf(getLifeTrakApplication().getSelectedWatch().getId()),\n\t\t\t\t\t\t\t\t\tString.valueOf(day), String.valueOf(month), String.valueOf(year))\n\t\t\t\t\t\t\t.orderBy(\"_id\", SORT_ASC)\n\t\t\t\t\t\t\t.getResults(WorkoutHeader.class);\n\n\t\t\t\t\tmWorkoutCount = workoutHeader.size();\n\n\t\t\t\t\tmWorkoutInfo.setWorkoutValue(workoutHeader.size());\n\t\t\t\t}\n\t\t\t\telse {\n\n\t\t\t\t\tList<WorkoutInfo> workoutInfos = DataSource.getInstance(getActivity())\n\t\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t\t.query(\"watchWorkoutInfo == ? AND dateStampDay == ? AND dateStampMonth == ? AND dateStampYear == ?\",\n\t\t\t\t\t\t\t\t\tString.valueOf(getLifeTrakApplication().getSelectedWatch().getId()),\n\t\t\t\t\t\t\t\t\tString.valueOf(day), String.valueOf(month), String.valueOf(year))\n\t\t\t\t\t\t\t.orderBy(\"_id\", SORT_ASC)\n\t\t\t\t\t\t\t.getResults(WorkoutInfo.class);\n\n\n\t\t\t\t\tList<WorkoutInfo> spillOverWorkoutInfos = getSpillOverWorkoutFromPreviousDay(date);\n\t\t\t\t\tif (spillOverWorkoutInfos != null && spillOverWorkoutInfos.size() > 0) {\n\t\t\t\t\t\tworkoutInfos.addAll(spillOverWorkoutInfos);\n\t\t\t\t\t}\n\n\t\t\t\t\t//add today's workout\n\t\t\t\t\tif (workoutInfos.size() > 0) {\n\t\t\t\t\t\t//filter spill over for next day\n\t\t\t\t\t\tworkoutInfos = getWorkoutInfosWithoutNextDaySpillOver(workoutInfos);\n\t\t\t\t\t}\n\n\t\t\t\t\tmWorkoutCount = workoutInfos.size();\n\n\t\t\t\t\tmWorkoutInfo.setWorkoutValue(workoutInfos.size());\n\t\t\t\t}\n\n\t\t\t\tfinal List<Number> avgHeartRates = DataSource.getInstance(getActivity())\n\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t.query(\"dataHeaderAndPoint == ? AND averageHR > 0\", String.valueOf(statisticalDataHeader.getId()))\n\t\t\t\t\t\t.getResults(StatisticalDataPoint.class, \"avg(averageHR) averageHR\");\n\n\t\t\t\tavgAverage.clear();\n\n if(avgHeartRates.size() > 0) {\n float averageHeartRate = avgHeartRates.get(0).floatValue();\n mAverageHeartRate.setValue(averageHeartRate);\n mAverageHeartRate.setPercent(percentForAverageBPM((int) averageHeartRate));\n\n\t\t\t\t\tif (averageHeartRate> 0 )\n\t\t\t\t\tavgAverage.add(averageHeartRate);\n\n\t\t\t\t\t//if (averageHeartRate == 0){\n\t\t\t\t\t\tif (getLifeTrakApplication().getSelectedWatch().getModel() == WATCHMODEL_R420) {\n\t\t\t\t\t\t\tList<WorkoutHeader> workoutHeader = DataSource.getInstance(getActivity())\n\t\t\t\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t\t\t\t.query(\"watchWorkoutHeader == ? AND dateStampDay == ? AND dateStampMonth == ? AND dateStampYear == ?\",\n\t\t\t\t\t\t\t\t\t\t\tString.valueOf(getLifeTrakApplication().getSelectedWatch().getId()),\n\t\t\t\t\t\t\t\t\t\t\tString.valueOf(day), String.valueOf(month), String.valueOf(year))\n\t\t\t\t\t\t\t\t\t.orderBy(\"_id\", SORT_ASC)\n\t\t\t\t\t\t\t\t\t.getResults(WorkoutHeader.class);\n\t\t\t\t\t\t\tif (workoutHeader.size() > 0) {\n\t\t\t\t\t\t\t\tfloat avgHeartRate = 0;\n\t\t\t\t\t\t\t\tfloat sum = 0;\n\t\t\t\t\t\t\t\tfloat sumLength = 0;\n\t\t\t\t\t\t\t\tfor (int b = 0; b < workoutHeader.size(); b++) {\n\t\t\t\t\t\t\t\t\ttrueValuesHR.clear();\n\t\t\t\t\t\t\t\t\tWorkoutHeader workoutHeader1 = workoutHeader.get(b);\n\t\t\t\t\t\t\t\t\tString heartRate = workoutHeader1.getHeaderHeartRate();\n\t\t\t\t\t\t\t\t\tint hrLogRate = workoutHeader1.getLogRateHR();\n\t\t\t\t\t\t\t\t\tint hour = workoutHeader1.getTimeStampHour();\n\t\t\t\t\t\t\t\t\tint minute = workoutHeader1.getTimeStampMinute();\n\t\t\t\t\t\t\t\t\tint sec = workoutHeader1.getTimeStampSecond();\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tJSONArray jsonArray = new JSONArray(heartRate);\n\n\t\t\t\t\t\t\t\t\t\tfor (int i = 0; i < jsonArray.length(); ++i) {\n\t\t\t\t\t\t\t\t\t\t\tfor (int y = 0; y < hrLogRate; y ++){\n\t\t\t\t\t\t\t\t\t\t\t\ttrueValuesHR.add(jsonArray.optInt(i));\n\t\t\t\t\t\t\t\t\t\t\t\tsum = sum + jsonArray.optInt(i);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\t\tint[] numbers = Ints.toArray(trueValuesHR);\n\n\n\t\t\t\t\t\t\t\t\t\tint startingTime = (hour * 3600) + (minute * 60) + sec;\n\t\t\t\t\t\t\t\t\t\tint plotIndex = startingTime / 600;\n\t\t\t\t\t\t\t\t\t\tif ((startingTime % 600) != 0)\n\t\t\t\t\t\t\t\t\t\t\tplotIndex++;\n\t\t\t\t\t\t\t\t\t\tint startingTimeInTenMinutes = startingTime / 600;\n\n\n\t\t\t\t\t\t\t\t\t\tfloat sum10Min = 0;\n\t\t\t\t\t\t\t\t\t\tfloat average10Min = 0;\n\n\n\n\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.clear();\n\n\t\t\t\t\t\t\t\t\t\tint valueMinus = 0;\n\t\t\t\t\t\t\t\t\t\tint overAllMinus = 0;\n\t\t\t\t\t\t\t\t\t\tfor (int a = 0; a < 144; a++){\n\t\t\t\t\t\t\t\t\t\t\tif (a == startingTimeInTenMinutes){\n\t\t\t\t\t\t\t\t\t\t\t\tvalueMinus = ((startingTimeInTenMinutes + 1) * 600) - startingTime;\n\t\t\t\t\t\t\t\t\t\t\t\tif (mHeartRateIndex.size() == 0){\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (valueMinus > numbers.length){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.add(numbers.length);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\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\tmHeartRateIndex.add(valueMinus);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\toverAllMinus = overAllMinus + valueMinus;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartingTimeInTenMinutes ++;\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}\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\tif (overAllMinus < numbers.length){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalueMinus = valueMinus - overAllMinus;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.add(valueMinus);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\toverAllMinus = overAllMinus + valueMinus;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstartingTimeInTenMinutes++;\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\toverAllMinus = overAllMinus - 600;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (overAllMinus > 0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ((numbers.length - overAllMinus) < 60){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.remove(mHeartRateIndex.size()- 1);\n\t\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\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.set((mHeartRateIndex.size() - 1), (numbers.length - overAllMinus));\n\t\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\t\t//mHeartRateIndex.set((mHeartRateIndex.size() - 1), (numbers.length - overAllMinus));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse{\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\tbreak;\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}\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\n\t\t\t\t\t\t\t\t\t\tint valueOverAll = 0;\n\t\t\t\t\t\t\t\t\t\tint index = 0;\n\t\t\t\t\t\t\t\t\t\tfor (int i = 0; i < mHeartRateIndex.size() ; i++){\n\t\t\t\t\t\t\t\t\t\t\tint valueEnding = mHeartRateIndex.get(i);\n\n\n\t\t\t\t\t\t\t\t\t\t\tfor (int y = 0; y < valueEnding; y++){\n\t\t\t\t\t\t\t\t\t\t\t\tif (numbers[y + valueOverAll] > 0){\n\t\t\t\t\t\t\t\t\t\t\t\t\tsum10Min = sum10Min + numbers[y + valueOverAll];\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tindex++;\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\tvalueOverAll = valueOverAll + valueEnding;\n\t\t\t\t\t\t\t\t\t\t\taverage10Min = sum10Min / index;\n\t\t\t\t\t\t\t\t\t\t\tavgAverage.add((float)average10Min);\n\t\t\t\t\t\t\t\t\t\t\tsum10Min = 0;\n\t\t\t\t\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\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 (avgAverage.size() > 0){\n\n\t\t\t\t\t\t\t\t\tfloat sumTotal = 0;\n\t\t\t\t\t\t\t\t\tfloat sumTotalAVG = 0;\n\t\t\t\t\t\t\t\t\tint index = 0;\n\t\t\t\t\t\t\t\t\tfor (int i = 0; i < avgAverage.size(); i++){\n\t\t\t\t\t\t\t\t\t\tif (avgAverage.get(i) > 0) {\n\t\t\t\t\t\t\t\t\t\t\tsumTotal = sumTotal + avgAverage.get(i);\n\t\t\t\t\t\t\t\t\t\t\tindex++;\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\tsumTotalAVG = sumTotal / index;\n\t\t\t\t\t\t\t\t\tmAverageHeartRate.setValue(sumTotalAVG);\n\t\t\t\t\t\t\t\t\tif (sumTotalAVG > 0)\n\t\t\t\t\t\t\t\t\t\tmAverageHeartRate.setPercent(percentForAverageBPM((int) sumTotalAVG));\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\tmAverageHeartRate.setValue(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//}\n\n\n } else {\n\t\t\t\t\tif (getLifeTrakApplication().getSelectedWatch().getModel() == WATCHMODEL_R420){\n\t\t\t\t\t\tList<WorkoutHeader> workoutHeader = DataSource.getInstance(getActivity())\n\t\t\t\t\t\t\t\t.getReadOperation()\n\t\t\t\t\t\t\t\t.query(\"watchWorkoutHeader == ? AND dateStampDay == ? AND dateStampMonth == ? AND dateStampYear == ?\",\n\t\t\t\t\t\t\t\t\t\tString.valueOf(getLifeTrakApplication().getSelectedWatch().getId()),\n\t\t\t\t\t\t\t\t\t\tString.valueOf(day), String.valueOf(month), String.valueOf(year))\n\t\t\t\t\t\t\t\t.orderBy(\"_id\", SORT_ASC)\n\t\t\t\t\t\t\t\t.getResults(WorkoutHeader.class);\n\t\t\t\t\t\tif (workoutHeader.size() > 0){\n\t\t\t\t\t\t\tfloat avgHeartRate = 0;\n\t\t\t\t\t\t\tfloat sum = 0;\n\t\t\t\t\t\t\tfloat sumLength = 0;\n\t\t\t\t\t\t\tfor (int b = 0; b < workoutHeader.size(); b++) {\n\t\t\t\t\t\t\t\ttrueValuesHR.clear();\n\t\t\t\t\t\t\t\tWorkoutHeader workoutHeader1 = workoutHeader.get(b);\n\t\t\t\t\t\t\t\tString heartRate = workoutHeader1.getHeaderHeartRate();\n\t\t\t\t\t\t\t\tint hrLogRate = workoutHeader1.getLogRateHR();\n\t\t\t\t\t\t\t\tint hour = workoutHeader1.getTimeStampHour();\n\t\t\t\t\t\t\t\tint minute = workoutHeader1.getTimeStampMinute();\n\t\t\t\t\t\t\t\tint sec = workoutHeader1.getTimeStampSecond();\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tJSONArray jsonArray = new JSONArray(heartRate);\n\n\t\t\t\t\t\t\t\t\tfor (int i = 0; i < jsonArray.length(); ++i) {\n\t\t\t\t\t\t\t\t\t\tfor (int y = 0; y < hrLogRate; y ++){\n\t\t\t\t\t\t\t\t\t\t\ttrueValuesHR.add(jsonArray.optInt(i));\n\t\t\t\t\t\t\t\t\t\t\tsum = sum + jsonArray.optInt(i);\n\t\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\tint[] numbers = Ints.toArray(trueValuesHR);\n\n\n\t\t\t\t\t\t\t\t\tint startingTime = (hour * 3600) + (minute * 60) + sec;\n\t\t\t\t\t\t\t\t\tint plotIndex = startingTime / 600;\n\t\t\t\t\t\t\t\t\tif ((startingTime % 600) != 0)\n\t\t\t\t\t\t\t\t\t\tplotIndex++;\n\t\t\t\t\t\t\t\t\tint startingTimeInTenMinutes = startingTime / 600;\n\n\n\t\t\t\t\t\t\t\t\tfloat sum10Min = 0;\n\t\t\t\t\t\t\t\t\tfloat average10Min = 0;\n\n\n\n\t\t\t\t\t\t\t\t\tmHeartRateIndex.clear();\n\n\t\t\t\t\t\t\t\t\tint valueMinus = 0;\n\t\t\t\t\t\t\t\t\tint overAllMinus = 0;\n\t\t\t\t\t\t\t\t\tfor (int a = 0; a < 144; a++){\n\t\t\t\t\t\t\t\t\t\tif (a == startingTimeInTenMinutes){\n\t\t\t\t\t\t\t\t\t\t\tvalueMinus = ((startingTimeInTenMinutes + 1) * 600) - startingTime;\n\t\t\t\t\t\t\t\t\t\t\tif (mHeartRateIndex.size() == 0){\n\t\t\t\t\t\t\t\t\t\t\t\tif (valueMinus > numbers.length){\n\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.add(numbers.length);\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\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\tmHeartRateIndex.add(valueMinus);\n\t\t\t\t\t\t\t\t\t\t\t\t\toverAllMinus = overAllMinus + valueMinus;\n\t\t\t\t\t\t\t\t\t\t\t\t\tstartingTimeInTenMinutes ++;\n\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}\n\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\tif (overAllMinus < numbers.length){\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalueMinus = valueMinus - overAllMinus;\n\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.add(valueMinus);\n\t\t\t\t\t\t\t\t\t\t\t\t\toverAllMinus = overAllMinus + valueMinus;\n\t\t\t\t\t\t\t\t\t\t\t\t\tstartingTimeInTenMinutes++;\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\toverAllMinus = overAllMinus - 600;\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (overAllMinus > 0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ((numbers.length - overAllMinus) < 60){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmHeartRateIndex.remove(mHeartRateIndex.size()- 1);\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\tmHeartRateIndex.set((mHeartRateIndex.size() - 1), (numbers.length - overAllMinus));\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\t//mHeartRateIndex.set((mHeartRateIndex.size() - 1), (numbers.length - overAllMinus));\n\t\t\t\t\t\t\t\t\t\t\t\t\telse{\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\tbreak;\n\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}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tint valueOverAll = 0;\n\t\t\t\t\t\t\t\t\tint index = 0;\n\t\t\t\t\t\t\t\t\tfor (int i = 0; i < mHeartRateIndex.size() ; i++){\n\t\t\t\t\t\t\t\t\t\tint valueEnding = mHeartRateIndex.get(i);\n\n\t\t\t\t\t\t\t\t\t\tint minValues= 240;\n\t\t\t\t\t\t\t\t\t\tint maxValues= 0;\n\t\t\t\t\t\t\t\t\t\tfor (int y = 0; y < valueEnding; y++){\n\t\t\t\t\t\t\t\t\t\t\tif (numbers[y + valueOverAll] > 0){\n\t\t\t\t\t\t\t\t\t\t\t\tsum10Min = sum10Min + numbers[y + valueOverAll];\n\t\t\t\t\t\t\t\t\t\t\t\tif (minValues > numbers[y + valueOverAll]){\n\t\t\t\t\t\t\t\t\t\t\t\t\tminValues = numbers[y + valueOverAll];\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 (maxValues < numbers[y + valueOverAll]){\n\t\t\t\t\t\t\t\t\t\t\t\t\tmaxValues = numbers[y + valueOverAll];\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\tindex++;\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\tvalueOverAll = valueOverAll + valueEnding;\n\t\t\t\t\t\t\t\t\t\taverage10Min = sum10Min / index;\n\t\t\t\t\t\t\t\t\t\tavgAverage.add(average10Min);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (avgAverage.size() > 0){\n\n\t\t\t\t\t\t\t\tfloat sumTotal = 0;\n\t\t\t\t\t\t\t\tfloat sumTotalAVG = 0;\n\t\t\t\t\t\t\t\tint index = 0;\n\t\t\t\t\t\t\t\tfor (int i = 0; i < avgAverage.size(); i++){\n\t\t\t\t\t\t\t\t\tif (avgAverage.get(i) > 0) {\n\t\t\t\t\t\t\t\t\t\tsumTotal = sumTotal + avgAverage.get(i);\n\t\t\t\t\t\t\t\t\t\tindex++;\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\tsumTotalAVG = sumTotal / index;\n\t\t\t\t\t\t\t\tmAverageHeartRate.setValue(sumTotalAVG);\n\t\t\t\t\t\t\t\tif (sumTotalAVG > 0)\n\t\t\t\t\t\t\t\t\tmAverageHeartRate.setPercent(percentForAverageBPM((int) sumTotalAVG));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tmAverageHeartRate.setValue(0);\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\tmAverageHeartRate.setValue(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n \t mAverageHeartRate.setValue(0);\n }\n\n mActigraphy.setHourValue(activeTime / 60);\n mActigraphy.setMinuteValue(activeTime % 60);\n\n String query = \"select sum(distance) distance, sum(steps) steps, sum(calorie) calorie from StatisticalDataPoint sdp \" +\n \"inner join StatisticalDataHeader sdh on sdp.dataHeaderAndPoint = sdh._id \" +\n \"where watchDataHeader == ? AND dateStampDay == ? AND dateStampMonth == ? AND dateStampYear == ?\";\n\n Cursor cursor = DataSource.getInstance(getActivity())\n .getReadOperation()\n .rawQuery(query, String.valueOf(getLifeTrakApplication().getSelectedWatch().getId()),\n String.valueOf(day), String.valueOf(month), String.valueOf(year));\n\n if (cursor.moveToFirst()) {\n mCalorieMetric.setProgressGoal(goal.getCalorieGoal());\n mCalorieMetric.setProgressValue(cursor.getFloat(cursor.getColumnIndex(\"calorie\")));\n\n mStepsMetric.setProgressGoal(goal.getStepGoal());\n mStepsMetric.setProgressValue(cursor.getFloat(cursor.getColumnIndex(\"steps\")));\n\n mDistanceMetric.setProgressGoal((float) goal.getDistanceGoal());\n mDistanceMetric.setProgressValue(cursor.getFloat(cursor.getColumnIndex(\"distance\")));\n mDistanceMetric.setUnitSystem(getLifeTrakApplication().getUserProfile().getUnitSystem());\n }\n\n\n\n\n\n mSleepMetric.setProgressValue(statisticalDataHeader.getTotalSleep());\n\n if (getLifeTrakApplication().getSelectedWatch().getModel() == WATCHMODEL_R415) {\n\t\t\t\t\tif (pos == 1) {\n\t\t\t\t\t\tmLightExposure.setProgressValue(statisticalDataHeader.getLightExposure());\n\t\t\t\t\t\tif (goal.getBrightLightGoal() < 10) {\n\t\t\t\t\t\t\tgoal.setBrightLightGoal(10);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmLightExposure.setProgressGoal(goal.getBrightLightGoal());\n\t\t\t\t\t}\n\n }\n\n mSleepMetric.setProgressValue(mTotalSleepTime);\n } else {\n mAverageHeartRate.setValue(0);\n mStepsMetric.setProgressValue(0);\n mDistanceMetric.setProgressValue(0);\n mCalorieMetric.setProgressValue(0);\n mSleepMetric.setProgressValue(0);\n mWorkoutInfo.setWorkoutValue(0);\n\t\t\t\tmActigraphy.setHourValue(0);\n mActigraphy.setMinuteValue(0);\n mSleepMetric.setProgressValue(0);\n mLightExposure.setProgressValue(0);\n }\n\n if (mSleepMetric != null && goal != null)\n mSleepMetric.setProgressGoal(goal.getSleepGoal());\n\n mAverageHeartRate.setDate(date);\n mSleepMetric.setDate(date);\n mWorkoutInfo.setDate(date);\n mActigraphy.setDate(date);\n\n mAdapter.notifyDataSetChanged();\n }\n\t\n\t\t\n\t}", "Set<VisitedResource> getVisitingStatistic(Date date);", "public Breakdown generateReport(Date startDate, Date endDate, ArrayList<User> userList, double total) {\n\n //INTIATING VARIABLES\n Breakdown result = new Breakdown();\n\n HashMap<String, Breakdown> intenseMap = new HashMap<String, Breakdown>();\n HashMap<String, Breakdown> normalMap = new HashMap<String, Breakdown>();\n HashMap<String, Breakdown> mildMap = new HashMap<String, Breakdown>();\n\n int intenseCount = 0;\n int normalCount = 0;\n int mildCount = 0;\n\n result.addInList(intenseMap);\n result.addInList(normalMap);\n result.addInList(mildMap);\n\n AppUsageDAO auDAO = new AppUsageDAO();\n\n //If it is without demographic, userList is null\n if (userList == null) {\n userList = auDAO.retrieveUsers(startDate, endDate);\n }\n for (int i = 0; i < userList.size(); i++) {\n User currUser = userList.get(i);\n\n //get current user's app usge\n ArrayList<AppUsage> userUsage = auDAO.retrieveByUser(currUser.getMacAddress(), startDate, endDate);\n double totalSeconds = 0;\n\n Date nextDay = new Date(startDate.getTime() + 60 * 60 * 1000 * 24);\n\n Date oldTime = null;\n if (userUsage.size() > 0) {\n oldTime = userUsage.get(0).getDate();\n if (oldTime.after(nextDay)) {\n nextDay = new Date(nextDay.getTime() + 60 * 60 * 1000 * 24);\n }\n }\n\n for (int j = 1; j < userUsage.size(); j++) {\n AppUsage au = userUsage.get(j);\n Date newTime = au.getDate();\n boolean beforeAppeared = false;\n if (newTime.before(nextDay)) {\n beforeAppeared = true;\n //difference between app usage timing\n long difference = Utility.secondsBetweenDates(oldTime, newTime);\n\n //If difference less than/equal 2 minutes\n if (difference <= 2 * 60) {\n // add difference to totalSeconds if <= 2 mins\n totalSeconds += difference;\n } else {\n // add 10sec to totalSeconds if > 2 mins\n totalSeconds += 10;\n }\n\n } else { // NEW TIMING AFTER NEXT DAY\n nextDay = new Date(nextDay.getTime() + 60 * 60 * 1000 * 24);\n\n if (!beforeAppeared) {\n long difference = Utility.secondsBetweenDates(oldTime, newTime);\n if (difference <= 2 * 60) {\n // add difference to totalSeconds if <= 2 mins\n totalSeconds += difference;\n } else {\n // add 10sec to totalSeconds if > 2 mins\n totalSeconds += 10;\n }\n }\n }\n\n oldTime = newTime;\n\n }\n\n if (oldTime.before(nextDay)) {\n long difference = Utility.secondsBetweenDates(oldTime, nextDay);\n if (difference < 10) {\n totalSeconds += difference;\n } else {\n totalSeconds += 10;\n }\n } else {\n totalSeconds += 10;\n }\n\n //DIVIDE TO GET INTO DAYS\n long days = (endDate.getTime() - startDate.getTime()) / (1000 * 60 * 60 * 24) + 1;\n totalSeconds /= days;\n\n //FILTER USER'S USAGE INTO CATEGORIES\n double totalHours = totalSeconds / (60 * 60);\n\n if (totalHours > 0) {\n if (totalHours < 1.0) {\n //MILD\n mildCount++;\n\n } else if (totalHours < 5.0) {\n //NORMAL\n normalCount++;\n\n } else {\n //INTENSE\n intenseCount++;\n\n }\n }\n\n }\n //Calculate percentage\n if (total == -1) {\n total = mildCount + normalCount + intenseCount;\n\n }\n\n int mildPercent = (int) Math.round(mildCount / total * 100);\n int normalPercent = (int) Math.round(normalCount / total * 100);\n int intensePercent = (int) Math.round(intenseCount / total * 100);\n\n //Put in maps\n intenseMap.put(\"intense-count\", new Breakdown(\"\" + intenseCount));\n intenseMap.put(\"intense-percent\", new Breakdown(\"\" + intensePercent));\n\n normalMap.put(\"normal-count\", new Breakdown(\"\" + normalCount));\n normalMap.put(\"normal-percent\", new Breakdown(\"\" + normalPercent));\n\n mildMap.put(\"mild-count\", new Breakdown(\"\" + mildCount));\n mildMap.put(\"mild-percent\", new Breakdown(\"\" + mildPercent));\n\n return result;\n }", "private void calculateDebitAgingDATE(List<EMCQuery> periodQueries, List<DebtorsAgingHelper> agingList, Date atDate, String customerId, EMCUserData userData) {\n for (int i = 0; i < periodQueries.size(); i++) {\n //Calculate sum of debits & credits for each period\n EMCQuery query = periodQueries.get(i);\n query.addFieldAggregateFunction(\"credit\", \"SUM\");\n query.addFieldAggregateFunction(\"creditAmountSettled\", \"SUM\");\n\n Object[] totals = (Object[]) util.executeSingleResultQuery(query, userData);\n if (totals != null) {\n BigDecimal debitTotal = (BigDecimal) totals[0] == null ? BigDecimal.ZERO : (BigDecimal) totals[0];\n BigDecimal debitSettledTotal = (BigDecimal) totals[1] == null ? BigDecimal.ZERO : (BigDecimal) totals[1];\n BigDecimal creditTotal = (BigDecimal) totals[2] == null ? BigDecimal.ZERO : (BigDecimal) totals[2];\n BigDecimal creditSettledTotal = (BigDecimal) totals[3] == null ? BigDecimal.ZERO : (BigDecimal) totals[3];\n\n //Subtract outstanding credits from outstanding debits\n BigDecimal binAmount = debitTotal.subtract(debitSettledTotal).subtract(creditTotal.subtract(creditSettledTotal));\n agingList.get(i).setBinAmount(binAmount);\n } else {\n agingList.get(i).setBinAmount(BigDecimal.ZERO);\n }\n }\n //If atDate less than today, ignore updates made to transactions between atDate and today.\n //Only check dates, not time\n Calendar atCalendar = Calendar.getInstance();\n atCalendar.setTime(atDate);\n atCalendar.set(Calendar.HOUR, 0);\n atCalendar.set(Calendar.MINUTE, 0);\n atCalendar.set(Calendar.SECOND, 0);\n atCalendar.set(Calendar.MILLISECOND, 0);\n\n Calendar nowCalendar = Calendar.getInstance();\n nowCalendar.setTime(Functions.nowDate());\n nowCalendar.set(Calendar.HOUR, 0);\n nowCalendar.set(Calendar.MINUTE, 0);\n nowCalendar.set(Calendar.SECOND, 0);\n nowCalendar.set(Calendar.MILLISECOND, 0);\n\n if (atCalendar.compareTo(nowCalendar) < 0) {\n int bin = 0;\n //For each bin, revert transaction history\n for (DebtorsAgingHelper binHelper : agingList) {\n //Revert debits and credits seperately.\n EMCQuery settledQuery = new EMCQuery(enumQueryTypes.SELECT, DebtorsTransactionSettlementHistory.class);\n settledQuery.addFieldAggregateFunction(\"debitSettled\", \"SUM\");\n //Check that transaction existed at atDate. Bev requested that we remove this check.\n //settledQuery.addAnd(\"transactionCreatedDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n\n settledQuery.openAndConditionBracket();\n settledQuery.addOr(\"debitTransactionDate\", binHelper.getBinEndDate(), EMCQueryConditions.LESS_THAN_EQ);\n settledQuery.closeConditionBracket();\n\n //Customer is optional\n if (customerId != null) {\n settledQuery.addAnd(\"customerId\", customerId);\n }\n\n //Only include transactions settled after atDate.\n settledQuery.addAnd(\"createdDate\", atDate, EMCQueryConditions.GREATER_THAN);\n\n if (binHelper.getBinStartDate() != null) {\n settledQuery.openAndConditionBracket();\n settledQuery.addOr(\"debitTransactionDate\", binHelper.getBinStartDate(), EMCQueryConditions.GREATER_THAN_EQ);\n settledQuery.closeConditionBracket();\n }\n\n BigDecimal debitSettled = (BigDecimal) util.executeSingleResultQuery(settledQuery, userData);\n if (debitSettled == null) {\n debitSettled = BigDecimal.ZERO;\n }\n\n settledQuery = new EMCQuery(enumQueryTypes.SELECT, DebtorsTransactionSettlementHistory.class);\n settledQuery.addFieldAggregateFunction(\"creditSettled\", \"SUM\");\n //Check that transaction existed at atDate. Bev requested that we remove this check.\n //settledQuery.addAnd(\"transactionCreatedDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n\n settledQuery.openAndConditionBracket();\n settledQuery.addOr(\"creditTransactionDate\", binHelper.getBinEndDate(), EMCQueryConditions.LESS_THAN_EQ);\n settledQuery.closeConditionBracket();\n\n //Customer is optional\n if (customerId != null) {\n settledQuery.addAnd(\"customerId\", customerId);\n }\n\n //Only include transactions settled after atDate.\n settledQuery.addAnd(\"createdDate\", atDate, EMCQueryConditions.GREATER_THAN);\n\n if (binHelper.getBinStartDate() != null) {\n settledQuery.openAndConditionBracket();\n settledQuery.addOr(\"creditTransactionDate\", binHelper.getBinStartDate(), EMCQueryConditions.GREATER_THAN_EQ);\n settledQuery.closeConditionBracket();\n }\n\n BigDecimal creditSettled = (BigDecimal) util.executeSingleResultQuery(settledQuery, userData);\n if (creditSettled == null) {\n creditSettled = BigDecimal.ZERO;\n }\n\n //System.out.println(\"Bin \" + (bin++ + 1) + \" Debit Added Back: \" + debitSettled + \" Credit Added Back: \" + creditSettled);\n\n //Add settled amount & discount back to bin and subtract credit total\n //binHelper.setBinAmount(binHelper.getBinAmount().add((debitSettled).add(totalDiscount)).subtract(creditSettled));\n binHelper.setBinAmount(binHelper.getBinAmount().add(debitSettled).subtract(creditSettled));\n }\n }\n }", "public ArrayList<ArrayList<Double>> getReportsFromServer(LocalDate date)\n {\n\t //Go to DB and ask for reports of a specific date\n\t return null;\n }", "public List<UserAttendance> getDayAttendance(Date[] dates, SysUser sysUser) {\n return findByQuery(\"from UserAttendance where (checkdate=? or checkdate=? or checkdate=? or checkdate=? or checkdate=? or checkdate=? or checkdate=?) and user.id=? and type is not null order by checkdate, noon\",\n dates[0], dates[1], dates[2], dates[3], dates[4], dates[5], dates[6], sysUser.getId());\n }", "public List<Statistic> queryPageDataByUserId(Integer startIndex, Integer pagesize, Integer userId) {\n\t\tString sql=\"select * from statistics where user_id=? order by creat_date desc limit ?,?\";\n\t\treturn getList(sql, userId,startIndex,pagesize);\n\t}", "public Map<String, EnvelopeStatusCode> getEnvelopeStatusesInLastDay(User user) throws DatatypeConfigurationException;", "@Override\n\tpublic String queryMemberInvest(Long memberId, String fromUserName, String toUserName,Date date,String dateString) {\n\t\tTransactionQuery transactionQuery=new TransactionQuery();\n\t\t//transactionQuery.setMemberId(memberId);\n\t\ttransactionQuery.setTransactionStartTime(DateUtils.zerolizedTime(date));\n\t\ttransactionQuery.setTransactionEndTime(DateUtils.getEndTime(date));\n\t\tTextMsg msg = new TextMsg();\n\t\tdate=DateUtils.getDateFromString(DateUtils.getDateStrFromDate(date), DateUtils.DATE_FMT_3);\n\t\tint count=memberService.countRegisterNumberByDate(date);\n\t\ttry {\n\t\t\tBigDecimal totalAssets=BigDecimal.ZERO;\n\t\t\tBigDecimal returnAssets=BigDecimal.ZERO;\n\t\t\tBigDecimal hadAssets=BigDecimal.ZERO;\n\t\tTransactionInterest transactionInterest=transactionManager.selectWaitPayByEndDate(0,date);\n\t\tif(transactionInterest!=null){\n\t\t\t BigDecimal principal = transactionInterest.getPayablePrincipal()==null?BigDecimal.ZERO:transactionInterest.getPayablePrincipal();\n\t\t\t BigDecimal interest = transactionInterest.getPayableInterest()==null?BigDecimal.ZERO:transactionInterest.getPayableInterest();\n\t\t\t totalAssets =principal.add(interest);\n\t\t}\n\t\t\n\t\tTransactionInterest returnInterest=transactionManager.selectWaitPayByEndDate(4,date);\n\t\tif(returnInterest!=null){\n\t\t\t BigDecimal principal = returnInterest.getPayablePrincipal()==null?BigDecimal.ZERO:returnInterest.getPayablePrincipal();\n\t\t\t BigDecimal interest = returnInterest.getPayableInterest()==null?BigDecimal.ZERO:returnInterest.getPayableInterest();\n\t\t\t returnAssets =principal.add(interest);\n\t\t}\n\t\t\n\t\tTransactionInterest hadInterest=transactionManager.selectRealPayByEndDate(date);\n\t\tif(hadInterest!=null){\n\t\t\t BigDecimal principal = hadInterest.getRealPayPrincipal()==null?BigDecimal.ZERO:hadInterest.getRealPayPrincipal();\n\t\t\t BigDecimal interest = hadInterest.getRealPayInterest()==null?BigDecimal.ZERO:hadInterest.getRealPayInterest();\n\t\t\t hadAssets =principal.add(interest);\n\t\t}\n\t\t\n\t\t\tBigDecimal investAmount = transactionManager.getMemberTotalInvestByStatus(transactionQuery);\n\t\t\tint waitCount=transactionManager.getCountInterestByMemberId(memberId,0,date);\n\t\t\tint hadCount=transactionManager.getCountInterestByMemberId(memberId,1,date);\n\t\t\tint countIng=transactionManager.getCountInterestByMemberId(memberId,4,date);\n\t\t\t\n\t\t\tBigDecimal totalInvestAmount = transactionManager.getTotalInvestAmount(date);\n\t \t \t// msg.add(\"亲爱的\").add(trueName).add(\",平台\").add(dateString).add(\":\");\n\t \t \t// msg.addln();\n\t \t \t msg.add(\"平台注册量:\").add(Integer.toString(count));\n\t \t \t msg.addln();\n\t \t \t msg.add(\"平台投资额为:\").add(FormulaUtil.getFormatPriceRound(investAmount));\n\t \t \t msg.addln();\n\t \t \t msg.add(\"募集中金额:\").add(FormulaUtil.getFormatPriceRound(totalInvestAmount));\n\t \t \t msg.addln();\n\t \t \t msg.add(\"待回款笔数:\").add(Integer.toString(waitCount)).add(\"总额:\").add(FormulaUtil.getFormatPriceRound(totalAssets));\n\t \t \t msg.addln();\n\t \t \t msg.add(\"回款中笔数:\").add(Integer.toString(countIng)).add(\"总额:\").add(FormulaUtil.getFormatPriceRound(returnAssets));\n\t \t \t msg.addln();\n\t \t \t msg.add(\"已回款笔数:\").add(Integer.toString(hadCount)).add(\"总额:\").add(FormulaUtil.getFormatPriceRound(hadAssets));\n\t \t \t msg.addln();\n\t \t \t msg.setToUserName(fromUserName);\n\t \t \t msg.setFromUserName(toUserName);\n\t\t\t\n\t\t} catch (ManagerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t return msg.toXml();\n\t\t\n\t}", "public void consumeEvent(InteractionEvent event, int userId) {\n \t\tif (!interactionHistorySizes.containsKey(userId)) {\n \t\t\tinteractionHistorySizes.put(userId, 0);\n \t\t}\n \t\tinteractionHistorySizes.put(userId, interactionHistorySizes.get(userId) + 1);\n \n \t\t// Record start and end date of history\n \t\tList<Date> dateRange;\n \t\tif (!interactionHistoryRanges.containsKey(userId)) {\n \t\t\t// There are two positions in the array: start and end date\n \t\t\tdateRange = new ArrayList<Date>(2);\n \t\t\tinteractionHistoryRanges.put(userId, dateRange);\n \t\t}\n \t\tdateRange = interactionHistoryRanges.get(userId);\n \t\tif (dateRange.size() == 0) {\n \t\t\tdateRange.add(event.getDate());\n \t\t} else if (dateRange.size() == 1) {\n \t\t\tdateRange.add(event.getDate());\n \t\t} else {\n \t\t\tdateRange.set(endDatePosition, event.getDate());\n \t\t}\n \n \t\t// Accumulate active duration -- assumes see all of events of a user in\n \t\t// order\n \t\tif (currentUser == -1 || currentUser != userId) {\n \t\t\tlastUserEvent = event;\n \t\t\tcurrentUser = userId;\n \t\t}\n \t\t// Restart accumulation if greater than 5 min has elapsed between events\n \t\tlong elapsed = event.getDate().getTime() - lastUserEvent.getDate().getTime();\n \t\tif (elapsed < FIVEMININMS) {\n \t\t\tif (!interactionHistoryActiveDuration.containsKey(userId)) {\n \t\t\t\tinteractionHistoryActiveDuration.put(userId, new Long(0));\n \t\t\t}\n \t\t\tinteractionHistoryActiveDuration.put(userId, interactionHistoryActiveDuration.get(userId) + elapsed);\n \t\t}\n \t\tlastUserEvent = event;\n \n \t}", "@Override\n public List<Object[]> getStatistics(String owner, StatisticsGroup group, String from, String to) {\n String date = parseDateLimit(from, to);\n String groupHQL = this.groupToHQL(group);\n List<Object[]> list = (List<Object[]>) getHibernateTemplate().findByNamedParam(\"select count(*), \"\n + \"count(distinct ipAddress), \" + groupHQL + \" \"\n + \"from SearchEvent \"\n + \"where owner like :owner \"\n + date + \" \"\n + \"group by col_2_0_\", \"owner\", owner);\n return list;\n }", "public void userAppointmentsReport() {\n reportLabel.setText(\"\");\n reportLabel1.setText(\"\");\n reportLabel2.setText(\"\");\n reportLabel3.setText(\"\");\n reportsList = DBReports.getUserAppointments();\n System.out.println(reportsList.toArray().length);\n StringBuilder sb = new StringBuilder();\n sb.append(\"Appointments Added By User Report:\" + \"\\n\");\n\n reportsList.forEach(r -> sb.append(\"\\n\" + r.getUserName().toUpperCase() + \"\\n\" +\n r.getAppointmentCount() + \" appointments scheduled for \" + r.getCustomerCount() + \" customers\\n\"));\n reportLabel.setText(sb.toString());\n }", "@Override\n public List<ExpenceSummary> getReportsForMonth(String owner,int year, int month) {\n\n AggregationResults<ExpenceSummary> results = operations.aggregate(newAggregation(Expence.class, //\n match(where(\"owner\").is(owner))\n // .andOperator(where(\"date\").lte(LocalDateTime.now())\n //.andOperator(where(\"year(date)\").is(year)\n // .andOperator(where(\"date\").regex(\"2016\")\n // .andOperator(where(\"owner\").is(\"admin\")))\n , //\n // unwind(\"items\"), //\n // project(\"id\", \"customerId\", \"items\") //\n // .andExpression(\"'$items.price' * '$items.quantity'\").as(\"lineTotal\"), //\n project()\n .andExpression(\"type\").as(\"type\")\n .andExpression(\"year(date)\").as(\"year\")\n .andExpression(\"month(date)\").as(\"month\")\n .andExpression(\"amount\").as(\"amount\")\n ,\n match(where(\"year\").is(year)\n .andOperator(where(\"month\").is(month))\n )\n // .andOperator(where(\"date\").lte(LocalDateTime.now())\n //.andOperator(where(\"year(date)\").is(year)\n ,\n group(\"type\",\"year\",\"month\")\n\n // .addToSet(\"type\").as(\"type\")//, //\n // .addToSet(\"year\").as(\"year\")//, //\n // .addToSet(\"month\").as(\"month\")//, //\n .sum(\"amount\").as(\"totalAmount\") //\n .count().as(\"count\")\n // project(\"id\", \"items\", \"netAmount\") //\n // .and(\"orderId\").previousOperation() //\n // .andExpression(\"netAmount * [0]\", 1).as(\"taxAmount\") //\n // .andExpression(\"netAmount * (1 + [0])\", 1).as(\"totalAmount\") //\n ), Expence.class,ExpenceSummary.class);\n logger.info(\"getReportsForMonth results.size=\"+results.getMappedResults().size());\n return results.getMappedResults();\n }", "List<UserPosition> getUserPositionByIdTravelAndDate(Long id_travel, Date date);", "public List<Stats> findStatsPerTime(String date) {\n\t\treturn null;\r\n\t}", "public ArrayList<Showing> getShowingsByDate(String date, Screen screen) throws PastDateException {\n return filmDisplay.getShowingsByDate(date, screen);\n }", "@Override\r\n\tpublic List<Report> getReport(Date from,Date to) {\r\n\t\treturn jdbcTemplate.query(SQLConstants.SQL_SELECT_ALL_FOR_SUPERADMIN_FROM_N_TO, new RowMapper<Report>() {\r\n\t\t\t@Override\r\n\t\t\tpublic Report mapRow(ResultSet rs, int arg1) throws SQLException {\r\n\t\t\t\tReport report = new Report();\r\n\t\t\t\treport.setPaymentId(rs.getInt(1));\r\n\t\t\t\t//change the date format\r\n\t\t\t\treport.setPaymentTime(rs.getDate(2));\r\n\t\t\t\treport.setTransactionId(rs.getInt(3));\r\n\t\t\t\treport.setUserId(rs.getInt(5));\r\n\t\t\t\treport.setPayment_by(rs.getString(6));\r\n\t\t\t\treport.setBank_acc_id(rs.getInt(8));\r\n\t\t\t\treport.setAmount(rs.getInt(9));\r\n\t\t\t\treport.setStatus(rs.getInt(10));\r\n\t\t\t\treturn report;\r\n\t\t\t}\r\n\t\t}, from, to);\r\n\t}", "Set<TimeJournalBean> findUserActivityByDate(Date date, Employee employee);", "@Override\n\tpublic List<AppointmentDto> getAppointmentByUserIdForADate(int userId, Date date) {\n\t\t// TODO Auto-generated method stub\n\t\ttry{\n\t\t\treturn jdbcTemplate.query(FETCH_BY_USERID_ON_PARTICULAR_DATE, (rs, rownnum)->{\n\t\t\t\treturn new AppointmentDto(rs.getInt(\"appointmentId\"), rs.getTime(\"startTime\"), rs.getTime(\"endTime\"), rs.getDate(\"date\"), rs.getInt(\"physicianId\"), rs.getInt(\"userId\"), rs.getInt(\"productId\"), rs.getString(\"confirmationStatus\"), rs.getString(\"zip\"),rs.getString(\"cancellationReason\"), rs.getString(\"additionalNotes\"), rs.getBoolean(\"hasMeetingUpdate\"),rs.getBoolean(\"hasMeetingExperienceFromSR\"),rs.getBoolean(\"hasMeetingExperienceFromPH\"), rs.getBoolean(\"hasPitch\"));\n\t\t\t}, userId, date );\n\t\t}catch(DataAccessException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public BigDecimal getTotalUnallocatedCredit(String customerId, Date atDate, EMCUserData userData) {\n BigDecimal outstandingCredit = null;\n\n //Get total outstanding credits for customer, which existed at atDate\n EMCQuery query = new EMCQuery(enumQueryTypes.SELECT, DebtorsOpenTransactions.class);\n query.addFieldAggregateFunction(\"credit\", \"SUM\");\n query.addFieldAggregateFunction(\"creditAmountSettled\", \"SUM\");\n\n //Customer is optional.\n if (customerId != null) {\n query.addAnd(\"customerId\", customerId);\n }\n\n //Bev requested that we remove this check. This will now show all unallocated credits,\n //regardless of whether or not they existed at atDate.\n //query.addAnd(\"createdDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n //Check that future payments are not included.\n query.addAnd(\"transactionDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n\n Object[] creditTotals = (Object[]) util.executeSingleResultQuery(query, userData);\n\n if (creditTotals != null) {\n BigDecimal totalCredit = creditTotals[0] == null ? BigDecimal.ZERO : (BigDecimal) creditTotals[0];\n BigDecimal totalCreditSettled = creditTotals[1] == null ? BigDecimal.ZERO : (BigDecimal) creditTotals[1];\n\n outstandingCredit = totalCredit.subtract(totalCreditSettled);\n }\n\n //If atDate less than today, ignore updates made to transactions between atDate and today.\n //Only check dates, not time\n Calendar atCalendar = Calendar.getInstance();\n atCalendar.setTime(atDate);\n atCalendar.set(Calendar.HOUR, 0);\n atCalendar.set(Calendar.MINUTE, 0);\n atCalendar.set(Calendar.SECOND, 0);\n atCalendar.set(Calendar.MILLISECOND, 0);\n\n Calendar nowCalendar = Calendar.getInstance();\n nowCalendar.setTime(Functions.nowDate());\n nowCalendar.set(Calendar.HOUR, 0);\n nowCalendar.set(Calendar.MINUTE, 0);\n nowCalendar.set(Calendar.SECOND, 0);\n nowCalendar.set(Calendar.MILLISECOND, 0);\n\n if (atCalendar.compareTo(nowCalendar) < 0) {\n EMCQuery creditQuery = new EMCQuery(enumQueryTypes.SELECT, DebtorsTransactionSettlementHistory.class);\n creditQuery.addFieldAggregateFunction(\"creditSettled\", \"SUM\");\n //Only include transactions that existed on atDate. Bev requested that we remove this check.\n //creditQuery.addAnd(\"transactionCreatedDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n\n //Only include transactions that fall on or before atDate.\n creditQuery.addAnd(\"creditTransactionDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n\n //Customer Id is optional.\n if (customerId != null) {\n creditQuery.addAnd(\"customerId\", customerId);\n }\n\n //Only include transactions settled after atDate\n creditQuery.addAnd(\"createdDate\", atDate, EMCQueryConditions.GREATER_THAN);\n\n BigDecimal creditSettled = (BigDecimal) util.executeSingleResultQuery(creditQuery, userData);\n if (creditSettled == null) {\n creditSettled = BigDecimal.ZERO;\n }\n\n outstandingCredit = outstandingCredit.add(creditSettled);\n }\n\n return outstandingCredit;\n }", "public static ListObject getNearbyEvents (int userId) {\n\t\tProfile user = getUser(userId) ;\n\t\tList <Event> events =EventController.setUserStatus(user.getEventsWhoOwn(), 2);\n\t\tevents.addAll( EventController.setUserStatus(user.getEvents(), 1)) ;\n\t\tCollections.sort(events);\n\t\tList <Event> unfinished = EventController.getUnfinishedEvents(events) ;\n\t\tint size = 5 ;\n\t\tListObject obj ;\n\t\tif ( unfinished.size() <= 5 ) {\n\t\t\tobj = new ListObject(unfinished) ;\n\t\t\tif ( unfinished.size() >= events.size() ) {\n\t\t\t\tobj.moreExist = 1 ;\n\t\t\t}\n\t\t\telse obj.moreExist = 2 ;\n\t\t}\n\t\telse {\n\t\t\tobj = new ListObject(unfinished.subList(0,size));\n\t\t\tobj.moreExist = 2 ;\n\t\t}\n\t\t\n\t\treturn obj ;\n\t}", "public void setUserLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n userLog.add(new UserLog(rs.getInt(\"userID\"),\n rs.getInt(2),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public interface UserTrackingLogger {\n\n public long getPositiveImpressionIdForMessage(long messageId);\n\n public long getNegativeImpressionIdForMessage(long messageId);\n\n public long getImpressionIdForMessage(long messageId, String questionText);\n \n public long getTopQuestionImpressionId(long conversationId, String questionText);\n\n public long getNoneOfTheAboveImpressionIdForMessage(long messageId);\n\n public long getForumVisitImpressionIdForMessage(long messageId);\n\n /**\n * Return a list of all impressions for the given message ID that have location=HIDDEN.\n * \n * @param messageId\n * @return\n */\n public List<Long> getHiddenImpressionIdsForMessage(long messageId);\n\n /**\n * Log a user query event.\n * \n * @param timestamp The time the event occurred\n * @param user Some identifier that ideally represents a single user interacting with the system\n * @param hostname The hostname or identifier of the system\n * @param referral The ID of the click that triggered this query, or null\n * @param questionText The text of the query\n * @param mode How the query was input by the user\n * @return The event ID\n */\n public long query(Date timestamp, String user, String hostname, Long referral, String questionText, InputMode mode);\n\n /**\n * Log a user impression event\n * \n * @param timestamp The time the event occurred\n * @param user Some identifier that ideally represents a single user interacting with the system\n * @param hostname The hostname or identifier of the system\n * @param referral The ID of the query that triggered this impression, or null\n * @param prompt The impression text\n * @param classifiedClass The answer class from the classifier, or null\n * @param offset The 1-based offset of this impression relative to other impressions from the same query\n * @param action Currently not used\n * @param location The location of the impression on the screen\n * @param provenance {@see Provenance}\n * @param confidence The confidence score from the classifier, or 0\n * @return The event ID\n */\n public long impression(Date timestamp, String user, String hostname, Long referral, String prompt,\n String classifiedClass, int offset, String action, Location location, Provenance provenance, double confidence);\n\n /**\n * @param timestamp The time the event occurred\n * @param user Some identifier that ideally represents a single user interacting with the system\n * @param hostname The hostname or identifier of the system\n * @param referral The ID of the impression that was clicked\n * @return The event ID\n */\n public long click(Date timestamp, String user, String hostname, Long referral);\n\n /**\n * Unhides an impression that was previously hidden from the user.\n * The event ID of the impression is unchanged.\n * \n * @param impressionId The event ID of the impression\n * @param newLocation The location of the impression on the screen\n */\n public void unhideImpression(long impressionId, Location newLocation);\n\n /**\n * Possible impression locations on the page\n */\n public static enum Location {\n MAIN_RESULTS_AREA, RIGHT_RAIL, FOOTER, \n /**\n * This is a special location to indicate impressions that were generated from a query\n * but not initially shown to the user. When the impression is shown to the user it\n * should be unhidden via unhideImpression().\n */\n HIDDEN\n };\n\n /**\n * Where an impression came from.\n * Currently only used to distinguish between clickable and non-clickable impressions.\n */\n public static enum Provenance {\n /**\n * This impression shows an answer inline and is not clickable.\n */\n INLINE, \n /**\n * This impression is clickable to either provide feedback or submit another query.\n */\n ALGO\n };\n\n}", "public static List<String> getUsernamesSortedByRecordDate(int threshold) {\n\t\t\n\t\t// get all data from service\n\t\tList<Data> data = getAllDataFromService();\t\n\t\t\n\t\t// sort by date\n\t\tfor (int i = 0; i < data.size(); i++) \n {\n for (int j = i + 1; j < data.size(); j++) { \n if (data.get(i).getCreated_at() < data.get(j).getCreated_at()) {\n Data temp1 = data.get(i); \n data.set(i, data.get(j));\n data.set(j, temp1);\n }\n }\n }\n\t\t\n\t\t//set by threshold, using submission count as criteria\n\t\tList<String> qualifiedUsers = new ArrayList<>();\n\t\tfor(int x=0; x<data.size(); x++) {\n\t\t\tif(data.get(x).getSubmission_count() >= threshold) {\n\t\t\t\tqualifiedUsers.add(data.get(x).getUsername());\n\t\t\t}\t\n\t\t}\n\t\treturn qualifiedUsers;\n\t}", "public Map<String, ActivityLog> getAllActivityLogsForUser(String userId)\n\t\t\tthrows PersuasionAPIException {\n\t\ttry {\n\t\t\tList<ActivityLog> activityLogs = activityLogDAO.getAllActivityLogsForUser(userId);\n\n\t\t\tMap<String, ActivityLog> returnMap = new HashMap<String, ActivityLog>();\n\t\t\tfor(ActivityLog activityLog : activityLogs) {\n\t\t\t\treturnMap.put(activityLog.getId().getActivity().getActivityName(), activityLog);\n\t\t\t}\n\t\t\treturn returnMap;\n\t\t} catch(PersuasionAPIException e) {\n\t\t\tthrow e;\n\t\t} catch(Exception e) {\n\t\t\tlog.error(\"Failed to retrieve activity log entries from database\"\n\t\t\t\t\t+ \" for user ID: \" + userId\n\t\t\t\t\t+ \"Exception type: \" + e.getClass().getName()\n\t\t\t\t\t+ \"Exception message: \" + e.getMessage());\n\t\t\tlog.debug(StringHelper.stackTraceToString(e));\n\t\t\tthrow new PersuasionAPIException(InternalErrorCodes.GENERATED_EXCEPTION,\n\t\t\t\t\t\"Failed to retrieve activity log entries from database\", e);\n\t\t}\n\t}", "@Override\n public List<Activity> getActivities(int userId) throws SQLException {\n ArrayList<Activity> foundActivities = new ArrayList<>();\n\n try (Connection connection = dataSource.getConnection()) {\n String findActivitiesQuery = \"SELECT * FROM ACTIVITY WHERE USERID = ?\";\n statement = connection.prepareStatement(findActivitiesQuery);\n statement.setInt(1, userId);\n resultSet = statement.executeQuery();\n while (resultSet.next()) {\n foundActivities.add(extractActivity(resultSet));\n }\n } catch (SQLException exception) {\n throw exception;\n } finally {\n close(statement, resultSet);\n }\n return foundActivities;\n }", "public JSONArray getSupervisorReportsData(final String startDate, final String toDate) throws Exception {\n\t\tfinal String endDate = toDate + \" 23:59:59\";\n\t\tfinal List<Object[]> entities = workListDao.getWorklistDataForSupervisorReport(startDate, endDate);\n\t\tfinal JSONArray jsonArray = new JSONArray();\n\t\tfor (Object[] entity : entities) {\n\t\t\tconstructJsonArray(entity, jsonArray);\n\t\t}\n\t\treturn jsonArray;\n\t}", "List<Bug> getOpenBugsBetweenDatesByUser(int companyId, Integer userId, Date since, Date until);", "public List<AttendanceRecord> getMyAttendance(SystemAccount user, int month, int year){\n Calendar cal = Calendar.getInstance();\n List<AttendanceRecord> returnList = new ArrayList<>();\n\n for(AttendanceRecord ar:arDao.findAll()){\n cal.setTime(ar.getDate());\n\n if( (cal.get(Calendar.MONTH)+1)==month && cal.get(Calendar.YEAR)==year && ar.getStaff().getStaffId().equalsIgnoreCase(user.getStaff().getStaffId()) ){\n returnList.add(ar);\n }\n }\n\n return returnList;\n }", "public int getCountOfMostUpcomingUserEvents(long userId);", "private void appointmentReport() {\n Set<String> types = new HashSet<>();\n Set<Month> months = new HashSet<>();\n HashMap<String, Integer> numberByType = new HashMap<>();\n HashMap<Month, Integer> numberByMonth = new HashMap<>();\n\n for (Appointment appointment: Data.getAppointments()) {\n months.add(appointment.getStart().toLocalDateTime().getMonth());\n types.add(appointment.getType());\n }\n\n for (String type: types) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n\n if (type.equals(appointment.getType())) {\n count++;\n }\n numberByType.put(type, count);\n }\n }\n for (Month month: months) {\n int count = 0;\n for (Appointment appointment: Data.getAppointments()) {\n if (month.equals(appointment.getStart().toLocalDateTime().getMonth())) {\n count++;\n }\n numberByMonth.put(month, count);\n }\n }\n\n reportText.appendText(\"Report of the number of appointments by type:\\n\\n\");\n reportText.appendText(\"Count \\t\\tType\\n\");\n numberByType.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n reportText.appendText(\"\\n\\n\\nReport of the number of appointments by Month:\\n\\n\");\n reportText.appendText(\"Count \\t\\tMonth\\n\");\n numberByMonth.forEach((k,v) -> reportText.appendText(v + \"\\t\\t\" + k + \"\\n\"));\n\n }", "public HashMap<User, Integer> userMonthRanking(User user, LinkedList<User> friends, int method){\n LinkedList<User> allUsers = new LinkedList<>();\n HashMap<User, Integer> result = new HashMap<>();\n\n allUsers.add(user);\n allUsers.addAll(friends);\n\n int rank = 0;\n long lastTime = -1;\n int lastSteps = -1;\n double lastDistance = -1;\n int lastAchievementCount = -1;\n\n switch (method){\n case METHODS.TIME:\n //sort the data\n Collections.sort(allUsers, new SortMonthTime());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getActiveTimeForMonth() != lastTime) {\n rank++;\n lastTime = next.getMyTimeline().getActiveTimeForMonth();\n }\n result.put(next, rank);\n }\n\n break;\n\n case METHODS.DISTANCE:\n //sort the data\n Collections.sort(allUsers, new SortMonthDistance());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getActiveDistanceForMonth() != lastDistance) {\n rank++;\n lastDistance = next.getMyTimeline().getActiveDistanceForMonth();\n }\n result.put(next, rank);\n }\n\n break;\n\n case METHODS.STEPS:\n //sort the data\n Collections.sort(allUsers, new SortMonthSteps());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getStepsForMonth() != lastSteps) {\n rank++;\n lastSteps = next.getMyTimeline().getStepsForMonth();\n }\n result.put(next, rank);\n }\n\n break;\n\n case METHODS.ACHIEVEMENTS:\n //sort the data\n Collections.sort(allUsers, new SortMonthAchievements());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getAchievementsForMonth() != lastAchievementCount) {\n rank++;\n lastAchievementCount = next.getMyTimeline().getAchievementsForMonth();\n }\n result.put(next, rank);\n }\n\n break;\n }\n\n return result;\n }", "private List<Summit> visibleSummits(PanoramaParameters p) {\n ArrayList<Summit> visibleSummits = new ArrayList<>();\n for (Summit s : summits) {\n GeoPoint obsPos = p.observerPosition();\n double distanceToSummit = obsPos.distanceTo(s.position());\n double azimuthToSummit = obsPos.azimuthTo(s.position());\n double angularDistanceToSummit = angularDistance(azimuthToSummit, p.centerAzimuth());\n double maxD = p.maxDistance();\n\n // we check if the distance to the sumit is less than the\n // maxDistance and if the angularDistance between the observer and\n // the summit is less than the horizontal field of view divided by\n // two\n if (distanceToSummit <= maxD\n && abs(angularDistanceToSummit) <= p.horizontalFieldOfView()\n / 2.0) {\n ElevationProfile e = new ElevationProfile(cDEM, obsPos,\n azimuthToSummit, distanceToSummit);\n DoubleUnaryOperator f = PanoramaComputer.rayToGroundDistance(e,\n p.observerElevation(), 0);\n double summitElevation = -f.applyAsDouble(distanceToSummit);\n double slope = atan2(summitElevation, distanceToSummit);\n\n // we ckeck if the slope is in the vertical field of view\n if (abs(slope) <= p.verticalFieldOfView() / 2.0) {\n DoubleUnaryOperator f1 = rayToGroundDistance(e, p.observerElevation(), summitElevation / distanceToSummit);\n double rayToGround = firstIntervalContainingRoot(f1, 0,\n distanceToSummit, STEP);\n\n // if the distance with the rayToGround is bigger than\n // distance to sommit minus the tolerance we add the summit\n // to the list\n if (rayToGround >= distanceToSummit - TOLERANCE) {\n visibleSummits.add(s);\n }\n }\n }\n }\n\n visibleSummits.sort((a, b) -> {\n int yARounded = yRounded(a, p);\n int yBRounded = yRounded(b, p);\n if (yARounded == yBRounded) {\n return compare(b.elevation(), a.elevation());\n }\n return compare(yARounded, yBRounded);\n });\n return unmodifiableList(visibleSummits);\n }", "public ArrayList<String> getUserLog(String username) {\n \t\treturn this.getUserByName(username).getActivities();\n \t}", "public void takeAttendance(BufferedImage image, Map<String, BufferedImage> studentsHere) {\n\t\t// api call in order to get the total number of faces in an image. \n\t\tint total = 0; //api call\n\t\t\n\t\tisPresent = new HashMap<String, Boolean>();\n\t\tfor (String student : studentsHere.keySet()) {\n//\t\t\tif ( /* if student is present */ ) {\n//\t\t\t\tisPresent.put(student, true);\n//\t\t\t\tstudentCount++;\n//\t\t\t} else {\n//\t\t\t\tisPresent.put(student, false);\n//\t\t\t}\n\t\t}\n\t\t// at the end get the total number of students in the image and then see how many left. \n\t\tnotInRoster = total - studentCount;\n\t}", "private List<Event> getEventsOnDate(Date date) {\r\n List<Event> eventsOnDate = new ArrayList<>();\r\n for (Event event : this.events) {\r\n if (event.getDate().equals(date)) {\r\n eventsOnDate.add(event);\r\n }\r\n }\r\n\r\n return eventsOnDate;\r\n }", "@Override\r\n\tpublic List<Report> getUserReportList(int userId) {\n\t\treturn reportMapper.selByUserId(userId);\r\n\t}", "@Override\r\n\tpublic List<DispatchAnalysis> getDispatchDetailsBetween(Date fromDate, Date toDate)\t{\r\n\t\t\r\n\t\tList<DispatchAnalysis> dispatchAnalysisDetails=new ArrayList<>();\r\n\t\tDispatchAnalysis dispatchAnalysis=new DispatchAnalysis();\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\r\n\t\tList<Order> orderDetails=orderService.getOrdersBetween(fromDate, toDate);\r\n\t\tSystem.out.println(orderDetails);\r\n\t\t//for each order placed, get shipment details\r\n\t\tfor(Order order:orderDetails)\t{\r\n\t\t\tList<Shipment> shipmentDetails=order.getShipments();\r\n\t\t\tSystem.out.println(shipmentDetails);\r\n\t\t\t\r\n\t\t\tfor(Shipment shipment:shipmentDetails)\t{\r\n\t\t\t\t\r\n\t\t\t\tc.setTime(order.getOrderDate());\r\n\t\t\t\tc.add(c.DAY_OF_MONTH, 1);\r\n\t\t\t\t\r\n\t\t\t\tdispatchAnalysis.setProductName(shipment.getProduct().getProductName());\r\n\t\t\t\tdispatchAnalysis.setMerchantName(shipment.getProduct().getInventory().getMerchant().getMerchantName());\r\n\t\t\t\t//expected dispatch date of the product is one day after order placed\r\n\t\t\t\tdispatchAnalysis.setExpectedDispatchDate(c.getTime());\r\n\t\t\t\tdispatchAnalysis.setActualDispatchDate(shipment.getDispatchDate());\r\n\t\t\t\tdispatchAnalysis.setDeliveryDate(shipment.getDeliveryDate());\r\n\t\t\t\t\r\n\t\t\t\tdispatchAnalysisDetails.add(dispatchAnalysis);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn dispatchAnalysisDetails;\r\n\t}", "public EventList getEvents(String userName) {\n try {\n PreparedStatement s = sql.prepareStatement(\"SELECT userId, eventName, startMonth, startDay, startYear, startHour, startMinute\" +\n \", endMonth, endDay, endYear, endHour, endMinute FROM Events WHERE userId=?\");\n s.setInt(1, getIdOfUser(userName));\n s.execute();\n ResultSet results = s.getResultSet();\n\n EventList events = new EventList();\n if (!results.isBeforeFirst()) {\n return events;\n }\n\n while (!results.isLast()) {\n results.next();\n Event e = new Event(userName, results.getString(2),\n results.getInt(3), results.getInt(4), results.getInt(5),\n results.getInt(6), results.getInt(7), results.getInt(8),\n results.getInt(9), results.getInt(10), results.getInt(11),\n results.getInt(12));\n events.add(e);\n }\n results.close();\n s.close();\n events.sort();\n\n return events;\n } catch (SQLException e) {\n System.err.println(\"SQLE\");\n sqlException(e);\n return null;\n }\n }", "public Map<SalePurchase, Payment> viewCreditEntries(String date){\n\t\tMap<SalePurchase, Payment> map = new HashMap<>();\n\t\tList<SalePurchase> spList = new ArrayList<>(salePurchaseEntries.values());\n\t\tList<Payment> paymentList = new ArrayList<>(payments.values());\n\t\tfor(SalePurchase sp : spList){\n\t\t\tif(sp.getDate().equals(date) && sp.getMode().equals(\"Sale\")){\n\t\t\t\tfor(Payment p : paymentList){\n\t\t\t\t\tif(p.getSPId() == sp.getSPId()){\n\t\t\t\t\t\tmap.put(sp, p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}", "@Override\n public List<Object[]> getStatistics(String owner, StatisticsGroup group, SearchEventType type, String from, String to) {\n String date = parseDateLimit(from, to);\n String groupHQL = this.groupToHQL(group);\n List<Object[]> list = (List<Object[]>) getHibernateTemplate().findByNamedParam(\"select count(*), \"\n + \"count(distinct ipAddress), \" + groupHQL + \" \"\n + \"from SearchEvent \"\n + \"where owner like :owner \"\n + \"and eventType = :type \"\n + date + \" \"\n + \"group by col_2_0_\", new String[]{\"owner\", \"type\"}, new Object[]{owner, type});\n return list;\n }", "@Override\n\tpublic JsonListResult findCheckRecordByUidAndDate(String uid, String date) throws Exception {\n\t\tJsonListResult jsonListResult = new JsonListResult();\n\t\t date = date + \"%\";\n\t\tList<Map<String, Object>> list = wxRequestMapper.findCheckRecordByUidAndDate(uid , date);\n\t\tjsonListResult.setList(list);\n\t\treturn jsonListResult;\n\t}", "private void statisticsReportList(int userGroupID) {\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(\"select * from reports where user_group_id=\" + userGroupID + \" order by week asc\");\n\t\t\t//create table\n\t\t\tout.println(\"<form name=\" + formElement(\"input\") + \" method=\" + formElement(\"post\")+ \">\");\n\t\t\tout.println(\"<h1>Time Reports - Statistics</h1>\");\n\t\t\tout.println(\"<p>Select time reports that you want to summerize and click view</p>\");\n\t\t out.println(\"<table border=\" + formElement(\"1\") + \">\");\n\t\t out.println(\"<tr><td>Selection</td><td>Last update</td><td>Week</td><td>Total Time</td><td>Signed</td></tr>\");\n\t\t int inWhile = 0; \n\t \tint nbrOfReports = 0;\n\t\t while(rs.next()){\n\t\t \tnbrOfReports++;\n\t\t \tinWhile = 1;\n\t\t \tString reportID = \"\"+rs.getInt(\"ID\");\n\t\t\t\tDate date = rs.getDate(\"date\");\n\t\t\t\tint week = rs.getInt(\"week\");\n\t\t\t\tint totalTime = rs.getInt(\"total_time\");\n\t\t\t\tint signed = rs.getInt(\"signed\");\n\t\t\t\t//print in box\n\t\t\t\tout.println(\"<tr>\");\n\t\t\t\tout.println(\"<td>\" + \"<input type=\" + formElement(\"checkbox\") + \" name=\" + formElement(\"reportIDs\"+nbrOfReports) +\n\t\t\t\t\t\t\" value=\" + formElement(reportID) +\"></td>\");\t\t//radiobutton\n\t\t\t\tout.println(\"<td>\" + date.toString() + \"</td>\");\n\t\t\t\tout.println(\"<td>\" + week + \"</td>\");\n\t\t\t\tout.println(\"<td>\" + totalTime + \"</td>\");\n\t\t\t\tout.println(\"<td>\" + signString(signed) + \"</td>\");\n\t\t\t\tout.println(\"</tr>\");\n\t\t\t}\n\t\t out.println(\"</table>\");\n\t\t out.println(\"<button type=\" + formElement(\"submit\") + \"name='submitStatistics' value=\"+ nbrOfReports +\">View </button>\");\n\t\t out.println(\"</form>\");\n\t\t if (inWhile == 0){\n\t\t \tout.println(\"No reports to show\");\n\t\t }\n\t\t} catch(SQLException e) {\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t}\t\n\t}", "@Override\n public JSONObject viewSalesCallLogByExecutive(String username) {\n\n return in_salescalllogdao.viewSalesCallLogByExecutive(username);\n }", "public static void setUserDatesFromCal(String userId, List<Date> dates) {\n // convert the list of dates to a list of strings in the desired format\n SimpleDateFormat format = new SimpleDateFormat(\"MM/dd/yyyy\",\n Locale.getDefault());\n List<String> sDates = new ArrayList<>();\n for (Date date : dates) {\n sDates.add(format.format(date));\n }\n\n Log.d(Const.TAG, \"setUserDatesFromCal: \" + Thread.currentThread().getId());\n\n // add the list of dates to the database\n FirebaseFirestore.getInstance()\n .collection(Const.USERS_COLLECTION)\n .document(userId)\n .update(Const.DATE_LIST_KEY, sDates);\n }", "private String getIndexDate(String criteriaMet, Map<String, List<Info>> criteria) {\n\t\tSortedSet<String> date = new TreeSet<String>();\n\t\t\n\t\tString[] crit = criteriaMet.split(\":\");\n\t\tfor(int i=0; i<crit.length; i++) {\n\t\t\tList<Info> info = criteria.get(crit[i]);\n\t\t\tif(info==null) {\n\t\t\t\tSystem.out.println(crit[i] + \" has NO Info\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t//info includes \"all\" related conditions until it satisfies the criteria\n\t\t\t//so the last element will be the earliest date \n\t\t\tdate.add(info.get(info.size()-1).date);\n\t\t}\n\t\t\n\t\t//date is in order of earliest to latest \n\t\treturn date.last();\n\t}", "private MonthCellWithMonthIndex getMonthCellWithIndexByDate(Date date) {\n\t\tint index = 0;\n\t\tCalendar searchCal = Calendar.getInstance(locale);\n\t\tsearchCal.setTime(date);\n\t\tCalendar actCal = Calendar.getInstance(locale);\n\n\t\tfor (List<List<MonthCellDescriptor>> monthCells : cells) {\n\t\t\tfor (List<MonthCellDescriptor> weekCells : monthCells) {\n\t\t\t\tfor (MonthCellDescriptor actCell : weekCells) {\n\t\t\t\t\tactCal.setTime(actCell.getDate());\n\t\t\t\t\tif (sameDate(actCal, searchCal) && actCell.isSelectable()) {\n\t\t\t\t\t\treturn new MonthCellWithMonthIndex(actCell, index);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\t\treturn null;\n\t}", "private void executeReportRequest(String user_id, String search_date, final String searchedUser){\n new ServerApiRequests(this,\n\n new ServerApiRequests.AsyncStart(){\n\n @Override\n public void onProcessStart(){\n loadReport.setVisibility(View.VISIBLE);\n }\n },\n\n new ServerApiRequests.AsyncResponse() {\n\n @Override\n public void onProcessFinish(String output) {\n Log.e(\"response\", output);\n\n try {\n JSONObject result = new JSONObject(output);\n\n PersonalToastDesign tst = new PersonalToastDesign(getApplicationContext());\n String state = result.getString(\"success\");\n if(state.equals(\"true\")) {\n// tst.showToast(\"User unfriended.\");\n\n mMap.clear();\n ArrayList<Marker> markersList = new ArrayList<Marker>();\n double distance = 0;\n double prev_x = 0;\n double prev_y = 0;\n\n PolylineOptions rectOptions = new PolylineOptions();\n JSONArray jsonUsers = result.getJSONArray(\"user\");\n\n\n for (int i = 0; i < jsonUsers.length(); i++) {\n\n\n PointCoordinates tempPoint = new PointCoordinates(\n jsonUsers.getJSONObject(i).getDouble(\"COOR_X\")\n , jsonUsers.getJSONObject(i).getDouble(\"COOR_Y\")\n ,jsonUsers.getJSONObject(i).getString(\"REC_DATE\"));\n\n Marker marker = mMap.addMarker(new MarkerOptions()\n .position(new LatLng(tempPoint.getCoord_x(), tempPoint.getCoord_y()))\n .title(tempPoint.getRec_date())\n// .icon(BitmapDescriptorFactory.fromResource(R.drawable.red_house))\n );\n// marker.showInfoWindow();\n markersList.add(marker);\n\n rectOptions.add(new LatLng(tempPoint.getCoord_x(), tempPoint.getCoord_y()));\n\n // accumulate distance\n\n if (i > 0){\n distance += tempPoint.distanceToMe(prev_x,prev_y);\n } else {\n prev_x = tempPoint.getCoord_x();\n prev_y = tempPoint.getCoord_y();\n }\n }\n\n showDistance.setVisibility(View.VISIBLE);\n double finalValue = Math.round( distance * 1000.0 ) / 1000.0;\n showDistance.setText(\"Изминатo разстояние от \"+ searchedUser + \" ~ \" + String.valueOf(finalValue)+ \" км.\");\n\n\n mMap.addPolyline(rectOptions).setColor(Color.GREEN);;\n\n // zooming\n final int padding = 30;//initialize the padding for map boundary\n /**create the bounds from latlngBuilder to set into map camera*/\n LatLngBounds.Builder builder = new LatLngBounds.Builder();\n for (Marker m : markersList) {\n builder.include(m.getPosition());\n }\n\n final LatLngBounds bounds = builder.build();\n mMap.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, padding));\n\n } else {\n //tst.showToast(result.getString(\"error\"));\n String r = result.getString(\"error\");\n if(r.equals(\"Day or user not found\")) {\n tst.showToast(\"Денят, или потребителят не са намерени\");\n }\n if(r.equals(\"Please provide user name and search date\")) {\n tst.showToast(\"Моля въведете име и търсена дата\");\n }\n\n mMap.clear();\n showDistance.setVisibility(View.GONE);\n mMap.animateCamera(CameraUpdateFactory.zoomTo(1));\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n PersonalToastDesign tst = new PersonalToastDesign(getApplicationContext());\n tst.showToast(\"Възникна проблем със сървъра\");\n mMap.clear();\n executeReport.setEnabled(true);\n showDistance.setVisibility(View.GONE);\n loadReport.setVisibility(View.GONE);\n mMap.animateCamera(CameraUpdateFactory.zoomTo(1));\n }\n\n loadReport.setVisibility(View.GONE);\n executeReport.setEnabled(true);\n }\n }\n\n ).execute(\"get_report_coords_url\", user_id, search_date);\n }", "private String getIndexDate(String criteriaMet, Map<String, List<Info>> criteria, boolean isAny) {\n\t\tSortedSet<String> date = new TreeSet<String>();\n\t\t\n\t\tString[] crit = criteriaMet.split(\":\");\n\t\tfor(int i=0; i<crit.length; i++) {\n\t\t\tList<Info> info = criteria.get(crit[i]);\n\t\t\tif(info==null) {\n\t\t\t\tSystem.out.println(crit[i] + \" has NO Info\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t//info includes \"all\" related conditions until it satisfies the criteria\n\t\t\t//so the last element will be the earliest date that satisfies the criteria\n\t\t\tdate.add(info.get(info.size()-1).date);\n\t\t}\n\t\t\n\t\t//date is in order of earliest to latest \n\t\tif(isAny)\n\t\t\treturn date.first();\n\t\telse\n\t\t\treturn date.last();\n\t}", "List<Integer> getIdUsersToSendFirstAlert( Timestamp alertMaxDate );", "public SPResponse getErtiAnalytics(User user, Object[] params) {\n \n String userCompany = user.getCompanyId();\n \n SPResponse ertiInsightsResponse = new SPResponse();\n \n ErtiAnalytics ertiAnalytics = spectrumFactory.getErtiAnalytics(userCompany);\n \n LOG.debug(\"erti analytics returened is \" + ertiAnalytics);\n \n ertiInsightsResponse.add(\"ertiAnalytics\", ertiAnalytics);\n ertiInsightsResponse.isSuccess();\n return ertiInsightsResponse;\n }", "public List<Assignment> searchAssignmentsByDate(String date) throws Exception{\n\t\t\n\t\tList<Assignment> assignments = new ArrayList<Assignment>();\n\n\t\tString where = MySQLiteHelper.ASSIGNMENT_DUEDATE + \" = '\"+date+\"'\";\n\t\ttry{\n\t\t\tCursor cursor = database.query(MySQLiteHelper.TABLE_ASSIGNMENT,\n\t\t\t\t\tallColumns, where,\n\t\t\t\t\tnull, null, null, null);\n\n\t\t\tcursor.moveToFirst();\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tAssignment data_assignment = cursorToAssignment(cursor);\n\t\t\t\tassignments.add(data_assignment);\n\t\t\t\tcursor.moveToNext();\n\t\t\t}\n\t\t\t// Make sure to close the cursor\n\t\t\tLog.d(\"Add\", \"Search results - \"+assignments.size());\n\t\t\treturn assignments;\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tthrow e;\n\t\t}\n\t\t\n\t}", "TreeMap<Date, Map<Integer, List<Bug>>> getCompletedBugsGroupByDateByUser(int companyId, int userId,\n List<Integer> projectList, Date until, int limit);", "public List<Apointment> getMyApointments(Long userId) {\n\t\tString sql =\"select \"\n\t\t\t\t+ \"b.booking_id as doc_id, u.firstName, u.lastName, u.email, s.specification, b.description, b.status, b.date, b.time \"\n\t\t\t\t+ \"from bookings b join HealthUsers u \"\n\t\t\t\t+ \"on b.doc_id=u.id \"\n\t\t\t\t+ \"join doc_specification ds \"\n\t\t\t\t+ \"on ds.doc_id = b.doc_id \"\n\t\t\t\t+ \"join specifications s \"\n\t\t\t\t+ \"on s.id = ds.specification_id \"\n\t\t\t\t+ \"where b.user_id = ?\";\n\t\t\n\t\treturn jdbcTemplate.query(sql, new ApointmentRowMapper(), userId);\n\t}", "public SPResponse getErtiInsights(User user, Object[] params) {\n \n String userCompany = user.getCompanyId();\n \n SPResponse ertiInsightsResponse = new SPResponse();\n \n ErtiInsights ertiInsights = spectrumFactory.getErtiInsights(userCompany);\n \n LOG.debug(\"ertiInsights returened is \" + ertiInsights);\n \n ertiInsightsResponse.add(\"ertiInsights\", ertiInsights);\n ertiInsightsResponse.isSuccess();\n return ertiInsightsResponse;\n }", "public List<Absence> getAllAbsencesOnAGivenDate(LocalDate date) throws SQLException {\n List<Absence> allAbsencesForADate = new ArrayList(); //get a list to store the values.\n java.sql.Date sqlDate = java.sql.Date.valueOf(date); // converts LocalDate date to sqlDate\n try(Connection con = dbc.getConnection()){\n String SQLStmt = \"SELECT * FROM ABSENCE WHERE DATE = '\" + sqlDate + \"'\";\n Statement statement = con.createStatement();\n ResultSet rs = statement.executeQuery(SQLStmt);\n while(rs.next()) //While you have something in the results\n {\n int userKey = rs.getInt(\"studentKey\");\n allAbsencesForADate.add(new Absence(userKey, date)); \n } \n }\n return allAbsencesForADate;\n }", "@Override\n public Map<String, Object> getMemberReport() {\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.MONTH,-12);\n List<String> monthList = new ArrayList<>();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM\");\n for (int i = 0; i < 12; i++) {\n calendar.add(Calendar.MONTH,1);\n monthList.add(sdf.format(calendar.getTime()));\n }\n Map<String,Object> map = new HashMap<>();\n map.put(\"months\",monthList);\n List<Integer> memberCntList = findMemberCntByMonthList(monthList);\n map.put(\"memberCntList\",memberCntList);\n return map;\n }", "private List<EngineUserExperianceData> getEngineUserExperianceDataList(\n\t\t\tfinal UserDataModel userDetail) {\n\t\tList<EngineUserExperianceData> engineUserExperianceDataList = Lists\n\t\t\t\t.newArrayList();\n\t\tif (userDetail.getUserExperienceDataModels() != null\n\t\t\t\t&& !userDetail.getUserExperienceDataModels().isEmpty()) {\n\t\t\tList<UserExperienceDataModel> userExperienceDataModelsList = new ArrayList<UserExperienceDataModel>(\n\t\t\t\t\tuserDetail.getUserExperienceDataModels());\n\t\t\t// Sort the userExperience detail according to user latest Job.\n\t\t\t// Sort them in the Decreasing order of 'User's working start date'.\n\t\t\tCollections.sort(userExperienceDataModelsList,\n\t\t\t\t\tnew UserExperienceDataModel.OrderByLatestCompany());\n\t\t\t//\n\t\t\tint index = 1;\n\t\t\tfor (UserExperienceDataModel userExperinceDetail : userExperienceDataModelsList) {\n\t\t\t\tEngineUserExperianceData engineUserExperianceData = new EngineUserExperianceData();\n\t\t\t\tengineUserExperianceData.setCompanyName(userExperinceDetail\n\t\t\t\t\t\t.getCompanyName());\n\t\t\t\tengineUserExperianceData.setWorkDescription(userExperinceDetail\n\t\t\t\t\t\t.getDescription());\n\t\t\t\tengineUserExperianceData\n\t\t\t\t\t\t.setWorkTenureInCompany(userExperinceDetail\n\t\t\t\t\t\t\t\t.getTotalExpMonth());\n\t\t\t\tengineUserExperianceData.setJobWorkTitle(userExperinceDetail\n\t\t\t\t\t\t.getCompanyName());\n\t\t\t\tengineUserExperianceData.setSwitchIndexOfCompanyByUser(index++);\n\t\t\t\t// add to the list\n\t\t\t\tengineUserExperianceDataList.add(engineUserExperianceData);\n\t\t\t}\n\t\t}\n\t\treturn engineUserExperianceDataList;\n\t}", "@Override\n\tpublic List<ShowManageMoney> listByByPlanIdDate(Long bidPlanId,\n\t\t\tString intentDate) {\n\t\treturn dao.listByByPlanIdDate(bidPlanId, intentDate);\n\t}", "@Override\r\n\tpublic List<Report> getReport(Agents agent, Date from, Date to) {\n\t\treturn null;\r\n\t}", "public String[][][] getSchedule(int userId)throws SQLException{\n //create the arrays\n String[] startTimes;\n String[] endTimes;\n String[] titles;\n String[] locations;\n String[][] times;\n String[][] data;\n String[][][] results;\n \n //declare the size int, used to initialize the arrays\n int size = 0;\n \n //Create the LocalDate objects to use in query\n LocalDate date = LocalDate.now();\n Month month = date.getMonth();\n int year = date.getYear();\n int firstDay = 1;\n int lastDay = date.lengthOfMonth();\n LocalDate begin = LocalDate.of(year, month, firstDay);\n LocalDate end = LocalDate.of(year, month, lastDay);\n \n //Establish the connection\n Connection conn = DriverManager.getConnection(url, user, pass);\n \n //Run query and set size value\n String query = \"SELECT COUNT(*) FROM appointment WHERE userId = \"\n + userId + \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\";\n PreparedStatement ps = conn.prepareStatement(query);\n \n ResultSet set = ps.executeQuery(query);\n ResultSetMetaData meta = set.getMetaData();\n int columns = meta.getColumnCount();\n \n while(set.next()){\n for(int i = 1; i <= columns; i++){\n size = set.getInt(i);\n }\n } \n \n //initialize the arrays\n startTimes = new String[size];\n endTimes = new String[size];\n titles = new String[size];\n locations = new String[size];\n \n //Populate the startTimes array\n int x = 0;\n query = \"SELECT start FROM appointment WHERE userId = \" + userId \n + \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\";\n ps = conn.prepareStatement(query);\n \n set = ps.executeQuery(query);\n meta = set.getMetaData();\n columns = meta.getColumnCount();\n \n while(set.next()){\n for(int i = 1; i <= columns; i++){\n String value = set.getString(i);\n startTimes[x] = value;\n x++;\n }\n } \n \n //Populate the endTimes array\n x = 0;\n set = ps.executeQuery(\"SELECT end FROM appointment WHERE userId = \" + userId + \n \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\");\n meta = set.getMetaData();\n columns = meta.getColumnCount();\n while(set.next()){\n for(int i = 1; i <= columns; i++){\n String value = set.getString(i);\n endTimes[x] = value;\n x++;\n }\n }\n \n //Populate the titles array\n x = 0;\n set = ps.executeQuery(\"SELECT title FROM appointment WHERE userId = \" + userId + \n \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\");\n meta = set.getMetaData();\n columns = meta.getColumnCount();\n while(set.next()){\n for(int i = 1; i <= columns; i++){\n String value = set.getString(i);\n titles[x] = value;\n x++;\n }\n }\n \n //Populate the descriptions array\n x = 0;\n set = ps.executeQuery(\"SELECT location FROM appointment WHERE userId = \" + userId + \n \" AND start BETWEEN '\" + begin + \"' AND '\" + end + \"'\");\n meta = set.getMetaData();\n columns = meta.getColumnCount();\n while(set.next()){\n for(int i = 1; i <= columns; i++){\n String value = set.getString(i);\n locations[x] = value;\n x++;\n }\n }\n \n //initialize the matrices\n data = new String[][]{titles, locations};\n times = new String[][]{startTimes, endTimes};\n \n results = new String[][][]{data, times};\n return results;\n \n }", "public double getElevationData(String date){\n\t\tJSONArray array = new JSONArray(elevHistory);\n\t\tfor(int i = 0; i<array.length();i++){\n\t\t\tJSONObject json = array.getJSONObject(i);\n\t\t\tif(json.get(\"dateTime\").equals(date))\n\t\t\t\treturn Double.parseDouble(json.get(\"value\").toString());\n\t\t}\n\t\treturn -1;\n\t}", "@Override\r\n\tpublic List<EstimateTO> findEstimateList(HashMap<String, Object> searchDate) {\n\t\treturn estimateApplicationService.findEstimateList(searchDate);\r\n\t}", "@Override\n public JSONObject viewSalesCallLogByManager(String username) {\n return in_salescalllogdao.viewSalesCallLogByManager(username);\n }", "@Override\n\tpublic List<Integer> usersDate(String fecha) {\n\t\treturn controlA.usersDate(fecha);\n\t}", "public void imminentAppointment(String username) throws SQLException {\n this.currentUser = username;\n ObservableList<Appointment> allAppointments = dbQuery.getAllAppointments();\n ObservableList<User> allUsers = dbQuery.getAllUsers();\n Appointment imminentAppointment = null;\n User user = null;\n //get username entered at login\n for(User u : allUsers){\n if(u.getUserName().equals(username)){\n user = u;\n }\n }\n //get possible appointment within 15 minutes\n for(Appointment a : allAppointments){\n long timeDifference = ChronoUnit.MINUTES.between(LocalDateTime.now(), a.getAppointmentStart());\n assert user != null;\n if(a.getUserID() == user.getUserID() && timeDifference > 0 && timeDifference <= 15) {\n imminentAppointment = a;\n }\n }\n\n //display message in dialog box if there is an imminent appointment.\n if(imminentAppointment != null){\n LocalDate appointmentDate = imminentAppointment.getAppointmentStart().toLocalDate();\n LocalTime appointmentTime = imminentAppointment.getAppointmentStart().toLocalTime();\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Upcoming Appointment\");\n alert.setHeaderText(\"You have an appointment within 15 minutes.\");\n alert.setContentText(\"Appointment ID: \" + imminentAppointment.getAppointmentID() + \"\\n\" +\n \" Date: \" + appointmentDate + \"\\n\" +\n \" Time: \" + appointmentTime);\n alert.showAndWait();\n }\n //if no appointment was found, display no upcoming appointment reminder\n else {\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Upcoming Appointment\");\n alert.setHeaderText(\"You have no upcoming appointments.\");\n alert.showAndWait();\n }\n\n }", "@Override\r\n\tpublic List<SalesAnalysis> getSalesAnalysis(Date fromDate, Date toDate) {\r\n\t\t\r\n\t\tList<SalesAnalysis> salesAnalysisDetails=new ArrayList<>();\r\n\t\tSalesAnalysis salesAnalysis=new SalesAnalysis();\r\n\t\t\r\n\t\t//get orders placed in the given period\r\n\t\tList<Order> orderDetails=orderService.getOrdersBetween(fromDate, toDate);\r\n\t\t\r\n\t\tHashMap<String, Double> purchasePriceDetails=new HashMap<>();\r\n\t\tHashMap<String, Double> salesPriceDetails=new HashMap<>();\r\n\t\tint qty=0;\r\n\t\tdouble salesPrice=0;\r\n\t\tdouble purchasePrice=0;\r\n\t\t\r\n\t\t//get total revenue for period\r\n\t\tdouble totalRevenue=getTotalRevenueBetween(fromDate, toDate);\r\n\t\t\r\n\t\t//get best seller details for the products, category-wise(from PRODUCT table)\r\n\t\tList<Object[]> bestSellerDetails=productService.getBestSellerId();\r\n\t\tSystem.out.println(bestSellerDetails);\r\n\t\t\r\n\t\t\r\n\t\t//for each product category, check sales details\r\n\t\tfor(Object[] object:bestSellerDetails)\t{\r\n\t\t\tString productCategory=(String)object[0];\r\n\t\t\tsalesPrice=0;\r\n\t\t\tpurchasePrice=0;\r\n\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\r\n\t\t\t//for each order, check product category and add details to maps\r\n\t\t\tfor(Order order:orderDetails)\t{\r\n\t\t\t\t\r\n\t\t\t\t//get products in this order\r\n\t\t\t\tList<CartProduct> products=order.getCart().getCartProducts();\r\n\t\t\t\t\r\n\t\t\t\t//getting purchase price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tpurchasePrice=purchasePriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(product.getProduct().getQuantity()*product.getProduct().getProductPrice());\r\n\t\t\t\t\t\tpurchasePriceDetails.put(productCategory, purchasePrice);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//getting sales price details for each product ordered\r\n\t\t\t\tfor(CartProduct product:products)\t{\r\n\t\t\t\t\tif(product.getProduct().getProductCategory().equals(productCategory))\t{\r\n\t\t\t\t\t\tqty=product.getQuantity();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsalesPrice=salesPriceDetails.get(productCategory)+\r\n\t\t\t\t\t\t\t\t(qty*(100-product.getProduct().getDiscount())*product.getProduct().getProductPrice())/100;\r\n\t\t\t\t\t\tsalesPriceDetails.put(productCategory, salesPrice);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//make SalesAnalysis object using obtained data\r\n\t\t\tsalesAnalysis.setProductCategory(productCategory);\r\n\t\t\tsalesAnalysis.setMerchant(merchantService.getMerchantName((Integer)object[1]));\r\n\t\t\tsalesAnalysis.setProductQuantity(purchasePriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setProductSales(salesPriceDetails.get(productCategory));\r\n\t\t\tsalesAnalysis.setSalesPercent((salesAnalysis.getProductSales()*100)/salesAnalysis.getProductQuantity());\r\n\t\t\tsalesAnalysis.setTotalRevenue(totalRevenue);\r\n\t\t\t\r\n\t\t\t//make a list of sales analysis performed\r\n\t\t\tsalesAnalysisDetails.add(salesAnalysis);\r\n\t\t}\r\n\t\t\r\n\t\treturn salesAnalysisDetails;\r\n\t}", "private void findStaffLinePositions()\n {\n Log.i(TAG, \"findStaffLinePositions\");\n final int sliceStart = (int)(0.45*mWidth);\n final int sliceEnd = (int)(0.65*mWidth);\n \n boolean connected;\n int lineNum;\n for(int x = sliceStart; x<sliceEnd; ++x) //only consider a slice of x values\n {\n connected=false;\n lineNum=0;\n for(int y=0; y<mHeight; ++y)\n {\n if(mHorizontalProjHist[y] >= x) //the histogram for this y value is within the slice we're looking at\n {\n if(mStaffLineMap.indexOfKey(y) < 0) //we haven't seen this y value, so add it\n {\n \tmStaffLineMap.put(y, lineNum);\n }\n connected = true;\n }\n else if(connected) //encountered whitespace after a line\n {\n lineNum++;\n connected = false;\n }\n }\n }\n\n }", "@Override\n public List<ScheduledInterview> getScheduledInterviewsInRangeForUser(\n String userId, Instant minTime, Instant maxTime) {\n TimeRange range = new TimeRange(minTime, maxTime);\n List<ScheduledInterview> scheduledInterviews = getForPerson(userId);\n List<ScheduledInterview> scheduledInterviewsInRange = new ArrayList<ScheduledInterview>();\n for (ScheduledInterview scheduledInterview : scheduledInterviews) {\n if (range.contains(scheduledInterview.when())) {\n scheduledInterviewsInRange.add(scheduledInterview);\n }\n }\n return scheduledInterviewsInRange;\n }", "public List getUserAllAwayHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public void addUsedUDay(Integer date) {\n pastUDays.add(date);\n }", "public List<Events> getMostUpcomingUserEvents(long userId);", "public void populateDataForVisitTimeReport(final Date startDate, final Date endDate,\n final List<String> companyCodes) {\n\n // reset\n this.mapCompanyBranchVsListEmployee = new HashMap<>();\n this.mapCompanyBranchVsListOfPurposes = new HashMap<>();\n this.mapCompanyBranchVsVisitTimes = new HashMap<>();\n this.mapCompanyBranchPurposeVsVisitTimes = new HashMap<>();\n this.mapCompanyBranchEmployeePurposeVsVisitTimes = new HashMap<>();\n this.mapCompanyBranchEmployeeVsVisitTimes = new HashMap<>();\n // init\n for (final String companyCode : companyCodes) {\n for (final String branchCode : SummaryReportService.BRANCHES.keySet()) {\n final String key =\n String.format(SummaryReportService.COMPANY_BRANCH_KEY_PATTERN, companyCode, branchCode);\n this.mapCompanyBranchVsListEmployee.put(key, new ArrayList<Integer>());\n this.mapCompanyBranchVsListOfPurposes.put(key, new ArrayList<Short>());\n this.mapCompanyBranchVsVisitTimes.put(key, 0);\n }\n }\n\n final List<Daily_report> listDailyReport = this.getListVisited(startDate, endDate, companyCodes);\n\n for (final Daily_report daily : listDailyReport) {\n final String companyCode = daily.getDai_company_code();\n String branchCode = daily.getDai_point_code();\n\n final int employeeCode = daily.getDai_employee_code();\n final boolean isHQ = daily.getEmployee_mst().getEmp_settle_authority() == AuthorityLevels.HEAD_QUARTER;\n if (isHQ) {\n branchCode = SummaryReportConstants.HQ_CODE;\n }\n final String companyBranchKey =\n String.format(SummaryReportService.COMPANY_BRANCH_KEY_PATTERN, companyCode, branchCode);\n\n if (this.mapCompanyBranchVsListEmployee.containsKey(companyBranchKey)) {\n if (!this.mapCompanyBranchVsListEmployee.get(companyBranchKey).contains(employeeCode)) {\n this.mapCompanyBranchVsListEmployee.get(companyBranchKey).add(employeeCode);\n }\n }\n if (this.mapCompanyBranchVsListOfPurposes.containsKey(companyBranchKey)) {\n if (!this.mapCompanyBranchVsListOfPurposes.get(companyBranchKey)\n .contains(daily.getDai_work_tancode())) {\n this.mapCompanyBranchVsListOfPurposes.get(companyBranchKey).add(daily.getDai_work_tancode());\n }\n }\n if (this.mapCompanyBranchVsVisitTimes.containsKey(companyBranchKey)) {\n this.mapCompanyBranchVsVisitTimes.put(companyBranchKey,\n this.mapCompanyBranchVsVisitTimes.get(companyBranchKey) + 1);\n }\n else {\n this.mapCompanyBranchVsVisitTimes.put(companyBranchKey, 0);\n }\n\n final String companyBranchPurposeKey =\n String.format(SummaryReportService.COMPANY_BRANCH_PURPOSE_KEY_PATTERN, companyCode, branchCode,\n daily.getDai_work_tancode());\n this.updateCountersOfMap(this.mapCompanyBranchPurposeVsVisitTimes, companyBranchPurposeKey);\n\n final String companyBranchEmployeeKey = String.format(\n SummaryReportService.COMPANY_BRANCH_EMPLOYEE_KEY_PATTERN, companyCode, branchCode, employeeCode);\n this.updateCountersOfMap(this.mapCompanyBranchEmployeeVsVisitTimes, companyBranchEmployeeKey);\n\n final String companyBranchEmployeePurposeKey =\n String.format(SummaryReportService.COMPANY_BRANCH_EMPLOYEE_PURPOSE_KEY_PATTERN, companyCode,\n branchCode, employeeCode, daily.getDai_work_tancode());\n this.updateCountersOfMap(this.mapCompanyBranchEmployeePurposeVsVisitTimes, companyBranchEmployeePurposeKey);\n }\n\n }", "@Override\n\tpublic List<DailyData> getFoodData(String username, String date) {\n\t\treturn mobileDao.getFoodData(username,date);\n\t}", "public static List<List<int>> getAR(DateTime dateFrom, DateTime dateTo, List<DashboardAR> listDashAR) throws Exception {\n if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)\n {\n return Meth.<List<List<int>>>GetObject(MethodBase.GetCurrentMethod(), dateFrom, dateTo, listDashAR);\n }\n \n //assumes that dateFrom is the first of the month and that there are 12 periods\n //listDashAR may be empty, in which case, this routine will take about 18 seconds, but the user was warned.\n //listDashAR may also me incomplete, especially the most recent month(s).\n String command = new String();\n List<int> listInt = new List<int>();\n listInt = new List<int>();\n boolean agingWasRun = false;\n for (int i = 0;i < 12;i++)\n {\n DateTime dateLastOfMonth = dateFrom.AddMonths(i + 1).AddDays(-1);\n DashboardAR dash = null;\n for (int d = 0;d < listDashAR.Count;d++)\n {\n if (listDashAR[d].DateCalc != dateLastOfMonth)\n {\n continue;\n }\n \n dash = listDashAR[d];\n }\n if (dash != null)\n {\n //we found a DashboardAR object from the database for this month, so use it.\n listInt.Add((int)dash.BalTotal);\n continue;\n }\n \n agingWasRun = true;\n //run historical aging on all patients based on the date entered.\n Ledgers.ComputeAging(0, dateLastOfMonth, true);\n command = \"SELECT SUM(Bal_0_30+Bal_31_60+Bal_61_90+BalOver90),SUM(InsEst) FROM patient\";\n DataTable table = Db.getTable(command);\n dash = new DashboardAR();\n dash.DateCalc = dateLastOfMonth;\n dash.BalTotal = PIn.Double(table.Rows[0][0].ToString());\n dash.InsEst = PIn.Double(table.Rows[0][1].ToString());\n DashboardARs.insert(dash);\n //save it to the db for later.\n listInt.Add((int)dash.BalTotal);\n }\n //and also use it now.\n if (agingWasRun)\n {\n Ledgers.runAging();\n }\n \n //set aging back to normal\n List<List<int>> retVal = new List<List<int>>();\n retVal.Add(listInt);\n return retVal;\n }", "List<Integer> getIdUsersToSendOtherAlert( Timestamp alertMaxDate, Timestamp timeBetweenAlerts, int maxNumberAlerts );", "@Override\n\tpublic String getAdIdSet(String date) {\n\t\tString sql=\"select creative_id from \" + hiveTableName +\" where business_id='\"\n\t\t\t\t+ businessId+\"' and ad_date='\"+date+\"' group by creative_id\";\n\t\tlog.info(\"FrequencyTask Running-->\"+sql);\n\t\tList<Map<String, Object>> result = hiveJdbcTemplate.queryForList(sql);\n\t\tIterator<Map<String,Object>> it = result.iterator();\n\t\tString ads=null;\n\t\twhile (it.hasNext()) {\n\t\t\tMap<String, Object> map = (Map<String, Object>)it.next();\n\t\t\tString ad_id = String.valueOf(map.get(\"creative_id\"));\n\t\t\tif(ads==null){\n\t\t\t\tads = ad_id;\n\t\t\t}else{\n\t\t\t\tif(Integer.valueOf(ad_id)!=0){\n\t\t\t\t\tads += (\",\" + ad_id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ads;\n\t}", "public List getUserVacationHistoryYear(Integer userId, Date hireDateStart) {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n\n //build the current hireDateStart and hireDateEnd for the search range\n //current date\n GregorianCalendar currentDate = new GregorianCalendar();\n currentDate.setTime(new Date());\n\n if (hireDateStart == null) {\n hireDateStart = new Date();\n }\n GregorianCalendar startHireDate = new GregorianCalendar();\n startHireDate.setTime(hireDateStart);\n //this is the start of current employment year\n startHireDate.set(Calendar.YEAR, currentDate.get(Calendar.YEAR));\n\n GregorianCalendar hireDateEnd = new GregorianCalendar();\n hireDateEnd.setTime(startHireDate.getTime());\n //advance its year by one\n //this is the end of the current employment year\n hireDateEnd.add(Calendar.YEAR, 1);\n\n //adjust to fit in current employment year\n if (startHireDate.after(currentDate)) {\n hireDateEnd.add(Calendar.YEAR, -1);\n startHireDate.add(Calendar.YEAR, -1);\n }\n\n Session session = ConnectionFactory.getInstance().getSession();\n List results = null;\n\n try {\n //retreive away events from database\n\n //this is the main class\n Criteria criteria = session.createCriteria(Away.class);\n\n //sub criteria; the user\n Criteria subCriteria = criteria.createCriteria(\"User\");\n subCriteria.add(Expression.eq(\"userId\", userId));\n\n criteria.add(Expression.ge(\"startDate\", startHireDate.getTime()));\n criteria.add(Expression.le(\"startDate\", hireDateEnd.getTime()));\n criteria.add(Expression.eq(\"type\", \"Vacation\"));\n\n criteria.addOrder(Order.asc(\"startDate\"));\n\n //remove duplicates\n criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n results = criteria.list();\n\n return results;\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public HashMap<User, Integer> userWeekRanking(User user, LinkedList<User> friends, int method){\n LinkedList<User> allUsers = new LinkedList<>();\n HashMap<User, Integer> result = new HashMap<>();\n\n allUsers.add(user);\n allUsers.addAll(friends);\n\n int rank = 0;\n long lastTime = -1;\n int lastSteps = -1;\n double lastDistance = -1;\n int lastAchievementCount = -1;\n\n switch (method){\n case METHODS.TIME:\n //sort the data\n Collections.sort(allUsers, new SortWeekTime());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getActiveTimeForWeek() != lastTime) {\n rank++;\n lastTime = next.getMyTimeline().getActiveTimeForWeek();\n }\n result.put(next, rank);\n }\n\n break;\n\n case METHODS.DISTANCE:\n //sort the data\n Collections.sort(allUsers, new SortWeekDistance());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getActiveDistanceForWeek() != lastDistance) {\n rank++;\n lastDistance = next.getMyTimeline().getActiveDistanceForWeek();\n }\n result.put(next, rank);\n }\n\n break;\n\n case METHODS.STEPS:\n //sort the data\n Collections.sort(allUsers, new SortWeekSteps());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getStepsForWeek() != lastSteps) {\n rank++;\n lastSteps = next.getMyTimeline().getStepsForWeek();\n }\n result.put(next, rank);\n }\n\n break;\n\n case METHODS.ACHIEVEMENTS:\n //sort the data\n Collections.sort(allUsers, new SortWeekAchievements());\n\n // for all users check the value and attach the rank, if changed value increment rank\n for (User next : allUsers) {\n if (next.getMyTimeline().getAchievementsForWeek() != lastAchievementCount) {\n rank++;\n lastAchievementCount = next.getMyTimeline().getAchievementsForWeek();\n }\n result.put(next, rank);\n }\n\n break;\n }\n\n return result;\n }", "private void getReport() {\n\t\tdialog = ProgressDialog.show(this, \"\", \" Please wait...\", true);\n dialog.setCancelable(true);\n\t\tSharedPreferences pref = this.getSharedPreferences(\"User\", Activity.MODE_PRIVATE);\n\t\tString accessToken = pref.getString(\"access_token\", null);\n\t\tNetworkEngine.getInstance().getSeatReport(accessToken, bus_id, agent_id, new Callback<List<SeatReport>>() {\n\t\t\t\n\t\t\tpublic void success(List<SeatReport> arg0, Response arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tseatReports = new ArrayList<SeatReport>();\n\t\t\t\tseatReports = arg0;\n\t\t\t\tlvSeatDetails.setAdapter(new SeatDetailsbyAgentAdapter(SeatDetailsbyAgentActivity.this, seatReports));\n\t\t\t\tdialog.cancel();\n\t\t\t}\n\t\t\t\n\t\t\tpublic void failure(RetrofitError arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tdialog.cancel();\n\t\t\t\tLog.i(\"\",\"Hello Error Response Code: \"+arg0.getResponse().getStatus());\n\t\t\t}\n\t\t});\n\t}", "public List<Events> getAllEventsAndHistoryForUser(long userId);", "boolean addHistoricVisitsToUsageReportsBuffer();" ]
[ "0.5776021", "0.57454497", "0.57099825", "0.52336955", "0.5229808", "0.5205685", "0.5192558", "0.5113729", "0.5069456", "0.5057634", "0.50469375", "0.48854685", "0.47424483", "0.47372594", "0.46569157", "0.46433932", "0.46279287", "0.46232268", "0.4597433", "0.45838356", "0.457273", "0.45705214", "0.45521358", "0.4525684", "0.4503355", "0.4480576", "0.44685096", "0.44627428", "0.4460113", "0.44575557", "0.44524544", "0.44138664", "0.43913484", "0.43911862", "0.43883076", "0.43860105", "0.43812948", "0.4373517", "0.43558854", "0.434618", "0.43370295", "0.43350747", "0.43312544", "0.43216702", "0.43038687", "0.43031648", "0.42948252", "0.42851698", "0.42822438", "0.42758656", "0.42712453", "0.42685246", "0.4263489", "0.4260342", "0.42577237", "0.42492098", "0.42387992", "0.42195678", "0.41983265", "0.41741124", "0.41717556", "0.4161394", "0.4151878", "0.41408768", "0.41366482", "0.41301137", "0.41209465", "0.41207296", "0.41188496", "0.41179377", "0.41139084", "0.4112336", "0.41104499", "0.41100615", "0.41085202", "0.41059223", "0.41043797", "0.41022143", "0.40999973", "0.40994665", "0.40959573", "0.4095402", "0.40917718", "0.40905243", "0.40884033", "0.40880555", "0.40838757", "0.40794754", "0.4079009", "0.40766087", "0.40725943", "0.4068309", "0.40664926", "0.4060492", "0.4059169", "0.40587762", "0.40563473", "0.40494436", "0.40388957", "0.40316024" ]
0.52722234
3
Saves the supplied report to the database. Saving may be immediate or delayed; in either case the report ID is set before this method returns.
public void saveReport(ReportBase report) throws PersistenceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ReportEntity save(ReportEntity reportEntity)\n {\n setCTR(reportEntity);\n setCR(reportEntity);\n setFillRate(reportEntity);\n setECPM(reportEntity);\n return reportRepository.save(reportEntity);\n }", "@Override\r\n\tpublic void save(TAnalysisReport analysisreport) {\n\t\tanalysisreportdao.save(analysisreport);\r\n\r\n\t}", "public void saveReport() {\n\t\ttry {\n\t\t\tPrintWriter out = new PrintWriter(new FileOutputStream(reportFile));\n\t\t\tout.println(record.reportToString());\n\t\t\tout.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void store( JasperReport report, Plugin plugin )\n {\n \ttry ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_UPDATE, plugin ) )\n \t{\n \t\tdaoUtil.setInt( 1, report.getIdReport( ) );\n daoUtil.setString( 2, report.getCode( ) );\n daoUtil.setInt( 3, report.getIdReport( ) );\n\n daoUtil.executeUpdate( ); \t \n \t}\n }", "private void submitReport() throws ERTRestApiException, JSONException {\n Cursor cursor = getReportStatusCursor(SyncStatus.REPORT_PENDING);\n\n if(cursor.getCount() != 0) {\n cursor.moveToFirst();\n\n\n do {\n final Long reportBaseId = cursor.getLong(\n cursor.getColumnIndex(ReportEntry._ID)\n );\n ExpenseReport expenseReport = Utility.createExpenseReportFromCursor(cursor);\n\n ERTRestApi.apiSubmitReport(expenseReport,\n new ERTRestApi\n .ERTRestApiListener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n Log.d(LOG_TAG, \"Report \" + reportBaseId + \" submitted\");\n updateReportSyncStatus(reportBaseId, SyncStatus.SYNCED);\n }\n },\n new ERTRestApi.ERTRestApiErrorListener() {\n @Override\n public void onErrorResponse(ERTRestApi\n .ERTRestApiError error) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(ReportEntry.COLUMN_STATUS, Status.SAVED.getValue());\n\n getContext().getContentResolver().update(\n ReportEntry.buildReportUriNoNetworkSync(reportBaseId),\n contentValues,\n null,\n null\n );\n updateReportSyncStatus(reportBaseId, SyncStatus.SYNCED);\n }\n }\n\n );\n\n updateReportSyncStatus(reportBaseId, SyncStatus.SYNC_IN_PROGRESS);\n\n } while (cursor.moveToNext());\n }\n cursor.close();\n }", "private void saveForm() {\n\n if (reportWithCurrentDateExists()) {\n // Can't save this case\n return;\n }\n\n boolean isNewReport = (mRowId == null);\n\n // Get field values from the form elements\n\n // Date\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n String date = df.format(mCalendar.getTime());\n\n // Value\n Double value;\n try {\n value = Double.valueOf(mValueText.getText().toString());\n } catch (NumberFormatException e) {\n value = 0.0;\n }\n\n // Create/update report\n boolean isSaved;\n if (isNewReport) {\n mRowId = mDbHelper.getReportPeer().createReport(mTaskId, date, value);\n isSaved = (mRowId != 0);\n } else {\n isSaved = mDbHelper.getReportPeer().updateReport(mRowId, date, value);\n }\n\n // Show toast notification\n if (isSaved) {\n int toastMessageId = isNewReport ?\n R.string.message_report_created :\n R.string.message_report_updated;\n Toast toast = Toast.makeText(getApplicationContext(), toastMessageId, Toast.LENGTH_SHORT);\n toast.show();\n }\n }", "public Result saveStudyReport(String identifier) throws Exception {\n UserSession session = getAuthenticatedSession(DEVELOPER, WORKER);\n \n ReportData reportData = parseJson(request(), ReportData.class);\n reportData.setKey(null); // set in service, but just so no future use depends on it\n \n reportService.saveStudyReport(session.getStudyIdentifier(), identifier, reportData);\n \n return createdResult(\"Report data saved.\");\n }", "public void saveCoverageReport(String report) {\n\t\tDataManager.save(\"report.js\",\"js\",report);\n\t}", "private void pushSavedReport() throws JSONException {\n final Cursor cursor = getSavedReportCursor();\n\n if(cursor.getCount() != 0) {\n cursor.moveToFirst();\n\n\n\n int updatedRows = 0;\n\n do {\n final Long reportBaseId = cursor.getLong(\n cursor.getColumnIndex(ReportEntry._ID));\n final int reportId = cursor.getInt(\n cursor.getColumnIndex(ReportEntry.COLUMN_REPORT_ID));\n ExpenseReport expenseReport = new ExpenseReport();\n expenseReport.setName(cursor.getString(\n cursor.getColumnIndex(ReportEntry.COLUMN_NAME)));\n expenseReport.setApproverEmail(cursor.getString(\n cursor.getColumnIndex(ReportEntry.COLUMN_APPROVER_EMAIL)\n ));\n\n expenseReport.setComment(cursor.getString(cursor.getColumnIndex(\n ReportEntry.COLUMN_COMMENT)));\n\n ERTRestApi.apiSaveReport(\n expenseReport,\n new ERTRestApi.ERTRestApiListener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Gson gson = new GsonBuilder().setDateFormat\n (\"yyyy-MM-dd'T'HH:mm:ss\").create();\n ExpenseReport expenseReportResponse =\n gson.fromJson(\n response.toString(),\n ExpenseReport.class\n );\n\n if(!getReportSyncStatus(getContext(), reportBaseId).equalsIgnoreCase(SyncStatus.EDITED_REPORT.toString())) {\n\n int updatedRows = updateReportSyncStatus\n (reportBaseId,\n SyncStatus.SYNCED);\n }\n\n\n updateExpenseLineItemReportId(reportBaseId,\n expenseReportResponse.getId()\n );\n setReportValuesFromServer(reportBaseId, expenseReportResponse);\n\n pushSavedExpenseLineItem();\n\n\n }\n },\n new ERTRestApi.ERTRestApiErrorListener() {\n @Override\n public void onErrorResponse(ERTRestApi.ERTRestApiError error) {\n int updatedRows = updateReportSyncStatus(reportBaseId, SyncStatus.SAVED_REPORT);\n Log.d(LOG_TAG, \"updated rows save report error:\" + updatedRows);\n Log.e(LOG_TAG, error.getMessage());\n }\n }\n );\n\n if(getReportSyncStatus(getContext(), reportBaseId).equalsIgnoreCase(SyncStatus.SAVED_REPORT.toString())) {\n\n updatedRows = updateReportSyncStatus(reportBaseId,\n SyncStatus.SYNC_IN_PROGRESS\n );\n }\n\n Log.d(LOG_TAG, \"updated rows save report:\" + updatedRows);\n\n } while (cursor.moveToNext());\n }\n cursor.close();\n }", "@Override\n\tpublic void saveReports(List<FrequencyReport> reports){\n\t\tif(reports==null){\n\t\t\treturn;\n\t\t}\n\t\tSession session = null;\n\t\ttry{\n\t\t\tsession = HibernateUtil.getSeesion();\n\t\t\tsession.beginTransaction();\n\t\t\tIterator<FrequencyReport> its = reports.iterator();\n\t\t\twhile (its.hasNext()) {\n\t\t\t\tFrequencyReport report = its.next();\n\t\t\t\tString hql = \"from FrequencyReport where campaign_id=:campaign_id and ad_id=:ad_id\"\n\t\t\t\t\t\t+ \" and publication_id=:publication_id and zone_id=:zone_id and date=:date\";\n\t\t\t\tQuery query = session.createQuery(hql);\n\t\t\t\tquery.setParameter(\"campaign_id\", report.getCampaign_id());\n\t\t\t\tquery.setParameter(\"ad_id\", report.getAd_id());\n\t\t\t\tquery.setParameter(\"publication_id\", report.getPublication_id());\n\t\t\t\tquery.setParameter(\"zone_id\", report.getZone_id());\n\t\t\t\tquery.setParameter(\"date\", report.getDate());\n\t\t\t\tFrequencyReport report_saved = (FrequencyReport) query.uniqueResult();\n\t\t\t\tif(report_saved==null){\n\t\t\t\t\tsession.save(report);\n\t\t\t\t}else{\n\t\t\t\t\tfor(int i=1; i<=30; i++){\n\t\t\t\t\t\tsetReportFrequency(report_saved, i, getReportFrequencyNumber(report, i));\n\t\t\t\t\t}\n\t\t\t\t\tsession.update(report_saved);\n\t\t\t\t}\n\t\t\t\tsession.flush();\n\t\t\t}\n\t\t\tsession.getTransaction().commit();\n\t\t}catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tlog.error(\"FrequencyTask error\",e);\n\t\t}finally{\n\t\t\tif(session!=null){\n\t\t\t\tsession.close();\n\t\t\t}\n\t\t}\n\t}", "public void setReport(Report report);", "public Result saveStudyReportForWorker(String studyIdString, String identifier) throws Exception {\n getAuthenticatedSession(WORKER);\n\n ReportData reportData = parseJson(request(), ReportData.class);\n reportData.setKey(null); // set in service, but just so no future use depends on it\n\n StudyIdentifier studyId = new StudyIdentifierImpl(studyIdString);\n reportService.saveStudyReport(studyId, identifier, reportData);\n\n return createdResult(\"Report data saved.\");\n }", "public CustDashboardPage saveQuote(ExtentTest extentedReport) throws Exception {\n\t\tCustDashboardPage objCustDashboardPage = null;\n\t\ttry {\n\t\t\tbtnSaveQuote.click();\n\t\t\tLog.message(\"Clicked on 'Save Quote' payment button\", extentedReport);\n\t\t\tWaitUtils.waitForSpinner(driver);\n\t\t\tobjCustDashboardPage = new CustDashboardPage(driver, extentedReport).get();\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Unable to save quote. \" + e);\n\t\t}\n\t\treturn objCustDashboardPage;\n\t}", "public void saveAccountDetails(ExtentTest extentedReport) {\n\t\tWaitUtils.waitForElementPresent(driver, btnAddAccSave, \"Save button to add account is not found\");\n\t\tbtnAddAccSave.click();\n\t\tWaitUtils.waitForSpinner(driver);\n\t\tLog.message(\"Clicked on account save button\", extentedReport);\n\t}", "private void saveAllReports(ExpenseReport[] expenseReports) {\n ContentValues[] expenseReportsContentValues =\n ExpenseReport.getExpenseReportContentValues(expenseReports);\n\n\n Uri uri = ReportEntry.CONTENT_URI.buildUpon().appendQueryParameter(\n ReportContract.NETWORK_SYNC, \"false\").build();\n\n int rowsInserted = getContext().getContentResolver().bulkInsert(\n uri, expenseReportsContentValues);\n Log.d(LOG_TAG, \"Reports: Bulk inserted \" + rowsInserted + \" rows\");\n\n deleteReportsFromDevice(expenseReportsContentValues);\n }", "public void setReportId(String reportId) {\r\n this.reportId = reportId;\r\n }", "public void setReportId(Long reportId) {\n this.reportId = reportId;\n }", "private boolean updateReport(int reportID, HttpServletRequest request){\n\t\ttry {\n\t\t\tint totalTime = 0;\n\t\t\tString[] act_sub_values = new String[ReportGenerator.act_sub_names.length];\n\t\t\tString[] lower_activity_values = new String[ReportGenerator.lower_activities.length];\n\t\t\tfor (int i = 0; i<ReportGenerator.act_sub_names.length; i++) {\n\t\t\t\tString value = request.getParameter(ReportGenerator.act_sub_names[i]);\n\t\t\t\tif (!value.equals(\"\")) {\n\t\t\t\t\tact_sub_values[i] = value;\n\t\t\t\t\tif(!checkInt(value)){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\ttotalTime += Integer.parseInt(value);\n\t\t\t\t}else {\n\t\t\t\t\tact_sub_values[i] = \"0\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (int i = 0; i<ReportGenerator.lower_activities.length; i++) {\n\t\t\t\tString value = request.getParameter(ReportGenerator.lower_activities_names[i]);\n\t\t\t\tif (!value.equals(\"\")) {\n\t\t\t\t\tlower_activity_values[i] = value;\n\t\t\t\t\tif(!checkInt(value)){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\ttotalTime += Integer.parseInt(value);\n\t\t\t\t} else {\n\t\t\t\t\tlower_activity_values[i] = \"0\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\tDate date = new Date(cal.getTimeInMillis());\n\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tstmt.executeUpdate(\"UPDATE reports SET date='\"+date.toString()+\"',total_time=\"+totalTime+\" WHERE id=\"+reportID);\n\t\t\tstmt.executeUpdate(\"DELETE FROM report_times WHERE report_id=\"+reportID);\n\t\t\tstmt.close();\n\n\t\t\tString q = \"INSERT INTO report_times (report_id, \";\n\t\t\tfor (int i = 0; i<ReportGenerator.act_sub_names.length; i++) {\n\t\t\t\tString valueStr = ReportGenerator.act_sub_names[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\n\t\t\tfor (int i = 0; i<ReportGenerator.lower_activities.length-1; i++) {\n\t\t\t\tString valueStr = ReportGenerator.lower_activities[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\t\t\tq += ReportGenerator.lower_activities[ReportGenerator.lower_activities.length-1];\n\n\t\t\tq += \") VALUES (\"+reportID+\",\";\n\t\t\tfor (int i = 0; i<ReportGenerator.act_sub_names.length; i++) {\n\t\t\t\tString valueStr = act_sub_values[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\n\t\t\tfor (int i = 0; i<ReportGenerator.lower_activities.length-1; i++) {\n\t\t\t\tString valueStr = lower_activity_values[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\t\t\tq += lower_activity_values[lower_activity_values.length-1]+\");\";\n\t\t\tStatement stmt2 = conn.createStatement();\n\t\t\tstmt2.executeUpdate(q);\n\t\t\tstmt2.close();\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t}\n\t\treturn true;\n\t}", "public void addInterestedPartyClickSave(ExtentTest extentReport, boolean Screenshot) throws Exception {\n\t\ttry {\n\t\t\tThread.sleep(2000);\n\t\t\tWaitUtils.waitForelementToBeClickable(driver, addInterestpartySave, \"unable to click save\");\n\t\t\taddInterestpartySave.click();\n\t\t\tLog.message(\"Clicked on save button\", driver, extentReport, true);\n\t\t\tThread.sleep(8000);\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Unable to click select contact\" + e);\n\t\t}\n\n\t}", "public Long getReportId() {\n return reportId;\n }", "public void setReport(String report) {\n \n this.report = report;\n\n }", "private void deleteReport(int reportID){\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tstmt.executeUpdate(\"DELETE FROM report_times WHERE report_id=\"+reportID);\n\t\t\tstmt.executeUpdate(\"DELETE FROM reports WHERE id=\"+reportID);\n\t\t} catch (SQLException e) {\n\t\t}\n\t}", "public void save(String savePath) throws IOException {\n try (FileWriter fw = new FileWriter(savePath)) {\n fw.write(reportDoc.toString());\n }\n }", "public ServiceResult<Monthly_report_revision> saveTemporaryMonthlyReport(\n final Monthly_report_revision monthlyReport) {\n Monthly_report_revision newReport = this.saveMonthlyReport(monthlyReport, monthlyReport.isPersisted()\n ? monthlyReport.getShounin_joutai() : SummaryReportConstants.MonthlyReport.STATUS_OPEN);\n\n return new ServiceResult<Monthly_report_revision>(true, newReport, InfoMessage.common_001_save_successfully());\n }", "public void saveReCaseReportReg(ReCaseReportReg reCaseReportReg);", "@Override\r\n\tpublic void save() throws SaveException {\n\t\t\r\n\t}", "public void insert( JasperReport report, Plugin plugin )\n { \n \ttry ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_INSERT, plugin ) )\n \t{\n \t\treport.setIdReport( newPrimaryKey( plugin ) );\n\n daoUtil.setInt( 1, report.getIdReport( ) );\n daoUtil.setString( 2, report.getCode( ) );\n daoUtil.setString( 3, report.getUrl( ) );\n daoUtil.setString( 4, report.getPool( ) );\n\n daoUtil.executeUpdate( ); \n \t}\n }", "private void pushEditedReport() throws JSONException {\n Cursor cursor = getEditedReportCursor();\n\n if(cursor.getCount() != 0) {\n cursor.moveToFirst();\n\n\n\n int updatedRows;\n\n do {\n final Long reportBaseId = cursor.getLong(\n cursor.getColumnIndex(ReportEntry._ID));\n final ExpenseReport expenseReport = Utility\n .createExpenseReportFromCursor(cursor);\n\n ERTRestApi.apiEditReport(\n expenseReport,\n new ERTRestApi.ERTRestApiListener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n\n pushSavedExpenseLineItem();\n\n int updatedRows = updateReportSyncStatus\n (reportBaseId,\n SyncStatus.SYNCED\n );\n Log.d(LOG_TAG, \"SyncStatus after test \" +\n getReportSyncStatus(getContext(),\n reportBaseId));\n Log.d(LOG_TAG, \"Report ID: \" + expenseReport.getId());\n\n }\n },\n new ERTRestApi.ERTRestApiErrorListener() {\n @Override\n public void onErrorResponse(ERTRestApi\n .ERTRestApiError error) {\n\n int updatedRows = updateReportSyncStatus\n (reportBaseId, SyncStatus.EDITED_REPORT);\n Log.d(LOG_TAG, \"updated rows edit report error:\" + updatedRows);\n Log.e(LOG_TAG, error.getMessage());\n\n }\n });\n\n updatedRows = updateReportSyncStatus(reportBaseId,\n SyncStatus.SYNC_IN_PROGRESS\n );\n\n Log.d(LOG_TAG, \"updated rows edit report complete:\" + updatedRows);\n\n } while (cursor.moveToNext());\n }\n cursor.close();\n }", "public String getReportId() {\r\n return reportId;\r\n }", "String saveRecord(String recordID, Source ds, String recordXML) throws RepoxException;", "public void createReport(Report report) {\n view.onProgress(true);\n apiInterface.newReport(report.getNumber(), report.isNo_telp(), report.isNo_rek())\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new SingleObserver<ReportItem>() {\n @Override\n public void onSubscribe(Disposable d) {\n\n }\n\n @Override\n public void onSuccess(ReportItem reportItem) {\n if (reportItem != null) {\n view.onReportResult(reportItem.toReportparcel(), true);\n }\n view.onProgress(false);\n }\n\n @Override\n public void onError(Throwable e) {\n view.onError(e.getMessage());\n view.onProgress(false);\n }\n });\n }", "@RolesAllowed({\"user if ${plan.editable}\", \"administrator if ${plan.editable}\"})\n public Resolution save() throws Exception {\n String newLocalId = plan.getInspireidLocalid();\n try {\n planManager.savePlanDraft(plan, email);\n } catch (PlanINSPIRELocalIDAlreadyExistingException e) {\n String oldLocalId = planManager.getPlanByID(plan.getUuid(), email).getInspireidLocalid();\n context.getValidationErrors().addGlobalError(new LocalizableError(\"plan.error.duplicatelocalid\", HtmlUtil.encode(newLocalId), HtmlUtil.encode(oldLocalId)));\n }\n planId = plan.getUuid();\n addGlobalInformationError();\n\n List<String> nonCompletedFields = updateCompleteness(plan, res);\n context.getMessages().add(new LocalizableMessage(\"plan.update.message\", HtmlUtil.encode(plan.getInspireidLocalid())));\n\n getMessageAboutIncompleteFields(\"plan\", nonCompletedFields);\n return new RedirectResolution(PlanActionBean.class);\n }", "int updateByPrimaryKey(Report record);", "public void saveSelf() {\n\t\tCRFileIOHelper.stringToFile(this.toString(), controller.getReportController().getCurrentFilePath() + \"parameters\");\n\t}", "void verifyOrCreateReport(String reportId);", "public CustDashboardPage clickSavedButton(ExtentTest extentedReport) throws Exception {\n\t\ttry {\n\t\t\tWaitUtils.waitForElement(driver, btnSave);\n\t\t\tbtnSave.click();\n\t\t\tWaitUtils.waitForSpinner(driver);\n\t\t\tLog.message(\"Save button is clicked in GetQuote page\", extentedReport);\n\t\t\treturn new CustDashboardPage(driver, extentedReport).get();\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Unable to Select Valid Contact\" + e);\n\t\t}\n\n\t}", "public secureReplay.Builder submitReportHandler(int id, String report, int nonce, String requesDigSig) throws Exception {\n \tsecureReplay.Builder response = secureReplay.newBuilder();\n\n \treport = report.replace(\"[\", \"\").replace(\"]\", \"\");\n\n \tif(report.length() <= 0) {\n \t\tthrow new Exception(\"You cannot prove your location with 0 users near you!\");\n\t\t}\n\n \tString[] reportList = report.split(\",\");\n \tList<ProofReport> proofReports = getProofReports(reportList);\n \tPoint2D proverPos = null;\n \tint epoch = 0;\n\n \tif( proofReports.size() <= TrackerLocationSystem.getInstance().getNumBizantineUsers()) {\n \t\tthrow new Exception(\"Proof size must be larger than number of byzantine users\");\n \t}\n\n \tfor(ProofReport pr : proofReports) {\n \t\tif(pr.isfakereport(id)) {\n \t\t\tthrow new Exception(\"Fake report\");\n \t\t}\n \t\tPublicKey witPubKey = TrackerLocationSystem.getInstance().getUserPublicKey(pr.getWitnessID(), \"user\");\n \t\tif(pr.proofDigSigIsValid(witPubKey)) {\n \t\t\tDB.addReportToDatabase(pr.getProverID(), pr.getWitnessID(), pr.getProverPoint(),\n \t\t\t\t\tpr.getWitnessPoint(), pr.getEpoch(), pr.isWitnessIsNearProof(),\n \t\t\t\t\trequesDigSig, pr.getWitnessDigSig());\n \t\t}\n \t\tproverPos = pr.getProverPoint();\n \t\tepoch = pr.getEpoch();\n \t}\n \tDB.addLocationToValidated(id, proverPos, epoch);\n \tString message = \"Your report was submitted successfully||\" + (nonce - 1);\n \tJsonObject secureMessage = getsecureMessage(\"user\",message, id);\n \tString confidentMessage = secureMessage.get(\"ciphertext\").getAsString();\n \tString messDigSig = secureMessage.get(\"textDigitalSignature\").getAsString();\n \tresponse.setOnError(false);\n \tresponse.setServerID(ID).setConfidentMessage(confidentMessage).setMessageDigitalSignature(messDigSig);\n \tsendValueToListeners(id, epoch, proverPos.toString());\n \treturn response;\n }", "public void addReport(String booking_id, String report) {\n\t\tString sql = \"update bookings set report =?, status='Completed' where booking_id =?\";\n\t\tObject args[]= {report, booking_id};\n\t\tjdbcTemplate.update(sql, args);\n\t}", "public void save() {\n }", "public void save() {\t\n\t\n\t\n\t}", "public Integer getReportId() {\n return reportId;\n }", "void createReport(Report report);", "protected void save() {\n close();\n if(saveAction != null) {\n saveAction.accept(getObject());\n }\n }", "private void save(Store store) {\n if (saved) {\n return;\n }\n\n if (saves.isEmpty()) {\n saved = true;\n return;\n }\n\n store.save(saves);\n saved = true;\n }", "@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}", "public void saveReports(Context context, List<Report> reports) {\n SharedPreferences settings;\n SharedPreferences.Editor editor;\n\n settings = context.getSharedPreferences(PREFS_NAME,\n Context.MODE_PRIVATE);\n editor = settings.edit();\n\n Gson gson = new Gson();\n String jsonFavorites = gson.toJson(reports);\n\n editor.putString(REPORTS, jsonFavorites);\n\n editor.commit();\n }", "boolean saveInstrument(T instrument) throws DaoException;", "void onReportResult(Report report, boolean isNew);", "@Override\n public ResponseEntity<?> createReport(OutputReport report) throws IOException, MessagingException {\n Date endDate = midnight();\n Date startDate = midnight();\n if (report.getReportType() == 0) {\n endDate = midnight();\n startDate = setDateBefore(1);\n } else if (report.getReportType() == 1) {\n endDate = midnight();\n startDate = setDateBefore(7);\n } else if (report.getReportType() == 2) {\n endDate = midnight();\n startDate = setDateBefore(30);\n } else if (report.getReportType() == 3) {\n endDate = new Date(report.getEndDate());\n startDate = new Date(report.getStartDate());\n }\n ExcelHelper.writeExcel(report.getReportItemList(), \"NiceJavaBooks.xls\", report.getTotalRevenue());\n Place place = placeRepository.findById(report.getPlaceId()).get();\n String content = \"\";\n if(report.getReportType() == 0){\n content = \"Daily sales report\";\n }else if(report.getReportType() == 1){\n content = \"Weekly sales report\";\n }else if(report.getReportType() == 2){\n content = \"Monthly sales report\";\n }else if(report.getReportType() == 3){\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd/MM/yyyy\");\n content = \"Sales report from \"+formatter.format(startDate)+\" to \"+formatter.format(endDate);\n }\n sendEmail(new File(\"NiceJavaBooks.xls\"), place.getMail(), content);\n return ResponseEntity.ok(\"OK\");\n }", "@Override\n\tpublic void savePlan(Plan plan) {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\tPlan savedPlan=planRepository.save(plan);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void save() {\r\n\t\tif (Store.save()) {\r\n\t\t\tSystem.out.println(\" > The store has been successfully saved in the file StoreData.\\n\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\" > An error occurred during saving.\\n\");\r\n\t\t}\r\n\t}", "@FXML\n void saveBtnClicked(ActionEvent event) {\n reportSettingsDAO = new ReportSettingsDAO();\n reportSettings = new ReportSettings();\n\n if (weeklyRadioBtn.isSelected()) {\n reportSettings.setFrequency(\"WEEKLY\");\n } else {\n reportSettings.setFrequency(\"MONTHLY\");\n }\n\n LocalDate tmpDate = nextDate.getValue();\n reportSettings.setNextDate(Date.valueOf(tmpDate));\n\n reportSettingsDAO.updateDate(reportSettings);\n\n }", "private boolean savingData(Track track){\n return sqLiteController.SAVE_TRACK_DATA(track);\n }", "@RequestMapping(method = RequestMethod.POST, value = \"/fileReport\")\r\n public void addReport(@RequestBody Map<String, Object> reportSent) {\r\n\r\n logger.info(reportSent.toString());\r\n String filedby = reportSent.get(\"filedby\").toString();\r\n String lot = reportSent.get(\"lot\").toString();\r\n Integer spot = Integer.parseInt(reportSent.get(\"spot\").toString());\r\n String description = reportSent.get(\"description\").toString();\r\n Long filetime = Long.parseLong(reportSent.get(\"filetime\").toString());\r\n\r\n\r\n\r\n logger.info(filedby);\r\n logger.info(lot);\r\n logger.info(Integer.toString(spot));\r\n logger.info(description);\r\n logger.info(Long.toString(filetime));\r\n\r\n reportsRepository.fileReport(filedby, lot, spot, description, filetime);\r\n\r\n }", "public SmooksTransformModel setReportPath(String reportPath);", "public void setReportEntity(String reportEntity) {\n\n\t\tthis.reportEntity = reportEntity;\n\t}", "public void saveRecordReturn(RecordReturn recordreturn);", "public void setReportTime(String reportTime) {\r\n this.reportTime = reportTime;\r\n }", "public void deleteReport(ReportBase report)\r\n throws PersistenceException;", "@Accessor(qualifier = \"report\", type = Accessor.Type.SETTER)\n\tpublic void setReport(final ReportModel value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(REPORT, value);\n\t}", "public void updateReport(Report report) {\n //view.onProgress(true);\n apiInterface.updateReport(report.getId(), report.getNumber(), report.isNo_telp(), report.isNo_rek())\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new SingleObserver<ReportItem>() {\n @Override\n public void onSubscribe(Disposable d) {\n\n }\n\n @Override\n public void onSuccess(ReportItem reportItem) {\n if (reportItem != null) {\n view.onReportResult(reportItem.toReportparcel(), false);\n }\n //view.onProgress(false);\n }\n\n @Override\n public void onError(Throwable e) {\n view.onError(e.getMessage());\n //view.onProgress(false);\n }\n });\n }", "public void save();", "public void save();", "public void save();", "public void save();", "protected abstract void doSave();", "private int writeReport(final String report) {\n LOGGER.debug(\"Writing {}\", report);\n final int i = report.indexOf('=');\n if (i < 0) {\n LOGGER.warn(\"Error in configuration - {}\", report);\n return 0;\n }\n final String key = report.substring(0, i).trim();\n final String value = report.substring(i + 1).trim();\n LOGGER.trace(\"Key = \\\"{}\\\", Value = \\\"{}\\\"\", key, value);\n if (\"AttachFiles\".equalsIgnoreCase(key)) {\n return attachFiles(value);\n }\n LOGGER.warn(\"Unrecognised option - {}\", key);\n return 0;\n }", "public void save() {\n DataBuffer.saveDataLocally();\n\n //TODO save to db must be done properly\n DataBuffer.save(session);\n\n //TODO recording saved confirmation\n }", "DailyFlash save(DailyFlash dailyFlash) throws SpmCheckedException;", "@Override\n\tpublic void save() {\n\t\tSystem.out.println(\"save method\");\n\t}", "public boolean save(Datastore store) {\n return save(store, false);\n }", "public void reportUpdate(long reportID, String title, String reportType, String patient, String notes){\n Callback<MedicalRecord> callback = new Callback<MedicalRecord>() {\n\n @Override\n public void success(MedicalRecord serverResponse, Response response2) {\n if(serverResponse.getResponseCode() == 0){\n BusProvider.getInstance().post(produceMRecordServerEvent(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.updateMedicalReport(reportID, title, reportType, patient, notes, callback);\n }", "Optional<Report> findByReportId(UUID reportId);", "private void save() {\n // Get the current measurement\n final LiveData<Measurement> ldm = mViewModel.getMeasurementById(mMeasurementId);\n ldm.observe(getViewLifecycleOwner(), new Observer<Measurement>() {\n @Override\n public void onChanged(final Measurement measurement) {\n ldm.removeObserver(this);\n updateMeasurement(measurement);\n snackBar(\"Measurement updated!\");\n }\n });\n }", "@Override\n\tpublic void doSave(IProgressMonitor monitor) {\n\t}", "@Override\n\tpublic int changeReportStatus(Report report) {\n\t\treturn dao.changeReportStatus(report);\n\t}", "public void save(){\r\n\t\tmanager.save(this);\r\n\t}", "@Override\n\tpublic Store save(Store store) {\n\t\treturn storeRepository.save(store);\n\t}", "public boolean save();", "public void save() throws DfException {\n\t\tobject.save();\n\t}", "public void update(IncomingReport incoming_report) throws IllegalArgumentException, DAOException;", "int insert(Report record);", "public String getReport() {\n\n \n return report == null ? \"(report not saved)\" : report;\n\n }", "private void printUpdateReport(int reportID){\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tString query = \"select reports.week, reports.total_time, reports.signed, \";\n\t\t\tString q = \"\";\n\t\t\tfor (int i = 0; i<ReportGenerator.act_sub_names.length; i++) {\n\t\t\t\tString valueStr = \"report_times.\" + ReportGenerator.act_sub_names[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\t\t\tfor (int i = 0; i<ReportGenerator.lower_activities.length-1; i++) {\n\t\t\t\tString valueStr = ReportGenerator.lower_activities[i];\n\t\t\t\tq += valueStr+\",\";\n\t\t\t}\n\t\t\tq += ReportGenerator.lower_activities[ReportGenerator.lower_activities.length-1];\n\t\t\tquery += q;\n\n\t\t\tquery += \", reports.user_group_id, reports.date, users.username, groups.name from reports\";\n\t\t\tString inner = \" inner join report_times on reports.id = report_times.report_id\";\t\t\t\n\t\t\tString inner1 = \" inner join user_group on reports.user_group_id = user_group.id\";\n\t\t\tString inner2 = \" inner join users on user_group.user_id = users.id\";\n\t\t\tString inner3 = \" inner join groups on user_group.group_id = groups.id\";\n\t\t\tString end = \" where reports.id = \" + reportID;\n\t\t\tquery += inner;\n\t\t\tquery += inner1;\n\t\t\tquery += inner2;\n\t\t\tquery += inner3;\n\t\t\tquery += end;\n\t\t\tResultSet rs = stmt.executeQuery(query);\n\t\t\tif(rs.first()){\t\t\t\t\n\t\t\t\tout.println(\"<div class='floati'>\");\n\t\t\t\tout.println(ReportGenerator.updateReport(rs,reportID));\n\t\t\t\tout.println(\"</div>\");\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t}\n\t}", "@Override\n public void save(Trade trade) {\n this.tradeRepository.save(trade);\n }", "public BattleRound addSceneReport(SceneReport sceneReport) {\n\t switch (sceneReport.getGameAction()){\n case PICKPIPE:\n state = State.WAITUSERACTION;\n break;\n case ADDTOPIPE:\n state = State.CLOSED;\n break;\n case FLUSHPIPE:\n state = State.CLOSED;\n break;\n\n }\n \tthis.sceneReportList.add(sceneReport);\n \treturn this;\n\t}", "public void saveRecordingClause(SuiteEntry suite, File dirPath) throws Exception {\n // Fortify Mod: make sure that dirPath is a legal path\n if( dirPath != null ) {\n TEPath tpath = new TEPath(dirPath.getAbsolutePath());\n if( ! tpath.isValid() ) \n throw new IllegalArgumentException(\"TEPath error on path \" + dirPath.getAbsolutePath());\n }\n if (dirPath != null && null != suite && SetupOptions.recordingInfo(suite.getLocalName()) == true) {\n try {\n //Create a Source for saving the data.\n DOMSource source = new DOMSource(TECore.docClause);\n TransformerFactory xformFactory = TransformerFactory.newInstance();\n // Fortify Mod: prevent external entity injection \n xformFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);\n Transformer idTransform = xformFactory.newTransformer();\n // Declare document is XML\n idTransform.setOutputProperty(OutputKeys.METHOD, XML);\n // Declare document standard UTF-8\n idTransform.setOutputProperty(OutputKeys.ENCODING, UT_F8);\n // Declare document is well indented\n idTransform.setOutputProperty(OutputKeys.INDENT, YES);\n OutputStream report_logs = new FileOutputStream(new File(dirPath.getAbsolutePath() + Constants.tmp_File));\n Result output = new StreamResult(report_logs);\n //transform the output in xml.\n idTransform.transform(source, output);\n // Fortify Mod: Flush and free up the OutputStream\n report_logs.close();\n BufferedReader bufferedReader = null;\n BufferedWriter bufferedWriter = null;\n // Read the xml data from file\n bufferedReader = new BufferedReader(new FileReader(dirPath.getAbsolutePath() + Constants.tmp_File));\n // Create a xml file for saving the data.\n bufferedWriter = new BufferedWriter(new FileWriter(dirPath.getAbsolutePath() + Constants.result_clausexml));\n String dataString = \"\";\n //Read the data from file.\n while ((dataString = bufferedReader.readLine()) != null) {\n // Replace special symbol code to its symbol\n dataString = dataString.replaceAll(\"&lt;\", \"<\").replaceAll(\"&gt;\", \">\").replaceAll(\"&amp;\", \"&\");\n bufferedWriter.write(dataString);\n bufferedWriter.newLine();\n bufferedWriter.flush();\n }\n // Fortify Mod: Free up the Buffered Reader and Writer and their associated resources\n bufferedReader.close();\n bufferedWriter.close();\n // Check file exists\n File file = new File(dirPath.getAbsolutePath() + Constants.tmp_File);\n if (file.exists()) {\n // Delete file if exists\n file.delete();\n }\n } catch (Exception e) {\n System.out.println(ERROR_ON_SAVE_THE__RECORDING__ + e.toString());\n }\n }\n }", "@PUT\n @Path(\"/report\")\n @Consumes(\"application/json\")\n @Produces(\"application/json\")\n @RolesAllowed({ \"admin\" })\n public String updateReportStatus(ReportVo reportVo) {\n\n log.info(\"Updating status of report \" + reportVo.getId() + \" to \" + reportVo.getStatus());\n\n reportService.updateReportStatus(reportVo.getId(), reportVo.getStatus());\n return \"OK\";\n }", "@PostMapping(\"/report\")\n public String logReport(@Valid @ModelAttribute(\"report\") Report report,\n BindingResult result,\n @RequestParam(value = \"taskId\",required = false) Long taskId,\n Model model){\n if(taskId != null && model.asMap().get(\"task\") == null){\n\n model.addAttribute(\"task\", taskService.findOne(taskId));\n\n }\n\n if(result.hasErrors()){\n return \"report/add\";\n }\n\n reportService.addReportForTask(report);\n\n return \"redirect:/dev/detail?id=\" + report.getWorkOrder().getId();\n\n }", "boolean createReport(String lang, String reportId, String fileName, Object... params) throws Exception;", "public int getID() {\n return reportID;\n }", "private void save(){\n\n this.title = mAssessmentTitle.getText().toString();\n String assessmentDueDate = dueDate != null ? dueDate.toString():\"\";\n Intent intent = new Intent();\n if (update){\n assessment.setTitle(this.title);\n assessment.setDueDate(assessmentDueDate);\n assessment.setType(mAssessmentType);\n intent.putExtra(MOD_ASSESSMENT,assessment);\n } else {\n intent.putExtra(NEW_ASSESSMENT, new Assessment(course.getId(),this.title,mAssessmentType,assessmentDueDate));\n }\n setResult(RESULT_OK,intent);\n finish();\n }", "public void save(Creditrepayplan Creditrepayplan) {\n\t\tcreditrepayplanRepository.save(Creditrepayplan);\n\t}", "@Override\r\n\tpublic RiskPlan save(RiskPlan riskplan) {\n\t\tString hql = \"select max(rp.rpid) from riskManager.model.RiskPlan rp\";\r\n\t\tSession session = baseDao.getNewSession();\r\n\t\tint id = 0;\r\n\t\tif(session.createQuery(hql).uniqueResult()!=null)\r\n\t\t\tid = (Integer)session.createQuery(hql).uniqueResult();\r\n\t\triskplan.setRpid(++id);\r\n\t\tbaseDao.save(riskplan);\r\n\t\triskplan = findByRpid(riskplan.getRpid());\r\n\t\treturn riskplan;\r\n\t}", "public void setReportTime(Time reportTime){\n this.reportTimeStmp = reportTime;\n return ;\n }", "public void clickSaveQuoteMta(ExtentTest extentedReport) throws Exception {\n\t\ttry {\n\t\t\tWaitUtils.waitForElement(driver, btnSaveMtaQuote, 60);\n\t\t\tbtnSaveMtaQuote.click();\n\t\t\tWaitUtils.waitForSpinner(driver);\n\t\t\tLog.message(\"Clicked on Save Quote button in get quote page\", driver, extentedReport);\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\n\t\t\t\t\t\"Unable to click on CustomerDashboard Tab in get quote page, exception occured : \" + e);\n\t\t}\n\t}", "public int save(SaveQuery saveQuery, EntityDetails entityDetails, ObjectWrapper<Object> idGenerated);", "private void save() {\n Saver.saveTeam(team);\n }", "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Override\n\tpublic void save() {\n\t\t\n\t}" ]
[ "0.72847205", "0.6806917", "0.6528583", "0.6462349", "0.6335582", "0.61752385", "0.6117333", "0.58672404", "0.58385366", "0.5832053", "0.57537156", "0.5749011", "0.57316613", "0.5709805", "0.5704538", "0.5615814", "0.55818003", "0.55189776", "0.5485482", "0.5479301", "0.54521817", "0.54445726", "0.5434108", "0.5417315", "0.53906614", "0.53793937", "0.53733873", "0.53679323", "0.53557044", "0.5343185", "0.5324753", "0.5322256", "0.5308691", "0.52925617", "0.5290679", "0.5286832", "0.5264942", "0.5249382", "0.52378213", "0.5231515", "0.52046967", "0.51723766", "0.51607317", "0.51537126", "0.51392376", "0.5138451", "0.51311356", "0.5125258", "0.5123768", "0.51212317", "0.51031137", "0.5097394", "0.50885624", "0.50878596", "0.5071308", "0.5066664", "0.5063257", "0.505445", "0.5051923", "0.50514585", "0.5044593", "0.5036538", "0.5036538", "0.5036538", "0.5036538", "0.50359017", "0.50301373", "0.5026073", "0.50153655", "0.50065905", "0.49974814", "0.49886948", "0.4987341", "0.49848837", "0.49735916", "0.4969373", "0.4967723", "0.4965828", "0.49541858", "0.49514285", "0.49418366", "0.49385414", "0.4929578", "0.49207285", "0.49196836", "0.4915371", "0.49135593", "0.49007377", "0.48875514", "0.4881452", "0.48749372", "0.4870613", "0.48683414", "0.486544", "0.48648", "0.48623562", "0.48579293", "0.48549286", "0.4853726", "0.4853726" ]
0.7701898
0
Deletes the supplied report from the database.
public void deleteReport(ReportBase report) throws PersistenceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void delete(MrReport report) {\n getSession().delete(report);\n }", "private void deleteReport(int reportID){\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tstmt.executeUpdate(\"DELETE FROM report_times WHERE report_id=\"+reportID);\n\t\t\tstmt.executeUpdate(\"DELETE FROM reports WHERE id=\"+reportID);\n\t\t} catch (SQLException e) {\n\t\t}\n\t}", "public void delete(IncomingReport incoming_report) throws DAOException;", "public void deleteReport()\n\t{\n\t\tloading.setVisibility(View.VISIBLE);\n\n\t\tParseQuery<ParseObject> query = ParseQuery.getQuery(\"DCIncident\");\n\t\tquery.getInBackground(incident.getId(), new GetCallback<ParseObject>() \n\t\t{\n\t\t\tpublic void done(ParseObject object, ParseException e) \n\t\t\t{\n\t\t\t\tif (e == null) \n\t\t\t\t{\t\t\n\t\t\t\t\tobject.deleteInBackground(new DeleteCallback()\n\t\t\t\t\t{\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void done(ParseException e) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tIntent returnIntent = new Intent();\n\t\t\t\t\t\t\treturnIntent.putExtra(\"reportPosition\", reportPosition);\n\t\t\t\t\t\t\tsetResult(RESULT_OK, returnIntent);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Report is deleted, go back to previous screen\n\t\t\t\t\t\t\tloading.setVisibility(View.INVISIBLE);\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\toverridePendingTransition(R.anim.slide_right_main,\tR.anim.slide_right_sub);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "@Override\r\n\tpublic void deleteReport(String taxId) throws SQLException {\n\t\treportDao.deleteReport(taxId);\r\n\t}", "@Override\r\n\tpublic void delete(TAnalysisReport analysisreport) {\n\t\tanalysisreportdao.delete(analysisreport);\r\n\t}", "int deleteByPrimaryKey(BigDecimal reportId);", "public void delete( int nJasperReportId, Plugin plugin )\n {\n \ttry ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_DELETE, plugin ) )\n \t{\n \t\tdaoUtil.setInt( 1, nJasperReportId );\n daoUtil.executeUpdate( ); \t \n \t}\n }", "void onReportDeleted(Report report);", "@Override\r\n\tpublic void deleteReport(List<ReportSearchVO> list, HttpServletResponse response)\r\n\t\t\tthrows SQLException {\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\treportDao.deleteReport(list.get(i));\r\n\t\t}\r\n\t}", "private void requestDeleteReport() throws ERTRestApiException, JSONException {\n final Cursor cursor = getReportStatusCursor(SyncStatus.DELETED_REPORT);\n\n if(cursor.getCount() != 0) {\n cursor.moveToFirst();\n\n\n do {\n final Long reportBaseId = cursor.getLong(\n cursor.getColumnIndex(ReportEntry._ID));\n ExpenseReport expenseReport = Utility.createExpenseReportFromCursor\n (cursor);\n final int reportId = expenseReport.getId();\n\n // update the status of delete to true in the mean time\n // if there is an error from the server, the delete\n // status should be changed to false\n ContentValues contentValues = new ContentValues();\n contentValues.put(ReportEntry.COLUMN_IS_DELETED, \"true\");\n getContext().getContentResolver().update(\n ReportEntry.buildReportUriNoNetworkSync(reportId),\n contentValues,\n null,\n null\n );\n\n ERTRestApi.apiDeleteReport(\n reportId,\n new ERTRestApi.ERTRestApiListener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n // delete all expense line items\n Cursor expenseLineItemCursor = getContext().getContentResolver().query(\n ReportContract.ReportEntry.buildReportExpense(reportBaseId),\n null, null, null, null\n );\n int expenseLineItemDeleteCount = 0;\n if(expenseLineItemCursor.getCount() > 0) {\n expenseLineItemCursor.moveToFirst();\n do {\n expenseLineItemDeleteCount += getContext().getContentResolver().delete(\n ExpenseEntry.buildExpenseUri(expenseLineItemCursor.getInt(expenseLineItemCursor.getColumnIndex(ExpenseEntry._ID))),\n null, null\n );\n } while (expenseLineItemCursor.moveToNext());\n }\n expenseLineItemCursor.close();\n Log.i(LOG_TAG, \"Deleted \" + expenseLineItemDeleteCount + \" expense line items\");\n\n getContext().getContentResolver().delete(\n ReportEntry.buildReportUriNoNetworkSync\n (reportBaseId),\n null,\n null\n );\n Log.d(LOG_TAG, \"Report \" + reportBaseId + \" \" +\n \"deleted\");\n }\n },\n new ERTRestApi.ERTRestApiErrorListener() {\n @Override\n public void onErrorResponse(ERTRestApi\n .ERTRestApiError error) {\n // try delete again\n /*updateReportSyncStatus(reportBaseId,\n SyncStatus.DELETED_REPORT);*/\n\n // the delete failed, put the report back in\n // the list\n ContentValues contentValues = new\n ContentValues();\n contentValues.put(ReportEntry\n .COLUMN_IS_DELETED, \"false\");\n getContext().getContentResolver().update(\n ReportEntry\n .buildReportUriNoNetworkSync\n (reportId),\n contentValues,\n null,\n null\n );\n\n Log.e(LOG_TAG, error.getMessage());\n }\n }\n );\n\n updateReportSyncStatus(reportBaseId,SyncStatus.SYNC_IN_PROGRESS);\n\n } while (cursor.moveToNext());\n\n }\n cursor.close();\n }", "public void deleteReportCard(ReportCardModel inputModel) {\n System.out.println(\"ReportCardDao.deleteReportCard \" + \"start\");\n // TODO: Implement this function.\n Transaction trans = Datastore.beginTransaction();\n \n Key parentKey = KeyFactory.createKey(\"ReportCard\", inputModel.getStudentName());\n Key key = Datastore.allocateId(parentKey, \"ReportCardModel\");\n \n Datastore.delete(key);\n \n trans.commit();\n System.out.println(\"ReportCardDao.deleteReportCard \" + \"end\");\n }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete StockReport : {}\", id);\n\n stockReportRepository.deleteById(id);\n }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete CaseReport : {}\", id);\n caseReportRepository.deleteById(id);\n }", "@Test\n\tpublic void driverDeleteReport() {\n\t\tfinal Object testingData[][] = {\n\t\t\t{\n\t\t\t\t\"report1\", \"manager1\", null\n\t\t\t},//1. All fine\n\t\t\t{\n\t\t\t\t\"player1\", \"manager1\", IllegalArgumentException.class\n\t\t\t},//2. Not report\n\t\t\t{\n\t\t\t\t\"report1\", \"president1\", IllegalArgumentException.class\n\t\t\t},//3. Invalid authority\n\n\t\t};\n\n\t\tfor (int i = 0; i < testingData.length; i++)\n\t\t\tthis.templateDeleteReport((String) testingData[i][0], (String) testingData[i][1], (Class<?>) testingData[i][2]);\n\t}", "public int deleteReport(@NonNull String reportId) throws IOException, PowerBiClientException {\n Response<Void> res = reportsService.deleteReport(reportId).execute();\n return ClientUtils.buildAndSendResponseCode(res);\n }", "@RequestMapping(method = RequestMethod.POST, value = \"/deleteReport\")\r\n public String deleteReport(String rid) {\r\n logger.info(rid);\r\n Integer id = Integer.parseInt(rid);\r\n reportsRepository.deleteById(id);\r\n return \"deleted\";\r\n }", "public Result deleteStudyReport(String identifier) {\n UserSession session = getAuthenticatedSession(DEVELOPER, WORKER);\n \n reportService.deleteStudyReport(session.getStudyIdentifier(), identifier);\n \n return okResult(\"Report deleted.\");\n }", "public Result deleteStudyReportRecord(String identifier, String dateString) {\n UserSession session = getAuthenticatedSession(DEVELOPER, WORKER);\n \n reportService.deleteStudyReportRecord(session.getStudyIdentifier(), identifier, dateString);\n \n return okResult(\"Report record deleted.\");\n }", "@Override\r\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\r\n\t\tString ReportNum = request.getParameter(\"reportNum\");\r\n\r\n\t\tReportDAO rDao = ReportDAO.getInstance();\r\n\t\trDao.deleteReport(ReportNum);\r\n\r\n\t\tnew ReportListFormAction().execute(request, response);\r\n\t}", "private void runDeleteReport() {\n showDialog(DIALOG_CONFIRM_DELETE_REPORT_ID);\n }", "public void deleteReportFileIfExists(final ReportsTestData testData)\n throws IOException, NullPointerException {\n Log.logScriptInfo(\"Cleaning before or after the script...\");\n switch (testData.getFileType()) {\n case \"PDF\":\n verifyIfReportPdfFileExists(\n testData.getReportFileName(),\n false);\n break;\n case \"Excel\":\n verifyIfReportExcelFileExists(\n testData.getReportFileName(), false);\n break;\n case \"CSV\":\n verifyIfReportCsvFileExists(\n testData.getReportFileName(), false);\n break;\n }\n }", "@Override\n public void delete(ReporteAccidente rep) {\n repr.delete(rep);\n }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete CustomerStatusReportDtl : {}\", id);\n customerStatusReportDtlRepository.delete(id);\n }", "public int deleteReportInGroup(@NonNull String groupId, @NonNull String reportId) throws IOException, PowerBiClientException {\n Response<Void> res = reportsService.deleteReportInGroup(groupId, reportId).execute();\n return ClientUtils.buildAndSendResponseCode(res);\n }", "public void clearReports()\n {\n reports.clear();\n }", "@DELETE\n public Response cancelStorageReport(){\n log.debug(\"Cancelling storage report\");\n\n try {\n String responseText = resource.cancelStorageReport();\n return responseOk(responseText);\n } catch (Exception e) {\n return responseBad(e);\n }\n }", "public void deletePatientByPrimaryKey(long id) throws PatientExn;", "public void clearReports()\n\t{\n\t\treports.clear();\n\t}", "@Delete({\n \"delete from A_SUIT_MEASUREMENT\",\n \"where user_id = #{userId,jdbcType=INTEGER}\",\n \"and measure_date = #{measureDate,jdbcType=TIMESTAMP}\"\n })\n int deleteByPrimaryKey(@Param(\"userId\") Integer userId, @Param(\"measureDate\") Date measureDate);", "private void removeReport(HttpServletRequest req) {\n int id = Integer.parseInt(req.getParameter(\"id\"));\n try {\n ReportMapper.removeReport(id);\n } catch (PolygonException ex) {\n req.getSession().setAttribute(\"errorMsg\", ex.getMessage());\n }\n }", "@Delete({\n \"delete from SWMS_stock_out_record_detail\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n int deleteByPrimaryKey(Long id);", "public void deleteRecord() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry\n\t\t{\n\t\t\tmyData.record.delete(background.getClient());\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "private void deleteReportsFromDevice(ContentValues[]\n expenseReportsContentValues) {\n List<Long> reportList = getListOfItemsToDelete(expenseReportsContentValues,\n ReportEntry.COLUMN_REPORT_ID,\n ReportEntry.CONTENT_URI);\n\n for(Long reportId : reportList) {\n Cursor cursor = getContext().getContentResolver().query(\n ReportEntry.CONTENT_URI,\n null,\n ReportEntry.COLUMN_REPORT_ID + \"=\" + reportId,\n null, null\n );\n Uri reportUri = null;\n if(cursor.getCount() > 0) {\n cursor.moveToFirst();\n reportUri = ReportEntry.buildReportUri(cursor.getLong(cursor.getColumnIndex(ReportEntry._ID)));\n }\n cursor.close();\n if(reportUri != null) {\n getContext().getContentResolver().delete(reportUri, null, null);\n }\n }\n\n }", "void delete(boolean force, IProgressMonitor monitor)\n\t\t\tthrows RodinDBException;", "boolean deleteInstrument(T instrument) throws DaoException, InstrumentNotFoundException;", "public void deletePendingReports() {\r\n String[] filesList = getCrashReportFilesList();\r\n if (filesList != null) {\r\n for (String fileName : filesList) {\r\n new File(mContext.getFilesDir(), fileName).delete();\r\n }\r\n }\r\n }", "public void deleteAnalysis(long id){\n try{\n analysisDAO.deleteAnalysisById(id);\n } catch (PersistenceException e){\n e.printStackTrace();\n }\n }", "@Delete({ \"delete from h5_app_download_log\", \"where id = #{id,jdbcType=BIGINT}\" })\n\tint deleteByPrimaryKey(Long id);", "protected void deleteRecord() throws DAOException {\r\n\t\t// Elimina relaciones\r\n\t\tfor (Sedrelco relco : object.getRelcos()) {\r\n\t\t\tsedrelcoDao.delete(relco);\r\n\t\t}\r\n\t\t// Elimina objeto\r\n\t\tobjectDao.delete(object);\r\n\t}", "public void delete(IQuery query) throws SQLException;", "public void deletePerformanceReview(PerformanceReview pr) {\n\n Session session = ConnectionFactory.getInstance().getSession();\n\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n\n session.delete(pr);\n tx.commit();\n } catch (HibernateException e) {\n try {\n tx.rollback(); //error\n } catch (HibernateException he) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public void deleteRecord() {\n// foods.clear();\n// try {\n// FoodRecordDao dao = new FoodRecordDao();\n// dao.saveFoodRecords(foods);\n// } catch (DaoException ex) {\n// Logger.getLogger(FoodLogViewController.class.getName()).log(Level.SEVERE, null, ex);\n// }\n }", "public void deleteRecord(Record record, String clientName, String assessmentYear, String taxType, String paymentDate, String paymentAmount) {\n String delete = \"DELETE FROM \" + TABLE_RECORDS + \" WHERE \" + COLUMN_NAME + \"=\\\"\" + clientName + \"\\\" AND \" + COLUMN_ASSESSMENT_YEAR + \"=\\\"\" + assessmentYear + \"\\\" AND \" +\n COLUMN_IT_GST + \"=\\\"\" + taxType + \"\\\" AND \" + COLUMN_PAYMENT_DATE + \"=\\\"\" + paymentDate + \"\\\" AND \" + COLUMN_PAYMENT_AMOUNT + \"=\\\"\" + paymentAmount + \"\\\"\";\n records.remove(record);\n\n try {\n statement = connection.prepareStatement(delete);\n statement.executeUpdate();\n logFile.modifyLogFile(\"Data successfully deleted from database\");\n } catch (SQLException e) {\n logFile.modifyLogFile(\"Error deleting record : \" + e.getMessage());\n e.printStackTrace();\n }\n }", "@Delete(\"DELETE from patients WHERE id_patient=#{patientId}\")\n void deletePatient(int patientId);", "@Override\r\n public long deleteRecord(Object o) throws SQLException {\r\n String sql = \"delete from patient where patientid = ?\";\r\n long result = -1;\r\n PatientBean pb;\r\n\r\n try (PreparedStatement pStatement = connection.prepareStatement(sql);) {\r\n pb = (PatientBean) o;\r\n pStatement.setLong(1, pb.getPatientID());\r\n\r\n result = pStatement.executeUpdate();\r\n }\r\n\r\n logger.info(\"Patient record has been deleted: patient id \" + pb.getPatientID() + \", \" + result + \" row(s) affected\");\r\n\r\n return result;\r\n }", "@Override\n\tpublic void delete(String... args) throws SQLException {\n\t\t\n\t}", "@Delete({\n \"delete from dept\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int deleteByPrimaryKey(Integer id);", "private void cleanReporter(){\n File file = new File(\"test-report.html\");\n file.delete();\n\n }", "@Override\n\tpublic void deleteCoach(Coach coach) {\n\t\tthis.getHibernateTemplate().delete(coach);\n\t}", "public void deleteByStudy(Study study) {\n List<WeeklyTracking> weeklyTrackingAttachedToStudy = weeklyTrackingRepository.findByStudy(study);\n\n for (WeeklyTracking weeklyTracking : weeklyTrackingAttachedToStudy) {\n weeklyTrackingRepository.delete(weeklyTracking);\n }\n }", "@DELETE\n public Report deleteAll() throws UnknownResourceException {\n\n eventFacade.removeAll();\n int previousRows = customerBillFormatFacade.count();\n customerBillFormatFacade.removeAll();\n List<CustomerBillFormat> pis = customerBillFormatFacade.findAll();\n for (CustomerBillFormat pi : pis) {\n delete(pi.getId());\n }\n\n int currentRows = customerBillFormatFacade.count();\n int affectedRows = previousRows - currentRows;\n\n Report stat = new Report(currentRows);\n stat.setAffectedRows(affectedRows);\n stat.setPreviousRows(previousRows);\n\n return stat;\n }", "public void deleteRecord(final Record record) {\n if (isRecordCurrent(record)) {\n mCurrentRecord = null;\n saveCurrentRecord();\n }\n\n final String path = getPathForRecord(record);\n File file = new File(path);\n if (file.exists()) {\n deleteRecursive(file);\n mStoredRecordCount--;\n\n }\n }", "@Transactional\n\t\tpublic void delete(ComplaintVO complaintVO) \n\t\t{\n\t\t\tcomplaintDAO.delete(complaintVO);\n\t\t}", "int deleteByPrimaryKey(Integer recordId);", "public int delete(MonthlyValuesRecord record) throws SQLException\n {\n int returnCode=-999;\n\n // Create a SQL delete statement and issue it\n // construct the delete statement\n String deleteStatement = \"DELETE FROM monthlyvalues \" + record.getWhereString();\n\n // get the number of records processed by the delete\n returnCode = getStatement().executeUpdate(deleteStatement);\n\n return returnCode;\n }", "public void delFor(String idi) {\n\t\tourDatabase.delete(DATABASE_TABLE5, Sales_Id + \"=\" +idi, null);\n\t\t\n\t}", "@Override\r\n\tpublic void delete(Integer memNo) {\n\t\tConnection con = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tClass.forName(driver);\r\n\t\t\tcon = DriverManager.getConnection(url, userid, passwd);\r\n\t\t\tpstmt = con.prepareStatement(DELETE);\r\n\r\n\t\t\tpstmt.setInt(1, memNo);\r\n\r\n\t\t\tpstmt.executeUpdate();\r\n\r\n\t\t\t// Handle any driver errors\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\tthrow new RuntimeException(\"Couldn't load database driver. \" + e.getMessage());\r\n\t\t\t// Handle any SQL errors\r\n\t\t} catch (SQLException se) {\r\n\t\t\tthrow new RuntimeException(\"A database error occured. \" + se.getMessage());\r\n\t\t\t// Clean up JDBC resources\r\n\t\t} finally {\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpstmt.close();\r\n\t\t\t\t} catch (SQLException se) {\r\n\t\t\t\t\tse.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (con != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcon.close();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void deleteDataSourceById(Integer dataSourceId) {\n\t\tmyBatisDao\n\t\t\t\t.delete(\"com.infosmart.mapper.ReportDataSourceMapper.deleteDataSourceById\",\n\t\t\t\t\t\tdataSourceId);\n\t}", "void removeUsageReports(UsageReport[] reports);", "public void saveReport(ReportBase report)\r\n \t\tthrows PersistenceException;", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete ProjectTransactionRecord : {}\", id);\n projectTransactionRecordRepository.delete(id);\n }", "public void delete() {\n\t\ttry {\n\t\t\tStatement stmt = m_db.m_conn.createStatement();\n\t\t\tString sqlString;\n\t\t\tString ret;\n\n\t\t\tsqlString = \"DELETE from country WHERE countryid=\" + m_country_id;\n\t\t\tm_db.runSQL(sqlString, stmt);\n\t\t\tstmt.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\">>>>>>>> EXCEPTION <<<<<<<<\");\n\t\t\tSystem.out.println(\"An Exception occured in delete().\");\n\t\t\tSystem.out.println(\"MESSAGE: \" + e.getMessage());\n\t\t\tSystem.out.println(\"LOCALIZED MESSAGE: \" + e.getLocalizedMessage());\n\t\t\tSystem.out.println(\"CLASS.TOSTRING: \" + e.toString());\n\t\t\tSystem.out.println(\">>>>>>>>>>>>>-<<<<<<<<<<<<<\");\n\t\t}\n\t}", "@Override\n\tpublic void deleteById(int theId) {\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t\n\t\tQuery<Employee> theQuery = currentSession.createQuery(\"delete from Employee where id=:employeeId\");\n\t\ttheQuery.setParameter(\"employeeId\", theId);\n\t\ttheQuery.executeUpdate();\n\t\t\n\t}", "@Override\r\n\tpublic void delete(String did) {\n\t\tdao.delete(did);\r\n\t}", "public void delete( int nIdSuggestSubmit, Plugin plugin )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_DELETE, plugin );\n daoUtil.setInt( 1, nIdSuggestSubmit );\n daoUtil.executeUpdate( );\n daoUtil.free( );\n }", "public void delete() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.delete(this);\r\n\t}", "public static void delete(long diseaseNum) throws Exception {\n String command = \"DELETE FROM disease \" + \"WHERE DiseaseNum = \" + POut.long(diseaseNum);\n Db.nonQ(command);\n }", "public void deleteByHql(String hql, Object... param) {\n\t\tthis.rsDAO.deleteByHql(hql, param) ;\n\t}", "@Delete\n void delete(Measurement measurement);", "int deleteByPrimaryKey(Long catalogId);", "public void deleteDepartmentByDeptNo(int dept_no);", "@Delete({ \"delete from csv_file\", \"where id = #{id,jdbcType=INTEGER}\" })\n\tint deleteByPrimaryKey(Integer id);", "@Override\n\tpublic void deleteById(int id) throws SQLException {\n\n\t}", "public void Del(String id) {\n\t\tsql = \"delete from throw_history where throw_history_id='\"+id+\"'\";\n\t\tdao.executeUpdate(sql);\n\t\tSystem.out.println(\"=del===\"+sql);\n\t}", "@Override\n\tpublic void delByPrimaryKey(int id) throws SQLException {\n\n\t}", "@Override\n\tpublic void delete(DatabaseHandler db) {\n\t\tdb.deleteWork(this);\n\t\t\n\t}", "public void delete() throws SQLException {\n DatabaseConnector.updateQuery(\"DELETE FROM course \"\n + \"WHERE courseDept='\" + this.courseDept \n + \"' AND courseNum = '\" + this.courseNum + \"'\");\n }", "public void deleteById(Long id);", "public static String delete(Connection conn, Long patientId) throws Exception {\r\n String result = null;\r\n Statement stmt;\r\n conn.setAutoCommit(false);\r\n stmt = conn.createStatement();\r\n stmt.execute(\"START TRANSACTION;\");\r\n stmt.execute(\"SET FOREIGN_KEY_CHECKS = 0;\");\r\n String sql = \"DELETE pregnancy FROM pregnancy \" +\r\n \"WHERE pregnancy.patient_id=\" + patientId;\r\n stmt.execute(sql);\r\n stmt.execute(\"Commit\");\r\n result = \"Pregnancy records deleted.\";\r\n try {\r\n conn.commit();\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n return result;\r\n }", "public void deleteRecords(LVValue expression) throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\tmyData.record=createRecord(myData.spec,null);\n\t\ttry\n\t\t{\n\t\t\tmyData.record.deleteRecords(background.getClient(),expression.getStringValue());\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "int deleteByPrimaryKey(Long researchid);", "void delete(LogicalDatastoreType store, P path);", "public void onClick(DialogInterface dialog, int id) {\n deleteRecord();\n }", "public void deleteProjectRecord(int pgId) {\n String sql = \"DELETE FROM Project_Commit_Record WHERE pgid=?\";\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, pgId);\n preStmt.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n @Modifying\n @Query(value = \"delete from Dept where deptId = ?1\", nativeQuery = true)\n void deleteById(Long deptId);", "@Override\r\n\tpublic void delete(TQssql sql) {\n\r\n\t}", "public void delete() {\n \t\t try(Connection con = DB.sql2o.open()) {\n \t\t\t String sql = \"DELETE FROM sightings where id=:id\";\n\t\t\t con.createQuery(sql)\n\t\t\t.addParameter(\"id\", this.id)\n\t\t\t.executeUpdate();\n\n \t\t }\n \t }", "@Override\n public void delete(Long id) {\n planRepository.deleteById(id);\n\n }", "public void Delete(){\n String whereClause2 = PostDatabase.ID + \" = ?\";\n // Specify arguments in placeholder order.\n String[] whereArgs2 = { \"6\" };\n // Issue SQL statement.\n sqlDB.delete(PostDatabase.TABLE_POSTS, whereClause2, whereArgs2);\n\n }", "protected void cancelReports() {\n ACRA.getErrorReporter().deletePendingNonApprovedReports(false);\n }", "public void deleteById(String id);", "@Writer\n int deleteByPrimaryKey(Integer id);", "int deleteByPrimaryKey(String repaymentId);", "@WSEPermission(pl = { UserPermission.reports_delete })\n\t@GET\n\t@Path(\"/delete/by/user\")\n\tpublic GenericResponse deleteByUser(Request request, Response responseO) {\n\t\tGenericResponse response = new GenericResponse();\n\t\tString userId = request.getHeader(Urlparams.id);\n\t\tif (Utils.isNotEmpty(userId)) {\n\t\t\ttry {\n\t\t\t\tReportDao.deleteByUserId(userId);\n\t\t\t\tresponse.setS(true);\n\t\t\t\tresponse.setMsg(\"Report has been successfully deleted\");\n\t\t\t} catch (Exception e) {\n\t\t\t\tLOG.error(e.getMessage(), e);\n\t\t\t\tresponse.setEd(e.getMessage());\n\t\t\t}\n\t\t} else {\n\t\t\tresponse.setEd(\"Id should not be empty\");\n\t\t}\n\t\treturn response;\n\t}", "private void cleanupReports(String rptTitle, String strCreatedBy) throws Exception {\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tloginPageAction.open(EMPTY, NOTSET);\n\t\t\tloginPageAction.login(String.format(\"%s:%s\", PICDFADMIN, PICADMINPSWD), NOTSET);\n\n\t\t\tcomplianceReportsPageAction.open(EMPTY, NOTSET);\n\t\t\tcomplianceReportsPageAction.getComplianceReportsPage().searchAndDeleteReport(rptTitle, strCreatedBy);\n\t\t}\n\t}", "public void deleteProject(Long projectId);", "public void delete(int id) throws DAOException;", "void deleteDepartmentById(Long id);", "private void DeleteRecord(final Record temp) {\n\t\tDialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tswitch (which) {\n\t\t\t\tcase DialogInterface.BUTTON_POSITIVE:\n\t\t\t\t\trecordlist.remove(temp);\n\t\t\t\t\tsetRecNull();\n\t\t\t\t\tlistadapter.notifyDataSetChanged();\n\t\t\t\t\tbreak;\n\t\t\t\tcase DialogInterface.BUTTON_NEGATIVE:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\t\tbuilder.setMessage(\"Are you sure you want to delete the record?\")\n\t\t\t\t.setPositiveButton(\"Yes\", dialogClickListener)\n\t\t\t\t.setNegativeButton(\"No\", dialogClickListener).show();\n\t}" ]
[ "0.7948375", "0.7719421", "0.7634254", "0.7275095", "0.7247398", "0.7189148", "0.71275985", "0.6936622", "0.6440358", "0.64202714", "0.63156676", "0.62949866", "0.6280718", "0.62773144", "0.6171553", "0.6164696", "0.61601675", "0.60860074", "0.6074563", "0.5948879", "0.5912026", "0.5763302", "0.57288134", "0.5713327", "0.5664202", "0.56440073", "0.5643799", "0.56096303", "0.5573784", "0.5529847", "0.5519032", "0.5499737", "0.549875", "0.5459549", "0.5458548", "0.54574114", "0.5421635", "0.5404891", "0.5400246", "0.539068", "0.5383731", "0.5374521", "0.5355509", "0.53488487", "0.5347937", "0.5332944", "0.53155077", "0.53145754", "0.5310926", "0.5288205", "0.5282335", "0.5267202", "0.52528393", "0.52472895", "0.52354085", "0.5231367", "0.5219756", "0.5210088", "0.5198803", "0.51917785", "0.5189113", "0.51854086", "0.5183431", "0.51812553", "0.51810145", "0.5180241", "0.5178969", "0.51757723", "0.51630336", "0.51616085", "0.5153219", "0.5140257", "0.51376384", "0.513536", "0.51352876", "0.5132344", "0.51301223", "0.5129601", "0.5126215", "0.5121356", "0.51195276", "0.511908", "0.5117245", "0.5112166", "0.5112032", "0.5109956", "0.5109039", "0.51076084", "0.5105003", "0.50980926", "0.5097337", "0.50889933", "0.5087005", "0.50834936", "0.508006", "0.5074934", "0.5073379", "0.507213", "0.50661755", "0.50610894" ]
0.83783627
0
Returns the history quotes visible to the given dates.
public List<Quote> getQuoteHistory(Instrument instrument, Period period, Date fromDate, Date toDate) throws PersistenceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Vector getHistoryVisiting(Vector conditions){\n Vector listHistory = new Vector();\n try{\n String sqlGet = \"SELECT history_id, convert(varchar(10),from_date,103) AS history_fromdate, convert(varchar(10),to_date,103) AS history_todate FROM history_doctor\";\n String strConditions = this._buildWhereCondition(conditions);\n if(!strConditions.isEmpty()){\n sqlGet += \" WHERE \" + strConditions;\n }\n sqlGet += \" ORDER BY from_date DESC, to_date DESC\";\n ResultSet rsGet = this.queryData(sqlGet);\n int order = 0;\n while(rsGet.next()){\n order++;\n Vector dataSet = new Vector();\n dataSet.add(order);\n dataSet.add(rsGet.getString(\"history_fromdate\"));\n dataSet.add(rsGet.getString(\"history_todate\"));\n dataSet.add(rsGet.getString(\"history_id\"));\n\n listHistory.add(dataSet);\n }\n } catch(Exception e){\n System.out.println(e.getMessage());\n }\n return listHistory;\n }", "public List<GlucoseData> getHistoryTillDate (Date date) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(datadate.after(date)) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n // Log.d(TAG, \"Error while trying to get posts from database\");\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public ArrayList<Showing> getShowingsByDate(String date, Screen screen) throws PastDateException {\n return filmDisplay.getShowingsByDate(date, screen);\n }", "@Override\n\tpublic List<FilterStock> today() {\n\t\treturn filterStockRepo.findToday();\n\t}", "public List<GlucoseData> getHistoryOfDay(Date day) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"yyyyMMdd\");\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n\n Date datadate = sqlDateFormat.parse(glucosedata.getDate());\n // Adding to list\n if(fmt.format(day).equals(fmt.format(datadate))) {\n history.add(glucosedata);\n }\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public List<Order> getOrdersByDate(Date date);", "public List<HistoryVisit> extractHistory(Date startDate, Date endDate) throws HistoryMinerException {\r\n final String queryTemplate = \r\n \"SELECT visits.id, visits.visit_date, visits.visit_type, visits.session, places.id, places.url, places.title, \" +\r\n \"from_visits.id, from_places.url \" + \r\n \"FROM moz_historyvisits AS visits JOIN moz_places AS places ON visits.place_id = places.id \" +\r\n \"LEFT OUTER JOIN moz_historyvisits AS from_visits ON visits.from_visit = from_visits.id \" + \r\n \"LEFT OUTER JOIN moz_places AS from_places ON from_visits.place_id = from_places.id \" +\r\n \"WHERE visits.visit_date > %d \" + \r\n \"AND visits.visit_date < %d \" +\r\n \"ORDER BY visits.id\";\r\n\r\n List<HistoryVisit> results = new ArrayList<HistoryVisit>();\r\n \r\n try {\r\n Connection conn = null;\r\n Statement stmt = null;\r\n try {\r\n conn = DriverManager.getConnection(JDBC_SQLITE + this.getFirefoxHistoryDbPath());\r\n stmt = conn.createStatement();\r\n \r\n String query = String.format(queryTemplate, dateToPRTime(startDate), dateToPRTime(endDate));\r\n ResultSet rs = stmt.executeQuery(query);\r\n \r\n while (rs.next()) {\r\n long visitId = rs.getLong(1);\r\n Date visitDate = prTimeToDate(rs.getLong(2));\r\n int visitType = rs.getInt(3);\r\n long sessionId = rs.getLong(4);\r\n long locationId = rs.getLong(5);\r\n String url = rs.getString(6);\r\n String title = rs.getString(7);\r\n long fromVisitId = rs.getLong(8);\r\n String fromUrl = rs.getString(9);\r\n \r\n if (log.isTraceEnabled()) {\r\n StringBuilder logMsg = new StringBuilder();\r\n logMsg.append(DateFormat.getInstance().format(visitDate));\r\n logMsg.append('|');\r\n logMsg.append(Integer.toString(visitType));\r\n logMsg.append('|');\r\n logMsg.append(url == null ? NULL : url);\r\n logMsg.append('|');\r\n logMsg.append(title == null ? NULL : title);\r\n logMsg.append('|');\r\n logMsg.append(fromUrl == null ? NULL : fromUrl);\r\n logMsg.append(LINE_SEPARATOR);\r\n log.trace(logMsg.toString());\r\n }\r\n \r\n results.add(new HistoryVisit(visitId, visitDate, visitType, sessionId, locationId, url, title, fromVisitId, fromUrl));\r\n }\r\n } finally {\r\n if (stmt != null) { stmt.close(); }\r\n if (conn != null) { conn.close(); }\r\n }\r\n } catch (Exception e) {\r\n throw new HistoryMinerException(\r\n \"Error while processing SQLite output and generating file: \" + e, e);\r\n } \r\n return results;\r\n }", "public List<Order> getOrderHistory();", "@GET(\"points-transaction-history?expand=translations&sort=-created_at\")\n Call<HistoryExchangeResponse> getTransactionHistoryAll();", "private static List<Date> getTradeDays(Date startDate, Date expiration) {\r\n\t\t\r\n\t\tEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"JPAOptionsTrader\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\t\r\n\t\t// Note: table name refers to the Entity Class and is case sensitive\r\n\t\t// field names are property names in the Entity Class\r\n\t\tQuery query = em.createQuery(\"select distinct(opt.trade_date) from \" + TradeProperties.SYMBOL_FOR_QUERY + \" opt where \"\r\n\t\t\t\t+ \"opt.trade_date >= :tradeDate \" \r\n\t\t\t\t+ \"and opt.expiration=:expiration \"\t\r\n\t\t\t\t+ \" order by opt.trade_date\");\r\n\t\t\r\n\t\tquery.setParameter(\"tradeDate\", startDate);\r\n\t\tquery.setParameter(\"expiration\", expiration);\r\n\r\n\t\tquery.setHint(\"odb.read-only\", \"true\");\r\n\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Date> tradeDates = query.getResultList();\r\n\t\t\r\n\t\tem.close();\r\n\t\t\r\n\t\treturn tradeDates;\r\n\t}", "public void getHistory() {\n List<Map<String, String>> HistoryList = null;\n HistoryList = getData();\n String[] fromwhere = {\"Line\", \"Station\", \"Repair_Time_Start\", \"Repair_Time_Finish\", \"Repair_Duration\"};\n int[] viewwhere = {R.id.Line, R.id.Station, R.id.RepairTimeStart, R.id.RepairTimeFinish, R.id.Duration};\n ABH = new SimpleAdapter(BreakdownHistory.this, HistoryList, R.layout.list_history, fromwhere, viewwhere);\n BreakdownHistory.setAdapter(ABH);\n }", "public static List<OptionPricing> getPriceHistory(Date startTradeDate, Date endTradeDate, Date expiration, double strike, String callPut) {\r\n\t\t\r\n\t\tEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"JPAOptionsTrader\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\t\r\n\t\t// Note: table name refers to the Entity Class and is case sensitive\r\n\t\t// field names are property names in the Entity Class\r\n\t\tQuery query = em.createQuery(\"select opt from \" + TradeProperties.SYMBOL_FOR_QUERY + \" opt where \"\r\n\t\t\t\t+ \"opt.trade_date >= :startTradeDate \" \r\n\t\t\t\t+ \"and opt.trade_date <= :endTradeDate \" \r\n\t\t\t\t+ \"and opt.expiration=:expiration \"\t\r\n\t\t\t\t+ \"and opt.call_put = :call_put \"\r\n\t\t\t\t+ \"and opt.strike = :strike \"\r\n\t\t\t\t+ \" order by opt.trade_date\");\r\n\t\t\r\n\t\tquery.setParameter(\"startTradeDate\", startTradeDate);\r\n\t\tquery.setParameter(\"endTradeDate\", endTradeDate);\r\n\t\tquery.setParameter(\"expiration\", expiration);\r\n\t\tquery.setParameter(\"call_put\", callPut);\r\n\t\tquery.setParameter(\"strike\", strike);\r\n\t\t\r\n\t\tquery.setHint(\"odb.read-only\", \"true\");\r\n\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<OptionPricing> options = query.getResultList();\r\n\t\t\r\n\t\tem.close();\r\n\t\t\r\n\t\treturn options;\r\n\t}", "public void setHistoryDisplayVisible(boolean visible) {\r\n\t\thistoryDisplay.setVisible(visible);\r\n\t}", "@Override\r\n\tpublic List<ContractDetailTO> findRangedContractDetailList(HashMap<String, Object> searchDate) {\r\n\t\treturn contractApplicationService.findRangedContractDetailList(searchDate);\r\n\t}", "public List<Weather> getHistory() {\n return weatherRepo.findAll();\n }", "private List<Event> getEventsOnDate(Date date) {\r\n List<Event> eventsOnDate = new ArrayList<>();\r\n for (Event event : this.events) {\r\n if (event.getDate().equals(date)) {\r\n eventsOnDate.add(event);\r\n }\r\n }\r\n\r\n return eventsOnDate;\r\n }", "java.util.List<hr.client.appuser.CouponCenter.ExchangeRecord> \n getExchangeHistoryListList();", "public List<Order> displayOrders(LocalDate date) throws FlooringMasteryDaoException {\n\n List<Order> orders = dao.getOrdersByDate(date);\n return orders;\n\n }", "private String E19History() {\n StringBuilder buffer = new StringBuilder();\n buffer.append(\"\\f\");\n buffer.append(TextReportConstants.E19_HDR_HISTORY + \"\\n\\n\");\n\n int count1 = countNewlines(buffer.toString());\n\n buffer.append(\n \" PUBLICATION/LOCATION OF RECORDS STARTING DATE ENDING DATE\\n\");\n buffer.append(\n \" ------------------------------- ------------- -----------\\n\");\n\n int count2 = countNewlines(buffer.toString()) - count1;\n\n int available = getLinesPerPage() - count1 - count2 - 5;\n int avail = available;\n int loop = 0;\n int needed = 0;\n\n TextReportData data = TextReportDataManager.getInstance()\n .getDataForReports(lid, 3);\n\n for (Pub pub : data.getPubList()) {\n String beginDate = sdf.format(pub.getBegin());\n String endDate = \" \";\n if (pub.getEnd() != null) {\n endDate = sdf.format(pub.getEnd());\n }\n String tmp1 = String.format(\" %-25s %7s%10s %10s\\n\",\n pub.getPpub(), \" \", beginDate, endDate);\n needed = 1;\n\n if (needed <= avail) {\n buffer.append(tmp1);\n avail = avail - needed;\n } else {\n // try to place FOOTER at the bottom\n buffer.append(advanceToFooter(loop, buffer.toString()));\n\n // Do footer\n Date d = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"))\n .getTime();\n String footer = createFooter(data, E19_RREVISE_TYPE,\n sdf.format(d), \"NWS FORM E-19\", E19_HISTORY, \"HISTORY\",\n null, E19_STANDARD_LEFT_MARGIN);\n\n buffer.append(footer);\n\n // Do column header\n buffer.append(\n \" PUBLICATION/LOCATION OF RECORDS STARTING DATE ENDING DATE\\n\");\n buffer.append(\n \" ------------------------------- ------------- -----------\\n\");\n\n avail = available + count1;\n loop++;\n }\n }\n\n buffer.append(\"\\n\\n\");\n\n buffer.append(\n \" TYPE OF GAGE OWNER STARTING DATE ENDING DATE\\n\");\n buffer.append(\n \" ------------ ----- ------------- -----------\\n\");\n\n available = getLinesPerPage() - count1 - count2 - 5;\n avail = available;\n loop = 0;\n TextReportData dataGage = TextReportDataManager.getInstance()\n .getGageQueryData(lid);\n ArrayList<Gage> gageList = dataGage.getGageList();\n\n for (Gage gage : gageList) {\n String beginDate = sdf.format(gage.getBegin());\n String endDate = \" \";\n if (gage.getEnd() != null) {\n endDate = sdf.format(gage.getEnd());\n }\n\n String tmp1 = String.format(\n \" %-11s %14s%-11s %10s %10s\\n\", gage.getType(),\n \" \", gage.getOwner(), beginDate, endDate);\n needed = 1;\n\n if (needed <= avail) {\n buffer.append(tmp1);\n avail = avail - needed;\n } else if (needed > avail) {\n // try to place FOOTER at bottom\n buffer.append(advanceToFooter(loop, buffer.toString()));\n\n // do footer\n Date d = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"))\n .getTime();\n String footer = createFooter(dataGage, E19_RREVISE_TYPE,\n sdf.format(d), \"NWS FORM E-19\", E19_HISTORY, \"HISTORY\",\n null, E19_STANDARD_LEFT_MARGIN);\n\n buffer.append(footer);\n\n // Do column header\n buffer.append(\n \" TYPE OF GAGE OWNER STARTING DATE ENDING DATE\\n\");\n buffer.append(\n \" ------------ ----- ------------- -----------\\n\");\n\n avail = available + count1;\n loop++;\n }\n }\n\n buffer.append(\"\\n\\n\");\n\n buffer.append(\n \" ZERO ELEVATION STARTING DATE\\n\");\n buffer.append(\n \" -------------- -------------\\n\");\n\n available = getLinesPerPage() - count1 - count2 - 5;\n avail = available;\n loop = 0;\n\n for (Datum datum : data.getDatumList()) {\n String elevation = \" \";\n if (datum.getElevation() != -999) {\n elevation = String.format(\"%8.3f\", datum.getElevation());\n }\n\n String date = sdf.format(datum.getDate());\n\n String tmp1 = String.format(\" %s %24s%10s\\n\", elevation,\n \" \", date);\n\n needed = 1;\n\n if (needed <= avail) {\n buffer.append(tmp1);\n\n avail = avail - needed;\n } else if (needed > avail) {\n // try to place FOOTER at the bottom\n buffer.append(advanceToFooter(loop, buffer.toString()));\n\n // Do footer.\n Date d = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"))\n .getTime();\n String footer = createFooter(dataGage, E19_RREVISE_TYPE,\n sdf.format(d), \"NWS FORM E-19\", E19_HISTORY, \"HISTORY\",\n null, E19_STANDARD_LEFT_MARGIN);// ????\n\n buffer.append(footer);\n\n // Do column header.\n buffer.append(\n \" ZERO ELEVATION STARTING DATE\\n\");\n buffer.append(\n \" -------------- -------------\\n\");\n\n avail = available + count1;\n }\n }\n\n buffer.append(\"\\n\\n\");\n\n // try to place FOOTER at the bottom\n buffer.append(advanceToFooter(loop, buffer.toString()));\n\n // Do footer.\n String footer = createFooter(dataGage, E19_RREVISE_TYPE,\n sdf.format(new Date()), \"NWS FORM E-19\", E19_HISTORY, \"HISTORY\",\n null, E19_STANDARD_LEFT_MARGIN);\n\n buffer.append(footer);\n\n return buffer.toString();\n }", "void generateResponseHistory(LocalDate from, LocalDate to);", "private List<Performance> quizHistory(){\n\t\treturn history;\n\t}", "public List<Serie> getCaloriesByDate(){\r\n\t\t\r\n\t\treturn daoEjercicio.getCaloriesByDate();\r\n\t\t\r\n\t}", "public List<GlucoseData> getCompleteHistory() {\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n // Adding to list\n history.add(glucosedata);\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }", "public List<DataGroupInfoActiveHistoryRecord> getActiveHistoryList()\n {\n return myActiveSetConfig.getActivityHistory();\n }", "@GetMapping\n public List<QuoteInfo> quotes(){\n Iterable<QuoteRecord> records = quoteRepository.findAll();\n List<QuoteInfo> quotes = new ArrayList<>();\n for(QuoteRecord q: records){\n quotes.add(quotePresenter.present(q));\n }\n\n return quotes;\n }", "@Override\n\tpublic List<Historic_siteVO> datelist(Criteria cri) throws Exception {\n\t\treturn dao.datelist(cri);\n\t}", "public List<cn.zyj.dbexporter.jooq.db_mall.tables.pojos.TOfferGoods> fetchByCdate(Timestamp... values) {\n return fetch(TOfferGoods.T_OFFER_GOODS.CDATE, values);\n }", "@Override\n public List<Order> getAllOrders(LocalDate date) throws PersistenceException{\n return new ArrayList<Order>(orders.values());\n }", "public Set<T> getHistoryEvents() {\n\t\tif (historyEvents == null) {\n\t\t\tcreateHistoryEvents();\n\t\t}\n\t\treturn historyEvents;\n\t}", "Set<StewardSimpleDTO> getAllAvailable(Date from, Date to);", "public List<CommissionDistribution> lookupHistory(Long sourceAccount, LocalDateTime from,\n LocalDateTime to) {\n throw new UnsupportedOperationException(\"Not Implemented yet.\");\n }", "public static List<String> getHistStrings(\n final GenericObject history,\n final String date,\n final String adder,\n final String remover) {\n\n if (history == null)\n return null;\n\n final List<String> values = history.getStrings(adder);\n\n for (GenericObject dateObj : history.children) {\n if (!isDate(dateObj.name)) {\n if (!\"advisor\".equals(dateObj.name))\n System.err.println(dateObj.name + \" is not a valid date\");\n continue;\n }\n\n if (DATE_COMPARATOR.compare(dateObj.name, date) <= 0) {\n values.removeAll(dateObj.getStrings(remover));\n values.addAll(dateObj.getStrings(adder));\n }\n }\n\n return values;\n }", "public static List<Date> getTradeDays() {\r\n\t\t\r\n\t\tEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"JPAOptionsTrader\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\t\r\n\t\t// Note: table name refers to the Entity Class and is case sensitive\r\n\t\t// field names are property names in the Entity Class\r\n\t\tQuery query = em.createQuery(\"select distinct(opt.trade_date) from \" + TradeProperties.SYMBOL_FOR_QUERY + \" opt \"\r\n\t\t\t\t+ \" order by opt.trade_date\");\r\n\t\t\r\n\t\tquery.setHint(\"odb.read-only\", \"true\");\r\n\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Date> tradeDates = query.getResultList();\r\n\t\t\r\n\t\tem.close();\r\n\t\t\r\n\t\treturn tradeDates;\r\n\t}", "public Cliente[] findWhereFechaUltimaVisitaEquals(Date fechaUltimaVisita) throws ClienteDaoException;", "public List<MyStockHist> getMystockHistAlltList(MyStockHist myStockHist) ;", "public ArrayList<Seance> getSeances(String date){\n ArrayList<Seance> seancesDate = new ArrayList();\n for(Seance s : seances){\n if(s.getDate().toString().equals(date)){\n seancesDate.add(s);\n }\n }\n return seancesDate;\n }", "public List<String> recordedDateList();", "List<Order> getHistoryOrders(HistoryOrderRequest orderRequest);", "@WebMethod public Vector<Event> getEvents(Date date);", "public List<moneytree.persist.db.generated.tables.pojos.Income> fetchByTransactionDate(LocalDate... values) {\n return fetch(Income.INCOME.TRANSACTION_DATE, values);\n }", "public void getRangeShowsList(JsonHttpResponseHandler handler, int page, String fromDate, String toDate) {\n RANGE_PAGE = page;\n client.get(RANGE_SHOWS_URL(fromDate, toDate), handler);\n }", "List<LocalDate> getAvailableDates(@Future LocalDate from, @Future LocalDate to);", "public ArrayList<Menu> buscarPorFecha(Date fechaIni,Date fechaTer );", "public Vector<String> getExpressions(boolean history) {\n Vector<String> expressions = new Vector<>();\n try {\n Statement stat = conn.createStatement();\n ResultSet rs;\n if(history)\n rs = stat.executeQuery(\"SELECT * FROM history ORDER BY id DESC;\");\n else\n rs = stat.executeQuery(\"SELECT * FROM expressions ORDER BY id DESC;\");\n while (rs.next()) {\n expressions.add(rs.getString(\"expression\"));\n }\n return expressions;\n } catch (SQLException e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n System.exit(0);\n return null;\n }\n }", "Set<Art> getRecentArt();", "public List<TilePojo> getCharactesListByDate() {\n\t\tLOGGER.info(\"getCharactesListByDate -> Start\");\n\t\tcharactesListByDate = new LinkedList<>();\n\t\tList<TilePojo> charList = tileGalleryAndLandingService.getTilesByDate(homePagePath, galleryFor, null,\n\t\t\t\tresource.getResourceResolver(), true);\n\t\tcharactesListByDate = getFixedNumberChar(charList, 12);\n\t\tLOGGER.info(\"getCharactesListByDate -> End\");\n\t\treturn charactesListByDate;\n\t}", "hr.client.appuser.CouponCenter.ExchangeRecord getExchangeHistoryList(int index);", "public Map<Number, Double> getThePastPrices(Number stockID, Number stDate, Number enDate) {\n Map<Number, Double> m = new HashMap<Number, Double>();\n\n //get VO instance\n TestStockPricesVOImpl tspVO = getTestStockPricesVO();\n\n //get VC instance\n ViewCriteria vc =\n tspVO.getViewCriteria(\"GetStockPricesInGivenDateRangeCriteria\");\n vc.resetCriteria();\n\n //set All the bind parameters\n tspVO.setBindStockID(stockID);\n tspVO.setBindStartDate(stDate);\n tspVO.setBindEndDate(enDate);\n \n //apply the view criteria\n tspVO.applyViewCriteria(vc);\n \n //execute the view Object programatically\n tspVO.executeQuery();\n System.out.print(\"Row count: \");\n System.out.println(tspVO.getRowCount());\n\n //Iterate through the results\n RowSetIterator it = tspVO.createRowSetIterator(null);\n while (it.hasNext()) {\n TestStockPricesVORowImpl newRow = (TestStockPricesVORowImpl)it.next();\n Number datetracked = newRow.getDatetracked();\n Number timetracked = newRow.getTimetracked();\n Number price = newRow.getPrice();\n \n m.put(datetracked, price.doubleValue());\n }\n it.closeRowSetIterator();\n return m;\n }", "public void getOrdersByDate() throws FlooringDaoException {\n boolean validDate = true;\n do {\n try {\n String date = view.getOrdersDate();\n List<Order> ordersByDate = new ArrayList<>();\n ordersByDate = service.getOrdersByDate(date);\n validDate = true;\n view.displayOrdersByDate(ordersByDate);\n } catch (FlooringDaoException ex) {\n view.displayError(\"Orders file not found for given date. Please make sure your date is entered EXACTLY as YYYY-MM-DD or try a different date.\");\n validDate = false;\n }\n } while (!validDate);\n }", "@WebMethod public ArrayList<Event> getEvents(LocalDate date);", "static HistoryEvent[] getHistoryEvents() {\n/* 73 */ HISTORY_RW_LOCK.readLock().lock();\n/* */ \n/* */ try {\n/* 76 */ return HISTORY.<HistoryEvent>toArray(new HistoryEvent[HISTORY.size()]);\n/* */ }\n/* */ finally {\n/* */ \n/* 80 */ HISTORY_RW_LOCK.readLock().unlock();\n/* */ } \n/* */ }", "public List<Zadania> getAllTaskByDate(String date){\n String startDate = \"'\"+date+\" 00:00:00'\";\n String endDate = \"'\"+date+\" 23:59:59'\";\n\n List<Zadania> zadanias = new ArrayList<Zadania>();\n String selectQuery = \"SELECT * FROM \" + TABLE_NAME + \" WHERE \"+TASK_DATE+\" BETWEEN \"+startDate+\" AND \"+endDate+\" ORDER BY \"+TASK_DATE+\" ASC\";\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n if (cursor.moveToFirst()){\n do {\n Zadania zadania = new Zadania();\n zadania.setId(cursor.getInt(cursor.getColumnIndex(_ID)));\n zadania.setAction(cursor.getInt(cursor.getColumnIndex(KEY_ACTION)));\n zadania.setDesc(cursor.getString(cursor.getColumnIndex(TASK_DESC)));\n zadania.setDate(cursor.getString(cursor.getColumnIndex(TASK_DATE)));\n zadania.setBackColor(cursor.getString(cursor.getColumnIndex(BACK_COLOR)));\n zadanias.add(zadania);\n } while (cursor.moveToNext());\n }\n return zadanias;\n }", "public List<Order> retrieveOrders1DayAgo( Date currentDate ) throws OrderException;", "public int showHistory() {\n List <MovieListing> showtimes = ListingManager.getShowtimes();\n for (int i=0; i<history.size(); i++) {\n CustomerTransaction curr = history.get(i);\n for (int j=0; j<showtimes.size(); j++) {\n MovieListing show = showtimes.get(j);\n if (show.sameListing(curr.getListingID())) {\n curr.showTransaction(show);\n }\n }\n }\n return history.size();\n }", "public ArrayList<ArrayList<Double>> getReportsFromServer(LocalDate date)\n {\n\t //Go to DB and ask for reports of a specific date\n\t return null;\n }", "List<HistoryData> loadAllHistoryData();", "public List<CommissionDistribution> lookupHistory(Long sourceAccount) {\n throw new UnsupportedOperationException(\"Not Implemented yet.\");\n }", "public ArrayList<History> getPriceHistory() { return priceHistory; }", "@Query(\n value = \"SELECT d\\\\:\\\\:date\\n\" +\n \"FROM generate_series(\\n\" +\n \" :startDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" :endDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" '1 day'\\n\" +\n \" ) AS gs(d)\\n\" +\n \"WHERE NOT EXISTS(\\n\" +\n \" SELECT\\n\" +\n \" FROM bookings\\n\" +\n \" WHERE bookings.date_range @> d\\\\:\\\\:date\\n\" +\n \" );\",\n nativeQuery = true)\n List<Date> findAvailableDates(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate);", "public ArrayList<Meeting> getHistoryMeetings(ArrayList<Meeting> list) throws ParseException {\n DateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n String now = df.format(new Date());\n Date today = new SimpleDateFormat(\"dd/MM/yyyy\").parse(now);\n ArrayList<Meeting> relevant = new ArrayList<Meeting>();\n for(Meeting meeting : list){\n Date meetingDate = new SimpleDateFormat(\"dd/MM/yyyy\").parse(meeting.getDate().toString());\n if(meetingDate.before(today)){\n relevant.add(meeting);\n }\n }\n return relevant;\n }", "public String getMarketHistory(String market) {\n\n\t\treturn getJson(API_VERSION, PUBLIC, \"getmarkethistory\", returnCorrectMap(\"market\", market));\n\t}", "public void showBookingsByDates(JTextArea output, Date fromDate, Date toDate)\r\n {\r\n output.setText(\"Bookinger mellom \" \r\n + (DateFormat.getDateInstance(DateFormat.MEDIUM).format(fromDate)) \r\n + \" og \" + (DateFormat.getDateInstance(DateFormat.MEDIUM).format(toDate)) + \"\\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.getToDate().compareTo(toDate) >= 0 &&\r\n booking.getFromDate().compareTo(fromDate) <= 0) ||\r\n (booking.getToDate().compareTo(toDate) <= 0) && \r\n booking.getFromDate().compareTo(fromDate) >= 0)\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 List<Reserva> getReservasPeriod(String dateOne, String dateTwo){\n /**\n * Instancia de SimpleDateFormat para dar formato correcto a fechas.\n */\n SimpleDateFormat parser = new SimpleDateFormat(\"yyyy-MM-dd\");\n /**\n * Crear nuevos objetos Date para recibir fechas fomateadas.\n */\n Date dateOneFormatted = new Date();\n Date dateTwoFormatted = new Date();\n /**\n * Intentar convertir las fechas a objetos Date; mostrar registro de\n * la excepción si no se puede.\n */\n try {\n dateOneFormatted = parser.parse(dateOne);\n dateTwoFormatted = parser.parse(dateTwo);\n } catch (ParseException except) {\n except.printStackTrace();\n }\n /**\n * Si la fecha inicial es anterior a la fecha final, devuelve una lista\n * de Reservas creadas dentro del intervalo de fechas; si no, devuelve\n * un ArrayList vacío.\n */\n if (dateOneFormatted.before(dateTwoFormatted)){\n return repositorioReserva.findAllByStartDateAfterAndStartDateBefore\n (dateOneFormatted, dateTwoFormatted);\n } else {\n return new ArrayList<>();\n }\n }", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public String getHistory () {\r\n\t\treturn history;\r\n\t}", "public void GetAvailableDates()\n\t{\n\t\topenDates = new ArrayList<TimePeriod>(); \n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\t\n\t\t\tString query = \"SELECT startDate, endDate FROM Available WHERE available_hid = '\"+hid+\"'\"; \n\t\t\tResultSet rs = con.stmt.executeQuery(query);\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tTimePeriod tp = new TimePeriod(); \n\t\t\t\ttp.stringStart = rs.getString(\"startDate\"); \n\t\t\t\ttp.stringEnd = rs.getString(\"endDate\"); \n\t\t\t\ttp.StringToDate();\n\t\t\t\t\n\t\t\t\topenDates.add(tp); \n\t\t\t}\n\t\t\tcon.closeConnection(); \n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "@Override\n public List<Order> getAllOrders(String date) throws FlooringMasteryPersistenceException {\n \n Map<Integer, Order> hm = ordersByDate.get(date); // get the hashmap by the date\n\n return new ArrayList<>(hm.values()); // get and return the list of orders from the <Integer, Order> hashmap\n \n }", "public ArrayList<AirTimeHistory> getAllHistory() {\n\t Cursor histories = db.query(TABLE_AIRTIME_HISTORY, null, null, null, null, null, KEY_ID + \" DESC\");\n\t \n\t ArrayList<AirTimeHistory> result = new ArrayList<AirTimeHistory>();\n\t if (histories.moveToFirst()){\n\t\t do {\n\t\t\t AirTimeHistory newItem = new AirTimeHistory();\n\t\t\t newItem.setID(histories.getString(0));\n\t\t\t newItem.setEmail(histories.getString(USER_EMAIL_COLUMN));\n\t\t\t newItem.setPhoneNumber(histories.getString(USER_NUMBER_COLUMN));\n\t\t\t newItem.setNetwork(histories.getString(NETWORK_COLUMN));\n\t\t\t newItem.setAmount(histories.getString(AMOUNT_COLUMN));\n\t\t\t newItem.setDateTime(histories.getString(DATE_TIME_COLUMN));\n\t\t\t newItem.setNetworkIndex(histories.getString(NETWORK_INDEX_COLUMN));\n\t\t\t newItem.setTransactionID(histories.getString(TRANSACTION_ID_COLUMN));\n\t\t\t newItem.setTransactionStatus(histories.getString(TRANSACTION_STATUS_COLUMN));\n\t\t\t newItem.setCountry(histories.getString(COUNTRY_COLUMN));\n\t\t\t newItem.setCountryIndex(histories.getString(COUNTRY_INDEX_COLUMN));\n\t\t\t newItem.setChosenAmountIndex(histories.getString(CHOSEN_AMOUNT_INDEX_COLUMN));\n\t\t\t newItem.setCurrency(histories.getString(CURRENCY_COLUMN));\n\t\t\t newItem.setTopupStatus(histories.getString(TOPUP_STATUS_COLUMN));\n\t\t\t newItem.setGatewayID(histories.getString(GATEWAY_ID3_COLUMN));\n\t\t\t newItem.setServerTime(histories.getString(SERVER_TIME_COLUMN));\n\t\t\t newItem.setAmountCharged(histories.getString(AMOUNT_CHARGED_COLUMN));\n\t\t\t newItem.setPayUrl(histories.getString(PAY_URL_COLUMN));\n\t\t\t \n\t\t\t result.add(newItem);\n\t\t } while(histories.moveToNext());\n\t }\n\t \n\t histories.close();\n\t \n\t return result;\n\t}", "public String showBrowsingHistory()\n {\n\t String result = \"\";\n\t \n\t if (this.getBrowseHistory() != null)\n\t {\n\t\tfor(String univ : (this.getBrowseHistory()))\n\t \t{\n\t\t result += univ + \"\\n\";\n\t \t}\n\t }\n\t \n\t return result;\n }", "public List<cn.zyj.dbexporter.jooq.db_mall.tables.pojos.TOfferGoods> fetchByMdate(Timestamp... values) {\n return fetch(TOfferGoods.T_OFFER_GOODS.MDATE, values);\n }", "public Future<List<CtxHistoryAttribute>> retrievePast(CtxAttributeIdentifier attrId, Date startDate, Date endDate);", "public List<String> getDates() {\n\n List<String> listDate = new ArrayList<>();\n\n Calendar calendarToday = Calendar.getInstance();\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH);\n String today = simpleDateFormat.format(calendarToday.getTime());\n\n Calendar calendarDayBefore = Calendar.getInstance();\n calendarDayBefore.setTime(calendarDayBefore.getTime());\n\n int daysCounter = 0;\n\n while (daysCounter <= 7) {\n\n if (daysCounter == 0) { // means that its present day\n listDate.add(today);\n } else { // subtracts 1 day after each pass\n calendarDayBefore.add(Calendar.DAY_OF_MONTH, -1);\n Date dateMinusOneDay = calendarDayBefore.getTime();\n String oneDayAgo = simpleDateFormat.format(dateMinusOneDay);\n\n listDate.add(oneDayAgo);\n\n }\n\n daysCounter++;\n }\n\n return listDate;\n\n }", "private List<SeatHold> getHoldTickets(Instant instant) {\n List<SeatHold> seatHolds = seatHoldMap.values()\n .stream()\n .filter(seatHold -> seatHold.getDate()\n .isBefore(LocalDateTime.ofInstant(instant, ZoneId.systemDefault())))\n .collect(Collectors.toList());\n return seatHolds;\n }", "public List<cn.edu.kmust.flst.domain.flst.tables.pojos.Article> fetchByArticleDate(Timestamp... values) {\n return fetch(Article.ARTICLE.ARTICLE_DATE, values);\n }", "@Override\n\tpublic List<FoodTruckEntity> findByExpirationDate() {\n\t\tDate date=new Date();\n\t\tList<FoodTruckEntity> list=repo.findByExpirationDateGreaterThanEqual(date);\n\t\treturn list;\n\t}", "@RequestMapping(value = \"${app.paths.historical-path}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity<Collection<Bitcoin>> getBitcoinHistoricalRatesInDateRange(\n @RequestParam(\"dateFrom\") String dateFromString, @RequestParam(\"dateTo\") String dateToString)\n throws InterruptedException, ExecutionException {\n log.info(\"> BitcoinController :: getBitcoinPricesInDateTimeRange\");\n ZonedDateTime dateTimeFrom = LocalDate.parse(dateFromString).atStartOfDay(ZoneId.systemDefault());\n ZonedDateTime dateTimeTo = LocalDate.parse(dateToString).atStartOfDay(ZoneId.systemDefault()).plusDays(1)\n .minusNanos(1);\n Collection<Bitcoin> response = service.findAllInRange(dateTimeFrom, dateTimeTo);\n log.info(\"< BitcoinController :: getBitcoinPricesInDateTimeRange\");\n return new ResponseEntity<Collection<Bitcoin>>(response, HttpStatus.OK);\n }", "public String getHistory () {\n\t\treturn history;\n\t}", "public List<cn.clubox.quiz.jooq.domain.tables.pojos.QuizEngagement> fetchByStored(Timestamp... values) {\n return fetch(QuizEngagement.QUIZ_ENGAGEMENT.STORED, values);\n }", "@Override\n\t@Transactional(readOnly=true)\n\tpublic Page<ProductDTO> findByDateOfExpiryBetweenAndVisibleTrue(LocalDate from, LocalDate to, Pageable pageable) {\n\t\tlog.debug(\"Request to get all Products by dateOfExpiry from \"+from+\" to \"+to);\n return productRepository.findByDateOfExpiryBetweenAndVisibleTrue(from,to,pageable)\n .map(productMapper::toDto);\n\t}", "public Cliente[] findWhereFechaRegistroEquals(Date fechaRegistro) throws ClienteDaoException;", "private List<ResourceExtenderHistory> getResourceExtenderHistoryListForDashboard( ResourceHistory resourceHistory, MassNotificationTaskConfig config, int nIdForm )\n {\n List<ResourceExtenderHistory> listResourceExtenderHistory = new ArrayList<>( );\n\n for ( String extenderType : config.getListExtenderTypesForDashboard( ) )\n {\n ResourceExtenderHistoryFilter filter = new ResourceExtenderHistoryFilter( );\n filter.setExtenderType( extenderType );\n filter.setIdExtendableResource( String.valueOf( resourceHistory.getIdResource( ) ) );\n filter.setExtendableResourceType( getResourceType( resourceHistory.getResourceType( ), nIdForm ) );\n \n listResourceExtenderHistory.addAll( _resourceExtenderHistoryService.findByFilter( filter ) );\n }\n return listResourceExtenderHistory;\n }", "private JList getHistoryList() {\n if (historyList == null) {\n historyList = new JList();\n historyList.setModel(new ListListModel(new ArrayList()));\n historyList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n historyList.setCellRenderer(new HistoryListCellRenderer());\n historyList.addListSelectionListener(new ListSelectionListener() {\n\n public void valueChanged(ListSelectionEvent e) {\n final History history = (History) historyList.getSelectedValue();\n\n getViewPanel().setHistory(history);\n\n /*\n * Toggle the buttons off if no action needs to be taken\n */\n\n if (!isLocked() && getUserAccount().isAdministrator()) {\n final OkCancelButtonPanel panel = getButtonPanel();\n\n panel.getOkayButton().setEnabled((history != null) && !history.isProcessed());\n panel.getCancelButton().setEnabled((history != null) && !history.isProcessed());\n }\n\n }\n\n });\n }\n\n return historyList;\n }", "public Date[] getDates() {\n/* 141 */ return getDateArray(\"date\");\n/* */ }", "public ArrayList<Event> getEventsByToday() {\n\t\tArrayList<Event> result = new ArrayList<Event>();\n\t\tCalendar today = Calendar.getInstance();\n\t\tfor (int i = 0; i < events.size(); i++) {\n\t\t\tif (events.get(i).getInitial_date().get(Calendar.YEAR) == today.get(Calendar.YEAR)\n\t\t\t\t\t&& events.get(i).getInitial_date().get(Calendar.MONTH) == today.get(Calendar.MONTH)\n\t\t\t\t\t&& events.get(i).getInitial_date().get(Calendar.DAY_OF_MONTH) == today.get(Calendar.DAY_OF_MONTH)) {\n\t\t\t\tresult.add(events.get(i));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public String getDepositHistory() {\n\n\t\treturn getDepositHistory(\"\");\n\t}", "AbstractList<Event> getEventByCreateDate(Date d){\r\n\t\treturn events;\r\n\t}", "public StringBuilder getHistory() {\r\n\t\treturn history;\r\n\t}", "public List<Events> getAllEventsAndHistoryForUser(long userId);", "private void printBrowsingHistory()\r\n\t{\r\n\t\tQueue temp = new Queue(SIZE);\r\n\t\tObject element;\r\n\t\t\r\n\t\tSystem.out.println(\"\\nBrowsing History (Oldest to Most Recent):\");\r\n\t\tfor (int i = 0; i < queueCount; i++)\r\n\t\t{\r\n\t\t\telement = rChronological.dequeue();\t\t\t\t//dequeue first element to the variable element\r\n\t\t\tSystem.out.println(element);\t\t\t\t\t//print out the value of element (the URL)\r\n\t\t\ttemp.enqueue(element);\t\t\t\t\t\t\t//enqueue element to a temporary queue\r\n\t\t}\r\n\t\tfor (int i = 0; i < queueCount; i++)\r\n\t\t\trChronological.enqueue(temp.dequeue());\t\t\t//put all elements in temp back to the original queue\r\n\t}", "@Override\n @Cacheable(\"application-cache\")\n public List<Comment> getCommentsByDate(LocalDate date) {\n Session session = sessionFactory.getCurrentSession();\n return session.createQuery(\"Select a From Comment a where a.date like :custDate\", Comment.class).setParameter(\"custDate\", date).getResultList();\n }", "@Override\n\tpublic List<Bill> viewBillsByDateRange(LocalDate startDate, LocalDate endDate) {\n\t\tList<Bill>bills = billDao.findByBillDateBetween(startDate, endDate);\n\t\tif(bills.size()==0) {\n\t\t\tthrow new BillNotFoundException(\"No bills in given date range\");\n\t\t}\n\t\treturn bills;\n\t}", "private void getRecords(LocalDate startDate, LocalDate endDate) {\n foods = new ArrayList<>();\n FoodRecordDao dao = new FoodRecordDao();\n try {\n foods = dao.getFoodRecords(LocalDate.now(), LocalDate.now(), \"\");\n } catch (DaoException ex) {\n Logger.getLogger(FoodLogViewController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public String trade_history(String pair, int since) {\n\t\treturn this.apiCall(\"trade_history\", pair, (\"since,\" + since), false);\n\t}", "public AccountsHistory accountsHistory() {\n return this.accountsHistory;\n }", "public List<Absence> getAllAbsencesOnAGivenDate(LocalDate date) throws SQLException {\n List<Absence> allAbsencesForADate = new ArrayList(); //get a list to store the values.\n java.sql.Date sqlDate = java.sql.Date.valueOf(date); // converts LocalDate date to sqlDate\n try(Connection con = dbc.getConnection()){\n String SQLStmt = \"SELECT * FROM ABSENCE WHERE DATE = '\" + sqlDate + \"'\";\n Statement statement = con.createStatement();\n ResultSet rs = statement.executeQuery(SQLStmt);\n while(rs.next()) //While you have something in the results\n {\n int userKey = rs.getInt(\"studentKey\");\n allAbsencesForADate.add(new Absence(userKey, date)); \n } \n }\n return allAbsencesForADate;\n }", "public void showHistory(){\n \tif (historyExample==null) historyExample = new HistoryExample();\n setWidgetAsExample(historyExample);\n }", "public List<Reservation>reporteFechas(String date1, String date2){\n\n\t\t\tSimpleDateFormat parser = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\tDate dateOne = new Date();\n\t\t\tDate dateTwo = new Date();\n\n\t\t\ttry {\n\t\t\t\tdateOne = parser.parse(date1);\n\t\t\t\tdateTwo = parser.parse(date2);\n\t\t\t} catch (ParseException e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif(dateOne.before(dateTwo)){\n\t\t\t\treturn repositoryR.reporteFechas(dateOne, dateTwo);\n\t\t\t}else{\n\t\t\t\treturn new ArrayList<>();\n\t\t\t}\n\n\t \t\n\t }", "boolean addHistoricVisitsToUsageReportsBuffer();", "public static ArrayList<HistoPointData> parseHistoricalJson(String json) {\n \n ArrayList<HistoPointData> dailyData = new ArrayList<>();\n \n try {\n JSONObject jsonObj = new JSONObject(json);\n jsonObj = jsonObj.getJSONObject(\"query\").getJSONObject(\"results\");\n JSONArray jsonArr = jsonObj.getJSONArray(\"quote\");\n int length = jsonArr.length();\n for (int i = 0; i < length; i++) {\n // Do stuff...\n JSONObject currObj = jsonArr.optJSONObject(length - (i+1)); // I need to reverse the order so the date is acs\n HistoPointData currPoint = new HistoPointData(currObj);\n dailyData.add(currPoint);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return dailyData;\n }", "public String getDepositHistory(String currency) {\n\n\t\tString method = \"getdeposithistory\";\n\n\t\tif(currency.equals(\"\"))\n\n\t\t\treturn getJson(API_VERSION, ACCOUNT, method);\n\n\t\treturn getJson(API_VERSION, ACCOUNT, method, returnCorrectMap(\"currency\", currency));\n\t}" ]
[ "0.61980104", "0.605537", "0.5721271", "0.56395656", "0.5592631", "0.55786705", "0.5568715", "0.5453293", "0.54184043", "0.5393283", "0.53915095", "0.53911006", "0.5282301", "0.52815515", "0.52771175", "0.52763903", "0.52672863", "0.52578926", "0.5246765", "0.5239484", "0.52031773", "0.5155169", "0.5142104", "0.5141726", "0.5136484", "0.51344764", "0.5119711", "0.5111126", "0.50919414", "0.505689", "0.50546986", "0.5052134", "0.5042066", "0.5038785", "0.49994817", "0.4989982", "0.49880335", "0.49868125", "0.49802858", "0.49755037", "0.49728134", "0.4957402", "0.4956013", "0.49276462", "0.49248877", "0.49168736", "0.49047622", "0.4898034", "0.48971575", "0.48949346", "0.48871627", "0.48821914", "0.4881832", "0.48722565", "0.48714572", "0.48587447", "0.48582911", "0.48572704", "0.4855896", "0.48387024", "0.48386323", "0.4837687", "0.48325905", "0.48319787", "0.48319787", "0.48265207", "0.48247537", "0.48232892", "0.4814687", "0.48136955", "0.48005778", "0.47980407", "0.4788662", "0.47868034", "0.4783203", "0.47822624", "0.47796154", "0.47630784", "0.47564262", "0.47486147", "0.47460666", "0.47455564", "0.47397575", "0.4739049", "0.47361478", "0.4734004", "0.4733538", "0.47327027", "0.47296685", "0.47293505", "0.47290412", "0.47245058", "0.47238106", "0.47233", "0.4723117", "0.47213316", "0.4720964", "0.47153258", "0.47070855", "0.47026703" ]
0.63722205
0
Returns the available instruments supported by the Broker.
public Set<Instrument> getInstruments(BrokerID brokerID) throws PersistenceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Instrument[] getAvailableInstruments() {\r\n\t\tInstrument[] allInstruments = synth.getAvailableInstruments();\r\n\t\tInstrument[] bank1 = new Instrument[128];\r\n\t\tfor (int i = 0; i < 128; i++) {\r\n\t\t\tif (allInstruments[i].getPatch().getBank() == 0)\r\n\t\t\t\tbank1[i] = allInstruments[i];\r\n\t\t}\r\n\t\treturn bank1;\r\n\t}", "public List<String> getInstruments() {\n\t\tif (instruments == null || instruments.isEmpty())\n\t\t\tinstruments = getInstrumentsFromMiapes();\n\t\tif (instruments != null) {\n\t\t\tfinal List<String> ret = new ArrayList<String>();\n\t\t\tfor (final String instrument : instruments) {\n\t\t\t\tret.add(ProteomeXchangeFilev2_1.MTD + TAB + \"instrument\" + TAB + instrument);\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t\treturn null;\n\t}", "public List<String> getAvailableDataTypes() {\n Set<String> typeSet = new TreeSet<String>();\n\n ITimer timer = TimeUtil.getTimer();\n timer.start();\n\n try {\n for (Provider provider : DataDeliveryHandlers.getProviderHandler()\n .getAll()) {\n\n for (ProviderType type : provider.getProviderType()) {\n typeSet.add(type.getDataType().toString());\n }\n }\n } catch (RegistryHandlerException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to retrieve the provider list.\", e);\n }\n\n List<String> typeList = new ArrayList<String>(typeSet);\n timer.stop();\n\n return typeList;\n }", "public Set<String> getAvailableProducts() {\n\t\treturn availableProducts.keySet();\n\t}", "public String[] getSoundDevicesList();", "String [] getSupportedTypes();", "public Mixer.Info[] getSupportedMixers() {\n DataLine.Info lineInfo = new DataLine.Info(SourceDataLine.class, audioFormat);\n Mixer.Info[] info = AudioSystem.getMixerInfo();\n int count = 0;\n for (int i = 0; i < info.length; i++) {\n Mixer m = AudioSystem.getMixer(info[i]);\n if (m.isLineSupported(lineInfo)) {\n count++;\n }\n }\n\n Mixer.Info[] options = new Mixer.Info[count];\n count = 0;\n for (int i = 0; i < info.length; i++) {\n Mixer m = AudioSystem.getMixer(info[i]);\n if (m.isLineSupported(lineInfo))\n options[count++] = info[i];\n }\n return options;\n }", "public static String[] getAvailableIDs();", "public List<String> getAvailableVoices() throws DynamicCallException, ExecutionException {\n return (List<String>)call(\"getAvailableVoices\").get();\n }", "Set<Capability> getAvailableCapability();", "public static java.lang.String[] getAvailableIDs() { throw new RuntimeException(\"Stub!\"); }", "private String[] getInstrumentIds(){\n logger.info(\"Getting Instruments from cache\");\n return instruments.keySet().toArray(new String[instruments.size()]);\n }", "HashMap<String, Instrument> getInstruments();", "public Future<List<String>> getAvailableVoices() throws DynamicCallException, ExecutionException {\n return call(\"getAvailableVoices\");\n }", "public synchronized static Set<MeasureUnit> getAvailable() {\n Set<MeasureUnit> result = new HashSet<MeasureUnit>();\n for (String type : new HashSet<String>(MeasureUnit.getAvailableTypes())) {\n for (MeasureUnit unit : MeasureUnit.getAvailable(type)) {\n result.add(unit);\n }\n }\n // Train users not to modify returned set from the start giving us more\n // flexibility for implementation.\n return Collections.unmodifiableSet(result);\n }", "public List<String> getAvailableDevices() {\n if (getEcologyDataSync().getData(\"devices\") != null) {\n return new ArrayList<>((Collection<? extends String>) ((Map<?, ?>) getEcologyDataSync().\n getData(\"devices\")).keySet());\n } else {\n return Collections.emptyList();\n }\n }", "public List<String> getAvailableSidebands() {\n String mode = getMode().toLowerCase();\n\n if (mode.equals(\"usb\") || mode.equals(\"lsb\")) {\n return Arrays.asList(mode);\n }\n\n return null;\n }", "private void populateAvailableProviders() {\n allAvailableProviders = new HashSet<Provider>();\n\n DataType dataType = DataType.valueOfIgnoreCase(this.dataType);\n try {\n for (Provider provider : DataDeliveryHandlers.getProviderHandler()\n .getAll()) {\n\n ProviderType providerType = provider.getProviderType(dataType);\n if (providerType != null) {\n allAvailableProviders.add(provider);\n }\n }\n } catch (RegistryHandlerException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to retrieve the list of providers.\", e);\n }\n }", "public static List<String> getSupportedVersions () {\n if (instBySupportedVersion == null) {\n init();\n }\n return new ArrayList(instBySupportedVersion.keySet());\n }", "public InstrumentDescription getInstrument();", "public long getSupports();", "public SortedSet<String> getAvailableDataProviders() {\n if (allAvailableProviders == null) {\n populateAvailableProviders();\n }\n\n SortedSet<String> providers = new TreeSet<String>();\n for (Provider p : allAvailableProviders) {\n providers.add(p.getName());\n }\n\n return providers;\n }", "public Set<String> getAvailableTypes() {\n return ApiSpecificationFactory.getTypes();\n }", "Set<ServiceProducer> getAllServiceProviders();", "public abstract String[] getSupportedMediaTypes();", "public List<Resource> getAvailableResources();", "public abstract Set<Genome> getAvailableGenomes();", "public PayloadType[] getAudioPayloadTypes();", "public List getCurrentAvailabeDrivers() throws Exception;", "public abstract List getProviders();", "@GET\n @Produces({MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN})\n public String getAvailableDatabaseDrivers() {\n final Enumeration<Driver> loadedDrivers = DriverManager.getDrivers();\n final List<String> drivers = new ArrayList<>();\n while (loadedDrivers.hasMoreElements()) {\n Driver driver = loadedDrivers.nextElement();\n drivers.add(driver.getClass().getCanonicalName());\n }\n final DriversDTO driversDTO = DtoFactory.getInstance().createDto(DriversDTO.class).withDrivers(drivers);\n final String msg = DtoFactory.getInstance().toJson(driversDTO);\n LOG.debug(msg);\n return msg;\n }", "public String showAvailableExternalSystem() {\n int counter = 1;\n StringBuilder systems = new StringBuilder();\n\n for (String systemName : externalSystemsAvailable) {\n systems.append(counter + \". \" + systemName + \"\\n\");\n }\n\n systems.setLength(systems.length() - 1);\n return systems.toString();\n }", "@Override\n\tpublic Set<Book> getAvailableBooks() {\n\t\treturn null;\n\t}", "public String[] getSupportedServiceNames()\n {\n return getServiceNames();\n }", "public String[] getOffers() {return offers;}", "String[] getAvailableTags();", "public List<String> getExts() {\n return this.exts;\n }", "public Karyotype[] getAvailableKaryotypes() throws ProjectDataAccessException\r\n {\r\n try\r\n {\r\n loadKaryotypes();\r\n return allKaryotypes;\r\n }\r\n catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n return new Karyotype[0];\r\n }", "public SortedSet<String> getAvailableDataSets() {\n if (allAvailableDataSets == null) {\n allAvailableDataSets = new TreeSet<String>();\n\n try {\n List<String> dataTypeList = new ArrayList<String>();\n dataTypeList.add(dataType);\n allAvailableDataSets.addAll(DataDeliveryHandlers\n .getDataSetNameHandler().getByDataTypes(dataTypeList));\n } catch (RegistryHandlerException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to retrieve the dataset list.\", e);\n }\n }\n\n return allAvailableDataSets;\n }", "java.util.List<com.google.cloud.channel.v1.PurchasableOffer> \n getPurchasableOffersList();", "public String getVersionsSupported();", "public List<String> getAllEnabledCourierCode();", "public static Suite[] getSuites() {\n return Native.getSuiteList();\n }", "@ZAttr(id=364)\n public String[] getAvailableSkin() {\n return getMultiAttr(Provisioning.A_zimbraAvailableSkin);\n }", "public int getEngines() {\n return engines;\n }", "public List<Item> getAllItemsAvailable();", "public String[] showStock() {\n \tString[] stock = new String[5];\n \tstock[0] = Integer.toString(this.getId());\n \tstock[1] = this.getName();\n \tstock[2] = Integer.toString(this.getAvailableNumber());\n \tstock[3] = Double.toString(this.getBuyPrice().getAmount());\n \tstock[4] = Double.toString(this.getSellPrice().getAmount());\n \treturn stock;\n }", "public static ArrayList<FamilyType> getAvailableFamilies() {\n ArrayList<FamilyType> allFamilies = new ArrayList<FamilyType>();\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n FamilyType type = PartNameTools.getFamilyTypeFromFamilyName(partFamily);\n if (type != null) allFamilies.add(type);\n }\n\n return allFamilies;\n }", "public String[] getAvailableGovernors() {\n\t\t\tif (mAvailableGovernors == null) {\n\t\t\t\tList<String> list = ShellHelper.cat(\n\t\t\t\t\tmRoot.getAbsolutePath() + AVAILABLE_GOVERNERS);\n\t\t\t\tif (list == null || list.isEmpty()) return null;\n\t\t\t\tmAvailableGovernors = list.get(0).split(\"\\\\s+\");\n\t\t\t}\n\t\t\treturn mAvailableGovernors;\n\t\t}", "public Product[] getConsumerVisibleProducts () {\n return null;\n }", "public ArrayList<String> DFGetProviderList() {\n return DFGetAllProvidersOf(\"\");\n }", "public Set<String> getSupportedExtensions() {\n\t\tLogger.i(TAG, \"getSupportedExtensions value \" + extensions);\n\t\treturn extensions;\n\t}", "private CharSequence[] getSelections() {\n BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();\n if (null != btAdapter) {\n int idx = 0;\n Set<BluetoothDevice> setDevices = btAdapter.getBondedDevices();\n CharSequence[] entries = new CharSequence[setDevices.size() + 1];\n entries[idx++] = NONE;\n\n for (BluetoothDevice btd : setDevices) {\n entries[idx++] = btd.getName();\n }\n\n // tell bluetooth to stop scanning. it's a power issue\n btAdapter.cancelDiscovery();\n return entries;\n }\n\n CharSequence[] entries = new CharSequence[1];\n entries[0] = NONE;\n return entries;\n }", "public SortedSet<String> getAvailableParameters() {\n if (allAvailableParameters == null) {\n allAvailableParameters = new TreeSet<String>();\n\n try {\n List<String> dataTypeList = new ArrayList<String>();\n dataTypeList.add(dataType);\n Set<String> parameters = DataDeliveryHandlers\n .getParameterHandler()\n .getNamesByDataTypes(dataTypeList);\n if (parameters != null) {\n allAvailableParameters.addAll(parameters);\n }\n } catch (RegistryHandlerException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to retrieve the parameter list.\", e);\n }\n }\n return allAvailableParameters;\n }", "public List getSupportedLocales() {\n\n return (supportedLocales);\n\n }", "Set<String> listCapabilities();", "public Iterator getSupportedMechanismTypes() {\n if (mechanisms == null) {\n mechanisms = new Vector(1);\n mechanisms.add(Constants.AXIS_SAX);\n }\n return mechanisms.iterator();\n }", "public java.util.List<BrokerEBSVolumeInfo> getTargetBrokerEBSVolumeInfo() {\n return targetBrokerEBSVolumeInfo;\n }", "protected Set<Integer> getInnovations() {\n\t\treturn genes.keySet();\n\t}", "public static String[] getVendors() throws Exception {\n\n return DBMSSocket.getVendors();\n }", "int getInstrumentCount();", "@Override\r\n\tpublic List<ManufacturersVO> k_getAll() {\n\t\treturn null;\r\n\t}", "public String[] getAvailableSpelunkerDat()\n {\n return super.getAvailableDatList();\n }", "public static List<String> getSupportedGraphics()\n {\n List<String> graphics = new ArrayList<String>();\n graphics.addAll(getTacGrpGraphics());\n graphics.addAll(getMetocGraphics());\n graphics.addAll(getEmsGraphics());\n return graphics;\n }", "public List<String> supportedProtocols()\r\n/* 69: */ {\r\n/* 70:162 */ return this.supportedProtocols;\r\n/* 71: */ }", "public String getLinphoneSpecs();", "Collection<String> getAllSupportedCurrenciesByShops();", "public Collection<Integer> getIncludedTransportTypes();", "public List<Instance> getSamples(){\n\t\treturn arrIns;\n\t}", "public static ArrayList<String> getAvailableParts() {\n ArrayList<String> allParts = new ArrayList<String>();\n String pattern = \"_db.dat\";\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part files exist. Please run \" +\n Installer.class.getCanonicalName() + \" to create part files.\");\n }\n for (String partFamily : dir.list()) {\n File partDir = new File(dir.getAbsolutePath() + File.separator + partFamily);\n for (String part : partDir.list()) {\n if (part.endsWith(pattern)) {\n allParts.add(part.replace(pattern, \"\"));\n }\n }\n }\n return allParts;\n }", "public List<TemplateAvailabilityProvider> getProviders()\n/* */ {\n/* 107 */ return this.providers;\n/* */ }", "public CopyOnWriteArrayList<Instruments> getArrInstruments(){\n\t\t\treturn this.containerOfInstruments;\n\t\t}", "public List<HealthInspectorsInfo> availableInspectors() {\n return INSPECTORS.stream().map(HealthInspectorsInfo::new).collect(Collectors.toList());\n }", "public Collection<Resolver> getSupports() {\r\n return Collections.unmodifiableCollection(supports);\r\n }", "public String[] getOIDs()\n {\n return SUPPORTED_OIDS;\n }", "List<ResourceSkuCapabilities> capabilities();", "public Class[] getAdapterList() {\n \t\treturn new Class[] { IWorkbenchAdapter.class, IPropertySource.class,\n \t\t\t\tIDeferredWorkbenchAdapter.class, IHistoryPageSource.class,\n \t\t\t\tISynchronizationCompareAdapter.class, ITeamStateProvider.class };\n \t}", "public Integer[] getExchangeIndicies() {\n return exchangeIndicies;\n }", "public IInstallableUnit[] getSelectedIUs() {\n \t\treturn super.getSelectedIUs();\n \t}", "public Collection<String> getProvideFeature();", "public Collection<Long> getAvailableItems();", "List<CmdType> getSupportedTypes();", "protected PayloadBuilderSet[] getPayloadBuilderSets() {\n\t\treturn sets;\n\t}", "public edu.umich.icpsr.ddi.SoftwareType[] getSoftwareArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n java.util.List targetList = new java.util.ArrayList();\n get_store().find_all_element_users(SOFTWARE$20, targetList);\n edu.umich.icpsr.ddi.SoftwareType[] result = new edu.umich.icpsr.ddi.SoftwareType[targetList.size()];\n targetList.toArray(result);\n return result;\n }\n }", "public ArrayList<Tour_Guide> guidesAvailable() {\n ArrayList<Tour_Guide> avGuide = new ArrayList<>();\n for (int i = 0; i < Guide.size(); i++) {\n if (Guide.get(i).getAvailable() == true) {\n avGuide.add(Guide.get(i));\n }\n }\n return avGuide;\n }", "@Override public ArrayList<Sample> getAllSamples()\n {\n try\n {\n return clientDoctor.getAllSamples();\n }\n catch (RemoteException e)\n {\n throw new RuntimeException(\"Error while fetching all samples. Please try again.\");\n }\n }", "String getInterfaces();", "java.util.List<com.message.EquipmentProto.PlayerEquipmentMsg> \n getListPlayerEquipmentsList();", "public Collection<String> listDevices();", "public List<Equipment> getEquipments() {\n return equipments;\n }", "public synchronized static Set<String> getAvailableTypes() {\n populateCache();\n return Collections.unmodifiableSet(cache.keySet());\n }", "public static Set<String> getSupportedProtocols() {\n return SUPPORTED_PROTOCOLS;\n }", "public List<BandSpecSelection> getBandSpecSelection(Receiver receiver) {\n int active = Integer.parseInt(getBandMode());\n double[] currentBandwidths = new double[active];\n int[] currentChannels = new int[active];\n for (int j = 0; j < active; j ++) {\n currentBandwidths[j] = getBandWidth(j);\n currentChannels[j] = getChannels(j);\n }\n\n return getBandSpecSelection(receiver, currentBandwidths, currentChannels);\n }", "public Collection<InstrumentationComponent> getInstrumentationComponents() {\n return Collections.unmodifiableCollection(instruComps);\n }", "public static List<CodecInfo> getSupportedCodecs()\n {\n return Collections.unmodifiableList(codecs);\n }", "public String printPlayerEquipment() {\r\n\t\t\treturn this.getPlayer().presentEquippedItems();\r\n\t\t}", "Collection<? extends Equipment> getUses();", "public Transports getTransportsUsed();", "public Set<Speaker<? extends E>> getSpeakers();", "String[] supportedKeys();" ]
[ "0.71942943", "0.6272582", "0.5928147", "0.57958984", "0.5680526", "0.56732565", "0.56196827", "0.56117517", "0.5583307", "0.55558157", "0.5553754", "0.54522026", "0.5445534", "0.5428974", "0.542217", "0.53756285", "0.5351038", "0.5282325", "0.52492857", "0.5229485", "0.52184975", "0.52119756", "0.51984537", "0.5172415", "0.51363486", "0.5131088", "0.5114001", "0.51127195", "0.51009333", "0.50950134", "0.509049", "0.5082841", "0.5082113", "0.50808036", "0.5076124", "0.507006", "0.5069615", "0.50631905", "0.5038043", "0.5019315", "0.5017361", "0.5009184", "0.50042486", "0.5002505", "0.49850816", "0.4981126", "0.4967695", "0.49527347", "0.49481112", "0.4943004", "0.49394366", "0.493908", "0.4933342", "0.4931785", "0.49277732", "0.49272674", "0.49212074", "0.4920834", "0.49166992", "0.49160236", "0.48899752", "0.48787004", "0.48543057", "0.48511702", "0.48481488", "0.48476022", "0.48473534", "0.48424527", "0.4839907", "0.48345283", "0.48328993", "0.48155522", "0.48114192", "0.479789", "0.47968495", "0.47914723", "0.47883505", "0.47872332", "0.47798735", "0.4779805", "0.47781947", "0.4777796", "0.47701943", "0.47680616", "0.47670883", "0.4766776", "0.47602084", "0.47598687", "0.47440723", "0.47439045", "0.47433683", "0.4742212", "0.4740578", "0.4736474", "0.47341424", "0.47205433", "0.47140875", "0.4713801", "0.4711417", "0.47058985" ]
0.61764896
2
Gets the supplied instrument info to the database.
public InstrumentInfo getInstrumentInfo(BrokerID brokerID, Instrument instrument) throws PersistenceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "T getInstrument(String ticker) throws DaoException, InstrumentNotFoundException;", "HashMap<String, Instrument> getInstruments();", "public Instrument getInstrument()\n {\n return instrument;\n }", "public InstrumentDescription getInstrument();", "public interface InstrumentRepository {\n\n /**\n * Returns instrument object by its vendor code.\n *\n * @param vendorCode vendor code of necessary instrument\n * @return instrument object\n */\n Instrument getInstrument(String vendorCode);\n\n /**\n * Returns instruments map from data source.\n *\n * @return instruments map\n */\n HashMap<String, Instrument> getInstruments();\n\n /**\n * Adds new instrument to data source.\n *\n * @param vendorCode vendor code of new instrument\n * @param instrument new instrument object\n */\n void putInstrument(String vendorCode, Instrument instrument);\n\n /**\n * Returns instruments count from instrument source.\n *\n * @return instruments count\n */\n int getInstrumentCount();\n}", "IrpSignInfo selectByPrimaryKey(Long signinfoid) throws SQLException;", "public interface InstrumentDao<T extends Instrument> {\r\n\r\n /**\r\n * Persists a given instrument\r\n *\r\n * @param instrument\r\n * Instrument to save, this can be stock, fx or any other financial instrument\r\n *\r\n * @return boolean if saved successfully\r\n *\r\n * @throws DaoException\r\n * in case of any connection issues or cache issues (if it is stored in memory)\r\n **/\r\n boolean saveInstrument(T instrument) throws DaoException;\r\n\r\n /**\r\n * Delete a given instrument\r\n *\r\n * @param instrument\r\n * Instrument to delete, this can be stock, fx or any other financial instrument\r\n *\r\n * @return boolean if removed successfully\r\n *\r\n * @throws DaoException\r\n * in case of any connection issues or cache issues (if it is stored in memory)\r\n *\r\n * @throws InstrumentNotFoundException\r\n * if the given instrument is not found\r\n **/\r\n boolean deleteInstrument(T instrument) throws DaoException, InstrumentNotFoundException;\r\n\r\n\r\n /**\r\n * Find a instrument for given ticker\r\n *\r\n * @param ticker\r\n * Instrument to find, this can be stock, fx or any other financial instrument\r\n *\r\n * @return T if found\r\n *\r\n * @throws DaoException\r\n * in case of any connection issues or cache issues (if it is stored in memory)\r\n *\r\n * @throws InstrumentNotFoundException\r\n * if the given instrument is not found\r\n **/\r\n T getInstrument(String ticker) throws DaoException, InstrumentNotFoundException;\r\n\r\n\r\n /**\r\n * Find all instruments\r\n *\r\n * @return List if found\r\n *\r\n * @throws DaoException\r\n * in case of any connection issues or cache issues (if it is stored in memory)\r\n *\r\n * @throws InstrumentNotFoundException\r\n * if the given instrument is not found\r\n **/\r\n List<T> getInstruments() throws DaoException, InstrumentNotFoundException;\r\n}", "ac_teacher_instrument selectByPrimaryKey(Integer acTeacherInstrumentId);", "public ResultSet getItemInfo(int ino) throws IllegalStateException{\n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n\t try {\n\t\t con = openDBConnection();\n\t String queryString = \"SELECT * \" \n \t\t+ \"FROM ITEM \"\n\t\t\t + \" where INUMBER = '\"+ino+\"'\";\n\t stmt = con.createStatement();\n\t result = stmt.executeQuery(queryString);\n\t } catch (Exception e) {\n\t\t e.printStackTrace();\n\t }\n\t return result;\n}", "public Long getInstrumentId() {\n\t\treturn instrumentId;\n\t}", "public ReturnData queryEncounterForinfo(){\n ReturnData returnData = new ReturnData();\n String [] jsids = {\"03034a63-e8d6-49a4-8e71-58a544b8fca3\",\n \"1ae3709f-d8c2-4db8-9f38-1a60fb0d2e61\",\n \"7340479a-28fc-44b6-bf18-374f037d5f03\",\n \"e1e5f378-b16f-441e-b673-0f0d2544d108\"};\n try {\n returnData.setData(jueseMapper.selectByPrimaryKey(jsids[MyUuid.getRandomInt(jsids.length)-1]));\n }catch (Exception e){\n returnData.setCode(-1);\n returnData.setData(e.getMessage());\n }finally {\n return returnData;\n }\n }", "public Insurance getInsurance(Integer id) throws DataAccessException;", "@GET\r\n @Path(\"/{id}\")\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public Tool getInstrument(@PathParam(\"id\") Integer id) {\r\n return dao.findById(id);\r\n }", "boolean saveInstrument(T instrument) throws DaoException;", "Instrument getInstrument(String vendorCode);", "public int getInfo(int i) {\n\t\treturn storeInfo.get(i);\n\t}", "public void setInstrumentInfo(BrokerID brokerID, Instrument instrument, InstrumentInfo info)\r\n \t\tthrows PersistenceException;", "public Object getInstrument() {\n\t\treturn null;\r\n\t}", "public List<String> getInstruments() {\n\t\tif (instruments == null || instruments.isEmpty())\n\t\t\tinstruments = getInstrumentsFromMiapes();\n\t\tif (instruments != null) {\n\t\t\tfinal List<String> ret = new ArrayList<String>();\n\t\t\tfor (final String instrument : instruments) {\n\t\t\t\tret.add(ProteomeXchangeFilev2_1.MTD + TAB + \"instrument\" + TAB + instrument);\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t\treturn null;\n\t}", "protected String getInstrumentName() {\n\t\treturn this.instrument;\n\t}", "public abstract StoreInfo getInfo();", "PatientInfo getPatientInfo(int patientId);", "@Override\n @Transactional\n public Patient selectPatientByInsurance(String insuranceNumber) {\n return patientDAO.getByInsuranceNumber(insuranceNumber);\n }", "public String info() {\n\t\t\tString instrumentsString = \" \";\n\t\t\tfor(Instruments i : Instruments.values()){\n\t\t\t\tinstrumentsString +=i.toString() + \"\\n\";\n\t\t\t}\n\t\t\treturn (\"База данных представляет из себя набор старцев(обьектов Olders),\" +\"\\n\"+\n \"каждый из которых имеет поля :\" +\"\\n\"+\n \"id(уникальный идентификатор)\" +\"\\n\"+\n \"name(имя старца)\" +\"\\n\"+\n \"userid(уникальный идентификатор пользователя, который является его владельцем)\" +\"\\n\"+\n \"dateofinit-дата инициализация старца\");\n\t\t}", "@Override\n\tpublic Record findByInsititutionName(String institution) {\n\t\treturn Db.findFirst(\"select *from institution_info where institution_name = '\"+institution+\"'\");\n\t}", "private String[] getInstrumentIds(){\n logger.info(\"Getting Instruments from cache\");\n return instruments.keySet().toArray(new String[instruments.size()]);\n }", "@Override\r\n\tpublic Instrument getInstrument() {\n\t\treturn null;\r\n\t}", "public String getInstrumentType() {\n return instrumentType;\n }", "private void getInfo() {\n mDatabaseReference.child(studentID).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n\n student = dataSnapshot.getValue(Student.class);\n student.setStuID(dataSnapshot.getKey().toString());\n bus.setID(dataSnapshot.child(\"busID\").getValue().toString());\n busStop.setBusStopID(dataSnapshot.child(\"busID\").getValue().toString());\n parent.setPatentID(dataSnapshot.child(\"parentID\").getValue().toString());\n getBusList();\n showInfo();\n } else {\n progressBar.dismiss();\n Toast.makeText(getActivity(), R.string.error_database, Toast.LENGTH_SHORT).show();\n }\n }\n\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n if (databaseError != null) {\n Toast.makeText(getActivity(), R.string.error_database, Toast.LENGTH_SHORT).show();\n }\n\n }\n });\n\n }", "Information getInfo();", "ParticipantVisit getSampleInfo(Container studyContainer, User user, String globalUniqueId) throws SQLException;", "private ObStation getStationInfo(String icao) {\n ObStation station = null;\n ObStationDao dao = new ObStationDao();\n if (dao != null) {\n try {\n station = dao.queryByIcao(icao);\n } catch (Exception e) {\n statusHandler.handle(Priority.ERROR, icao\n + \" -Could not create datauri in getStationInfo() \", e);\n }\n }\n\n return station;\n }", "List<IrpSignInfo> selectByExample(IrpSignInfoExample example)\r\n\t\t\tthrows SQLException;", "public ResultSet getAllInterDetails(){\n ResultSet rst = null;\n\n\n try {\n String select = \"SELECT * FROM interruption\";\n Statement selectstmt = conn.createStatement();\n rst = selectstmt.executeQuery(select);\n\n\n }catch (Exception e){\n System.out.println(e);\n }\n return rst;\n }", "public Set<Instrument> getInstruments(BrokerID brokerID)\r\n \t\tthrows PersistenceException;", "@Override\n public List<Information> findAllInfo() {\n return infoDao.findAll();\n }", "public void ajouter(Instrument i){\n\n }", "@Override\n\tpublic AnnotationInfo fetchByPrimaryKey(Serializable primaryKey)\n\t\tthrows SystemException {\n\t\treturn fetchByPrimaryKey(((Long)primaryKey).longValue());\n\t}", "void putInstrument(String vendorCode, Instrument instrument);", "public Instrument getPrideInstrument() {\n\n \n return prideInstrument;\n\n }", "public ResultSet getItemInfo() throws SQLException {\n\t\tConnection con = openDBConnection();\n\t\tStatement stmt = con.createStatement();\n\t\t/** Proceeds if user is logged in */\n\t\tString queryString = \"Select * From team1.GABES_ITEM i Where i.ITEM_ID='\"\n\t\t\t\t+ this.item_id + \"'\";\n\t\tResultSet result = stmt.executeQuery(queryString);\n\t\treturn result;\n\t}", "io.dstore.engine.MetaInformation getMetaInformation(int index);", "io.dstore.engine.MetaInformation getMetaInformation(int index);", "io.dstore.engine.MetaInformation getMetaInformation(int index);", "io.dstore.engine.MetaInformation getMetaInformation(int index);", "io.dstore.engine.MetaInformation getMetaInformation(int index);", "public interface InstrumentedTransaction extends Transaction, UserDataStorage, DataSourceMember {\n\n /**\n * Returns a unique identifier for this transaction.\n */\n String getTransactionId();\n\n /**\n * Returns the metadata-aware ConnectionProvider that is being used for connections that resulted in this\n * transaction.\n */\n InstrumentedConnectionProvider getConnectionProvider();\n\n /**\n * Returns the timestamp when this transaction began, in nanoseconds since the Unix epoch. If this transaction\n * has not yet begun (from the perspective of the database server), then this method will return zero.\n */\n long getOpenedTimestampNanos();\n\n /**\n * Returns the duration in milliseconds that this transaction has been active. If the transaction object has been\n * created but the transaction has not yet begun, then this method will return <code>-1</code>.\n */\n long getDurationNanos();\n\n /**\n * Returns the Connection currently associated with this Transaction, if one has been leased already. If there is no\n * connection attached and connected, then this method will return <code>null</code> rather than forcing the\n * acquisition of one now.\n */\n InstrumentedConnection getConnection();\n\n /**\n * Attaches a single transaction listener instance to this transaction. Whenever this transaction performs any\n * operations, it will invoke callbacks on any attached listeners.\n */\n void addTransactionListener(TransactionListener listener);\n\n /**\n * Returns the optional user data object that may have been attached to this transaction.\n */\n Object getUserData();\n\n /**\n * Attaches a custom user data object to this transaction. This user data object will be removed automatically as\n * soon as the transaction is finished.\n */\n void setUserData(Object userData);\n}", "public String getInsuranceDetails(String dataSet,String centreAcc){\n\t\tDbFunctions dbfunc = new DbFunctions();\n\t\treturn (dbfunc.getInsuranceDetails(dataSet, centreAcc));\n\t\t/*String month= dbfunc.monthYear();\n\t\t\n\t\ttry{\n\t\t\tClass.forName(\"sun.jdbc.odbc.JdbcOdbcDriver\"); \n\t\t\ttestConnection = DriverManager.getConnection(\"jdbc:odbc:Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};\"\n\t\t\t\t\t+ \"DBQ=\"+ EnvironmentSetup.strDataSheetPath + \";readOnly=false\");\n\t\t\tQueryStatement = EnvironmentSetup.dBConnection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n\t\t\tstrQuery = \"SELECT PrimaryInsuranceCo,PrimarySponsorName,InsurancePlanType,InsurancePlanName from TestData where DataSet = '\" + dataSet + \"'\";\n\t\t\t\n\t\t\ttestResultSet = QueryStatement.executeQuery(strQuery);\n\t\t\ttestResultSet.beforeFirst();\n\t\t\tString PrimaryInsuranceCo =\"\";\n String PrimarySponsorName=\"\";\n String InsurancePlanType=\"\";\n String InsurancePlanName=\"\";\n \n\t\t\twhile (testResultSet.next()){\n\t\t\t\t\n PrimaryInsuranceCo =testResultSet.getString(\"PrimaryInsuranceCo\");\n PrimarySponsorName =testResultSet.getString(\"PrimarySponsorName\");\n InsurancePlanType= testResultSet.getString(\"InsurancePlanType\");\n InsurancePlanName=testResultSet.getString(\"InsurancePlanName\");\n // getInsuranceDetails.put(PrimaryInsuranceCo,PrimarySponsorName,InsurancePlanType,InsurancePlanName);\n //downloadedFile = PrimaryInsuranceCo+ \"-\" +PrimarySponsorName+\"-All-\"+month+\"-\"+InsurancePlanType+\"-\"+InsurancePlanName+\"- Account Group -\"+centreAcc;\n downloadedFile = PrimaryInsuranceCo+ \"-\" +PrimarySponsorName+\"-All-\"+month+\"-\"+InsurancePlanType+\"-\"+InsurancePlanName+centreAcc;\n \t\t\n break;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception ex){\n\t\t\tex.printStackTrace();\n\t\t\tEnvironmentSetup.logger.info(\"Executing Query on Objects: \" + ex.toString());\n\t\t} finally{\n\t\t\ttry {\n\t\t\t\ttestResultSet.close();\t\t\n\t\t\t\ttestResultSet = null;\n\t\t\t} catch (SQLException e) {\n\t\t\t\t//TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\t\t\t\t\t\t\n\t\t}\n\t\t//DAMAN-National Health Insurance Company-National Health Insurance Company (DAMAN)-ALL-March2017-DAMAN - NW1-DAMAN - NW1 - GLO. (C0,D0,Dn100,Ch0)- Account Group -Pharmacy\n\t\tSystem.out.println(downloadedFile);\n\t\treturn downloadedFile;*/\n\t\t\n\t\t}", "public MyInfo getMyInfo() {\n\t\t\n\t\tMyInfo myInfo = null;\n\t\ttry {\n\t\t\tjava.sql.PreparedStatement ps = ((org.inria.jdbc.Connection) db).prepareStatement(TCell_QEP_IDs.QEP.EP_getMyInfo);\n\t\t\tResultSet rs = ps.executeQuery();\n\n\t\t\tString query = \"SELECT IdGlobal, MYTCELLIP, MYTCELLPORT, MYPUBLICKEY, MYPRIVATEKEY FROM MyInfo\";\n\t\t\tSystem.out.println(\"Executing query : \" + query);\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tint myGid = rs.getInt(1);\n\t\t\t\tString myTcellIp = rs.getString(2);\n\t\t\t\tint myTcellPort = rs.getInt(3);\n\t\t\t\t\n\t\t\t\t//convert Blob to String\n\t\t\t\tBlob myPubKeyBlob = rs.getBlob(4);\n\t\t\t\tbyte[] bPubKey = myPubKeyBlob.getBytes(1, (int) myPubKeyBlob.length());\n\t\t\t\tString myPubKey = new String(bPubKey);\n\t\t\t\t\n\t\t\t\t//convert Blob to String\n\t\t\t\tBlob myPrivKeyBlob = rs.getBlob(5);\n\t\t\t\tbyte[] bPrivKey = myPrivKeyBlob.getBytes(1, (int) myPrivKeyBlob.length());\n\t\t\t\tString myPrivKey = new String(bPrivKey);\n\t\t\t\t\n\t\t\t\tmyInfo = new MyInfo(myGid, myTcellIp, myTcellPort, myPubKey, myPrivKey);\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t// Uncomment when the close function will be implemented\n\t\t\t// attemptToClose(ps);\n\t\t}\n\n\t\treturn myInfo;\n\t}", "AlipayInfo selectByPrimaryKey(String id);", "@Override\n public DataFrame read(TransactionContext context) {\n if (incidents == null) {\n\n if (StringUtil.isNotBlank(getConfiguration().getString(GROUP))) {\n List<SnowSprint> sprints = getSprintsByGroup(getConfiguration().getString(GROUP));\n for (SnowSprint sprint : sprints) {\n if (sprint.isCurrent()) {\n Log.notice(\"Current sprint \" + sprint.getShortDescription() + \" (\" + sprint.getScheduledStartDate() + \" - \" + sprint.getScheduledEndDate() + \")\");\n sprintStart = sprint.getScheduledStartDate();\n break;\n }\n }\n } else {\n Log.notice(\"No group (team) was specified, using the default interval for 'new' incidents.\");\n }\n\n if (sprintStart == null) sprintStart = new SnowDateTime(new Date(getContext().getStartTime() - ONE_DAY));\n\n try {\n getResource().setPath(\"incident.do?JSONv2&sysparm_query=\" + filter.toEncodedString());\n } catch (URISyntaxException e) {\n e.printStackTrace();\n }\n\n\n incidents = new ArrayList<>();\n for (DataFrame frame = super.read(context); frame != null; frame = super.read(context)) {\n try {\n incidents.add(new SnowIncident(frame));\n } catch (SnowException e) {\n Log.error(\"Received invalid data at record #\" + (incidents.size() + 1) + \": \" + e.getMessage(), e);\n }\n }\n Log.debug(\"...read in \" + incidents.size() + \" incidents.\");\n\n // replace the dataframes with our metrics\n dataframes = generateMetrics(incidents);\n context.setLastFrame(false);\n }\n return super.read(context); // start returning all the replaced dataframes\n }", "StudentInfo selectByPrimaryKey(Integer id);", "public static void getSurveyDetails(String surveyfile, String surveytype) throws SQLException{\n\t\t DBConnect2.run(surveyfile,surveytype);\n\t }", "public void getDataFromDatabase(){\r\n\t \tArrayList<Object> row = HomeActivity.dbPrograms.getDetail(SelectedID);\r\n\t \t\r\n\t\t\t// store data to variables\r\n\t \tProgramID = Integer.parseInt(row.get(0).toString());\r\n\t \tWorkoutID = Integer.parseInt(row.get(1).toString());\r\n\t \tName = row.get(2).toString();\r\n\t \tSelectedDayID = Integer.parseInt(row.get(3).toString());\r\n\t \tImage = row.get(4).toString();\r\n\t \tTime = row.get(5).toString().trim();\r\n\t \tSteps = row.get(6).toString();\r\n\t \t\r\n\t }", "public void getEventDetails() {\r\n\t\t// Query DB to get specific event information based on EventID.\r\n\t}", "int insert(ac_teacher_instrument record);", "public interface PriceListenerContext {\n\n Instrument getInstrument(String instrumentId);\n\n}", "void getExistingStationDetails(MrnStation tStation, int i) {\n // find out the existing station details for the report\n // check if also within a date-time range\n\n Timestamp tmpSpldattim = null;\n if (dataType == CURRENTS) {\n tmpSpldattim = currents.getSpldattim();\n } else if (dataType == SEDIMENT) {\n tmpSpldattim = sedphy.getSpldattim();\n } else if ((dataType == WATER) || (dataType == WATERWOD)) {\n tmpSpldattim = watphy.getSpldattim();\n } // if (dataType == CURRENTS)\n\n // find the date range for this station\n java.util.GregorianCalendar calDate = new java.util.GregorianCalendar();\n calDate.setTime(tmpSpldattim); //Timestamp.valueOf(startDateTime));\n\n calDate.add(java.util.Calendar.MINUTE, -timeRangeVal);\n Timestamp dateTimeMinTs = new Timestamp(calDate.getTime().getTime());\n\n calDate.add(java.util.Calendar.MINUTE, timeRangeVal*2);\n Timestamp dateTimeMaxTs = new Timestamp(calDate.getTime().getTime());\n\n if (dbg) System.out.println(\"<br><br>getExistingStationDetails: \" +\n \"dateTimeMinTs = \" + dateTimeMinTs);\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"dateTimeMaxTs = \" + dateTimeMaxTs);\n\n //if (dbg) System.out.println(\"<br>checkStationExists: in loop: \" +\n // \"tStation[i] = \" + tStation[i]);\n\n String where = \"STATION_ID='\" + tStation.getStationId() + \"'\";\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"data where = \" + where);\n String order = \"SUBDES\";\n\n String prevSubdes = \"\";\n int k = 0;\n\n //\n // are there any currents records for this station\n //------------------------------------------------\n tCurrents = new MrnCurrents().get(\"*\", where, order);\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"tCurrents.length = \" + tCurrents.length);\n\n for (int j = 0; j < tCurrents.length; j++) {\n\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"tCurrents[j].getSpldattim() = \" +\n tCurrents[j].getSpldattim());\n\n // only found if station_id's the same or also within date-time range\n if (tCurrents[j].getStationId().equals(station.getStationId()) ||\n (dateTimeMinTs.before(tCurrents[j].getSpldattim()) &&\n tCurrents[j].getSpldattim().before(dateTimeMaxTs))) {\n// if (dateTimeMinTs.before(tCurrents[j].getSpldattim()) &&\n// tCurrents[j].getSpldattim().before(dateTimeMaxTs)) {\n\n stationExists = true;\n stationExistsArray[i] = true;\n spldattimArray[i] = tCurrents[j].getSpldattim(\"\");\n currentsRecordCountArray[i]++;\n\n if (dataType == CURRENTS) {\n dataExists = true;\n\n // get the min and max depth\n if (tCurrents[j].getSpldep() < loadedDepthMin[i]) {\n loadedDepthMin[i] = tCurrents[j].getSpldep();\n } // if (tWaphy.getSpldep() < depthMin)\n if (tCurrents[j].getSpldep() > loadedDepthMax[i]) {\n loadedDepthMax[i] = tCurrents[j].getSpldep();\n } // if (tWaphy.getSpldep() < depthMin)\n\n // is it the same subdes ?\n if (dbg) System.out.println(\n \"<br>getExistingStationDetails: subdes = \" + subdes +\n \", currents.getSubdes() = \" + currents.getSubdes(\"\"));\n //if (tCurrents[j].getSubdes(\"\").equals(subdes)) {\n if (tCurrents[j].getSubdes(\"\").equals(currents.getSubdes(\"\"))) {\n subdesCount[i]++;\n } // if (tCurrents[j].getSubdes(\"\").equals(currents.getSubdes(\"\"))\n\n if (!prevSubdes.equals(tCurrents[j].getSubdes(\"\"))) {\n subdesArray[i][k] = tCurrents[j].getSubdes(\"\");\n if (\"\".equals(subdesArray[i][k])) subdesArray[i][k] = \"none\";\n if (dbg) {\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"k = \" + k);\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"prevSubdes = \" + prevSubdes);\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"tCurrents[j].getSubdes() = \" +\n tCurrents[j].getSubdes(\"\"));\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"subdesArray[i][k] = \" + subdesArray[i][k]);\n } // if (dbg)\n k++;\n } // if (!prevSubdes.equals(subdesArray[i][k])\n\n prevSubdes = tCurrents[j].getSubdes(\"\");\n\n } // if (dataType == CURRENTS)\n\n } // if (dateTimeMinTs.before(tCurrents[j].getSpldattim()) ...\n\n } // for (int j = 0; j < tCurrents.length; j++)\n\n //\n // are there any sedphy records for this station\n //------------------------------------------------\n tSedphy = new MrnSedphy().get(\"*\", where, order);\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"tSedphy.length = \" + tSedphy.length);\n\n for (int j = 0; j < tSedphy.length; j++) {\n\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"tSedphy[j].getSpldattim() = \" + tSedphy[j].getSpldattim());\n\n // only found if station_id's the same or also within date-time range\n if (tSedphy[j].getStationId().equals(station.getStationId()) ||\n (dateTimeMinTs.before(tSedphy[j].getSpldattim()) &&\n tSedphy[j].getSpldattim().before(dateTimeMaxTs))) {\n// if (dateTimeMinTs.before(tSedphy[j].getSpldattim()) &&\n// tSedphy[j].getSpldattim().before(dateTimeMaxTs)) {\n\n stationExists = true;\n stationExistsArray[i] = true;\n spldattimArray[i] = tSedphy[j].getSpldattim(\"\");\n sedphyRecordCountArray[i]++;\n\n if (dataType == SEDIMENT) {\n dataExists = true;\n\n // get the min and max depth\n if (tSedphy[j].getSpldep() < loadedDepthMin[i]) {\n loadedDepthMin[i] = tSedphy[j].getSpldep();\n } // if (tSedphy.getSpldep() < depthMin)\n if (tSedphy[j].getSpldep() > loadedDepthMax[i]) {\n loadedDepthMax[i] = tSedphy[j].getSpldep();\n } // if (tSedphy.getSpldep() < depthMin)\n\n // is it the same subdes ?\n if (dbg) System.out.println(\n \"<br>getExistingStationDetails: subdes = \" + subdes +\n \", sedphy.getSubdes() = \" + sedphy.getSubdes(\"\"));\n //if (tSedphy[j].getSubdes(\"\").equals(subdes)) {\n if (tSedphy[j].getSubdes(\"\").equals(sedphy.getSubdes(\"\"))) {\n subdesCount[i]++;\n } // if (tSedphy[j].getSubdes(\"\").equals(sedphy.getSubdes(\"\"))\n\n if (!prevSubdes.equals(tSedphy[j].getSubdes(\"\"))) {\n subdesArray[i][k] = tSedphy[j].getSubdes(\"\");\n if (\"\".equals(subdesArray[i][k])) subdesArray[i][k] = \"none\";\n if (dbg) {\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"k = \" + k);\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"prevSubdes = \" + prevSubdes);\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"tSedphy[j].getSubdes() = \" +\n tSedphy[j].getSubdes(\"\"));\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"subdesArray[i][k] = \" + subdesArray[i][k]);\n } // if (dbg)\n k++;\n } // if (!prevSubdes.equals(subdesArray[i][k])\n\n prevSubdes = tSedphy[j].getSubdes(\"\");\n\n } // if (dataType == SEDIMENT)\n\n } // if (dateTimeMinTs.before(tSedphy[j].getSpldattim()) ...\n\n } // for (int j = 0; j < tSedphy.length; j++)\n\n //\n // are there any watphy records for this station\n //------------------------------------------------\n tWatphy = new MrnWatphy().get(\"*\", where, order);\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"tWatphy.length = \" + tWatphy.length);\n\n for (int j = 0; j < tWatphy.length; j++) {\n\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"tWatphy[j].getSpldattim() = \" + tWatphy[j].getSpldattim());\n\n // only found if station_id's the same or also within date-time range\n if (tWatphy[j].getStationId().equals(station.getStationId()) ||\n (dateTimeMinTs.before(tWatphy[j].getSpldattim()) &&\n tWatphy[j].getSpldattim().before(dateTimeMaxTs))) {\n// if (dateTimeMinTs.before(tWatphy[j].getSpldattim()) &&\n// tWatphy[j].getSpldattim().before(dateTimeMaxTs)) {\n\n stationExists = true;\n stationExistsArray[i] = true;\n spldattimArray[i] = tWatphy[j].getSpldattim(\"\");\n watphyRecordCountArray[i]++;\n\n if ((dataType == WATER) || (dataType == WATERWOD)) {\n dataExists = true;\n\n // get the min and max depth\n if (tWatphy[j].getSpldep() < loadedDepthMin[i]) {\n loadedDepthMin[i] = tWatphy[j].getSpldep();\n } // if (tWaphy.getSpldep() < depthMin)\n if (tWatphy[j].getSpldep() > loadedDepthMax[i]) {\n loadedDepthMax[i] = tWatphy[j].getSpldep();\n } // if (tWaphy.getSpldep() < depthMin)\n\n // is it the same subdes ?\n if (dbg) System.out.println(\n \"<br>getExistingStationDetails: subdes = \" + subdes +\n \", watphy.getSubdes() = \" + watphy.getSubdes(\"\"));\n //if (tWatphy[j].getSubdes(\"\").equals(subdes)) {\n if (tWatphy[j].getSubdes(\"\").equals(watphy.getSubdes(\"\"))) {\n subdesCount[i]++;\n } // if (tWatphy[j].getSubdes(\"\").equals(watphy.getSubdes(\"\"))\n\n if (!prevSubdes.equals(tWatphy[j].getSubdes(\"\"))) {\n subdesArray[i][k] = tWatphy[j].getSubdes(\"\");\n if (\"\".equals(subdesArray[i][k])) subdesArray[i][k] = \"none\";\n if (dbg) {\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"k = \" + k);\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"prevSubdes = \" + prevSubdes);\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"tWatphy[j].getSubdes() = \" +\n tWatphy[j].getSubdes(\"\"));\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"subdesArray[i][k] = \" + subdesArray[i][k]);\n } // if (dbg)\n k++;\n } // if (!prevSubdes.equals(subdesArray[i][k])\n\n prevSubdes = tWatphy[j].getSubdes(\"\");\n\n } // if ((dataType == WATER) || (dataType == WATERWOD))\n\n } // if (dateTimeMinTs.before(tWatphy[j].getSpldattim()) ...\n\n } // for (int j = 0; j < tWatphy.length; j++)\n\n }", "@Override\n public List<Trade> getStockTradeRecord(Stock stock, int minutes) {\n return this.tradeRepository.getTradeRecord(stock, minutes);\n }", "public void getSavedRecord(MealVoucherConfiguration mealVoucher) {\n\r\n\t\tString query = \" SELECT MEAL_CONFIG_CASH, MEAL_CONFIG_FREQUENCY, MEAL_CONFIG_COUPEN, MEAL_CONFIG_DEBIT \"\r\n\t\t\t\t+ \" ,CASH.CREDIT_NAME,COUPEN.CREDIT_NAME,DEBIT_NAME , \" +\r\n\t\t\t\t\" MEAL_CONFIG_FROM, MEAL_CONFIG_TO, MEAL_CONFIG_AMT_LIMIT, MEAL_CONFIG_AMT_DECLARE, MEAL_FROM_PERIOD, MEAL_TO_PERIOD \"\r\n\t\t\t\t+ \" FROM HRMS_MEAL_VOUCHER_CONFIG \"\r\n\t\t\t\t+ \" INNER JOIN HRMS_CREDIT_HEAD CASH ON(CASH.CREDIT_CODE=HRMS_MEAL_VOUCHER_CONFIG.MEAL_CONFIG_CASH) \"\r\n\t\t\t\t+ \" INNER JOIN HRMS_CREDIT_HEAD COUPEN ON(COUPEN.CREDIT_CODE=HRMS_MEAL_VOUCHER_CONFIG.MEAL_CONFIG_COUPEN) \"\r\n\t\t\t\t+ \" INNER JOIN HRMS_DEBIT_HEAD ON(HRMS_DEBIT_HEAD.DEBIT_CODE=HRMS_MEAL_VOUCHER_CONFIG.MEAL_CONFIG_DEBIT) \";\r\n\r\n\t\tObject dataObj[][] = getSqlModel().getSingleResult(query);\r\n\r\n\t\tif (dataObj != null && dataObj.length > 0) {\r\n\t\t\t\r\n\t\t\tmealVoucher.setCreditCode(String.valueOf(dataObj[0][0]));\r\n\t\t\tmealVoucher.setFreqencyOfChange(String.valueOf(dataObj[0][1]));\r\n\t\t\tmealVoucher.setCoupenCode(String.valueOf(dataObj[0][2]));\r\n\t\t\tmealVoucher.setDebitCode(String.valueOf(dataObj[0][3]));\r\n\t\t\tmealVoucher.setCreditHead(String.valueOf(dataObj[0][4]));\r\n\t\t\tmealVoucher.setCoupenHead(String.valueOf(dataObj[0][5]));\r\n\t\t\tmealVoucher.setDebitHead(String.valueOf(dataObj[0][6]));\r\n\t\t\t\r\n\t\t\tmealVoucher.setFromYear(String.valueOf(dataObj[0][7]));\r\n\t\t\tmealVoucher.setToYear(String.valueOf(dataObj[0][8]));\r\n\t\t\tmealVoucher.setMealVoucherAmtLimit(String.valueOf(dataObj[0][9]));\r\n\t\t\tmealVoucher.setMealVoucherAmtDeclare(String.valueOf(dataObj[0][10]));\r\n\t\t\tmealVoucher.setFromPeriod(checkNull(String.valueOf(dataObj[0][11])));\r\n\t\t\tmealVoucher.setToPeriod(checkNull(String.valueOf(dataObj[0][12])));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public String getTradeRecordInformation() {\n\t\tString phone = \"15815410203\";\n\t\tUser user = userService.findByPhone(phone);\n\t\ttradeRecords = tradeRecordService.findByUser(user);\n\t\treturn \"getTradeRecordInformation\";\n\t}", "public void setInstrumentType(String instrumentType) {\n this.instrumentType = instrumentType;\n }", "String getInfo();", "public int queryPlateAsianInfoById(String id);", "@Array({81}) \n\t@Field(9) \n\tpublic Pointer<Byte > InstrumentID() {\n\t\treturn this.io.getPointerField(this, 9);\n\t}", "private void getPatientInfo(String patientId){\n mFirestore.collection(\"users\")\n .document(patientId)\n .addSnapshotListener(new EventListener<DocumentSnapshot>() {\n @Override\n public void onEvent(@Nullable DocumentSnapshot snapshot,\n @Nullable FirebaseFirestoreException e) {\n if (e != null) {\n Log.w(TAG, \"Listen failed.\", e);\n return;\n }\n\n String source = snapshot != null && snapshot.getMetadata().hasPendingWrites()\n ? \"Local\" : \"Server\";\n\n if (snapshot != null && snapshot.exists()) {\n Log.d(TAG, source + \" data: \" + snapshot.getData());\n\n User existingPatient = localUser.getPatientById(snapshot.getId());\n if(existingPatient!=null){\n localUser.changeExistingPatient(existingPatient, setPatientData(snapshot));\n } else {\n localUser.addPatient(setPatientData(snapshot));\n }\n\n // TODO add PatientChangeListener\n //localUser.getIUserDataChangeListener().onUserDataChanged(null);\n\n } else {\n Log.d(TAG, source + \" data: null\");\n }\n }\n });\n }", "java.lang.String getDetails();", "public abstract Statement queryToRetrieveData();", "public void getDatabaseDriverInfo(RoutingContext routingContext);", "@Dao\npublic interface SpacecraftInstrumentsDao {\n \n /**\n * Search for temperature readings with MAPPER\n */\n @Select(customWhereClause = \"spacecraft_name= :spacecraftName AND journey_id= :journeyId\")\n PagingIterable<SpacecraftTemperatureOverTime> getTemperatureReading(\n String spacecraftName, UUID JourneyId,\n Function<BoundStatementBuilder, BoundStatementBuilder> setAttributes);\n \n /**\n * Search for temperature readings with QUERY PROVIDER\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);\n \n /**\n * Upsert a temperature reading.\n *\n * @param reading\n * The temperature reading\n * @return\n * if statement was applied\n */\n @Insert\n boolean upsertTemperature(SpacecraftTemperatureOverTime reading);\n \n /**\n * Bulk inserts of temperature readings.\n *\n * @param reading\n * The temperature readings\n */\n @QueryProvider(providerClass = SpacecraftInstrumentsQueryProvider.class, \n entityHelpers = { SpacecraftTemperatureOverTime.class, SpacecraftPressureOverTime.class, \n SpacecraftLocationOverTime.class, SpacecraftSpeedOverTime.class})\n CompletionStage<Boolean> insertTemperatureReadingAsync(SpacecraftTemperatureOverTime[] readings);\n \n @QueryProvider(providerClass = SpacecraftInstrumentsQueryProvider.class, \n entityHelpers = { SpacecraftTemperatureOverTime.class, SpacecraftPressureOverTime.class, \n SpacecraftLocationOverTime.class, SpacecraftSpeedOverTime.class})\n CompletionStage<Boolean> insertLocationReadingAsync(SpacecraftLocationOverTime[] readings);\n \n @QueryProvider(providerClass = SpacecraftInstrumentsQueryProvider.class, \n entityHelpers = { SpacecraftTemperatureOverTime.class, SpacecraftPressureOverTime.class, \n SpacecraftLocationOverTime.class, SpacecraftSpeedOverTime.class})\n CompletionStage<Boolean> insertPressureReadingAsync(SpacecraftPressureOverTime[] readings);\n \n @QueryProvider(providerClass = SpacecraftInstrumentsQueryProvider.class, \n entityHelpers = { SpacecraftTemperatureOverTime.class, SpacecraftPressureOverTime.class, \n SpacecraftLocationOverTime.class, SpacecraftSpeedOverTime.class})\n CompletionStage<Boolean> insertSpeedReadingAsync(SpacecraftSpeedOverTime[] readings);\n \n \n \n\n /**\n * Upsert a location reading.\n *\n * @param reading\n * The location reading\n * @return\n * if statement was applied\n */\n @Insert\n boolean upsertLocation(SpacecraftLocationOverTime reading);\n\n /**\n * Upsert a pressure reading.\n *\n * @param reading\n * The pressure reading\n * @return\n * if statement was applied\n */\n @Insert\n boolean upsertPressure(SpacecraftPressureOverTime reading);\n\n /**\n * Upsert a speed reading.\n *\n * @param reading\n * The speed reading\n * @return\n * if statement was applied\n */\n @Insert\n boolean upsertSpeed(SpacecraftSpeedOverTime reading);\n\n /**\n * Search for pressure readings.\n */\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);\n \n /**\n * Search for speed readings.\n */\n @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);\n \n /**\n * Search for location readings.\n */\n @QueryProvider(providerClass = SpacecraftInstrumentsQueryProvider.class, \n entityHelpers = { SpacecraftTemperatureOverTime.class, SpacecraftPressureOverTime.class, \n SpacecraftLocationOverTime.class, SpacecraftSpeedOverTime.class})\n PagingIterable<SpacecraftLocationOverTime> getLocationReading(\n String spacecraftName, UUID JourneyId, Optional<Integer> pageSize, Optional<String> pagingState);\n \n /**\n * Insert instruments.\n */\n @QueryProvider(providerClass = SpacecraftInstrumentsQueryProvider.class, \n entityHelpers = { SpacecraftTemperatureOverTime.class, SpacecraftPressureOverTime.class, \n SpacecraftLocationOverTime.class, SpacecraftSpeedOverTime.class})\n void insertInstruments(\n SpacecraftTemperatureOverTime temperature, SpacecraftPressureOverTime pressure, \n SpacecraftSpeedOverTime speed, SpacecraftLocationOverTime location);\n}", "public interface IndentDao extends BaseDao<Indent,Integer>{\n\n /**\n * 通过订单关联查询到买家信息\n */\n void queryBuyerByIndentNO();\n}", "void getData() throws SQLException, IOException {\n\t\tint i = 0;\n\t\twhile (cu.rst.next()) {\n\t\t\t\n\t\t\t\n\t\t\tcm[i].setDetails(cu.rst.getInt(1), cu.rst.getString(3),\n\t\t\t\t\tcu.rst.getString(4), cu.rst.getString(5), cu.rst.getString(6),\n\t\t\t\t\tcu.rst.getInt(7));\n\t\t\ti++;\n\n\t\t}\n\t\tSystem.out.println(\"**************************DETAILS TAKEN**************************\");\n\n\t}", "@Override\r\n\tpublic int getByStuuid(HashMap<String, String> getParamMap) {\n\t\treturn collectionMedicalRecordDao.getByStuuid(getParamMap);\r\n\t}", "Basicinfo selectByPrimaryKey(String taxregcode);", "public Vector<Information> getInformation() {\n\t\t\tVector<Information> v = new Vector<Information>();\n\t\t\ttry {\n\t\t\t\tStatement stmt = conn.createStatement();\n\t\t\t\tResultSet rs = stmt\n\t\t\t\t\t\t.executeQuery(\"\");\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tint file_num = rs.getInt(1);\n\t\t\t\t\tString name = rs.getString(2);\n\t\t\t\t\tString reg = rs.getString(3);\n\t\t\t\t\tString make = rs.getString(4);\n\t\t\t\t\tString model = rs.getString(5);\n\t\t\t\t\tint drive = rs.getInt(6);\n\t\t\t\t\tboolean isAllocated = rs.getBoolean(7);\n\t\t\t\t\tInformation info = new Information(file_num, name, reg, make, model, drive, isAllocated);\n//\t\t\t\t\tCars cars = new Truck(reg, model, drive);\n\t\t\t\t\tv.add(info);\n\t\t\t\t}\n\t\t\t}\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn v;\n\t}", "Product getProductDetails(int idproduct) throws DataBaseException;", "@Override\n\t@Transactional\n\tpublic List<ImportDetail> getImportDetail(String impId) {\n\t\treturn importDao.getImportDetail(impId);\n\t}", "List<Info> getBookInfoById(Long infoId) throws Exception;", "public interface IITDIndexDAO {\n\n /**\n * Inserts a list of itdIndices into the persistent storage.\n *\n * @param itdIndices A list of {@link ScripITD} instances.\n *\n * @return The number of successful inserts.\n *\n * @throws DataAccessException In case an exception is encountered during\n * the data access operation.\n */\n int insert( final List<ScripITD> itdIndices )\n throws DataAccessException ;\n\n /**\n * Inserts an instance of ScripITD into the persistent storage.\n *\n * @param itdIndices A list of {@link ScripITD} instances.\n *\n * @return The number of successful inserts.\n *\n * @throws DataAccessException In case an exception is encountered during\n * the data access operation.\n */\n int insert( final ScripITD itdIndex )\n throws DataAccessException ;\n\n /**\n * Returns a list of the latest Scrip ITD instances for all the symbols\n * for whom the intra day data is available.\n *\n * @return A list of {@link ScripITD}. If there are no intra day data for\n * the specified date, an empty list is returned, never null.\n *\n * @throws DataAccessException In case an exception is encountered during\n * the data access operation.\n */\n List<ScripITD> getLatestScripITD() throws DataAccessException ;\n\n /**\n * Returns a list of all the intra day ITD markers for the specified symbol\n * for the specified date.\n *\n * @param symbol The NSE symbol for which the ITD data has to be fetched\n * @param date The date for which the data has to be fetched.\n *\n * @return A list of {@link ScripITD}. If there are no intra day data for\n * the specified date, an empty list is returned, never null.\n *\n * @throws DataAccessException In case an exception is encountered during\n * the data access operation.\n */\n List<ScripITD> getScripITD( final String symbol, final Date date )\n throws DataAccessException ;\n\n /**\n * Returns a list of all the intra day ITD markers for the specified symbol\n * and the date range specified.\n *\n * @param symbol The NSE symbol for which the ITD data has to be fetched\n * @param start The start date of the date range\n * @param end The end date of the date range\n *\n * @return A list of {@link ScripITD}. If there are no intra day data for\n * the specified date, an empty list is returned, never null.\n *\n * @throws DataAccessException In case an exception is encountered during\n * the data access operation.\n */\n List<ScripITD> getScripITD( final String symbol, final Date start,\n final Date end )\n throws DataAccessException ;\n\n /**\n * Moves all records in the SCRIP_ITD_DATA table which have a date attribute\n * which is in the past, relative to the boundary date passed as parameter.\n * Please note that this operation does not delete the data from the live\n * table. If you want to delete the live data which has been archived, you\n * need to call on the deleteLiveRecords operation within the same transaction\n * boundary.\n *\n * @param boundary The date which implies that any record with date in the\n * past as compared to the boundary will be archived.\n *\n * @throws DataAccessException If an exception is encountered during the\n * archival process.\n */\n void archiveLiveRecords( final Date boundary )\n throws DataAccessException ;\n\n /**\n * Deletes all records in the SCRIP_ITD_DATA table which have a date attribute\n * which is in the past, relative to the boundary date passed as parameter.\n * Please note that this operation does not copy the data from the live\n * table to the archive table. If you want to copy the live data which is\n * about to be deleted, you need to call on the archiveLiveRecords\n * before this call, within the same transaction boundary.\n *\n * @param boundary The date which implies that any record with date in the\n * past as compared to the boundary will be deleted.\n *\n * @throws DataAccessException If an exception is encountered during the\n * archival process.\n */\n void deleteLiveRecords( final Date boundary )\n throws DataAccessException ;\n}", "@Override\n public List<Disease> findDiseaseByInfo(Disease diseaseInfo) {\n List<Disease> list = diseaseRepository.findByInfo(diseaseInfo.getDname(),diseaseInfo.getNickName(),\n diseaseInfo.getLevel(),diseaseInfo.getSymptom(),diseaseInfo.getCure());\n return list;\n }", "public MedicalRecord getMedicalRecord(String patient, String index){\n int i = Integer.parseInt(index);\n if(database.containsKey(patient)){\n if(database.get(patient).size() > i){\n return database.get(patient).get(i);\n } else{\n System.out.println(\"No such Medical Records found for \" + patient);\n }\n } else {\n System.out.println(patient + \" Not found in database\");\n }\n return null;\n }", "public interface BasicInformationDao {\n BasicInformation insert(BasicInformation item);\n\n List<BasicInformation> query(BasicInformation item);\n\n void update(BasicInformation item);\n\n void delete(BasicInformation item);\n\n List<BasicInformation> queryByBasic_ids(List<Integer> list);\n\n}", "Report selectByPrimaryKey(Integer id);", "public static ResultSet getPatientInfo(int id) {\r\n\t\ttry{\r\n\t\t\tconnection = DriverManager.getConnection(connectionString);\r\n\t\t\tstmt = connection.prepareStatement(\"SELECT * FROM Patient WHERE ID =?;\");\r\n\t\t\tstmt.setString(1, String.valueOf(id));\r\n\t\t\tdata = stmt.executeQuery();\r\n\t\t}\r\n\t\tcatch (SQLException ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn data;\r\n\t}", "public Iterable<SequenceInformation> extractMetadata(ExtractionContext extractionContext) throws SQLException;", "@Override\n\tpublic StudentInfo getStudentInfo(String id) {\n\t\treturn userMapper.getStudentInfo(id);\n\t}", "public interface CinemaDAO {\n\n ArrayList<Cinema> selectData();\n void insertData(Cinema cinema);\n}", "ToolsOutIn selectByPrimaryKey(Integer id);", "@Override\r\n\tpublic Invigilate getOne(Integer no) {\n\t\treturn invigilateMapper.selectByPrimaryKey(no);\r\n\t}", "public String[] getInfoData();", "@Dao\r\npublic interface HealthReadingDAO {\r\n\r\n @Insert\r\n void addNewRecord(HealthReading healthReading);\r\n\r\n @Query(\"SELECT * FROM health_table\")\r\n List<HealthReading> getAllRecords();\r\n\r\n @Query(\"SELECT * FROM health_table WHERE reading_time >= :lastAlarmTimeInMilli AND reading_time<= :offsetTime AND protocol_id IS NOT NULL AND protocol_id <> '' \")\r\n List<HealthReading> getLastAlarmRecords(long lastAlarmTimeInMilli,long offsetTime);\r\n\r\n\r\n @Query(\"DELETE FROM health_table\")\r\n void deleteAllRecords();\r\n}", "public List<TransactionDetails> getDetailsforInternalTransfer(String transactionId) {\n\t\tString sql=\"Select * from transaction where id=?\";\n\t\tList<TransactionDetails> list=jdbcTemplate.query(sql,new Object[] {transactionId}, new TransactionDetailMapper() );\n\t\treturn list;\n\t\t\n\t}", "PicInfo selectByPrimaryKey(Integer r_p_i);", "public IseData getIseData() {\n String uuidString = getString(getColumnIndex(IseDataTable.Cols.UUID));\n String iseNumber = getString(getColumnIndex(IseDataTable.Cols.ISE_NUMBER));\n String location = getString(getColumnIndex(IseDataTable.Cols.LOCATION));\n String gridId = getString(getColumnIndex(IseDataTable.Cols.GRID_ID));\n long date = getLong(getColumnIndex(IseDataTable.Cols.DATE));\n String description = getString(getColumnIndex(IseDataTable.Cols.DESCRIPTION));\n String inspectorFullName = getString(getColumnIndex(IseDataTable.Cols.INSPECTOR_NAME));\n String inspectorUserName = getString(getColumnIndex(IseDataTable.Cols.INSPECTOR_USERNAME));\n double methaneReading = getDouble(getColumnIndex(IseDataTable.Cols.MAX_METHANE_READING));\n\n IseData iseData = new IseData(UUID.fromString(uuidString));\n iseData.setIseNumber(iseNumber);\n iseData.setLocation(location);\n iseData.setGridId(gridId);\n iseData.setDate(new Date(date));\n iseData.setDescription(description);\n iseData.setInspectorFullName(inspectorFullName);\n iseData.setInspectorUserName(inspectorUserName);\n iseData.setMethaneReading(methaneReading);\n\n return iseData;\n }", "public void select() {\n db = helper.getReadableDatabase();\n Cursor c = db.query(\"student\", null, null, null, null, null, null);\n\n studentInfo = new String[c.getCount()];\n int count = 0;\n\n while(c.moveToNext()) {\n studentInfo[count] = c.getString(c.getColumnIndex(\"name\"))\n + \" \" + c.getString(c.getColumnIndex(\"number\"));\n count++;\n }\n c.close();\n }", "public interface IntegralDao {\n public void addIntegral(OrderInfo orderInfo);\n\n /**\n * 获取用户积分记录\n * @param userId\n * @return\n */\n public Map<String,Object> getIntegralListByUserId(Integer userId,Integer page,Integer page_size);\n\n}", "@Override\n\tpublic List<Map<String, Object>> findInfoById(long id) {\n\t\treturn gwgyDataDao.findInfoById(id);\n\t}", "public void getDetails() {\n presenter = new SkillPresenter(this, this);\n try {\n if (getIntent().getExtras().get(\"from\").toString().equalsIgnoreCase(\"notification\")) {\n presenter.getSkillsNotification(this, getIntent().getIntExtra(\"notification_id\", 0));\n } else if (getIntent().getExtras().get(\"from\").toString().equalsIgnoreCase(\"notificationAdapter\")) {\n presenter.getSkillsNotification(this, getIntent().getIntExtra(\"notification_id\", 0));\n } else {\n presenter.getSkills(this);\n }\n }catch (Exception e){\n e.printStackTrace();\n presenter.getSkills(this);\n }\n }", "java.lang.String getDataInfoId();", "@Override\n\tpublic Map<String, Object> getStudent() {\n\t\treturn getSession().selectOne(getNamespace() + \"getStudent\");\n\t}" ]
[ "0.6697353", "0.6283918", "0.61469615", "0.6008459", "0.596046", "0.57886535", "0.5775016", "0.57472473", "0.5728131", "0.5710388", "0.57093245", "0.5609259", "0.5466219", "0.53701365", "0.52962106", "0.52910674", "0.5289243", "0.5274785", "0.5271233", "0.52669543", "0.5243453", "0.5230676", "0.52175415", "0.51145345", "0.5063553", "0.5062709", "0.50499505", "0.49936992", "0.4979959", "0.49546877", "0.49481553", "0.49469662", "0.49233112", "0.49035132", "0.4897407", "0.48275176", "0.48142415", "0.47796905", "0.47758883", "0.4766399", "0.47554386", "0.47389135", "0.47389135", "0.47389135", "0.47389135", "0.47389135", "0.47100693", "0.4706783", "0.4706648", "0.47011426", "0.46958157", "0.46920726", "0.46874782", "0.46729368", "0.46657437", "0.46584415", "0.46435392", "0.46367544", "0.4616922", "0.45935935", "0.45922166", "0.4588179", "0.45853022", "0.45731732", "0.45697397", "0.45689496", "0.4548657", "0.45379934", "0.45339036", "0.45274347", "0.45115522", "0.4508147", "0.45074388", "0.45065415", "0.45052218", "0.45031404", "0.44955292", "0.4493709", "0.44799682", "0.44771698", "0.44734794", "0.44639853", "0.44613725", "0.4460563", "0.4460445", "0.44510183", "0.4450628", "0.44375253", "0.4434187", "0.44337073", "0.4432566", "0.44225153", "0.4417766", "0.4414098", "0.44126177", "0.44082615", "0.4408123", "0.44053143", "0.44018528", "0.43994746" ]
0.6936797
0
Saves/Replaces the supplied instrument info to the database.
public void setInstrumentInfo(BrokerID brokerID, Instrument instrument, InstrumentInfo info) throws PersistenceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean saveInstrument(T instrument) throws DaoException;", "private void saveInstrument() {\n String instrument = mInstrument.getText().toString().trim();\n String brand = mBrand.getText().toString().trim();\n String serial = mSerial.getText().toString().trim();\n int quantity = mQuantity.getValue();\n String priceString = mPrice.getText().toString().trim();\n if(TextUtils.isEmpty(instrument) && TextUtils.isEmpty(brand) && TextUtils.isEmpty(serial) &&\n TextUtils.isEmpty(priceString) && quantity == 0){\n return;\n }\n float price = 0;\n if(!TextUtils.isEmpty(priceString)){\n price = Float.parseFloat(priceString);\n }\n //Retrieve selected supplier from Spinner\n String suppName = mSpinner.getSelectedItem().toString();\n //A query request to get the id of the selected supplier\n String [] projection = {SupplierEntry._ID, SupplierEntry.COLUMN_NAME};\n String selection = SupplierEntry.COLUMN_NAME + \"=?\";\n String [] selectionArgs = {suppName};\n Cursor cursor = getContentResolver().query(SupplierEntry.CONTENT_SUPPLIER_URI, projection, selection, selectionArgs, null);\n int idSupplier = 0;\n try {\n int idColumnIndex = cursor.getColumnIndex(SupplierEntry._ID);\n //move the cursor to the 0th position, before you start extracting out column values from it\n if (cursor.moveToFirst()) {\n idSupplier = cursor.getInt(idColumnIndex);\n }\n }finally {\n cursor.close();\n }\n ContentValues values = new ContentValues();\n values.put(InstrumentEntry.COLUMN_NAME, instrument);\n values.put(InstrumentEntry.COLUMN_BRAND, brand);\n values.put(InstrumentEntry.COLUMN_SERIAL, serial);\n values.put(InstrumentEntry.COLUMN_PRICE, price);\n values.put(InstrumentEntry.COLUMN_NB, quantity);\n values.put(InstrumentEntry.COLUMN_SUPPLIER_ID, idSupplier);\n Uri uri = getContentResolver().insert(InstrumentEntry.CONTENT_INSTRUMENT_URI, values);\n if(uri != null){\n Toast.makeText(this, \"Instrument successfully inserted\", Toast.LENGTH_SHORT);\n }else\n Toast.makeText(this, \"Instrument insertion failed\", Toast.LENGTH_SHORT);\n }", "@Override\n public void save(Information information) {\n information.setInfoState(\"0\");\n informationMapper.insertInfo(information);\n }", "void putInstrument(String vendorCode, Instrument instrument);", "public void save() {\n //write lift information to datastore\n LiftDataAccess lda = new LiftDataAccess();\n ArrayList<Long>newKeys = new ArrayList<Long>();\n for (Lift l : lift) {\n newKeys.add(lda.insert(l));\n }\n\n //write resort information to datastore\n liftKeys = newKeys;\n dao.update(this);\n }", "public void saveInformation(){\n market.saveInformationOfMarket();\n deckProductionCardOneBlu.saveInformationOfProductionDeck();\n deckProductionCardOneGreen.saveInformationOfProductionDeck();\n deckProductionCardOneViolet.saveInformationOfProductionDeck();\n deckProductionCardOneYellow.saveInformationOfProductionDeck();\n deckProductionCardThreeBlu.saveInformationOfProductionDeck();\n deckProductionCardThreeGreen.saveInformationOfProductionDeck();\n deckProductionCardThreeYellow.saveInformationOfProductionDeck();\n deckProductionCardThreeViolet.saveInformationOfProductionDeck();\n deckProductionCardTwoBlu.saveInformationOfProductionDeck();\n deckProductionCardTwoGreen.saveInformationOfProductionDeck();\n deckProductionCardTwoViolet.saveInformationOfProductionDeck();\n deckProductionCardTwoYellow.saveInformationOfProductionDeck();\n\n\n }", "@Override\n public void saveTransactionDetails(TransactionInfo transactionInfo) {\n repositoryService.saveTransactionDetails(transactionInfo);\n update(\"transactions\", String.class, TransactionInfo.class, LocalDateTime.now().toString(), transactionInfo);\n }", "private void save() {\n // Get the current measurement\n final LiveData<Measurement> ldm = mViewModel.getMeasurementById(mMeasurementId);\n ldm.observe(getViewLifecycleOwner(), new Observer<Measurement>() {\n @Override\n public void onChanged(final Measurement measurement) {\n ldm.removeObserver(this);\n updateMeasurement(measurement);\n snackBar(\"Measurement updated!\");\n }\n });\n }", "public void save() {\t\n\t\n\t\n\t}", "int updateByPrimaryKey(ac_teacher_instrument record);", "@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}", "private void updateDatabase() {\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\tArrayList<String> updatedRecords = serializer.serialize(records);\n\t\tDatabaseHandler.writeToDatabase(DATABASE_NAME, updatedRecords);\n\t}", "public void save(SystenLogInfo osInfo, String string) {\n\t\t\n\t}", "public void saveSensorsDB() throws Exception {\n\n\t\t//Get JDBC connection\n\t\tConnection connection = null;\n\t\tStatement stmt = null;\n\t\tConnectDB conn = new ConnectDB();\n\t\tconnection = conn.getConnection();\n\n\t\tstmt = connection.createStatement();\n\t\tfor (int key : getMap().keySet()) {\n\t\t\tSubArea value = getMap().get(key);\n\t\t\tint fireValue = (value.isFireSensor()) ? 1 : 0;\n\t\t\tint burglaryValue = (value.isBurglarySensor()) ? 1 : 0;\n\t\t\t//Save Fire and Burglary sensors\n\t\t\tString sql = \"UPDATE section SET fireSensor=\" + fireValue\n\t\t\t\t\t+ \", burglarySensor=\" + burglaryValue + \" WHERE id=\" + key;\n\t\t\tstmt.executeUpdate(sql);\n\t\t}\n\n\t}", "public void onSaveClicked(View view) {\n\n if (mInterest != 0.0f) {\n\n ContentValues values = new ContentValues();\n values.put(SavingsItemEntry.COLUMN_NAME_BANK_NAME, bankInput.getText().toString());\n values.put(SavingsItemEntry.COLUMN_NAME_AMOUNT, mAmount);\n values.put(SavingsItemEntry.COLUMN_NAME_YIELD, mYield);\n values.put(SavingsItemEntry.COLUMN_NAME_START_DATE, mStartDate.getTime());\n values.put(SavingsItemEntry.COLUMN_NAME_END_DATE, mEndDate.getTime());\n values.put(SavingsItemEntry.COLUMN_NAME_INTEREST, mInterest);\n\n if (mEditMode){\n //Update the data into database by ContentProvider\n getContentResolver().update(SavingsContentProvider.CONTENT_URI, values,\n SavingsItemEntry._ID + \"=\" + mSavingsBean.getId(), null);\n Log.d(Constants.LOG_TAG, \"Edit mode, updated existing savings item: \" + mSavingsBean.getId());\n }else {\n // Save the data into database by ContentProvider\n getContentResolver().insert(\n SavingsContentProvider.CONTENT_URI,\n values\n );\n }\n // Go back to dashboard\n //Intent intent = new Intent(this, DashboardActivity.class);\n //startActivity(intent);\n Utils.gotoDashBoard(this);\n finish();\n } else {\n Toast.makeText(this, R.string.missing_savings_information, Toast.LENGTH_LONG).show();\n }\n\n }", "@Override\n\tpublic int savePlanInfo(PlanInfo planInfo) {\n\t\treturn planInfoDao.insertSelective(planInfo);\n\t}", "public void save()\n\t{\n\t\ttry\n\t\t{\n\t\t\tgetConnection().commit();\n\t\t\tgetPreparedStatement(\"SET FILES SCRIPT FORMAT COMPRESSED\").execute();\n\t\t\t// causes a checkpoint automatically.\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Couldn't cleanly save.\", e);\n\t\t}\n\t}", "private void saveData() {\n }", "private void saveAT() \n {\n // get DatabaseConnector to interact with the SQLite database\n\t AnimalDatabase db = new AnimalDatabase(this);\n\t AnimalList al = new AnimalList (db);\n\t \n // insert the contact information into the database\n al.Update(id, amount, comments);\n\n }", "public void saveMedicine(Medicine medicine);", "@Override\r\n\tpublic void save(TQssql sql) {\n\r\n\t}", "public void ajouter(Instrument i){\n\n }", "public interface InstrumentRepository {\n\n /**\n * Returns instrument object by its vendor code.\n *\n * @param vendorCode vendor code of necessary instrument\n * @return instrument object\n */\n Instrument getInstrument(String vendorCode);\n\n /**\n * Returns instruments map from data source.\n *\n * @return instruments map\n */\n HashMap<String, Instrument> getInstruments();\n\n /**\n * Adds new instrument to data source.\n *\n * @param vendorCode vendor code of new instrument\n * @param instrument new instrument object\n */\n void putInstrument(String vendorCode, Instrument instrument);\n\n /**\n * Returns instruments count from instrument source.\n *\n * @return instruments count\n */\n int getInstrumentCount();\n}", "public void updateInsurance(Insurance insurance) throws DataAccessException;", "public void save();", "public void save();", "public void save();", "public void save();", "void save();", "void save();", "void save();", "public void saveData() {\n\t\t//place to save notes e.g to file\n\t}", "private void savePatientToDatabase(Patient patient){\n DatabaseAdapter cateDB = new DatabaseAdapter(AddPatientActivity.this);\n try {\n cateDB.openDatabaseForRead();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n patient.printPatient();\n cateDB.insertPatient(patient);\n\n cateDB.closeDatabase();\n }", "public void save() {\r\n\t\tGame.getInstance().getInventory().add(id);\r\n\t}", "@Override\r\n\tpublic void save(Plate tipo) {\n\t\t\r\n\t}", "void saveSaves(Object data, Context context);", "public void saveData(){\r\n file.executeAction(modelStore);\r\n }", "protected void saveValues() {\n dataModel.persist();\n }", "@Override\n public void Save() {\n\t \n }", "public void changeInstrument(double instrumentCode) {\n\t\tthis.soundCipher.instrument(instrumentCode);\n\t}", "public void save()\n\t{\n\t\tfor(PlayerData pd : dataMap.values())\n\t\t\tpd.save();\n\t}", "public void saveData ( ) {\n\t\tinvokeSafe ( \"saveData\" );\n\t}", "void save(Exam exam);", "public void saveToDB(String sellerID, ArrayList<String> data) throws SQLException {\n\t\tString sql = \"update contactseller_seller_feedback_stastics set positive_month_1 = ?, positive_month_3= ?, positive_year_1= ?, positive_lifetime= ?, neutral_month_1= ?, neutral_month_3= ?, neutral_year_1= ?, neutral_lifetime= ?, negative_month_1= ?, negative_month_3= ?, negative_year_1= ?, negative_lifetime= ?, count_month_1= ?, count_month_3= ?, count_year_1= ?, count_lifetime= ? where seller_id = ? and country = ?\";\r\n\t\tPreparedStatement pstmt = conn.prepareStatement(sql);\r\n\r\n\t\tfor (int i = 0; i < data.size(); i++) {\r\n\t\t\tpstmt.setString(i + 1, data.get(i).replace(\",\", \"\"));\r\n\t\t}\r\n\t\tpstmt.setString(data.size() + 1, sellerID);\r\n\t\tpstmt.setString(data.size() + 2, this.country.toString());\r\n\t\tpstmt.addBatch();\r\n\t\tpstmt.executeBatch();\r\n\t\t// conn.close();\r\n\t\tSystem.out.println(\"inserted\");\r\n\r\n\t}", "public static void save()\n\t{\n writeMap();\n\t}", "private void saveSensor() {\n new SensorDataSerializer(sensorID, rawData);\n rawData.clear();\n }", "@Override\n public void save(Seq s) {\n // TODO Auto-generated method stub\n \t//Establish cnx\n\t\tConnection conn = null;\n\t\tString url = \"jdbc:sqlite:src\\\\database\\\\AT2_Mobile.db\";\n\t\t\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(url);\n\t\t\tPreparedStatement myStmt; \n\t\t\tString query = \"insert into seq(identifier, seq_number) values(?,?)\";\n\t\t\tmyStmt = conn.prepareStatement(query);\n\t\t\t\n\t\t\t// Set Parameters\n\t myStmt.setString(1, s.getProcess().getIdentifier());\n\t myStmt.setInt(2, s.getSeq_number());\n\t\t\t// Execute SQL query\n\t int res = myStmt.executeUpdate();\n\t \n\t // Display the record inserted\n\t System.out.println(res + \" Seq inserted\\n\");\n\t \n\t // Close the connection\n\t conn.close();\n\t\t}catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());}\n\t\t\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException ex) {\n\t\t\t\tSystem.out.println(ex.getMessage());\n\t\t\t}\n\t\t\t}\n }", "void save(Student student);", "public void save() {\n }", "void insert(IrpSignInfo record) throws SQLException;", "public void saveExtraData() {}", "private Evidence saveEvidence(Evidence evidence){\n\t\t\tdemoBuilder.getIndicators().removeIf(e -> evidence.getId().equals(e.getId()));\n\t\t\tdemoBuilder.getIndicators().add(evidence);\n\t\t\treturn evidence;\n\t}", "public void save() {\n DataBuffer.saveDataLocally();\n\n //TODO save to db must be done properly\n DataBuffer.save(session);\n\n //TODO recording saved confirmation\n }", "int updateByPrimaryKeySelective(ac_teacher_instrument record);", "public void storeValuesDump() throws SQLException{ //store DUMP values into the database\n \tString sqlDump = \"INSERT INTO dump VALUES ('\" + massSelection + \"', '\" + smokeSelection + \"', '\" + framesText.getText() + \"', '\" + dtDevcText.getText() + \"');\";\n \tConnectionClass connectionClass = new ConnectionClass();\n\t\tConnection connection = connectionClass.getConnection();\n\t\tStatement statement = connection.createStatement();\n\t\tstatement.executeUpdate(sqlDump);\n }", "void insertSelective(IrpSignInfo record) throws SQLException;", "public void save() throws IOException {\n/* 481 */ Connection dbcon = null;\n/* 482 */ PreparedStatement ps = null;\n/* */ \n/* */ try {\n/* 485 */ CreaturePos pos = CreaturePos.getPosition(this.wurmid);\n/* 486 */ if (pos != null) {\n/* */ \n/* 488 */ pos.setPosX(this.posx);\n/* 489 */ pos.setPosY(this.posy);\n/* 490 */ pos.setPosZ(this.posz, false);\n/* 491 */ pos.setRotation(this.rotation);\n/* 492 */ pos.setZoneId(this.zoneid);\n/* 493 */ pos.setLayer(0);\n/* */ } else {\n/* */ \n/* 496 */ new CreaturePos(this.wurmid, this.posx, this.posy, this.posz, this.rotation, this.zoneid, 0, -10L, true);\n/* 497 */ } dbcon = DbConnector.getPlayerDbCon();\n/* 498 */ if (exists(dbcon)) {\n/* */ \n/* 500 */ ps = dbcon.prepareStatement(\"DELETE FROM PLAYERS WHERE WURMID=?\");\n/* 501 */ ps.setLong(1, this.wurmid);\n/* 502 */ ps.executeUpdate();\n/* 503 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ } \n/* 505 */ ps = dbcon.prepareStatement(\"insert into PLAYERS (MAYUSESHOP,PASSWORD,WURMID,LASTLOGOUT,PLAYINGTIME,TEMPLATENAME,SEX,CENTIMETERSHIGH,CENTIMETERSLONG,CENTIMETERSWIDE,INVENTORYID,BODYID,MONEYSALES,BUILDINGID,STAMINA,HUNGER,THIRST,IPADDRESS,REIMBURSED,PLANTEDSIGN,BANNED,PAYMENTEXPIRE,POWER,RANK,DEVTALK,WARNINGS,LASTWARNED,FAITH,DEITY,ALIGNMENT,GOD,FAVOR,LASTCHANGEDDEITY,REALDEATH,CHEATED,LASTFATIGUE,FATIGUE,DEAD,KINGDOM,SESSIONKEY,SESSIONEXPIRE,VERSION,MUTED,LASTFAITH,NUMFAITH,MONEY,CLIMBING,NUMSCHANGEDKINGDOM,AGE,LASTPOLLEDAGE,FAT,BANEXPIRY,BANREASON,FACE,REPUTATION,LASTPOLLEDREP,TITLE,PET,NICOTINE,NICOTINETIME,ALCOHOL,ALCOHOLTIME,LOGGING,MAYMUTE,MUTEEXPIRY,MUTEREASON,LASTSERVER,CURRENTSERVER,REFERRER,EMAIL,PWQUESTION,PWANSWER,PRIEST,BED,SLEEP,CREATIONDATE,THEFTWARNED,NOREIMB,DEATHPROT,FATIGUETODAY,FATIGUEYDAY,FIGHTMODE,NEXTAFFINITY,DETECTIONSECS,TUTORIALLEVEL,AUTOFIGHT,APPOINTMENTS,PA,APPOINTPA,PAWINDOW,NUTRITION,DISEASE,PRIESTTYPE,LASTCHANGEDPRIEST,LASTCHANGEDKINGDOM,LASTLOSTCHAMPION,CHAMPIONPOINTS,CHAMPCHANNELING,MUTETIMES,VOTEDKING,EPICKINGDOM,EPICSERVER,CHAOSKINGDOM,FREETRANSFER,HOTA_WINS,LASTMODIFIEDRANK,MAXRANK,KARMA,MAXKARMA,TOTALKARMA,BLOOD,FLAGS,FLAGS2,ABILITIES,ABILITYTITLE,SCENARIOKARMA,UNDEADTYPE,UNDEADKILLS,UNDEADPKILLS,UNDEADPSECS,NAME,CALORIES,CARBS,FATS,PROTEINS,SECONDTITLE) VALUES(?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?, ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\");\n/* 506 */ ps.setBoolean(1, this.overrideshop);\n/* 507 */ ps.setString(2, this.password);\n/* 508 */ ps.setLong(3, this.wurmid);\n/* 509 */ ps.setLong(4, System.currentTimeMillis());\n/* 510 */ ps.setLong(5, this.playingTime);\n/* 511 */ ps.setString(6, this.templateName);\n/* 512 */ ps.setByte(7, this.sex);\n/* 513 */ ps.setShort(8, this.centhigh);\n/* 514 */ ps.setShort(9, this.centlong);\n/* 515 */ ps.setShort(10, this.centwide);\n/* 516 */ ps.setLong(11, this.inventoryId);\n/* 517 */ ps.setLong(12, this.bodyId);\n/* 518 */ ps.setLong(13, this.moneySalesEver);\n/* 519 */ ps.setLong(14, this.buildingId);\n/* 520 */ ps.setShort(15, (short)this.stamina);\n/* 521 */ ps.setShort(16, (short)this.hunger);\n/* 522 */ ps.setShort(17, (short)this.thirst);\n/* 523 */ ps.setString(18, this.lastip);\n/* 524 */ ps.setBoolean(19, this.reimbursed);\n/* 525 */ ps.setLong(20, this.plantedSign);\n/* 526 */ ps.setBoolean(21, this.banned);\n/* 527 */ ps.setLong(22, this.paymentExpire);\n/* 528 */ ps.setByte(23, this.power);\n/* 529 */ ps.setInt(24, this.rank);\n/* 530 */ ps.setBoolean(25, this.mayHearDevtalk);\n/* 531 */ ps.setShort(26, (short)this.warnings);\n/* 532 */ ps.setLong(27, this.lastwarned);\n/* 533 */ ps.setFloat(28, this.faith);\n/* 534 */ ps.setByte(29, this.deity);\n/* 535 */ ps.setFloat(30, this.align);\n/* 536 */ ps.setByte(31, this.god);\n/* 537 */ ps.setFloat(32, this.favor);\n/* 538 */ ps.setLong(33, this.lastChangedDeity);\n/* 539 */ ps.setByte(34, this.realdeathcounter);\n/* 540 */ ps.setLong(35, this.lastcheated);\n/* 541 */ ps.setLong(36, this.lastfatigue);\n/* 542 */ ps.setInt(37, this.fatiguesecsleft);\n/* 543 */ ps.setBoolean(38, this.dead);\n/* 544 */ ps.setByte(39, this.kingdom);\n/* 545 */ ps.setString(40, this.session);\n/* 546 */ ps.setLong(41, this.sessionExpiration);\n/* 547 */ ps.setLong(42, this.ver);\n/* 548 */ ps.setBoolean(43, this.mute);\n/* 549 */ ps.setLong(44, this.lastfaith);\n/* 550 */ ps.setByte(45, this.numfaith);\n/* 551 */ ps.setLong(46, this.money);\n/* 552 */ ps.setBoolean(47, this.climbing);\n/* 553 */ ps.setByte(48, this.changedKingdom);\n/* 554 */ ps.setInt(49, this.age);\n/* 555 */ ps.setLong(50, this.lastPolledAge);\n/* 556 */ ps.setByte(51, this.fat);\n/* 557 */ ps.setLong(52, this.banexpiry);\n/* 558 */ ps.setString(53, this.banreason);\n/* 559 */ ps.setLong(54, this.face);\n/* 560 */ ps.setInt(55, this.reputation);\n/* 561 */ ps.setLong(56, this.lastPolledReputation);\n/* 562 */ ps.setInt(57, this.title);\n/* 563 */ ps.setLong(58, this.pet);\n/* 564 */ ps.setFloat(59, this.nicotine);\n/* 565 */ ps.setLong(60, this.nicotineTime);\n/* 566 */ ps.setFloat(61, this.alcohol);\n/* 567 */ ps.setLong(62, this.alcoholTime);\n/* 568 */ ps.setBoolean(63, this.logging);\n/* 569 */ ps.setBoolean(64, this.mayMute);\n/* 570 */ ps.setLong(65, this.muteexpiry);\n/* 571 */ ps.setString(66, this.mutereason);\n/* 572 */ ps.setInt(67, this.lastServer);\n/* 573 */ ps.setInt(68, this.currentServer);\n/* 574 */ ps.setLong(69, this.referrer);\n/* 575 */ ps.setString(70, this.emailAdress);\n/* 576 */ ps.setString(71, this.pwQuestion);\n/* 577 */ ps.setString(72, this.pwAnswer);\n/* 578 */ ps.setBoolean(73, this.isPriest);\n/* 579 */ ps.setLong(74, this.bed);\n/* 580 */ ps.setInt(75, this.sleep);\n/* 581 */ ps.setLong(76, this.creationDate);\n/* 582 */ ps.setBoolean(77, this.istheftwarned);\n/* 583 */ ps.setBoolean(78, this.noReimbLeft);\n/* 584 */ ps.setBoolean(79, this.deathProt);\n/* 585 */ ps.setInt(80, this.fatigueSecsToday);\n/* 586 */ ps.setInt(81, this.fatigueSecsYday);\n/* 587 */ ps.setByte(82, this.fightmode);\n/* 588 */ ps.setLong(83, this.nextAffinity);\n/* 589 */ ps.setShort(84, this.detectionSecs);\n/* 590 */ ps.setInt(85, this.tutLevel);\n/* 591 */ ps.setBoolean(86, this.autofight);\n/* 592 */ ps.setLong(87, this.appointments);\n/* 593 */ ps.setBoolean(88, this.isPA);\n/* 594 */ ps.setBoolean(89, this.mayAppointPA);\n/* 595 */ ps.setBoolean(90, this.seesPAWin);\n/* 596 */ ps.setFloat(91, this.nutrition);\n/* 597 */ ps.setByte(92, this.disease);\n/* 598 */ ps.setByte(93, this.priestType);\n/* 599 */ ps.setLong(94, this.lastChangedPriestType);\n/* 600 */ ps.setLong(95, this.lastChangedKingdom);\n/* 601 */ ps.setLong(96, this.lastLostChampion);\n/* 602 */ ps.setShort(97, this.championPoints);\n/* 603 */ ps.setFloat(98, this.champChanneling);\n/* 604 */ ps.setShort(99, this.muteTimes);\n/* 605 */ ps.setBoolean(100, this.voteKing);\n/* 606 */ ps.setByte(101, this.epicKingdom);\n/* 607 */ ps.setInt(102, this.epicServerId);\n/* 608 */ ps.setInt(103, this.chaosKingdom);\n/* 609 */ ps.setBoolean(104, this.hasFreeTransfer);\n/* 610 */ ps.setShort(105, this.hotaWins);\n/* */ \n/* 612 */ ps.setLong(106, this.lastModifiedRank);\n/* 613 */ ps.setInt(107, this.maxRank);\n/* 614 */ ps.setInt(108, this.karma);\n/* 615 */ ps.setInt(109, this.maxKarma);\n/* 616 */ ps.setInt(110, this.totalKarma);\n/* 617 */ ps.setByte(111, this.blood);\n/* 618 */ ps.setLong(112, this.flags);\n/* 619 */ ps.setLong(113, this.flags2);\n/* 620 */ ps.setLong(114, this.abilities);\n/* 621 */ ps.setInt(115, this.abilityTitle);\n/* 622 */ ps.setInt(116, this.scenarioKarma);\n/* */ \n/* 624 */ ps.setByte(117, this.undeadType);\n/* 625 */ ps.setInt(118, this.undeadKills);\n/* 626 */ ps.setInt(119, this.undeadPKills);\n/* 627 */ ps.setInt(120, this.undeadPSecs);\n/* */ \n/* 629 */ ps.setString(121, this.name);\n/* 630 */ ps.setFloat(122, this.calories);\n/* 631 */ ps.setFloat(123, this.carbs);\n/* 632 */ ps.setFloat(124, this.fats);\n/* 633 */ ps.setFloat(125, this.proteins);\n/* */ \n/* 635 */ ps.setInt(126, this.secondTitle);\n/* */ \n/* 637 */ ps.executeUpdate();\n/* 638 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ \n/* 640 */ Players.getInstance().registerNewKingdom(this.wurmid, this.kingdom);\n/* */ \n/* 642 */ ps = dbcon.prepareStatement(\"DELETE FROM FRIENDS WHERE WURMID=?\");\n/* 643 */ ps.setLong(1, this.wurmid);\n/* 644 */ ps.executeUpdate();\n/* 645 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ \n/* 647 */ if (this.friends != null)\n/* */ {\n/* 649 */ for (int x = 0; x < this.friends.length; x++) {\n/* */ \n/* 651 */ ps = dbcon.prepareStatement(INSERT_FRIEND);\n/* 652 */ ps.setLong(1, this.wurmid);\n/* 653 */ ps.setLong(2, this.friends[x]);\n/* 654 */ ps.setByte(3, this.friendcats[x]);\n/* 655 */ ps.executeUpdate();\n/* 656 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ } \n/* */ }\n/* */ \n/* 660 */ ps = dbcon.prepareStatement(\"DELETE FROM IGNORED WHERE WURMID=?\");\n/* 661 */ ps.setLong(1, this.wurmid);\n/* 662 */ ps.executeUpdate();\n/* 663 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ \n/* 665 */ if (this.ignored != null)\n/* */ {\n/* 667 */ for (int x = 0; x < this.ignored.length; x++) {\n/* */ \n/* 669 */ ps = dbcon.prepareStatement(INSERT_IGNORED);\n/* 670 */ ps.setLong(1, this.wurmid);\n/* 671 */ ps.setLong(2, this.ignored[x]);\n/* 672 */ ps.executeUpdate();\n/* 673 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ } \n/* */ }\n/* */ \n/* 677 */ if (this.enemies != null)\n/* */ {\n/* 679 */ for (int x = 0; x < this.enemies.length; x++) {\n/* */ \n/* 681 */ ps = dbcon.prepareStatement(INSERT_ENEMY);\n/* 682 */ ps.setLong(1, this.wurmid);\n/* 683 */ ps.setLong(2, this.enemies[x]);\n/* 684 */ ps.executeUpdate();\n/* 685 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ } \n/* */ }\n/* */ \n/* 689 */ if (this.titleArr.length > 0)\n/* */ {\n/* 691 */ for (int x = 0; x < this.titleArr.length; x++) {\n/* */ \n/* 693 */ Titles.Title t = Titles.Title.getTitle(this.titleArr[x]);\n/* 694 */ if (t != null) {\n/* */ \n/* 696 */ ps = dbcon.prepareStatement(\"INSERT INTO TITLES (WURMID,TITLEID,TITLENAME) VALUES(?,?,?)\");\n/* 697 */ ps.setLong(1, this.wurmid);\n/* 698 */ ps.setInt(2, this.titleArr[x]);\n/* 699 */ ps.setString(3, t.getName(true));\n/* 700 */ ps.executeUpdate();\n/* 701 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ } \n/* */ } \n/* */ }\n/* */ \n/* 706 */ if (this.hasAwards) {\n/* */ \n/* 708 */ ps = dbcon.prepareStatement(\"DELETE FROM AWARDS WHERE WURMID=?\");\n/* 709 */ ps.setLong(1, this.wurmid);\n/* 710 */ ps.executeUpdate();\n/* 711 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ \n/* 713 */ ps = dbcon.prepareStatement(\"INSERT INTO AWARDS(WURMID, DAYSPREM, MONTHSPREM, MONTHSEVER, CONSECMONTHS, SILVERSPURCHASED, LASTTICKEDPREM, CURRENTLOYALTY, TOTALLOYALTY) VALUES(?,?,?,?,?,?,?,?,?)\");\n/* 714 */ ps.setLong(1, this.wurmid);\n/* 715 */ ps.setInt(2, this.daysPrem);\n/* 716 */ ps.setInt(3, this.monthsPaidSinceReset);\n/* 717 */ ps.setInt(4, this.monthsPaidEver);\n/* 718 */ ps.setInt(5, this.monthsPaidInARow);\n/* 719 */ ps.setInt(6, this.silverPaidEver);\n/* 720 */ ps.setLong(7, this.lastTicked);\n/* 721 */ ps.setInt(8, this.currentLoyaltyPoints);\n/* 722 */ ps.setInt(9, this.totalLoyaltyPoints);\n/* 723 */ ps.executeUpdate();\n/* 724 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* */ } \n/* 726 */ if (this.cooldowns.size() > 0)\n/* */ {\n/* 728 */ Cooldowns cd = Cooldowns.getCooldownsFor(this.wurmid, true);\n/* 729 */ for (Map.Entry<Integer, Long> ent : this.cooldowns.entrySet())\n/* */ {\n/* 731 */ cd.addCooldown(((Integer)ent.getKey()).intValue(), ((Long)ent.getValue()).longValue(), false);\n/* */ }\n/* */ }\n/* */ \n/* 735 */ } catch (SQLException sqex) {\n/* */ \n/* 737 */ logger.log(Level.WARNING, this.name + \" \" + sqex.getMessage(), sqex);\n/* 738 */ throw new IOException(sqex);\n/* */ }\n/* */ finally {\n/* */ \n/* 742 */ DbUtilities.closeDatabaseObjects(ps, null);\n/* 743 */ DbConnector.returnConnection(dbcon);\n/* */ } \n/* */ }", "@Override\n\tpublic void save() {\n\t\tSystem.out.println(\"save method\");\n\t}", "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Override\n\tpublic void save() {\n\t\t\n\t}", "public void saveScreenInfo(ScreenInfo screenInfo){\r\n ArrayList<Seat> listOfSeats = getSeatsFromScreenInfo(screenInfo);\r\n for(Seat seat : listOfSeats){\r\n seatsRepository.save(seat);\r\n }\r\n }", "private void SaveStudentInfo() {\n EditText _fullName = (EditText) findViewById(R.id.editTextFullName);\n EditText _birthdate = (EditText) findViewById(R.id.dateBirthday);\n EditText _fullStreetAddress = (EditText) findViewById(R.id.editTextFullAddress);\n EditText _contactPhone = (EditText) findViewById(R.id.editTextContactPhone);\n EditText _contactEmail = (EditText) findViewById(R.id.editTextContactEmail);\n EditText _parentNames = (EditText) findViewById(R.id.editTextParentNames);\n EditText _defaultRate = (EditText) findViewById(R.id.numberRate);\n EditText _notes = (EditText) findViewById(R.id.editTextNotes);\n\n // ***** Create the Student Object\n Student _student = new Student();\n\n // ***** Set the field values\n _student.fullName = String.valueOf(_fullName.getText());\n _student.birthDate = String.valueOf(_birthdate.getText());\n _student.fullAddress = String.valueOf(_fullStreetAddress.getText());\n _student.contactPhone = String.valueOf(_contactPhone.getText());\n _student.contactEmail = String.valueOf(_contactEmail.getText());\n _student.parentNames = String.valueOf(_parentNames.getText());\n\n // ***** Convert to a double to store in database for calulations\n _student.defaultRate = Double.valueOf(String.valueOf(_defaultRate.getText()));\n\n _student.notes = String.valueOf(_notes.getText());\n\n // **** Save the student information\n _myDb.setStudentInfo(_student);\n\n\n }", "@Override\r\n\tpublic void save() throws SaveException {\n\t\t\r\n\t}", "void saveShipment(Shipment shipment);", "void saveCurrentStation();", "@Override\r\n\tpublic void save() {\n\r\n\t}", "@Override\r\n\tpublic void save() {\n\r\n\t}", "protected void activitySaveInDb(CustomApplicationInfo cai) {\n\t\tinitDb();\n\t\tdbAccess.insert(cai);\n\t}", "public void save()\n\t{\t\n\t\tfor (Preis p : items) {\n\t\t\titmDAO.create(p.getItem());\n\t\t\tprcDAO.create(p);\n\t\t}\n\t\tstrDAO.create(this);\n\t}", "private void saveInfoFields() {\n\n\t\tString name = ((EditText) getActivity().findViewById(R.id.profileTable_name))\n\t\t\t\t.getText().toString();\n\t\tint weight = Integer\n\t\t\t\t.parseInt(((EditText) getActivity().findViewById(R.id.profileTable_weight))\n\t\t\t\t\t\t.getText().toString());\n\t\tboolean isMale = ((RadioButton) getActivity().findViewById(R.id.profileTable_male))\n\t\t\t\t.isChecked();\n\t\tboolean smoker = ((CheckBox) getActivity().findViewById(R.id.profileTable_smoker))\n\t\t\t\t.isChecked();\n\t\tint drinker = (int) ((RatingBar) getActivity().findViewById(R.id.profileTable_drinker))\n\t\t\t\t.getRating();\n\n\t\tif (!name.equals(storageMan.PrefsName)) {\n\t\t\tstorageMan = new StorageMan(getActivity(), name);\n\t\t}\n\n\t\tstorageMan.saveProfile(new Profile(weight, drinker, smoker, isMale));\n\t\t\n\t\ttoast(\"pref saved\");\n\t}", "private void saveStudent() {\n // Check that every required field has been filled in with valid parameters\n if (!checkUserInputValidity()) {\n return;\n }\n\n // Insert the new student info into the database\n if (isEditStudent) {\n updateStudentOnFirebaseDatabase();\n } else {\n // Make a unique id for the student\n String studentId = UUID.randomUUID().toString();\n saveNewStudentToFirebaseDatabase(studentId);\n }\n }", "private void save() {\r\n\t\tif (Store.save()) {\r\n\t\t\tSystem.out.println(\" > The store has been successfully saved in the file StoreData.\\n\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\" > An error occurred during saving.\\n\");\r\n\t\t}\r\n\t}", "private void saveData(){\n\t\tdataBase=mHelper.getWritableDatabase();\n\t\tContentValues values=new ContentValues();\n\t\t\n\t\tvalues.put(DbHelper.KEY_NNAME,nname);\n\t\t//values.put(DbHelper.KEY_LNAME,lname );\n\t\t\n\t\tSystem.out.println(\"\");\n\t\tif(isUpdate)\n\t\t{ \n\t\t\t//update database with new data \n\t\t\tdataBase.update(DbHelper.TABLE_NOTE, values, DbHelper.KEY_ID+\"=\"+id, null);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//insert data into database\n\t\t\tdataBase.insert(DbHelper.TABLE_NOTE, null, values);\n\t\t}\n\t\t//close database\n\t\tdataBase.close();\n\t\tfinish();\n\t\t\n\t\t\n\t}", "protected abstract void doSave();", "public void saveRecord(IStudentUnitRecord studentUnitRecord)\n {\n for (Element element : (List<Element>)\n XmlManager.getInstance().getDocument().getRootElement()\n .getChild(\"studentUnitRecordTable\")\n .getChildren(\"record\")) {\n Integer studentId = studentUnitRecord.getStudentId();\n String recordStudentId = element.getAttributeValue(\"sid\");\n\n String unitCode = studentUnitRecord.getUnitCode();\n String recordUnitCode = element.getAttributeValue(\"uid\");\n\n if (studentId.toString().equals(recordStudentId) &&\n unitCode.equals(recordUnitCode)) {\n String assignment1Mark =\n new Float(studentUnitRecord.getAssignment1Mark()).toString();\n String assignment2Mark =\n new Float(studentUnitRecord.getAssignment2Mark()).toString();\n String examMark =\n new Float(studentUnitRecord.getExamMark()).toString();\n\n element.setAttribute(\"asg1\", assignment1Mark);\n element.setAttribute(\"asg2\", assignment2Mark);\n element.setAttribute(\"exam\", examMark);\n\n //write out the XML file for continuous save\n XmlManager.getInstance().saveDocument();\n\n return;\n }\n }\n\n throw new RuntimeException(\"DBMD: saveRecord : \" +\n \"no such student record in data\");\n }", "public void saveExisting() {\r\n Part modifiedPart = null;\r\n for (Part part : Inventory.getAllParts()) {\r\n if (Integer.parseInt(iDfield.getText()) == part.getId()) {\r\n modifiedPart = part;\r\n }\r\n }\r\n if (modifiedPart instanceof Outsourced && inHouseSelected) {\r\n replacePart(modifiedPart);\r\n\r\n } else if (modifiedPart instanceof InHouse && !inHouseSelected) {\r\n replacePart(modifiedPart);\r\n } else {\r\n modifiedPart.setName(nameField.getText());\r\n modifiedPart.setStock(Integer.parseInt(invField.getText()));\r\n modifiedPart.setPrice(Double.parseDouble(priceField.getText()));\r\n modifiedPart.setMax(Integer.parseInt(maxField.getText()));\r\n modifiedPart.setMin(Integer.parseInt(minField.getText()));\r\n if (inHouseSelected) {\r\n ((InHouse) modifiedPart).setMachineId(Integer.parseInt(machineOrCompanyField.getText()));\r\n } else {\r\n ((Outsourced) modifiedPart).setCompanyName(machineOrCompanyField.getText());\r\n }\r\n\r\n Inventory.updatePart(Inventory.getAllParts().indexOf(modifiedPart), modifiedPart);\r\n }\r\n\r\n }", "public void persistVisit(Visit visit) throws SQLException{\n\t\tpersistPlace(visit.getPlace());\n\t\t\n\t\tString readPlacePKQuery = \"SELECT id FROM Place WHERE name = ? AND descriptionFile = ?\";\n\t\tString insertVisitQuery = \"INSERT INTO Visit (visitTime, price, id_place) VALUES (?,?,?)\";\n\n\t\t//Then, get the primary key of the Place\n\t\tPreparedStatement preparedStatement = conn.prepareStatement(readPlacePKQuery);\n\t\t\n\t\tpreparedStatement.setString(1, visit.getPlace().getName());\n\t\tpreparedStatement.setString(2, visit.getPlace().getDescriptionFile());\n\t\t\n\t\tResultSet result = preparedStatement.executeQuery();\n\t\tresult.next();\n\t\t\n\t\tint placePK = result.getInt(\"id\");\n\t\t\n\t\tpreparedStatement.close();\n\n\t\t//Set visit in the database\n\t\tpreparedStatement = conn.prepareStatement(insertVisitQuery);\n\t\t\n\t\tpreparedStatement.setFloat(1, visit.getTime());\n\t\tpreparedStatement.setFloat(2, visit.getPrice());\n\t\tpreparedStatement.setInt(3, placePK);\n\n\t\tpreparedStatement.executeUpdate();\n\n\t\tpreparedStatement.close();\n\t}", "@Override\r\n\tpublic void persist(Seat seatHoldState, SeatState value) {\n\t\t\r\n\t}", "private void save() {\n Saver.saveTeam(team);\n }", "public void save(RaceSituation raceSituation);", "private void store()\tthrows DAOSysException\t\t{\n\t\tif (_debug) System.out.println(\"AL:store()\");\n\t\tAnnualLeaseDAO dao = null;\n\t\ttry\t{\n\t\t\tdao = getDAO();\n\t\t\tdao.dbStore(getModel());\n\t\t} catch (Exception ex)\t{\n\t\t\tthrow new DAOSysException(ex.getMessage());\n\t\t}\n\t}", "Skill saveSkill(Skill skill);", "public boolean addOrUpdateInsurance(InsuranceModel insuranceDetails) {\n //Use the Cached Connection\n SQLiteDatabase db = getWritableDatabase();\n Boolean transactionSuccessful = false;\n\n //As usual Wrap it in a transaction\n db.beginTransaction();\n try {\n ContentValues values = new ContentValues();\n values.put(KEY_INSURANCE_OBJECT_ID, insuranceDetails.getInsuranceObjectId());\n values.put(KEY_INSURANCE_NAME, insuranceDetails.getInsuranceName());\n values.put(KEY_INSURANCE_IMAGE, insuranceDetails.getInsuranceImage());\n values.put(KEY_INSURANCE_ADDRESS, insuranceDetails.getInsuranceAddress());\n values.put(KEY_INSURANCE_SWIFT_CODE, insuranceDetails.getInsuranceSwiftCode());\n values.put(KEY_INSURANCE_STOCK_CODE, insuranceDetails.getInsuranceStockCode());\n values.put(KEY_INSURANCE_DESCRIPTION, insuranceDetails.getInsuranceDescription());\n values.put(KEY_INSURANCE_ESTABLISHED, insuranceDetails.getInsuranceEstablished());\n values.put(KEY_INSURANCE_CONTACTS, insuranceDetails.getInsuranceContacts());\n values.put(KEY_INSURANCE_TYPE, insuranceDetails.getInsuranceType());\n values.put(KEY_INSURANCE_WEBSITE, insuranceDetails.getInsuranceWebsite());\n values.put(KEY_INSURANCE_STATUS, insuranceDetails.getInsuranceStatus());\n values.put(KEY_INSURANCE_SUMMARY, insuranceDetails.getInsuranceSummary());\n //Let's try to update the Saved Product if it exists.\n int rows = db.update(TABLE_INSURANCE, values, KEY_INSURANCE_OBJECT_ID + \"= ?\", new String[]{insuranceDetails.getInsuranceObjectId()});\n\n //Let's check if the update worked\n if (rows == 1) {\n //Ok, we have updated a Saved Insurance Agency, we could probably get the Insurance updated at this point if we needed to\n db.setTransactionSuccessful();\n transactionSuccessful = true;\n\n } else {\n //No Such Insurance Here, insert it\n db.insertOrThrow(TABLE_INSURANCE, null, values);\n db.setTransactionSuccessful();\n transactionSuccessful = true;\n }\n } catch (Exception e) {\n Log.d(TAG, \"Error trying to Update Insurance table\");\n transactionSuccessful = false;\n } finally {\n db.endTransaction();\n }\n return transactionSuccessful;\n\n }", "private void saveDatabaseSettings() {\r\n\r\n\t\t// --- Get new database ID --------------------------------------------\r\n\t\tint newID = 0;\r\n\t\tString newIDString = this.getJTextFieldDatabaseID().getText();\r\n\t\tif (newIDString!=null && newIDString.isEmpty()==false) {\r\n\t\t\ttry {\r\n\t\t\t\tnewID = Integer.parseInt(newIDString); \r\n\t\t\t} catch (Exception e) {\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// --- Save in the preferences ----------------------------------------\r\n\t\tBundleHelper.setIdScenarioResultForSetup(newID);\r\n\t}", "Patient save(Patient patient);", "String saveIncident( Incident incident );", "private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }", "public void storeValues() throws SQLException { //store values into the database\n \tstoreValuesDump();\n \tstoreValuesMatl();\n }", "int insert(ac_teacher_instrument record);", "@Override\r\n\tpublic Disease save(Disease disease) {\r\n\r\n\t\t// setting logger info\r\n\t\tlogger.info(\"save the details of the disease\");\r\n\t\treturn diseaseRepo.save(disease);\r\n\t}", "public void save() {\r\n IniReader.write(FILE_NAME, \"x\", x, \"y\", y, \"fullscreen\", fullscreen, \"controlType\", controlType, \"vol\", volMul,\r\n \"keyUpMouse\", getKeyUpMouseName(), \"keyDownMouse\", getKeyDownMouseName(), \"keyUp\", getKeyUpName(), \"keyDown\", keyDownName,\r\n \"keyLeft\", keyLeftName, \"keyRight\", keyRightName, \"keyShoot\", keyShootName, \"keyShoot2\", getKeyShoot2Name(),\r\n \"keyAbility\", getKeyAbilityName(), \"keyEscape\", getKeyEscapeName(), \"keyMap\", keyMapName, \"keyInventory\", keyInventoryName,\r\n \"keyTalk\", getKeyTalkName(), \"keyPause\", getKeyPauseName(), \"keyDrop\", getKeyDropName(), \"keySellMenu\", getKeySellMenuName(),\r\n \"keyBuyMenu\", getKeyBuyMenuName(), \"keyChangeShipMenu\", getKeyChangeShipMenuName(), \"keyHireShipMenu\", getKeyHireShipMenuName());\r\n }", "public void save() {\n\t\tInputManager.resetWriter(false);\n\t\tInputManager.writer(InputManager.newDelimeterOne + \" \" + InputManager.newDelimeterTwo);\n\t\tfor(Row r: rows) {\n\t\t\tInputManager.writer(r.toString());\n\t\t}\n\t}", "public static void saveRecord(Instance ins) throws SQLException {\n String myDriver = \"com.mysql.jdbc.Driver\";\n String myUrl = \"jdbc:mysql://localhost/SSO\";\n Connection conn = null;\n\n try {\n Class.forName(myDriver);\n conn = DriverManager.getConnection(myUrl, \"root\", \"1235s2gip-\");\n\n // the mysql insert statement\n String query = \" insert into Driller (survey, creationDate, consecutive, section, location, answer, questionOrder,question, question_type, question_allowedValues)\"\n + \" values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n\n // create the mysql insert preparedstatement\n PreparedStatement preparedStmt = conn.prepareStatement(query);\n preparedStmt.setString(1, ins.getSurvey());\n preparedStmt.setDate(2, new java.sql.Date(ins.getCreationDate().getTime()));\n preparedStmt.setInt(3, ins.getConsecutive());\n preparedStmt.setString(4, ins.getSection());\n preparedStmt.setString(5, ins.getLocation());\n preparedStmt.setString(6, ins.getAnswer());\n preparedStmt.setString(7, ins.getQuestionOrder());\n preparedStmt.setString(8, ins.getQuestion());\n preparedStmt.setString(9, ins.getQuestion_type());\n preparedStmt.setString(10, ins.getQuestion_allowedValues());\n\n // execute the preparedstatement\n preparedStmt.execute();\n } catch (Exception e) {\n System.err.println(\"Got an exception!\");\n System.err.println(e.getMessage());\n e.printStackTrace();\n }\n finally {\n if(conn != null){\n conn.close();\n }\n }\n }", "private void saveSamples(boolean charging, long diffTime) {\n int sampleIndex = store.getInt(charging ? chargingSampleId : disChargingSampleId, -1);\n\n //starts with id 1 in database\n if (sampleIndex == -1)\n sampleIndex = 1;\n //only maximum of 10 samples required.\n if (sampleIndex > 10)\n sampleIndex = 1;\n\n if (!charging) {\n dischargingSampleViewModel.insert(new DischargingSampleModel(sampleIndex, diffTime));\n } else {\n chargingSampleViewModel.insert(new ChargingSampleModel(sampleIndex, diffTime));\n }\n logStatic(\"New sample found for \" +\n (charging ? \"charging\" : \"discharging\") + \" at level \" +\n store.getInt(bat_level) + \" id \" + sampleIndex);\n\n //increment the sample id\n store.setInt(charging ? chargingSampleId : disChargingSampleId, 1 + 1);\n }", "public void setInstrumentType(String instrumentType) {\n this.instrumentType = instrumentType;\n }", "public void save() {\n MidiFileIO.saveMIDIFile(sequence);\n }", "int updateByPrimaryKey(IrpSignInfo record) throws SQLException;", "private boolean savingData(Track track){\n return sqLiteController.SAVE_TRACK_DATA(track);\n }", "public interface InstrumentDao<T extends Instrument> {\r\n\r\n /**\r\n * Persists a given instrument\r\n *\r\n * @param instrument\r\n * Instrument to save, this can be stock, fx or any other financial instrument\r\n *\r\n * @return boolean if saved successfully\r\n *\r\n * @throws DaoException\r\n * in case of any connection issues or cache issues (if it is stored in memory)\r\n **/\r\n boolean saveInstrument(T instrument) throws DaoException;\r\n\r\n /**\r\n * Delete a given instrument\r\n *\r\n * @param instrument\r\n * Instrument to delete, this can be stock, fx or any other financial instrument\r\n *\r\n * @return boolean if removed successfully\r\n *\r\n * @throws DaoException\r\n * in case of any connection issues or cache issues (if it is stored in memory)\r\n *\r\n * @throws InstrumentNotFoundException\r\n * if the given instrument is not found\r\n **/\r\n boolean deleteInstrument(T instrument) throws DaoException, InstrumentNotFoundException;\r\n\r\n\r\n /**\r\n * Find a instrument for given ticker\r\n *\r\n * @param ticker\r\n * Instrument to find, this can be stock, fx or any other financial instrument\r\n *\r\n * @return T if found\r\n *\r\n * @throws DaoException\r\n * in case of any connection issues or cache issues (if it is stored in memory)\r\n *\r\n * @throws InstrumentNotFoundException\r\n * if the given instrument is not found\r\n **/\r\n T getInstrument(String ticker) throws DaoException, InstrumentNotFoundException;\r\n\r\n\r\n /**\r\n * Find all instruments\r\n *\r\n * @return List if found\r\n *\r\n * @throws DaoException\r\n * in case of any connection issues or cache issues (if it is stored in memory)\r\n *\r\n * @throws InstrumentNotFoundException\r\n * if the given instrument is not found\r\n **/\r\n List<T> getInstruments() throws DaoException, InstrumentNotFoundException;\r\n}", "public final /* synthetic */ void saveToDb() {\n DruidPooledConnection druidPooledConnection;\n DruidPooledConnection druidPooledConnection2;\n block18: {\n block17: {\n StringBuilder stringBuilder;\n PreparedStatement preparedStatement;\n MaplePet a2;\n if (!a2.a) {\n return;\n }\n try {\n druidPooledConnection2 = DBConPool.getInstance().getDataSource().getConnection();\n try {\n preparedStatement = druidPooledConnection2.prepareStatement(ConcurrentEnumMap.ALLATORIxDEMO(\";\\t*\\u0018:\\u001cN)\\u000b-\\u001dy=\\u001c:y\\u00008\\u0003<NdNfBy\\u0002<\\u0018<\\u0002ySyQuN:\\u00026\\u001d<\\u0000<\\u001d*NdNfBy\\b,\\u00025\\u0000<\\u001d*NdNfBy\\u001d<\\r6\\u0000=\\u001dySyQuN?\\u00028\\t*NdNfBy\\u000b!\\r5\\u001b=\\u000b=NdNfNuN*\\u001e<\\u000b=NdNfBy\\f,\\b?\\u001d2\\u00075\\u00020\\nySyQuN:\\u000f7>0\\r2;)NdNfBy\\u001d2\\u00075\\u00020\\nySyQy9\\u0011+\\u000b+y\\u001e<\\u001a0\\nySyQ\"));\n try {\n int n2;\n PreparedStatement preparedStatement2 = preparedStatement;\n PreparedStatement preparedStatement3 = preparedStatement;\n preparedStatement.setString(1, a2.h);\n preparedStatement3.setByte(2, a2.e);\n preparedStatement3.setShort(3, a2.B);\n preparedStatement2.setByte(4, a2.H);\n preparedStatement2.setInt(5, a2.J);\n preparedStatement.setShort(6, a2.k);\n stringBuilder = new StringBuilder();\n int n3 = n2 = 0;\n while (n3 < a2.d.length) {\n stringBuilder.append(a2.d[n2]);\n stringBuilder.append(KoreanDateUtil.ALLATORIxDEMO(\"V\"));\n n3 = ++n2;\n }\n }\n catch (Throwable throwable) {\n Throwable throwable2;\n if (preparedStatement != null) {\n try {\n preparedStatement.close();\n throwable2 = throwable;\n throw throwable2;\n }\n catch (Throwable throwable3) {\n throwable.addSuppressed(throwable3);\n }\n }\n throwable2 = throwable;\n throw throwable2;\n }\n }\n catch (Throwable throwable) {\n Throwable throwable4;\n if (druidPooledConnection2 != null) {\n try {\n druidPooledConnection2.close();\n throwable4 = throwable;\n throw throwable4;\n }\n catch (Throwable throwable5) {\n throwable.addSuppressed(throwable5);\n }\n }\n throwable4 = throwable;\n throw throwable4;\n }\n }\n catch (SQLException sQLException) {\n FilePrinter.printError(ConcurrentEnumMap.ALLATORIxDEMO(\"\\u0014\\u000f)\\u0002<><\\u001aw\\u001a!\\u001a\"), sQLException, KoreanDateUtil.ALLATORIxDEMO(\"e\\u001b`\\u001fB\\u0015R\\u0018\"));\n return;\n }\n {\n String string = stringBuilder.toString();\n PreparedStatement preparedStatement4 = preparedStatement;\n PreparedStatement preparedStatement5 = preparedStatement;\n PreparedStatement preparedStatement6 = preparedStatement;\n String string2 = string;\n preparedStatement6.setString(7, string2.substring(0, string2.length() - 1));\n preparedStatement6.setInt(8, a2.ALLATORIxDEMO);\n preparedStatement5.setInt(9, a2.I);\n preparedStatement5.setShort(10, a2.K);\n preparedStatement4.setInt(11, a2.M);\n preparedStatement4.setInt(12, a2.D);\n preparedStatement4.executeUpdate();\n a2.a = false;\n if (preparedStatement == null) break block17;\n druidPooledConnection = druidPooledConnection2;\n }\n preparedStatement.close();\n break block18;\n }\n druidPooledConnection = druidPooledConnection2;\n }\n if (druidPooledConnection == null) return;\n druidPooledConnection2.close();\n }" ]
[ "0.6983554", "0.59814423", "0.58334816", "0.5804333", "0.571158", "0.5646956", "0.5581581", "0.5452367", "0.542579", "0.542466", "0.53989536", "0.5371494", "0.5366872", "0.53552157", "0.532824", "0.5311451", "0.53113914", "0.5286401", "0.52766854", "0.5271224", "0.5242918", "0.5239626", "0.52308553", "0.5227981", "0.5210139", "0.5210139", "0.5210139", "0.5210139", "0.52074516", "0.52074516", "0.52074516", "0.519175", "0.51698077", "0.51655203", "0.5162726", "0.5149817", "0.51394325", "0.51378465", "0.5116817", "0.5116472", "0.51090586", "0.51065964", "0.50915426", "0.50788903", "0.5069393", "0.50691915", "0.5061193", "0.5056797", "0.50511205", "0.50494504", "0.5045679", "0.50440484", "0.50418836", "0.5041803", "0.504012", "0.503614", "0.5034645", "0.50339925", "0.5033822", "0.5033822", "0.50210273", "0.50048894", "0.50009084", "0.49998555", "0.4997506", "0.4991612", "0.4991612", "0.49897215", "0.49877366", "0.49872375", "0.4977946", "0.4972131", "0.49688008", "0.49661615", "0.49631298", "0.4960612", "0.49602756", "0.49579716", "0.49531186", "0.4951485", "0.4948761", "0.49460003", "0.49370903", "0.49355358", "0.4932621", "0.49318948", "0.4927141", "0.4925117", "0.49229383", "0.4914966", "0.49125642", "0.49112895", "0.491023", "0.49094266", "0.490872", "0.49078932", "0.4905724", "0.49029657", "0.4897143", "0.48942703" ]
0.6520108
1
Deletes the instrument info from the database.
public void deleteInstrumentInfo(BrokerID brokerID, Instrument instrument) throws PersistenceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean deleteInstrument(T instrument) throws DaoException, InstrumentNotFoundException;", "int deleteByPrimaryKey(Integer acTeacherInstrumentId);", "public void delete() {\n \t\t try(Connection con = DB.sql2o.open()) {\n \t\t\t String sql = \"DELETE FROM sightings where id=:id\";\n\t\t\t con.createQuery(sql)\n\t\t\t.addParameter(\"id\", this.id)\n\t\t\t.executeUpdate();\n\n \t\t }\n \t }", "int deleteByPrimaryKey(Long signinfoid) throws SQLException;", "public void deleteInsurance(Insurance insurance) throws DataAccessException;", "@Override\r\n\tpublic void delInfoById(int id) {\n\t\tpulseDao.delete(id);\r\n\t}", "@Delete({\n \"delete from SWMS_stock_out_record_detail\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n int deleteByPrimaryKey(Long id);", "public void deletePatientByPrimaryKey(long id) throws PatientExn;", "private void clearData() {\r\n em.createQuery(\"delete from MonitoriaEntity\").executeUpdate();\r\n }", "public void delFor(String idi) {\n\t\tourDatabase.delete(DATABASE_TABLE5, Sales_Id + \"=\" +idi, null);\n\t\t\n\t}", "public void deleteDB() {\n \n sql = \"Delete from Order where OrderID = \" + getOrderID();\n db.deleteDB(sql);\n \n }", "public void deleteDevices(){\n SQLiteDatabase db = getWritableDatabase();\n db.execSQL(\"delete from \"+devicesContract.deviceEntry.tableName);\n db.close();\n }", "@Override\r\n\tpublic int deleteDBInfo(AgentDBInfoVO vo){\n\t\treturn sqlSession.getMapper(CollectMapper.class).deleteDBInfo(vo);\r\n\t}", "public void deleteAllData() {\n SQLiteDatabase db = getWritableDatabase();\n db.beginTransaction();\n try {\n db.delete(TABLE_HISTORY, null, null);\n db.delete(TABLE_LASTSCAN, null, null);\n db.delete(TABLE_SENSOR, null, null);\n db.delete(TABLE_SCANS, null, null);\n\n db.setTransactionSuccessful();\n } catch (Exception e) {\n\n } finally {\n db.endTransaction();\n }\n }", "public void deleteInst() {\n\t\tlogger.debug(\"DeviceNameTableTester has been stopped\");\n\t}", "private void delete() {\n\t\tConfiguration conf = new Configuration();\n\t\tconf.configure(\"hibernate.cfg.xml\");\n\t\tSessionFactory sf = conf.buildSessionFactory();\n\t\tSession s = sf.openSession();\n\t\ts.beginTransaction();\n\n\t\tQuery query = s.createQuery(\"delete from OldStudent where name='Michael'\");\n\t\tint count = query.executeUpdate();\n\t\tSystem.out.println(\"Number of Rows Deleted in the oldstudent table=\" + count);\n\n\t\ts.getTransaction().commit();\n\t\ts.clear();// s.evict() on all student objects in session\n\t\tsf.close();\n\n\t}", "public void delete(IncomingReport incoming_report) throws DAOException;", "public void delete() throws SQLException {\r\n\t\t//SQL Statement\r\n\r\n\t\tString sql = \"DELETE FROM \" + table+ \" WHERE \" + col_genreID + \" = ?\";\r\n\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tstmt.setInt(1, this.getGenreID());\r\n\r\n\t\tint rowsDeleted = stmt.executeUpdate();\r\n\t\tSystem.out.println(\"Es wurden \"+rowsDeleted+ \"Zeilen gelöscht\");\r\n\t\tstmt.close();\r\n\t}", "public void deleteData()\n {\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_NAME, null, null);\n //context.deleteDatabase(DATABASE_NAME);\n\n }", "@Override\n public void deleteByPrimaryKey(String id) {\n infoMapper.deleteByPrimaryKey(id);\n }", "public void deleteTableRecords()\n {\n coronaRepository.deleteAll();\n }", "private void deleteDatabase() {\n mOpenHelper.close();\r\n Context context = getContext();\r\n NoteDatabase.deleteDatabase(context);\r\n mOpenHelper = new NoteDatabase(getContext());\r\n }", "@Delete(\"DELETE from patients WHERE id_patient=#{patientId}\")\n void deletePatient(int patientId);", "public void deleteAllStocks(){\n this.open();\n database.execSQL(\"DELETE FROM \" + SQLiteHelper.TABLE_STOCK);\n this.close();\n }", "public void delete() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.delete(this);\r\n\t}", "int deleteByExample(IrpSignInfoExample example) throws SQLException;", "public void delete() {\n\t\ttry {\n\t\t\tStatement stmt = m_db.m_conn.createStatement();\n\t\t\tString sqlString;\n\t\t\tString ret;\n\n\t\t\tsqlString = \"DELETE from country WHERE countryid=\" + m_country_id;\n\t\t\tm_db.runSQL(sqlString, stmt);\n\t\t\tstmt.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\">>>>>>>> EXCEPTION <<<<<<<<\");\n\t\t\tSystem.out.println(\"An Exception occured in delete().\");\n\t\t\tSystem.out.println(\"MESSAGE: \" + e.getMessage());\n\t\t\tSystem.out.println(\"LOCALIZED MESSAGE: \" + e.getLocalizedMessage());\n\t\t\tSystem.out.println(\"CLASS.TOSTRING: \" + e.toString());\n\t\t\tSystem.out.println(\">>>>>>>>>>>>>-<<<<<<<<<<<<<\");\n\t\t}\n\t}", "@Override\n public void removeFromDb() {\n }", "private void deleteTestDataSet() {\n LOG.info(\"deleting test data set...\");\n try {\n Statement stmt = _conn.createStatement();\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_person\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_employee\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_payroll\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_address\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_contract\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_category\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_project\");\n } catch (Exception e) {\n LOG.error(\"deleteTestDataSet: exception caught\", e);\n }\n }", "@Delete\n void delete(Measurement measurement);", "public void delete() throws SQLException {\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n int safeCheck = BusinessFacade.getInstance().checkIDinDB(this.goodID,\n \"orders\", \"goods_id\");\n if (safeCheck == -1) {\n stmtIn.executeUpdate(\"DELETE FROM ngaccount.goods WHERE goods.goods_id = \" +\n this.goodID + \" LIMIT 1;\");\n }\n }", "@DELETE\n public void delete() {\n PersistenceService persistenceSvc = PersistenceService.getInstance();\n try {\n persistenceSvc.beginTx();\n deleteEntity(getEntity());\n persistenceSvc.commitTx();\n } finally {\n persistenceSvc.close();\n }\n }", "@Override\n\tpublic void delete(Long primaryKey) {\n\t\t\n\t}", "public void delete() throws Exception\n {\n dao.delete(this);\n }", "@Override\r\n public void delete(Appointment a) throws SQLException {\r\n int id = a.getAppointmentId();\r\n String statement = \"DELETE FROM appointments WHERE Appointment_ID =\" + id + \";\";\r\n System.out.println(statement);\r\n conn.prepareStatement(statement).executeUpdate();\r\n }", "private void deleteRecord(){\n if (mCurrentSymptomUri != null) {\n // pull out the string value we are trying to delete\n mEditSymptomText = findViewById(R.id.edit_symptoms);\n String deleteTry = mEditSymptomText.getText().toString();\n\n // set up the ContentProvider query\n String[] projection = {_IDST, SymTraxContract.SymTraxTableSchema.C_SYMPTOM};\n String selectionClause = SymTraxContract.SymTraxTableSchema.C_SYMPTOM + \" = ? \";\n String[] selectionArgs = {deleteTry};\n\n Cursor c = getContentResolver().query(\n SYM_TRAX_URI,\n projection,\n selectionClause,\n selectionArgs,\n null );\n\n // if there are no instances of the deleteTry string in the Machines DB\n // Go ahead and try to delete. If deleteTry value is in CMachineType column do not delete (no cascade delete)\n if (!c.moveToFirst()){\n int rowsDeleted = getContentResolver().delete(mCurrentSymptomUri, null, null);\n if (rowsDeleted == 0) {\n Toast.makeText(this, getString(R.string.delete_record_failure),\n Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, getString(R.string.delete_record_success),\n Toast.LENGTH_SHORT).show();\n }\n c.close();\n finish(); // after deleting field value\n } else {\n c.close();\n showNoCascadeDeleteDialog();\n }\n }\n }", "public void clearDatabase() {\n\n\t\tObjectSet<Article> articles = db.query(Article.class);\n\t\tarticles.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<CreditCard> creditCards = db.query(CreditCard.class);\n\t\tcreditCards.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<Customer> customers = db.query(Customer.class);\n\t\tcustomers.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<Order> orders = db.query(Order.class);\n\t\torders.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<OrderDetail> orderDetails = db.query(OrderDetail.class);\n\t\torderDetails.stream()\n\t\t\t.forEach(db::delete);\n\t\t\n\t\tSystem.out.println(\"\\nBase de dades esborrada per complet\");\n\t}", "public synchronized void delete() {\n if (this.swigCPtr != 0) {\n if (this.swigCMemOwn) {\n this.swigCMemOwn = false;\n libVisioMoveJNI.delete_VgIDatabaseDatasetDescriptor(this.swigCPtr);\n }\n this.swigCPtr = 0;\n }\n }", "public void adm1() {\n\t\ttry { // Delete all table contents\n\t\t\tstatement = connection.createStatement();\n\t\t\tstatement.executeQuery(\"delete from PLANE\");\n\t\t\tstatement.executeQuery(\"delete from FLIGHT\");\n\t\t\tstatement.executeQuery(\"delete from PRICE\");\n\t\t\tstatement.executeQuery(\"delete from CUSTOMER\");\n\t\t\tstatement.executeQuery(\"delete from RESERVATION\");\n\t\t\tstatement.executeQuery(\"delete from DETAIL\");\n\t\t\tstatement.executeQuery(\"delete from OUR_DATE\");\n\t\t\tstatement.executeQuery(\"delete from AIRLINE\");\n\t\t} catch(SQLException Ex) {System.out.println(\"Error running the sample queries. Machine Error: \" + Ex.toString());}\n\t\tSystem.out.println(\"DATABASE ERASED\");\n\t}", "public void deleteAllArtisti() throws RecordCorrelatoException;", "@Override\n\tpublic void delete() {\n\t\tSystem.out.println(\"Mysql DB 서버에 접속해서 삭제를 하다.\");\n\t}", "@Override\n\tpublic MahasiswaModel delete(String nik) throws SQLException {\n\t\tdeleteStatement.setString(1, nik);\n\t\tdeleteStatement.executeUpdate();\n\t\treturn null;\n\t}", "public void deleteRecord() {\n// foods.clear();\n// try {\n// FoodRecordDao dao = new FoodRecordDao();\n// dao.saveFoodRecords(foods);\n// } catch (DaoException ex) {\n// Logger.getLogger(FoodLogViewController.class.getName()).log(Level.SEVERE, null, ex);\n// }\n }", "public void clearDatabase() {\n\t\tstudentRepository.deleteAll();\n\t}", "@Override\n public void run() {\n\n String filename = \"PurgeTable\";\n\n PreparedStatement stmt1 = null;\n try {\n stmt1 = conn.prepareStatement(\"delete from \" + filename);\n stmt1.executeUpdate();\n System.out.println(\"Deletion successful\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public void clearDatabase();", "@Override\r\n\tpublic void deleteReport(String taxId) throws SQLException {\n\t\treportDao.deleteReport(taxId);\r\n\t}", "@Delete({\n \"delete from A_SUIT_MEASUREMENT\",\n \"where user_id = #{userId,jdbcType=INTEGER}\",\n \"and measure_date = #{measureDate,jdbcType=TIMESTAMP}\"\n })\n int deleteByPrimaryKey(@Param(\"userId\") Integer userId, @Param(\"measureDate\") Date measureDate);", "public static void delete(long diseaseNum) throws Exception {\n String command = \"DELETE FROM disease \" + \"WHERE DiseaseNum = \" + POut.long(diseaseNum);\n Db.nonQ(command);\n }", "protected void deleteRecord() throws DAOException {\r\n\t\t// Elimina relaciones\r\n\t\tfor (Sedrelco relco : object.getRelcos()) {\r\n\t\t\tsedrelcoDao.delete(relco);\r\n\t\t}\r\n\t\t// Elimina objeto\r\n\t\tobjectDao.delete(object);\r\n\t}", "public static void deleteDatabase() {\n\n deleteDatabaseHelper(Paths.get(DATA_DIR));\n\n }", "public void delete(IQuery query) throws SQLException;", "public void deleteUpsos() {\n SQLiteDatabase db = this.getWritableDatabase();\n // Delete All Rows\n db.delete(TABLE_UPSO, null, null);\n db.close();\n\n Log.d(TAG, \"Deleted all upso info from sqlite\");\n }", "public void delete() throws SQLException {\n DatabaseConnector.updateQuery(\"DELETE FROM course \"\n + \"WHERE courseDept='\" + this.courseDept \n + \"' AND courseNum = '\" + this.courseNum + \"'\");\n }", "@Override\n public void delete(Seq s) {\n // TODO Auto-generated method stub\n \t//Establish cnx\n\t\tConnection conn = null;\n\t\tString url = \"jdbc:sqlite:src\\\\database\\\\AT2_Mobile.db\";\n\t\t\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(url);\n\t\t\tPreparedStatement myStmt; \n\t\t\tString query = \"delete from seq where id = ?\";\n\t\t\tmyStmt = conn.prepareStatement(query);\n\t\t\t\n\t\t\t// Set Parameters\n\t myStmt.setInt(1, s.getId());\n\t\t\t// Execute SQL query\n\t int res = myStmt.executeUpdate();\n\t \n\t // Display the record inserted\n\t System.out.println(res + \" seq deleted\");\n\t \n\t // Close the connection\n\t conn.close();\n\t\t}catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());}\n\t\t\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException ex) {\n\t\t\t\tSystem.out.println(ex.getMessage());\n\t\t\t}\n\t\t\t}\n \t \n }", "public void deleteDB() {\n File dbFile = new File(dbPath + dbName);\n if (dbFile.exists()) {\n dbFile.delete();\n }\n }", "@Override\n\tpublic void delete(DatabaseHandler db) {\n\t\tdb.deleteWork(this);\n\t\t\n\t}", "public int deleteByPrimaryKey(Integer institutionid) throws SQLException\n {\n Connection c = null;\n PreparedStatement ps = null;\n try\n {\n c = getConnection();\n ps = c.prepareStatement(\"DELETE from institution WHERE institution.institutionid=?\",ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n Manager.setInteger(ps, 1, institutionid);\n return ps.executeUpdate();\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "@Override\n\tpublic int delete(String name) {\n\t\treturn super.getJdbcTemplate().update(\"DELETE FROM GOODSINFO WHERE NAME=?\", new Object[] { name });\n\t}", "public void Clear() throws DataAccessException {\n try (Statement stmt = conn.createStatement()){\n String sql = \"DELETE FROM Event\";\n stmt.executeUpdate(sql);\n } catch (SQLException e) {\n throw new DataAccessException(\"SQL Error encountered while clearing tables\");\n }\n }", "public void delete() {\r\n\t\tfor (int i = 0; i <= DatabaseUniverse.getDatabaseNumber(); i++) {\r\n\t\t\tif (this.equals(DatabaseUniverse.getDatabases(i))) {\r\n\t\t\t\tDatabaseUniverse.getAllDatabases().set(i, null);\r\n\t\t\t\tDatabaseUniverse.getAllDatabases().remove(i);\r\n\t\t\t\tDatabaseUniverse.setDatabaseNumber(-1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic boolean delete() {\n\t\tString sql=\"DELETE FROM tc_student where id=\"+id;\n\t\t//`\n\t\t\n\t\tSystem.out.println(sql);\n\t\treturn mysql.execute(sql);\n\t}", "public void clearDatabase(){\n\t\tem.createNativeQuery(\"DELETE FROM CAMINHO\").executeUpdate();\r\n\t\tem.createNativeQuery(\"DELETE FROM MAPA\").executeUpdate();\r\n\t\t\r\n\t\tlog.info(\"Limpou a base de dados\");\r\n\t\r\n\t}", "@Override\r\n\tpublic void deleteDatabase() {\r\n\t\tlog.info(\"Enter deleteDatabase\");\r\n\r\n\t\t\r\n\t\tConnection connection = null;\t\t\r\n\t\ttry {\r\n\t\t\tconnection = jndi.getConnection(\"jdbc/libraryDB\");\t\t\r\n\t\t\t\r\n\r\n\t\t\t \r\n\t\t\t\tPreparedStatement pstmt = connection.prepareStatement(\"Drop Table Users_Table; \"); \r\n\t\t\t\tpstmt.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\tpstmt = connection.prepareStatement(\"Drop Table Cams_Table; \"); \r\n\t\t\t\tpstmt.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\tpstmt = connection.prepareStatement(\"Drop Table User_Cam_Mapping_Table; \"); \r\n\t\t\t\tpstmt.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\tpstmt = connection.prepareStatement(\"Drop Table Cam_Images_Table; \"); \r\n\t\t\t\tpstmt.executeUpdate();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Datenbank wurde erfolgreich zurueckgesetzt!\");\t\t\t\t\r\n\t\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Fehler: \"+e.getMessage());\r\n\t\t\tlog.error(\"Error: \"+e.getMessage());\r\n\t\t} finally {\r\n\t\t\tcloseConnection(connection);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void clearDatabase() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void delete(int idStrumento) {\n\t\tstrumentoRepository.delete(idStrumento);\r\n\t}", "@Override\n public void clearDB() throws Exception {\n hBaseOperation.deleteTable(this.dataTableNameString);\n hBaseOperation.createTable(this.dataTableNameString, this.columnFamily, numRegion);\n }", "@Override\r\n\tpublic void delete(Integer memNo) {\n\t\tConnection con = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tClass.forName(driver);\r\n\t\t\tcon = DriverManager.getConnection(url, userid, passwd);\r\n\t\t\tpstmt = con.prepareStatement(DELETE);\r\n\r\n\t\t\tpstmt.setInt(1, memNo);\r\n\r\n\t\t\tpstmt.executeUpdate();\r\n\r\n\t\t\t// Handle any driver errors\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\tthrow new RuntimeException(\"Couldn't load database driver. \" + e.getMessage());\r\n\t\t\t// Handle any SQL errors\r\n\t\t} catch (SQLException se) {\r\n\t\t\tthrow new RuntimeException(\"A database error occured. \" + se.getMessage());\r\n\t\t\t// Clean up JDBC resources\r\n\t\t} finally {\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpstmt.close();\r\n\t\t\t\t} catch (SQLException se) {\r\n\t\t\t\t\tse.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (con != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcon.close();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void delete(TQssql sql) {\n\r\n\t}", "public void deldrumentry(String idi) {\n\t\tourDatabase.delete(DATABASE_TABLE, Drum_RowID + \"=\" +idi, null);\n\t\t\t\n\t}", "public void deleteIscrizione() throws SQLException {\r\n\r\n\t\tPreparedStatement pstmt = null;\r\n\r\n\t\ttry {\r\n\t\t\tpstmt = con.prepareStatement(STATEMENTDEL);\r\n\t\t\t\r\n\t\t\tpstmt.setString(1, i.getGiocatore());\r\n\t\t\tpstmt.setInt(2, i.getTorneo());\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\tpstmt.execute();\r\n\r\n\t\t} finally {\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\tpstmt.close();\r\n\t\t\t}\r\n\r\n\t\t\tcon.close();\r\n\t\t}\r\n\r\n\t}", "public void delPay(String idi) {\n\t\tourDatabase.delete(DATABASE_TABLE3, Sales_Id + \"=\" +idi, null);\n\t}", "@Override\r\n\tpublic void delete(int no) {\n\t\tsqlSession.delete(namespace + \".delete\", no);\r\n\t}", "@Override\r\n\tpublic void delete(int no) {\n\t\tsqlSession.delete(namespace + \".delete\", no);\r\n\t}", "int deleteByPrimaryKey(String industryId);", "@Delete({\n \"delete from cost_accounting_statistic_by_line_detail\",\n \"where code = #{code,jdbcType=BIGINT}\"\n })\n int deleteByPrimaryKey(Long code);", "public void deleteDataInProgramTable() throws SQLException {\n\t\tdeleteDataInUserTable();\n\t\tdeleteDataInPeriodTable();\n\t\tdeleteData(\"group_stage\",\"STAGE_\"+idCondition);\n\t\tdeleteData(\"jp_group\",idCondition);\n\t\tdeleteData(\"program\",idCondition);\n\t}", "@Override\r\n\tpublic void delete(String kodeDetail) {\n\t\tString query = \"delete from TR_DETAIL_PENJUALAN where kode_detail=?\";\r\n\t\tConnection con = null;\r\n\t\tPreparedStatement ps = null;\r\n\t\ttry {\r\n\t\t\tcon = dataSource.getConnection();\r\n\t\t\tps = con.prepareStatement(query);\r\n\t\t\tps.setString(1, kodeDetail);\r\n\r\n\t\t\tint out = ps.executeUpdate();\r\n\t\t\tif (out != 0) {\r\n\t\t\t\tSystem.out.println(\"delete berhasil\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"not found\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tps.close();\r\n\t\t\t\tcon.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic int deleteByPrimaryKey(Integer permisId) {\n\t\treturn 0;\n\t}", "int deleteByExample(TbExpressTraceExample example);", "@Override\n\tpublic void delByPrimaryKey(int id) throws SQLException {\n\n\t}", "@Override\n\tpublic int delete(PrestationCDI obj) throws DAOException {\n\t\treturn 0;\n\t}", "public void deleteAnalysis(long id){\n try{\n analysisDAO.deleteAnalysisById(id);\n } catch (PersistenceException e){\n e.printStackTrace();\n }\n }", "int deleteByExample(InspectionAgencyExample example);", "int deleteByPrimaryKey(String detailId);", "private void clearData() {\n em.createQuery(\"delete from ViajeroEntity\").executeUpdate();\n }", "public void deleteFromPoseOrder() { \n \ttry {\n\t\t\tthis.openDataBase();\n\t\t\tmyDataBase.execSQL(DeletePoses);\n\t\t\tthis.close();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tLog.d(\"SQL Exception\", e.toString());\n\t\t}\n \t\n }", "@Override\n\t\tpublic void delete() {\n\n\t\t}", "public static String delete(Connection conn, Long patientId) throws Exception {\r\n String result = null;\r\n Statement stmt;\r\n conn.setAutoCommit(false);\r\n stmt = conn.createStatement();\r\n stmt.execute(\"START TRANSACTION;\");\r\n stmt.execute(\"SET FOREIGN_KEY_CHECKS = 0;\");\r\n String sql = \"DELETE pregnancy FROM pregnancy \" +\r\n \"WHERE pregnancy.patient_id=\" + patientId;\r\n stmt.execute(sql);\r\n stmt.execute(\"Commit\");\r\n result = \"Pregnancy records deleted.\";\r\n try {\r\n conn.commit();\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n return result;\r\n }", "private void deleteItem()\n {\n Category categoryToDelete = dataCategories.get(dataCategories.size()-1);\n AppDatabase db = Room.databaseBuilder(getApplicationContext(),\n AppDatabase.class, \"database-name\").allowMainThreadQueries().build();\n db.categoryDao().delete(categoryToDelete);\n testDatabase();\n }", "@Override\n\tpublic void delete()\n\t{\n\t\tcachedContent = null;\n\t\tFile outputFile = getStoreLocation();\n\t\tif ((outputFile != null) && outputFile.exists())\n\t\t{\n\t\t\tif (Files.remove(outputFile) == false)\n\t\t\t{\n\t\t\t\tlog.error(\"failed to delete file: \" + outputFile.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t}", "private void handleDeleteDB(int i) {\n try {\n ContentResolver contentResolver = this.mContext.getContentResolver();\n if (contentResolver.delete(KeyguardNotification.URI, \"key\" + \"=\" + i, null) > 0) {\n contentResolver.notifyChange(KeyguardNotification.URI, null);\n }\n } catch (Exception e) {\n Log.e(\"KeyguardNotifHelper\", \"handleDeleteDB\", e);\n }\n }", "@Transactional\n\t@Override\n\tpublic String delete(Detail t) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void delete(Medico i) throws Exception {\n\t\t\n\t}", "void deleteTheDatabase() {\n mContext.deleteDatabase(MediaDbHelper.DATABASE_NAME);\n }", "@Override\n @Transactional\n public void deletePatient(Patient patient) {\n patientDAO.deletePatient(patient);\n }", "@Override\r\n\tpublic void delete(Plant plant) throws Exception {\n\r\n\t}", "@Override\n\tpublic void deleteProjectAssurerInfo(Long projectAssurerInfoId) {\n\t\tprojectAssurerInfoDao.delete(projectAssurerInfoId);\n\t}", "int deleteByPrimaryKey(String taxregcode);", "private void deleteOldData() {\n Date today = SunshineDateUtils.getNormalizedUtcDateForToday();\n weatherDao.deleteOldWeather(today);\n }" ]
[ "0.72114944", "0.648238", "0.6450829", "0.63227457", "0.6297467", "0.6257167", "0.6254783", "0.6224447", "0.61563355", "0.61084056", "0.6087722", "0.6077768", "0.60774195", "0.6062091", "0.6048219", "0.60268104", "0.60163474", "0.60056084", "0.592792", "0.5903998", "0.58995074", "0.58965266", "0.58900183", "0.5882192", "0.58800244", "0.58780104", "0.58754987", "0.5869972", "0.58569634", "0.5851475", "0.5847632", "0.58330935", "0.583282", "0.5832706", "0.5831713", "0.5828436", "0.5820651", "0.5804738", "0.57869226", "0.5784515", "0.578294", "0.57801324", "0.576588", "0.57635564", "0.57491726", "0.57415766", "0.57379764", "0.5737422", "0.5732221", "0.5731688", "0.573076", "0.5714706", "0.5712727", "0.5711542", "0.57093924", "0.57083446", "0.57072973", "0.5697457", "0.5695604", "0.5692647", "0.56884396", "0.5686203", "0.56644046", "0.5662511", "0.56499845", "0.5648545", "0.5645703", "0.56387144", "0.56356055", "0.5626998", "0.5626773", "0.5623974", "0.5621621", "0.5621621", "0.561629", "0.56152105", "0.5614429", "0.56128806", "0.5612668", "0.56042594", "0.56025755", "0.56018376", "0.55918396", "0.55855435", "0.5582946", "0.5582656", "0.5582496", "0.55766386", "0.5574107", "0.55686283", "0.5567862", "0.556591", "0.55610156", "0.55574584", "0.5554137", "0.5550304", "0.55476296", "0.5546513", "0.55440557", "0.5543365" ]
0.73432255
0
Gets the root order ID for the given order ID.
public OrderID getRootOrderID(OrderID inOrderID) throws PersistenceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getOrderID() {\n\t\treturn this.token.get(\"orderID\").toString();\n\t}", "public int getId() {\n return orderID;\n }", "@java.lang.Override\n public java.lang.String getRootId() {\n java.lang.Object ref = rootId_;\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 rootId_ = s;\n return s;\n }\n }", "public java.lang.String getRootId() {\n java.lang.Object ref = rootId_;\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 rootId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "String getRootId();", "String getRootId();", "public org.apache.xmlbeans.XmlInt xgetOrderID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlInt target = null;\n target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(ORDERID$0, 0);\n return target;\n }\n }", "public String getOrderId(JsonObject order) {\r\n\t\tint orderID = 0;\r\n\t\tString customerId = order.get(\"customerId\").getAsString();\r\n\t\tString query = \"\";\r\n\t\tStatement stmt = null;\r\n\t\ttry {\r\n\t\t\tif (DBConnector.conn != null) {\r\n\t\t\t\tquery = \"SELECT * FROM home_heating_fuel_orders\" + \" WHERE customerID = '\" + customerId + \"';\";\r\n\t\t\t\tstmt = DBConnector.conn.createStatement();\r\n\t\t\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\torderID = Math.max(rs.getInt(\"orderID\"), orderID);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Conn is null\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t}\r\n\t\treturn orderID + \"\";\r\n\t}", "public com.google.protobuf.ByteString\n getRootIdBytes() {\n java.lang.Object ref = rootId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n rootId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String orderNumberById(String orderId) {\n return orderById(orderId, orderNumber);\n }", "public Integer\t\tgetOrderID();", "public int getOrderID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ORDERID$0, 0);\n if (target == null)\n {\n return 0;\n }\n return target.getIntValue();\n }\n }", "public int getOrderID() \r\n\t{\r\n\t\treturn orderID;\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getRootIdBytes() {\n java.lang.Object ref = rootId_;\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 rootId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getOrderID() {\n return this.orderID;\n }", "public String getOrderid() {\n return orderid;\n }", "public String getOrderId() {\n\t\treturn orderId;\n\t}", "@Override\r\n\tpublic Order getOrderById(String orderId) {\n\t\treturn null;\r\n\t}", "public Shoporder GetOrderById(String orderId) {\n\t\treturn mapper.GetOrderById(orderId);\n\t}", "public int getMPC_Order_Node_ID() {\n\t\tInteger ii = (Integer) get_Value(\"MPC_Order_Node_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public Long getOrderid() {\r\n return orderid;\r\n }", "public String getOrderId() {\n return orderId;\n }", "public String getOrderId() {\n return orderId;\n }", "public String getOrderId() {\n return orderId;\n }", "public Integer getOrderId() {\n return orderId;\n }", "public String getOrderId() {\n Object ref = orderId_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n orderId_ = s;\n }\n return s;\n }\n }", "public String getOrderId() {\n Object ref = orderId_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n orderId_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "public int getOrderID() {\n return orderID;\n }", "public com.google.protobuf.ByteString\n getOrderIdBytes() {\n Object ref = orderId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n orderId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private int getOrderId() {\n int orderId;\n try {\n if (orderIdField.getText().isEmpty()) {\n orderId = -1;\n }\n else {\n orderId = Integer.parseInt(orderIdField.getText());\n }\n } catch (NumberFormatException exc) {\n orderId = -1;\n }\n return orderId;\n }", "public com.google.protobuf.ByteString\n getOrderIdBytes() {\n Object ref = orderId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n orderId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public int getID(OrderItem oi){\n int id;\n id=findID(oi);\n return id;\n }", "public Long getOrderId() {\n return orderId;\n }", "public Long getOrderId() {\n return orderId;\n }", "public String getOrderID() {return orderID;}", "@Override\n\tpublic RechargeOrder getByOrderID(String orderId) {\n\t\treturn null;\n\t}", "private int root(int i) {\n while (i != id[i]) {\n i = id[i];\n }\n return i;\n }", "public int getMPC_Order_ID() {\n\t\tInteger ii = (Integer) get_Value(\"MPC_Order_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public Order getOrderById(long orderId);", "public Order findOrder(String orderID) {\r\n\t\tfor(Order o : orders.values()) {\r\n\t\t\tif(o.getOrderID().equals(orderID)) {\r\n\t\t\t\treturn o;\r\n\t\t\t}\r\n\t\t} return null; \r\n\t}", "public String getOrderidentifier() {\n\t\treturn orderidentifier;\n\t}", "public int getOrderId() {\n return orderId;\n }", "public Receipt getReceiptByOrder(Long orderid) {\n\t\tReceipt exreceipt = new Receipt();\n\t\tOrder order = new Order();\n\t\torder.setId(orderid);\n\t\texreceipt.setOrder(order);\n\t\tExample<Receipt> ex = Example.of(exreceipt);\n\t\treturn receiptRepository.findOne(ex);\n\t}", "@GetMapping(\"/getOrder\")\n\tpublic ResponseEntity<Order> getOrderWithId(@RequestParam int orderId) {\n\t\treturn new ResponseEntity<>(dataFetchService.getOrderWithId(orderId), HttpStatus.OK);\n\t}", "public int root(int i) {\n\t\twhile ( i != id[i] ) {\n\t\t\ti = id[i];\n\t\t}\n\t\treturn i;\n\t}", "public String getOrdersId() {\n return ordersId;\n }", "public static String getTreeId() {\r\n\t\treturn TreeId;\r\n\t}", "public io.dstore.values.IntegerValue getTreeNodeId() {\n if (treeNodeIdBuilder_ == null) {\n return treeNodeId_ == null ? io.dstore.values.IntegerValue.getDefaultInstance() : treeNodeId_;\n } else {\n return treeNodeIdBuilder_.getMessage();\n }\n }", "public Integer getOrderItemId() {\n return orderItemId;\n }", "public String orderById(String orderId) {\n String path = mgmtOrdersPath + orderId;\n\n return sendRequest(getResponseType, systemUserAuthToken(), path, allResult, statusCode200);\n }", "public Order findOne(Integer id) {\r\n\t\tlog.info(\"Request to finde Order : \" + id);\r\n\t\treturn orders.stream().filter(order -> order.getOrderId().equals(id)).findFirst().get();\r\n\t}", "public Input getOrderID() throws RemoteException\n\t{\n\t\t if (orderID != null)\n\t\t \treturn orderID;\n\t\t orderID = new LabelInput(getTransfer().getOrderID());\n\t\t return orderID;\n\t}", "public String getOrderDocId() {\r\n return this.orderDocId;\r\n }", "public io.dstore.values.IntegerValue getOrderPersonId() {\n return orderPersonId_ == null ? io.dstore.values.IntegerValue.getDefaultInstance() : orderPersonId_;\n }", "public void setOrderID(String orderID) {\n\t\tORDER_ID = orderID;\n\t}", "io.dstore.values.IntegerValue getTreeNodeId();", "public void setOrderid(Long orderid) {\r\n this.orderid = orderid;\r\n }", "public io.dstore.values.IntegerValue getTreeNodeId() {\n return treeNodeId_ == null ? io.dstore.values.IntegerValue.getDefaultInstance() : treeNodeId_;\n }", "private int root(int i) {\n validate(i);\n while(i != id[i]) {\n i = id[i];\n }\n return i;\n }", "private Node searchID(Node root, int ID) {\n\t\tif(root == null || root.isNull) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tif(root.ID > ID) {\n\t\t\t\treturn searchID(root.left, ID);\n\t\t\t} else if(root.ID < ID)\n\t\t\t\treturn searchID(root.right, ID);\n\t\t\telse\n\t\t\t\treturn root;\n\t\t}\n\t}", "@ApiModelProperty(example = \"123456\", value = \"Client order ID if supplied by client.\")\n public String getOrderId() {\n return orderId;\n }", "public void setOrderId(Integer orderId) {\n this.orderId = orderId;\n }", "com.google.protobuf.ByteString\n getOrderIdBytes();", "public io.dstore.values.IntegerValue getOrderPersonId() {\n if (orderPersonIdBuilder_ == null) {\n return orderPersonId_ == null ? io.dstore.values.IntegerValue.getDefaultInstance() : orderPersonId_;\n } else {\n return orderPersonIdBuilder_.getMessage();\n }\n }", "public void setOrderId(String orderId) {\n\t\tthis.orderId = orderId;\n\t}", "public String getIdNode() {\r\n String idNode = null;\r\n idNode = this.getParam(ESCOConstantes.ID_NODE);\r\n // Add the root element if not present\r\n if (null != idNode && !idNode.startsWith(ESCOConstantes.STEM_NAME_SEPARATOR)) {\r\n idNode = ESCOConstantes.STEM_NAME_SEPARATOR + idNode;\r\n }\r\n\r\n return idNode;\r\n }", "@Column(name = \"order_id\", precision = 10)\n @GeneratedValue\n @Id\n public Integer getOrderId() {\n return orderId;\n }", "public java.lang.String getOrderID(){\n return localOrderID;\n }", "public java.lang.String getOrderID(){\n return localOrderID;\n }", "public int getRoot() {\n return _root;\n }", "public int getRoot(){\n\t\t\treturn root;\n\t\t}", "public String getID() {\r\n\t\treturn this.idNode;\r\n\t}", "@GET\n\t@Path(\"{id}\")\n\tpublic Response getOrder(@PathParam(\"id\") String id) {\n\t\t String orderJSON = null;\n\t\t try {\n\t\t \torderJSON = backend.getOrder(id);\n\t\t \t// returns a JSON string based on a UUID\n\t\t } catch ( NotFoundException e) {\n\t\t \treturn Response.status(404).entity(id).build();\n\t\t }\n\t\t return Response.status(200).entity(orderJSON).build();\n\t}", "private String getParentId(String id) {\r\n\r\n String[] data = id.split(\"\\\\.\");\r\n String idParent = null;\r\n\r\n for (int i = data.length - 2; i >= 0; i--) {\r\n if (idParent == null) {\r\n idParent = data[i];\r\n } else {\r\n idParent = data[i] + \".\" + idParent;\r\n }\r\n }\r\n return idParent;\r\n }", "public void setOrderId(String orderId) {\n this.orderId = orderId;\n }", "private int root(int i) {\n while(id[i]!=i){\n i = id[i];\n }\n return i;\n }", "@Override\r\n\tpublic OrderVO getOrderByID(Integer ono) throws Exception {\n\t\treturn sqlSession.selectOne(namespaceOrder+\".getOneOrderByOrderID\",ono);\r\n\t}", "public io.dstore.values.IntegerValueOrBuilder getTreeNodeIdOrBuilder() {\n if (treeNodeIdBuilder_ != null) {\n return treeNodeIdBuilder_.getMessageOrBuilder();\n } else {\n return treeNodeId_ == null ?\n io.dstore.values.IntegerValue.getDefaultInstance() : treeNodeId_;\n }\n }", "@Override\n\tpublic WxOrder queryOrderById(Integer id) {\n\t\treturn orderMapper.queryOrderById(id);\n\t}", "public void setOrderid(String orderid) {\n this.orderid = orderid == null ? null : orderid.trim();\n }", "public void setOrderId(String orderId) {\n this.orderId = orderId == null ? null : orderId.trim();\n }", "public void setOrderId(String orderId) {\n this.orderId = orderId == null ? null : orderId.trim();\n }", "public int getAD_Tree_Product_ID() {\n\t\tInteger ii = (Integer) get_Value(\"AD_Tree_Product_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public void setOrderId(Long orderId) {\n this.orderId = orderId;\n }", "public void setOrderId(Long orderId) {\n this.orderId = orderId;\n }", "@Override\r\n\tpublic Order FindById(int IdOrder) {\n\t\treturn em.find(Order.class, IdOrder);\r\n\t}", "public io.dstore.values.IntegerValueOrBuilder getOrderPersonIdOrBuilder() {\n if (orderPersonIdBuilder_ != null) {\n return orderPersonIdBuilder_.getMessageOrBuilder();\n } else {\n return orderPersonId_ == null ?\n io.dstore.values.IntegerValue.getDefaultInstance() : orderPersonId_;\n }\n }", "private OrderEntity getCurrentOrder(String orderId) {\n\t\tOrderEntity entity = new OrderEntity();\n\t\t//TODO get current order data from oracle\n\t\t\n\t\treturn entity;\n\t}", "@Override\n\tpublic Porder getPorderById(Integer porderid) {\n \t\n \treturn entityManager.find(Porder.class,porderid);\n }", "String getOuter_id();", "private int getRoot(int x) {\n\t\twhile (idNode[x] != x) {\r\n\t\t\tx = idNode[x];\r\n\t\t}\r\n\t\treturn x;\r\n\t}", "public int getOrderID() {\r\n return emporderID;\r\n }", "private Order getOrderWithId(int orderId) {\n\t\tfor (Order order : acceptedOrders) {\n\t\t\tif (order.getOrderId() == orderId)\n\t\t\t\treturn order;\n\t\t}\n\t\tfor (Order order : newOrders) {\n\t\t\tif (order.getOrderId() == orderId)\n\t\t\t\treturn order;\n\t\t}\n\n\t\t// Es wurde keine Order in dem OrderPool gefunden, die mit der OrderId\n\t\t// vom Spieler übereinstimmt.\n\t\tSystem.err\n\t\t\t\t.println(\"Die OrderId der Order ist nicht im PlayerOrderPool vorhanden\");\n\t\treturn null;\n\t}", "public Order getOrderByID(String order_id) throws Exception {\n\n\t\tConnection con = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"select * from ocgr_orders left join ocgr_clients on ocgr_orders.client_id = ocgr_clients.client_id left join ocgr_vendors on ocgr_orders.vendor_id = ocgr_vendors.vendor_id where order_id=? ;\";\n\n\t\tDB db = new DB();\n\n\t\ttry {\n\t\t\tdb.open();\n\t\t\tcon = db.getConnection();\n\n\t\t\tstmt = con.prepareStatement(sql);\n\t\t\tstmt.setString(1,order_id);\n\t\t\trs = stmt.executeQuery();\n\n\t\t\tif (!rs.next()) {\n\t\t\t\trs.close();\n\t\t\t\tstmt.close();\n\t\t\t\tdb.close();\n\n\t\t\t\tthrow new Exception(\"Not valid Order_id\");\n\t\t\t}\n\t\t\tClient client = new Client( rs.getString(\"client_id\"), rs.getString(\"client_password\"), rs.getString(\"client_email\"),\n\t\t\t\t\t\t\t\t\t\trs.getString(\"client_fullname\"), rs.getString(\"client_compName\"), rs.getString(\"client_address\"),\n\t\t\t\t\t\t\t\t\t\trs.getString(\"client_itin\"), rs.getString(\"client_doy\"), rs.getString(\"client_phone\") );\n\n\t\t\tVendor vendor = new Vendor( rs.getString(\"vendor_id\"), rs.getString(\"vendor_password\"), rs.getString(\"vendor_email\"),\n\t\t\t\t\t\t\t\t\t\trs.getString(\"vendor_fullname\"), rs.getString(\"vendor_compName\"), rs.getString(\"vendor_address\"),\n\t\t\t\t\t\t\t\t\t\trs.getString(\"vendor_itin\"), rs.getString(\"vendor_doy\"), rs.getString(\"vendor_phone\") );\n\n\t\t\tOrder order = new Order(rs.getString(\"order_id\"), rs.getTimestamp(\"order_date\"), rs.getBigDecimal(\"order_total\"),\n\t\t\t\t\t\t\t\t\trs.getString(\"order_address\"), rs.getString(\"order_address\"),\n\t\t\t\t\t\t\t\t\trs.getString(\"order_paymentmethod\"), client, vendor );\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tdb.close();\n\n\t\t\treturn order;\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tdb.close();\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}", "public String getOrder(String orderId) {\n\t SQLiteDatabase db = this.getReadableDatabase();\n\t \n\t String orderSQLSelect = \"SELECT * FROM \" + ORDER_RECORDS_TABLE + \" WHERE \" + ORDER_NUMBER + \" = '\" + orderId + \"'\";\n\t Cursor cursor = db.rawQuery(orderSQLSelect, null);\n\t \n\t if (cursor != null) { \n\t \tif(cursor.moveToFirst()) {\n\t \t\treturn cursor.getString(0) + \" \" + cursor.getString(3);\n\t \t} else {\n\t \t\treturn null;\n\t \t}\n\t }\n\t\n\t return null;\n\t}", "@ApiModelProperty(required = true, value = \"internal domestic payment order identifier\")\n public String getId() {\n return id;\n }", "@GetMapping(\"/{id}\")\r\n\tpublic Order getOrderbyId(@PathVariable(value = \"id\") int id) {\r\n\t\treturn this.orderRepo.findById(id)\r\n\t\t\t\t.orElseThrow(()-> new ResourceNotFoundException(\"order does not exist\"));\r\n\t}", "@Override\n\tpublic OrderDO findById(String id) {\n\t\treturn null;\n\t}", "Order getOrder(String orderId) throws OrderBookOrderException;", "public ServiceOrder retrieveServiceOrder( String orderid) {\r\n\t\tlogger.info(\"will retrieve Service Order from catalog orderid=\" + orderid );\r\n\t\ttry {\r\n\t\t\tObject response = template.\r\n\t\t\t\t\trequestBody( CATALOG_GET_SERVICEORDER_BY_ID, orderid);\r\n\t\t\t\r\n\t\t\tif ( !(response instanceof String)) {\r\n\t\t\t\tlogger.error(\"Service Order object is wrong.\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\tlogger.debug(\"retrieveServiceOrder response is: \" + response);\r\n\t\t\tServiceOrder sor = toJsonObj( (String)response, ServiceOrder.class); \r\n\t\t\t\r\n\t\t\treturn sor;\r\n\t\t\t\r\n\t\t}catch (Exception e) {\r\n\t\t\tlogger.error(\"Cannot retrieve Service Order details from catalog. \" + e.toString());\r\n\t\t}\r\n\t\treturn null;\r\n\t}" ]
[ "0.62520474", "0.6135851", "0.6130931", "0.61221033", "0.61219084", "0.61219084", "0.60593367", "0.60158926", "0.60081905", "0.6004682", "0.5965773", "0.5915756", "0.5906731", "0.5906453", "0.5831277", "0.58225757", "0.57827395", "0.57444483", "0.57369864", "0.57365936", "0.5705395", "0.56931055", "0.56931055", "0.56931055", "0.5666857", "0.56579477", "0.56344014", "0.5612867", "0.56116766", "0.56094724", "0.5599204", "0.5537636", "0.5495629", "0.5495629", "0.54751885", "0.546904", "0.544019", "0.54315317", "0.5427202", "0.54169047", "0.54089284", "0.5396804", "0.5385394", "0.5383029", "0.53579044", "0.534148", "0.5339425", "0.53162444", "0.5285895", "0.52846557", "0.527404", "0.52664673", "0.52519476", "0.52505744", "0.52462876", "0.524532", "0.523182", "0.52311844", "0.5208468", "0.52072656", "0.5205755", "0.51921904", "0.5184012", "0.51605505", "0.515876", "0.51578975", "0.5152386", "0.51503897", "0.51503897", "0.51435333", "0.51298046", "0.5126136", "0.5122978", "0.51218987", "0.51039684", "0.5091466", "0.50803196", "0.5055814", "0.50498956", "0.5047876", "0.5041979", "0.5041979", "0.5040933", "0.5038866", "0.5038866", "0.50360477", "0.50212675", "0.5021065", "0.5009835", "0.4996124", "0.49944523", "0.49726796", "0.4964979", "0.49519643", "0.49504745", "0.49398854", "0.49305508", "0.4930417", "0.49238297", "0.4906557" ]
0.74644244
0
Saves the supplied quote to the database. Saving may be immediate or delayed;
public void saveQuote(QuoteEvent quote) throws PersistenceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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}", "@Override\n public void save(Trade trade) {\n this.tradeRepository.save(trade);\n }", "public void updateQuote(){\n\t\tDate date = new Date();\n\t\tlong maxTimeNoUpdate = Long.parseLong(config.getQOTD_expiration_time());\n\n\t\tlong timeNow = date.getTime()/1000L;\n\t\tlong timeLastQuote = 0;\n\n\t\ttry {\n\t\t\tcrs = qb.selectFrom(\"qotd\").all().executeQuery();\n\t\t\tif(crs.next()){\n\t\t\t\ttimeLastQuote = crs.getDate(\"date\").getTime()/1000L;\n\t\t\t}\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tcrs.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\tif(timeNow-timeLastQuote > maxTimeNoUpdate){\n\t\t\tSystem.out.println(\"UPDATING QUOTE\");\n\t\t\tsaveQuote();\n\t\t} else {\n\t\t\tSystem.out.println(\"QUOTE IS UP TO DATE\");\n\t\t}\n\t}", "public void recordClosingQuote(Quote closingQuote_, MarketDataSession marketDataSession_);", "public void recordOpeningQuote(Quote openingQuote_, MarketDataSession marketDataSession_);", "public abstract void saveOrder(Order order);", "@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}", "public Object checkAndSaveQuote() {\n String quoteString = mAddQuoteTextView.getText().toString();\n if (!quoteString.equals(\"\")) {\n\n // get the other values\n String name = mAddNameTextView.getText().toString();\n String source = mAddSourceTextView.getText().toString();\n // Empty fields\n mAddQuoteTextView.setText(\"\");\n mAddNameTextView.setText(\"\");\n mAddSourceTextView.setText(\"\");\n // then we can create and return the new object\n return QuoteObject.newInstance(name, source, quoteString);\n } else {\n // Alert the user we need a quote to save to the list\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(\"No Quote Entered!\");\n builder.setMessage(\"Please add a quote before saving.\");\n builder.show();\n // return nothing\n return null;\n }\n }", "protected abstract void doSave();", "public void save();", "public void save();", "public void save();", "public void save();", "public void save(MemberTradeRecord me) {\n\t\tmemberTradeRecordRepository.save(me);\r\n\t}", "public void save() {\n }", "@Override\n\tpublic void persist() {\n\t\tif (this.isNew()) {\n\t\t\tQuxLocalServiceUtil.addQux(this);\n\t\t}\n\t\telse {\n\t\t\tQuxLocalServiceUtil.updateQux(this);\n\t\t}\n\t}", "public void save() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.save(this);\r\n\t}", "public MainItemOrdered save(MainItemOrdered mainItemOrdered);", "public void save() {\t\n\t\n\t\n\t}", "@Override\r\n\tpublic void save(TQssql sql) {\n\r\n\t}", "public void setQuoted( boolean quote ) {\n quote_ = quote;\n }", "public void saveOrder() {\n setVisibility();\n Order order = checkInputFromUser();\n if (order == null){return;}\n if(orderToLoad != null) DBSOperations.remove(connection,orderToLoad);\n DBSOperations.add(connection, order);\n }", "@Override\r\n\tpublic void save() throws SaveException {\n\t\t\r\n\t}", "void save(Bill bill);", "public void saveQuoteFromSysToOrcl(ActionEvent actionEvent) throws MalformedURLException,\n IOException {\n boolean isQuoteSaved = false;\n V93kQuote v93k =\n (V93kQuote)ADFUtils.getSessionScopeValue(\"parentObject\");\n if (v93k != null && v93k.getSessionDetails() != null) {\n isQuoteSaved = v93k.getSessionDetails().isQuoteSaved();\n }\n //Do not call configurator if there is an error from Save Config to quote\n if (!isQuoteSaved) {\n HashMap map = new HashMap();\n if (v93k != null && v93k.getInputParams() != null &&\n v93k.getSessionDetails() != null &&\n v93k.getSessionDetails().getTargetQuoteNumber() != null) {\n v93k.getInputParams().setImportSource(\"SAVE_CONFIG_TO_QUOTE\");\n String czNodeName = null;\n if (v93k.getUiSelection() != null) {\n czNodeName = v93k.getUiSelection().getCzNodeName();\n }\n\n String jsonStr = JSONUtils.convertObjToJson(v93k);\n String responseJson =\n ConfiguratorUtils.callConfiguratorServlet(jsonStr);\n ObjectMapper mapper = new ObjectMapper();\n Object obj = mapper.readValue(responseJson, V93kQuote.class);\n v93k = (V93kQuote)obj;\n ADFUtils.setSessionScopeValue(\"parentObject\", v93k);\n }\n boolean configHasErrors = configHasErrors(v93k);\n boolean configHasWarnings = configHasWarning(v93k);\n if (configHasErrors) {\n SessionDetails sesDetails = v93k.getSessionDetails();\n if (v93k.getSessionDetails() == null) {\n sesDetails = new SessionDetails();\n }\n sesDetails.setQuoteSaved(true);\n ADFUtils.setSessionScopeValue(\"parentObject\", v93k);\n HashMap rulesetMap = new HashMap();\n rulesetMap.put(\"error\", \"Y\");\n ADFUtils.setSessionScopeValue(\"ruleSetMap\", rulesetMap);\n displayConfigErrors(v93k);\n }\n if (configHasWarnings && !configHasErrors) {\n displayWarnings(v93k);\n }\n if (!configHasErrors && !configHasWarnings) {\n String createQtMsg = getFndMessages(SudokuUtils.createQteMsg);\n String discount = null;\n int respid =\n Integer.parseInt((String)ADFUtils.getSessionScopeValue(\"RespId\") ==\n null ? \"51156\" :\n (String)ADFUtils.getSessionScopeValue(\"RespId\"));\n int usrId =\n Integer.parseInt((String)ADFUtils.getSessionScopeValue(\"UserId\") ==\n null ? \"0\" :\n (String)ADFUtils.getSessionScopeValue(\"UserId\"));\n\n // FacesContext fc = FacesContext.getCurrentInstance();\n BindingContainer bindings = getBindings();\n StringBuilder resultMsg = new StringBuilder(\"<html><body>\");\n StringBuilder resultErrMsg = new StringBuilder(\"<html><body>\");\n if (v93k != null) {\n if (v93k.getQheaderObject() != null) {\n if (v93k.getQheaderObject().getDealObject() != null) {\n discount =\n (String)v93k.getQheaderObject().getDealObject().getDdiscount();\n }\n }\n if (v93k.getSessionDetails() != null) {\n if (v93k.getSessionDetails().isCreateNewQuote()) {\n if (v93k.getSessionDetails().getTargetQuoteNumber() !=\n null) {\n for (QuoteLinePOJO list :\n v93k.getTargetConfigurationLines()) {\n if (list != null) {\n String operationMode =\n list.getOperationCode();\n if (operationMode != null &&\n operationMode.equalsIgnoreCase(\"CREATE\")) {\n OperationBinding createOb =\n bindings.getOperationBinding(\"callConfigLineToAddQuoteAPI\");\n _logger.info(\"Calling callConfigLineToAddQuoteAPI....QUOTE NUM \" +\n v93k.getSessionDetails().getTargetQuoteNumber());\n _logger.info(\"Calling callConfigLineToAddQuoteAPI....OPERATION CODE \" +\n list.getOperationCode());\n _logger.info(\"Calling callConfigLineToAddQuoteAPI....ConfigHdrId \" +\n list.getConfigHrdId());\n _logger.info(\"Calling callConfigLineToAddQuoteAPI....ConfigRevNum \" +\n list.getConfigRevNum());\n _logger.info(\"Calling callConfigLineToAddQuoteAPI....ITEM NUM \" +\n list.getItemName());\n createOb.getParamsMap().put(\"quoteNum\",\n v93k.getSessionDetails().getTargetQuoteNumber());\n\n createOb.getParamsMap().put(\"itemNumber\",\n list.getItemName());\n createOb.getParamsMap().put(\"itemQty\",\n 1);\n createOb.getParamsMap().put(\"orgNum\",\n list.getOperationCode() ==\n null ?\n \"GDO\" :\n list.getOperationCode());\n createOb.getParamsMap().put(\"ConfighdrId\",\n list.getConfigHrdId());\n createOb.getParamsMap().put(\"configRevNum\",\n list.getConfigRevNum());\n createOb.getParamsMap().put(\"respId\",\n respid);\n createOb.getParamsMap().put(\"usrId\",\n usrId);\n String createMsg =\n (String)createOb.execute();\n if (createMsg != null) {\n if (createMsg.contains(\"<html><body>\")) {\n resultErrMsg.append(\"<p><b>\" +\n createMsg +\n \"</b></p>\");\n } else if (createMsg.contains(\"S-\")) {\n\n\n if (discount != null) {\n String discountMsg =\n updateDiscount(v93k.getSessionDetails().getTargetQuoteNumber(),\n discount,\n respid,\n usrId);\n\n if (discountMsg !=\n null) {\n if (discountMsg.contains(\"<html><body>\")) {\n resultErrMsg.append(\"<p><b>\" +\n discountMsg +\n \"</b></p>\");\n } else if (discountMsg.contains(\"S-\")) {\n String[] resMsg =\n discountMsg.split(\"-\",\n 2);\n if (resMsg[1] !=\n null) {\n resultMsg.append(\"<p><b>\" +\n resMsg[1] +\n \"</b></p>\");\n }\n } else if (discountMsg.contains(\"E-\")) {\n String[] resMsg =\n discountMsg.split(\"-\",\n 2);\n if (resMsg[1] !=\n null) {\n resultErrMsg.append(\"<p><b>\" +\n resMsg[1] +\n \"</b></p>\");\n }\n } else\n resultErrMsg.append(discountMsg.toString());\n }\n }\n\n\n String[] resMsg =\n createMsg.split(\"-\",\n 2);\n if (resMsg[1] != null) {\n resultMsg.append(\"<p><b>\" +\n resMsg[1] +\n \"</b></p>\");\n }\n\n isQuoteSaved = true;\n } else if (createMsg.contains(\"E-\")) {\n String[] resMsg =\n createMsg.split(\"-\",\n 2);\n if (resMsg[1] != null) {\n resultErrMsg.append(\"<p><b>\" +\n resMsg[1] +\n \"</b></p>\");\n }\n } else\n resultErrMsg.append(createMsg.toString());\n }\n }\n }\n }\n map =\ncallWarranty(v93k, v93k.getSessionDetails().getTargetQuoteNumber(), respid,\n usrId);\n if (map != null) {\n if (map.get(\"resultErrMsg\") != null)\n resultErrMsg.append(map.get(\"resultErrMsg\"));\n if (map.get(\"resultMsg\") != null)\n resultMsg.append(map.get(\"resultMsg\"));\n }\n\n } else {\n if (createQtMsg != null)\n resultErrMsg.append(\"<p><b>\" +\n createQtMsg +\n \"</b></p>\");\n else\n resultErrMsg.append(\"<p><b>\" +\n SudokuUtils.createQteMsg +\n \"</b></p>\");\n\n // resultErrMsg.append(\"<p><b>Please verify and create quote before saving</b></p>\");\n // resultMsg.append(\"\\n\");\n }\n } else if (v93k.getSessionDetails().isDuplicateQuote()) {\n if (v93k.getSessionDetails().getTargetQuoteNumber() !=\n null) {\n ADFContext.getCurrent().getSessionScope().put(\"targetQuoteNumber\",\n v93k.getSessionDetails().getTargetQuoteNumber());\n String targetQuote =\n v93k.getSessionDetails().getTargetQuoteNumber().toString();\n for (QuoteLinePOJO list :\n v93k.getTargetConfigurationLines()) {\n if (list != null) {\n String operationMode =\n list.getOperationCode();\n if (operationMode != null &&\n operationMode.equalsIgnoreCase(\"CREATE\")) {\n OperationBinding dCreateOb =\n bindings.getOperationBinding(\"callConfigLineToAddQuoteAPI\");\n _logger.info(\"Calling callConfigLineToAddQuoteAPI....QUOTE NUM \" +\n v93k.getSessionDetails().getTargetQuoteNumber());\n _logger.info(\"Calling callConfigLineToAddQuoteAPI....OPERATION CODE \" +\n list.getOperationCode());\n _logger.info(\"Calling callConfigLineToAddQuoteAPI....ConfigHdrId \" +\n list.getConfigHrdId());\n _logger.info(\"Calling callConfigLineToAddQuoteAPI....ConfigRevNum \" +\n list.getConfigRevNum());\n _logger.info(\"Calling callConfigLineToAddQuoteAPI....ITEM NUM \" +\n list.getItemName());\n dCreateOb.getParamsMap().put(\"quoteNum\",\n targetQuote);\n dCreateOb.getParamsMap().put(\"itemNumber\",\n list.getItemName());\n // ob.getParamsMap().put(\"itemQty\",list.getItems().size());\n dCreateOb.getParamsMap().put(\"itemQty\",\n 1);\n // dCreateOb.getParamsMap().put(\"OrgNum\",\n // list.getOperationCode());\n dCreateOb.getParamsMap().put(\"orgNum\",\n list.getOperationCode() ==\n null ?\n \"GDO\" :\n list.getOperationCode());\n dCreateOb.getParamsMap().put(\"ConfighdrId\",\n list.getConfigHrdId());\n dCreateOb.getParamsMap().put(\"configRevNum\",\n list.getConfigRevNum());\n dCreateOb.getParamsMap().put(\"respId\",\n respid);\n dCreateOb.getParamsMap().put(\"usrId\",\n usrId);\n String createMsg =\n (String)dCreateOb.execute();\n if (createMsg != null) {\n if (createMsg.contains(\"<html><body>\")) {\n resultErrMsg.append(\"<p><b>\" +\n createMsg +\n \"</b></p>\");\n } else if (createMsg.contains(\"S-\")) {\n\n\n if (discount != null) {\n String discountMsg =\n updateDiscount(targetQuote,\n discount,\n respid,\n usrId);\n\n if (discountMsg !=\n null) {\n if (discountMsg.contains(\"<html><body>\")) {\n resultErrMsg.append(\"<p><b>\" +\n discountMsg +\n \"</b></p>\");\n } else if (discountMsg.contains(\"S-\")) {\n String[] resMsg =\n discountMsg.split(\"-\",\n 2);\n if (resMsg[1] !=\n null) {\n resultMsg.append(\"<p><b>\" +\n resMsg[1] +\n \"</b></p>\");\n }\n } else if (discountMsg.contains(\"E-\")) {\n String[] resMsg =\n discountMsg.split(\"-\",\n 2);\n if (resMsg[1] !=\n null) {\n resultErrMsg.append(\"<p><b>\" +\n resMsg[1] +\n \"</b></p>\");\n }\n } else\n resultErrMsg.append(discountMsg.toString());\n }\n }\n\n\n String[] resMsg =\n createMsg.split(\"-\",\n 2);\n if (resMsg[1] != null) {\n resultMsg.append(\"<p><b>\" +\n resMsg[1] +\n \"</b></p>\");\n }\n //save too oracle success\n // ADFUtils.setSessionScopeValue(\"configSaved\",\n // \"Y\");\n isQuoteSaved = true;\n } else if (createMsg.contains(\"E-\")) {\n String[] resMsg =\n createMsg.split(\"-\",\n 2);\n if (resMsg[1] != null) {\n resultErrMsg.append(\"<p><b>\" +\n resMsg[1] +\n \"</b></p>\");\n }\n } else\n resultErrMsg.append(createMsg.toString());\n }\n\n }\n }\n }\n map =\ncallWarranty(v93k, v93k.getSessionDetails().getTargetQuoteNumber(), respid,\n usrId);\n if (map != null) {\n if (map.get(\"resultErrMsg\") != null)\n resultErrMsg.append(map.get(\"resultErrMsg\"));\n if (map.get(\"resultMsg\") != null)\n resultMsg.append(map.get(\"resultMsg\"));\n }\n\n } else {\n if (createQtMsg != null)\n resultErrMsg.append(\"<p><b>\" +\n createQtMsg +\n \"</b></p>\");\n else\n resultErrMsg.append(\"<p><b>\" +\n SudokuUtils.createQteMsg +\n \"</b></p>\");\n // resultErrMsg.append(\"<p><b>Please verify and create quote before saving</b></p>\");\n // resultMsg.append(\"\\n\");\n }\n } else if (v93k.getSessionDetails().isUpdateQuote()) {\n if (v93k.getSessionDetails().getSourceQuoteNumber() !=\n null) {\n map =\ncallWarranty(v93k, v93k.getSessionDetails().getSourceQuoteNumber(), respid,\n usrId);\n if (map != null) {\n if (map.get(\"resultErrMsg\") != null)\n resultErrMsg.append(map.get(\"resultErrMsg\"));\n if (map.get(\"resultMsg\") != null)\n resultMsg.append(map.get(\"resultMsg\"));\n }\n\n for (QuoteLinePOJO list :\n v93k.getTargetConfigurationLines()) {\n if (list != null) {\n String operationMode =\n list.getOperationCode();\n if (operationMode != null &&\n operationMode.equalsIgnoreCase(\"UPDATE\")) {\n OperationBinding ob =\n bindings.getOperationBinding(\"callConfigLineToUpdateQuoteAPI\");\n _logger.info(\"Calling callConfigLineToUpdateQuoteAPI....QUOTE NUM \" +\n v93k.getSessionDetails().getSourceQuoteNumber());\n _logger.info(\"Calling callConfigLineToUpdateQuoteAPI....OPERATION CODE \" +\n list.getOperationCode());\n _logger.info(\"Calling callConfigLineToUpdateQuoteAPI....ConfigHdrId \" +\n list.getConfigHrdId());\n _logger.info(\"Calling callConfigLineToUpdateQuoteAPI....ConfigRevNum \" +\n list.getConfigRevNum());\n _logger.info(\"Calling callConfigLineToUpdateQuoteAPI....ITEM NUM \" +\n list.getItemName());\n _logger.info(\"Calling callConfigLineToUpdateQuoteAPI....QUOTE LINE NUM \" +\n list.getQuoteLineId());\n ob.getParamsMap().put(\"quoteNum\",\n v93k.getSessionDetails().getSourceQuoteNumber());\n ob.getParamsMap().put(\"quoteLineNum\",\n list.getQuoteLineId());\n ob.getParamsMap().put(\"itemQty\",\n 1);\n ob.getParamsMap().put(\"ConfighdrId\",\n list.getConfigHrdId());\n ob.getParamsMap().put(\"configRevNum\",\n list.getConfigRevNum());\n ob.getParamsMap().put(\"respId\",\n respid);\n ob.getParamsMap().put(\"usrId\",\n usrId);\n String updateMsg =\n (String)ob.execute();\n if (updateMsg != null) {\n if (updateMsg.contains(\"<html><body>\")) {\n resultErrMsg.append(\"<p><b>\" +\n updateMsg +\n \"</b></p>\");\n } else if (updateMsg.contains(\"S-\")) {\n\n if (discount != null) {\n String discountMsg =\n updateDiscount(v93k.getSessionDetails().getSourceQuoteNumber(),\n discount,\n respid,\n usrId);\n\n if (discountMsg !=\n null) {\n if (discountMsg.contains(\"<html><body>\")) {\n resultErrMsg.append(\"<p><b>\" +\n discountMsg +\n \"</b></p>\");\n } else if (discountMsg.contains(\"S-\")) {\n String[] resMsg =\n discountMsg.split(\"-\",\n 2);\n if (resMsg[1] !=\n null) {\n resultMsg.append(\"<p><b>\" +\n resMsg[1] +\n \"</b></p>\");\n }\n } else if (discountMsg.contains(\"E-\")) {\n String[] resMsg =\n discountMsg.split(\"-\",\n 2);\n if (resMsg[1] !=\n null) {\n resultErrMsg.append(\"<p><b>\" +\n resMsg[1] +\n \"</b></p>\");\n }\n } else\n resultErrMsg.append(discountMsg.toString());\n }\n }\n\n\n String[] resMsg =\n updateMsg.split(\"-\",\n 2);\n if (resMsg[1] != null) {\n resultMsg.append(\"<p><b>\" +\n // resMsg[1] +\n \"Quote Line \" +\n list.getItemName() +\n \" Update Successfully.\" +\n \"</b></p>\");\n }\n //save to oracle success\n // ADFUtils.setSessionScopeValue(\"configSaved\",\n // \"Y\");\n isQuoteSaved = true;\n } else if (updateMsg.contains(\"E-\")) {\n String[] resMsg =\n updateMsg.split(\"-\",\n 2);\n if (resMsg[1] != null) {\n resultErrMsg.append(\"<p><b>\" +\n resMsg[1] +\n \"</b></p>\");\n }\n } else\n resultErrMsg.append(updateMsg.toString());\n }\n } else if (operationMode != null &&\n operationMode.equalsIgnoreCase(\"CREATE\")) {\n OperationBinding ob =\n bindings.getOperationBinding(\"callConfigLineToAddQuoteAPI\");\n ob.getParamsMap().put(\"quoteNum\",\n v93k.getSessionDetails().getSourceQuoteNumber().toString());\n ob.getParamsMap().put(\"itemNumber\",\n list.getItemName());\n ob.getParamsMap().put(\"itemQty\",\n 1);\n ob.getParamsMap().put(\"orgNum\",\n list.getOperationCode() ==\n null ?\n \"GDO\" :\n list.getOperationCode());\n ob.getParamsMap().put(\"ConfighdrId\",\n list.getConfigHrdId());\n ob.getParamsMap().put(\"configRevNum\",\n list.getConfigRevNum());\n ob.getParamsMap().put(\"respId\",\n respid);\n ob.getParamsMap().put(\"usrId\",\n usrId);\n String createMsg =\n (String)ob.execute();\n if (createMsg != null) {\n if (createMsg.contains(\"<html><body>\")) {\n resultErrMsg.append(\"<p><b>\" +\n createMsg +\n \"</b></p>\");\n } else if (createMsg.contains(\"S-\")) {\n\n\n if (discount != null) {\n String discountMsg =\n updateDiscount(v93k.getSessionDetails().getSourceQuoteNumber(),\n discount,\n respid,\n usrId);\n\n if (discountMsg !=\n null) {\n if (discountMsg.contains(\"<html><body>\")) {\n resultErrMsg.append(\"<p><b>\" +\n discountMsg +\n \"</b></p>\");\n } else if (discountMsg.contains(\"S-\")) {\n String[] resMsg =\n discountMsg.split(\"-\",\n 2);\n if (resMsg[1] !=\n null) {\n resultMsg.append(\"<p><b>\" +\n // resMsg[1] +\n \"Quote Line \" +\n list.getItemName() +\n \" Updated Successfully.\" +\n \"</b></p>\");\n }\n } else if (discountMsg.contains(\"E-\")) {\n String[] resMsg =\n discountMsg.split(\"-\",\n 2);\n if (resMsg[1] !=\n null) {\n resultErrMsg.append(\"<p><b>\" +\n resMsg[1] +\n \"</b></p>\");\n }\n } else\n resultErrMsg.append(discountMsg.toString());\n }\n }\n\n\n String[] resMsg =\n createMsg.split(\"-\",\n 2);\n if (resMsg[1] != null) {\n resultMsg.append(\"<p><b>\" +\n resMsg[1] +\n \"</b></p>\");\n }\n } else if (createMsg.contains(\"E-\")) {\n String[] resMsg =\n createMsg.split(\"-\",\n 2);\n if (resMsg[1] != null) {\n resultErrMsg.append(\"<p><b>\" +\n resMsg[1] +\n \"</b></p>\");\n }\n } else\n resultErrMsg.append(createMsg.toString());\n }\n } else {\n }\n }\n\n }\n //Call DELETE LINE API HERE\n if (v93k != null &&\n v93k.getTargetConfigurationLines() !=\n null &&\n !v93k.getTargetConfigurationLines().isEmpty()) {\n for (QuoteLinePOJO list :\n v93k.getTargetConfigurationLines()) {\n if (list.getOperationCode() != null &&\n list.getOperationCode().equalsIgnoreCase(\"DELETE\")) {\n _logger.info(\"Quote Line Delete API Start for \" +\n list.getItemName());\n String deleteLineStatus =\n deleteConfigLineFromQuote(list.getQuoteLineId());\n if (deleteLineStatus != null &&\n deleteLineStatus.equalsIgnoreCase(\"S\")) {\n resultMsg.append(\"<p><b>\" +\n \"Quote Line \" +\n list.getItemName() +\n \" Deleted Successfully.\" +\n \"<b><p>\");\n _logger.info(\"Quote Line deleted for \" +\n list.getItemName());\n } else {\n resultErrMsg.append(\"<p><b>\" +\n \"Quote Line could not be deleted\" +\n deleteLineStatus +\n \"</b></p>\");\n _logger.info(\"Could Not delete quote line\");\n }\n }\n }\n }\n\n } else {\n if (createQtMsg != null)\n resultErrMsg.append(\"<p><b>\" +\n createQtMsg +\n \"</b></p>\");\n else\n resultErrMsg.append(\"<p><b>\" +\n SudokuUtils.createQteMsg +\n \"</b></p>\");\n // resultErrMsg.append(\"<p><b>Please verify and create quote before saving</b></p>\");\n // resultMsg.append(\"\\n\");\n }\n } else {\n if (createQtMsg != null)\n resultErrMsg.append(\"<p><b>\" + createQtMsg +\n \"</b></p>\");\n else\n resultErrMsg.append(\"<p><b>\" +\n SudokuUtils.createQteMsg +\n \"</b></p>\");\n\n }\n\n\n } else {\n if (createQtMsg != null)\n resultErrMsg.append(\"<p><b>\" + createQtMsg +\n \"</b></p>\");\n else\n resultErrMsg.append(\"<p><b>\" +\n SudokuUtils.createQteMsg +\n \"</b></p>\");\n }\n } else {\n if (createQtMsg != null)\n resultErrMsg.append(\"<p><b>\" + createQtMsg +\n \"</b></p>\");\n else\n resultErrMsg.append(\"<p><b>\" +\n SudokuUtils.createQteMsg +\n \"</b></p>\");\n }\n String msg = resultMsg.append(\"</body></html>\").toString();\n String errMsg =\n resultErrMsg.append(\"</body></html>\").toString();\n if (msg != null || errMsg != null) {\n RichPopup.PopupHints hints = new RichPopup.PopupHints();\n if (msg != null &&\n !\"<html><body></body></html>\".equalsIgnoreCase(msg)) {\n this.setInfoFromPopup(msg);\n } else\n this.setInfoFromPopup(null);\n if (errMsg != null &&\n !\"<html><body></body></html>\".equalsIgnoreCase(errMsg))\n this.setErrorFromPopup(errMsg);\n else\n this.setErrorFromPopup(null);\n\n successMsgOnSaveToOrcl.setValue(msg);\n errorMsgOnSaveToOrcl.setValue(errMsg);\n this.getBindSaveToOrclPopup().show(hints);\n // bindSaveToOrclPopup.show(hints);\n // bindPopup1.show(hints);\n }\n } else {\n isQuoteSaved = false;\n displayConfigErrors(v93k);\n }\n if (v93k != null && v93k.getSessionDetails() != null) {\n v93k.getSessionDetails().setQuoteSaved(isQuoteSaved);\n ADFUtils.setSessionScopeValue(\"parentObject\", v93k);\n String currView =\n (String)ADFUtils.getSessionScopeValue(\"currView\");\n if (currView != null &&\n currView.equalsIgnoreCase(\"configurator\")) {\n RichCommandImageLink button =\n (RichCommandImageLink)ADFUtils.findComponentInRoot(\"ctb3\"); // Navigate to create quote page\n if (button != null) {\n ActionEvent acEvent = new ActionEvent(button);\n acEvent.queue();\n }\n }\n\n }\n } else {\n ADFUtils.addMessage(FacesMessage.SEVERITY_WARN,\n \"Quote has been saved to Oracle,This action is not allowed..\");\n }\n }", "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Override\n\tpublic void save() {\n\t\t\n\t}", "public boolean doSave() {\n return true;\n }", "public void saveQuestion(Questions q) {\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\tsession.save(q);\n\t\ttx.commit();\n\t\tsession.close();\n\t}", "@Override\r\n\tpublic void saveASNew(Trade trade) {\n\t\ttradeid.setText(new Integer(trade.getId()).toString());\r\n\t\ttradestatus.setText(trade.getStatus());\r\n\t\tactionstatus.removeAllElements();\r\n\t\t\r\n\t//\tprocessActionData(actionstatus,trade.getTradedesc1()); \r\n\t\t/// imp note : wf understand CASH productType as MM so passing MM as hardcoded\r\n processActionData(actionstatus,productType.toUpperCase(),trade.getTradedesc1(),tradestatus.getText(),rtradeservices);\r\n\t\tthis.trade = trade;\r\n\t\tsetTrade(trade);\r\n\t\tgetTradeTransfers(transferPanel);\r\n\t\tgetTradeTask(taskPanel);\r\n\t\tgetTradeSDI(sdiPanel);\r\n\t}", "void save();", "void save();", "void save();", "@UiHandler(\"save\")\n\tvoid onSaveClicked(ClickEvent evt) {\n\t\tScheduler.get().scheduleDeferred(new ScheduledCommand() {\n\t\t\t@Override\n\t\t\tpublic void execute() {\n\t\t\t\tpresenter.save();\n\t\t\t}\n\t\t});\n\t}", "public void deleteQuote(QuoteEvent quote)\r\n\t\t\tthrows PersistenceException;", "public void singleSave() {\n\t\ttry {\n\t\t\tthis.insertBy = CacheUtils.getUser().username;\n\t\t} catch (Exception e) {\n\t\t\tif (! getClass().equals(GlobalCurrencyRate.class)) {\n\t\t\t\tlog.error(\"ERROR\", e);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.insertBy = \"super\";\n\t\t}\n\t\tthis.workspace = CacheUtils.getWorkspaceId();\n\t\tthis.insertAt = new Date();\n\n\t\tsuper.save();\n\t\tCacheUtils.cleanAll(this.getClass(), getAuditRight());\n\t}", "@Override\n\tpublic void save(Company company) {\n\t\t\n\t}", "UserOrder save(UserOrder order);", "@Override\r\n\tpublic void save() {\n\r\n\t}", "@Override\r\n\tpublic void save() {\n\r\n\t}", "Quote createQuote();", "void commit( boolean onSave );", "public BankThing save(BankThing thing);", "@Override\n\tpublic void save() {\n\t\tSystem.out.println(\"save method\");\n\t}", "public boolean save();", "@Override\n\tpublic void save(CorsoDiLaurea corso) {\n\t\t\n\t}", "@Override\n\tItem save(Item item);", "public void saveAnswer(Answer answer) throws Exception {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n dbb.saveAnswer(answer);\n dbb.commit();\n dbb.closeConnection();\n }", "public abstract String doSave() throws Exception;", "public void saveJbdTravelPointLog2013(JbdTravelPointLog2013 jbdTravelPointLog2013);", "@Override\n\tpublic Order save(Order e, long id) {\n\t\treturn null;\n\t}", "Transaction save(Transaction transaction);", "public boolean recordTrade(Trade trade) throws Exception;", "public void save() {\n DataBuffer.saveDataLocally();\n\n //TODO save to db must be done properly\n DataBuffer.save(session);\n\n //TODO recording saved confirmation\n }", "public CustDashboardPage saveQuote(ExtentTest extentedReport) throws Exception {\n\t\tCustDashboardPage objCustDashboardPage = null;\n\t\ttry {\n\t\t\tbtnSaveQuote.click();\n\t\t\tLog.message(\"Clicked on 'Save Quote' payment button\", extentedReport);\n\t\t\tWaitUtils.waitForSpinner(driver);\n\t\t\tobjCustDashboardPage = new CustDashboardPage(driver, extentedReport).get();\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Unable to save quote. \" + e);\n\t\t}\n\t\treturn objCustDashboardPage;\n\t}", "void saveCity(City city);", "CustomerOrder save(CustomerOrder customerOrder);", "@Override\r\n\tpublic void save(Worker worker) {\n\t\tbaseDao.save(worker);\r\n\t}", "void save(Athletes athletes);", "public Company saveCompany(Company company);", "@Override\n public void save() {\n\n }", "@Override\n public void save(Skill skill) {\n skillRepository.save(skill);\n }", "void save(String key, Object data, int expirySeconds) throws BusinessException;", "void saveComment(Comment.SavableComment comment) throws SQLException;", "@Override\n public void Save() {\n\t \n }", "void save(Object entity);", "protected void save(T item) {\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = mDbHelper.beginTransaction();\n\t\t\tsession.save(item);\n\t\t\tmDbHelper.endTransaction(session);\n\t\t} catch (Exception e) {\n\t\t\tmDbHelper.cancelTransaction(session);\n\t\t\tAppLogger.error(e, \"Failed to execute save\");\n\t\t}\n\t}", "public void setQuoteID(java.lang.Object quoteID) {\n this.quoteID = quoteID;\n }", "@Override\n\t\n\tpublic void saveSkill(Skill skill) {\n\t\tskillRepository.save(skill);\n\t\t\n\t}", "public Order saveOrUpdate(Order order);", "@Override\n public Building save(Building entity) {\n return dao.save(entity);\n }", "@Override\r\n\tpublic void savePolicy(Policy policy) {\n\t\tdao.savePolicy(policy);\r\n\t}", "public int save(SaveQuery saveQuery, EntityDetails entityDetails, ObjectWrapper<Object> idGenerated);", "void save(final Widget widget);", "public boolean maybeSave(final Bid bid);", "@Override\n\tpublic void save(Domingo domingo) {\n\t\tdomingoDAO.save(domingo);\t\t\n\t}", "public Trade saveTrade(Trade trade) {\n Account account = trade.getTrader().getAccount();\n Double currentBalUSD = account.getUsd();\n Double usdAmount = trade.getUsdAmount();\n Double foreignAmount = -usdAmount*(1/trade.getRate()); // this calculation is happening on the front end too, more efficient: store the foreign amount in the table too and send it in with the trade\n account.setUsd(currentBalUSD+usdAmount);\n\n /*\n Checking which type of trade to be made (eurusd, gbpusd, nzdusd)\n */\n switch (trade.getCurrencyPair().getId()) {\n case 1: {\n Double currentForeignBal = account.getEur();\n account.setEur(currentForeignBal + foreignAmount);\n break;\n }\n case 2: {\n Double currentForeignBal = account.getGbp();\n account.setGbp(currentForeignBal + foreignAmount);\n break;\n }\n case 3: {\n Double currentForeignBal = account.getNzd();\n account.setNzd(currentForeignBal + foreignAmount);\n break;\n }\n }\n\n return tradeRepository.save(trade);\n }", "private void save(Store store) {\n if (saved) {\n return;\n }\n\n if (saves.isEmpty()) {\n saved = true;\n return;\n }\n\n store.save(saves);\n saved = true;\n }", "@Override\r\n public void save(BuyTicketModel value) {\n String sql = \"insert into buyticket values(?,?,?,?,?,?,?,?,?,?,?,?) \";\r\n \r\n try {\r\n PreparedStatement pstm = database.getCon().prepareStatement(sql);\r\n pstm.setString(1, value.getSlno());\r\n pstm.setString(2, value.getCustomername());\r\n pstm.setString(10,value.getContact());\r\n pstm.setString(3, value.getDestination());\r\n pstm.setString(4, value.getTime());\r\n pstm.setString(5, value.getFare());\r\n pstm.setString(6, value.getComment());\r\n pstm.setString(7, value.getDate());\r\n pstm.setString(8, value.getPayment());\r\n pstm.setString(9, value.getSeat());\r\n pstm.setString(11, value.getType());\r\n pstm.setString(12, value.getBusname());\r\n \r\n \r\n pstm.executeUpdate();\r\n pstm.close();\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(BuyTicketImpl.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n }", "public abstract CustomerOrder save(CustomerOrder entity);", "@Override\n public void save() {\n \n }", "void saveProduct(Product product);", "public void save(PtJJdwcy entity);", "Product save(Product product);", "public void saveJbdTravelPoint2014(JbdTravelPoint2014 jbdTravelPoint2014);", "void save(E entity);", "@Override\n public void save(Promocion prm) {\n promocionRepository.save(prm);\n }", "private void saveInstrument() {\n String instrument = mInstrument.getText().toString().trim();\n String brand = mBrand.getText().toString().trim();\n String serial = mSerial.getText().toString().trim();\n int quantity = mQuantity.getValue();\n String priceString = mPrice.getText().toString().trim();\n if(TextUtils.isEmpty(instrument) && TextUtils.isEmpty(brand) && TextUtils.isEmpty(serial) &&\n TextUtils.isEmpty(priceString) && quantity == 0){\n return;\n }\n float price = 0;\n if(!TextUtils.isEmpty(priceString)){\n price = Float.parseFloat(priceString);\n }\n //Retrieve selected supplier from Spinner\n String suppName = mSpinner.getSelectedItem().toString();\n //A query request to get the id of the selected supplier\n String [] projection = {SupplierEntry._ID, SupplierEntry.COLUMN_NAME};\n String selection = SupplierEntry.COLUMN_NAME + \"=?\";\n String [] selectionArgs = {suppName};\n Cursor cursor = getContentResolver().query(SupplierEntry.CONTENT_SUPPLIER_URI, projection, selection, selectionArgs, null);\n int idSupplier = 0;\n try {\n int idColumnIndex = cursor.getColumnIndex(SupplierEntry._ID);\n //move the cursor to the 0th position, before you start extracting out column values from it\n if (cursor.moveToFirst()) {\n idSupplier = cursor.getInt(idColumnIndex);\n }\n }finally {\n cursor.close();\n }\n ContentValues values = new ContentValues();\n values.put(InstrumentEntry.COLUMN_NAME, instrument);\n values.put(InstrumentEntry.COLUMN_BRAND, brand);\n values.put(InstrumentEntry.COLUMN_SERIAL, serial);\n values.put(InstrumentEntry.COLUMN_PRICE, price);\n values.put(InstrumentEntry.COLUMN_NB, quantity);\n values.put(InstrumentEntry.COLUMN_SUPPLIER_ID, idSupplier);\n Uri uri = getContentResolver().insert(InstrumentEntry.CONTENT_INSTRUMENT_URI, values);\n if(uri != null){\n Toast.makeText(this, \"Instrument successfully inserted\", Toast.LENGTH_SHORT);\n }else\n Toast.makeText(this, \"Instrument insertion failed\", Toast.LENGTH_SHORT);\n }", "public void persistVisit(Visit visit) throws SQLException{\n\t\tpersistPlace(visit.getPlace());\n\t\t\n\t\tString readPlacePKQuery = \"SELECT id FROM Place WHERE name = ? AND descriptionFile = ?\";\n\t\tString insertVisitQuery = \"INSERT INTO Visit (visitTime, price, id_place) VALUES (?,?,?)\";\n\n\t\t//Then, get the primary key of the Place\n\t\tPreparedStatement preparedStatement = conn.prepareStatement(readPlacePKQuery);\n\t\t\n\t\tpreparedStatement.setString(1, visit.getPlace().getName());\n\t\tpreparedStatement.setString(2, visit.getPlace().getDescriptionFile());\n\t\t\n\t\tResultSet result = preparedStatement.executeQuery();\n\t\tresult.next();\n\t\t\n\t\tint placePK = result.getInt(\"id\");\n\t\t\n\t\tpreparedStatement.close();\n\n\t\t//Set visit in the database\n\t\tpreparedStatement = conn.prepareStatement(insertVisitQuery);\n\t\t\n\t\tpreparedStatement.setFloat(1, visit.getTime());\n\t\tpreparedStatement.setFloat(2, visit.getPrice());\n\t\tpreparedStatement.setInt(3, placePK);\n\n\t\tpreparedStatement.executeUpdate();\n\n\t\tpreparedStatement.close();\n\t}", "@Override\n public void save()\n {\n \n }", "@Override\n\tpublic void save(Facture x) {\n\t\tgetHibernateTemplate().save(x);\n\t}", "public void saveDate(View view) {\n// create an object of order\n Order order = new Order(name, Integer.parseInt(price));\n dbHandler.addOrder(order);\n Toast.makeText(getApplicationContext(), \"Hooray! Data Saved in DB\", Toast.LENGTH_SHORT).show();\n }", "T save(T t);", "private void save(){\n\n this.title = mAssessmentTitle.getText().toString();\n String assessmentDueDate = dueDate != null ? dueDate.toString():\"\";\n Intent intent = new Intent();\n if (update){\n assessment.setTitle(this.title);\n assessment.setDueDate(assessmentDueDate);\n assessment.setType(mAssessmentType);\n intent.putExtra(MOD_ASSESSMENT,assessment);\n } else {\n intent.putExtra(NEW_ASSESSMENT, new Assessment(course.getId(),this.title,mAssessmentType,assessmentDueDate));\n }\n setResult(RESULT_OK,intent);\n finish();\n }", "Entity save(Entity entity);", "@Override\n\tpublic T save(T entity) {\n\t\treturn getDao().save(entity);\n\t}", "public void recordLastTrade(QuoteAndSize lastTrade_, MarketDataSession marketDataSession_);", "void save(Account account);", "Skill saveSkill(Skill skill);", "@Override\n public void save(T element) {\n manager.persist(element);\n }" ]
[ "0.749796", "0.6501208", "0.6300077", "0.6262422", "0.6166728", "0.59561074", "0.58543277", "0.58345664", "0.5811655", "0.57587177", "0.57587177", "0.57587177", "0.57587177", "0.5741669", "0.57402056", "0.5739985", "0.57215095", "0.567187", "0.5663928", "0.5624385", "0.5616912", "0.56078744", "0.55896", "0.55882305", "0.55837095", "0.5566176", "0.5566176", "0.5531678", "0.5529967", "0.5507206", "0.54998034", "0.54998034", "0.54998034", "0.5490975", "0.5483324", "0.5471829", "0.54653656", "0.5459795", "0.54550564", "0.54550564", "0.54547715", "0.544672", "0.5436484", "0.54101187", "0.54027206", "0.54003567", "0.53888196", "0.5385974", "0.5370532", "0.5360055", "0.534896", "0.53464794", "0.5326898", "0.5326856", "0.53205943", "0.5316522", "0.5310819", "0.53089625", "0.5289414", "0.5289016", "0.52794546", "0.52787775", "0.5266577", "0.5266419", "0.52648914", "0.52642965", "0.52638614", "0.5255229", "0.5254646", "0.5253906", "0.5253753", "0.5243171", "0.52388316", "0.5236701", "0.52319205", "0.5230397", "0.52301043", "0.5221773", "0.52208173", "0.52175575", "0.5216995", "0.5212949", "0.52114284", "0.52107966", "0.518255", "0.5181849", "0.5176599", "0.51753676", "0.5173", "0.5171834", "0.5163289", "0.51568145", "0.51541513", "0.51540416", "0.5152842", "0.5144919", "0.51423144", "0.5141393", "0.5141018", "0.5131758" ]
0.81708986
0
Deletes the supplied quote from the database.
public void deleteQuote(QuoteEvent quote) throws PersistenceException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void deletesQuote() throws Exception {\n final Base base = new DyBase(\n this.dynamo.region(), new MkSttc().counters().get(\"tf8\")\n );\n final String name = \"walter2007\";\n final Book book = base.books().add(\n String.format(\"@book{%s, author=\\\"Walter Sobchak\\\"}\", name)\n );\n final Quotes quotes = base.quotes();\n final Quote quote = quotes.add(\n book, \"never give up, never ever\", \"99-103\"\n );\n MatcherAssert.assertThat(\n quotes.refine(name).iterate(),\n Matchers.<Quote>iterableWithSize(1)\n );\n quotes.delete(quote.number());\n MatcherAssert.assertThat(\n quotes.refine(name).iterate(),\n Matchers.<Quote>iterableWithSize(0)\n );\n }", "public static void delete(Connection connection) throws SQLException {\r\n\r\n //display what is required, create a scanner and get input from user\r\n System.out.println(\"DELETE ITEM\\nSelect the toy you would like to delete:\\nFormat (Toy) example: Barbie\");\r\n Scanner scan = new Scanner(System.in);\r\n\r\n Statement statement = connection.createStatement();\r\n String delete = scan.nextLine();\r\n\r\n //delete the toy from the database where the toy is = to the toy given by the user\r\n statement.executeUpdate(\"DELETE FROM toy_stock WHERE toy='\" + delete + \"'\");\r\n System.out.println(\"Toy Deleted From Database\\n\");\r\n\r\n //back to main menu\r\n menu(connection);\r\n\r\n }", "@Override\n\tpublic void deleteOrder(Connection conn, String oid) throws SQLException {\n\t\tQueryRunner qr = new QueryRunner();\n\t\tString sql = \"delete from orders where id=?\";\n\t\tqr.update(conn, sql, oid);\n\t}", "@Override\n\tpublic void delete(String... args) throws SQLException {\n\t\t\n\t}", "public void deleteDB() {\n \n sql = \"Delete from Order where OrderID = \" + getOrderID();\n db.deleteDB(sql);\n \n }", "private void deleteRecord(){\n if (mCurrentSymptomUri != null) {\n // pull out the string value we are trying to delete\n mEditSymptomText = findViewById(R.id.edit_symptoms);\n String deleteTry = mEditSymptomText.getText().toString();\n\n // set up the ContentProvider query\n String[] projection = {_IDST, SymTraxContract.SymTraxTableSchema.C_SYMPTOM};\n String selectionClause = SymTraxContract.SymTraxTableSchema.C_SYMPTOM + \" = ? \";\n String[] selectionArgs = {deleteTry};\n\n Cursor c = getContentResolver().query(\n SYM_TRAX_URI,\n projection,\n selectionClause,\n selectionArgs,\n null );\n\n // if there are no instances of the deleteTry string in the Machines DB\n // Go ahead and try to delete. If deleteTry value is in CMachineType column do not delete (no cascade delete)\n if (!c.moveToFirst()){\n int rowsDeleted = getContentResolver().delete(mCurrentSymptomUri, null, null);\n if (rowsDeleted == 0) {\n Toast.makeText(this, getString(R.string.delete_record_failure),\n Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, getString(R.string.delete_record_success),\n Toast.LENGTH_SHORT).show();\n }\n c.close();\n finish(); // after deleting field value\n } else {\n c.close();\n showNoCascadeDeleteDialog();\n }\n }\n }", "public void Delete(){\n String whereClause2 = PostDatabase.ID + \" = ?\";\n // Specify arguments in placeholder order.\n String[] whereArgs2 = { \"6\" };\n // Issue SQL statement.\n sqlDB.delete(PostDatabase.TABLE_POSTS, whereClause2, whereArgs2);\n\n }", "public void deleteRow(String row) {\n database.delete(ORDER_MASTER, ORDER_ID + \"=\" + row, null);\n }", "public void delete() throws SQLException {\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n int safeCheck = BusinessFacade.getInstance().checkIDinDB(this.goodID,\n \"orders\", \"goods_id\");\n if (safeCheck == -1) {\n stmtIn.executeUpdate(\"DELETE FROM ngaccount.goods WHERE goods.goods_id = \" +\n this.goodID + \" LIMIT 1;\");\n }\n }", "@Override\n\tpublic MahasiswaModel delete(String nik) throws SQLException {\n\t\tdeleteStatement.setString(1, nik);\n\t\tdeleteStatement.executeUpdate();\n\t\treturn null;\n\t}", "@Override\r\n\tpublic void delete(TQssql sql) {\n\r\n\t}", "@Override\r\n\tpublic boolean deleteSQL(String sql, Connection con) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic void doDelete(String product) throws SQLException {\n\t\t\n\t}", "@Override\n\tpublic void delete(String key) throws SQLException {\n\t\t\n\t}", "@Override\r\n\tpublic void delete(String did) {\n\t\tdao.delete(did);\r\n\t}", "@Override\n public void delete(Question q) {\n try {\n c = DBConncetion.getConnection();\n String sql = \"Delete From mainquestion where id = ?\";\n PreparedStatement pstmt = c.prepareStatement(sql);\n pstmt.setString(1,String.valueOf(q.getId()));\n pstmt.executeUpdate();\n if (q.getType() == FillBlank) {\n pstmt = c.prepareStatement(\"Delete From fill_blank \\n\" +\n \"Where id = ? \");\n } else {\n pstmt = c.prepareStatement(\"Delete From multiplechoice \\n\" +\n \"Where id = ? \");\n }\n pstmt.setString(1,String.valueOf(q.getId()));\n pstmt.executeUpdate();\n } catch (Exception e) {\n throw new LoadSaveException(\"Delete: \" + e.getMessage());\n }\n }", "@Override\n\tpublic void delete_from_DB() throws CouponSiteMsg\n\t{\n\t\t\n\t}", "@Override\n public void deleteById(String ticker) {\n if (ticker == null) {\n throw new IllegalArgumentException(\"ID can't be null\");\n }\n String deleteSql = \"DELETE FROM \" + TABLE_NAME + \" WHERE \" + ID_COLUMN_NAME + \"=?\";\n jdbcTemplate.update(deleteSql, ticker);\n\n }", "public void delete() throws SQLException {\r\n\t\t//SQL Statement\r\n\r\n\t\tString sql = \"DELETE FROM \" + table+ \" WHERE \" + col_genreID + \" = ?\";\r\n\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tstmt.setInt(1, this.getGenreID());\r\n\r\n\t\tint rowsDeleted = stmt.executeUpdate();\r\n\t\tSystem.out.println(\"Es wurden \"+rowsDeleted+ \"Zeilen gelöscht\");\r\n\t\tstmt.close();\r\n\t}", "public void delete() {\n\t\ttry {\n\t\t\tStatement stmt = m_db.m_conn.createStatement();\n\t\t\tString sqlString;\n\t\t\tString ret;\n\n\t\t\tsqlString = \"DELETE from country WHERE countryid=\" + m_country_id;\n\t\t\tm_db.runSQL(sqlString, stmt);\n\t\t\tstmt.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\">>>>>>>> EXCEPTION <<<<<<<<\");\n\t\t\tSystem.out.println(\"An Exception occured in delete().\");\n\t\t\tSystem.out.println(\"MESSAGE: \" + e.getMessage());\n\t\t\tSystem.out.println(\"LOCALIZED MESSAGE: \" + e.getLocalizedMessage());\n\t\t\tSystem.out.println(\"CLASS.TOSTRING: \" + e.toString());\n\t\t\tSystem.out.println(\">>>>>>>>>>>>>-<<<<<<<<<<<<<\");\n\t\t}\n\t}", "@Override\n\tpublic void delete(DatabaseHandler db) {\n\t\tdb.deleteWork(this);\n\t\t\n\t}", "public boolean del(String where) {\n return db.delete (TABLE, where);\n }", "public void delete() {\n \t\t try(Connection con = DB.sql2o.open()) {\n \t\t\t String sql = \"DELETE FROM sightings where id=:id\";\n\t\t\t con.createQuery(sql)\n\t\t\t.addParameter(\"id\", this.id)\n\t\t\t.executeUpdate();\n\n \t\t }\n \t }", "public void onDelete(Statement delete, Connection cx, SimpleFeatureType featureType) throws SQLException {\r\n }", "public void delete() throws SQLException {\n DatabaseConnector.updateQuery(\"DELETE FROM course \"\n + \"WHERE courseDept='\" + this.courseDept \n + \"' AND courseNum = '\" + this.courseNum + \"'\");\n }", "@Override\n\tpublic boolean delete(String sql) {\n\t\treturn false;\n\t}", "public void delete(IQuery query) throws SQLException;", "public void deleteIscrizione() throws SQLException {\r\n\r\n\t\tPreparedStatement pstmt = null;\r\n\r\n\t\ttry {\r\n\t\t\tpstmt = con.prepareStatement(STATEMENTDEL);\r\n\t\t\t\r\n\t\t\tpstmt.setString(1, i.getGiocatore());\r\n\t\t\tpstmt.setInt(2, i.getTorneo());\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\tpstmt.execute();\r\n\r\n\t\t} finally {\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\tpstmt.close();\r\n\t\t\t}\r\n\r\n\t\t\tcon.close();\r\n\t\t}\r\n\r\n\t}", "public void deleteSong(Song_it3 song) {\r\n\t\tDBBroker conex = new DBBroker();\r\n\t\t try {\r\n\t\t Statement estatuto = conex.getConnection();\r\n\t\t estatuto.executeUpdate(\"DELETE FROM song WHERE idSong= \" + song.getIdSong());\r\n\t\t JOptionPane.showMessageDialog(null, \"Se ha registrado Exitosamente\", \"Información\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t estatuto.close();\r\n\t\t conex.desconectar();\r\n\t\t \r\n\t\t } catch (SQLException e) {\r\n\t\t System.out.println(e.getMessage());\r\n\t\t JOptionPane.showMessageDialog(null, \"No se eliminó la canción\");\r\n\t\t }\r\n\t}", "@Override\r\n\tpublic boolean deleteSQL(BaseBean sql, Connection con) {\n\t\treturn delete((CurrencyDefault) sql, con);\r\n\t}", "@Delete({\n \"delete from order\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n int deleteByPrimaryKey(Long id);", "public void deleteMovieSQL(Movie movie){\n try {\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ps = conn.prepareStatement(\"DELETE FROM movies WHERE (title=? AND director=?);\");\n ps.setString(1, movie.getTitle());\n ps.setString(2, movie.getDirector());\n ps.executeUpdate();\n } catch (Exception ex) {\n System.err.println(ex.toString());\n }\n }", "public void delete(String so_cd);", "@Override\n\tpublic void delete(Connection c, Integer id) throws SQLException {\n\n\t}", "@Delete({\n \"delete from PURCHASE\",\n \"where ID = #{id,jdbcType=DECIMAL}\"\n })\n int deleteByPrimaryKey(BigDecimal id);", "public void deleteFromPoseOrder() { \n \ttry {\n\t\t\tthis.openDataBase();\n\t\t\tmyDataBase.execSQL(DeletePoses);\n\t\t\tthis.close();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tLog.d(\"SQL Exception\", e.toString());\n\t\t}\n \t\n }", "public void delete() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.delete(this);\r\n\t}", "@Override\n\tpublic String deleteStatement() throws Exception {\n\t\treturn null;\n\t}", "@Override\n\tpublic void delete(Example example) {\n\t\tthis.conn = ConnectionFactory.getConnection();\n\t\tString sql = \"DELETE FROM example WHERE id = ?;\";\n\t\tPreparedStatement stmt = null;\n\t\ttry {\n\t\t\tstmt = conn.prepareStatement(sql);\n\t\t\tstmt.setLong(1, example.getId());\n\t\t\tstmt.execute();\n\t\t} catch (SQLException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif(stmt != null){\n\t\t\t\t\tstmt.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}finally {\n\t\t\t\ttry {\n\t\t\t\t\tthis.conn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void deleteOrderFromDatabase() {\n SQLiteDatabase sqLiteDatabase = db.getWritableDatabase();\n sqLiteDatabase.delete(\"ORDERS\",null,null);\n sqLiteDatabase.close();\n }", "public String deleteByExample(CarExample example) {\n SQL sql = new SQL();\n sql.DELETE_FROM(\"`basedata_car`\");\n applyWhere(sql, example, false);\n return sql.toString();\n }", "@Override\n\tpublic void delete(String arg0) {\n\t\t\n\t}", "public void del(String id) throws SQLException {\n JiaqishenqingDao dao = new JiaqishenqingDao();\n dao.delete(id);\n }", "public void delete(Order order) {\n order_dao.delete(order);\n }", "@Override\n\tpublic void deleteByNomenclatureId(Nomenclature nomenclature) {\n\t\tStringBuilder qString = new StringBuilder(\"DELETE FROM required_nomenclature WHERE code = ?\");\n\t\tjdbcTemplate.update(qString.toString(), nomenclature.getId());\n\t}", "@Override\n\tprotected String deleteStatement() {\n\t\treturn null;\n\t}", "public void delete(Object obj) throws SQLException {\n\r\n\t}", "@Override\n public void delete(Song song) {\n create.deleteFrom(T_SONG)\n .where(T_SONG.SONGID.eq(song.getId()))\n .execute();\n }", "@Override\n public int deleteByPrimaryKey(BorrowDO record){\n return borrowExtMapper.deleteByPrimaryKey(record);\n }", "@Override\n\tpublic void delete(Integer id) throws SQLException {\n\t\t\n\t}", "@Override\n\tpublic void delete(Orderi orderi) {\n\t\tgetHibernateTemplate().delete(orderi);\n\t}", "public void delete(String table_name, String where_condition, String[] whereArgs) {\n\n // silently return if connection is closed\n if (!is_open) {\n return;\n }\n\n // build delete string\n StringBuilder delete_string = new StringBuilder(\"DELETE FROM \" + table_name);\n\n // if we have a condition, process it\n if (where_condition != null) {\n delete_string.append(\" WHERE \");\n\n // replace question marks in where condition with strings (Android style!)\n if (where_condition.contains(\"?\") && whereArgs != null && whereArgs.length > 0) {\n for (String whereArg : whereArgs) {\n where_condition = where_condition.replaceFirst(\"\\\\?\", \"'\" + whereArg + \"'\");\n }\n }\n\n // delete with the new where condition\n delete_string.append(where_condition);\n } else {\n // if no condition, delete everything! (dangerous)\n delete_string.append(\" WHERE 1 = 1\");\n }\n\n // try to delete the entry\n try {\n statement.execute(delete_string.toString());\n connection.commit();\n } catch (SQLException e) {\n System.out.println(\"Could not delete entry in table \" + table_name);\n e.printStackTrace();\n }\n\n //System.out.println(\"Deleted entry in table \" + table_name);\n\n }", "@DELETE\n public void delete() {\n PersistenceService persistenceSvc = PersistenceService.getInstance();\n try {\n persistenceSvc.beginTx();\n deleteEntity(getEntity());\n persistenceSvc.commitTx();\n } finally {\n persistenceSvc.close();\n }\n }", "@Delete({\n \"delete from tb_express_trace\",\n \"where order_id = #{orderId,jdbcType=VARCHAR}\"\n })\n int deleteByPrimaryKey(String orderId);", "@Override\r\n\tpublic void delete(Connection connection, Salary salary) throws SQLException {\n\r\n\t}", "public void deleteTitle(Title title) {\n db.deleteTitle(title);\n }", "public void deleteCar(Car car) {\n DatabaseManager.deleteCar(car);\n }", "@Override\n\tprotected void doDelete(DomainObject o, PreparedStatement s)\n\t\t\tthrows SQLException {\n\n\t}", "@Override\n public String deleteStatement() throws Exception {\n return null;\n }", "@Override\n\tpublic void deleteOrder(int id) throws SQLException {\n\t\tConnection conn = null;\n PreparedStatement stmt = null;\n String sql=\"DELETE FROM orders WHERE orderId=?\";\n try {\n conn = DBCPUtils.getConnection();\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1,id);\n stmt.executeUpdate();\n \n } catch (SQLException e) {\n e.printStackTrace();\n }finally{\n DBCPUtils.releaseConnection(conn, stmt, null); \n }\n\t\t\n\t}", "public boolean delete (JDCConnection oConn) throws SQLException {\r\n return Term.delete(oConn, getString(DB.gu_term));\r\n }", "@Delete({\n \"delete from SALEORDERDETAIL\",\n \"where SOID = #{soid,jdbcType=VARCHAR}\",\n \"and LINENO = #{lineno,jdbcType=DECIMAL}\"\n })\n int deleteByPrimaryKey(@Param(\"soid\") String soid, @Param(\"lineno\") Long lineno);", "public int delete(String whereClause,String[] whereArgs){\n return db.delete(Funcoes,whereClause,whereArgs);\n }", "@Override\n\tpublic void deleteById(int id) throws SQLException {\n\n\t}", "@Override\r\n\tpublic void deletebook(int seq) {\n\t\tsqlSession.delete(ns + \"deletebook\", seq);\r\n\t}", "public void deleteTransaction() {\n\t\tconn = MySqlConnection.ConnectDb();\n\t\tString sqlDelete = \"delete from Account where transactionID = ?\";\n\t\ttry {\n\t\t\t\n\t\t\tps = conn.prepareStatement(sqlDelete);\n\t\t\tps.setString(1, txt_transactionID.getText());\n\t\t\tps.execute();\n\n\t\t\tUpdateTransaction();\n\t\t} catch (Exception e) {\n\t\t}\n\t}", "public int deleteByWhere(String where) throws SQLException\n {\n Connection c = null;\n PreparedStatement ps = null;\n\n try\n {\n c = getConnection();\n String delByWhereSQL = \"DELETE FROM preference \" + where;\n ps = c.prepareStatement(delByWhereSQL);\n return ps.executeUpdate();\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "@Override\r\n\tpublic void delete() {\n\t\tString delete=\"DELETE FROM members WHERE id =?\";\r\n\t\t try(Connection connection=db.getConnection();) {\r\n\t\t\t\t\r\n\t\t\t\tpreparedStatement=connection.prepareStatement(delete);\r\n\t\t\t\tpreparedStatement.setString(1, super.getIdString());\r\n\t\t \tpreparedStatement.executeUpdate();\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Transaction successful\");\r\n\t\t\t\t\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Something went wrong\");\r\n\t\t\t}\r\n\t}", "@Override\r\n\tpublic void deleteToken(String token){\n\t\tString deleteTokenSQL = \"delete from verificationtoken where token='\" + token + \"'\";\r\n\r\n\t\tjdbcTemplate.update(deleteTokenSQL);\r\n\r\n\t}", "@Query(\"DELETE FROM lyrics WHERE id = :lyricId\")\n void deleteLyricById(int lyricId);", "int deleteByPrimaryKey(String thingid);", "public void deleteEntry(long row) {\n database.delete(ORDER_MASTER, ROW_ID + \"=\" + row, null);\n }", "@Override\r\n\tpublic void delete(int no) {\n\t\tsqlSession.delete(namespace + \".delete\", no);\r\n\t}", "@Override\r\n\tpublic void delete(int no) {\n\t\tsqlSession.delete(namespace + \".delete\", no);\r\n\t}", "@Override\r\n\tpublic void deletes(String did) {\n\t\tdao.deletes(did);\r\n\t}", "@Override\n\tpublic void deleteQAPost(int qnum) {\n\t\tqaDao.deleteQAPost(qnum);\n\t}", "public void deleteButtonClicked(View view) {\n String inputText = johnsInput.getText().toString();\n dbHandler.deleteProduct(inputText);\n printDatabase();\n }", "@Override\n\tpublic void delete(Long primaryKey) {\n\t\t\n\t}", "@Override\n\tpublic void deleteCoach(Coach coach) {\n\t\tthis.getHibernateTemplate().delete(coach);\n\t}", "@Override\n\tpublic void delete(String id) {\n\t\tString query=\"Delete from Book Where id='\"+id+\"'\";\n\t\texecuteQuery(query);\n\t\tnotifyAllObservers();\n\t\t\n\t}", "public void deleteQuestion(Question question) throws Exception {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n question.setDeleted(true);\n dbb.overwriteQuestion(question);\n dbb.commit();\n dbb.closeConnection();\n }", "public void deleteDrinkBills(Bill deleteDrink) {\n\tString sql =\"DELETE FROM bills WHERE Id_drink = ?\";\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tpreparedStatement.setInt(1, deleteDrink.getId());\n\t\tpreparedStatement.execute();\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n}", "public void deleteFoodBill(Bill deleteFood) {\nString sql =\"DELETE FROM bills WHERE Id_food = ?\";\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tpreparedStatement.setInt(1, deleteFood.getId());\n\t\tpreparedStatement.execute();\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n}", "int deleteByExample(OrderPreferentialExample example) throws SQLException;", "@Override\n\tpublic void likedelete(boardDTO board) throws Exception {\n\t\tsqlSession.delete(namespace+\".likedelete\", board);\n\t}", "public void doDelete(T objectToDelete) throws SQLException;", "@Delete({\n \"delete from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n int deleteByPrimaryKey(String username);", "public void deleteEvent(Connection connection, StoreData data){\n\t\t//First a statement is prepared to send to the database to delete the events \n\t\tPreparedStatement preStmt=null;\n\t\tString stmt = \"DELETE FROM Event WHERE id=?\";\n\t\t//This try catch block is used to send the delete command to the database\n\t\ttry{\n\t\t\tpreStmt = (PreparedStatement) connection.prepareStatement(stmt);\n\t\t\tpreStmt.setString(1, data.getID());\n\t\t\tpreStmt.executeUpdate();\n\t\t}catch(SQLException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected void deleteRecord() throws DAOException {\r\n\t\t// Elimina relaciones\r\n\t\tfor (Sedrelco relco : object.getRelcos()) {\r\n\t\t\tsedrelcoDao.delete(relco);\r\n\t\t}\r\n\t\t// Elimina objeto\r\n\t\tobjectDao.delete(object);\r\n\t}", "public boolean deleteDB(String qryExp, RequestBox rBox) throws Exception {\n\t\treturn false;\n\t}", "public boolean deleteDB(String qryExp, RequestBox rBox) throws Exception {\n\t\treturn false;\n\t}", "public void delete(int id) throws SQLException {\n\t\t\r\n\t}", "public void deleteClient(String clientName) {\n\t\t\n\t\tConnection dbConnection = ConnectionFactory.getConnection();\n\t\tPreparedStatement deleteStatement = null;\n\t\t\n\t\ttry {\n\t\t\tdeleteStatement = dbConnection.prepareStatement(deleteStatementString);\n\t\t\tdeleteStatement.setString(1, clientName);\n\t\t\t\n\t\t\tdeleteStatement.execute();\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.log(Level.WARNING, \"ClientDAO : delete \" + e.getMessage());\n\t\t} finally {\n\t\t\tConnectionFactory.close(deleteStatement);\n\t\t\tConnectionFactory.close(dbConnection);\n\t\t}\n\t}", "public void deleteItem(String deleteID){\n try{\n // Creates a statement for the delete instruciton\n String query = \"DELETE FROM \" + getFurnitureRequest() + \" WHERE ID = ?\";\n PreparedStatement myStmt = dbConnect.prepareStatement(query);\n\n myStmt.setString(1, deleteID);\n myStmt.executeUpdate();\n myStmt.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "public void delete(Customer c){\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n try {\n ppst = conn.prepareCall(\"DELETE FROM customer WHERE customer_key = ?\");\n ppst.setInt(1, c.getCustomerKey());\n ppst.executeUpdate();\n System.out.println(\"Successfully deleted.\");\n } catch (SQLException e) {\n throw new RuntimeException(\"Delete error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst);\n }\n }", "@Override\n public void delete(Seq s) {\n // TODO Auto-generated method stub\n \t//Establish cnx\n\t\tConnection conn = null;\n\t\tString url = \"jdbc:sqlite:src\\\\database\\\\AT2_Mobile.db\";\n\t\t\n\t\ttry {\n\t\t\tconn = DriverManager.getConnection(url);\n\t\t\tPreparedStatement myStmt; \n\t\t\tString query = \"delete from seq where id = ?\";\n\t\t\tmyStmt = conn.prepareStatement(query);\n\t\t\t\n\t\t\t// Set Parameters\n\t myStmt.setInt(1, s.getId());\n\t\t\t// Execute SQL query\n\t int res = myStmt.executeUpdate();\n\t \n\t // Display the record inserted\n\t System.out.println(res + \" seq deleted\");\n\t \n\t // Close the connection\n\t conn.close();\n\t\t}catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());}\n\t\t\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException ex) {\n\t\t\t\tSystem.out.println(ex.getMessage());\n\t\t\t}\n\t\t\t}\n \t \n }", "public void delete(FaqPk pk) throws FaqDaoException;", "@Override\n\tpublic int delete(String name) {\n\t\treturn zongjieDao.delete(name);\n\t}", "public void setDeleteStatement(EdaContext xContext) throws IcofException {\n\n\t\t// Define the query.\n\t\tString query = \"delete from \" + TABLE_NAME + \n\t\t \" where \" + ID_COL + \" = ? \";\n\n\t\t// Set and prepare the query and statement.\n\t\tsetQuery(xContext, query);\n\n\t}", "void deleteExpression(Expression expression);" ]
[ "0.7445238", "0.64769936", "0.64087665", "0.63630927", "0.6150227", "0.61262065", "0.608699", "0.60391116", "0.599741", "0.59904915", "0.5980932", "0.5975112", "0.5945806", "0.5936926", "0.59296733", "0.5888118", "0.58817697", "0.58728665", "0.582294", "0.5768798", "0.57670546", "0.57500947", "0.574681", "0.5746105", "0.5743518", "0.5730888", "0.572514", "0.5724778", "0.5720357", "0.5713792", "0.5706397", "0.56842697", "0.5680384", "0.56491435", "0.5618933", "0.56137455", "0.5593028", "0.55879676", "0.55834955", "0.5581559", "0.5572791", "0.5564567", "0.5560858", "0.5555752", "0.55532366", "0.5549681", "0.554937", "0.55442864", "0.5543238", "0.5535893", "0.55344486", "0.55332524", "0.55325675", "0.5532402", "0.5525823", "0.5521586", "0.5518398", "0.55066967", "0.55054265", "0.5502488", "0.54974973", "0.54971385", "0.5489877", "0.54887694", "0.54869974", "0.5483365", "0.5481656", "0.5481396", "0.54804677", "0.54763657", "0.54608864", "0.54594386", "0.54579854", "0.54579854", "0.54559267", "0.5451137", "0.5438141", "0.5425245", "0.54247886", "0.54242295", "0.5419977", "0.5415728", "0.5404118", "0.5399008", "0.5398869", "0.53923255", "0.5390013", "0.5387152", "0.5387069", "0.53842026", "0.53842026", "0.5382231", "0.5379731", "0.5379531", "0.5377173", "0.53700525", "0.53662276", "0.5361228", "0.53601366", "0.535899" ]
0.7888177
0
Helper method for when the user sign in
private void userLogin() { String email = editTextEmail.getText().toString().trim(); String password = editTextPassword.getText().toString().trim(); if(email.isEmpty()) { editTextEmail.setError("Email is required!"); editTextEmail.requestFocus(); return; } if(!Patterns.EMAIL_ADDRESS.matcher(email).matches()){ editTextEmail.setError("Please enter a valid email!"); editTextEmail.requestFocus(); return; } if(password.isEmpty()){ editTextPassword.setError("Password is required!"); editTextPassword.requestFocus(); return; } if(password.length() < 6) { editTextPassword.setError("Min password length is 6 characters!"); editTextPassword.requestFocus(); return; } mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() { @Override public void onComplete(@NonNull Task<AuthResult> task) { if(task.isSuccessful()){ FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser(); if(user.isEmailVerified()) { startActivity(new Intent(LoginActivity.this, HomeScreen.class)); } else{ user.sendEmailVerification(); Toast.makeText(LoginActivity.this, "Check your email to verify your account!", Toast.LENGTH_LONG).show(); } } else { Toast.makeText(LoginActivity.this, "Failed to login! Please check your credentials", Toast.LENGTH_LONG).show(); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void signIn() {\n }", "public void signIn(View view) {\n requestSignIn();\n }", "void signInComplete();", "@Override\n\tpublic void onSignInSucceeded() {\n\n\t}", "private void loggedInUser() {\n\t\t\n\t}", "@Override\n public void onSignInClicked() {\n Prefs.setSignedIn(true);\n // Proceed to Main and finish\n proceedToMainActivityAndFinish();\n }", "public void signInExistingUser(View v) {\n attemptLogin();\n\n }", "private void signIn() {\n Utility.showLoader(this);\n mGoogleApiClient.clearDefaultAccountAndReconnect();\n\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "boolean isSignedIn();", "@Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n if (user != null) {\n // User is signed in\n // Log.d(TAG, \"onAuthStateChanged:signed_in:\" + user.getUid());\n // toastMessage(\"Successfully signed in with: \" + user.getEmail());\n } else {\n // User is signed out\n // Log.d(TAG, \"onAuthStateChanged:signed_out\");\n // toastMessage(\"Successfully signed out.\");\n }\n // ...\n }", "private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n finish();\n }", "private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void signIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void signIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void signIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "public void LogIn() {\n\t\t\r\n\t}", "public void signIn()\r\n {\r\n FoodCenterRequestFactory factory = AndroidRequestUtils.getFoodCenterRF(context);\r\n ClientServiceRequest service = factory.getClientService();\r\n\r\n service.login(regId).fire(this);\r\n }", "private void signInEvt() {\n // Retrieve Details\n String email = this.view.getWelcomePanel().getSignInPanel().getEmailText().getText().trim();\n String password = new String(this.view.getWelcomePanel().getSignInPanel().getPasswordText().getPassword()).trim();\n if (!email.equals(\"\") && !password.equals(\"\")) {\n if (model.getSudokuDB().checkLogin(email, password)) {\n // Set Player\n Player player = model.getSudokuDB().loadPlayer(email, password);\n if (player != null) {\n model.setPlayer(model.getSudokuDB().loadPlayer(email, password));\n // Clear Fields\n view.getWelcomePanel().getSignInPanel().clear();\n // Show Home Screen\n refreshHomePanel();\n view.getCardLayoutManager().show(view.getContent(), \"home\");\n } else {\n Object[] options = {\"OK\"};\n JOptionPane.showOptionDialog(this, \"An error occured during sign in, please try again.\", \"Sign In Error\", JOptionPane.OK_OPTION, JOptionPane.ERROR_MESSAGE, null, options, null);\n }\n } else {\n Object[] options = {\"Let me try again\"};\n JOptionPane.showOptionDialog(this, \"The credentials you have provided are invalid, please enter them correctly or create a new account.\", \"Invalid Credentials\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n } else {\n Object[] options = {\"Alright\"};\n JOptionPane.showOptionDialog(this, \"In order to sign in, all fields must be filled out.\", \"Empty Fields\", JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, options, null);\n }\n }", "public F.Promise<Result> handleSignIn() {\n final Form<LogIn> filledForm = logInForm.bindFromRequest();\n if (customerService().isLoggedIn()) {\n return asPromise(redirect(controllers.routes.HomeController.home()));\n } else if (filledForm.hasErrors()) {\n flash(\"error\", \"Login form contains missing or invalid data.\");\n return asPromise(badRequest(loginView.render(data().build(), filledForm)));\n } else {\n return handleSignInWithValidForm(filledForm);\n }\n }", "private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, SIGN_IN_CODE);\n }", "private void userIsAuthenticated() {\n this.setResult(RC_USER_LOGGED_IN, null);\n this.finish();\n }", "private void signIn() {\n final String email = ((EditText)findViewById(R.id.etSignInEmail)).getText().toString();\n final String password = ((EditText)findViewById(R.id.etSignInPassword)).getText().toString();\n\n mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success\n updateUI();\n } else {\n // Sign in failure\n Toast.makeText(LoginActivity.this, \"Incorrect email and/or password.\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "@Step(\"Verify that right user is signed in\")\n public boolean isSignedIn() {\n if (!(Driver.driver.getCurrentUrl().equals(url))) open();\n WebElement email = Driver.driver.findElement(By.id(\"email\"));\n return email.getAttribute(\"value\").equals(SignUpPage.getEmail());\n }", "private LogIn() {}", "void onSignInButtonClicked();", "private void signIn() {\n // [START_EXCLUDE silent]\n // [END_EXCLUDE]\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "public void signIn(View view) {\n\n //retrieve the elements containing email and pass input\n EditText emailEle = findViewById(R.id.email);\n EditText passwordEle = findViewById(R.id.pass);\n //retrieve the input\n String emailInput = emailEle.getText().toString();\n String passwordInput = passwordEle.getText().toString();\n\n //attempt to authenticate with the input. if we did, go to doctors list page\n email = emailInput;\n\n //verify that there is input.\n if(email.equals(\"\") || passwordInput.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Please input your username and password.\", Toast.LENGTH_SHORT)\n .show();\n return;\n }\n\n auth(emailInput, passwordInput);\n }", "private void onSignInClicked() {\n mState.enableConnection();\n mState.mShouldResolve = true;\n mState.mSignInClicked = true;\n mState.connectGoogleGames();\n\n // Show a message to the user that we are signing in.\n status.setText(\"Connecting...\");\n }", "@Override\n\tpublic int signIn(Attendance attendance) {\n\t\treturn attendanceMapper.signIn(attendance);\n\t}", "Boolean isLogIn();", "@Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser mFirebaseUser = mFirebaseAuth.getCurrentUser();\n if( mFirebaseUser != null){\n Toast.makeText(LogInActivity.this,\"You are logged in\",Toast.LENGTH_SHORT).show();\n Intent move = new Intent(LogInActivity.this,HomeActivity.class);\n startActivity(move);\n }\n else{\n Toast.makeText(LogInActivity.this,\"Please Log In\",Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onSignInSucceeded() {\n\n if (ACCESS_ACHIEVEMENT) {\n\n //if we just came from achievements button and are now signed in, display ui\n displayAchievementUI();\n\n //flag back false\n ACCESS_ACHIEVEMENT = false;\n }\n\n //don't bypass auto login\n BYPASS_LOGIN = false;\n }", "private void userSignIn() {\n GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(this);\n if (GoogleSignIn.hasPermissions(account, new Scope(SCOPES))) {\n updateUI(account);\n mAccount = account.getAccount();\n Intent intent = new Intent(this, HomeActivity.class);\n intent.putExtra(ACCOUNT, mAccount);\n startActivity(intent);\n System.out.println(\"Exit Intent !!!!!!!!!!!!!!!!\");\n\n findViewById(R.id.disconnect_button).setVisibility(View.VISIBLE);\n\n } else {\n updateUI(null);\n }\n }", "public void login () {\n\t\tGPPSignIn.sharedInstance().authenticate();\n\t}", "private void signInAlready(FirebaseUser user) {\n if (user != null) {\n updateUI(user);\n } else {\n updateUI(null);\n }\n }", "@Override\n public void onRegistrationAccomplished() {\n Prefs.setSignedIn(true);\n // Proceed to Main\n proceedToMainActivityAndFinish();\n }", "@Before(unless = { \"signin\", \"doLogin\" })\n\tprivate static void checkAuthentification() {\n\t\t// get ID from secure social plugin\n\t\tString uid = session.get(PLAYUSER_ID);\n\t\tif (uid == null) {\n\t\t\tsignin(null);\n\t\t}\n\n\t\t// get the user from the store. TODO Can also get it from the cache...\n\t\tUser user = null;\n\t\tif (Cache.get(uid) == null) {\n\t\t\ttry {\n\t\t\t\tuser = UserClient.getUserFromID(uid);\n\t\t\t\tCache.set(uid, user);\n\t\t\t} catch (ApplicationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\t}\n\t\t} else {\n\t\t\tuser = (User) Cache.get(uid);\n\t\t}\n\n\t\tif (user == null) {\n\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\tAuthentifier.logout();\n\t\t}\n\n\t\tif (user.avatarURL == null) {\n\t\t\tuser.avatarURL = Gravatar.get(user.email, 100);\n\t\t}\n\n\t\t// push the user object in the request arguments for later display...\n\t\trenderArgs.put(PLAYUSER, user);\n\t}", "@Override\n public void onLoggedIn() {\n\n }", "private void signIn() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n GoogleSignInClient mGoogleSignInClient = GoogleSignIn.getClient(getActivity(), gso);\n\n // Starting the intent prompts the user to select a Google account to sign in with\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }", "private void signInFeature() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this, this)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n\n Button signInButton = (Button) findViewById(R.id.login_button);\n signInButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n signIn();\n }\n });\n }", "private void signIn() {\n mGoogleSignInClient = buildGoogleSignInClient();\n startActivityForResult(mGoogleSignInClient.getSignInIntent(), REQUEST_CODE_SIGN_IN);\n }", "private void onSignInResult(FirebaseAuthUIAuthenticationResult result) {\n IdpResponse response = result.getIdpResponse();\n if (result.getResultCode() == RESULT_OK) {\n // Successfully signed in\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n // ...\n } else {\n // Sign in failed. If response is null the user canceled the\n // sign-in flow using the back button. Otherwise check\n // response.getError().getErrorCode() and handle the error.\n // ...\n }\n }", "private void checkIfUserIsAuthenticated() {\n splashViewModel.checkIfUserIsAuthenticated();\n splashViewModel.getIsUserAuthenticated().observe(this, user -> {\n if (!user.isAuthenticated()) {\n startAuthActivity();\n finish();\n } else {\n getUserFromDatabase(user.getUid());\n }\n });\n }", "User signIn(String login, String password);", "@Override\n public void showSignInScreen() {\n Toast.makeText(this, \"Taking user to the sign in screen\", Toast.LENGTH_SHORT).show();\n }", "public void signInUser(){\n Intent intent = new Intent(this, AuthUiActivity.class);\n startActivity(intent);\n }", "String signIn(String userName, String password) throws UserNotFoundException;", "public void onSignInClick(MouseEvent e) {\n\t\tsignin();\n\t}", "private static void logedIn(Request req, Response res, CloudService cloud) {\r\n\t\t\tif (cloud.getKorisnici().get(req.cookie(\"userID\")) == null) {\r\n\t\t\t\tString[] params = req.splat();\r\n\t\t\t\tString path;\r\n\t\t\t\tif(params.length == 0)\r\n\t\t\t\t\tpath = \"\";\r\n\t\t\t\telse\r\n\t\t\t\t\tpath = params[0];\r\n\t\t\t\tif(path.equals(\"checkLogin\") || path.equals(\"favicon.ico\"))\r\n\t\t\t\t\treturn;\r\n\t\t\t\tres.redirect(\"/login.html\");\r\n\t\t\t\thalt(302);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(req.session().attribute(\"user\") == null) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tKorisnik k = cloud.getKorisnici().get(req.cookie(\"userID\"));\r\n\t\t\t\t\treq.session().attribute(\"user\", k); // postavi mu korisnika za sesiju\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "void onSignInButtonClicked(String userEmail, String userPassword);", "private boolean isLoggedInUser(){\n return true;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n // Either way, check log in again\n checkAccessAndLoggIn();\n }", "public void signin() {\n\t\tStage window = new Stage();\n\t\t//Scene scene = new Scene(primarygridpane,400,500);\n\t\tSigninForm signin = new SigninForm();\n\t\tsignin.start(window);\n\t\tsignin.isLogged(this);\n\t}", "private void signIn(){\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n GoogleSignInClient mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, Constants.RC_SIGN_IN);\n\n }", "@Override\n public void onSignInFailed() {\n BYPASS_LOGIN = true;\n }", "public void login() {\n\t\tloggedIn = true;\n\t}", "private void signIn(String email, String password){\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n FirebaseUser user = mAuth.getCurrentUser();\n textViewStatus.setText(\"Signed In\");\n } else {\n // If sign in fails, display a message to the user.\n Toast.makeText(MainActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n textViewStatus.setText(\"Signed Out\");\n }\n\n // ...\n }\n });\n }", "public void user_signin()\r\n\t{\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"email\")).clear();\r\n\t\tdriver.findElement(By.id(\"email\")).sendKeys(UID);\r\n\t\t\r\n\t\tdriver.findElement(By.id(\"pass\")).clear();\r\n\t\tdriver.findElement(By.id(\"pass\")).sendKeys(PWD);\r\n\t}", "private void signInMethod() {\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 studentSignIn(View view){\n \tfinal EditText userName = (EditText) findViewById(R.id.StudentNameSignText);\n \tfinal EditText password = (EditText) findViewById(R.id.StudentPasswordSignText);\n \tfinal TextView error = (TextView) findViewById(R.id.ErrorStudentSignIn);\n \tParseUser.logInInBackground(userName.getText().toString(), password.getText().toString(),\n new LogInCallback() {\n public void done(ParseUser user, ParseException e) {\n if (user != null) {\n \tParseUser currentUser = ParseUser.getCurrentUser();\n \tboolean isOrg = (Boolean) currentUser.get(\"organization\");\n // Make sure it is not an organization signing in\n \t// If it is a student, then log them them in!!!!\n \tif(!isOrg){\n \t\tIntent i = new Intent(getApplicationContext(), StudentMainNav.class);\n \tstartActivity(i);\n \t}\n \t//Actually an organization. Log them out!!!\n \telse{\n \t\tParseUser.logOut();\n \t\terror.setText(\"Please log in as an organization!\");\n \t}\n } \n //Student user does not exist. retype name and password or create a new account\n else {\n if(e.getCode() == ParseException.CONNECTION_FAILED){\n \t error.setText(\"Internet connection lost\");\n }\n else if(e.getCode() == ParseException.ACCOUNT_ALREADY_LINKED){\n \terror.setText(\"Already logged in\");\n }\n else{\n \terror.setText(\"Account information not recognized\");\n }\n \n }\n }\n });\n }", "private void handleSignInResult(GoogleSignInResult result) {\n if (result.isSuccess()) {\n // Signed in successfully, show authenticated UI.\n GoogleSignInAccount acct = result.getSignInAccount();\n// mStatusTextView.setText(getString(R.string.signed_in_fmt, acct.getDisplayName()));\n// updateUI(true);\n }\n }", "@Override\n protected void afterAuthenticating() {\n }", "private void checkIfLoggedIn() {\n LocalStorage localStorage = new LocalStorage(getApplicationContext());\n\n if(localStorage.checkIfAuthorityPresent()){\n Intent intent = new Intent(getApplicationContext(),AuthorityPrimaryActivity.class);\n startActivity(intent);\n } else if(localStorage.checkIfUserPresent()){\n Intent intent = new Intent(getApplicationContext(), UserPrimaryActivity.class);\n startActivity(intent);\n }\n }", "@Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n if (user != null) {\n Log.d(TAG, \"user.isEmailVerified():\" + user.isEmailVerified());\n Log.d(TAG, \"onAuthStateChanged:signed_in:\" + user.getUid());\n signInAlready(user);\n } else {\n // User is signed out//\n Log.d(TAG, \"onAuthStateChanged:signed_out\");\n signOut();\n }\n }", "@Override\r\n public void onSign(SignEvent event){\n if (event.getAction().equals(SignEvent.Action.SIGNED_IN)) {\r\n //write cookies if keep signed in\r\n if (event.getAccountKey() != null && !event.getAccountKey().isEmpty()) {\r\n cookie.setAccountKey(Shared.MY_SESSION, event.getAccountKey());\r\n }\r\n //already signed in, load workspace\r\n RootPanel.get().clear();\r\n Widget workspace = new Workspace().asWidget();\r\n RootPanel.get().add(workspace); \r\n Info.display(\"Welcome\", \"Signed in as \" + Shared.MY_SESSION.getAccount().getFullName());\r\n }\r\n //process sign_out\r\n if (event.getAction().equals(SignEvent.Action.SIGN_OUT)){\r\n String accountKey = cookie.getAccountKey(Shared.MY_SESSION);\r\n Shared.RPC.signOutAndDetachSession(Shared.MY_SESSION, accountKey, new AsyncCallback<Session>() {\r\n @Override\r\n public void onSuccess(Session s) {\r\n if (s != null) {\r\n Shared.MY_SESSION = s;\r\n //sign out seems OK on server side, dispatch SIGNED_OUT event\r\n Shared.EVENT_BUS.fireEvent(new SignEvent(SignEvent.Action.SIGNED_OUT)); //WARN: don't dispatch SIGN_OUT avoiding deadlock call\r\n } else {\r\n Info.display(\"Error\", \"Account is already signed out or database error\");\r\n }\r\n }\r\n\r\n @Override\r\n public void onFailure(Throwable caught) {\r\n Info.display(\"Error\", caught.getMessage());\r\n }\r\n });\r\n }\r\n //process signed_out\r\n if (event.getAction().equals(SignEvent.Action.SIGNED_OUT)){\r\n //delete cookies\r\n cookie.discardCookie(Shared.MY_SESSION); \r\n //return UI to welcome status\r\n RootPanel.get().clear();\r\n RootPanel.get().add(new LoginPage()); \r\n Info.display(\"See you\", \"You are now signed out!\");\r\n }\r\n }", "private void setUpFirebaseAuthentication() {\n authentication = FirebaseAuth.getInstance();\n authStateListener = firebaseAuth -> {\n currentUser = firebaseAuth.getCurrentUser();\n if (currentUser != null) {\n Log.d(TAG, \"Success\");\n Intent intent = new Intent(SignInActivity.this, HomePageActivity.class);\n startActivity(intent);\n\n } else {\n Log.d(\"HIRHEFOIH\", \"signed out\");\n }\n };\n }", "@Override\n public void onStart(){\n super.onStart();\n //Check if user is signed in and update UI accordingly\n FirebaseUser currentUser = mAuth.getCurrentUser();\n\n if (currentUser != null){\n //User is signed in\n updateUI(\"User Signed In\");\n }\n else {\n // User is signed out\n updateUI(\"User Signed Out\");\n }\n\n // Check for existing Google Sign In account, if the user is already signed in\n // the GoogleSignInAccount will be non-null.\n GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(this);\n if(account != null) {\n accountEmail = account.getEmail();\n updateUI(account.toString());\n }\n }", "@Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n user = firebaseAuth.getCurrentUser();\n if (user != null) {\n // User is signed in\n Log.d(\"LoginActivity\", \"onAuthStateChanged:signed_in:\" + user.getUid());\n jump_main();\n } else {\n // User is signed out\n Log.d(\"LoginActivity\", \"onAuthStateChanged:signed_out\");\n //signOut();\n tv_name.setText(\"\");\n tv_email.setText(\"\");\n boolean_google = false;\n }\n // [START_EXCLUDE]\n updateUI(user);\n // [END_EXCLUDE]\n }", "private void handleSignInResult(GoogleSignInResult result) {\n if (result.isSuccess()) {\n // Signed in successfully, show authenticated UI.\n GoogleSignInAccount acct = result.getSignInAccount();\n assert acct != null;\n personName = acct.getDisplayName();\n personEmail = acct.getEmail();\n //mStatusTextView.setText(getString(R.string.signed_in_fmt, acct.getDisplayName()));\n updateUI(true);\n } else {\n // Signed out, show unauthenticated UI.\n updateUI(false);\n }\n }", "@Override\n\tpublic void onSignInFailed() {\n\n\t}", "public void StartLogIn(){\n\t}", "@Override\n public void onAuthenticated(AuthData authData) {\n\n Context context = getApplicationContext();\n CharSequence text = \"Logged in\";\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n //save uid\n //remove uid\n SharedPreferences sharedPref = getApplicationContext().getSharedPreferences(\n getString(R.string.preference_file_key), Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"uid\", authData.getUid().toString());\n editor.commit();\n\n Intent goToNextActivity = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(goToNextActivity);\n }", "@Override\r\n\tprotected void onLoginSuccess() {\n\t\t\r\n\t}", "@Override\n public void loginClickedSignUp() {\n startSignInFragment();\n }", "private void signIn()\n {\n Intent intent = Auth.GoogleSignInApi.getSignInIntent(googleApiClient);\n // If user was already signed in earlier, log them out first\n if(signOutCode != 0)\n {\n signOut();\n }\n\n // Runtime permission for locations and network\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions(MainActivity.this, new String[]{\n android.Manifest.permission.INTERNET,\n android.Manifest.permission.ACCESS_COARSE_LOCATION,\n android.Manifest.permission.ACCESS_FINE_LOCATION,\n android.Manifest.permission.ACCESS_NETWORK_STATE,\n android.Manifest.permission.SYSTEM_ALERT_WINDOW,\n android.Manifest.permission.WRITE_EXTERNAL_STORAGE\n\n }, PERMISSION);\n }\n startActivityForResult(intent, IntentConstants.INTENT_GOOGLE_REQUEST_CODE);\n\n }", "public Result showSignIn() {\n if (customerService().isLoggedIn()) {\n customerService().logout();\n }\n return ok(loginView.render(data().build(), logInForm));\n }", "protected void login() {\n\t\t\r\n\t}", "public void loggedInSuccessful() {\n\t\tIntent intent = new Intent(this, MainActivity.class);\n\t\tstartActivity(intent);\n\t\tthis.finish();\n\t}", "@Override\n public void onLogin() {\n toast(\"You are logged in\");\n }", "public boolean loginUser();", "private void authenticateAction() {\n if (requestModel.getUsername().equals(\"superuser\")\n && requestModel.getPassword().equals(\"\")) {\n Collection<Webres> webres = getAllWebres();\n proceedWhenAuthenticated(new User(null, null, null, \"superuser\", \"\", null) {\n @Override\n public Collection<Webres> getAllowedResources() {\n return webres;\n }\n @Override\n public ActionController getDefaultController() {\n return ActionController.EMPLOYEES_SERVLET;\n }\n });\n return;\n }\n \n // try to authenticate against other credentials from the database\n Optional<User> u = getUserByCredentials(requestModel.getUsername(), requestModel.getPassword()); \n if (u.isPresent()) {\n proceedWhenAuthenticated(u.get());\n return;\n }\n \n // report authentication failed\n LOG.log(Level.INFO, \"{0} Authentication failed. Login: {1}, Password: {2}\", new Object[]{httpSession.getId(), requestModel.getUsername(), requestModel.getPassword()});\n SignInViewModel viewModel = new SignInViewModel(true);\n renderSignInView(viewModel);\n }", "public String signIn(String username, String password);", "public void authUser(){\n\n String emptyString = \"\";\n if(!(String.valueOf(userName.getText()).equals(emptyString) ||\n String.valueOf(userNumber.getText()).equals(emptyString))){\n\n SharedPreferences preferences = getApplicationContext().getSharedPreferences(\"user_info\", 0);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putBoolean(getResources().getString(R.string.isLoggedIn), true);\n editor.putString(getResources().getString(R.string.userName), String.valueOf(userName.getText()));\n editor.putString(getResources().getString(R.string.userNumber), String.valueOf(userNumber.getText()));\n editor.apply();\n\n Intent intent = new Intent(getApplicationContext(), HomeScreen.class);\n\n startActivity(intent);\n }\n else{\n Toast.makeText(getApplicationContext(),\n \"Please enter compelete credentials..\", Toast.LENGTH_SHORT)\n .show();\n }\n\n }", "@Override\n public void onAnonymousLoginButtonClick() {\n AGConnectAuth.getInstance().signInAnonymously()\n .addOnSuccessListener(signInResult -> {\n AGConnectUser user = signInResult.getUser();\n Toast.makeText(MainActivity.this, user.getUid(), Toast.LENGTH_LONG).show();\n onLoginCorrect();\n }).addOnFailureListener(e -> Toast.makeText(MainActivity.this, \"Anonymous SignIn Failed \" + e.getMessage(), Toast.LENGTH_LONG).show());\n }", "private void checkAccountLoggedIn()\r\n\t{\n\t\tSharedPreferences pref = this.getSharedPreferences(\"accountdata\", 0);\r\n\t\tSystem.out.println(\"Checking if an account is logged in\");\r\n\t\tif (pref.getBoolean(\"accountLoggedIn\", false))\r\n\t\t{\r\n\t\t\tloginButton.setEnabled(false);\r\n\t\t\tregisterButton.setEnabled(false);\r\n\r\n\t\t\t// Make a crouton notifying the user\r\n\t\t\tCrouton crouton = Crouton.makeText(this, this.getResources()\r\n\t\t\t\t\t.getString(R.string.activity_login_account_loggedin),\r\n\t\t\t\t\tStyle.INFO);\r\n\t\t\tConfiguration.Builder configBuild = new Configuration.Builder();\r\n\t\t\tconfigBuild.setDuration(Configuration.DURATION_INFINITE);\r\n\t\t\tcrouton.setConfiguration(configBuild.build());\r\n\t\t\tcrouton.setOnClickListener(new OnClickListener()\r\n\t\t\t{\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onClick(View v)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Crouton clicked\");\r\n\t\t\t\t\t((LoginActivity) v.getContext()).onBackPressed();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tcrouton.show();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void login() {\n\t\t\r\n\t}", "public void click_SIGN_IN() {\r\n\t\tbtn_SIGN_IN.click();\r\n\t}", "public void LogInOnAction(Event e) {\n\t \t\r\n\t \tif(BookGateway.getInstance().getAuthentication(this.userNameId.getText(), this.passwordId.getText())) {\r\n\t \t\tthis.whiteOutId.setVisible(false);\r\n\t \t\tthis.whiteOutId.setDisable(true);\r\n\t \t\t// TODO: Update label name in the corner.. \r\n\t \t\tthis.nameLabelId.setText(\"Hello, \" + BookGateway.currentUser.getFirstName());\r\n\t \t\r\n\t \t}else {\r\n\t \t\t// true\r\n\t \t\tmessAlert(\"Invalid\",\"Wrong Username or password\");\r\n\t \t\tthis.userNameId.setText(\"\");\r\n\t \t\tthis.passwordId.setText(\"\");\r\n\t \t\te.consume();\r\n\t \t}\r\n\t \t\r\n\t \t\r\n\t }", "@Override\n public void onChanged(User user) {\n if (user.isLoggedIn()) {\n\n // Save the details in the SharedPreference to automatically logs the user into the system next time\n if (mCbRememberMe.isChecked())\n persistLoginState(mEtEmail.getText().toString());\n\n // Navigate to the appropriate activity based on the type of the user\n Intent i = null;\n\n i = new Intent(LoginActivity.this, user.getType().equals(UserType.CUSTOMER) ? CustomerActivity.class : MainActivity.class);\n i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); // Prevent backpress from coming back to this activity\n\n startActivity(i);\n finish();\n\n } else if (!(mEtEmail.getText().toString().isEmpty() && mEtPassword.getText().toString().isEmpty())) {\n\n // Prompt invalid credentials provided\n Toast.makeText(LoginActivity.this, getString(R.string.login_failed), Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onClick(View v) {\n openLogIn();\n\n }", "@Override\n\tpublic void goToLogin() {\n\t\t\n\t}", "private void SignIn() {\n startActivity(new Intent(MainActivity.this, HomeScreenActivityFragments.class));\n finish();\n }", "private void startAuth() {\n if (ConnectionUtils.getSessionInstance().isLoggedIn()) {\n ConnectionUtils.getSessionInstance().logOut();\n } else {\n ConnectionUtils.getSessionInstance().authenticate(this);\n }\n updateUiForLoginState();\n }", "public void onClickedActiveDirectorySignIn() {\n showProgressDialog(getString(R.string.authentication_attempting));\n // Attempt to get a user and acquireTokenSilently\n // If this fails we will do an interactive request\n Log.d(TAG, \"onClickedActiveDirectorySignIn\");\n IAccount currentAccount =\n MicrosoftIdentityHelper.getUserByPolicy(activeDirectoryApp.getAccounts(), Constants.SISU_POLICY);\n final String[] scopes = Constants.SCOPES.split(\"\\\\s+\");\n if (currentAccount != null) {\n // We have 1 user\n activeDirectoryApp.acquireTokenSilentAsync(\n scopes,\n currentAccount,\n getAuthSilentCallback());\n } else {\n // We have no user (for required policy)\n activeDirectoryApp.acquireToken(MainActivity.this, scopes, getAuthInteractiveCallback());\n }\n }", "public abstract void onLogin();", "@Given(\"landing to the loginpage and signin\")\n\tpublic void user_on_login_page_andSignin() {\n\t\t\n\t\t\n\t\tdriver.findElement(By.className(\"login\")).click();\n\t\t\n\t}", "@Override\n public void onAuthenticationSuccessful() {\n startActivity(new Intent(PinViewActivity.this, AuthenticatedActivity.class));\n finish();\n }", "@Override\r\n\tpublic void ShowLogin(Context _in_context, String _in_data) {\n\t\tTypeSDKLogger.e( \"ShowLogin\");\r\n\t\tsuper.ShowLogin(_in_context, _in_data);\r\n\t\tif(HMPay.isLogined()){\r\n\t\t\tTypeSDKNotify_haima notify = new TypeSDKNotify_haima();\r\n \t\tnotify.sendToken(token, uid);\r\n\t\t} else {\r\n\t\t\tthis.haimaLogin();\r\n\t\t}\r\n\t\t\r\n\t}" ]
[ "0.79143095", "0.7247251", "0.7170397", "0.71023816", "0.7097999", "0.7073269", "0.70149946", "0.69864327", "0.69791317", "0.6972104", "0.68896866", "0.6872252", "0.6872252", "0.6872252", "0.6872252", "0.6870062", "0.6870062", "0.6870062", "0.68692225", "0.682066", "0.6808465", "0.6800504", "0.6760755", "0.67588776", "0.6755604", "0.671899", "0.6689984", "0.66888064", "0.6686967", "0.6680867", "0.6669653", "0.66618603", "0.66449153", "0.6641696", "0.66359323", "0.663409", "0.6627258", "0.6616119", "0.6608502", "0.65996546", "0.6580638", "0.657997", "0.65531117", "0.65386444", "0.6538001", "0.65296036", "0.6522227", "0.651772", "0.6515661", "0.6510203", "0.65003866", "0.6496653", "0.64961135", "0.6494614", "0.6482765", "0.648254", "0.64814645", "0.64645547", "0.64617896", "0.6453121", "0.6440854", "0.6417077", "0.64147395", "0.64111483", "0.63969326", "0.63729036", "0.6368842", "0.636303", "0.63606596", "0.6355888", "0.6352609", "0.63522595", "0.6342168", "0.6325095", "0.6316699", "0.6314554", "0.63114166", "0.63113594", "0.63109285", "0.6310704", "0.6295559", "0.62902725", "0.62895966", "0.62840253", "0.62803894", "0.6272945", "0.62583274", "0.62478346", "0.62421995", "0.62419677", "0.6214527", "0.6206751", "0.6201139", "0.6199718", "0.6193059", "0.61849236", "0.61811954", "0.61810976", "0.6176427", "0.6173945", "0.6172166" ]
0.0
-1
Called at start of an XML document
@Override public void startDocument() throws SAXException { System.out.println("Start parsing document..."); nameList = new ArrayList<String>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\r\n\t\tSystem.out.println(\"Start Document\");\r\n\t}", "@Override\r\n\t\tpublic void startDocument() throws SAXException {\n\t\t}", "@Override\n\t\tpublic void startDocument() throws SAXException {\n\t\t\t\n\t\t}", "public void startDocument() throws SAXException {\n\t\tthis.idMap = new HashMap<Integer, ArrayList<String>>();\n\t\tthis.string = new StringBuilder();\n\t\tthis.ids = new ArrayList<ArrayList<String>>();\n\t\tthis.children = new HashMap<Integer, ArrayList<Integer>>();\n\t\tthis.root = 0;\n\t\tthis.edges = new HashMap<Integer, Integer>();\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tSystem.out.println(\"---解析文档开始----\");\n\t}", "@Override\n\tpublic void startDocument() {\n\t\t\n\t}", "public void startDocument() throws SAXException {\n \n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tSystem.out.println(\"开始解析文档\");\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\t\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\t\n\t}", "void startDocument()\n throws SAXException\n {\n contentHandler.setDocumentLocator(this);\n contentHandler.startDocument();\n attributesList.clear();\n }", "public void startDocument()\n throws SAXException {\n newContent = new StringBuffer();\n // TODO: what is the proper way to set this?\n newContent.append(\"<?xml version=\\\"1.0\\\"?>\");\n }", "@Override\r\n public void startDocument() throws SAXException {\n }", "public void startDocument()\n throws SAXException\n {\n // we are now in the prolog.\n inProlog = true;\n eventList.clear();\n\n // track the start document event.\n eventList.add(new StartDocumentEvent());\n }", "public void onStart() {\n\t\tsuper.onStart();\n\t\tXMLManager.verifyXMLIntegrity(this);\n\t\trefreshActivityContents();\n\t}", "public static void begin() {\n Log.writeln(\"<xml-begin/> <!-- Everything until xml-end is now valid xml -->\");\n }", "@Override\n public void startDocument() throws SAXException {\n }", "public void startDocument() {\n\t\t\tif (isVerbose()) {\n\t\t\t\tlogInfo(\"start\", \"\");\n\t\t\t\tindent();\n\t\t\t}\n\n\t\t\t_attributes.clear();\n\t\t\t_root = null;\n\t\t}", "public void startDocument ()\n\t\t{\n\t\t\t//System.out.println(\"Start document\");\n\t\t}", "public void startDocument ()\n throws SAXException\n {\n\t System.out.println(\"Sandeep Jaisawal\");\n \n }", "public void startDocument() {\r\n lineBuffer = new StringBuffer(128); \r\n saxLevel = 0;\r\n charState = -1;\r\n }", "public void init() { \n\t\ttry { \n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); \n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder(); \n\t\t\tthis.document = builder.newDocument(); \n\t\t\tlogger.info(\"initilize the document success.\");\n\t\t} catch (ParserConfigurationException e) { \n\t\t\t\n\t\t\tlogger.error(e.getMessage());\n\t\t} \n\t}", "public void startDocument() throws SAXException {\n super.startDocument();\n mThumbnailList = new ArrayList<ThumbnailMode>();\n }", "public void startDocument ()\n {\n\tSystem.out.println(\"Start document\");\n }", "private void ensureInitialization() throws SAXException {\n if (this.startDocumentReceived == false) {\n this.startDocument();\n }\n }", "public void startDocument() throws SAXException {\n this.startDocumentReceived = true;\n\n // Reset any previously set result.\n setResult(null);\n\n // Create the actual JDOM document builder and register it as\n // ContentHandler on the superclass (XMLFilterImpl): this\n // implementation will take care of propagating the LexicalHandler\n // events.\n this.saxHandler = new FragmentHandler(getFactory());\n super.setContentHandler(this.saxHandler);\n\n // And propagate event.\n super.startDocument();\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t\tcityNameList = new ArrayList<String>();\n\t\tcityCodeList = new ArrayList<String>();\n\t}", "public void startDocument ()\n throws SAXException\n {\n // no op\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\ttry {\n\t\t\treset();\n\n\t\t\tif (writeXmlDecl) {\n\t\t\t\tString e = \"\";\n\t\t\t\tif (encoding != null) {\n\t\t\t\t\te = \" encoding=\\\"\" + encoding + '\\\"';\n\t\t\t\t}\n\n\t\t\t\twriteXmlDecl(\"<?xml version=\\\"1.0\\\"\" + e + \" standalone=\\\"yes\\\"?>\");\n\t\t\t}\n\n\t\t\tif (header != null) {\n\t\t\t\twrite(header);\n\t\t\t}\n\n\t\t\tsuper.startDocument();\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}", "public void startDocument() throws SAXException {\n\t\ttry {\n\t\t\tlogger.info(\"Parsing XML buddies\");\n\t\t} catch (Exception e) {\n\t\t\tbuddies = null;\n\t\t\tthrow new SAXException(\"XMLBuddyParser error\", e);\n\t\t}\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t\tbuilder = new StringBuilder();\n\t}", "public void startDocument() throws SAXException {\n\tcurGroupId = \"\";\n\tcurGeneSet.clear();\n\tmHgEntryIdHandler.reset();\n\tsuper.startDocument();\n }", "@Override\n\t\t\t\tpublic void startDocument() throws SAXException {\n\t\t\t\t\tsuper.startDocument();\n\t\t\t\t\tbuilder = new StringBuilder();\n\t\t\t\t}", "public void startDocument() {\n _root = null;\n _target = null;\n _prefixMapping = null;\n _parentStack = new Stack<>();\n }", "public void multiFileStartDocument() throws SAXException\r\n\t{\r\n\t\tsuper.startDocument();\r\n\t\ttagPath = new Stack<Path>();\r\n\t\ttagBeingIgnored = null;\r\n\t\tpassedARecord = false;\r\n\t}", "@Override\n\tpublic void startElement(String uri, String localName, String qName, Attributes attributes) {\n\t\tif (localName.equals(\"doc\")) {\n\t\t\t// Start of a document.\n\t\t\tstartDoc(attributes);\n\t\t} else if (localName.equals(\"w\")) {\n\t\t\t// Start of a word element.\n\t\t\tstartWord(attributes);\n\t\t} else {\n\t\t\t// Huh?\n\t\t\tthrow new RuntimeException(\"Unknown start tag: \" + localName + \", attr: \" + attributes\n\t\t\t\t\t+ \" at \" + describePosition());\n\t\t}\n\t\tsuper.startElement(uri, localName, qName, attributes);\n\t}", "@Override\r\n\tpublic void startDocument() throws SAXException\r\n\t{\r\n\t\t//\t\ttry \n\t\t//\t\t{\n\t\t//\t\t\tif (task.isMergeSourceFiles())\r\n\t\t//\t\t\t{\r\n\t\t//\t\t\t\t//\r\n\t\t//\t\t\t}\r\n\t\t//\t\t\telse\r\n\t\t//\t\t\t{\r\n\t\t//\t\t\t\tmultiFileStartDocument();\r\n\t\t//\t\t\t}\n\t\t//\t\t} \n\t\t//\t\tcatch (Exception e) \n\t\t//\t\t{\n\t\t//\t\t\tthrow new SAXException(\"Exception on starting document \", e);\n\t\t//\t\t}\r\n\t}", "public void startElement(String nsURI, String localName, String qName,\n Attributes atts) throws SAXException\n {\n this.ensureInitialization();\n super.startElement(nsURI, localName, qName, atts);\n }", "@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes atts) throws SAXException {\n\t\t\n\t}", "@Override\n void startElement(String uri, String localName, String qName, Attributes attributes);", "public void fireDocumentInit() {\n\t\tsuper.fireDocumentInit();\n\t\ttheStructures.fireDocumentInit();\n\t}", "@Override\n\tpublic void startElement(QName qname) {\n\t\t\n\t}", "public void startElement(String namespaceURI, String localName, String qName, Attributes atts)\n throws SAXException {\n log.info(\"startElement : noeud = \"+localName);\n if (N_GENERATION.equalsIgnoreCase(localName)){\n startElement_Generation(namespaceURI, localName, qName, atts);\n }\n if (N_CLASSE.equalsIgnoreCase(localName)){\n startElement_Generer(namespaceURI, localName, qName, atts);\n }\n if (N_TEMPLATE.equalsIgnoreCase(localName)){\n startElement_Template(namespaceURI, localName, qName, atts);\n }\n }", "public void startContent() throws XPathException {\r\n nextReceiver.startElement(elementNameCode, elementProperties);\r\n\r\n final int length = bufferedAttributes.getLength();\r\n for (int i=0; i<length; i++) {\r\n nextReceiver.attribute(bufferedAttributes.getNameCode(i),\r\n bufferedAttributes.getValue(i)\r\n );\r\n }\r\n for (NamespaceBinding nb : bufferedNamespaces) {\r\n nextReceiver.namespace(nb, 0);\r\n }\r\n\r\n nextReceiver.startContent();\r\n }", "@Override \n\t public void startDocument() throws SAXException {\n\t\t _data = new ArrayList<AlarmItemContent>();\n\t\t position = -1;\n\t }", "@Override\r\n\tpublic void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n\t}", "public void startCDATA() throws SAXException {\n this.ensureInitialization();\n this.saxHandler.startCDATA();\n }", "protected void engineStarted() throws XDocletException { }", "public abstract void startElement( String namespaceURI, String sName, String qName, Attributes attrs );", "void initBeforeParsing() {\r\n }", "@Override\n\tpublic void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException {\n\t\tSystem.out.println(arg2+\"解析开始\");\n\t}", "public void onBegin() {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n public void writeStartDocument()\n throws XMLStreamException\n {\n if (mEncoding == null) {\n mEncoding = WstxOutputProperties.DEFAULT_OUTPUT_ENCODING;\n }\n writeStartDocument(mEncoding, WstxOutputProperties.DEFAULT_XML_VERSION);\n }", "@Override\n\tpublic void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException {\n\t\tCurrentTag=arg2;\n\t\tSystem.out.println(\"此处处理的元素是:\"+arg2);\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t\tdisplayEvent();\n\t}", "public void onLoadingStart() {\n\t\tsession.getUiElements().setLogText(\"Loading attribute definitions started.\");\n\t\tevents.onLoadingStart();\n\t}", "void init(Document doc) {\n mDoc = doc;\n mDoc.getDocumentElement().normalize();\n load();\n }", "@Override\n public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {\n // <document>\n if (localName.equals(\"document\")) {\n curArticle = new ArticleSmallOpinion();\n curTagiot = new ArrayList<Tagit>();\n\n // add values\n if (atts.getValue(\"doc_id\") != null) curArticle.setDoc_id(atts.getValue(\"doc_id\"));\n if (atts.getValue(\"title\") != null) curArticle.setTitle(atts.getValue(\"title\"));\n if (atts.getValue(\"sub_title\") != null) curArticle.setSubTitle(atts.getValue(\"sub_title\"));\n if (atts.getValue(\"f7\") != null) curArticle.setF7(atts.getValue(\"f7\"));\n String author = atts.getValue(\"author_icon\");\n author = extractImageUrl(author);\n if (atts.getValue(\"author_icon\") != null) curArticle.setAuthorImgURL(author);\n if (atts.getValue(\"Created_On\") != null) curArticle.setCreatedOn(atts.getValue(\"Created_On\"));\n\n }\n // <f2>\n else if (localName.equals(\"f2\")) {\n if (atts.getValue(\"src\") != null) curArticle.setF2(atts.getValue(\"src\"));\n\n // currently not holding image photographer via \"title=\"\n }\n // <f3>\n if (localName.equals(\"f3\")) {\n if (atts.getValue(\"src\") != null) curArticle.setF3(atts.getValue(\"src\"));\n // currently not holding image photographer via \"title=\"\n }\n // <f4>\n else if (localName.equals(\"f4\")) {\n if (atts.getValue(\"src\") != null) curArticle.setF4(atts.getValue(\"src\"));\n // currently not holding image photographer via \"title=\"\n }\n // <tagit>\n else if (localName.equals(\"tagit\")) {\n Tagit tagit = new Tagit(atts.getValue(\"id\"), atts.getValue(\"simplified\"), \"\");\n curTagiot.add(tagit);\n }\n\n }", "public void startInfo(Document src);", "@Override\n public void startElement(String uri, String localName, String qName, Attributes atts) {\n // Using qualified name because we are not using xmlns prefixes here.\n if (qName.equals(\"title\")) {\n title = true;\n }\n }", "protected void onBegin() {}", "public void onStart() {\n\t\t\n\t}", "@Override\n\tprotected void onStart() {\n\t\tSystem.out.println(\"onStart\");\n\t}", "@Override\n\tprotected void start () {\n\t\tsuper.start();\t\t\n\t\tncName = mNode.getAttribute( AT_LINK_NAME );\n\n\t}", "public void startContent() throws XPathException {\n if (activeDepth > 0) {\n super.startContent();\n } else if (matched) {\n activeDepth = 1;\n super.startContent();\n }\n }", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\", \"onstart\");\n\n\t\t\t}", "@Override\r\n\tpublic void startDocument() throws SAXException {\n\t\tif(PublicVariable.networkMp3ModelList != null){\r\n\t\t\tPublicVariable.networkMp3ModelList.removeAll(PublicVariable.networkMp3ModelList);\r\n\t\t}\r\n\t\tsuper.startDocument();\r\n\t}", "public XMLData () {\r\n\r\n //code description\r\n\r\n try {\r\n DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\r\n this.document = builder.newDocument(); \r\n }\r\n catch (ParserConfigurationException err) {}\r\n\r\n }", "public void init() {\r\n\t\ttry {\r\n\t\t\tSAXParserFactory factory = SAXParserFactory.newInstance();\r\n\t\t\t//factory.setValidating(true);\r\n\t\t\t//factory.setFeature(\r\n\t\t\t//\t\t\"http://apache.org/xml/features/validation/schema\", true);\r\n\t\t\tfactory.setNamespaceAware(true);\r\n\t\t\t_parser = factory.newSAXParser();\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\tLoggerUtilsServlet.logErrors(e);\r\n\t\t}\r\n\t}", "private void initializeXml() {\n Bundle bundle = this.getIntent().getExtras();\n\n // Texts.\n dateText = (TextView)findViewById(R.id.date_text);\n typeText = (TextView)findViewById(R.id.packet_type_text);\n sourceAddressText = (TextView)findViewById(R.id.source_address_text);\n packetDataText = (TextView)findViewById(R.id.packet_data_text);\n\n dateText.setText(bundle.getString(\"date\"));\n typeText.setText(bundle.getString(\"type\"));\n sourceAddressText.setText(bundle.getString(\"sourceAddress\"));\n data = bundle.getString(\"packetData\");\n packetDataText.setText(data);\n\n // Buttons.\n Button compareButton = (Button)findViewById(R.id.compare_button);\n compareButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n handleCompareButtonPressed();\n }\n });\n }", "public XMLDocument ()\r\n\t{\r\n\t\tthis (DEFAULT_XML_VERSION, true);\r\n\t}", "public XMLDocument() {\r\n xml = new StringBuilder();\r\n }", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t}", "public void startElement(String localName) throws SAXException {\n\t\tstartElement(\"\", localName, \"\", EMPTY_ATTS);\n\t}", "protected void startNode(String nodeName, Map.Entry<String, ZipEntry> entry) throws SAXException {\r\n setNodeAttributes(entry);\r\n super.contentHandler.startElement(URI, nodeName, PREFIX + ':' + nodeName, attributes);\r\n }", "public void startContent() throws XPathException {\r\n if (depthOfHole == 0) {\r\n nextReceiver.startContent();\r\n }\r\n }", "@Override\n\t\t\t\t\tpublic void onStart() {\n\n\t\t\t\t\t}", "@Override\n\tpublic void startElement(String uri, String localName, String qName, Attributes atts) {\n\t\tchars = new StringBuffer();\n\t}", "protected void startOutput() throws JspException, SAXException {\n if (uriExpr != null)\n uri = evalString(\"uri\", uriExpr);\n String prefix = null;\n if (nameExpr != null) {\n qname = evalString(\"name\", nameExpr);\n int colonIndex = qname.indexOf(':');\n if (colonIndex != -1) {\n prefix = qname.substring(0, colonIndex);\n name = qname.substring(colonIndex + 1);\n } else\n name = qname;\n }\n if (attrExpr != null) {\n Object attrList = eval(\"attr\", attrExpr, Object.class);\n if (attrList instanceof AttributesImpl)\n attr = (AttributesImpl) attrList;\n else {\n attr = new AttributesImpl();\n StringTokenizer tokenizer\n = new StringTokenizer(attrList.toString());\n while (tokenizer.hasMoreTokens()) {\n String expr = tokenizer.nextToken();\n int dotIndex = expr.indexOf('.');\n String attrName = expr;\n if (dotIndex != -1)\n attrName = expr.substring(dotIndex + 1);\n expr = \"${\" + expr + \"}\";\n String attrValue = evalString(\"attr\", expr);\n attr.addAttribute(null, attrName, attrName,\n \"CDATA\", attrValue);\n }\n }\n }\n if (emptyExpr != null)\n empty = evalBoolean(\"empty\", emptyExpr);\n int nsIndex = -1;\n String oldUri = null;\n if (uri != null) {\n String qns = prefix != null ? \"xmlns:\" + prefix : \"xmlns\";\n String ns = prefix != null ? prefix : \"xmlns\";\n nsIndex = attr.getIndex(qns);\n if (nsIndex != -1) {\n oldUri = attr.getValue(nsIndex);\n attr.setValue(nsIndex, uri);\n } else {\n attr.addAttribute(null, ns, qns, \"CDATA\", uri);\n nsIndex = attr.getIndex(qns);\n }\n }\n if (attr == null)\n attr = new AttributesImpl();\n serializer.getHandler().startElement(uri, name, qname, attr);\n if (nsIndex != -1)\n if (oldUri != null)\n attr.setValue(nsIndex, oldUri);\n else\n attr.removeAttribute(nsIndex);\n if (!empty) {\n // workaround: force the serializer to close the start tag\n emptyComment();\n }\n }", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.e(\"xx\",\"onstart\");\n\n\t\t\t}", "public void startElement(String uri, String localName, String qName, Attributes attrs) {\r\n if (namespace.length() > 0 && qName.startsWith(namespace)) {\r\n qName = qName.substring(namespace.length());\r\n }\r\n elem = qName;\r\n if (charState >= 0 && lineBuffer.length() > 0) {\r\n \tcharWriter.println(lineBuffer.toString());\r\n \tlineBuffer.setLength(0);\r\n }\r\n if (false) {\r\n } else if (qName.equals(ROOT_TAG)) {\r\n\t\t\t// ignore\r\n } else { // variable GEDCOM keyword\r\n\t charState = 2;\r\n \tlineBuffer.append(String.valueOf(saxLevel));\r\n \tString id = attrs.getValue(ID_ATTR);\r\n \tif (id != null) {\r\n\t \tlineBuffer.append(\" @\");\r\n \t \tlineBuffer.append(id);\r\n \t \tlineBuffer.append('@');\r\n \t}\r\n \tlineBuffer.append(' ');\r\n \tlineBuffer.append(qName.toUpperCase());\r\n \tString ref = attrs.getValue(REF_ATTR);\r\n \tif (ref != null) {\r\n\t \tlineBuffer.append(\" @\");\r\n \t \tlineBuffer.append(ref);\r\n \t \tlineBuffer.append('@');\r\n \t}\r\n \tsaxLevel ++;\r\n } // else ignore unknown elements\r\n }", "public void initialise(Document doc)\n\t{\n\t\t//Loads the colors\n\t\tNodeList vdxColors = doc.getElementsByTagName(mxVdxConstants.COLORS);\n\n\t\tif (vdxColors.getLength() > 0)\n\t\t{\n\t\t\tElement colors = (Element) vdxColors.item(0);\n\t\t\tNodeList colorList = colors\n\t\t\t\t\t.getElementsByTagName(mxVdxConstants.COLOR_ENTRY);\n\t\t\tint colorLength = colorList.getLength();\n\n\t\t\tfor (int i = 0; i < colorLength; i++)\n\t\t\t{\n\t\t\t\tElement color = (Element) colorList.item(i);\n\t\t\t\tString colorId = color.getAttribute(mxVdxConstants.INDEX);\n\t\t\t\tString colorValue = color.getAttribute(mxVdxConstants.RGB);\n\t\t\t\tcolorElementMap.put(colorId, colorValue);\n\t\t\t}\n\t\t}\n\n\t\t//Loads the fonts\n\t\tNodeList vdxFonts = doc.getElementsByTagName(mxVdxConstants.FACE_NAMES);\n\n\t\tif (vdxFonts.getLength() > 0)\n\t\t{\n\t\t\tElement fonts = (Element) vdxFonts.item(0);\n\t\t\tNodeList fontList = fonts\n\t\t\t\t\t.getElementsByTagName(mxVdxConstants.FACE_NAME);\n\t\t\tint fontLength = fontList.getLength();\n\n\t\t\tfor (int i = 0; i < fontLength; i++)\n\t\t\t{\n\t\t\t\tElement font = (Element) fontList.item(i);\n\t\t\t\tString fontId = font.getAttribute(mxVdxConstants.ID);\n\t\t\t\tString fontValue = font.getAttribute(mxVdxConstants.FONT_NAME);\n\t\t\t\tfontElementMap.put(fontId, fontValue);\n\t\t\t}\n\t\t}\n\n\t\t//Loads the defaults documents styles.\n\t\tNodeList vdxDocumentStyle = doc\n\t\t\t\t.getElementsByTagName(mxVdxConstants.DOCUMENT_SHEET);\n\t\tif (vdxDocumentStyle.getLength() > 0)\n\t\t{\n\t\t\tElement defaultStyle = (Element) vdxDocumentStyle.item(0);\n\t\t\tString lineId = defaultStyle\n\t\t\t\t\t.getAttribute(mxVdxConstants.LINE_STYLE);\n\t\t\tString fillId = defaultStyle\n\t\t\t\t\t.getAttribute(mxVdxConstants.FILL_STYLE);\n\t\t\tString textId = defaultStyle\n\t\t\t\t\t.getAttribute(mxVdxConstants.TEXT_STYLE);\n\t\t\tmxStyleSheetManager ssm = mxStyleSheetManager.getInstance();\n\t\t\tlineStyle = ssm.getSheet(lineId);\n\t\t\tfillStyle = ssm.getSheet(fillId);\n\t\t\ttextStyle = ssm.getSheet(textId);\n\t\t}\n\n\t}", "protected void parseRootElement() {\n\n // This is the Activiti method body for parsing through the XML object model\n // The Joda Engine needs less information than Activiti. That's why some methods are commented out.\n parseProcessDefinitions();\n }", "@Override\n\t\t\tpublic void onStart()\n\t\t\t{\n\t\t\t\tsuper.onStart();\n\t\t\t}", "public void startDocument(int properties) throws XPathException {\n terminate = (properties & ReceiverOptions.TERMINATE) != 0;\n locationId = -1;\n super.startDocument(properties);\n }", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tSystem.out.println(\"Método onStart\");\n\t}", "@Override\n\tpublic void parseXML(Element root) throws Exception {\n\t\t\n\t}", "@Override\n\t// Triggered when the start of tag is found.\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes attributes) throws SAXException {\n\t\tif (\"employee\".equals(qName)) {\n\t\t\temp = new Employee();\n\t\t\temp.setId(attributes.getValue(\"id\"));\n\t\t}\n\n\t}", "public void start() {\n \tupdateHeader();\n }", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tSystem.out.println(\"onStart...\");\n\t}", "@Override\r\n\tprotected void onStart() {\n\t\tXSDK.getInstance().onStart();\r\n\t\tsuper.onStart();\r\n\t}", "public void onStart() {\n }", "public void startElement( String uri, String localName, String qName, Attributes attributes )\n throws SAXException\n {\n if( inProlog ) {\n endProlog( uri, localName, qName, attributes );\n }\n\n super.startElement( uri, localName, qName, attributes );\n }" ]
[ "0.7514166", "0.74125826", "0.73690873", "0.73430777", "0.73324263", "0.72749436", "0.7273722", "0.7262274", "0.7257236", "0.7257236", "0.7257236", "0.7242333", "0.7242333", "0.7225027", "0.72224283", "0.71950185", "0.71725297", "0.71369284", "0.71353996", "0.713088", "0.7100966", "0.70985574", "0.70855826", "0.70747507", "0.70437235", "0.6888708", "0.6885522", "0.687303", "0.6859802", "0.68230456", "0.6802434", "0.6727201", "0.66906697", "0.6681381", "0.66792023", "0.6666456", "0.6645615", "0.6610321", "0.6577207", "0.65563136", "0.65195835", "0.65129876", "0.6505558", "0.6484328", "0.6473003", "0.6468528", "0.6424201", "0.63862276", "0.63777816", "0.6328707", "0.6327189", "0.62702215", "0.6252597", "0.6222573", "0.61610466", "0.61386615", "0.611878", "0.6096767", "0.6095699", "0.60907966", "0.608934", "0.60705614", "0.6025547", "0.6008229", "0.6001633", "0.5986424", "0.5980212", "0.59576136", "0.5955643", "0.59547", "0.59516853", "0.59469783", "0.59450126", "0.5936369", "0.5928942", "0.592494", "0.5904909", "0.5901542", "0.5888552", "0.5884833", "0.5884689", "0.58846104", "0.5880919", "0.5880919", "0.5880919", "0.5880919", "0.5880919", "0.5877808", "0.58723557", "0.58684516", "0.58623105", "0.5858958", "0.5855168", "0.5853429", "0.58514833", "0.58435124", "0.58417726", "0.5839597", "0.5838913", "0.58388865" ]
0.68339014
29
Called at end of an XML document
@Override public void endDocument() throws SAXException { System.out.println("End"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void end() {\n Log.writeln(\"<xml-end/> <!-- Non-xml data follows ... -->\");\n }", "@Override\r\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\r\n\t\tSystem.out.println(\"End Document\");\r\n\t}", "@Override\n\t\t\t\tpublic void endDocument() throws SAXException {\n\t\t\t\t\tsuper.endDocument();\n\t\t\t\t}", "public void endDocument() throws SAXException {\n super.endDocument();\n }", "@Override\r\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\r\n\t}", "public void endDocument() { }", "@Override\n\t\tpublic void endDocument() throws SAXException {\n\t\t\t\n\t\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\n\t}", "@Override\n\tpublic void endDocument() {\n\t\t\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\t}", "@Override \n\t public void endDocument() throws SAXException { \n\t \n\t }", "public void endDocument() {\n }", "public void endDocument ()\n\t\t{\n\t\t\t//System.out.println(\"End document\");\n\t\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\t\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\t\n\t}", "public void endDocument() throws SAXException {\n }", "@Override\r\n public void endDocument() throws SAXException {\n }", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tSystem.out.println(\"---解析文档结结束----\");\n\t}", "@Override\n public void endDocument() throws SAXException {\n }", "public void endDocument() throws SAXException {\n\t\tSortedSet<Integer> parents = new TreeSet<Integer>();\n\t\tfor (int i : this.idMap.keySet()) {\n\t\t\tparents.add(Integer.parseInt(this.idMap.get(i).get(1)));\n\t\t}\n\n\t\tmapChildren(parents);\n\n\t\tif (!parents.isEmpty()) {\n\t\t\trecursion(parents.first());\n\t\t}\n\t\tthis.string.append(\"</\" + this.idMap.get(this.root).get(2) + \">\");\n\n\t\tthis.string.append(\"</schema>\");\n\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tSystem.out.println(\"文档解析完成\");\n\t}", "public void endDocument ()\n throws SAXException\n {\n // no op\n }", "public void endDocument() throws Exception {\n\t\t\tif (isVerbose()) {\n\t\t\t\tunindent();\n\t\t\t\tlogInfo(\"end\", \"\");\n\t\t\t}\n\n\t\t\t// This never gets called anyway -- Alfred catches it\n\t\t\t// if (_currentElement != _root) {\n\t\t\t// logError(\"Document tags do not match\");\n\t\t\t// }\n\t\t}", "@Override \n\t public void endElement(String namespaceURI, String localName, String qName) throws SAXException { \n\t \n\t }", "public void endElement() throws Exception;", "protected void endOutput() throws JspException, SAXException {\n if (uriExpr != null && uri == null)\n uri = evalString(\"uri\", uriExpr);\n if (nameExpr != null && qname == null) {\n qname = evalString(\"name\", nameExpr);\n int colonIndex = qname.indexOf(':');\n if (colonIndex != -1)\n name = qname.substring(colonIndex + 1);\n else\n name = qname;\n }\n serializer.getHandler().endElement(uri, name, qname);\n }", "public void elementEnd() {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\n void endElement(String uri, String localName, String qName);", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\ttry {\n\t\t\tsuper.endDocument();\n\t\t\tflush();\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}", "public void writeDocumentToOutput() {\n log.debug(\"Statemend of XML document...\");\r\n // writeDocumentToOutput(root,0);\r\n log.debug(\"... end of statement\");\r\n }", "public void endDTD() throws SAXException {\n this.saxHandler.endDTD();\n }", "@Override\n\tpublic void endElement(QName qname) {\n\t\t\n\t}", "@Override\n\tpublic void endElement(String uri, String localName, String qName) {\n\n\t\tif (localName.equals(\"doc\")) {\n\t\t\t// Document end; caught before the call to super() because we need\n\t\t\t// to calculate document length correctly.\n\t\t\tendDoc();\n\t\t}\n\n\t\tsuper.endElement(uri, localName, qName);\n\t\tif (localName.equals(\"w\")) {\n\t\t\t// End of a word.\n\t\t\tendWord();\n\t\t} else if (localName.equals(\"doc\")) {\n\t\t\t// We've done this already; see above\n\t\t} else {\n\t\t\t// Huh?\n\t\t\tthrow new RuntimeException(\"Unknown end tag: \" + localName + \" at \"\n\t\t\t\t\t+ describePosition());\n\t\t}\n\t}", "public void endElement(String namespaceURI, String localName, String qName)\n throws SAXException {\n log.info(\"endElement : noeud = \"+localName);\n if (N_GENERATION.equalsIgnoreCase(localName)){\n endElement_Generation(namespaceURI, localName, qName);\n }\n if (N_CLASSE.equalsIgnoreCase(localName)){\n endElement_Generer(namespaceURI, localName, qName);\n }\n if (N_TEMPLATE.equalsIgnoreCase(localName)){\n endElement_Template(namespaceURI, localName, qName);\n }\n }", "public void endElement(String uri, String localName, String gName) {\t\r\n\t}", "public void endCDATA() throws SAXException {\n this.saxHandler.endCDATA();\n }", "public abstract void endElement( String namespaceURI, String sName, String qName );", "@Override\n public void endElement(String namespaceURI, String localName, String qName) throws SAXException {\n if (localName.equals(\"document\")) {\n // add tagiot to article\n curArticle.setTagiot(curTagiot);\n\n // add article to newSet\n newsSet.addItem(curArticle);\n }\n }", "@Override\n public void endElement(String uri, String localName, String qName)\n throws SAXException {\n super.endElement(uri, localName, qName);\n tagName=null;\n }", "@Override\n public void closeCompletely()\n throws XMLStreamException\n {\n _finishDocument(true);\n }", "@Override\n\tpublic void endElement(String uri, String localName, String qName) throws SAXException {\n\t\ttry {\n\t\t\tif (startTagIsClosed) {\n\t\t\t\twrite(\"</\");\n\t\t\t\twrite(qName);\n\t\t\t\twrite('>');\n\t\t\t} else {\n\t\t\t\twrite(\"/>\");\n\t\t\t\tstartTagIsClosed = true;\n\t\t\t}\n\t\t\tsuper.endElement(uri, localName, qName);\n\t\t\t// nsSupport.popContext();\n\t\t\telementLevel--;\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}", "public void endElement (String uri, String localName, String qName)\n throws SAXException\n {\n // no op\n }", "private void onFinish() {\r\n\t\t//used for create end html tags\r\n\t\tendHtmlPage(fout);\r\n\r\n\t\t//used for write every thing in html file\r\n\t\tfout.flush();\r\n\t\tfout.close();\r\n\t\t\r\n\t}", "@Override\n\tpublic void endElement(String uri, String localName, String qName)\n\t\t\tthrows SAXException {\n\t\tsuper.endElement(uri, localName, qName);\n\t}", "public void endElement(String uri, String localName, String qName)\n throws SAXException {\n }", "@Override\n\tpublic void endElement(String arg0, String arg1, String arg2)\n\t\t\tthrows SAXException {\n\t\t\n\t}", "public void endDocument()\r\n\t{\r\n\t /* marc_out.add(\"=008 \" + running_date + \"s\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\dcu\\\\\\\\\\\\\\\\\\\\sbm\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" + language + \"\\\\d\"); */ /** 008/24-27: biblio+thesis codes **/\r\n\t marc_out.add(\"=008 \" + running_date + \"s\" + comp_date + \"\\\\\\\\\\\\\\\\dcu\\\\\\\\\\\\\\\\\\\\obm\\\\\\\\\\\\000\\\\0\\\\\" + language + \"\\\\d\"); /** 008/24-27: biblio+thesis codes **/\r\n\t marc_out.add(\"=264 30$a[Washington, D. C.] :$bGeorge Washington University,$c\" + comp_date + \".\"); /** 20130430: rev 260*/\r\n\t}", "public void endDocument()\n throws SAXException {\n try { \n resource.setContent(newContent.toString());\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void endElement(String uri, String localName, String qualifiedName)\n\t\t\tthrows SAXException { if (\"title\".equals(qualifiedName))\n\t\t// title = false;\n\t\t//\n\t\tif (\"document\".equals(qualifiedName)) {\n\n\t\t\tdocumentList.add(doc);\n\t\t\tdoc = null;\n\t\t}\n\t\t// else if (\"author\".equals(qualifiedName)) {\n\t\t// author = false;\n\t\t// }\n\t\ttag = \"\";\n\t}", "@Override\n public void close()\n throws XMLStreamException\n {\n /* 19-Jul-2004, TSa: Hmmh. Let's actually close all still open\n * elements, starting with currently open start (-> empty)\n * element, if one exists, and then closing scopes by adding\n * matching end elements.\n */\n _finishDocument(false);\n }", "@Override\n public void XML_endDocument(Atz_XML_SAX_DataHandler sourceHandler) {\n }", "public void endCDATA() throws SAXException {\n\t\tmCDataSection = false;\n\t\tif (mParsedObject != null) mParsedObject.endCDATA();\n\t}", "public void endElement(String uri, String localName,\n\t\t\t\tString qName) throws SAXException {\n\t\t \n\t\t\t}", "public void endElement(String uri, String localName, String qName) {\r\n if (namespace.length() > 0 && qName.startsWith(namespace)) {\r\n qName = qName.substring(namespace.length());\r\n }\r\n elem = \"\"; // no characters allowed outside <td> ... </td>\r\n if (false) {\r\n } else if (qName.equals(ROOT_TAG )) { \r\n \tcharWriter.println(lineBuffer.toString());\r\n } else { // variable GEDCOM keyword\r\n saxLevel --;\r\n } \r\n charState = 0;\r\n }", "@Override\n public void endElement(String namespaceURI, String localName, String qName)\n throws SAXException {\n if (title) {\n title = false;\n }\n }", "public void endSvgFile(){\n\t\toutput += \"</g>\\n\" + \n\t\t\t\t\t\"</g>\\n\" +\n\t\t\t\t\t\"</svg>\\n\";\n\t}", "public void endElement(String name) throws Exception {\n\t\t\tif (isVerbose()) {\n\t\t\t\tunindent();\n\t\t\t\tlogInfo(\"end\", \"</\" + name + \">\");\n\t\t\t}\n\n\t\t\tXmlElement parent = _currentElement.getParent();\n\t\t\t_currentElement = parent;\n\t\t}", "@Override\n\tpublic void endElement(String arg0, String arg1, String arg2) throws SAXException {\n\t\tSystem.out.println(arg2+\"解析结束\");\n\t}", "public void endElement(String uri, String localName,\n\t\tString qName) throws SAXException {\n \n\t}", "protected void end() {\n \n \n }", "protected void afterBody(final XMLOutput output) throws JellyTagException, SAXException\n\t{\t\n\t\toutput.write(\"</div>\\n\") ;\n\t}", "protected void end()\n\t{\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "public XMLDocument endElement() {\r\n return this.endElement(null);\r\n }", "public String doneXML() {\r\n return null;\r\n }", "public void exit()\n {\n m_doc = null;\n m_stylesheet = null;\n\n // m_defaultParaProperties = null;\n\n m_paragraph = null;\n m_paraProperties = null;\n m_charProperties = null;\n m_charPropertiesStack = null;\n m_container = null;\n m_containerStack = null;\n }", "@Override\r\n\tprotected void end() {\r\n\t}", "@Override\n public void writeEndElement() throws XMLStreamException {\n closeStartTag();\n if(_depth == 0){\n return;\n }\n if(_ncContextState[_depth]){\n nsContext.popContext();\n }\n try {\n _stream .write(_END_TAG);\n //writeStringToUtf8 (qname,_stream);\n ElementName en =elementNames[--_depth];\n _stream.write(en.getUtf8Data().getBytes(), 0,en.getUtf8Data().getLength());\n en.getUtf8Data().reset();\n _stream .write('>');\n } catch (IOException ex) {\n throw new RuntimeException(ex);\n }\n }", "public void endParsing();", "protected void end() {\n\r\n\t}", "@Override\n\t\tpublic void end() {\n\t\t\t\n\t\t}", "public void endDocument() {\n \t\t\t\t\t\t\t\tif (stderrObserver != null) {\n \t\t\t\t\t\t\t\t\tparserPipedStreamListener.disable();\n \t\t\t\t\t\t\t\t\tstderrObserver.removeListener(parserPipedStreamListener);\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}", "public void endElement(String uri, String localName, String qName) {\n CodeWriter out = getTranslaterContext().getCodeWriter();\n out.printIndent().println(\"sfsContentHandler.characters(\" + sb.toString().trim() + \");\");\n }", "@Override\n\tpublic void end() {\n\t\t// Empty on purpose, no cleanup required yet\n\t}", "public void commit() {\n\t\ttry {\n\t\t\tTransformer transformer = TransformerFactory.newInstance().newTransformer();\n\t\t\tDOMSource domSource = new DOMSource(document);\n\t\t\tStreamResult streamResult = new StreamResult(new File(fileName));\n\t\t\ttransformer.transform(domSource, streamResult);\n\t\t\t//Reload nodes list\n\t\t\tnodes = document.getDocumentElement().getChildNodes();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n protected void end() {\r\n\r\n }", "public void handleCustomNodeEnd(IParserHandler parserHandler, BeanNode node, XMLAttributeMap att, Locator locator);", "public void endDocument() throws SAXException {\r\n\t\t// The ff conditions will have to be met to signal a datasource request\r\n\t\t// error\r\n\t\t/*\r\n\t\t * 1.At least one dataSource was requested 2.All the DataSources was\r\n\t\t * requested do not exist in our Database.\r\n\t\t */\r\n\t\tif (((requestedDataSources == null) || (requestedDataSources.size() == 0))\r\n\t\t\t\t&& (errorMessages.length() > 0)) {\r\n\t\t\tDATASOURCE_ERROR_CODE = -1;\r\n\t\t\terror(new SAXParseException(errorMessages.toString(), _locator));\r\n\t\t}\r\n\t}", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "public void endElement(String uri, String localName, String qName)\n throws SAXException {\n newContent.append(\"</\");\n newContent.append(qName);\n newContent.append(\">\");\n }", "public void close(){\r\n Transformer t = null;\r\n\t\ttry {\r\n\t\t\tt = TransformerFactory.newInstance().newTransformer();\r\n\t\t\tt.setOutputProperty(OutputKeys.METHOD, \"xml\");\r\n\t\t\tt.setOutputProperty(OutputKeys.INDENT, \"yes\"); \r\n\t\t\tt.transform(new DOMSource(document), new StreamResult(new FileOutputStream(XMLFileName))); \t\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "void endComplexContent(ComplexTypeSG type) throws SAXException;", "@InnerAccess void visitEnd ()\n\t{\n\t\tclassWriter.visitEnd();\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\r\n\tprotected void end() {\n\r\n\t}", "@Override\r\n\tprotected void end() {\n\r\n\t}", "protected void onEnd() {}", "@Override\n\t\t\tpublic void end() {\n\t\t\t\t\n\t\t\t}" ]
[ "0.7713988", "0.76559246", "0.76328015", "0.7630758", "0.76291966", "0.75741595", "0.7560753", "0.755727", "0.75537163", "0.7546977", "0.7546977", "0.7546977", "0.7543383", "0.7501437", "0.7499656", "0.7453753", "0.7453753", "0.74417686", "0.7358178", "0.7352831", "0.7334119", "0.73106694", "0.7259795", "0.72155327", "0.71851254", "0.7046336", "0.70081604", "0.70012873", "0.6984274", "0.69557685", "0.69319", "0.69143015", "0.68619007", "0.68150496", "0.6808191", "0.68043864", "0.6741179", "0.6735423", "0.6732469", "0.6724402", "0.667521", "0.66634583", "0.66393423", "0.66363144", "0.6581701", "0.6580488", "0.6573555", "0.65714884", "0.65652454", "0.6532422", "0.6518491", "0.64891714", "0.64873064", "0.64643544", "0.6457795", "0.6432633", "0.6432123", "0.6411495", "0.6375732", "0.6374969", "0.6371163", "0.63223153", "0.6314451", "0.63064617", "0.6305157", "0.6305157", "0.6305157", "0.6305157", "0.6305157", "0.6305157", "0.6304393", "0.629172", "0.62761563", "0.6254612", "0.625328", "0.6252522", "0.62512636", "0.62485373", "0.6248381", "0.6244083", "0.62415665", "0.6230364", "0.6206144", "0.62028927", "0.61900824", "0.6187817", "0.6187817", "0.6187817", "0.6187817", "0.618635", "0.61767703", "0.6175838", "0.61757183", "0.6170162", "0.6170162", "0.6170162", "0.6148569", "0.6148569", "0.61477053", "0.6145971" ]
0.7645736
2
Start processing of an element.
@Override public void startElement(String uri, String localName, String qName, Attributes atts) { // Using qualified name because we are not using xmlns prefixes here. if (qName.equals("title")) { title = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void startProcessing() {\n\n\t}", "public void start() {\n process(0);\n }", "public void startContent() throws XPathException {\r\n if (depthOfHole == 0) {\r\n nextReceiver.startContent();\r\n }\r\n }", "public void run(IElementManager manager, AbstractElement element) {\r\n\t\trun();\r\n\t}", "public Instruction startNode(@Nullable final PsiElement element) {\n final Instruction instruction = new InstructionImpl(this, element);\n addNode(instruction);\n checkPending(instruction);\n return instruction;\n }", "@Override\n\tpublic void elementStart(float tpf) {\n\t\t\n\t}", "protected void parseElements(XmlElement processElement) {\n\n parseStartEvents(processElement);\n parseActivities(processElement);\n parseEndEvents(processElement);\n parseSequenceFlow(processElement);\n }", "public void startProcessingImage() {\n if (loadBitmap()) {\n this.mImageProcessHelper.start(this.mBitmap);\n }\n }", "public void doStart() {\n if (this.mActive == null) {\n a();\n } else {\n com.alipay.mobile.common.task.Log.v(TAG, \"StandardPipeline.start(a task is running, so don't call scheduleNext())\");\n }\n }", "public void startContent() throws XPathException {\r\n nextReceiver.startElement(elementNameCode, elementProperties);\r\n\r\n final int length = bufferedAttributes.getLength();\r\n for (int i=0; i<length; i++) {\r\n nextReceiver.attribute(bufferedAttributes.getNameCode(i),\r\n bufferedAttributes.getValue(i)\r\n );\r\n }\r\n for (NamespaceBinding nb : bufferedNamespaces) {\r\n nextReceiver.namespace(nb, 0);\r\n }\r\n\r\n nextReceiver.startContent();\r\n }", "public void processing();", "void element() {}", "public void run(\r\n ) {\r\n \tboolean isActive = true;\r\n \tStringBuilder aBuffer = new StringBuilder( 256 );\r\n \t\r\n \twhile( isActive ) {\r\n \t\tsynchronized( this ) {\r\n\t \t\tif ( mLoadingScene == null ) try {\r\n\t \t\t\tthis.wait();\r\n\t \t\t} catch( InterruptedException ex ) {\r\n\t \t\t\tisActive = false;\r\n\t \t\t\tmLoadingScene = null;\r\n\t \t\t}\r\n \t\t}\r\n \t\taBuffer.setLength( 0 );\r\n \t\tStringBuilder reportString = null;\r\n \t\ttry {\r\n \t\t\treportString = loadElement( mLoadingScene, aBuffer );\r\n \t\t} catch( CSGConstructionException ex ) {\r\n \t\t\treportString = CSGConstructionException.reportError( ex, \" // \", aBuffer );\r\n \t\t}\r\n \t\tmLoadingScene = null;\r\n \t\t\r\n \t\tif ( reportString != null ) {\r\n \t\t\tmPostText.push( reportString.toString() );\r\n \t\t\tmRefreshText = true;\r\n \t\t}\r\n \t}\r\n }", "private void parse() throws XMLStreamException {\n while (reader.hasNext()) {\n if (reader.next() == START_ELEMENT) {\n handleElement();\n }\n }\n }", "void start(Element e, Attributes attributes) {\n this.current = e;\n\n if (e.startElementListener != null) {\n e.startElementListener.start(attributes);\n }\n\n if (e.endTextElementListener != null) {\n this.bodyBuilder = new StringBuilder();\n }\n\n e.resetRequiredChildren();\n e.visited = true;\n }", "@Override\n\tpublic void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException {\n\t\tCurrentTag=arg2;\n\t\tSystem.out.println(\"此处处理的元素是:\"+arg2);\n\t}", "private void startScan()throws Exception {\n\t\t//System.out.println(\"locking until \"+endCharOffset);\n\t\tif(provideFeedback)\n\t\t\tdocument.setCharacterAttributes(0,endCharOffset,locked,false);\n\t\t\n\t\tstatus.setForeground(Color.green);\n\t\tstatus.setText(\"processing input ...\");\n\t\tstatus.setEnabled(true);\n\t\t\n\t\t//System.out.println(\"Starting thread \"+Thread.currentThread().getName());\t\t\t\n\t}", "private void eventProcessingStarted() {\n\t\tsynchronized(processingCounterMutex) {\n\t\t\tprocessingCounter++;\n\t\t}\n\t}", "public void startExecuting() {}", "public void start() {\r\n\t\trunning = true;\r\n\t\trun();\r\n\t}", "@Override\n\tpublic void processing() {\n\n\t}", "public void startContent() throws XPathException {\n if (activeDepth > 0) {\n super.startContent();\n } else if (matched) {\n activeDepth = 1;\n super.startContent();\n }\n }", "@Override\n public void run() {\n\tprocess();\n }", "public void onStart(ElementPath elementPath) {\r\n Element element = elementPath.getCurrent();\r\n\r\n // Save the location of the last (i.e. parent) path\r\n pathStack.add(path);\r\n\r\n // Calculate the new path\r\n if (atRoot) {\r\n path = path + element.getName();\r\n atRoot = false;\r\n } else {\r\n path = path + \"/\" + element.getName();\r\n }\r\n\r\n if ((handlers != null) && (handlers.containsKey(path))) {\r\n // The current node has a handler associated with it.\r\n // Find the handler and save it on the handler stack.\r\n ElementHandler handler = (ElementHandler) handlers.get(path);\r\n handlerStack.add(handler);\r\n\r\n // Call the handlers onStart method.\r\n handler.onStart(elementPath);\r\n } else {\r\n // No handler is associated with this node, so use the\r\n // defaultHandler it it exists.\r\n if (handlerStack.isEmpty() && (defaultHandler != null)) {\r\n defaultHandler.onStart(elementPath);\r\n }\r\n }\r\n }", "public void startElement(String localName) throws SAXException {\n\t\tstartElement(\"\", localName, \"\", EMPTY_ATTS);\n\t}", "@Override\n\tpublic void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException {\n\t\tSystem.out.println(arg2+\"解析开始\");\n\t}", "public abstract void startElement( String namespaceURI, String sName, String qName, Attributes attrs );", "private void processStartObject() {\n\t\tif (currentFieldName != null) {\r\n\t\t\t// go down the tree following the field name\r\n\t\t\tFieldFilterTree tmpIncludes = curNode.getChild(currentFieldName);\r\n\t\t\tparentNode = curNode;\r\n\t\t\tcurNode = tmpIncludes;\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void doProcessing() throws InterruptedException {\r\n\t\tMelody.getContext().handleProcessorStateUpdates();\r\n\r\n\t\tsynchronized (getTargetElement().getOwnerDocument()) {\r\n\t\t\tgetTargetElement().setAttribute(\r\n\t\t\t\t\tgetTargetAttributeName().getValue(), getNewValue());\r\n\t\t}\r\n\t}", "public DsSipElementListener elementBegin(int contextId, int elementId)\n throws DsSipParserListenerException {\n if (DsSipMessage.DEBUG) {\n System.out.println(\n \"elementBegin - contextId = [\"\n + contextId\n + \"][\"\n + DsSipMsgParser.HEADER_NAMES[contextId]\n + \"]\");\n System.out.println(\n \"elementBegin - elementId = [\"\n + elementId\n + \"][\"\n + DsSipMsgParser.ELEMENT_NAMES[elementId]\n + \"]\");\n System.out.println();\n }\n\n if (elementId == SINGLE_VALUE) {\n return this;\n } else {\n return null;\n }\n }", "public void process() {\n\t}", "@Override\n\tpublic void startElement(QName qname) {\n\t\t\n\t}", "protected void parseStartEvents(XmlElement parentXmlElement) {\n\n List<XmlElement> startEventXmlElements = parentXmlElement.getElements(\"startEvent\");\n\n if (startEventXmlElements.size() > 1) {\n\n getProblemLogger().addError(\"Multiple start events are currently not supported\", parentXmlElement);\n } else if (startEventXmlElements.size() > 0) {\n\n XmlElement startEventXmlElement = startEventXmlElements.get(0);\n\n Node startEventNode = BpmnNodeFactory.createBpmnStartEventNode(processBuilder);\n\n parseGeneralInformation(startEventXmlElement, startEventNode);\n\n getNodeXmlIdTable().put((String) startEventNode.getAttribute(\"idXml\"), startEventNode);\n\n // We should think about forms for the startEvent\n // Maybe we can implement that as startTrigger\n // Example:\n // StartFormHandler startFormHandler = new StartFormHandler();\n // String startFormHandlerClassName = startEventElement.attributeNS(BpmnXmlParser.JODA_ENGINE_EXTENSIONS_NS,\n // \"formHandlerClass\");\n\n // Doing some afterwork\n for (BpmnXmlParseListener parseListener : parseListeners) {\n parseListener.parseStartEvent(startEventXmlElement, startEventNode, processBuilder);\n }\n }\n }", "void start() {\n \tm_e.step(); // 1, 3\n }", "public abstract void nextElement();", "public void run() {\r\n\t\tAbstractElementControl[] controls = manager.getElements();\r\n\t\tfor (int i = 0; i < controls.length; i++) {\r\n\t\t\tif (controls[i] != null && controls[i] instanceof ServiceControl) {\r\n\t\t\t\tServiceControl sc = (ServiceControl)controls[i];\r\n\t\t\t\tif (sc.getSystemID().equals(systemID)) {\r\n\t\t\t\t\tmanager.focusElement(sc);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tServiceControl sc = new ServiceControl(manager, systemID, name);\r\n\t\tmanager.addElement(sc);\r\n\t\tmanager.focusElement(sc);\r\n\t}", "public ThreadAvnet(Element element) {\n this.element = element;\n // run();\n }", "public void start()\n {\n FileVector = FileHandler.getFileList( harvesterDirName , filterArray, false );\n iter = FileVector.iterator();\n }", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n public void start() {\n checkValue();\n super.start();\n }", "public void start(Node n) {}", "public void startElement(String nsURI, String localName, String qName,\n Attributes atts) throws SAXException\n {\n this.ensureInitialization();\n super.startElement(nsURI, localName, qName, atts);\n }", "public void Start() {\n OCCwrapJavaJNI.Interface_EntityIterator_Start(swigCPtr, this);\n }", "protected void sequence_Element(ISerializationContext context, Element semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, DrnPackage.Literals.ELEMENT__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DrnPackage.Literals.ELEMENT__NAME));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getElementAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());\n\t\tfeeder.finish();\n\t}", "public void startElement(String name) {\n\t\t\tif (isVerbose()) {\n\t\t\t\tlogInfo(\"start\", \"<\" + name + \"> (\" + printEntityType(name)\n\t\t\t\t\t\t+ \")\");\n\t\t\t\tindent();\n\t\t\t}\n\n\t\t\tXmlElement e = new XmlElement(name, _attributes);\n\t\t\te.setParent(_currentElement);\n\n\t\t\tif (_currentElement == null) {\n\t\t\t\t_root = e;\n\t\t\t} else {\n\t\t\t\t_currentElement.addElement(e);\n\t\t\t}\n\n\t\t\t_currentElement = e;\n\t\t\t_attributes.clear();\n\t\t}", "public void start(){\n //Set pausing to false\n pausing = false;\n next();\n }", "public void run()\n\t{\n\t\tthis.partition();\n\t}", "protected abstract void doStart();", "public void start() {\n LOG.entering(CLASS_NAME, \"start\");\n if (state.compareAndSet(STOPPING, STARTED)) {\n // Keep same thread running if STOPPING\n }\n else if (state.compareAndSet(STOPPED, STARTED)) {\n new Thread(this, \"XoaEventProcessor\").start();\n }\n }", "protected void runBeforeIteration() {}", "public void run() {\n try {\r\n TransformerFactory tFactory = TransformerFactory.newInstance();\r\n // Fortify Mod: prevent external entity injection\r\n tFactory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);\r\n Transformer transformer = tFactory.newTransformer();\r\n transformer.setOutputProperty(\"encoding\", \"UTF-8\");\r\n transformer.setOutputProperty(\"indent\", \"yes\");\r\n transformer.transform(new DOMSource(doc), new StreamResult(\r\n pos));\r\n } catch (Exception e) {\r\n throw new RuntimeException(\r\n \"Error converting Document to InputStream. \"\r\n + e.getMessage());\r\n } finally {\r\n try {\r\n pos.close();\r\n } catch (IOException e) {\r\n\r\n }\r\n }\r\n }", "private void beforeAttributeNameState() throws SAXException, IOException {\n while (beforeAttributeNameStateImpl()) {\n // Spin.\n }\n }", "void preProcess();", "void startVisitingObject(Object node);", "@Override\n void startElement(String uri, String localName, String qName, Attributes attributes);", "public void handleOpenElement(String elementName, Map<String, String> attributes, int line, int col) {\r\n // TODO: Implement this.\r\n System.out.println(\"Start element: \" + elementName);\r\n }", "@Override\n\tpublic Result doProcessing() {\n\t\treturn doProcessing1();\n\t}", "public void startElement(String namespaceURI, String localName, String qName, Attributes atts)\n throws SAXException {\n log.info(\"startElement : noeud = \"+localName);\n if (N_GENERATION.equalsIgnoreCase(localName)){\n startElement_Generation(namespaceURI, localName, qName, atts);\n }\n if (N_CLASSE.equalsIgnoreCase(localName)){\n startElement_Generer(namespaceURI, localName, qName, atts);\n }\n if (N_TEMPLATE.equalsIgnoreCase(localName)){\n startElement_Template(namespaceURI, localName, qName, atts);\n }\n }", "public void startElement (String uri, String localName,\n String qName, Attributes attributes)\n throws SAXException\n {\n // no op\n }", "@Override\n public void startElement(String uri, String localName, String qName,\n Attributes attributes) throws SAXException {\n\n elementOn = true;\n\n if (localName.equals(\"begin\"))\n {\n data = new CallMTDGetterSetter();\n } else if (localName.equals(\"OHC_CALL_REPORT\")) {\n /**\n * We can get the values of attributes for eg. if the CD tag had an attribute( <CD attr= \"band\">Akon</CD> )\n * we can get the value \"band\". Below is an example of how to achieve this.\n *\n * String attributeValue = attributes.getValue(\"attr\");\n * data.setAttribute(attributeValue);\n *\n * */\n }\n }", "@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes atts) throws SAXException {\n\t\t\n\t}", "public void start( )\n {\n // Implemented by student.\n }", "public void startParsing(InputSource source) {\r\n\t\ttry {\r\n\t\t\t_parser.parse(source, this);\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\tLoggerUtilsServlet.logErrors(e);\r\n\t\t}\r\n\t}", "public void XMLstartElement(String element, HashMap attributes) {\r\n /**\r\n * Ex: <remotecontrol button=\"NUMERIC4\" state=\"DOWN\" />\r\n * This is a notification from the remote control module\r\n * about one of our requested remote control buttons have\r\n * been pressed.\r\n */\r\n if (element.equals(\"remotecontrol\") && attributes.containsKey(\"button\") && attributes.containsKey(\"state\")) {\r\n String state = (String)attributes.get(\"state\");\r\n String button = (String)attributes.get(\"button\");\r\n\r\n //find all room objects that are associated with this remote button\r\n Iterator it = roomObjects.values().iterator();\r\n while (it.hasNext()) {\r\n GenRoomObject o = (GenRoomObject)it.next();\r\n if (o.remoteButton.equals(button)) {\r\n //toggle all such room objects\r\n sendRoomObject(o.address, o.byteValue, state);\r\n }\r\n }\r\n }\r\n }", "@Override\n\tpublic synchronized void start() {\n\t\tif (estimationThread.running == false) {\n\t\t\t// Start the thread\n\t\t\testimationThread.running = true;\n\t\t\testimationThread.run();\n\t\t}\n\t}", "@Override\n\tpublic void processingInstruction() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t\tjj.first();\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t\tjj.first();\r\n\t\t\t}", "public void onStart() {\n\t new Thread() {\n\t @Override public void run() {\n\t receive();\n\t }\n\t }.start();\n\t }", "public void processStartChildElement(String uri, String localName, String qName, Attributes attributes)\n {\n }", "public void parse(Element element, boolean isInput)\n {\n\n aId = element.getAttribute(\"id\");\n aPath = element.getAttribute(\"path\");\n\n //get the 'args' from the XML line\n aArg = element.getAttribute(\"args\");\n\n this.processCommands.add(aPath);\n \n if (!aArg.isEmpty()){\n StringTokenizer st = new StringTokenizer(aArg);\n while (st.hasMoreTokens()){\n String tok = st.nextToken();\n this.processCommands.add(tok);\n }\n }\n \n if(isInput) {\n ioFile = element.getAttribute(\"in\");\n }else {\n ioFile = element.getAttribute(\"out\");\n }\n \n }", "@Override\n public synchronized void start()\n {\n if (run)\n return;\n run = true;\n super.start();\n }", "protected abstract void analyze(E element) throws EX;", "public void start() {\r\n\t\tif (animationFigure instanceof TrainFigure) {\r\n\t\t\t((TrainFigure) animationFigure).setBusyColor(org.eclipse.draw2d.ColorConstants.red);\r\n\t\t}\r\n\t\tcounter = 1;\r\n\t\t//notify Listeners\r\n\t\tanimationFigure.notifyAnimationListener(new AnimationStartedEvent(animationFigure, AnimationStartedEvent.BUSY_STARTED));\r\n\t\tthis.stopped=false;\r\n\t\tmap.getDisplay().asyncExec(this);\r\n\t}", "public void setStartElement(final int startIdx) {\r\n\t\tgetState().start = startIdx;\r\n\t}", "public void run() {\n\t\t\t\twhile(keepGoing) {\n//\t\t\t\t\tif(pauseForCommand) {\n//\t\t\t\t\t\ttry {\n//\t\t\t\t\t\t\tThread.sleep(50);\t//Give a bit of time for something else...\n//\t\t\t\t\t\t} catch (InterruptedException 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\tSystem.err.println(\"readLoop is paused\");\n//\t\t\t\t\t\tcontinue;\n//\t\t\t\t\t}\n\t\t\t\t\tDocument xmlDoc;\n\t\t\t\t\ttry {\n\t\t\t\t\t\txmlDoc = getNextBlock();\n\t\t\t\t\t\tif(xmlDoc.hasChildNodes()) {\n\t\t\t\t\t\t\tprocessChildren(xmlDoc);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch (SAXException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tlog.info(\"Read loop finishing as keepGoing now false\");\n\t\t\t}", "public void startDocument()\n throws SAXException\n {\n // we are now in the prolog.\n inProlog = true;\n eventList.clear();\n\n // track the start document event.\n eventList.add(new StartDocumentEvent());\n }", "public void start() {\n\t\tthis.startTime = System.nanoTime();\n\t\tthis.running = true;\n\t}", "public void startElement(String qname, int depth, Attributes attributes, long drug_WID) {\n if (open) {\n if (depth == this.depth + 1) {\n if (qname.equals(BondTypeTags.getInstance().ACTIONS)) {\n actions.setOpen(true);\n }\n }\n if (depth >= this.depth + 1) {\n if (actions.isOpen()) {\n actions.startElement(qname, depth, attributes, WID);\n }\n }\n }\n if (qname.equals(mainTag)) {\n this.depth = depth;\n open = true;\n\n WID = WIDFactory.getInstance().getWid();\n WIDFactory.getInstance().increaseWid();\n this.drug_WID = drug_WID;\n partner = attributes.getValue(BondTypeTags.getInstance().PARTNER);\n position = attributes.getValue(BondTypeTags.getInstance().POSITION);\n references = null;\n knownAction = null;\n }\n }", "public void startProcess() {\r\n\t\tprocess = true;\r\n\t}", "public void start(){\n\t\tdo{\n\t\t\tMessage<T> msg= input.read();\n\t\t\tif (!msg.getQuit() && !msg.getFail() ){\n\t\t\t\tconsume(msg.getContent());\n\t\t\t}\n\t\t\tif (msg.getQuit()){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}while(true);\n\t\t\n\t}", "public void startElement(String name, UIComponent component)\n throws IOException\n {\n if (name == null) {\n throw new NullPointerException();\n }\n if (state == START_ELEMENT) {\n out.write('>');\n }\n out.write('<');\n out.write(name);\n state = START_ELEMENT;\n\n if (name.equalsIgnoreCase(\"script\") || name.equalsIgnoreCase(\"style\")) {\n dontEscape = true;\n }\n }", "public void enqueue (E element);", "public void processed(int i);", "@Override\r\n\tpublic void start() {\n\t\t\r\n\t}", "public void start() {\n currExam = wordExamQueue.poll();\n displayExam(currExam);\n }", "protected int exprElementStart(\n MarinerRequestContext context,\n PAPIAttributes papiAttributes)\n throws PAPIException {\n\n MarinerPageContext pageContext\n = ContextInternals.getMarinerPageContext(context);\n\n PaneAttributes attributes = (PaneAttributes) papiAttributes;\n\n // Try and find the pane with the specified name, if it could not be\n // found then return and skip the element body.\n String paneName = attributes.getName();\n if (paneName != null) {\n\n FormatReference formatRef =\n FormatReferenceParser.parsePane(paneName, pageContext);\n Pane pane = pageContext.getPane(formatRef.getStem());\n NDimensionalIndex paneIndex = formatRef.getIndex();\n\n if (pane == null) {\n skipped = true;\n return SKIP_ELEMENT_BODY;\n }\n\n paneInstance = (AbstractPaneInstance)\n pageContext.getFormatInstance(pane, paneIndex);\n if (paneInstance.ignore()) {\n skipped = true;\n return SKIP_ELEMENT_BODY;\n }\n\n paneInstance.setStyleClass(attributes.getStyleClass());\n MCSAttributes pAttributes = paneInstance.getAttributes();\n // get the styles for the current element and set it on the MCSAttributes\n pAttributes.setStyles(pageContext.getStylingEngine().getStyles());\n\n pageContext.pushContainerInstance(paneInstance);\n } else if (pageContext.getCurrentPane() == null) {\n // this element doesn't have a pane name specified and the pane stack is\n // empty. This is not allowed.\n throw new PAPIException(\n exceptionLocalizer.format(\"pane-name-not-found\"));\n }\n\n // Fake an open element so that whitespace is handled normally since we\n // have no element to represent pane at the moment.\n pageContext.getCurrentOutputBuffer()\n .handleOpenElementWhitespace();\n\n return PROCESS_ELEMENT_BODY;\n }", "public void start() {\n\n\t}", "@Override\r\n\tpublic void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n\t}", "public void startDocument() throws SAXException {\n \n }", "void startSequence(GroupSG group) throws SAXException;", "public void start() {\n start(mRangeStart, mRange, mIsPositive);\n }", "public void process() {\n\n }", "public void start() {\n this.f3567pI.start();\n }", "public void startElement( String uri, String localName, String qName, Attributes attributes )\n throws SAXException\n {\n if( inProlog ) {\n endProlog( uri, localName, qName, attributes );\n }\n\n super.startElement( uri, localName, qName, attributes );\n }", "public void startExecuting()\n {\n super.startExecuting();\n this.breakingTime = 0;\n }", "private void startElement(XmlElementName name, Attributes attrs, int aNumChildren)\n throws SAXException {\n ch.startElement(name.nsUri, name.localName, name.qName, attrs);\n }", "public void start() {\n\t\t\n\t}", "public void start() {\n\t\t\n\t}", "public void start() {\n isStarted = true;\n clearBoard();\n newPiece();\n }", "@Override\n\tpublic void forEach(Processor processor) {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tprocessor.process(elements[i]);\n\t\t}\n\t}" ]
[ "0.6349187", "0.6143909", "0.6004052", "0.5940188", "0.59143555", "0.59076726", "0.57628214", "0.5754335", "0.5745988", "0.5714225", "0.563237", "0.5569513", "0.5532367", "0.55310804", "0.55114686", "0.55050725", "0.54759073", "0.54542226", "0.5452171", "0.543943", "0.54390067", "0.543186", "0.54100525", "0.5406603", "0.53993446", "0.5393218", "0.5385145", "0.53737676", "0.5362988", "0.53594226", "0.5335857", "0.5331179", "0.5326128", "0.5323628", "0.531139", "0.52800244", "0.52744853", "0.5265584", "0.52569205", "0.5252504", "0.5247823", "0.5244212", "0.5230153", "0.52289045", "0.5227095", "0.52268225", "0.5221749", "0.5219634", "0.52124345", "0.5210913", "0.5207605", "0.52065575", "0.52064484", "0.5191614", "0.5190685", "0.5184893", "0.5179942", "0.5178368", "0.51577806", "0.5157279", "0.5157274", "0.5142902", "0.51403683", "0.5139837", "0.5134442", "0.51308227", "0.51296383", "0.51296383", "0.512887", "0.51183236", "0.51156837", "0.5114114", "0.5112057", "0.5103034", "0.50931025", "0.5091907", "0.5085918", "0.50809765", "0.5075886", "0.5072864", "0.50659174", "0.5064569", "0.5061904", "0.506122", "0.5059107", "0.5056474", "0.50523466", "0.50483817", "0.5047598", "0.5047288", "0.50455123", "0.50449187", "0.5035511", "0.50259733", "0.5025859", "0.50255615", "0.5025291", "0.50242096", "0.50242096", "0.5022191", "0.5020415" ]
0.0
-1
End of processing current element
@Override public void endElement(String namespaceURI, String localName, String qName) throws SAXException { if (title) { title = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void elementEnd() {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "public void endElement() throws Exception;", "protected void end() {\n \t// theres nothing to end\n }", "protected void end() {\n \n \n }", "@Override\n\t\t\tpublic void end() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void end() {\n\t\t\t\n\t\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "protected void end() {\n\t}", "@Override\n\tpublic void end() {\n\t\t// Empty on purpose, no cleanup required yet\n\t}", "public void visitEnd()\n\t{\n\t}", "protected void end()\n\t{\n\t}", "@Override\r\n protected void end() {\r\n\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\r\n }", "protected void end() {\n\r\n\t}", "@Override\r\n\tprotected void end() {\r\n\t}", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "protected void end() {\n }", "@Override\n\tpublic void end() {\n\n\t}", "@Override\n\tpublic void end() {\n\n\t}", "@Override\r\n\t\t\t\tpublic void autEndProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void autEndProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\n\tprotected void end() {\n\n\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tprotected void end() {\n\t}", "@Override\n\tpublic void end() {\n\t\t\n\t}", "@Override\n protected void end() {\n }", "public void elementEnd() {\n\t\t\t\t\t\tblipsText.append(\"\\n\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\n public void end() {\n }", "@InnerAccess void visitEnd ()\n\t{\n\t\tclassWriter.visitEnd();\n\t}", "@Override\n\tprotected void end() {\n\t\t\n\t}", "@Override\r\n\tprotected void end() {\n\r\n\t}", "@Override\r\n\tprotected void end() {\n\r\n\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t}", "@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t}", "public void handleCloseElement(String elementName, int line, int col) {\r\n // TODO: Implement this.\r\n System.out.println(\"End element: \" + elementName);\r\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n }", "@Override\n protected void end() {\n\n }", "protected void end() {\r\n\t\t \tP.println(Tt.getClassName(this) + \" ending\");\r\n\t\t }", "public static void end() {\n Log.writeln(\"<xml-end/> <!-- Non-xml data follows ... -->\");\n }", "@Override\n\tprotected void end() {\n\t\t//System.out.println(this.getClass().getSimpleName() + \" end\");\n\t}", "public void end() {\n\t\tsigue = false;\n\t}", "protected int exprElementEnd(\n MarinerRequestContext context,\n PAPIAttributes papiAttributes)\n throws PAPIException {\n\n if (skipped) {\n return CONTINUE_PROCESSING;\n }\n\n MarinerPageContext pageContext\n = ContextInternals.getMarinerPageContext(context);\n\n // Fake a close element so that whitespace is handled normally since we\n // have no element to represent pane at the moment.\n pageContext.getCurrentOutputBuffer()\n .handleCloseElementWhitespace();\n\n if (paneInstance != null) {\n pageContext.popContainerInstance(paneInstance);\n }\n return CONTINUE_PROCESSING;\n }", "public void endParsing();", "@Override\n public void endBlock() {\n }", "@Override\n\tpublic void endElement(QName qname) {\n\t\t\n\t}" ]
[ "0.84196323", "0.79994714", "0.7198783", "0.71949434", "0.716731", "0.71649045", "0.7133482", "0.7133482", "0.7133482", "0.7133482", "0.7133482", "0.7133482", "0.7109093", "0.7108167", "0.7094678", "0.70777434", "0.70618045", "0.70618045", "0.70618045", "0.70618045", "0.7026086", "0.70239514", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.6982324", "0.69736284", "0.69736284", "0.69686055", "0.69686055", "0.6935758", "0.6935758", "0.6935758", "0.6921137", "0.6921137", "0.6921137", "0.6921137", "0.6921137", "0.6918589", "0.6918589", "0.6918589", "0.6918589", "0.6915432", "0.69132674", "0.68968683", "0.68784076", "0.68729764", "0.68677014", "0.6850109", "0.6850109", "0.6844316", "0.6844316", "0.6812136", "0.6790771", "0.6790771", "0.6790771", "0.6790771", "0.6790771", "0.6790771", "0.6790771", "0.6790771", "0.6790771", "0.6790771", "0.6790771", "0.6790771", "0.6773534", "0.67557776", "0.6748529", "0.66746014", "0.6667668", "0.6656753", "0.6651614", "0.6636915", "0.66032743" ]
0.0
-1
Processing character data inside an element
@Override public void characters(char[] ch, int start, int length) { if (title) { String bookTitle = new String(ch, start, length); System.out.println("Book title: " + bookTitle); nameList.add(bookTitle); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void characters(char[] ch, int start, int length)\n throws SAXException {\n\n if (elementOn) {\n elementValue = new String(ch, start, length);\n elementOn = false;\n }\n\n }", "@Override\n\tpublic void characters(char[] arg0, int arg1, int arg2) throws SAXException {\n\t\tString content=new String(arg0,arg1,arg2);\n\t\tif(content.length()>0) {\n\t\t\tSystem.out.println(\"<\"+CurrentTag+\">元素的内容是: \"+content.trim());\n\t\t}\n\t}", "@Override\n public void characters(char[] ch, int start, int length) {\n Node current = eltStack.peek();\n if (current.getChildNodes().getLength() == 1\n && current.getChildNodes().item(0).getNodeType() == Node.TEXT_NODE) {\n Text text = (Text) current.getChildNodes().item(0);\n text.appendData(new String(ch, start, length));\n } else {\n Text text = document.createTextNode(new String(ch, start, length));\n eltStack.peek().appendChild(text);\n }\n }", "@Override\n public void characters(char[] ch, int start, int length)\n throws SAXException{\n super.characters(ch, start, length);\n if(length<=0)\n return;\n for(int i=start; i<start+length; i++){\n if(ch[i]=='\\n')\n return;\n }\n\n String str=new String(ch,start,length);\n switch (tagName)\n {\n case \"key\":wordValue.setWord(str); break;\n case \"ps\": if(wordValue.getPsE().length()<=0)\n wordValue.setPsE(str);\n else wordValue.setPsA(str);\n break;\n case \"pron\":if(wordValue.getPronE().length()<=0)\n wordValue.setPronE(str);\n else wordValue.setPronA(str);\n break;\n case \"pos\":isChinese=false;\n interpret+=str+\" \";\n break;\n case \"acceptation\":interpret+=str+\"\\n\";\n interpret=wordValue.getInterpret()+interpret;\n wordValue.setInterpret(interpret);\n interpret=\"\";\n break;\n case \"orig\":orig=wordValue.getSentOrig();\n wordValue.setSentOrig(orig+str+\"\\n\");\n break;\n case \"trans\":trans=wordValue.getSentTrans();\n wordValue.setSentTrans(trans+str+\"\\n\");\n break;\n case \"fy\":isChinese=true;\n wordValue.setInterpret(str);\n }\n }", "public void characters(char[] ch, int start, int length) throws SAXException {\n //Remember that characters may be called multiple times for the same\n //element, so if data is null then the characters delivered here are\n //the data, otherwise append the characters to data\n if (data == null) {\n data = new String(ch, start, length);\n } else {\n data = data + new String(ch, start, length);\n }\n data = data.trim();\n }", "@Override\r\n\tpublic void characters(char[] ch, int start, int length) throws SAXException {\n\r\n\t\tString text = new String(ch, start, length).trim();\r\n\t\tif(text.isEmpty()) return;\r\n\t\t\t\t\r\n\t\tif (currentTag.equals(ComputerTagEnum.NAME)) {\r\n\t\t\tdevice.setName(text);\r\n\t\t} else if (currentTag.equals(ComputerTagEnum.ORIGIN)) {\r\n\t\t\tdevice.setOrigin(text);\r\n\t\t} else if (currentTag.equals(ComputerTagEnum.PRICE)) {\r\n\t\t\tdevice.setPrice(new BigInteger(text));\r\n\t\t} else if (currentTag.equals(ComputerTagEnum.COOLER)) {\r\n\t\t\ttype.setCooler(Boolean.valueOf(text));\r\n\t\t} else if (currentTag.equals(ComputerTagEnum.ENERGY)) {\r\n\t\t\ttype.setEnergy(Double.valueOf(text));\r\n\t\t} else if (currentTag.equals(ComputerTagEnum.GROUP)) {\r\n\t\t\ttype.setGroup(Group.fromValue(text));\r\n\t\t} else if (currentTag.equals(ComputerTagEnum.PORT)) {\r\n\t\t\tif (type.getClass() == Internal.class) {\r\n\t\t\t\t((Internal) type).setPort(IntPort.valueOf(text.toUpperCase()));\r\n\t\t\t} else if (type.getClass() == External.class) {\r\n\t\t\t\t((External) type).setPort(ExtPort.valueOf(text.toUpperCase()));\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "@Override\n public void characters(char[] ch, int start, int length)\n throws SAXException {\n\n // We don't need this, because our values are set as an attribute\n\n }", "@Override \r\n public void characters(char[] ch, int start, int length) \r\n throws SAXException {\n cadena = new String(ch, start, length);\r\n valor = valor + cadena;\r\n }", "public void characters (char ch[], int start, int length) throws SAXException {\n\t\tif(this.fieldName != null) {\n\t\t\tchar[] ch2 = new char[length];\n\t\t\tSystem.arraycopy(ch, start, ch2, 0, length);\n\t\t\t// Concatenate into previous values, as for cases with special characters\n\t\t\t// the content might be split into multiple chunks\n\t\t\tthis.fieldValue = this.fieldValue + new String(ch2);\n\t\t}\n\t}", "private void handleCharacterData() {\n\t\tif (!buffer.isEmpty()) {\n\t\t\tbyte[] data = buffer.toArray();\n\t\t\tbuffer.clear();\n\t\t\thandler.handleString(new String(data));\n\t\t}\n\t}", "public void characters(char[] ch, int start, int length)\r\n\t{\r\n\t String cdata = (new String(ch, start, length)).trim();\r\n\r\n\r\n\t if(cdata.length() < 1)\r\n\t\treturn;\r\n\r\n\t String cur_element = current_tag.peek();\r\n\r\n\t /* Process the cdata for the current element */\r\n\t if(cur_element == null)\r\n\t\t{\r\n\t\t System.out.println(\"Error (ETDHandler:characters): no tag for with cdata \" + cdata);\r\n\t\t System.exit(1);\r\n\t\t}\r\n\r\n\t if(cur_element.equals(\"DISS_surname\")){\r\n\t\tname[LAST] = cdata;\r\n\t }\r\n\t else if(cur_element.equals(\"DISS_fname\")){\r\n\t\tname[FIRST] = cdata;\r\n\t }\r\n\t else if(cur_element.equals(\"DISS_middle\")){\r\n\t\tname[MIDDLE] = cdata;\r\n\t }\r\n\t else if(cur_element.equals(\"DISS_language\")){\r\n\t\tlanguage = getLangCode(cdata);\r\n\t }\r\n\t else if(cur_element.equals(\"DISS_title\")){\r\n\t\ttitle += \"\" + cdata;\r\n\t\t//marc_out.add(\"=245 10$a\" + cdata.trim() + \"$h[electronic resource]\" + \".\");\r\n\t }\r\n\t else if(cur_element.equals(\"DISS_comp_date\")){\r\n\t\t comp_date = cdata.substring(0,4);\r\n\t\t}\r\n\r\n\t //else if(cur_element.equals(\"DISS_accept_date\") && cdata.length() >= 4){\r\n\t\t// ProQuest/UMI changed to a new system, which uses \"01/01/08\" for any ETD submitted in 2008. The accept_date is\r\n\t\t// no longer useful to generate the real accept date. \r\n\t\t//accept_date = cdata.substring(0, 4);\r\n\t\t// if DISS_accept_date is format of \"20050731\", length of 8\r\n\t\t//if(cdata.length() >= 8) {\r\n\t\t //running_date = cdata.substring(2, 8);\r\n\t\t// accept_date = cdata.substring(0,4);\r\n\t\t//}\r\n\r\n\t\t//-------revised by xing--------begin-------\r\n\t\t// if DISS_accept_date is format 0f \"07/31/2008\", lenght of 10\r\n\t\t//if(cdata.length() >= 10){\r\n\t\t //running_date = cdata.substring(8,10) + cdata.substring(0,2)+ cdata.substring(3,5);\r\n\t\t // accept_date = cdata.substring (6,10);\r\n\t\t//}\r\n\t\t//-------end--------------------------------\r\n\r\n\t//-------revised by JS 20090107, use full date--------begin-------\r\n\t else if(cur_element.equals(\"DISS_accept_date\")){\r\n\t\t accept_date = cdata.substring (0,10);\r\n\t marc_out.add(\"=500 \\\\\\\\$aTitle and description based on DISS metadata (ProQuest UMI) as of \" + accept_date + \".\");\r\n\t }\r\n\t\t// added JS 200912; if DISS_cat_code is present, grab to add to 502 $o\r\n\t else if(cur_element.equals(\"DISS_cat_code\")){\r\n\t\tcatCode += cdata + \"\";\r\n\t }\r\n\t\t//-------end--------------------------------\r\n\t else if(cur_element.equals(\"DISS_para\")){\r\n\t\tparagraphs += cdata;\r\n\t }\r\n\t else if(cur_element.equals(\"DISS_inst_contact\")){\r\n\t\tissueDept += cdata + \"\";\r\n\r\n\t\t/*marc_out.add(\"=699 \\\\\\\\$a\" + cdata + \".\"); //blah*/\r\n\t\t/*=699 \\\\\\\\$a\" + cdata + \".\"=> 200912JS: changed to 710 /blah*/\r\n\t }\r\n\t else if(cur_element.equals(\"DISS_keyword\")){\r\n\t\t/* Preferably parsing keywords into 699 marc data should be done here, but bug in java\r\n\t\t SAX causes characters() call on <DISS_keywords> to happen twice inbetween cdata */\r\n\t\tString n_cdata = cdata.replace(',', ';');\r\n\t\tn_cdata = n_cdata.replace(':', ';');\r\n\t\tn_cdata = n_cdata.replace('.', ';');\r\n\r\n\t\tkeywords += n_cdata;\r\n\t }\r\n\t else if(cur_element.equals(\"DISS_ISBN\")){\r\n\t\tmarc_out.add(\"=020 \\\\\\\\$a\" + cdata);\r\n\t }\r\n\t /* else if(cur_element.equals(\"DISS_cat_code\")) {\r\n\t\tmarc_out.add(\"=502 \\\\\\\\$o\" + catCode + \".\");\r\n\t\t} */ \r\n\t else if(cur_element.equals(\"DISS_degree\")) {\r\n\t\tmarc_out.add(\"=502 \\\\\\\\$aThesis$b(\" + cdata + \")--$cGeorge Washington University,$d\" + comp_date + \".\");\r\n\t\t} \r\n //System.out.println(catCode); /* output content of cat_code */\r\n\r\n\t}", "@Override\n\tpublic void characters(final char[] ch, final int start, final int length)\n\t\tthrows SAXException {\n\t\tif (this.isText) {\n\t\t\tif (this.isAPeso || this.isTMarcadoInicial) {\n\t\t\t\t//Se setea el valor del elemento actual\n\t\t\t\tthis.actual.setValorElemento(Integer.parseInt(String.valueOf(ch, start, length)));\n\t\t\t\t//se limpian las banderas para proximas etiquetas\n\t\t\t\tthis.isText = false;\n\t\t\t\tthis.isAPeso = false;\n\t\t\t\tthis.isTMarcadoInicial = false;\n\t\t\t}\n\t\t\telse if(isActualTransition || isPlace ){ \n\t\t\t\tString humanId = new String(ch,start,length);\n\t\t\t\tthis.actual.setId(humanId);\n\t\t\t\tthis.isActualTransition = false;\n\t\t\t\tisPlace = false;\n\t\t\t\tthis.isText=false;\n\t\t\t\tidsMap.put(tempId, humanId);\n\t\t\t}\n\t\t\t//si bText es true, pero bAPeso y bTMarcadoInicial son falso, se cambia bTexto a false\n\t\t\telse {\n\t\t\t\tthis.isText = false;\n\t\t\t}\n\t\t}\n\t\telse if(this.isType && this.isActualArco == true){\n//\t\t\tString value = String.valueOf(ch, start, length);\n//\t\t\tif(value.compareToIgnoreCase(\"test\")== 0){\n//\t\t\t\t((ElementoArco)this.actual).setTipo(TipoArco.LECTOR);\n//\t\t\t}else if (value.compareToIgnoreCase(\"inhibitor\") == 0){\n//\t\t\t\t((ElementoArco)this.actual).setTipo(TipoArco.INHIBIDOR);\n//\t\t\t}else{\n//\t\t\t\tthrow new SAXException(\"Tipo de Arco no soportado: \" + value);\n//\t\t\t}\n\t\t\t\n\t\t\tthis.isType = false;\n\t\t\tthis.isActualArco = false;\n\t\t\t\n\t\t}\n\t}", "Element getElement(ContentType type, char c);", "public void characters(char[] ch, int start, int length)\n throws SAXException {\n //String strValue = new String(ch, start, length);\n }", "CharSequenceConsumer cat(CharSequence chars) throws XPathException;", "public interface CharacterData\n extends Node\n{\n\n public abstract String getData()\n throws DOMException;\n\n public abstract void setData(String s)\n throws DOMException;\n\n public abstract int getLength();\n\n public abstract String substringData(int i, int j)\n throws DOMException;\n\n public abstract void appendData(String s)\n throws DOMException;\n\n public abstract void insertData(int i, String s)\n throws DOMException;\n\n public abstract void deleteData(int i, int j)\n throws DOMException;\n\n public abstract void replaceData(int i, int j, String s)\n throws DOMException;\n}", "@Override\n public void handleSpecialChar(\n com.globalsight.ling.docproc.extractor.html.HtmlObjects.Text t)\n {\n\n }", "public static _char parse(javax.xml.stream.XMLStreamReader reader)\n throws java.lang.Exception {\n _char object = new _char();\n\n int event;\n javax.xml.namespace.QName currentQName = null;\n java.lang.String nillableValue = null;\n java.lang.String prefix = \"\";\n java.lang.String namespaceuri = \"\";\n\n try {\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n currentQName = reader.getName();\n\n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n\n while (!reader.isEndElement()) {\n if (reader.isStartElement() || reader.hasText()) {\n if (reader.isStartElement() || reader.hasText()) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n throw new org.apache.axis2.databinding.ADBException(\n \"The element: \" + \"char\" +\n \" cannot be null\");\n }\n\n java.lang.String content = reader.getElementText();\n\n object.set_char(org.apache.axis2.databinding.utils.ConverterUtil.convertToInt(\n content));\n } // End of if for expected property start element\n\n else {\n // 3 - A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\n \"Unexpected subelement \" +\n reader.getName());\n }\n } else {\n reader.next();\n }\n } // end of while loop\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "private static void handleParser(char c) {\n if(c == '\\n'){\r\n return;\r\n }\r\n switch (state){\r\n case OUT_OF_TAG:{\r\n if(c == '<'){\r\n if(SAXParsedData.innerText.trim().length() != 0) {\r\n parserHandler.innerText(SAXParsedData.innerText);\r\n }\r\n SAXParsedData.innerText = \"\";\r\n SAXParsedData.tagName = \"\";\r\n state = SAXParserState.BEGIN_START_OR_END_TAG;\r\n } else if (c == '>') {\r\n state = SAXParserState.SYNTAX_ERROR;\r\n } else {\r\n SAXParsedData.innerText += c;\r\n }\r\n break;\r\n }\r\n case BEGIN_START_OR_END_TAG:{\r\n if(c == '/') {\r\n SAXParsedData.tagName = \"\";\r\n state = SAXParserState.IN_END_TAG;\r\n }else if(c == '?' || c == '!'){\r\n state = SAXParserState.METADATA;\r\n }else{\r\n SAXParsedData.tagName += c;\r\n state = SAXParserState.IN_START_TAG;\r\n }\r\n break;\r\n }\r\n case IN_START_TAG:{\r\n if(c == ' '){\r\n state = SAXParserState.SPACE_IN_START_TAG;\r\n }else if(c == '>'){\r\n // callback startElement event;\r\n parserHandler.startElement(SAXParsedData.tagName, SAXParsedData.attributes);\r\n SAXParsedData.clear();\r\n state = SAXParserState.CLOSE_START_TAG;\r\n }else {\r\n SAXParsedData.tagName += c;\r\n }\r\n break;\r\n }\r\n case SPACE_IN_START_TAG:{\r\n if(SAXParsedData.tagName.length() > 0){\r\n if(c != ' '){\r\n SAXParsedData.attribKey += c;\r\n state = SAXParserState.IN_ATTRIB_KEY;\r\n }\r\n }\r\n break;\r\n }\r\n case IN_ATTRIB_KEY:{\r\n if(c == '='){\r\n state = SAXParserState.IN_ATTRIB_EQUAL;\r\n }else{\r\n SAXParsedData.attribKey += c;\r\n }\r\n break;\r\n }\r\n case IN_ATTRIB_EQUAL:{\r\n if(c == '\"'){\r\n state = SAXParserState.IN_ATTRIB_VALUE;\r\n }\r\n break;\r\n }\r\n case IN_ATTRIB_VALUE:{\r\n if(c == '\"'){\r\n SAXParsedData.newAttribute();\r\n state = SAXParserState.IN_START_TAG;\r\n }else{\r\n SAXParsedData.attribValue += c;\r\n }\r\n break;\r\n }\r\n case CLOSE_START_TAG:{\r\n if(c == '<') {\r\n state = SAXParserState.BEGIN_START_OR_END_TAG;\r\n }else{\r\n SAXParsedData.innerText += c;\r\n state = SAXParserState.OUT_OF_TAG;\r\n }\r\n break;\r\n }\r\n case IN_END_TAG:{\r\n if(c == '>'){\r\n // callback endElement event\r\n parserHandler.endElement(SAXParsedData.tagName);\r\n state = SAXParserState.CLOSE_END_TAG;\r\n }else{\r\n SAXParsedData.tagName += c;\r\n }\r\n break;\r\n }\r\n case CLOSE_END_TAG:{\r\n if(c == ' '){\r\n state = SAXParserState.OUT_OF_TAG;\r\n }else if(c == '<'){\r\n SAXParsedData.tagName = \"\";\r\n state = SAXParserState.BEGIN_START_OR_END_TAG;\r\n }\r\n break;\r\n }\r\n case METADATA:{\r\n if(c == '>'){\r\n state = SAXParserState.CLOSE_END_TAG;\r\n }\r\n break;\r\n }\r\n case SYNTAX_ERROR:{\r\n try {\r\n\t\t\t\t\tthrow new Exception();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n }\r\n }\r\n\r\n }", "@Override\n\tpublic void characters(char[] ch, int start, int length)\n\t\t\tthrows SAXException {\n\t\tsuper.characters(ch, start, length);\n\t\tString data = new String(ch, start, length);\n\t\t// System.out.println(\"data is \" + data);\n\t}", "@Override\n\tpublic void characters(char[] arg0, int arg1, int arg2) throws SAXException {\n\t\t\n\t}", "public void characters(char ch[], int start, int length) throws SAXException {\r\n\t\t\tString str = new String(ch, start, length);\r\n\t\t\t\r\n\t\t\tswitch (currTag){\r\n\t\t\tcase FUNCTIONS:\r\n\t\t\t\t// do nothing\r\n\t\t\t\tbreak;\r\n\t\t\tcase FUNCTION:\r\n\t\t\t\t// do nothing\r\n\t\t\t\tbreak;\r\n\t\t\tcase TERM:\r\n\t\t\t\t// do nothing\r\n\t\t\t\tbreak;\r\n\t\t\tcase ALPHA:\r\n\t\t\t\t// do nothing\r\n\t\t\t\tbreak;\r\n\t\t\tcase COORD:\r\n\t\t\t\ttry{\r\n\t\t\t\t\tLong value = Long.parseLong(str);\r\n\t\t\t\t\tcoord = value;\r\n\t\t\t\t\tLog.log(\"\\t\\t\\t\\t\\t\"+str);\r\n\t\t\t\t\tif (coord < 0 || coord >= G[coordIndex])\r\n\t\t\t\t\t\tthrow new SAXException(\"coordinate in index \"+coordIndex+\" not in range [0,1,...,G[\"+coordIndex+\"]-1]: \"+coord);\r\n\t\t\t\t} catch (NumberFormatException nfe){\r\n\t\t\t\t\tthrow new SAXException(\"coordinate must be a number in range [0,1,...,G[\"+coordIndex+\"]-1]: \"+coord);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase RECOEFF:\r\n\t\t\t\ttry{\r\n\t\t\t\t\trecoeff = Double.parseDouble(str);\r\n\t\t\t\t\tLog.log(\"\\t\\t\\t\\t\"+str);\r\n\t\t\t\t} catch (NumberFormatException nfe){\r\n\t\t\t\t\tthrow new SAXException(\"reCoeff not a double\");\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase IMCOEFF:\r\n\t\t\t\ttry{\r\n\t\t\t\t\timcoeff = Double.parseDouble(str);\r\n\t\t\t\t\tLog.log(\"\\t\\t\\t\\t\"+str);\r\n\t\t\t\t} catch (NumberFormatException nfe){\r\n\t\t\t\t\tthrow new SAXException(\"imCoeff not a double\");\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase END:\r\n\t\t\t\tthrow new SAXException(\"XML parsing error\");\r\n\t\t\tdefault:\r\n\t\t\t\t// do nothing\r\n\t\t\t}\r\n\t\t}", "public T processData(CreatedCharacter p);", "@Override\n\tpublic void characters(char[] arg0, int arg1, int arg2) throws SAXException {\n\t\tString contents = new String(arg0,arg1,arg2).trim();\n\t\tif(contents.length()>0) {\n\t\t\tSystem.out.println(\"内容为:\"+contents);\t\n\t\t}\n\t\t\n\t}", "@Override\r\n\tpublic void characters(char[] ch, int start, int length) throws SAXException {\n\t\tsuper.characters(ch, start, length);\r\n\t\tif(bID) {\r\n\t\t\t\r\n\t\t\tid = new String(ch,start,length);\r\n\t\t\tbID = false;\r\n\t\t}\r\n\t}", "public static _charE parse(javax.xml.stream.XMLStreamReader reader)\n throws java.lang.Exception {\n _charE object = new _charE();\n\n int event;\n javax.xml.namespace.QName currentQName = null;\n java.lang.String nillableValue = null;\n java.lang.String prefix = \"\";\n java.lang.String namespaceuri = \"\";\n\n try {\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n currentQName = reader.getName();\n\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n // Skip the element and report the null value. It cannot have subelements.\n while (!reader.isEndElement())\n reader.next();\n\n return object;\n }\n\n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n\n while (!reader.isEndElement()) {\n if (reader.isStartElement()) {\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.microsoft.com/2003/10/Serialization/\",\n \"char\").equals(reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n object.set_char(null);\n reader.next();\n } else {\n object.set_char(_char.Factory.parse(reader));\n }\n } // End of if for expected property start element\n\n else {\n // 3 - A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\n \"Unexpected subelement \" +\n reader.getName());\n }\n } else {\n reader.next();\n }\n } // end of while loop\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public void characters(char[] ch, int start, int length) throws SAXException {\n if (currentDeal != null) {\n // don't forget to trim excess spaces from the ends of the string\n if (idDeal.equals(\"open\")) {\n String id = new String(ch, start, length).trim();\n currentDeal.setIddeal(id);\n } else\n if (titreDeal.equals(\"open\")) {\n String nom = new String(ch, start, length).trim();\n currentDeal.setTitre(nom);\n }\n else\n if (descDeal.equals(\"open\")) {\n String des = new String(ch, start, length).trim();\n currentDeal.setDesc(des);\n }\n else\n if (img.equals(\"open\")) {\n String image = new String(ch, start, length).trim();\n currentDeal.setImg(\"http://localhost:1234/pidv/\"+image);\n }\n }\n }", "@Override\n \tpublic void characters(final char inbuf[], final int offset, final int len)\n \t\t\tthrows SAXException {\n \t\tif (curAtom != null || !isParsing(eIsParsing.NONE)) {\n \t\t\tfinal String tmpString = new String(inbuf, offset, len);\n \t\t\tbuf += tmpString;\n \t\t}\n \t}", "private void entityInAttributeValueState() throws SAXException, IOException {\n /*\n * Attempt to consume an entity.\n */\n consumeEntity(true);\n /*\n * If nothing is returned, append a U+0026 AMPERSAND character to the\n * current attribute's value.\n * \n * Otherwise, append the returned character token to the current\n * attribute's value.\n */\n // handled in consumeEntity();\n /*\n * Finally, switch back to the attribute value state that you were in\n * when were switched into this state.\n */\n return;\n }", "@Override\r\n public void completeElementContent() {\r\n numBytes = 0;\r\n String theElementValue = this.getText();\r\n this.mySequenceFragment = theElementValue;\r\n myByteSpecifierSequence = new ArrayList<ByteSeqSpecifier>();\r\n StringBuffer allSpecifiers = new StringBuffer(theElementValue);\r\n while (allSpecifiers.length() > 0) {\r\n try {\r\n ByteSeqSpecifier bss = new ByteSeqSpecifier(allSpecifiers);\r\n myByteSpecifierSequence.add(bss);\r\n numBytes += bss.getNumBytes();\r\n } catch (Exception e) {\r\n }\r\n }\r\n\r\n }", "@Override\n\t\t\tpublic String getText(Object element) {\n\t\t\t\treturn \"test\";\n\t\t\t}", "public void cdata(char[] chars, int start, int length);", "public void characters(char[] ch, int start, int length) throws SAXException {\n\n\t}", "@Override\n public void characters(char[] ch, int start, int length) throws SAXException {\n String str = String.valueOf(ch, start, length);\n if(isAuthor){\n if(isNickname){\n author.setNickname(str);\n }else if(isFullname){\n author.setFullname(str);\n }else if(isEmail){\n author.setEmail(str);\n }else if(isAddress){\n author.setAddress(str);\n }else if(isBirthday){\n author.setBirthday(str);\n }\n }\n if(isBook){\n if(isTitle){\n book.setTitle(str);\n }else if(isNickname2){\n book.setNickname(str);\n }else if(isNxb){\n book.setNxb(str);\n }else if(isDes){\n book.setDescription(str);\n }\n }\n }", "private void processTag(String p_content)\n {\n StringBuffer tagName = new StringBuffer();\n Hashtable attributes = new Hashtable();\n boolean bEndTag;\n\n int i = eatWhitespaces(p_content, 0);\n\n bEndTag = i < p_content.length() && p_content.charAt(i) == '/';\n\n //read the tag name...\n while (i < p_content.length() &&\n !Character.isWhitespace(p_content.charAt(i)))\n {\n tagName.append(p_content.charAt(i));\n\n i++;\n }\n\n i = eatWhitespaces(p_content, i);\n\n //read the attributes...\n StringBuffer attributeName = new StringBuffer();\n StringBuffer attributeValue = new StringBuffer();\n\n while (i < p_content.length())\n {\n try\n {\n i = eatWhitespaces(p_content, i);\n\n //read the name...\n while (!Character.isWhitespace(p_content.charAt(i)) &&\n p_content.charAt(i) != '=')\n {\n attributeName.append(p_content.charAt(i));\n i++;\n }\n\n i = eatWhitespaces(p_content, i);\n if (p_content.charAt(i) == '=')\n {\n while (p_content.charAt(i) != '\"')\n {\n i++;\n }\n i++;\n while (p_content.charAt(i) != '\"')\n {\n attributeValue.append(p_content.charAt(i));\n i++;\n }\n i++;\n }\n\n attributes.put(attributeName.toString(),\n attributeValue.toString());\n\n attributeName.setLength(0);\n attributeValue.setLength(0);\n }\n catch (IndexOutOfBoundsException e)\n {\n // tough luck the TMX wasn't as well written as we thought...\n // CvdL: TODO: throw an exception!!\n }\n }\n\n if (bEndTag)\n {\n m_handler.processEndTag(tagName.substring(1),\n \"<\" + p_content + \">\");\n }\n else\n {\n m_handler.processTag(tagName.toString(), attributes,\n \"<\" + p_content + \">\");\n }\n }", "public void characters(char[] ch, int start, int length) throws SAXException {\n\t\tif (mParsedObject != null)\n\t\t\tmParsedObject.characters(ch, start, length);\n\t}", "@Override\n\t\t\tpublic String getText(Object element) {\n\t\t\t\treturn \"test5\";\n\t\t\t}", "private static String printInTagElement(Element element) {\n\t\tif (element == null) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tif (element instanceof ElementFunction) {\n\t\t\treturn ParserDelimiters.FUNCTION_DELIMITER.getValue() + element.asText();\n\t\t}\n\t\t\n\t\tif (element instanceof ElementString) {\n\t\t\treturn ParserDelimiters.STRING_DELIMITER.getValue()\n\t\t\t\t\t+ addEscapes(\n\t\t\t\t\t\t\telement.asText(),\n\t\t\t\t\t\t\tEscapableArrays.stringEscpable(),\n\t\t\t\t\t\t\tParserDelimiters.ESCAPE_DELIMITER.getValue()\n\t\t\t\t\t\t)\n\t\t\t\t\t+ ParserDelimiters.STRING_DELIMITER.getValue();\n\t\t}\n\t\t\n\t\treturn element.asText();\n\t}", "public void characters(char[] ch, int start, int length) {\n String string = new String(ch, start, length);\n SyntaxTreeNode parent = _parentStack.peek();\n\n if (string.length() == 0) return;\n\n // If this text occurs within an <xsl:text> element we append it\n // as-is to the existing text element\n if (parent instanceof Text) {\n ((Text)parent).setText(string);\n return;\n }\n\n // Ignore text nodes that occur directly under <xsl:stylesheet>\n if (parent instanceof Stylesheet) return;\n\n SyntaxTreeNode bro = parent.lastChild();\n if ((bro != null) && (bro instanceof Text)) {\n Text text = (Text)bro;\n if (!text.isTextElement()) {\n if ((length > 1) || ( ((int)ch[0]) < 0x100)) {\n text.setText(string);\n return;\n }\n }\n }\n\n // Add it as a regular text node otherwise\n parent.addElement(new Text(string));\n }", "public void characters(char[] ch, int start, int length) throws SAXException {\n contents.write(ch, start, length);//ne znam cemu sluzi ali neka ostane\n textBuffer.append(new String(ch, start, length));\n }", "public void dispatchCharactersEvents(ContentHandler ch) throws SAXException {}", "String getElement();", "public abstract char getTextQualifier();", "public void characters(char ch[], int start, int length) throws SAXException {\n\r\n\t}", "private void eatValue() {\n while (position < length) {\n switch (data.charAt(position)) {\n case '\\t': case '\\n': case '\\r': case ' ':\n tokenEnd = position;\n return;\n default:\n position++;\n break;\n }\n }\n tokenEnd = position;\n }", "public void cdata(Object parser, String data) {\n if (!empty(this.in_content)) {\r\n\t\t\t// handle self-closing tags (case: text node found, need to close element started)\r\n if (!strictEqual(Strings.strpos(strval(this.in_content.getValue(Array.count(this.in_content) - 1)), \"<\"), BOOLEAN_FALSE)) {\r\n Array.array_push(this.in_content, \">\");\r\n }\r\n\r\n Array.array_push(this.in_content, this.xml_escape(data));\r\n }\r\n }", "public void characters(char ch[], int start, int length)\n throws SAXException {\n int i = 0;\n while ( i < length ) {\n char c = ch[start + i];\n switch (c) {\n case '&':\n newContent.append(\"&amp;\");\n break;\n case '<':\n newContent.append(\"&lt;\");\n break;\n case '>':\n newContent.append(\"&gt;\");\n break;\n case '\"':\n newContent.append(\"&quot;\");\n break;\n case '\\'':\n newContent.append(\"&apos;\");\n break;\n default:\n // If we're outside 7 bit ascii encode as a character ref.\n // Not sure what the proper behavior here should be.\n if ((int) c > 127) {\n newContent.append(\"&#\" + (int) c + \";\");\n }\n else {\n newContent.append(c);\n }\n }\n\n i++;\n }\n }", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "java.lang.String getText();", "@Override\n\tpublic void visit(StringValue arg0) {\n\t\t\n\t}", "@Override\n\t\tpublic Character next() {\n\t\t\treturn elements.poll();\n\t\t}", "public void characters(char[] ch, int start, int length) throws SAXException {\n super.characters(ch, start, length);\n if(mPrefixTAG != null) {\n String data=new String(ch, start, length);\n if(TAG_THUMBNAILS_TYPE.equals(mPrefixTAG)) {\n mThumbnailsMode.appendThumbnailsType(data);\n } else if(TAG_THUMBNAILS_GROUP_ID.equals(mPrefixTAG)) {\n mThumbnailsMode.appendThumbnailsGroupId(data);\n } else if(TAG_THUMBNAILS_DENSITY.equals(mPrefixTAG)) {\n mThumbnailsMode.appendThumbnailsDensity(data);\n } else if(TAG_THUMBNAIL_ID.equals(mPrefixTAG)) {\n mThumbnailMode.appendThumbnailId(data);\n } else if(TAG_THUMBNAIL_NAME.equals(mPrefixTAG)) {\n mThumbnailMode.appendThumbnailName(data);\n } else if(TAG_THUMBNAIL_THUMB_URL.equals(mPrefixTAG)) {\n mThumbnailMode.appendThumnailUrl(data);\n } else if(TAG_THUMBNAIL_DOWNLOAD_RUL.equals(mPrefixTAG)) {\n mThumbnailMode.appendDownloadUrl(data);\n }\n }\n }", "public void characters (char ch[], int start, int length)\n throws SAXException\n {\n // no op\n }", "@Override\n\tpublic void characters(char[] ch, int start, int length) {\n\t\tif (inWord) {\n\t\t\tString w = new String(ch, start, length);\n\t\t\tif (currentElementText == null)\n\t\t\t\tcurrentElementText = w;\n\t\t\telse\n\t\t\t\tcurrentElementText += w;\n\t\t}\n\t\tsuper.characters(ch, start, length);\n\t}", "@Override\n\tpublic void characters(char ch[], int start, int len) throws SAXException {\n\t\ttry {\n\t\t\tif (!startTagIsClosed) {\n\t\t\t\twrite('>');\n\t\t\t\tstartTagIsClosed = true;\n\t\t\t}\n\t\t\twriteEsc(ch, start, len, false);\n\t\t\tsuper.characters(ch, start, len);\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}", "@Override\n public void convertCharacter(char character, StringBuilder outputTextBuilder) {\n }", "ElementText createElementText();", "@Override\n\tpublic void visit(StringValue arg0) {\n\n\t}", "public void process(WebDriver driver, WebElement element, String data) {\n\t\tActions action = new Actions(driver);\r\n\t\taction.moveToElement(element).build().perform();\r\n\t\tWebElement toolTipElement = driver.findElement(By\r\n\t\t\t\t.className(\"tooltip-inner\"));\r\n\t\tString toolTipText = toolTipElement.getText().trim();\r\n\t\tSystem.out.println(\"Tooltip message is \t\t\" + toolTipText);\r\n\t\tSystem.out.println(\"Data message is \t\t\" + data);\r\n\r\n\t\tArrayList<String> dataList = new ArrayList<String>(Arrays.asList(data\r\n\t\t\t\t.split(\"\\\\s+\")));\r\n\t\tArrayList<String> toolTipList = new ArrayList<String>(\r\n\t\t\t\tArrays.asList(toolTipText.split(\"\\\\s+\")));\r\n\r\n\t\tArrayList<String> al3 = new ArrayList<String>();\r\n\t\tfor (String temp : dataList)\r\n\t\t\tal3.add(toolTipList.contains(temp) ? \"Yes\" : \"No\");\r\n\t\tSystem.out.println(al3);\r\n\r\n\t\tif (data.trim().equals(toolTipText.trim())) {\r\n\t\t\tSystem.out.println(\"Text Macthes\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Text Not Present\");\r\n\t\t\tthrow new InputMismatchException();\r\n\t\t}\r\n\t\tSystem.out.println(\"done\");\r\n\t}", "public void processingInstruction(String instruction, String data)\r\n\t\t\tthrows SAXException {\r\n\t}", "static String getElementText(Element e) {\n if (e.getChildNodes().getLength() == 1) {\n Text elementText = (Text) e.getFirstChild();\n return elementText.getNodeValue();\n }\n else\n return \"\";\n }", "@Override\n\tpublic void characters(String text) {\n\t\t\n\t}", "private char processChar(char r11) {\n /*\n // Method dump skipped, instructions count: 152\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.adobe.xmp.impl.FixASCIIControlsReader.processChar(char):char\");\n }", "public char readChar(){\n\t\tscanner.useDelimiter(EMPTY_PATTERN);\n\t\ttry {\n\t\t\tString ch=scanner.next();\n\t\t\tassert ch.length()==1:\"In.readChar() error\";\n\t\t\tscanner.useDelimiter(WHITESPACE_PATTERN);\n\t\t\treturn ch.charAt(0);\n\t\t}catch (NoSuchElementException e){\n\t\t\tthrow new NoSuchElementException(\"noSuchElement\");\n\t\t}\n\t}", "protected void processTextElement(XMLTag elementTag)\n throws SAXException\n {\n\tif (elementTag == XMLTag.LABEL)\n\t {\n\t // one line, no formatting, applies to either\n\t // control or menu item.\n\t if (currentControl != null)\n\t {\n\t\tString label = (String) xlatedText.get(0);\n\t\tcurrentControl.setLabelText(label);\n\t\tString labelKey = (String) textKey.get(0);\n\t\tcurrentControl.setLabelKey(labelKey);\n\t\t}\n\t }\n\telse if (elementTag == XMLTag.TITLE)\n\t {\n\t if (currentPanel != null)\n\t {\n\t\tString title = (String) xlatedText.get(0);\n\t\tcurrentPanel.setTitle(title);\n\t\t} \n\t }\n\telse if (elementTag == XMLTag.HELP)\n\t {\n\t // Need to concatenate all strings and format\n\t // as HTML - will be embedded in another HTML\n\t // document, so we can leave off the <HTML> and <BODY>\n\t StringBuffer helpString = new StringBuffer();\n\t String[] keys = new String[textKey.size()];\n boolean bInList = false;\n\t for (int i = 0; i < xlatedText.size(); i++)\n\t {\n\t\tString temp = replaceAngleBrackets((String) xlatedText.get(i));\n\t\tXMLTag tTag = (XMLTag) textTag.get(i);\n\t\tif (tTag == XMLTag.PARAGRAPH)\n\t\t {\n if (bInList)\n\t\t {\n\t\t helpString.append(\"</dl>\\n\"); \n bInList = false;\n\t\t\t}\n\t\t if (i == 0)\n\t\t {\n\t\t\t //~~\t\thelpString.append(\"<P>\");\n\t\t\t}\n\t\t else\n\t\t {\n\t\t helpString.append(\"<p>\");\n\t\t\t}\n helpString.append(temp);\n\t\t }\n\t\telse if (tTag == XMLTag.LISTITEM)\n\t\t {\n if (!bInList)\n\t\t {\n\t\t helpString.append(\"<dl>\\n\");\n\t\t\tbInList = true;\n\t\t\t}\n\t\t if (i > 0)\n\t\t helpString.append(\"\\n\");\n\t\t helpString.append(\"<dd>\" + temp + \"</dd>\\n\");\n\t\t }\n\t\telse\n\t\t {\n\t\t helpString.append(temp);\n\t\t }\n\t\tkeys[i] = (String) textKey.get(i);\n\t\t}\n if (bInList)\n\t {\n helpString.append(\"</dl>\\n\");\n\t\t}\n\t helpString.append(\"</p></FONT>\\n\");\n\t // could apply to either a control or a menu item.\n\t if (currentControl != null)\n\t {\n\t\tcurrentControl.setHelpString(helpString.toString());\n\t\tcurrentControl.setHelpKeys(keys);\n\t\t}\n\t }\n\telse if (elementTag == XMLTag.CHOICES)\n\t {\n\t // only relevant if the current control is a combo, radio,\n\t // or checkbutton\n\t if (currentControl.isChoiceControl())\n\t {\n\t\tString[] keys = new String[textKey.size()];\n\t\tString[] choices = new String[xlatedText.size()];\n\t\tfor (int i = 0; i < xlatedText.size(); i++)\n\t\t {\n\t\t choices[i] = (String) xlatedText.get(i);\n\t\t keys[i] = (String) textKey.get(i);\n\t\t }\n\t\tcurrentControl.setChoiceStrings(choices);\n\t\tcurrentControl.setChoiceKeys(keys);\n\t\t}\n\t }\n\telse if (elementTag == XMLTag.TOOLTIP)\n\t {\n\t // just ignore \n\t // only relevant to menu items\n\n\t }\n\telse if (elementTag == XMLTag.DEFAULT)\n\t {\n if (currentControl != null)\n\t {\n\t\tString text = (String) xlatedText.get(0);\n\t\tcurrentControl.setDefaultValue(text);\n\t\tString key = (String)textKey.get(0);\n\t\tcurrentControl.setDefaultKey(key);\n\t }\n\t }\n\t// get rid of text and tags - we are done with them\n\txlatedText.clear();\n\txlatedText = null;\n\ttextTag.clear();\n\ttextTag = null;\n\t}", "@Test\n\tpublic void testSpecialChars() {\n\t\tString ff = XStreamUtils.serialiseToXml(\"Form feed: \\f\");\n\t\tSystem.out.println(ff);\n\t\tObject s = XStreamUtils.serialiseFromXml(\"<S>&#xc;</S>\");\n\t\tSystem.out.println(ff);\n\t}", "public void extract() throws Exception{\n //because when this is called, Scanner had already determined the first character\n char currentChar = getCurrentChar();\n\n do {\n this.text += Character.toString(currentChar);\n currentChar = getNextChar();\n } while (Character.isLetterOrDigit(currentChar) || currentChar == '_');\n\n this.value = this.text;\n\n //find token type. For words, the type is either IDENTIFIER, or the specific reserved word\n\n if (TokenType.getReservedWords().contains(this.text.toLowerCase())) {\n this.type = TokenType.valueOf(this.text.toUpperCase());\n }\n else {\n this.type = TokenType.IDENTIFIER;\n }\n }", "@Override\n\tpublic void characters(char[] ch, int start, int length)\n\t\t\tthrows SAXException {\n\t\tsuper.characters(ch, start, length);\n\t\tsb.append(ch, start, length);\n\t\tString s = sb.toString();\n\t\tif (tag.equals(\"id\") && isFeed) {\n\t\t\tcommentsInfo.setId(Integer.parseInt(s));\n\t\t} else if (tag.equals(\"title\") && isFeed) {\n\t\t\tcommentsInfo.setTitle(s);\n\t\t} else if (tag.equals(\"published\") && isFeed) {\n\t\t\tcommentsInfo.setPublished(s);\n\t\t} else if (tag.equals(\"updated\") && isFeed) {\n\t\t\tcommentsInfo.setUpdated(s);\n\t\t} else if (tag.equals(\"name\") && isFeed) {\n\t\t\tcommentsInfo.setAuthorName(s);\n\t\t} else if (tag.equals(\"uri\") && isFeed) {\n\t\t\tcommentsInfo.setAuthorUri(s);\n\t\t} else if (tag.equals(\"content\") && isFeed) {\n\t\t\tcommentsInfo.setContent(s);\n\t\t}\n\n\t}", "@Override\n\t\tpublic void processingInstruction(String target, String data)\n\t\t\t\tthrows SAXException {\n\t\t\t\n\t\t}", "@Override\n\tpublic void characters(char ch[], int start, int length) {\n\t\tif (this.in_documentnametag) {\n\t\t\tkmlDocument.setName(new String(ch, start, length));\n//\t\t\tLog.e(tag, \"in_documentnametag=[\" + new String(ch, start, length));\n\t\t} else if (this.in_foldernametag) {\n\t\t\tfolder.setName(new String(ch, start, length));\n//\t\t\tLog.e(tag, \"in_foldernametag=[\" + new String(ch, start, length));\n\t\t} else if (this.in_placemarknametag) {\n\t\t\tdpm.setName(new String(ch, start, length));\n//\t\t\tLog.e(tag, \"in_placemarknametag=[\" + new String(ch, start, length));\n\t\t} else if (this.in_addresstag) {\n\t\t\tdpm.parkingAddress = new String(ch, start, length);\n\t\t\tdpm.isParking = true;\n//\t\t\tLog.e(tag, \"in_addresstag=[\" + new String(ch, start, length));\n\t\t} else if (this.in_descriptiontag) {\n\t\t\tString s = new String(ch, start, length);\n//\t\t\tLog.e(tag, \"************* original description [\" + s + \"]*************\");\n\t\t\tif (null != s && s.length() > 2) {\n\t\t\t\tif (s.contains(\",\")) {\n\t\t\t\t\tparseDescription(s, dpm);\n\t\t\t\t\tdpm.setDescription(s);\n\t\t\t\t} else {\n//\t\t\t\t\tLog.e(tag, \"no ',' found!!!!!\");\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.in_coordinatestag) {\n\t\t\ttmpStringList.add(new String(ch, start, length));\n\t\t} else {\n\t\t}\n\t}", "public String getTextValue (Node node);", "char getEChar();", "@Override\n\t\tpublic void characters(char[] ch, int start, int length) throws SAXException {\n\t\t\tString username = new String(ch, start, length);\n\t\t\t\n\t\t\tif(user)\n\t\t\t\tif(table){\n\t\t\t\t\ttableName = username;\n\t\t\t\t\ttable = false;\n\t\t\t\t}\n\t\t\t\telse if(fieldName){\n\t\t\t\t\tnameOfField = username;\n\t\t\t\t\tfieldName = false;\n\t\t\t\t}\n\t\t\t\telse if(fieldType){\n\t\t\t\t\tnameOfFieldType = username;\n\t\t\t\t\tfieldType = false;\n\t\t\t\t}\n\t\t\t\telse if(size){\n\t\t\t\t\tvalue = username;\n\t\t\t\t\tsize = false;\n\t\t\t\t}\n\t\t}", "public void _pcdata(Object value) {\n/* 324 */ addChild(new Pcdata(this.document, this.startTag, value));\n/* */ }", "@Override\n\tpublic void characters(char[] ch, int start, int length)\n\t\t\tthrows SAXException {\n\t\tsuper.characters(ch, start, length);\n\t}", "void visit(CDATA node);", "String getText();", "String getText();", "String getText();", "String getText();", "String getText();", "String getText();", "String getText();", "public char getContent() {\n return content;\n }", "public static Text appendText(final Element element, final char textCharacter) throws DOMException {\n\t\treturn appendText(element, String.valueOf(textCharacter)); //convert the character to a string and append it to the element\n\t}", "@Override\n public void accept(CharSequence charSequence) {\n }", "String getTextValue();", "@Override\n public void characters(\n char[] chars, int start, int length\n ) throws SAXException {\n \n String s = new String(chars, start, length).trim();\n \n if (s.length() > 0) { \n buffer.append(s); \n }\n }", "public void characters(char[] ch, int start, int length) throws SAXException \n\t{\n\t\tfor (int i = start; i < start + length; i++) \n\t\t{\n\t\t\tif (ch[i] == '\\n' || ch[i]=='?')\n\t\t\t\tbuf.append(' ');\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(ch[i]=='&')\n\t\t\t\t\tbuf.append(\" and \");\n\t\t\t\telse\n\t\t\t\t\tbuf.append(ch[i]);\n\t\t\t} \n\t\t}\n\t}", "void onCharacter(Terminal terminal, char data);", "@Override\r\n\tpublic String nextElement() {\n\t\treturn it.next();\r\n\t}", "@Override\n\tpublic void processingInstruction(String target, String data)\n\t\t\tthrows SAXException {\n\t\t\n\t}", "@Override\n\tpublic void processingInstruction(String target, String data)\n\t\t\tthrows SAXException {\n\t\t\n\t}", "@Override\n\tpublic void cdata() {\n\t\t\n\t}", "public void characters(String arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}" ]
[ "0.6825627", "0.61617094", "0.6156722", "0.6059053", "0.5969759", "0.59433246", "0.59324294", "0.59052", "0.58634454", "0.5861719", "0.5812559", "0.58121186", "0.577372", "0.57697654", "0.57243544", "0.5682975", "0.5672275", "0.56372494", "0.5594426", "0.5582618", "0.5578109", "0.55748075", "0.55573905", "0.55557156", "0.55200917", "0.551382", "0.550529", "0.54875237", "0.5479955", "0.5477767", "0.5459429", "0.5441583", "0.54404885", "0.5423841", "0.54118377", "0.5400136", "0.5385727", "0.5383237", "0.53769016", "0.5371517", "0.53682953", "0.5355838", "0.5353427", "0.5322487", "0.53113216", "0.5307588", "0.5304796", "0.53008324", "0.53008324", "0.53008324", "0.53008324", "0.53008324", "0.53008324", "0.53008324", "0.53008324", "0.52957875", "0.5295206", "0.5286187", "0.5272357", "0.5265301", "0.526182", "0.5251092", "0.52500916", "0.52382123", "0.52280676", "0.52189636", "0.5210741", "0.52065015", "0.5203763", "0.5197766", "0.5188346", "0.51849186", "0.5184789", "0.518369", "0.51713836", "0.5170064", "0.51591295", "0.5156247", "0.5150369", "0.51374686", "0.51250124", "0.5120267", "0.51112163", "0.51112163", "0.51112163", "0.51112163", "0.51112163", "0.51112163", "0.51112163", "0.51088065", "0.5104934", "0.5103891", "0.5102112", "0.50955814", "0.50911075", "0.5086467", "0.50636923", "0.5051792", "0.5051792", "0.5047065", "0.5040056" ]
0.0
-1
connect to excel file
public static void main(String[] args) throws Exception { File f=new File("w2smskwd.xls"); // open excel file for reading Workbook rwb=Workbook.getWorkbook(f); Sheet rsh1=rwb.getSheet(0); // 0 for sheet1(tests) int nour1=rsh1.getRows(); int nouc1=rsh1.getColumns(); Sheet rsh2=rwb.getSheet(1); // 1 for sheet2(steps) int nour2=rsh2.getRows(); int nouc2=rsh2.getColumns(); // open same excel for result writing WritableWorkbook wwb=Workbook.createWorkbook(f,rwb); WritableSheet wsh1=wwb.getSheet(0); //0 means sheet1 WritableSheet wsh2=wwb.getSheet(1); //1 means sheet2 //set font style,color and cell alignment heading WritableFont wf=new WritableFont(WritableFont.TIMES,11,WritableFont.BOLD); wf.setColour(Colour.BLUE); WritableCellFormat wcf=new WritableCellFormat(wf); wcf.setAlignment(Alignment.JUSTIFY); wcf.setAlignment(Alignment.CENTRE); //set font style,color and cell alignment for Test PASSED WritableFont wf1=new WritableFont(WritableFont.TIMES,11); wf1.setColour(Colour.GREEN); WritableCellFormat wcf1=new WritableCellFormat(wf1); wcf1.setAlignment(Alignment.JUSTIFY); wcf1.setAlignment(Alignment.CENTRE); //set font style,color and cell alignment for Test FAILED WritableFont wf2=new WritableFont(WritableFont.TIMES,11); wf2.setColour(Colour.RED); WritableCellFormat wcf2=new WritableCellFormat(wf2); wcf2.setAlignment(Alignment.JUSTIFY); wcf2.setAlignment(Alignment.CENTRE); //take results heading as date and time format SimpleDateFormat sf=new SimpleDateFormat("dd-MM-yyyy-hh-mm-ss"); Date dt=new Date(); String cname=sf.format(dt); // set name to result column in sheet1 Label l1=new Label(nouc1,0,cname,wcf); wsh1.addCell(l1); // set name to result column in sheet2 Label l2=new Label(nouc2,0,cname,wcf); wsh2.addCell(l2); // create objects to methods class W2smsmethods ms=new W2smsmethods(); // collect methods info using methods class object Method m[]=ms.getClass().getMethods(); // keyword driven try { //calling methods one after another //1st row (index=0) have names of columns in sheet1 for(int i=1;i<nour1;i++) // from 2nd row(index=1) { int flag=0; // get tid and mode from sheet1 String tid=rsh1.getCell(0, i).getContents(); String mode=rsh1.getCell(2, i).getContents(); if(mode.equalsIgnoreCase("yes")) { //1st row (index=0)have names of columns of sheet2 for(int j=1;j<nour2;j++) // from 2nd row(index=1) { String sid=rsh2.getCell(0, j).getContents(); if(tid.equalsIgnoreCase(sid)) { //take step details from sheet2 String mn=rsh2.getCell(2, j).getContents(); String e=rsh2.getCell(3, j).getContents(); String d=rsh2.getCell(4, j).getContents(); String c=rsh2.getCell(5, j).getContents(); System.out.println(mn+" "+e+" "+d+" "+c); for(int k=0;k<m.length;k++) { if(m[k].getName().equals(mn)) { String r=(String) m[k].invoke(ms, e,d,c); Label lb=new Label(nouc2,j,r,wcf1); wsh2.addCell(lb); if(r.equalsIgnoreCase("unknown browser")) { wwb.write(); wwb.close(); rwb.close(); System.exit(0); //force stop run } if(r.contains("Failed") || r.contains("failed") || r.contains("interrupted") || r.contains("Interrupted")) { flag=1; } break; //terminate from loop for k } } } else { break; //terminate from loop if tid not equal to sid } } if(flag==0) { Label l=new Label(nouc1,i,"passed",wcf1); wsh1.addCell(l); } else { Label l=new Label(nouc1,i,"failed",wcf2); wsh1.addCell(l); } } } } catch(Exception ex) { System.out.println(ex.getMessage()); } //to autofit width of excel column size(sheet1) CellView cv=rsh1.getColumnView(nouc1); cv.setAutosize(true); wsh1.setColumnView(nouc1, cv); //to autofit width of excel column size(sheet2) CellView cv1=rsh2.getColumnView(nouc2); cv.setAutosize(true); wsh2.setColumnView(nouc2, cv1); //save and close excel wwb.write(); wwb.close(); rwb.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Excel getExcelInst();", "@VTID(13)\n com.exceljava.com4j.excel.WorkbookConnection getWorkbookConnection();", "public static void main(String[] args) throws IOException {\nFileInputStream f=new FileInputStream(\"D:\\\\AccuSelenium\\\\Ram\\\\TEST\\\\TestData\\\\LoginData.xls\");\nHSSFWorkbook w=new HSSFWorkbook(f);\nHSSFSheet s=w.getSheet(\"sheet1\");\nSystem.out.println(s.getRow(1));\n}", "@Test\r\n public void excel() throws EncryptedDocumentException, InvalidFormatException, FileNotFoundException, IOException {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"E:\\\\Selenium\\\\Newfolder\\\\chromedriver.exe\");\r\n\t\tdriver = new ChromeDriver();\r\n\t\t\r\n //get the excel sheet file location \r\n String filepath=\"E:\\\\Selenium\\\\SampleApplications\\\\ClearTripAppln\\\\DataSheet.xlsx\";\r\n\t \t\t\t\tWorkbook wb= WorkbookFactory.create(new FileInputStream(new File(filepath)));\r\n //get the sheet which needs read operation\r\n\t\t Sheet sh = wb.getSheet(\"sheet1\");\r\n\t\t \r\n\t String url =sh.getRow(0).getCell(1).getStringCellValue();\r\n\t System.out.println(url);\r\n\t driver.get(url);\r\n\t \r\n\t \t\t// Maximizing the window\r\n\t \t\tdriver.manage().window().maximize();\r\n\t \t\t\r\n\r\n\r\n\t\t }", "public static XSSFSheet setExcelFile() throws Exception {\n\n XSSFSheet ExcelWSheet;\n XSSFWorkbook ExcelWBook;\n XSSFRow Row;\n String Path;\n String SheetName;\n\n try {\n // Open the Excel file\n Path = fetchMyProperties(\"spreadsheet_path\");\n SheetName= fetchMyProperties(\"sheet_name\");\n FileInputStream ExcelFile = new FileInputStream(Path);\n\n // Access the required test data sheet\n ExcelWBook = new XSSFWorkbook(ExcelFile);\n ExcelWSheet = ExcelWBook.getSheet(SheetName);\n\n } catch (Exception e){\n throw (e);\n }\n return ExcelWSheet;\n }", "void readExcel(File existedFile) throws Exception;", "@Override\r\n public void execute(Workbook workbook) {\n InputStream fileStream = this.getResourceStream(\"xlsx/Employee absence schedule.xlsx\");\r\n workbook.open(fileStream);\r\n }", "public void intializeExcel(String path) throws Exception{\n//\t\topen a input stream\n\t\t fis = new FileInputStream(path);\n\n\t\t//create a workbook object\n\t\t wb = new XSSFWorkbook(fis);\n\t\t\n\t}", "private Connection connect(String dataFileName) {\r\n\t\ttry {\r\n\t\t\tClass.forName(\"sun.jdbc.odbc.JdbcOdbcDriver\");\r\n\t\t\t// using DSN-less connection\r\n\t\t\tconnection = DriverManager\r\n\t\t\t\t\t.getConnection(\"jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=\" + dataFileName);\r\n\t\t} catch (Exception exp) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn connection;\r\n\t}", "static void demo2() throws EncryptedDocumentException, InvalidFormatException, IOException {\n\n // Use a file\n Workbook wb = WorkbookFactory.create(new File(\"MyExcel.xls\"));\n\n // Use an InputStream, needs more memory\n // Workbook wb = WorkbookFactory.create(new FileInputStream(\"MyExcel.xlsx\"));\n\n Sheet sheet1 = wb.getSheetAt(0);\n for (Row row : sheet1) {\n for (Cell cell : row) {\n CellReference cellRef = new CellReference(row.getRowNum(), cell.getColumnIndex());\n System.out.print(cellRef.formatAsString());\n System.out.print(\" - \");\n\n switch (cell.getCellType()) {\n case Cell.CELL_TYPE_STRING:\n System.out.println(cell.getRichStringCellValue().getString());\n break;\n case Cell.CELL_TYPE_NUMERIC:\n if (DateUtil.isCellDateFormatted(cell)) {\n System.out.println(cell.getDateCellValue());\n } else {\n System.out.println(cell.getNumericCellValue());\n }\n break;\n case Cell.CELL_TYPE_BOOLEAN:\n System.out.println(cell.getBooleanCellValue());\n break;\n case Cell.CELL_TYPE_FORMULA:\n System.out.println(cell.getCellFormula());\n break;\n default:\n System.out.println();\n }\n }\n }\n\n }", "@DataProvider(name =\"excel-data\")\n \tpublic Object[][] excelDP() throws IOException{\n \tObject[][] arrObj = getExcelData(\"C:\\\\Users\\\\kalpe\\\\eclipse-workspace\\\\DataProvider\\\\DataFiles\\\\loginData.xlsx\",\"Sheet1\");\n \treturn arrObj;\n \t}", "@Override\r\n\tpublic void onStart(ITestContext classname) {\n\t\t\r\n\t\tReadExcel.connect_To_Excel();\r\n\t\t\r\n\t}", "public String[][] openExcelFile(String inputFilePath);", "public void Ejecutar() throws IOException {\n\t\t// An excel file name. You can create a file name with a full\n\t\t// path information.\n\t\t//\n\t\tString filename = \"excel/bd.xls\";\n\t\t//\n\t\t// Create an ArrayList to store the data read from excel sheet.\n\t\t//\n\t\tList sheetData = new ArrayList();\n\t\tFileInputStream fis = null;\n\t\ttry {\n\t\t\t//\n\t\t\t// Create a FileInputStream that will be use to read the\n\t\t\t// excel file.\n\t\t\t//\n\t\t\tfis = new FileInputStream(filename);\n\t\t\t//\n\t\t\t// Create an excel workbook from the file system.\n\t\t\t//\n\t\t\tHSSFWorkbook workbook = new HSSFWorkbook(fis);\n\t\t\t//\n\t\t\t// Get the first sheet on the workbook.\n\t\t\t//\n\t\t\tHSSFSheet sheet = workbook.getSheetAt(0);\n\t\t\t//\n\t\t\t// When we have a sheet object in hand we can iterator on\n\t\t\t// each sheet's rows and on each row's cells. We store the\n\t\t\t// data read on an ArrayList so that we can printed the\n\t\t\t// content of the excel to the console.\n\t\t\t//\n\t\t\tIterator rows = sheet.rowIterator();\n\t\t\twhile (rows.hasNext()) {\n\t\t\t\tHSSFRow row = (HSSFRow) rows.next();\n\n\t\t\t\tIterator cells = row.cellIterator();\n\t\t\t\tList data = new ArrayList();\n\t\t\t\twhile (cells.hasNext()) {\n\t\t\t\t\tHSSFCell cell = (HSSFCell) cells.next();\n\t\t\t\t\t// System.out.println(\"Añadiendo Celda: \" + cell.toString());\n\t\t\t\t\tdata.add(cell);\n\t\t\t\t}\n\t\t\t\tsheetData.add(data);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (fis != null) {\n\t\t\t\tfis.close();\n\t\t\t}\n\t\t}\n\t\tshowExelData(sheetData);\n\n\t\t// impresion de matriz\n\t\t/*\n\t\t * for (int filas = 0; filas <fila; filas++) { for (int columna = 0; columna <\n\t\t * 4; columna++) { if(columna<3) {\n\t\t * \n\t\t * \n\t\t * }else { System.out.println(\"\"); }\n\t\t * \n\t\t * } }\n\t\t */\n\n\t\tint matriz2[][] = new int[fila][3];\n\n\t\tint numeroDeDatosMatriz = 0;\n\n\t\tfor (int filas = 0; filas < fila; filas++) {\n\t\t\tint validar = 0;\n\n\t\t\tfor (int recorrido = 0; recorrido < numeroDeDatosMatriz; recorrido++) {\n\t\t\t\tif (validar == 1) {\n\t\t\t\t\t// System.out.println(\"si encontro\");\n\t\t\t\t\t// break;\n\t\t\t\t}\n\n\t\t\t\t// System.out.print(matriz[filas][0]+\"|\");\n\t\t\t\t// System.out.println(matriz2[recorrido][0]+\"|\");\n\n\t\t\t\tif (matriz[filas][0] == matriz2[recorrido][0]) {\n\t\t\t\t\tmatriz2[recorrido][1] = matriz2[recorrido][1] + matriz[filas][1];\n\t\t\t\t\tmatriz2[recorrido][2] = matriz2[recorrido][2] + matriz[filas][2];\n\t\t\t\t\tvalidar = 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (validar == 0) {\n\t\t\t\tmatriz2[numeroDeDatosMatriz][0] = matriz[filas][0];\n\t\t\t\tmatriz2[numeroDeDatosMatriz][1] = matriz[filas][1];\n\t\t\t\tmatriz2[numeroDeDatosMatriz][2] = matriz[filas][2];\n\t\t\t\tnumeroDeDatosMatriz++;\n\n\t\t\t}\n\n\t\t\tif (validar == 1) {\n\t\t\t\tvalidar = 0;\n\t\t\t}\n\n\t\t}\n\t\t// impresion del contro general\n\t\t/*\n\t\t * \n\t\t * for (int filas = 0; filas <fila; filas++) { for (int columna = 0; columna <\n\t\t * 4; columna++) { if(columna<3) {\n\t\t * \n\t\t * System.out.print(matriz2[filas][columna]+\"|\"); }else {\n\t\t * System.out.println(\"\"); }\n\t\t * \n\t\t * } }\n\t\t */\n\t\t//////////// Pedir numero\n\t\t\n\t\tint numero = Integer.parseInt( JOptionPane.showInputDialog(\n\t\t\t null,\"¿Qué numeros con importe arriba de ?\",\n\t\t\t \"Petición \",\n\t\t\t JOptionPane.QUESTION_MESSAGE) );\n\t\t\n\t\t\n\t\t////////\n\t\tint matrizresultados[][] = new int[fila][2];\n\n\t\t// filtro primer lugar\n\n\t\tint numeroDeresultadosPrimerLugar = 0;\n\n\t\tfor (int filas = 0; filas < fila; filas++) {\n\t\t\tif (matriz2[filas][1] > numero) {\n\t\t\t\tmatrizresultados[numeroDeresultadosPrimerLugar][0] = matriz2[filas][0];\n\t\t\t\tmatrizresultados[numeroDeresultadosPrimerLugar][1] = matriz2[filas][1];\n\t\t\t\tnumeroDeresultadosPrimerLugar++;\n\t\t\t}\n\t\t}\n\n\t\tfor (int filas = 0; filas < numeroDeresultadosPrimerLugar; filas++) {\n\t\t\t// System.out.print(matrizresultados[filas][0]+\"|\");\n\t\t\t// System.out.println(matrizresultados[filas][1]);\n\t\t}\n\n\t\t//\n\n\t\t////////\n\n\t\t// System.out.println(\"///////////////////////////////////////////////\");\n\t\tint matrizresultadosSegundo[][] = new int[fila][2];\n\n\t\t// filtro primer lugar\n\n\t\tint numeroDeresultadosSegundoLugar = 0;\n\n\t\tfor (int filas = 0; filas < fila; filas++) {\n\t\t\tif (matriz2[filas][2] > numero) {\n\t\t\t\tmatrizresultadosSegundo[numeroDeresultadosSegundoLugar][0] = matriz2[filas][0];\n\t\t\t\tmatrizresultadosSegundo[numeroDeresultadosSegundoLugar][1] = matriz2[filas][2];\n\t\t\t\tnumeroDeresultadosSegundoLugar++;\n\t\t\t}\n\t\t}\n\n\t\tfor (int filas = 0; filas < numeroDeresultadosSegundoLugar; filas++) {\n\t\t\t// System.out.print(matrizresultadosSegundo[filas][0]+\"|\");\n\t\t\t// System.out.println(matrizresultadosSegundo[filas][1]);\n\t\t}\n\n\t\t//\n\n\t\tString textoArchivo = \"\";\n\n\t\tint numeroDeFilasCrearExcel = 0;\n\n\t\tfor (int lugar = 0; lugar < 2; lugar++) {\n\t\t\tif (lugar == 0) {\n\t\t\t\ttextoArchivo = \"Primeros lugares\";\n\t\t\t\tnumeroDeFilasCrearExcel = numeroDeresultadosPrimerLugar;\n\t\t\t} else {\n\t\t\t\ttextoArchivo = \"Segundos lugares\";\n\t\t\t\tnumeroDeFilasCrearExcel = numeroDeresultadosSegundoLugar;\n\t\t\t}\n\n\t\t\t/* La ruta donde se creará el archivo */\n\t\t\tString rutaArchivo = System.getProperty(\"user.home\") + \"/\" + textoArchivo + \".xls\";\n\t\t\t/* Se crea el objeto de tipo File con la ruta del archivo */\n\t\t\tFile archivoXLS = new File(rutaArchivo);\n\t\t\t/* Si el archivo existe se elimina */\n\t\t\tif (archivoXLS.exists())\n\t\t\t\tarchivoXLS.delete();\n\t\t\t/* Se crea el archivo */\n\t\t\tarchivoXLS.createNewFile();\n\n\t\t\t/* Se crea el libro de excel usando el objeto de tipo Workbook */\n\t\t\tWorkbook libro = new HSSFWorkbook();\n\t\t\t/* Se inicializa el flujo de datos con el archivo xls */\n\t\t\tFileOutputStream archivo = new FileOutputStream(archivoXLS);\n\n\t\t\t/*\n\t\t\t * Utilizamos la clase Sheet para crear una nueva hoja de trabajo dentro del\n\t\t\t * libro que creamos anteriormente\n\t\t\t */\n\t\t\tSheet hoja = libro.createSheet(textoArchivo+\" arriba de \" + numero);\n\n\t\t\t/* Hacemos un ciclo para inicializar los valores de 10 filas de celdas */\n\t\t\tfor (int f = 0; f < numeroDeFilasCrearExcel + 1; f++) {\n\t\t\t\t/* La clase Row nos permitirá crear las filas */\n\t\t\t\tRow fila = hoja.createRow(f);\n\n\t\t\t\t/* Cada fila tendrá 5 celdas de datos */\n\t\t\t\tfor (int c = 0; c < 2; c++) {\n\t\t\t\t\t/* Creamos la celda a partir de la fila actual */\n\t\t\t\t\tCell celda = fila.createCell(c);\n\n\t\t\t\t\t/* Si la fila es la número 0, estableceremos los encabezados */\n\t\t\t\t\tif (f == 0) {\n\t\t\t\t\t\tif (c == 0) {\n\t\t\t\t\t\t\tcelda.setCellValue(\"Numero Ganador\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcelda.setCellValue(textoArchivo+\" arriba de \" + numero);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tif (lugar == 0) {\n\t\t\t\t\t\t\t/* Si no es la primera fila establecemos un valor */\n\t\t\t\t\t\t\tif(c==0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(matrizresultados[f - 1][c]<100) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcelda.setCellValue(\"0\" + matrizresultados[f - 1][c]);\n\t\t\t\t\t\t\t\t}else \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcelda.setCellValue(\"\" + matrizresultados[f - 1][c]);\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{\n\t\t\t\t\t\t\t\tcelda.setCellValue(\"\" + matrizresultados[f - 1][c]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif(c==0) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(matrizresultadosSegundo[f - 1][c]<100) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcelda.setCellValue(\"0\" + matrizresultadosSegundo[f - 1][c]);\n\t\t\t\t\t\t\t\t}else \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcelda.setCellValue(\"\" + matrizresultadosSegundo[f - 1][c]);\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{\n\t\t\t\t\t\t\t\tcelda.setCellValue(\"\" + matrizresultadosSegundo[f - 1][c]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Escribimos en el libro */\n\t\t\tlibro.write(archivo);\n\t\t\t/* Cerramos el flujo de datos */\n\t\t\tarchivo.close();\n\t\t\t/* Y abrimos el archivo con la clase Desktop */\n\t\t\tDesktop.getDesktop().open(archivoXLS);\n\n\t\t}\n\n\t}", "public interface Excel {\n public void loadExcel(String filePath);\n\n public String getCellValue(Cell cell);\n\n public void init();\n}", "@Test\r\n\tpublic void startup(){\r\n\tExcelutil e=new Excelutil(\"E://EmpData.xlsx\", \"Sheet1\");\r\n\t\r\n\tString strdata=e.stringdata(1, 1);\r\n\tSystem.out.println(strdata);\r\n\tdouble numdata1=e.numdata(1, 0);\r\n\tSystem.out.println(numdata1);\r\n\te.rowcount();\r\n\te.colcount();\r\n}", "public static void openExcel(String filePath, String sheetName) {\n\t\t\n\t\ttry {\n\t\t\tFileInputStream fis=new FileInputStream(filePath);\n\t\t book=new XSSFWorkbook(fis);\n\t\t sheet=book.getSheet(sheetName);\n\t\t} catch (FileNotFoundException e) {\n\t\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\t\n\t}", "public static void read(String path) throws IOException {\r\n File inputWorkbook = new File(path);\r\n Workbook w;\r\n WorkbookSettings ws=new WorkbookSettings();\r\n ws.setEncoding(\"Cp1252\");\t\t\t// encoder so that special characters remains the same\r\n Cell c1,c2,c3,c4,c5;\r\n int s1;\r\n String s2,s3,s4,s5;\r\n try {\r\n w = Workbook.getWorkbook(inputWorkbook,ws);\r\n // Get the first sheet\r\n Sheet sheet = w.getSheet(0);\r\n \r\n for(int i=0;i<sheet.getRows();i++){\t\t\t// iteration contiues untill the last row\r\n \tc1=sheet.getCell(0,i);\t\t\t\t\t// fetch data from cell of 0th column and ith row\r\n \ts1=Integer.parseInt(c1.getContents());\r\n \tc2=sheet.getCell(1, i);\r\n \ts2=c2.getContents();\r\n \tc3=sheet.getCell(2, i);\r\n \ts3=c3.getContents();\r\n \tc4=sheet.getCell(3, i);\r\n \ts4=c4.getContents();\r\n \tc5=sheet.getCell(4, i);\r\n \ts5=c5.getContents();\r\n // \tSystem.out.println(s1+\"\\t\"+s2+\"\\t\"+s3+\"\\t\"+s4+\"\\t\"+s5);\r\n \tOperations.add(s1, s2, s3, s4, s5);\r\n \t\r\n }\r\n JOptionPane.showMessageDialog(null,\"Inserted Successfully\");\r\n\r\n } catch (Exception e) {\r\n \tJOptionPane.showMessageDialog(null,\"Error :: \\n\"+e.getMessage());\r\n }\r\n }", "public void setExcelFile(String excelfilepath,String Sheetname) throws IOException {\n\t\t File file=new File(excelfilepath);\n\t\t FileInputStream inputstream=new FileInputStream(file);\n\t\t workbook =new XSSFWorkbook(inputstream);\n\t\t sheet =workbook.getSheet(Sheetname);\n\n\t}", "public static void main(String[] args) throws IOException {\n\t\t\r\n\t\tFile fw = new File(\"C:\\\\Files\\\\work.xlsx\");//create file object\r\n\t\t//FileInputStream f = new FileInputStream(fw);//to create connection first create reader.\r\n\t\tXSSFWorkbook wb = new XSSFWorkbook(new FileInputStream(fw));//to go workbook we are using this class\r\n\t\t//XSSFSheet sht = new XSSFSheet();//to go to sheet\r\n\t\t//below line is for getting that sheet\r\n\t\tXSSFSheet sht1 = wb.getSheet(\"Test\");\r\n\t\tXSSFRow row = sht1.getRow(0);\r\nint a = row.getLastCellNum();\r\n\tSystem.out.println(a);\r\n\tfor(int i=0; i<=a ; i++) {\r\n\t\t\r\n\t\tint s = row.getFirstCellNum();\r\n\t\tSystem.out.println(s);\r\n\t\t\r\n\t\t}\r\n\t}", "public void main(String[] args) throws Exception {\n\t\t\r\n\t\t\r\n File src= new File(\"C:/data.xls\");\r\n System.out.println(\"Excel located\");\r\n \r\n Workbook wb=Workbook.getWorkbook(src);\r\n Sheet sheet=wb.getSheet(0);\r\n System.out.println(\"Workbook loaded\");\r\n \r\n/* String data00=wb.getSheet(0).getCell(0, 0).getContents();\r\n System.out.println(\"Data is \" +data00);\r\n \r\n String data01=wb.getSheet(0).getCell(1, 0).getContents();\r\n System.out.println(\"Data is \" +data01);*/\r\n \r\n int rowCount=sheet.getRows();\r\n \r\n for(int i=0; i<rowCount; i++)\r\n { \t\t\r\n \t System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Sid_Folder\\\\Selenium\\\\Chromedriver\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\t\t\tdriver=new ChromeDriver();\r\n\t\t\tdriver.manage().deleteAllCookies();\r\n\t\t\tdriver.manage().window().maximize();\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n\t\t\tdriver.manage().timeouts().pageLoadTimeout(30,TimeUnit.SECONDS);\r\n\t\t\t\r\n\t\t\tdriver.get(\"http://ttipsweb01q.tbccorp.com/ntwtips/\");\r\n\t\t\tThread.sleep(5000);\r\n \t String username= sheet.getCell(0, i).getContents();\r\n \t\tString password=sheet.getCell(1, i).getContents();\r\n\t\t\tdriver.findElement(By.id(\"fldAccount\")).sendKeys(username);\r\n\t\t\tdriver.findElement(By.id(\"fldPassword\")).sendKeys(password);\r\n\t\t\tdriver.findElement(By.xpath(\"//button[@type='submit']\")).click();\r\n System.out.println(\"username is\" +username);\r\n System.out.println(\"Password is\" +password);\r\n driver.close();\r\n }\r\n \r\n\t}", "@SuppressWarnings(\"resource\")\n\tpublic String init_excel(String excel_name_with_extension, Integer sheet_index_starting_from_0, Integer row_index_starting_from_0, Integer column_index_starting_from_0)\n\t\t\tthrows Exception {\n\n\t\tString folderPath = \"src//test//resources//TestData//\"; // keep excel in this folder path\n\t\tString element_Image = System.getProperty(\"user.dir\") + File.separator + folderPath + excel_name_with_extension;\n\n\t\tFile file = new File(element_Image);\n\t\tFileInputStream fis = new FileInputStream(file); // this contains raw data from the excel\n\t\tXSSFWorkbook workbook = new XSSFWorkbook(fis); // creating workbook\n\t\tXSSFSheet sheet = workbook.getSheetAt(sheet_index_starting_from_0); // getting the sheet from workbook\n\n\t\tString cellValue = sheet.getRow(row_index_starting_from_0).getCell(column_index_starting_from_0).getStringCellValue(); // fetching data from the\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// sheet\n\t\treturn cellValue;\n\t}", "public static void main (String [] args) throws IOException{\nFileInputStream fis = new FileInputStream(\"‪‪C://Users//dell//Desktop//data1.xls\");\r\nWorkbook workbook=WorkbookFactory.create(fis);\r\n\r\nSheet sheet1 = workbook.getSheet(\"Sheet2\");\r\n\r\nRow row0 = sheet1.getRow(0);\r\nCell cell00 = row0.getCell(0);\r\nString cellvalue00 = cell00.getStringCellValue();\r\nSystem.out.println(\"cell value is:\"+cellvalue00);\r\nCell cell01 = row0.getCell(1);\r\nString cellvalue01 = cell01.getStringCellValue();\r\nSystem.out.println(\"cell value is:\"+cellvalue01);\r\nRow row1 = sheet1.getRow(1);\r\nCell cell10 = row1.getCell(0);\r\nString cellvalue10 = cell10.getStringCellValue();\r\nSystem.out.println(\"cell value is:\"+cellvalue10);\r\nCell cell11 = row1.getCell(1);\r\nString cellvalue11 = cell11.getStringCellValue();\r\nSystem.out.println(\"cell value is:\"+cellvalue11);\r\n\r\n\r\n}", "public String read_XL_Data(String path,String sheet,int row,int cell) throws EncryptedDocumentException, FileNotFoundException, IOException \r\n{\r\n\tString data=\"\";\r\n\r\n\tWorkbook wb = WorkbookFactory.create(new FileInputStream(path));\r\n\tdata=wb.getSheet(sheet).getRow(row).getCell(cell).toString();\r\n\t\r\n\treturn data;\r\n}", "public static void demo3() throws IOException, Exception {\n\n // HSSFWorkbook, File\n NPOIFSFileSystem fs = new NPOIFSFileSystem(new File(\"file.xls\"));\n HSSFWorkbook wb = new HSSFWorkbook(fs.getRoot(), true);\n fs.close();\n\n // HSSFWorkbook, InputStream, needs more memory\n NPOIFSFileSystem fs2 = new NPOIFSFileSystem(new FileInputStream(\"MyExcel.xlsx\"));\n HSSFWorkbook wb2 = new HSSFWorkbook(fs2.getRoot(), true);\n\n // XSSFWorkbook, File\n OPCPackage pkg = OPCPackage.open(new File(\"file.xlsx\"));\n XSSFWorkbook wb3 = new XSSFWorkbook(pkg);\n pkg.close();\n\n // XSSFWorkbook, InputStream, needs more memory\n OPCPackage pkg2 = OPCPackage.open(new FileInputStream(\"MyExcel.xlsx\"));\n XSSFWorkbook wb4 = new XSSFWorkbook(pkg);\n pkg.close();\n }", "public static void readfile() throws IOException {\n\t\t\n String excelFilePath = \"D:\\\\Docs\\\\Study Docs\\\\11th Semester\\\\CSE400\\\\Works\\\\Database\\\\StudentInfo.xlsx\";\n FileInputStream inputStream = new FileInputStream(new File(excelFilePath));\n \n Workbook workbook = new XSSFWorkbook(inputStream);\n Sheet firstSheet = workbook.getSheetAt(0);\n Iterator<Row> iterator = firstSheet.iterator();\n int flag=0;\n \n while (iterator.hasNext()) {\n Row nextRow = iterator.next();\n Iterator<Cell> cellIterator = nextRow.cellIterator();\n int c=0;\n String cid=\"\",sid=\"\";\n \n while (cellIterator.hasNext()) {\n Cell cell = cellIterator.next();\n if(c==0){//If it is first value\n \tsid=cell.getStringCellValue();\n \tc=1;\n }\n else{//If it is second value\n \tcid=cell.getStringCellValue();\n }\n }\n if(insert_data(sid,cid)==false) flag=1;//Insert to MSaccess\n //System.out.println(sid+\" \"+cid);\n }\n \n workbook.close();\n inputStream.close();\n if(flag==0)JOptionPane.showMessageDialog(null, \"All value imported successfully.\");\n else JOptionPane.showMessageDialog(null, \"Value importing was interrupted.\");\n }", "public static void setExcelFile(String filePath, String shName)\n\t{\n\t\t//open excel file\n\t\ttry {\n\t\t\tlogger.info(\"creating file inputstream object and setting up file path and sheet\");\n\t\t\tFileInputStream fis = new FileInputStream(filePath);\n\t\t\t\n\t\t\tlogger.debug(\"creating new object for workbook\");\n\t\t\t\n\t\t\txlWBook = new XSSFWorkbook(fis); \n\t\t\t\n\t\t\tlogger.debug(\"get sheet from workbook object\");\n\t\t\txlSheet = xlWBook.getSheet(shName);\n\t\t\tlogger.info(\"created xl sheet object\");\n\t\t\t\t\t\t\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\t\n\t\t\tlogger.error(\"Function - setExcelFile: file not found\", e);\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tlogger.error(\"Function - setExcelFile: IO exception occured\", e);\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n String filePath=\"C:\\\\down\\\\gogo.xls\";\r\n \r\n HSSFWorkbook workbook = new HSSFWorkbook(); // 새 엑셀 생성\r\n HSSFSheet sheet = workbook.createSheet(\"sheet1\"); // 새 시트(Sheet) 생성\r\n HSSFRow row = sheet.createRow(0); // 엑셀의 행은 0번부터 시작\r\n HSSFCell cell = row.createCell(0); // 행의 셀은 0번부터 시작\r\n cell.setCellValue(\"data\"); //생성한 셀에 데이터 삽입\r\n try {\r\n FileOutputStream fileoutputstream = new FileOutputStream(\"C:\\\\down\\\\gogo.xls\");\r\n workbook.write(fileoutputstream);\r\n fileoutputstream.close();\r\n System.out.println(\"엑셀파일생성성공\");\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n System.out.println(\"엑셀파일생성실패\");\r\n }\r\n\r\n}", "public static void main(String[] args) throws UnsupportedEncodingException, FileNotFoundException {\n InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(\"riddles.xls\");\n\t\t\n InputStream is = new FileInputStream(new File(\"C:\\\\Users\\\\sean\\\\workspace\\\\mlymoon\\\\src\\\\main\\\\resources\\\\riddles.xls\"));\n\t\tExcelUtil eu = new ExcelUtil();\n List<Object> ls = eu.importDataFromExcel(new Item(), in, \"riddles.xls\");\n for(Object item : ls){\n \t Item i = (Item) item;\n \t System.out.println(i.getAnswer()+\"##\"+i.getConundrum());\n }\n String[] excelHeader = { \"所属区域(地市)\", \"机房\", \"机架资源情况\", \n \t \"\", \"端口资源情况\", \"机位资源情况\", \"\", \"\", \"设备资源情况\", \n \t \"\", \"\", \"IP资源情况\", \"\", \"\", \"\", \"\", \"网络设备数\" };\n /*ApplicationContext context = \n\t new ClassPathXmlApplicationContext(\"appContext.xml\");\n\t CustomerService customerService = context.getBean(\"customerService\",CustomerService.class);\n List<Customer> customers=customerService.findAll(null, null);\n FileOutputStream fout = new FileOutputStream(\"I:/students.xls\"); \n\t\tExcelUtil eu = new ExcelUtil();\n\t\teu.exportDataToExcel(customers, excelHeader, \"dddddd\", fout);*/\n\t}", "private XSSFSheet getExcelSheet(String filename) throws IOException {\n\tFile excelFile = new File(filename);\n\tFileInputStream excelInputStream = new FileInputStream(excelFile);\n\tXSSFWorkbook workBook = new XSSFWorkbook(excelInputStream);\n\tXSSFSheet hssfSheet = workBook.getSheetAt(FIRST_SHEET_ON_BOOK);\n\treturn hssfSheet;\n }", "public static void readFromExcel_ApachePOI(String testCase) throws Exception{\n\t\tString fileName = \"TestData.xlsx\";\n\t\tString SAMPLE_XLSX_FILE_PATH = System.getProperty(\"user.dir\")+\"\\\\src\\\\test\\\\resources\\\\TestData\\\\TestData.xlsx\";\n\t\tFile file = new File(SAMPLE_XLSX_FILE_PATH);\n\t\tFileInputStream inputStream = new FileInputStream(file);\n\t\tWorkbook workbook = null;\n\t\tString fileExtensionName = fileName.substring(fileName.indexOf(\".\"));\n\t\t\n\t if(fileExtensionName.equals(\".xlsx\")){\n\n\n\t \tworkbook = new XSSFWorkbook(inputStream);\n\n\t }\n\n\t //Check condition if the file is xls file\n\n\t else if(fileExtensionName.equals(\".xls\")){\n\n\t //If it is xls file then create object of HSSFWorkbook class\n\n\t \tworkbook = new HSSFWorkbook(inputStream);\n\n\t }\n\t\t//System.out.println(\"Reading from right sheet\"); \n\t\tSheet sheet = workbook.getSheet(\"TestSheet\");\n\t\tfor(int i = 0;i<sheet.getLastRowNum();i++) {\n\t\t\tif(testCase.equalsIgnoreCase(sheet.getRow(i).getCell(0).getStringCellValue())) {\n\t\t\t\tRow row = sheet.getRow(i);\n\t\t\t\tString userID = row.getCell(1).getStringCellValue();\n\t\t\t\tint pwd = (int) row.getCell(2).getNumericCellValue();\n\t\t\t}\n\t\t}\n\t\tRow row = sheet.getRow(1);\n\t\tCell cell = row.getCell(0);\n\t\tString testCaseName = cell.getStringCellValue();\n\t\tString userID = row.getCell(1).getStringCellValue();\n\t\tint pwd = (int) row.getCell(2).getNumericCellValue();\n\t\tSystem.out.println(testCaseName);\n\t\tSystem.out.println(userID);\n\t\tSystem.out.println(pwd);\n\t\t\t\n\t\tworkbook.close();\n\t}", "public static void main(String[] args) throws IOException {\n\t\tFile file = new File(\"C:\\\\Users\\\\Leonardo\\\\git\\\\repository5\\\\HandleExcelWithApachePoi\\\\src\\\\arquivo_excel.xls\");\r\n\t\t\r\n\t\tif (!file.exists()) {\r\n\t\t\tfile.createNewFile();\r\n\t\t}\r\n\t\t\r\n\t\tPessoa p1 = new Pessoa();\r\n\t\tp1.setEmail(\"[email protected]\");\r\n\t\tp1.setIdade(50);\r\n\t\tp1.setNome(\"Ricardo Edigio\");\r\n\t\t\r\n\t\tPessoa p2 = new Pessoa();\r\n\t\tp2.setEmail(\"[email protected]\");\r\n\t\tp2.setIdade(40);\r\n\t\tp2.setNome(\"Marcos Tadeu\");\r\n\t\t\r\n\t\tPessoa p3 = new Pessoa();\r\n\t\tp3.setEmail(\"[email protected]\");\r\n\t\tp3.setIdade(30);\r\n\t\tp3.setNome(\"Maria Julia\");\r\n\t\t\r\n\t\tList<Pessoa> pessoas = new ArrayList<Pessoa>();\r\n\t\tpessoas.add(p1);\r\n\t\tpessoas.add(p2);\r\n\t\tpessoas.add(p3);\r\n\t\t\r\n\t\t\r\n\t\tHSSFWorkbook hssfWorkbook = new HSSFWorkbook(); /*escrever na planilha*/\r\n\t\tHSSFSheet linhasPessoa = hssfWorkbook.createSheet(\"Planilha de pessoas\"); /*criar planilha*/\r\n\t\t\r\n\t\tint nlinha = 0;\r\n\t\tfor (Pessoa p : pessoas) {\r\n\t\t\tRow linha = linhasPessoa.createRow(nlinha ++); /*criando a linha na planilha*/\r\n\t\t\t\r\n\t\t\tint celula = 0;\r\n\t\t\t\r\n\t\t\tCell celNome = linha.createCell(celula ++); /*celula 1*/\r\n\t\t\tcelNome.setCellValue(p.getNome());\r\n\t\t\t\r\n\t\t\tCell celEmail = linha.createCell(celula ++); /*celula 2*/\r\n\t\t\tcelEmail.setCellValue(p.getEmail());\r\n\t\t\t\r\n\t\t\tCell celIdade = linha.createCell(celula ++); /*celula 3*/\r\n\t\t\tcelIdade.setCellValue(p.getIdade());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tFileOutputStream saida = new FileOutputStream(file);\r\n\t\thssfWorkbook.write(saida);\r\n\t\t\r\n\t\tsaida.flush();\r\n\t\tsaida.close();\r\n\t\t\r\n\t\tSystem.out.println(\"Planilha Criada com Sucesso!\");\r\n\t\t\r\n\t}", "public String importExcel() throws Exception {\n\t\tresetToken(result);\n\t\t//Kiem tra tap tin hop le\n\t\terrMsg = ValidateUtil.validateExcelFile(excelFile, excelFileContentType);\n\t\tif (!StringUtil.isNullOrEmpty(errMsg)) {\n\t\t\tisError = true;\n\t\t\treturn SUCCESS;\n\t\t}\n\t\treturn importExcel21ZV();\n\t}", "private void importData() {\n Sheet sheet;\n Row row;\n int lastRowNum;\n // Discover how many sheets there are in the workbook....\n int numSheets = this.workbook.getNumberOfSheets();\n // and then iterate through them.\n for (int i = 0; i < numSheets; i++) {\n\n // Get a reference to a sheet and check to see if it contains\n // any rows.\n sheet = this.workbook.getSheetAt(i);\n if (sheet.getPhysicalNumberOfRows() > 0) {\n lastRowNum = sheet.getLastRowNum();\n for (int j = 1; j <= lastRowNum; j++) {\n row = sheet.getRow(j);\n this.rowToRenddet(row);\n }\n }\n }\n }", "public static void main(String[] args) throws NullPointerException, Exception {\nFile f = new File(\"C:\\\\Users\\\\Mohit_Shobhit\\\\Music\\\\Book2xlsx.xlsx\");\r\n\tFileInputStream fi= new FileInputStream(f);\r\nXSSFWorkbook xs= new XSSFWorkbook(fi);\r\nXSSFSheet xt=xs.getSheet(\"Sheet1\");\r\n\tint r=xt.getPhysicalNumberOfRows();\r\n\tfor(int i=0;i<=r;i++)\r\n\t{\r\n\t\tXSSFRow xr=xt.getRow(i);\r\n\t\tfor(int j=0;j<xr.getPhysicalNumberOfCells();j++) \r\n\t\t{\r\n\t\t\tXSSFCell x=xr.getCell(j);\r\n\t\t\tSystem.out.println(x.getStringCellValue());\r\n\t\t}\r\n\t}\r\n\t}", "private void openWorkbook(File file) throws FileNotFoundException,\n IOException {\n try (FileInputStream fis = new FileInputStream(file)) {\n this.workbook = WorkbookFactory.create(fis);\n this.evaluator = this.workbook.getCreationHelper().createFormulaEvaluator();\n this.formatter = new DataFormatter(true);\n }\n }", "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}", "public void setExcelFile(String excelFile) {\r\n this.excelFile = excelFile;\r\n }", "public static void writeInFile(String fileName,String sheetName, String cntry, String menu,String subMenu,String subMenu_1,String ActualEng_Title,String Overridden_Title,String xmlURL) throws IOException {\n\r\n\t\tFile myFile = new File(\"./\" + fileName);\r\n\r\n\t\t//Create an object of FileInputStream class to read excel file\r\n\r\n\t\tFileInputStream inputStream = new FileInputStream(myFile);\r\n\r\n\t\tWorkbook myWorkbook = null;\r\n\r\n\t\t//Find the file extension by spliting file name in substring and getting only extension name\r\n\r\n\t\tString fileExtensionName = fileName.substring(fileName.indexOf(\".\"));\r\n\r\n\t\t//Check condition if the file is xlsx file\t\r\n\r\n\t\tif(fileExtensionName.equals(\".xlsx\")){\r\n\r\n\t\t\t//If it is xlsx file then create object of XSSFWorkbook class\r\n\r\n\t\t\tmyWorkbook = new XSSFWorkbook(inputStream);\r\n\t\t\tSystem.out.println(\"Extension of file \"+fileName +\" is .xlsx\");\r\n\r\n\t\t}\r\n\r\n\t\t//Check condition if the file is xls file\r\n\r\n\t\telse if(fileExtensionName.equals(\".xls\")){\r\n\r\n\t\t\t//If it is xls file then create object of XSSFWorkbook class\r\n\r\n\t\t\tmyWorkbook = new HSSFWorkbook(inputStream);\r\n\t\t\tSystem.out.println(\"Extension of file \"+fileName +\" is .xlx\");\r\n\r\n\t\t}\r\n\r\n\t\t//Read sheet inside the workbook by its name\r\n\r\n\t\tSheet mySheet = myWorkbook.getSheet(sheetName);\r\n\r\n\t\t//Find number of rows in excel file\r\n\r\n\t\tint rowCount = mySheet.getLastRowNum() - mySheet.getFirstRowNum();\r\n\r\n\r\n\t\tRow row = mySheet.getRow(0);\r\n\r\n\t\t//Create a new row and append it at last of sheet\r\n\r\n\t\tRow newRow = mySheet.createRow(rowCount+1);\r\n\r\n\r\n\t\t//Create a loop over the cell of newly created Row\r\n\t\tfor(int colCnt=0;colCnt<=6;colCnt++)\r\n\t\t{ \r\n\t\t\tCell cell = newRow.createCell(colCnt);\r\n\r\n\t\t\tif(colCnt==0)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(cntry);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==1)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(menu);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==2)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(subMenu);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==3)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(subMenu_1);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==4)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(ActualEng_Title);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==5)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(Overridden_Title);\r\n\t\t\t}\r\n\t\t\telse if(colCnt==6)\r\n\t\t\t{\r\n\t\t\t\tcell.setCellValue(xmlURL);\r\n\t\t\t}\r\n\t\t}\r\n\t\t/* for(int j = 0; j < row.getLastCellNum(); j++){\r\n\r\n\t //Fill data in row\r\n\r\n\t Cell cell = newRow.createCell(j);\r\n\r\n\t cell.setCellValue(\"test\");\r\n\r\n\t }*/\r\n\r\n\t\t//Close input stream\r\n\r\n\t\tinputStream.close();\r\n\r\n\t\t//Create an object of FileOutputStream class to create write data in excel file\r\n\r\n\t\tFileOutputStream opStream = new FileOutputStream(myFile);\r\n\r\n\t\t//write data in the excel file\r\n\r\n\t\tmyWorkbook.write(opStream);\r\n\t\t//close output stream\r\n\t\topStream.close();\r\n\t\t//\tfor(int i = 0;i<=objectArr.length-1;i++ ){\r\n\r\n\t\t// Cell cell = row.createCell(i);\r\n\t\t// cell.setCellValue(objectArr[i]);\r\n\r\n\t\t// }\r\n\r\n\t\t//File myFile = new File(\"./Controller.xlsx\");\r\n\t\t// FileOutputStream os = new FileOutputStream(myFile);\r\n\t\t//\tmyWorkBook.write(os);\r\n\t\tSystem.out.println(\"Controller Sheet Creation finished ...\");\r\n\t\t//\tos.close();\r\n\r\n\r\n\t}", "public static void main(String[] args) throws Exception {\n File source= new File(\"C:/Development/DataFiles/LoginData.xlsx\");\r\n FileInputStream fis = new FileInputStream(source);\r\n XSSFWorkbook wb = new XSSFWorkbook(fis);\r\n\tXSSFSheet sh = wb.getSheetAt(0);\r\n//\tString data0= sh.getRow(1).getCell(1).getStringCellValue();\r\n//\tSystem.out.println( data0);\r\n\tint rowcount=sh.getLastRowNum();\r\n\t//string colcount=sh.col\r\n\t//System.out.println( colcount);\r\n/*\tfor (int i=0;i<=rowcount;i++)\r\n\t{\r\n\t\tString data1= sh.getRow(i).getCell(0).getStringCellValue();\r\n\t\tif (data1==\"end\")\r\n\t\t\t{\r\n\t\t\t\t\tsh.getRow(i+1);\r\n\t\t\t}\r\n\t\t\r\n\t\tSystem.out.println(data1);\r\n\t\tSystem.out.println();\r\n\t}*/\r\n\t\r\n\tfor (@SuppressWarnings(\"rawtypes\") org.apache.poi.ss.usermodel.Sheet sh1 : wb ) {\r\n for (Row row : sh) {\r\n for (Cell cell : row) {\r\n // Do something here\r\n }\r\n }\r\n }\r\n\twb.close();\r\n\t}", "public static void main(String[] args) throws IOException {\n \r\n File src = new File(\"C:\\\\Temp\\\\Sel_data.xlsx\");\r\n FileInputStream fis=new FileInputStream(src);\r\n XSSFWorkbook wb = new XSSFWorkbook(fis);\r\n XSSFSheet sheet1=wb.getSheetAt(0);\r\n \r\n String data0 = sheet1.getRow(1).getCell(0).getStringCellValue();\r\n System.out.println(\"First user name is:\" +data0);\r\n \r\n String data1 = sheet1.getRow(2).getCell(1).getStringCellValue();\r\n System.out.println(\"First password is:\" +data1);\r\n \r\n wb.close();\r\n int i;\r\n int j;\r\n \r\n \r\n \r\n \r\n\t}", "private static void showExcel(Experiment e1, ArrayList<Institution> bank) {\n\n\n\n\t\tfinal String INPUT_DIR=\"D:/Users/atsushi/Desktop/実験結果/\";\n\t\tWorkbook book=null;\n\n\t\ttry{\n\t\t\tbook = new HSSFWorkbook();\n\t\t\tFileOutputStream fileOut=new FileOutputStream(\"workbook.xls\");\n\t\t\tString safename=WorkbookUtil.createSafeSheetName(\"[OutPut]\");\n\t\t\tString safename1=WorkbookUtil.createSafeSheetName(\"[Bank]\");\n\t\t\tString safename2=WorkbookUtil.createSafeSheetName(\"[Firm]\");\n\t\t\tSheet sheet1=book.createSheet(safename);\n\t\t\tSheet sheet2=book.createSheet(safename1);\n\t\t\tSheet sheet3=book.createSheet(safename2);\n\t\t\tCreationHelper createHelper=book.getCreationHelper();\n\n\t\t\t//100タームごとに改行\n\t\t\tint rowterm=e1.getTerm()/100+1;\n\t\t\tint term=e1.getTerm();\n\t\t\tint xterm=100;\n\t\t\tint a=0,b=xterm-1;\n\t\t\t//if(e1.getTerm()>100) {xterm=100;a=0;b=xterm-1;}else {xterm=0;a=0;b=e1.getTerm()-1;}\n\t\t\tfor(int x=0;x<rowterm;x++){\n\t\t\tRow row = sheet1.createRow((short)x);//行\n\t\t\tRow row1=sheet1.createRow((short)(x+rowterm+2));\n\t\t\tRow row2=sheet1.createRow((short)(x+rowterm*2+2));\n\t\t\tRow row3=sheet1.createRow((short)(x+rowterm*3+2));\n\t\t\tRow row4=sheet1.createRow((short)(x+rowterm*4+2));\n\t\t\tRow row5=sheet1.createRow((short)(x+rowterm*5+2));\n\t\t\tRow row6=sheet1.createRow((short)(x+rowterm*6+2));\n\t\t\tRow row7=sheet1.createRow((short)(x+rowterm*7+2));\n\t\t\tRow row8=sheet1.createRow((short)(x+rowterm*8+2));\n\t\t\tRow row9=sheet1.createRow((short)(x+rowterm*9+2));\n\t\t\tRow row10=sheet1.createRow((short)(x+rowterm*10+2));\n\t\t\tRow row11=sheet1.createRow((short)(x+rowterm*11+2));\n\t\t\tRow row12=sheet1.createRow((short)(x+rowterm*12+2));\n\t\t\tRow row13=sheet1.createRow((short)(x+rowterm*11+2));\n\n\t\t\tint j=0;\n\t\t\tfor(j=a;j<=b;j++){\n\t\t\trow.createCell(j-(x*xterm)).setCellValue(e1.getAgrregateOP(j));\n\t\t\trow1.createCell(j-(x*xterm)).setCellValue(e1.getGrowthRateOP(j));\n\t\t\trow2.createCell(j-(x*xterm)).setCellValue(e1.getFailedFirm(j));\n\t\t\trow3.createCell(j-(x*xterm)).setCellValue(e1.getFailedFirmrate(j));\n\t\t\trow4.createCell(j-(x*xterm)).setCellValue(e1.getBadLoan(j));\n\t\t\trow5.createCell(j-(x*xterm)).setCellValue(e1.getAVGInterest(j));\n\t\t\trow6.createCell(j-(x*xterm)).setCellValue(e1.getMoneyStock(j));\n\t\t\trow7.createCell(j-(x*xterm)).setCellValue(e1.getCreditMoney(j));\n\t\t\trow8.createCell(j-(x*xterm)).setCellValue(e1.getResidual(j));\n\t\t\trow9.createCell(j-(x*xterm)).setCellValue(e1.getGrossDemand(j));\n\t\t\trow10.createCell(j-(x*xterm)).setCellValue(e1.getGrossSupply(j));\n\t\t\trow11.createCell(j-(x*xterm)).setCellValue(e1.getRejectFinancing(j));\n\n\n\t\t //cell.setCellValue(createHelper.createRichTextString(\"sample String\"));\n\t\t\t}\n\t\t\t/*\n\t\t\tfor(j=a;j<e1.getAliveBank();j++) {\n\t\t\t\trowx.createCell(j-(x*e1.getAliveBank())).setCellValue(e1.getBankCAR(j));\n\t\t\t}*/\n\t\t\tif(term>100){\n\t\t\tif(term-1>xterm+j){\n\t\t\t\tif(term-j-1>xterm){\n\t\t\t\t\ta=j;b=j+xterm-1;\n\t\t\t\t}}else{\n\t\t\t\t\ta=j;\n\t\t\t\t\tb=term-1;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t}\n\n\t\t\t//企業list\n\t\t\te1.setSortFirmK();\n\t\t\tint rowfirm=e1.getalivefirm()/100;\n\t\t\tint firmnode=e1.getalivefirm();\n\t\t\tint fn=100;\n\t\t\tint c=0,d=fn-1;\n\t\t\tint t=0;\n\n\t\t\tRow row00= sheet3.createRow((short)t);\n\t\t\trow00.createCell(0).setCellValue(\"総資産\");\n\t\t\tRow row02=sheet3.createRow((short)t+15);\n\t\t\trow02.createCell(0).setCellValue(\"取引先\");\n\t\t\tRow row04=sheet3.createRow((short)t+30);\n\t\t\trow04.createCell(0).setCellValue(\"Leverage\");\n\t\t\tRow row06=sheet3.createRow((short)t+45);\n\t\t\trow06.createCell(0).setCellValue(\"ChoiveLeverage\");\n\t\t\tRow row08=sheet3.createRow((short)t+60);\n\t\t\trow08.createCell(0).setCellValue(\"RejectOrder\");\n\t\t\tRow row010=sheet3.createRow((short)t+75);\n\t\t\trow010.createCell(0).setCellValue(\"NonBuffer\");\n\t\t\t\tfor(int x=0;x<rowfirm;x++){\n\t\t\t\t/*\n\t\t\t\t\tRow row0= sheet3.createRow((short)x);\n\t\t\t\t\trow0.createCell(0).setCellValue(\"総資産\");\n\t\t\t\t\t*/\n\t\t\t\t\tRow row1 = sheet3.createRow((short)x+1);//行\n\t\t\t\t\tRow row3 = sheet3.createRow((short)x+16);\n\t\t\t\t\tRow row5 = sheet3.createRow((short)x+31);\n\t\t\t\t\tRow row7 = sheet3.createRow((short)x+46);\n\t\t\t\t\tRow row9 =sheet3.createRow((short)x+61);\n\t\t\t\t\tRow row11 =sheet3.createRow((short)x+76);\n\t\t\t\tint j=0;\n\t\t\t\tfor(j=c;j<=d;j++){\n\t\t\t\t\t//System.out.print(d);\n\t\t\t\t\trow1.createCell(j-(x*fn)).setCellValue(e1.getFirmK(j));\n\t\t\t\t\trow3.createCell(j-(x*fn)).setCellValue(e1.getFirmCandidateNum(j));\n\t\t\t\t\trow5.createCell(j-(x*fn)).setCellValue(e1.getFirmLeverage(j));\n\t\t\t\t\trow7.createCell(j-(x*fn)).setCellValue(e1.getFirmnextLeverage(j));\n\t\t\t\t\trow9.createCell(j-(x*fn)).setCellValue(e1.getFirmRejectOrderNum(j));\n\t\t\t\t\trow11.createCell(j-(x*fn)).setCellValue(e1.getFirmNonBufferNum(j));\n\t\t\t\t}\n\n\t\t\t\tif(firmnode-1>fn+j){\n\t\t\t\t\tif(firmnode-j-1>fn){\n\t\t\t\t\t\tc=j;d=j+fn-1;\n\t\t\t\t\t}}else{\n\t\t\t\t\t\tc=j;\n\t\t\t\t\t\td=firmnode-1;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t\t/*\n\t\t\t\tif(rowfirm==0) {\n\t\t\t\t\tint x=0;\n\t\t\t\t\tRow row0= sheet3.createRow((short)x);\n\t\t\t\t\trow0.createCell(0).setCellValue(\"総資産\");\n\t\t\t\t\tRow row1 = sheet3.createRow((short)x);//行\n\t\t\t\t\tRow row2=sheet3.createRow((short)x+15);\n\t\t\t\t\trow2.createCell(0).setCellValue(\"取引先\");\n\t\t\t\t\tRow row3 = sheet3.createRow((short)x);\n\t\t\t\t\tRow row4=sheet3.createRow((short)x+30);\n\t\t\t\t\trow4.createCell(0).setCellValue(\"Leverate\");\n\t\t\t\t\tRow row5 = sheet3.createRow((short)x);\n\t\t\t\t\tRow row6=sheet3.createRow((short)x+45);\n\t\t\t\t\trow6.createCell(0).setCellValue(\"ChoiveLeverage\");\n\t\t\t\t\tRow row7 = sheet3.createRow((short)x);\n\t\t\t\t\t//Row row8 = sheet3.createRow((short)x);\n\t\t\t\t\t//Row row9=sheet3.createRow((short)x+20);\n\t\t\t\tfor(int i=0;i<firmnode;i++) {\n\t\t\t\t\trow1.createCell(i).setCellValue(e1.getFirmK(i));\n\t\t\t\t\trow3.createCell(i).setCellValue(e1.getFirmCandidateNum(i));\n\t\t\t\t\trow5.createCell(i).setCellValue(e1.getFirmLeverage(i));\n\t\t\t\t\trow7.createCell(i).setCellValue(e1.getFirmnextLeverage(i));\n\t\t\t\t\t//row4.createCell(i).setCellValue(e1.getFirmLevNowEvalue(i));\n\t\t\t\t}\n\t\t\t\t}\n*/\n\n\t\t\t//銀行リスト\n\n\t\t\tint banknode=e1.getAliveBank();\n\n\t\t\tfor(int x=0;x<1;x++) {\n\t\t\tRow row0=sheet2.createRow((short)x);\n\t\t\tRow row1=sheet2.createRow((short)x+2);\n\t\t\trow1.createCell(0).setCellValue(\"CAR\");\n\t\t\tRow row2=sheet2.createRow((short)x+3);\n\t\t\tRow row3=sheet2.createRow((short)x+4);\n\t\t\trow3.createCell(0).setCellValue(\"企業への貸付:IBloan:IBborrow\");\n\t\t\tRow row4=sheet2.createRow((short)x+5);\n\t\t\tRow row5=sheet2.createRow((short)x+6);\n\t\t\tRow row6=sheet2.createRow((short)x+7);\n\t\t\tRow row7=sheet2.createRow((short)x+8);\n\t\t\trow7.createCell(0).setCellValue(\"銀行資産規模K\");\n\t\t\tRow row8=sheet2.createRow((short)x+9);\n\t\t\tRow row9=sheet2.createRow((short)x+10);\n\t\t\trow9.createCell(0).setCellValue(\"銀行buffer\");\n\t\t\tRow row10=sheet2.createRow((short)x+11);\n\t\t\tRow row11=sheet2.createRow((short)x+12);\n\t\t\trow11.createCell(0).setCellValue(\"銀行総badloan\");\n\t\t\tRow row12=sheet2.createRow((short)x+13);\n\t\t\tRow row13=sheet2.createRow((short)x+14);\n\t\t\trow13.createCell(0).setCellValue(\"銀行residual\");\n\t\t\tRow row14=sheet2.createRow((short)x+15);\n\t\t\tRow row15=sheet2.createRow((short)x+16);\n\t\t\trow15.createCell(0).setCellValue(\"銀行総LFlistsize\");\n\t\t\tRow row16=sheet2.createRow((short)x+17);\n\t\t\tRow row17=sheet2.createRow((short)x+18);\n\t\t\trow17.createCell(0).setCellValue(\"銀行市場性資産\");\n\t\t\tRow row18=sheet2.createRow((short)x+19);\n\t\t\tRow row19=sheet2.createRow((short)x+20);\n\t\t\trow19.createCell(0).setCellValue(\"ClientNumber\");\n\t\t\tRow row20=sheet2.createRow((short)x+21);\n\n\t\t\tfor(int i=0;i<banknode;i++) {\n\t\t\trow0.createCell(i).setCellValue(e1.getBankId(i));\n\t\t\trow2.createCell(i).setCellValue(e1.getBankCAR(i));\n\t\t\trow4.createCell(i).setCellValue(e1.getBankLf(i));\n\t\t\trow5.createCell(i).setCellValue(e1.getBankLb(i));\n\t\t\trow6.createCell(i).setCellValue(e1.getBankBb(i));\n\t\t\trow8.createCell(i).setCellValue(e1.getBankK(i));\n\t\t\trow10.createCell(i).setCellValue(e1.getBankBuffer(i));\n\t\t\trow12.createCell(i).setCellValue(e1.getBankGrossBadLoan(i));\n\t\t\trow14.createCell(i).setCellValue(e1.getBankResidual(i));\n\t\t\trow16.createCell(i).setCellValue(e1.getBankLFSize(i));\n\t\t\trow18.createCell(i).setCellValue(e1.getBankLiqAsset(i));\n\t\t\trow20.createCell(i).setCellValue(e1.getBankClientNum(i));\n\t\t\t}\n\t\t\t/*\n\t\t\tfor(int i=0;i<bank.get(0).levlist.size();i++) {\n\t\t\t\trow18.createCell(i).setCellValue(e1.getBanklevlevelvalue(i));\n\t\t\t}\n\t\t\t*/\n\n\n\n\n\n\t\t\t}\n\t\t book.write(fileOut);\n\t\t //fileOut.close();\n\n\t\t // 1つ目のセルを作成 ※行と同じく、0からスタート\n\t\t //Cell a1 = row.createCell(0); // Excel上、「A1」の場所\n\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}finally{\n\n\n\t\t}\n\n\n\t}", "public static void main(String[] args) throws EncryptedDocumentException, IOException\r\n\t{\n\t\tFileInputStream fis = new FileInputStream(\"./data/input.xlsx\");\t\r\n\t\t\r\n\t\t//2.Create WorkBook or group of sheet\r\n\t\tWorkbook wb = WorkbookFactory.create(fis);\r\n\t\t\r\n\t\t//3.Read the Sheet\r\n\t\tSheet sh = wb.getSheet(\"TC02\");\r\n\t\t\r\n\t\t//4.To get No of Rows in Sheet\r\n\t\tint rowcount = sh.getLastRowNum();\r\n\t\tSystem.out.println(rowcount);\r\n\t\t\r\n\r\n}", "private void Start() throws Exception, Throwable{\n \n POI poi = new POI();\n \n \n\n try //( InterfaceCon = orcTST.GetConnSession())\n {\n //Коннектимся к базам\n if (InterfaceCon == null)\n { \n //Ходим в фаил с коннектами получае параметры коннектимся к ORACLE \n InterfaceCon = OraConFile.get_connect_from_file(\"INTERFACE\");\n }\n\n \n //Работа авто шедулера, ставим отчеты в очередь по достижении определенного периода\n CallableStatement callableStatement = InterfaceCon.prepareCall(\"{call REPORTS_WORK.AUTO_SHEDULER }\");\n callableStatement.executeUpdate();\n callableStatement.close();\n\n \n \n //Коннект к базе по умолчанию \n v_REP_ID = 0; \n v_PC_OPER_ID =0 ; \n //\n // System.out.println(\"Проверка очереди отчетов!\");\n //\n Statement pst_param1 = InterfaceCon.createStatement();\n String query = \"SELECT to_number(pcp.value) as REP_ID, pc.id as OPER_ID \" +\n \" FROM PC_OPER pc , Pc_Oper_Params pcp \" +\n \" WHERE pc.op_status in ('ENTRY') \" +\n \" AND pc.op_code = 'CREATE_REPORT' \" +\n \" and pc.id = pcp.oid_pc_oper \" +\n \" and pcp.param = 'REP_ID' \" +\n \" and rownum = 1 \" +\n \" and pc.id not in (select t.oid_pc_oper as ID from REPORTS_RESULT t where t.oid_pc_oper = pc.id)\" ;\n \n //Получаем заказ отчета\n ResultSet resultSet1 = pst_param1.executeQuery(query) ;\n //Получаем заказ отчета\n while (resultSet1.next())\n {\n v_REP_ID = resultSet1.getInt(\"REP_ID\");\n v_PC_OPER_ID = resultSet1.getInt(\"OPER_ID\");\n } \n //Закрываем открытые курсоры, ORA-01000: количество открытых курсоров превысило допустимый максимум\n pst_param1.close();\n resultSet1.close();\n \n \n if ( v_REP_ID != 0 && v_PC_OPER_ID != 0)\n {\n //Создаем новый поток обработки отчета \n new Thread(() -> {\n try {\n //\n System.out.println(\"Обработка заказа \"+v_PC_OPER_ID+ \" начата\");\n //\n oper_log.set_log(v_PC_OPER_ID,\"Обработка заказа \"+v_PC_OPER_ID+ \" начата\");\n poi.GetblobExcel(v_REP_ID, v_PC_OPER_ID);\n \n //\n System.out.println(\"Обработка заказа \"+v_PC_OPER_ID+ \" завершена!!!!\");\n //\n oper_log.set_log(v_PC_OPER_ID,\"Обработка заказа \"+v_PC_OPER_ID+ \" завершена!!!!\");\n // orcTST.close(); \n v_REP_ID = 0;\n v_PC_OPER_ID =0 ;\n } catch (Throwable ex) {\n System.out.println(\"ошибка !!!!\"+ex.toString());\n \n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex.toString());\n try {\n oper_log.set_log( v_PC_OPER_ID,\"Ошибка! - \" + ex.toString());\n } catch (Throwable ex1) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex1);\n }\n\n }\n }).start(); \n } \n \n } catch (Exception e) { \n System.out.println(\"Ошибка в методе Start с ошибкой\" +e.toString()); \n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, e.toString());\n try( Connection InterfaceCon1 = OraConFile.get_connect_from_file(\"INTERFACE\");)\n {\n InterfaceCon = null;\n try (CallableStatement callableStatement = InterfaceCon1.prepareCall(\"{call PC_OPER_WORK.PC_OPER_ERR (?, ?) }\")) {\n callableStatement.setInt(1, v_PC_OPER_ID);\n callableStatement.setString(2, e.toString());\n callableStatement.executeUpdate();\n }\n InterfaceCon1.close();\n InterfaceCon.close();\n } catch (Exception ex) \n { \n InterfaceCon = null; \n System.out.println(\"Ошибка в методе Start при попытке записать ошибку в базу с ошибкой\"+ex.toString()); \n \n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex.toString()); \n \n }\n } \n \n /* IMINCIDENTS inc = new IMINCIDENTS();\n IMPROBLEMS imp = new IMPROBLEMS();\n IMTASKS imt = new IMTASKS();\n RONTRANS rt = new RONTRANS();\n RONINKAS ron = new RONINKAS();\n AUDITMP am = new AUDITMP();\n AUDITFUNC af = new AUDITFUNC();\n AUDITACTION aa = new AUDITACTION();\n Ronevent rone = new Ronevent();\n LASTSTATUS last = new LASTSTATUS();*/\n /* new Thread(() -> {\n try {\n inc.take_IMINCIDENTS();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start(); \n new Thread(() -> {\n try {\n imp.take_IMPROBLEMS();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start(); \n new Thread(() -> {\n try {\n imt.take_IMTASKS();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start(); \n new Thread(() -> {\n try {\n rt.take_RONTRANS();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start(); \n new Thread(() -> {\n try {\n ron.take_RONINKAS();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start();\n new Thread(() -> {\n try {\n am.take_AUDITMP();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start();\n new Thread(() -> {\n try {\n af.take_AUDITFUNC();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start();\n new Thread(() -> {\n try {\n aa.take_AUDITACTION();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start();\n new Thread(() -> {\n try {\n rone.take_Ronevent();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start();\n new Thread(() -> {\n try {\n last.take_LASTSTATUS();\n } catch (Exception ex) {\n Logger.getLogger(FiveMinuteSinhro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }).start();*/\n }", "private void initialize() {\r\n\t\tTestReadExcel = new JFrame();\r\n\t\tTestReadExcel.setTitle(\"Read Excel\");\r\n\t\tTestReadExcel.setBounds(100, 100, 450, 300);\r\n\t\tTestReadExcel.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tGridBagLayout gridBagLayout = new GridBagLayout();\r\n\t\tgridBagLayout.columnWidths = new int[]{0, 0, 0, 0, 0, 0};\r\n\t\tgridBagLayout.rowHeights = new int[]{0, 0, 0, 0, 0, 0, 0};\r\n\t\tgridBagLayout.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};\r\n\t\tgridBagLayout.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};\r\n\t\tTestReadExcel.getContentPane().setLayout(gridBagLayout);\r\n\t\t\r\n\t\tJButton btnNewButton = new JButton(\"Upload\");\r\n\t\t\r\n\t\tJFileChooser fc = new JFileChooser();\r\n\t\t\r\n\t\tbtnNewButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tint returnVal = fc.showOpenDialog(JBankDesign.this);\r\n\t\t\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\r\n\t File fileName = fc.getSelectedFile();\r\n\t String str = fileName.toString();\t \r\n\t \r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tFileInputStream file = new FileInputStream(new File(str));\r\n\t\t\t\t\t\r\n\t //Create Workbook instance holding reference to .xlsx file\r\n\t\t\t\t\t\tXSSFWorkbook workbook = null;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tworkbook = new XSSFWorkbook(file);\r\n\t\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t \r\n\t //Get first/desired sheet from the workbook\r\n\t XSSFSheet sheet = workbook.getSheetAt(0);\r\n\t \r\n\t \r\n\t //Iterate through each rows one by one\r\n\t Iterator<Row> rowIterator = sheet.iterator();\r\n\t while (rowIterator.hasNext())\r\n\t {\r\n\t Row row = rowIterator.next();\r\n\t //For each row, iterate through all the columns\r\n\t Iterator<Cell> cellIterator = row.cellIterator();\r\n\t \r\n\t while (cellIterator.hasNext())\r\n\t {\r\n\t Cell cell = cellIterator.next();\r\n\t //Check the cell type and format accordingly\r\n\t switch (cell.getCellType())\r\n\t {\r\n\t case Cell.CELL_TYPE_NUMERIC:\r\n\t System.out.print(cell.getNumericCellValue() + \" \");\r\n\t break;\r\n\t case Cell.CELL_TYPE_STRING:\r\n\t System.out.print(cell.getStringCellValue() + \" \");\r\n\t break;\r\n\t }\r\n\t }\r\n\t System.out.println(\"\");\r\n\t }\r\n\t \ttry {\r\n\t\t\t\t\t\t\tfile.close();\r\n\t\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (FileNotFoundException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t \r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridBagConstraints gbc_btnNewButton = new GridBagConstraints();\r\n\t\tgbc_btnNewButton.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_btnNewButton.gridx = 0;\r\n\t\tgbc_btnNewButton.gridy = 0;\r\n\t\tTestReadExcel.getContentPane().add(btnNewButton, gbc_btnNewButton);\r\n\t}", "private void gerarArquivoExcel() {\n\t\tFile currDir = getPastaParaSalvarArquivo();\n\t\tString path = currDir.getAbsolutePath();\n\t\t// Adiciona ao nome da pasta o nome do arquivo que desejamos utilizar\n\t\tString fileLocation = path.substring(0, path.length()) + \"/relatorio.xls\";\n\t\t\n\t\t// mosta o caminho que exportamos na tela\n\t\ttextField.setText(fileLocation);\n\n\t\t\n\t\t// Criação do arquivo excel\n\t\ttry {\n\t\t\t\n\t\t\t// Diz pro excel que estamos usando portguês\n\t\t\tWorkbookSettings ws = new WorkbookSettings();\n\t\t\tws.setLocale(new Locale(\"pt\", \"BR\"));\n\t\t\t// Cria uma planilha\n\t\t\tWritableWorkbook workbook = Workbook.createWorkbook(new File(fileLocation), ws);\n\t\t\t// Cria uma pasta dentro da planilha\n\t\t\tWritableSheet sheet = workbook.createSheet(\"Pasta 1\", 0);\n\n\t\t\t// Cria um cabeçario para a Planilha\n\t\t\tWritableCellFormat headerFormat = new WritableCellFormat();\n\t\t\tWritableFont font = new WritableFont(WritableFont.ARIAL, 16, WritableFont.BOLD);\n\t\t\theaderFormat.setFont(font);\n\t\t\theaderFormat.setBackground(Colour.LIGHT_BLUE);\n\t\t\theaderFormat.setWrap(true);\n\n\t\t\tLabel headerLabel = new Label(0, 0, \"Nome\", headerFormat);\n\t\t\tsheet.setColumnView(0, 60);\n\t\t\tsheet.addCell(headerLabel);\n\n\t\t\theaderLabel = new Label(1, 0, \"Idade\", headerFormat);\n\t\t\tsheet.setColumnView(0, 40);\n\t\t\tsheet.addCell(headerLabel);\n\n\t\t\t// Cria as celulas com o conteudo\n\t\t\tWritableCellFormat cellFormat = new WritableCellFormat();\n\t\t\tcellFormat.setWrap(true);\n\n\t\t\t// Conteudo tipo texto\n\t\t\tLabel cellLabel = new Label(0, 2, \"Elcio Bonitão\", cellFormat);\n\t\t\tsheet.addCell(cellLabel);\n\t\t\t// Conteudo tipo número (usar jxl.write... para não confundir com java.lang.number...)\n\t\t\tjxl.write.Number cellNumber = new jxl.write.Number(1, 2, 49, cellFormat);\n\t\t\tsheet.addCell(cellNumber);\n\n\t\t\t// Não esquecer de escrever e fechar a planilha\n\t\t\tworkbook.write();\n\t\t\tworkbook.close();\n\n\t\t} catch (IOException e1) {\n\t\t\t// Imprime erro se não conseguir achar o arquivo ou pasta para gravar\n\t\t\te1.printStackTrace();\n\t\t} catch (WriteException e) {\n\t\t\t// exibe erro se acontecer algum tipo de celula de planilha inválida\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static void main(String[] args) throws IOException \n\t{\n\t\tXSSFWorkbook wbook=new XSSFWorkbook(\"./Data/login1.xlsx\");\n\t\t//Goto the Sheet\n\t\tXSSFSheet sheet = wbook.getSheet(\"login\");\n\t\t//Find the Row Count\n\t\tint rowCount = sheet.getLastRowNum();\n\t\t//Find the Cell count\n\t\tshort columnCount = sheet.getRow(0).getLastCellNum();\n\t\t//Read the Data\n\t\tfor(int i=1; i<=rowCount;i++) \n\t\t{\n\t\t\tXSSFRow row = sheet.getRow(i);\n\t\t\tSystem.out.println(\"Data from Excel File: \");\n\t\t\tfor (int j=0; j<columnCount; j++) \n\t\t\t{\n\t\t\t\tXSSFCell cell = row.getCell(j);\n\t\t\t\tString data = cell.getStringCellValue();\n\t\t\t\tSystem.out.println(data);\n\t\t\t}\n\t\t}\n\t\twbook.close();\n\t}", "public static void main(String[] args) throws IOException {\n\r\n\t\tFile src = new File(\"C:\\\\Users\\\\new\\\\workspace\\\\FirstTestNGProject\\\\TestData\\\\InputData.xlsx\");\r\n\t\tFileInputStream fis = new FileInputStream(src);\r\n\t\tXSSFWorkbook wb = new XSSFWorkbook(fis);\r\n\t\tXSSFSheet sheet1 = wb.getSheetAt(0);\r\n\t\tint rowcount = sheet1.getLastRowNum();\r\n\t\tfor(int i=0;i<rowcount;i++){\r\n\t\t\tString data0 = sheet1.getRow(i).getCell(0).getStringCellValue();\r\n\t\t\tSystem.out.print(data0+\" \");\r\n\t\twb.close();\r\n\t}\r\n}", "public static void main(String[] args) throws EncryptedDocumentException, IOException {\n\t\tString filePath= \"./resources/excelsheet.xlsx\";\r\n\t\tString sheetName = \"TC03\";\r\n\t\t// CREATE AN OBJECT FOR FileInputStream class of java to pass the physical excel\r\n\t\t// file path\r\n\t\tFileInputStream file = new FileInputStream(filePath);\r\n\t\t// CREATE WORKBOOK OBJECT BY CALLING workbookFactory class of apache poi\r\n\t\tWorkbook workbook = WorkbookFactory.create(file);\r\n\t\tSheet sheet = workbook.getSheet(sheetName);\r\n\t\tint rowNo = sheet.getPhysicalNumberOfRows();\r\n\t\tint cellNo = sheet.getRow(0).getPhysicalNumberOfCells();\r\n\t\tfor(int i=0;i<rowNo ; i++)\r\n\t\t{\r\n\t\t\tfor(int j=0; j<cellNo;j++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(sheet.getRow(i).getCell(j).getStringCellValue());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t}", "@SuppressWarnings({ \"deprecation\", \"static-access\" })\n\tpublic void crearExcel(String nombreFichero,java.sql.Connection connection) throws SQLException {\n \tint contador=0;\n \t\n // Se crea el libro\n HSSFWorkbook libro = new HSSFWorkbook();\n\n // Se crea una hoja dentro del libro\n HSSFSheet hoja = libro.createSheet();\n\n // Se crea una fila dentro de la hoja\n HSSFRow fila = hoja.createRow(contador);\n\n // Se crea una celda dentro de la fila\n HSSFCell celda = fila.createCell((short) 0);\n // Se crea una celda dentro de la fila\n HSSFCell celda2 = fila.createCell((short) 1 );\n // Se crea una celda dentro de la fila\n HSSFCell celda3 = fila.createCell((short) 2 );\n // Se crea una celda dentro de la fila\n HSSFCell celda4 = fila.createCell((short) 3 );\n \n // Se crea el contenido de la celda y se mete en ella.\n HSSFRichTextString texto = new HSSFRichTextString(\"Área\");\n celda.setCellValue(texto);\n\n HSSFRichTextString texto2 = new HSSFRichTextString(\"Dimensión\");\n celda2.setCellValue(texto2);\n \n HSSFRichTextString texto3 = new HSSFRichTextString(\"Lema\");\n celda3.setCellValue(texto3);\n \n HSSFRichTextString texto4 = new HSSFRichTextString(\"Rasgos de Contenido\");\n celda4.setCellValue(texto4);\n \n ArrayList<idPalabra> misAreasAux=new ArrayList<idPalabra>();\n\t\t String areaAct=\"\";\n\t\t area misAreas=new area();\n\t\t misAreasAux=misAreas.devolverAreas(connection);\n\t\t Integer lemAct;\n\t\t \n //SE RECORREN TODAS LAS AREAS\n\t\t for(int i=0; i<misAreasAux.size();i++){\n\t\t\t\n\t\t\t //SE OBTIENE EL AREA ACTUAL\n\t\t\t areaAct=misAreasAux.get(i).getPalabra();\t\n\t\t\t ArrayList<idPalabra> misCategorias= new ArrayList<idPalabra>();\n\t\t\t categoria micategoria = new categoria();\n\t\t\t misCategorias=micategoria.consultarCategoriasConArea(areaAct, connection);\n\t\t\t //Si es 0 es que no hay categorias\n\t\t\t if(misCategorias.size()==0){\n\t\t\t\t contador=contador+1;\n\t\t\t\t fila = hoja.createRow(contador);\n\t\t\t\t celda = fila.createCell((short) 0);\n\t\t\t\t celda.setCellValue(areaAct);\n\t\t\t\t\n\t\t\t } \n\t\t\t else{\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t//esto es que si tengo categorias\n\t\t\t\tfor(int j=0; j<misCategorias.size();j++){\n\t\t\t\t\t\n\t\t\t\t\t String catAct=misCategorias.get(j).getPalabra();\t\n\t\t\t\t\t//para cada categoria tengo que ver si tiene lemas\n\t\t\t\t\tArrayList<Integer> lemasAct=new ArrayList<Integer>();\n\t\t\t\t\tcategoriasLemas misLemas=new categoriasLemas();\n\t\t\t\t\tlemasAct=misLemas.consultarLemasdeunaCategoria(misCategorias.get(j).getId(),connection);\n\t\t\t\t\t//Si es 0 es que no tengo lemas asociados a dicha categoria\n\t\t\t\t\tif(lemasAct.size()==0){\n\t\t\t\t\t\t contador=contador+1;\n\t\t\t\t\t\t fila = hoja.createRow(contador);\n\t\t\t\t\t\t celda = fila.createCell((short) 0);\n\t\t\t\t\t\t celda.setCellValue(areaAct);\n\t\t\t\t\t\t celda = fila.createCell((short) 1);\n\t\t\t\t\t\t celda.setCellValue(catAct);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t//SI TIENE VARIOS LEMAS ASOCIADOS\n\t\t\t\t\t\tfor(int x=0; x<lemasAct.size();x++){\n\t\t\t\t\t\t\tlema miLema =new lema();\n\t\t\t\t\t\t\t lemAct=lemasAct.get(x);\t\n\t\t\t\t\t\t\tlemaRasgo misLemaRasgo= new lemaRasgo();\n\t\t\t\t\t\t\tArrayList<Integer> rasgos=new ArrayList<Integer>();\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\trasgos= misLemaRasgo.devolverRasgosDeLema(lemasAct.get(x),connection);\n\t\t\t\t\t\t\t//NO TIENE RASGOS\n\t\t\t\t\t\t\tif(rasgos.size()==0){\n\t\t\t\t\t\t\t\tcontador=contador+1;\n\t\t\t\t\t\t\t\t fila = hoja.createRow(contador);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 0);\n\t\t\t\t\t\t\t\t celda.setCellValue(areaAct);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 1);\n\t\t\t\t\t\t\t\t celda.setCellValue(catAct);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 2);\n\t\t\t\t\t\t\t\t celda.setCellValue(miLema.consultarUnLemaPorId(lemAct,connection));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//SI TIENE RASGOS\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tcontador++;\n\t\t\t\t\t\t\t\t fila = hoja.createRow(contador);\n\t\t\t\t\t\t\t\tcelda = fila.createCell((short) 0);\n\t\t\t\t\t\t\t\t celda.setCellValue(areaAct);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 1);\n\t\t\t\t\t\t\t\t celda.setCellValue(catAct);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 2);\n\t\t\t\t\t\t\t\t celda.setCellValue(miLema.consultarUnLemaPorId(lemAct,connection));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t int cont=3;\n\t\t\t\t\t\t\t\tfor(int k=0; k<rasgos.size();k++){\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\trasgocontenido mirasgo =new rasgocontenido();\n\t\t\t\t\t\t\t\t\tcelda = fila.createCell((short) cont);\n\t\t\t\t\t\t\t\t\tcelda.setCellValue(mirasgo.consultarRasgoPorId(rasgos.get(k),connection));\n\t\t\t\t\t\t\t\t\tcont++;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\n\t\t\t\t\t\t\t}//if rasgos\n\t\t\t\t\t\t}//if lemas\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t}//if categorias\n\t\t\t\t\t\t\n\n \n\t\t\t }\n\t\t }\n \n // Se salva el libro.\n try {\n FileOutputStream elFichero = new FileOutputStream(nombreFichero);\n libro.write(elFichero);\n elFichero.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void main(String args[]) throws WorkSheetNotFoundException, CellNotFoundException, FileNotFoundException, IOException{\r\n /*\r\n //Test 1 - Creating empty XLS\r\n FileOutputStream fo=new FileOutputStream(\"Result.xls\");\r\n WorkBookHandle h=new WorkBookHandle();\r\n WorkSheetHandle y = h.getWorkSheet(\"Sheet1\");\r\n y.add(\"aa\", \"A1\");\r\n h.writeBytes(fo);\r\n fo.close();\r\n */ \r\n \r\n }", "public Workbook readFileExcel(String filePathName) {\n InputStream inp = null;\n try {\n inp = new FileInputStream(filePathName);\n workbook = WorkbookFactory.create(inp);\n } catch (FileNotFoundException ex) {\n logger.error(ex);\n } catch (Exception ex) {\n logger.error(ex);\n } finally {\n try {\n inp.close();\n } catch (IOException ex) {\n logger.error(ex);\n }\n }\n return workbook;\n }", "public static void main(String[] args) throws IOException {\n\t\t\r\n\t\tString path=\"C:\\\\Users\\\\Tahmina\\\\eclipse-workspace\\\\Excel\\\\data\\\\study.xlsx\";\r\n\t\tFile f=new File(path);\r\n\t\tFileInputStream fis=new FileInputStream(f);\r\n\t\tXSSFWorkbook wb=new XSSFWorkbook(fis);\r\n\t\t\r\n\t\tXSSFSheet wbs= wb.getSheetAt(0);\r\n\t\tRow r0=wbs.getRow(0);\r\n\t\tCell c0=r0.getCell(0);\r\n\t\t\r\n\t\tSystem.out.println(c0);\r\n\t\t\r\n\t\tfis.close();\r\n\r\n\t}", "public void parsingExcel() {\n theresFile = new File(pathTo).exists();\n if (theresFile) {\n try {\n FileInputStream myxls = new FileInputStream(pathTo);\n Workbook workbook = WorkbookFactory.create(myxls);\n //getting the sheet at index zero\n Sheet sheet = workbook.getSheetAt(0);\n int lastRow = sheet.getLastRowNum();\n System.out.println(\"currentID: \" + currentID);\n Row row2 = sheet.createRow(lastRow + 1);\n Data data = new Data(currentID++, jTextField1.getText(), jTextField2.getText(),\n jTextFieldModel.getText(), jTextFieldSerialN.getText(),\n Integer.parseInt(jTextFieldComments.getText()), jTextAreaDescription.getText());\n\n for (int i = 0; i < 7; i++) {\n Cell cell4 = row2.createCell(i);\n switch (i) {\n case 0:\n cell4.setCellValue(data.getID());\n break;\n case 1:\n cell4.setCellValue((String) data.getName());\n break;\n case 2:\n cell4.setCellValue((String) data.getDevice());\n break;\n case 3:\n cell4.setCellValue((String) data.getDeviceModel());\n break;\n case 4:\n cell4.setCellValue((String) data.getSerialNumber());\n break;\n case 5:\n cell4.setCellValue((int) data.getOptional());\n break;\n case 6:\n cell4.setCellValue((String) data.getDecription());\n break;\n }\n\n }\n FileOutputStream outputStream = new FileOutputStream(pathTo);\n workbook.write(outputStream);\n workbook.close();\n } catch (IOException ex) {\n Logger.getLogger(MainWindow.class.getName()).log(Level.SEVERE, null, ex);\n } catch (EncryptedDocumentException ex) {\n Logger.getLogger(MainWindow.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n if (jTextFieldComments.getText().equals(\"\") || jTextFieldComments.getText().equals(null)) {\n JOptionPane.showMessageDialog(null, \"Morate uneti količinu\");\n } else {\n try {\n Data data = new Data(1, jTextField1.getText(), jTextField2.getText(),\n jTextFieldModel.getText(), jTextFieldSerialN.getText(),\n Integer.parseInt(jTextFieldComments.getText()), jTextAreaDescription.getText());\n writtingExcelFile(makingExcelWorkbook(data));\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MainWindow.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n\n// try {\n// FileInputStream myxls = new FileInputStream(pathTo);\n// HSSFWorkbook studentsSheet = new HSSFWorkbook(myxls);\n// HSSFSheet worksheet = studentsSheet.getSheetAt(0);\n// int lastRow = worksheet.getLastRowNum();\n// System.out.println(lastRow);\n// Row row = worksheet.createRow(++lastRow);\n// row.createCell(1).setCellValue(\"Dr.Hola\");\n// myxls.close();\n// FileOutputStream output_file =new FileOutputStream(new File(\"poi-testt.xls\")); \n// //write changes\n// studentsSheet.write(output_file);\n// output_file.close();\n// System.out.println(\" is successfully written\");\n// } catch (Exception e) {\n// }\n }", "@Test\n public void test(){\n ExcelUtil qa3Sheet = new ExcelUtil(\"src/test/resources/Vytrack testusers.xlsx\", \"QA3-short\");\n // 1 based , not 0 based\n int rowCount = qa3Sheet.rowCount();\n // 1 based, not 0 based\n int colCount = qa3Sheet.columnCount();\n System.out.println(\"rowCount = \" + rowCount);\n System.out.println(\"colCount = \" + colCount);\n\n List<String> columnsNames = qa3Sheet.getColumnsNames();\n System.out.println(\"columnsNames = \" + columnsNames);\n // 0 based, get specific cell value based on index\n String cellData = qa3Sheet.getCellData(2, 3);\n System.out.println(\"cellData = \" + cellData);\n\n // get all table values in a list\n List<Map<String, String>> dataList = qa3Sheet.getDataList();\n\n System.out.println(dataList.get(5).get(\"firstname\"));\n\n String[][] dataArray = qa3Sheet.getDataArray();\n\n System.out.println(dataArray[1][1]);\n\n }", "public ArrayList<String> getData(String testcaseName) throws IOException\n{\n//fileInputStream argument\nArrayList<String> a=new ArrayList<String>();\n\nFileInputStream fis=new FileInputStream(\"D://TestCases.xlsx\");\nXSSFWorkbook workbook=new XSSFWorkbook(fis);\n\nint sheets=workbook.getNumberOfSheets();\n}", "public final File getExcelFile() {\n\t\treturn excelFile;\n\t}", "public static void saveExcel() {\r\n\t\ttry {\r\n\t\t\tFileOutputStream fileOut = new FileOutputStream(Constant.EXCEL_PATH);\r\n\t\t\tworkBook.write(fileOut);\r\n\t\t\tfileOut.flush();\r\n\t\t\tfileOut.close();\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}", "public void getRowCount() {\n\n try {\n\n String FILE = \"src/test/resources/Datasheet.xlsx\";\n String SHEET_NAME = \"Master\";\n XSSFWorkbook workbook = new XSSFWorkbook();\n\n }catch (Exception exp)\n {\n exp.printStackTrace();\n System.out.println(exp.getMessage());\n System.out.println(exp.getCause());\n }\n }", "public XL openFile(String filename) throws IOException {\n\n //Get the workbook instance for XLS file - file ext is required for two types\n workbook = getWorkBook(filename);\n Reporter.log(\"openFile succeeded opening \" + filename, true);\n return this;\n }", "@Test\n public String[][] readExcelFile() throws BiffException, IOException, RowsExceededException, WriteException {\n\t Workbook book = Workbook.getWorkbook(new File(\"./src/test/BlogData.xls\"));\n\t Sheet sheet = book.getSheet(\"Blogs\");\n\t \n\t /*\n\t blogs[1][0] = sheet.getCell(0,1).getContents();\n\t System.out.println(\"Blog title\" + blogs[1][0].toString());\n\t \n\t blogs[1][1] = sheet.getCell(1,1).getContents();\n\t System.out.println(\"Blog body\" + blogs[1][1].toString());\n\t */\n\t \n\t for (int row=0; row<=4; row++) {\n\t\t \n\t\t for(int col=0; col<=1; col++) {\n\t\t\t \n\t\t\t blogs[row][col] = sheet.getCell(col, row).getContents();\n\t\t\t \n\t\t }\n\t }\n\t \n\t \n\t \n\t for (int row=0; row<=4; row++) {\n\t\t\t\n\t\t System.out.println(blogs[row][0].toString() +\":\" +blogs[row][1].toString());\n\t }\n\t \n\t book.close();\n\t \n\t return blogs;\n\t \n\t \n\t /*\n\t * Write to excel sheet\n\t WritableWorkbook newbook = Workbook.createWorkbook(new File(\"./src/test/NewExcel.xls\"));\n\t WritableSheet sheet = newbook.createSheet(\"Master\", 0);\n\t \n\t Label l1 = new Label(0,0,\"One\");\n\t \n\t sheet.addCell(l1);\n\t \n\t newbook.write();\n\t newbook.close();\n\t */\n\t \n\t /*\n\t * Modify excel sheet\n\t \n\t Workbook oldCopy = Workbook.getWorkbook(new File(\"./src/test/Sample_DD.xls\"));\n\t \n\t WritableWorkbook newCopy = Workbook.createWorkbook(new File(\"./src/test/New_Sample_DD.xls\"), oldCopy);\n\t \n\t WritableSheet sheet1 = newCopy.getSheet(0);\n\t \n\t Label l2 = new Label(2,2,\"Friends\");\n\t \n\t sheet1.addCell(l2);\n\t \n\t newCopy.write();\n\t \n\t oldCopy.close();\n\t newCopy.close();\n\t */\n\t \n }", "public Excel(Workbook workbook){\n this.workbook = workbook;\n isValid = false;\n initialized = false;\n }", "public void setWorkbook(Workbook workbook){\n this.workbook = workbook;\n }", "public static void setExcelFile(String excelFileName) throws Exception {\r\n\t\ttry {\r\n\t\t\tInputStream excelFile = new FileInputStream(excelFileName);\r\n\t\t\tlog.debug(\"excel file path: \" + excelFileName);\r\n\r\n\t\t\texcelWBook = new XSSFWorkbook(excelFile);\r\n\r\n\t\t\tlog.info(\"<font color='green'><b>成功加载测试文件:[ \" + excelFileName + \" ]</b></font>\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(\"setExcelFile() Exception : \" + e.getMessage());\r\n\t\t\t// ExecutionEngine.result = false;\r\n\t\t\tthrow new RuntimeException(\"加载Excel测试文件 \" + excelFileName + \" 失败...[ \" + e.getMessage() + \" ]\");\r\n\t\t}\r\n\t}", "public WriteExcelXLS(String filePath) {\n\t\tsuper(filePath);\n\t\tthis.book = new HSSFWorkbook();\n\t\tthis.sheet = book.createSheet(\"Teste\");\n\t\tthis.cstyle = new CellStyleList(book);\n\t}", "private OSPARRecords parseExcelFile(String excelFilePath) {\n\n\t\ttry {\n\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\t\t\tbuilder.setPrettyPrinting();\n\t\t\tGson gson = builder.create();\n\t\t\t\n\t\t\t\n\t\t\tOSPARRecords or = new OSPARRecords();\n\n\t\t\tFile file = new File(excelFilePath);\n\t\t\tFileInputStream inputStream = new FileInputStream(new File(excelFilePath));\n\n\t\t\tWorkbook workbook = new HSSFWorkbook(inputStream);\n\t\t\tSheet firstSheet = workbook.getSheetAt(0);\n\n\t\t\tint row = 0;\n\n\t\t\tDataFormatter formatter = new DataFormatter();\n\t\t\t\n\t\t\t\n\t\t\twhile (true) {\n\t\t\t\tRow nextRow = firstSheet.getRow(row);\n\n\t\t\t\tif (nextRow == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tString value=nextRow.getCell(0)+\"\";\n\t\t\t\t\n\t\t\t\tif (value.equals(\"\")) {\n\t\t\t\t\t\n\t\t\t\t\tString v3=nextRow.getCell(3)+\"\";\n\t\t\t\t\t\n\t\t\t\t\tif (!v3.equals(\"Source/Reference\")) {\n\t\t\t\t\t\tSystem.out.println(excelFilePath+\"\\t\"+or.CasNo+\"\\t\"+v3+\"\\t\"+value);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\trow++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (value.equals(\"null\")) break;\n\t\t\t\t\n\t\t\t\tfloat fvalue=Float.parseFloat(value);\n\t\t\t\tDecimalFormat decform=new DecimalFormat(\"0.0\");\n\t\t\t\tString svalue=decform.format(fvalue);\n\t\t\t\t\n//\t\t\t\tSystem.out.println(or.CasNo+\"\\t\"+svalue);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tdata_field df = createDataField(nextRow);\n\t\t\t\t\n\t\t\t\tif (df.Value.equals(\"\") && df.Source_Reference.equals(\"\")) {\n\t\t\t\t\trow++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\tif (svalue.equals(\"0.0\")) \n\t\t\t\t\tor.Name=df.Value;\n\t\t\t\tif (svalue.equals(\"1.1\"))\n\t\t\t\t\tor.CasNo=convertCAS(df.Value);\n\t\t\t\tif (svalue.equals(\"1.2\"))\n\t\t\t\t\tor.EINECS=df.Value;\n\t\t\t\tif (svalue.equals(\"1.3\"))\n\t\t\t\t\tor.Synonym=df.Value;\n\t\t\t\tif (svalue.equals(\"1.4\"))\n\t\t\t\t\tor.Group_Function=df.Value;\n\t\t\t\tif (svalue.equals(\"1.5\"))\n\t\t\t\t\tor.Initial_Selection=df.Value;\n\t\t\t\tif (svalue.equals(\"1.6\"))\n\t\t\t\t\tor.Prioritized_For_Action=df.Value;\n\n\t\t\t\tif (svalue.equals(\"2.1\"))\n\t\t\t\t\tor.Molecular_weight.add(df);\n\t\t\t\tif (svalue.equals(\"2.2\"))\n\t\t\t\t\tor.Water_Solubility.add(df);\n\t\t\t\tif (svalue.equals(\"2.3\"))\n\t\t\t\t\tor.Vapor_Pressure.add(df);\n\n\t\t\t\tif (svalue.equals(\"3.1\"))\n\t\t\t\t\tor.Abiotic_OH_Oxidation_t1_2_d.add(df);\n\t\t\t\tif (svalue.equals(\"3.2\"))\n\t\t\t\t\tor.Photolysis_t1_2_d.add(df);\n\t\t\t\tif (svalue.equals(\"3.3\"))\n\t\t\t\t\tor.Ready_Biodegradability.add(df);\n\t\t\t\tif (svalue.equals(\"3.4\"))\n\t\t\t\t\tor.Halflife.add(df);\n\t\t\t\tif (svalue.equals(\"3.5\"))\n\t\t\t\t\tor.Inherent_Biodegradability.add(df);\n\t\t\t\tif (svalue.equals(\"3.6\"))\n\t\t\t\t\tor.Biodeg_QSAR.add(df);\n\t\t\t\t\n\t\t\t\tif (svalue.equals(\"4.1\"))\n\t\t\t\t\tor.logKow.add(df);\n\t\t\t\tif (svalue.equals(\"4.2\"))\n\t\t\t\t\tor.Bcf.add(df);\n\n\t\t\t\tif (svalue.equals(\"5.1\"))\n\t\t\t\t\tor.Acute_toxicity_algae.add(df);\n\t\t\t\tif (svalue.equals(\"5.2\"))\n\t\t\t\t\tor.Acute_toxicity_daphnia.add(df);\n\t\t\t\tif (svalue.equals(\"5.3\"))\n\t\t\t\t\tor.Acute_toxicity_fish.add(df);\n\t\t\t\tif (svalue.equals(\"5.4\"))\n\t\t\t\t\tor.Chronic_toxicity_daphnia.add(df);\n\t\t\t\tif (svalue.equals(\"5.5\"))\n\t\t\t\t\tor.Chronic_toxicity_fish.add(df);\n\t\t\t\tif (svalue.equals(\"5.6\"))\n\t\t\t\t\tor.Aquatox_QSAR.add(df);\n\t\t\t\tif (svalue.equals(\"5.7\"))\n\t\t\t\t\tor.Aquatic_toxicity_Other.add(df);\n\n\n\t\t\t\tif (svalue.equals(\"6.1\"))\n\t\t\t\t\tor.Acute_toxicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.2\"))\n\t\t\t\t\tor.Carcinogenicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.3\"))\n\t\t\t\t\tor.Chronic_toxicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.4\"))\n\t\t\t\t\tor.Mutagenicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.5\"))\n\t\t\t\t\tor.Reprotoxicity.add(df);\n\n\n\t\t\t\tif (svalue.equals(\"7.1\"))\n\t\t\t\t\tor.Production_Volume.add(df);\n\t\t\t\tif (svalue.equals(\"7.2\"))\n\t\t\t\t\tor.Use_Industry_Category.add(df);\n\t\t\t\tif (svalue.equals(\"7.3\"))\n\t\t\t\t\tor.Use_in_articles.add(df);\n\t\t\t\tif (svalue.equals(\"7.4\"))\n\t\t\t\t\tor.Environm_Occur_Measured.add(df);\n\t\t\t\tif (svalue.equals(\"7.5\"))\n\t\t\t\t\tor.Environm_Occur_Modelled.add(df);\n\n\t\t\t\tif (svalue.equals(\"8.1\"))\n\t\t\t\t\tor.Dir_67_548_EEC_Classification.add(df);\n\t\t\t\tif (svalue.equals(\"8.2\"))\n\t\t\t\t\tor.Reg_793_93_EEC_Existing_substances.add(df);\n\t\t\t\tif (svalue.equals(\"8.3\"))\n\t\t\t\t\tor.Dir_2000_60_EEC_WFD.add(df);\n\t\t\t\tif (svalue.equals(\"8.4\"))\n\t\t\t\t\tor.Dir_76_769_EEC_M_U.add(df);\n\t\t\t\tif (svalue.equals(\"8.5\"))\n\t\t\t\t\tor.Dir_76_464_EEC_water.add(df);\n\t\t\t\tif (svalue.equals(\"8.6\"))\n\t\t\t\t\tor.Dir_91_414_EEC_ppp.add(df);\n\t\t\t\tif (svalue.equals(\"8.7\"))\n\t\t\t\t\tor.Dir_98_8_EEC_biocid.add(df);\n\n\t\t\t\tif (svalue.equals(\"9.1\"))\n\t\t\t\t\tor.Hazard_assessment_OECD.add(df);\n\t\t\t\tif (svalue.equals(\"9.2\"))\n\t\t\t\t\tor.Other_risk_assessments.add(df);\n\n\t\t\t\trow++;\n\n\t\t\t}\n\n\t\t\tinputStream.close();\n\t\t\treturn or;\n\t\t\t\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public static void setExcelFileSheet(String sheetName) throws IOException {\n\t testDataExcelPath = currentDir+\"\\\\src\\\\example\\\\trademeSellAndBuy\\\\testData\\\\\";\n\t // Open the Excel file\n FileInputStream excelFile = new FileInputStream(new File(testDataExcelPath + testDataExcelFileName));\n excelWBook = new XSSFWorkbook(excelFile);\n excelWSheet = (XSSFSheet) excelWBook.getSheet(sheetName);\n }", "public static void getData() throws Exception {\n\t\tString filepath = \"F:\\\\Selenium Practice\\\\Framework\\\\TestData\\\\TestData.xlsx\";\n\t\tFile f = new File(filepath);\n\t\tFileInputStream str = new FileInputStream(f);\n\t\tWorkbook w = new XSSFWorkbook(str);\n\t\tSheet sh = w.getSheet(\"TestData\");\n\t\tfor (int i = 0; i < sh.getPhysicalNumberOfRows(); i++) {\n\t\t\tRow r = sh.getRow(i);\n\t\t\tfor (int j = 0; j < r.getPhysicalNumberOfCells(); j++) {\n\t\t\t\tCell c = r.getCell(j);\n\t\t\t\tint ct = c.getCellType();\n\t\t\t\tString name = \"\";\n\t\t\t\tswitch (ct) {\n\t\t\t\tcase Cell.CELL_TYPE_NUMERIC:\n\t\t\t\t\tif (ct == 0) {\n\t\t\t\t\t\tif (DateUtil.isCellDateFormatted(c)) {\n\t\t\t\t\t\t\tSimpleDateFormat form = new SimpleDateFormat(\"dd-MMM-yy\");\n\t\t\t\t\t\t\tname = form.format(c.getDateCellValue());\n\t\t\t\t\t\t\tSystem.out.println(name);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdouble d = c.getNumericCellValue();\n\t\t\t\t\t\t\tlong l = (long) d;\n\t\t\t\t\t\t\tname = String.valueOf(l);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase Cell.CELL_TYPE_STRING:\n\t\t\t\t\tif (ct == 1) {\n\t\t\t\t\t\tname = c.getStringCellValue();\n\t\t\t\t\t\tSystem.out.println(name);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public static void main(String[] args) throws IOException {\n\t\t\nFile f = new File(\"C:\\\\Users\\\\Vinoth kumar\\\\eclipse-workspace\\\\ExcelProject\\\\Excel\\\\sample_Excel.xlsx\");\n\t// to get into the file\nFileInputStream fin = new FileInputStream(f);\n\t//to get into the workbook\nWorkbook w = new XSSFWorkbook(fin);\n//to get into the sheet\n Sheet sheet = w.getSheet(\"Sheet1\");\n//to get into the row\nRow row = sheet.getRow(1);\n//to get into the cell\nCell cell = row.getCell(1);\nSystem.out.println(cell);\n // int physicalNumberOfRows=sheet.getPhysicalNumberOfRows();\n // System.out.println(\"number of rows:\" +physicalNumberOfRows);\n\n // int physicalNumberOfCells = row.getPhysicalNumberOfCells();\n // System.out.println(\"number of cells:\"+physicalNumberOfCells);\n\n // to print all the value of a particular cell in all the rows\n\nfor (int i = 0; i < sheet.getPhysicalNumberOfRows(); i++) {\n\tRow row2 = sheet.getRow(i);\n\tCell cell2 =row2.getCell(2);\n\tSystem.out.println(cell2);\n}\n// to print all the values in a row\nfor (int i = 0; i < sheet.getPhysicalNumberOfRows(); i++) {\n\tCell cell2 = row.getCell(i);\n\tSystem.out.println(cell2);\n\t\n}\n// to print all the values in a sheet\nfor (int i = 0; i < sheet.getPhysicalNumberOfRows(); i++) {\n\tRow row2 = sheet.getRow(i);\nfor (int j = 0; j < row2.getPhysicalNumberOfCells(); j++) {\n\tCell cell2 = row2.getCell(j);\n\tSystem.out.println(cell2);\n\t}\n\t\n}\n\n\n\t}", "public void test47026_1() {\n Workbook source = _testDataProvider.openSampleWorkbook(\"47026.xlsm\");\n Sheet sheet = source.getSheetAt(0);\n Row row = sheet.getRow(0);\n Cell cell = row.getCell(0);\n cell.setCellType(Cell.CELL_TYPE_STRING);\n cell.setCellValue(\"456\");\n }", "public static void main(String[] args) throws IOException {\n\t\tWorkbook workbook = new XSSFWorkbook(); \n\t\t\n /* CreationHelper helps us create instances of various things like DataFormat, \n Hyperlink, RichTextString etc, in a format (HSSF, XSSF) independent way */\n\t\tCreationHelper createHelper = workbook.getCreationHelper();\n \n\t\t// Create a sheet\n\t\tSheet sheet = workbook.createSheet(\"Employee\");\n\t\t\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\t\t\n\t\t// Create a cellStyle with font \n\t\tCellStyle headerCellStyle=workbook.createCellStyle();\n\t\theaderCellStyle.setFont(headerFont);\n\t\t\n\t\t// Create a row \n\t\tRow headerRow = sheet.createRow(0);\n\t\t\n\t\t// create cell\n\t\tfor(int i=0; i<columns.length; i++){\n\t\t\t\tCell cell=headerRow.createCell(i);\n\t\t\t\tcell.setCellValue(columns[i]);\n\t\t\t\tcell.setCellStyle(headerCellStyle);\n\t\t}\n\t\t\n\t\tCellStyle dateCellStyle = workbook.createCellStyle();\n\t\tdateCellStyle.setDataFormat(createHelper.createDataFormat().getFormat(\"dd-MM-yyyy\"));\n\t\t\n\t\t// Create Other rows and cells with employees data\n\t\tint rowNum=(sheet.getLastRowNum()+1);\n\t\tfor(Employee employee : employees){\n\t\t\tint cellNum = 0;\n\t\t\tRow row=sheet.createRow(rowNum++);\n\t\t\trow.createCell(cellNum++).setCellValue(employee.getName());\n\t\t\trow.createCell(cellNum++).setCellValue(employee.getEmail());\n\t\t\t\n\t\t\tCell dateOfBirthCell=row.createCell(cellNum++);\n\t\t\tdateOfBirthCell.setCellValue(employee.getDateOfBirth());\n\t\t\tdateOfBirthCell.setCellStyle(dateCellStyle);\n\t\t\t\n\t\t\trow.createCell(cellNum).setCellValue(employee.getSalary());\n\t\t\t\n\t\t\t// Resize all columns to fit the content size\n\t for(int i = 0; i < columns.length; i++) {\n\t sheet.autoSizeColumn(i);\n\t }\n\t\t\t\t\n\t\t}\n\t\t\n // Write the output to the file\n\t\t\n OutputStream outputStream=new \n\t\t\t\t\tFileOutputStream(\"C:\\\\Users\\\\gauravd\\\\Downloads\\\\poi-generated-file.xlsx\");\n\t\t\tworkbook.write(outputStream);\n\t\t\t\n\t\t\toutputStream.close();\n\t\t\tworkbook.close();\n\t\t\tSystem.out.println(\"Writer Completed\");\n\t\t\t\n\t}", "public static void main(String[] args) throws Exception\r\n\t{\n\t\tFile f=new File(\"xssfxlsxreading.xlsx\");\r\n\t\tWorkbook wb=WorkbookFactory.create(f);\r\n\t\tSheet sh=wb.getSheet(\"Sheet1\");\r\n\t\tRow r=sh.getRow(0);\r\n\t\tCell c=r.getCell(0);\r\n\t\tSystem.out.println(c);\r\n\t\tSystem.out.println(sh.getRow(6).getCell(5));\r\n\t\t//Since there is no data, it will raise NullPointerException\r\n\t\t//So to avoid this exception to raise we use DataFormatter class\r\n\t\t//This class can take any data in String format\r\n\t\t//System.out.println(sh.getRow(45).getCell(12));\r\n\t\tSystem.out.println(sh.getRow(12).getCell(9));\t\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tFile file=new File(\"E:\\\\AutomationSelenium\\\\ApachePOI\\\\testdata.xlsx\");\n\t\tFileInputStream fis=new FileInputStream(file);\n\t\t\n\t\tXSSFWorkbook wb=new XSSFWorkbook(fis);\n\t\tXSSFSheet sheet=wb.getSheetAt(0);\n\t\tString data0=sheet.getRow(1).getCell(0).getStringCellValue();\n\t\tString data1=sheet.getRow(1).getCell(1).getStringCellValue();\n\t\tSystem.out.println(data0+\"\"+data1);\n\t\twb.close();\n\t}", "public static void main(String[] args) throws IOException, InvalidFormatException {\n Workbook workbook = WorkbookFactory.create(new File(SAMPLE_XLSX_FILE_PATH));\r\n\r\n // Retrieving the number of sheets in the Workbook\r\n System.out.println(\"Workbook has \" + workbook.getNumberOfSheets() + \" Sheets : \");\r\n\r\n /*\r\n =============================================================\r\n Iterating over all the sheets in the workbook (Multiple ways)\r\n =============================================================\r\n */\r\n\r\n // 1. You can obtain a sheetIterator and iterate over it\r\n Iterator<Sheet> sheetIterator = workbook.sheetIterator();\r\n System.out.println(\"Retrieving Sheets using Iterator\");\r\n while (sheetIterator.hasNext()) {\r\n Sheet sheet = sheetIterator.next();\r\n System.out.println(\"=> \" + sheet.getSheetName());\r\n int noOfRows = sheet.getLastRowNum();\r\n System.out.println(\"Number of Rows are \" + \"\" + noOfRows);\r\n }\r\n\r\n\r\n\r\n /*\r\n ==================================================================\r\n Iterating over all the rows and columns in a Sheet (Multiple ways)\r\n ==================================================================\r\n */\r\n \r\n // Getting the Sheet at index zero\r\n Sheet sheet = workbook.getSheetAt(0);\r\n\r\n // Create a DataFormatter to format and get each cell's value as String\r\n DataFormatter dataFormatter = new DataFormatter();\r\n\r\n // 1. You can obtain a rowIterator and columnIterator and iterate over them\r\n System.out.println(\"\\n\\nIterating over Rows and Columns using Iterator\\n\");\r\n Iterator<Row> rowIterator = sheet.rowIterator();\r\n int noOfColumns=0;\r\n \r\n while (rowIterator.hasNext()) {\r\n Row row =(Row) rowIterator.next();\r\n\r\n // Now let's iterate over the columns of the current row\r\n Iterator<Cell> cellIterator = row.cellIterator();\r\n \r\n while (cellIterator.hasNext()) {\r\n Cell cell = cellIterator.next();\r\n String cellValue = dataFormatter.formatCellValue(cell);\r\n System.out.print(cellValue + \"\\t\");\r\n \r\n }\r\n System.out.println();\r\n\r\n noOfColumns=row.getLastCellNum();\r\n //System.out.println(\"Number of Columns are ******* \" + \"\" + noOfColumns);\r\n }\r\n \r\n int noOfRows = sheet.getLastRowNum();\r\n System.out.println(\"Number of Rows are \" + \"\" + noOfRows);\r\n System.out.println(\"Number of Columns are \" + \"\" + noOfColumns);\r\n \r\n \r\n \r\n \r\n \r\n // Getting the Sheet at index zero\r\n Sheet sheet1 = workbook.getSheetAt(1);\r\n System.out.println(\"\\n\\nName of Sheet:\"+ sheet1);\r\n\r\n // Create a DataFormatter to format and get each cell's value as String\r\n DataFormatter dataFormatter1 = new DataFormatter();\r\n\r\n // 1. You can obtain a rowIterator and columnIterator and iterate over them\r\n System.out.println(\"\\nIterating over Rows and Columns using Iterator\\n\");\r\n Iterator<Row> rowIterator1 = sheet1.rowIterator();\r\n int noOfColumns1=0;\r\n \r\n while (rowIterator1.hasNext()) {\r\n Row row =(Row) rowIterator1.next();\r\n\r\n // Now let's iterate over the columns of the current row\r\n Iterator<Cell> cellIterator = row.cellIterator();\r\n \r\n while (cellIterator.hasNext()) {\r\n Cell cell = cellIterator.next();\r\n String cellValue = dataFormatter1.formatCellValue(cell);\r\n System.out.print(cellValue + \"\\t\");\r\n \r\n }\r\n System.out.println();\r\n\r\n noOfColumns1=row.getLastCellNum();\r\n //System.out.println(\"Number of Columns are ******* \" + \"\" + noOfColumns);\r\n }\r\n \r\n int noOfRows1 = sheet1.getLastRowNum();\r\n System.out.println(\"Number of Rows are \" + \"\" + noOfRows1);\r\n System.out.println(\"Number of Columns are \" + \"\" + noOfColumns1);\r\n \r\n \r\n \r\n \r\n \r\n // Getting the Sheet at index zero\r\n Sheet sheet11 = workbook.getSheetAt(2);\r\n System.out.println(\"\\n\\nName of Sheet:\"+ sheet11);\r\n \r\n // Create a DataFormatter to format and get each cell's value as String\r\n DataFormatter dataFormatter11 = new DataFormatter();\r\n\r\n // You can obtain a rowIterator and columnIterator and iterate over them\r\n System.out.println(\"\\n\\nIterating over Rows and Columns using Iterator\\n\");\r\n Iterator<Row> rowIterator11 = sheet11.rowIterator();\r\n int noOfColumns11=0;\r\n \r\n while (rowIterator11.hasNext()) {\r\n Row row =(Row) rowIterator11.next();\r\n\r\n // Now let's iterate over the columns of the current row\r\n Iterator<Cell> cellIterator = row.cellIterator();\r\n \r\n while (cellIterator.hasNext()) {\r\n Cell cell = cellIterator.next();\r\n String cellValue = dataFormatter11.formatCellValue(cell);\r\n System.out.print(cellValue + \"\\t\");\r\n \r\n }\r\n System.out.println();\r\n\r\n noOfColumns11=row.getLastCellNum();\r\n //System.out.println(\"Number of Columns are ******* \" + \"\" + noOfColumns);\r\n }\r\n \r\n int noOfRows11 = sheet11.getLastRowNum();\r\n System.out.println(\"Number of Rows are \" + \"\" + noOfRows11);\r\n System.out.println(\"Number of Columns are \" + \"\" + noOfColumns11);\r\n // Closing the workbook\r\n workbook.close();\r\n }", "public static void main(String[] args) throws Exception {\n\t\tFileInputStream file= new FileInputStream(\"C:\\\\Users\\\\Sonali\\\\Desktop\\\\Automation\\\\POI.xlsx\");\n\t\t\n\t\t// Step2: Import XSSFWorkbook\n\t\tXSSFWorkbook w=new XSSFWorkbook(file);\n\t\t\n\t\t//Step3: Import XSSFWorsksheet\n\t\tXSSFSheet s=w.getSheet(\"ReadData\");\n\t\t\n\t\t//Step4: Read Data\n\t\tString a=s.getRow(0).getCell(0).getStringCellValue();\n\t\tString b=s.getRow(0).getCell(1).getStringCellValue();\n\t\tint c=(int) s.getRow(0).getCell(2).getNumericCellValue();\n\t\t\n\t\t//Step 5: Display data\n\t\tSystem.out.println(a+\"\\t\\t\" +b+\"\\t\\t\"+c);\t\n\t}", "public String[][] excelData(String fileName) throws IOException {\n\t\tXSSFWorkbook wb= new XSSFWorkbook(\"./data/\"+fileName+\".xlsx\");\r\n\t\t\r\n\t\t\r\n\t\t//Step2-Get in to the worksheet\r\n\t\t\r\n\t\tXSSFSheet ws=wb.getSheet(\"Sheet1\");\r\n\t\t\r\n\t\t\r\n\t\tint rowcount=ws.getLastRowNum();//excluding first row\r\n\t\tSystem.out.println(rowcount);\r\n\t\t\r\n\t\t//int incFR=ws.getPhysicalNumberOfRows();//includes first row\r\n\t\t\r\n\t\tshort cellCount = ws.getRow(0).getLastCellNum();\r\n\t\tString[][] data=new String[rowcount][cellCount];\r\n\t\t\r\n\t\tfor(int i=1;i<=rowcount;i++) {//rows\r\n\t\t\tfor(int j=0;j<cellCount;j++) {//column\r\n\t\t\t\t\r\n\t\t\t\tString cellValue = ws.getRow(i).getCell(j).getStringCellValue();\r\n\t\t\t\tdata[i-1][j]=cellValue;\r\n\t\t\t\t//System.out.println(cellValue);\r\n\t\t\t\t\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t\r\n\t\twb.close();\r\n\t\treturn data;\r\n\r\n\t}", "public void readExcel() throws BiffException, IOException {\n\t\tString FilePath = \"C:\\\\Users\\\\Rivak\\\\workspace\\\\dsaAssingment2\\\\Students.xls\";\n\t\tFileInputStream fs = new FileInputStream(FilePath);\n\t\tWorkbook wb = Workbook.getWorkbook(fs);\n\n\t\t// TO get the access to the sheet\n\t\tSheet sh = wb.getSheet(\"Sheet1\");\n\n\t\t// To get the number of rows present in sheet\n\t\tint totalNoOfRows = sh.getRows();\n\n\t\t// To get the number of columns present in sheet\n\t\tint totalNoOfCols = sh.getColumns();\n\n\t\t// add the name of all student into Student list\n\t\tfor (int row = 0; row < totalNoOfRows; row++) {\n\t\t\tStudent.add(sh.getCell(0, row).getContents());\n\t\t}\n\n\t\t// add the branch of all student into the Branches list\n\t\tfor (int row = 0; row < totalNoOfRows; row++) {\n\t\t\tArrayList<String> innerList = new ArrayList<String>();\n\t\t\tfor (int col = 1; col < totalNoOfCols; col++) {\n\t\t\t\tinnerList.add(sh.getCell(col, row).getContents());\n\t\t\t}\n\t\t\tBranches.add(innerList);\n\n\t\t}\n\n\t\t// add all the studentDetails into student class and take object of\n\t\t// perticular student\n\t\tfor (int i = 0; i < totalNoOfRows; i++) {\n\t\t\tString name = Student.get(i);\n\t\t\tArrayList<String> studentBranch = new ArrayList<String>();\n\t\t\tstudentBranch = Branches.get(i);\n\t\t\tStudentDetails.add(this.addStudent(name, studentBranch));\n\t\t}\n\n\t}", "@Override\n public void escribirExcel(String pathPlan, String pathDeex, String nombResa) throws Exception {\n LOGGER.info(\"Iniciando escritura del archivo en excel\");\n\n LOGGER.debug(\"Ruta de la plantilla {}\", pathPlan);\n LOGGER.debug(\"Ruta donde se va a escribir la plantilla {} \", pathDeex);\n\n //Archivo Origen\n File archOrig = null;\n //Archivo Destino\n File archDest = null;\n //ruta completa de la plantilla\n String pathDefi = pathDeex + File.separator + nombResa;\n //Registra del archivo de excel\n Row row = null;\n //Celda en el archivo de excel\n Cell cell;\n //Hoja de excel\n Sheet sheet = null;\n //Numero de hojas en el libro de excel\n int numberOfSheets;\n //Constantes\n final String NOMBRE_HOJA = \"RESULTADOS EVALUACION\";\n // Fila y columna para \n int fila = 0;\n int columna = 0;\n //Fila inicio evidencia\n int filaEvid;\n\n try {\n archOrig = new File(pathPlan);\n\n if (!archOrig.exists()) {\n LOGGER.debug(\"Plantilla no existe en la ruta {} \", pathPlan);\n throw new IOException(\"La plantilla no existe en la ruta \" + pathPlan);\n }\n\n archDest = new File(pathDeex);\n\n if (!archDest.exists()) {\n LOGGER.debug(\"Ruta no existe donde se va a depositar el excel {} , se va a crear\", pathDeex);\n archDest.mkdirs();\n }\n\n LOGGER.info(\"Ruta del archivo a crear {}\", pathDefi);\n archDest = new File(pathDefi);\n\n if (!archDest.exists()) {\n LOGGER.info(\"No existe el archivo en la ruta {}, se procede a la creacion \", pathDefi);\n archDest.createNewFile();\n } else {\n\n LOGGER.info(\"el archivo que se requiere crear, ya existe {} se va a recrear\", pathDefi);\n archDest.delete();\n LOGGER.info(\"archivo en la ruta {}, borrado\", pathDefi);\n archDest.createNewFile();\n\n LOGGER.info(\"archivo en la ruta {}, se vuelve a crear\", pathDefi);\n\n }\n\n LOGGER.info(\"Se inicia con la copia de la plantilla de la ruta {} a la ruta {} \", pathPlan, pathDefi);\n try (FileChannel archTror = new FileInputStream(archOrig).getChannel();\n FileChannel archTrDe = new FileOutputStream(archDest).getChannel();) {\n\n archTrDe.transferFrom(archTror, 0, archTror.size());\n\n LOGGER.info(\"Termina la copia del archivo\");\n\n } catch (Exception e) {\n LOGGER.info(\"Se genera un error con la transferencia {} \", e.getMessage());\n throw new Exception(\"Error [\" + e.getMessage() + \"]\");\n }\n\n LOGGER.info(\"Se inicia con el diligenciamiento del formato \");\n\n LOGGER.info(\"Nombre Archivo {}\", archDest.getName());\n if (!archDest.getName().toLowerCase().endsWith(\"xls\")) {\n throw new Exception(\"La plantilla debe tener extension xls\");\n }\n\n try (FileInputStream fis = new FileInputStream(archDest);\n Workbook workbook = new HSSFWorkbook(fis);\n FileOutputStream fos = new FileOutputStream(archDest);) {\n\n if (workbook != null) {\n numberOfSheets = workbook.getNumberOfSheets();\n LOGGER.debug(\"Numero de hojas {}\", numberOfSheets);\n\n LOGGER.info(\"Hoja seleccionada:{}\", NOMBRE_HOJA);\n sheet = workbook.getSheetAt(0);\n\n fila = 5;\n\n LOGGER.info(\"Se inicia con la escritura de las oportunidades de mejora\");\n\n LOGGER.info(\"Creando las celdas a llenar\");\n\n for (int numeFila = fila; numeFila < this.listOpme.size() + fila; numeFila++) {\n\n LOGGER.info(\"Fila {} \", numeFila);\n if (numeFila > 8) {\n\n copyRow(workbook, sheet, numeFila - 2, numeFila - 1);\n sheet.addMergedRegion(new CellRangeAddress(numeFila - 1, numeFila - 1, 1, 4));\n sheet.addMergedRegion(new CellRangeAddress(numeFila - 1, numeFila - 1, 6, 7));\n\n }\n\n }\n\n LOGGER.info(\"Terminando de llenar celdas\");\n LOGGER.info(\"Poblar registros desde {} \", fila);\n\n for (OptuMejo optuMejo : this.listOpme) {\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 1. Valor Capacitacion tecnica {}\", fila, optuMejo.getCapaTecn());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(1);\n\n cell.setCellValue(optuMejo.getCapaTecn());\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 6. Valor compromisos del area {}\", fila, optuMejo.getComporta());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(6);\n\n cell.setCellValue(optuMejo.getComporta());\n\n fila++;\n\n }\n LOGGER.info(\"Termino de poblar el registro hasta {} \", fila);\n //Ajustando los formulario\n if (fila > 8) {\n sheet.addMergedRegion(new CellRangeAddress(fila, fila, 1, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 2, 6));\n } else {\n fila = 9;\n }\n\n /* sheet.addMergedRegion(new CellRangeAddress(fila, fila, 1, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 2, 6));*/\n LOGGER.info(\"Fin de la escritura de las oportunidades de mejora\");\n\n LOGGER.info(\"Se inicia la escritura de las evidencias \");\n\n fila += 2;\n filaEvid = fila + 5;\n\n LOGGER.info(\"Se inicia la creacion de las celdas desde el registro {} \", fila);\n\n for (Evidenci evidenci : this.listEvid) {\n\n if (filaEvid < fila) {\n copyRow(workbook, sheet, fila - 1, fila);\n\n }\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 1. Valor Fecha {}\", fila, evidenci.getFecha());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(1);\n\n cell.setCellValue(evidenci.getFecha());\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 6. Valor compromisos del area {}\", fila, evidenci.getDescripc());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(2);\n\n cell.setCellValue(evidenci.getDescripc());\n\n sheet.addMergedRegion(new CellRangeAddress(fila, fila, 2, 6));\n\n fila++;\n\n }\n\n LOGGER.info(\"Fin de la escritura de las Evidencias\");\n\n LOGGER.info(\"Inicio de escritura de calificaciones\");\n //Ajustando los formulario - resultado\n\n /*sheet.addMergedRegion(new CellRangeAddress(fila, fila, 1, 7));*/\n if (fila > filaEvid) {\n LOGGER.info(\"Fila a ejecutar {} \", fila);\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 2, fila + 2, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 3, fila + 3, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 4, fila + 4, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 6, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 2, fila + 4, 6, 7));\n //Firma del evaluado ajuste\n sheet.addMergedRegion(new CellRangeAddress(fila + 5, fila + 5, 1, 3));\n sheet.addMergedRegion(new CellRangeAddress(fila + 5, fila + 5, 4, 6));\n\n //Ajustando recursos\n sheet.addMergedRegion(new CellRangeAddress(fila + 6, fila + 6, 1, 7));\n\n sheet.addMergedRegion(new CellRangeAddress(fila + 8, fila + 8, 1, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 10, fila + 10, 1, 7));\n\n } else {\n fila = filaEvid + 1;\n LOGGER.info(\"Fila a ejecutar {} \", fila);\n }\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 2. Valor Excelente {}\", fila + 2, this.excelent);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 2);\n cell = row.getCell(2);\n\n cell.setCellValue((this.excelent != null ? this.excelent : \"\"));\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 2. Valor satisfactorio {}\", fila + 3, this.satisfac);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 3);\n cell = row.getCell(2);\n\n cell.setCellValue((this.satisfac != null ? this.satisfac : \"\"));\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 3. Valor no satisfactorio {}\", fila + 4, this.noSatisf);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 4);\n cell = row.getCell(2);\n\n cell.setCellValue((this.noSatisf != null ? this.noSatisf : \"\"));\n\n //Ajustando Total Calificacion en Numero\n LOGGER.debug(\"Se va actualizar la linea {} celda 2. Valor total calificacion {}\", fila + 2, this.numeToca);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 2);\n cell = row.getCell(6);\n\n cell.setCellValue(this.numeToca);\n\n LOGGER.info(\"Fin de escritura de calificaciones\");\n\n LOGGER.info(\"Inicio de escritura de interposicion de recursos\");\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 5. Valor si interpone recursos {}\", fila + 7, this.siinRecu);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 7);\n cell = row.getCell(6);\n\n cell.setCellValue(\"SI:\" + (this.siinRecu != null ? this.siinRecu : \"\"));\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 5. Valor si interpone recursos {}\", fila + 7, this.noinRecu);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 7);\n cell = row.getCell(7);\n\n cell.setCellValue(\"NO:\" + (this.noinRecu != null ? this.noinRecu : \"\"));\n \n \n LOGGER.debug(\"Se va actualizar la linea {} celda 5. Valor si interpone recursos {}\", fila + 8, this.fech);\n \n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 8);\n cell = row.getCell(1);\n\n cell.setCellValue(\"FECHA:\" + (this.fech != null ? this.fech : \"\"));\n \n \n\n LOGGER.info(\"Fin de escritura de interposicion de recursos\");\n\n //Ajustando recursos\n workbook.write(fos);\n\n } else {\n throw new Exception(\"No se cargo de manera adecuada el archivo \");\n }\n\n } catch (Exception e) {\n System.out.println(\"\" + e.getMessage());\n }\n\n } catch (Exception e) {\n LOGGER.error(e.getMessage());\n throw new Exception(e.getMessage());\n }\n }", "public void getExportedBookDataXlsFileByUser(){\n File mPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);\n //String pathName = mPath.getPath() + \"/\" + \"sample_wordbook_daum.xls\";\n //Manager_SystemControl.saveFileFromInputStream(databaseInputStream,pathName);\n\n final Manager_FileDialog managerFileDialog = new Manager_FileDialog(this, mPath, \".xls\");\n managerFileDialog.addFileListener(new Manager_FileDialog.FileSelectedListener() {\n public void fileSelected(File file) {\n managerFileDialog.removeFileListener(this);\n new LoadDaumXlsFile(WordListActivity.this,file.getPath()).execute();\n }\n });\n managerFileDialog.showDialog();\n }", "public ExcelReader() throws IOException, InvalidFormatException {\n\n this.workbook = WorkbookFactory.create(new File(SAMPLE_XLSX_FILE_PATH));\n\n // Retrieving the number of sheets in the Workbook\n System.out.println(\"Workbook has \" + workbook.getNumberOfSheets() + \" Sheets : \");\n\n // Obtain a sheetIterator and iterate over it\n /*Iterator<Sheet> sheetIterator = workbook.sheetIterator();\n System.out.println(\"Retrieving Sheets using Iterator\");\n while (sheetIterator.hasNext()) {\n Sheet sheet = sheetIterator.next();\n System.out.println(\"=> \" + sheet.getSheetName());\n getL1labels(sheet.getSheetName());\n }*/\n\n for (int sheetIndex = 2; sheetIndex < workbook.getNumberOfSheets(); sheetIndex++) {\n getF1F2labels(sheetIndex);\n }\n\n // Closing the workbook\n }", "public static String[][] excelRead() throws Exception {\n\t\tFile excel = new File(\"/Users/HEMA/selenium/Data.xlsx\");\n\t\tFileInputStream fis = new FileInputStream(excel);\n\t\tXSSFWorkbook wb = new XSSFWorkbook(fis);\n\t\tXSSFSheet ws = wb.getSheet(\"Sheet1\");\n\t\t\n\t\t//getlastRowNum returns the # of rows starting with 0 as first row. SO to get actual row # in excel, add1\n\t\tint rowNum = ws.getLastRowNum() + 1;\n\t\tint colNum = ws.getRow(0).getLastCellNum();\n\t\tString [][] inputData = new String[rowNum][colNum]; \n\t\t\n\t\tfor (int i=0; i < rowNum; i++) {\n\t\t\tXSSFRow row = ws.getRow(i);\n\t\t\tfor (int j=0; j < colNum; j++) {\n\t\t\t\tXSSFCell cell = row.getCell(j);\n\t\t\t\tString value = cellToString(cell);\n\t\t\t\tinputData[i][j] = value;\n\t\t//\t\tSystem.out.println(\"The value is \" + value);\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t\twb.close();\n\t\treturn inputData;\n\n\t}", "public ImportExcelData (ASPManager mgr, String page_path)\n {\n super(mgr,page_path);\n }", "public static void main(String[] args) {\n\t\tExcelDataConfig excel=new ExcelDataConfig(\"D:\\\\Batch -2 Workspace\\\\Selenium_Batch_Two\\\\TestData\\\\readexceldemo1.xlsx\");\n\t\tSystem.out.println(excel.getData(0, 0, 0));\n\t}", "public static void main(String[] args) throws IOException {\n FileInputStream fi=new FileInputStream(\"C:\\\\Users\\\\SURENDRA\\\\Documents\\\\msexel1.xlsx\");\r\n Workbook wb= new XSSFWorkbook(fi);\r\n // wb.createSheet(\"MIN5\");\r\n \r\n \r\n FileOutputStream fo=new FileOutputStream(\"C:\\\\Users\\\\SURENDRA\\\\Documents\\\\msexel2.xlsx\");\r\n wb.write(fo);\r\n wb.close();\r\n fi.close();\r\n fo.close();\r\n \r\n \r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private Sheet getActualSheet() throws IOException{\r\n File file = new File(\"evidence.ods\");\r\n SpreadSheet spreadSheet = SpreadSheet.createFromFile(file);\r\n return spreadSheet.getSheet(spreadSheet.getSheetCount()-1);\r\n }", "public static void main(String[] args) throws IOException {\n\t\t\n\t\tXSSFWorkbook xlwb = new XSSFWorkbook();\n\t\t\n\t\tXSSFSheet sht = xlwb.createSheet(\"Firstsheet\");\n\t\t\n\t\tRow row0 = sht.createRow(0);\n\t\n\tCell Cela = row0.createCell(0);\n\tCell Celb = row0.createCell(1);\n\t\n\tCela.setCellValue(\"this is first cell value\");\n\t\n\tCelb.setCellValue(\"this is 2nd cell value\");\n\t\n\tFile f = new File(\"D:\\\\Personal\\\\Learning\\\\PatriceFiles\\\\Excel\\\\Excelfile.xlsx\");\n\t\n\t\tFileOutputStream fo = new FileOutputStream(f);\n\t\t\n\t\txlwb.write(fo);\n\t\n\tSystem.out.println(\"Excel File Created\");\n\t\t\n\t}", "public void CreateXLSLibrary(String path) \n\t{\n\t\t\tthis.path=path;\n\t\t\ttry \n\t\t\t{\n\t\t\t\tfis = new FileInputStream(path);\n\t\t\t\tworkbook = new XSSFWorkbook(fis);\n\t\t\t\tsheet = workbook.getSheetAt(0);\n\t\t\t\tfis.close();\n\t\t\t} \n\t\t\tcatch (Exception e) \n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\n\t}", "public interface ExcelExport {\n\n //void buildSheet(XSSFWorkbook xssfWorkbook, String sheetName, String headerTitle, Map<String, String> commonExcelData, List<Map<String, String>> data);\n\n /**\n * 构建xlsx\n *\n * @param xssfWorkbook\n * @param config\n * @param result 数据\n */\n void buildXlsx(XSSFWorkbook xssfWorkbook, XlsxConfig config, JSONObject result);\n\n XlsxConfig getXlsxConfig(String path) throws IOException;\n}", "private void btnImportActionPerformed(java.awt.event.ActionEvent evt) {\n\n DefaultTableModel ImportDataFromExcelModel = (DefaultTableModel) tblImport.getModel();\n FileInputStream excelFIS = null;\n BufferedInputStream excelBIS = null;\n XSSFWorkbook excelImportWorkBook = null;\n String currentDirectoryPath = \"C:\\\\Users\\\\Sheng\\\\Desktop\";\n JFileChooser excelFileChooserImport = new JFileChooser(currentDirectoryPath);\n\n int excelChooser = excelFileChooserImport.showOpenDialog(null);\n\n if (excelChooser == JFileChooser.APPROVE_OPTION) {\n try {\n File excelFile = excelFileChooserImport.getSelectedFile();\n excelFIS = new FileInputStream(excelFile);\n excelBIS = new BufferedInputStream(excelFIS);\n excelImportWorkBook = new XSSFWorkbook(excelBIS);\n XSSFSheet excelSheet = excelImportWorkBook.getSheetAt(0);\n\n for (int i = 0; i <= excelSheet.getLastRowNum(); i++) {\n XSSFRow excelRow = excelSheet.getRow(i);\n XSSFCell IC = excelRow.getCell(0);\n XSSFCell name = excelRow.getCell(1);\n XSSFCell gender = excelRow.getCell(2);\n XSSFCell age = excelRow.getCell(3);\n XSSFCell phone = excelRow.getCell(4);\n XSSFCell address = excelRow.getCell(5);\n XSSFCell lastUpdateDateTime = excelRow.getCell(6);\n XSSFCell createDateTime = excelRow.getCell(7);\n if (i != 0) {\n tblImport.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);\n TableColumnModel columnModel = tblImport.getColumnModel();\n columnModel.getColumn(0).setPreferredWidth(100);\n columnModel.getColumn(1).setPreferredWidth(150);\n columnModel.getColumn(2).setPreferredWidth(50);\n columnModel.getColumn(3).setPreferredWidth(40);\n columnModel.getColumn(4).setPreferredWidth(90);\n columnModel.getColumn(5).setPreferredWidth(530);\n columnModel.getColumn(6).setPreferredWidth(170);\n columnModel.getColumn(7).setPreferredWidth(170);\n ImportDataFromExcelModel.addRow(new Object[]{IC, name, gender, age, phone, address, lastUpdateDateTime, createDateTime});\n }\n }\n JOptionPane.showMessageDialog(null, \"Imported Successfully......\");\n } catch (FileNotFoundException ex) {\n JOptionPane.showMessageDialog(null, \"File Not Found\");\n } catch (IOException ex) {\n JOptionPane.showMessageDialog(null, \"ImportJtable.btnImportActionPerformed get error on line 189\"+ex.getMessage());\n }\n }\n }", "public static List<InputDto> readXLSXFile(File file) throws Exception {\n List<InputDto> inputDtos = new ArrayList<>();\n\n Integer i = 0;\n InputStream ExcelFileToRead = new FileInputStream(file);\n XSSFWorkbook wb = new XSSFWorkbook(ExcelFileToRead);\n\n XSSFWorkbook test = new XSSFWorkbook();\n\n XSSFSheet sheet = wb.getSheetAt(0);\n XSSFRow row;\n XSSFCell cell;\n\n Iterator rows = sheet.rowIterator();\n// ss = new String[sheet.getLastRowNum()];\n sheet.getLastRowNum();\n while (rows.hasNext()) {\n InputDto input = new InputDto();\n row = (XSSFRow) rows.next();\n Iterator cells = row.cellIterator();\n if (row.getRowNum() == 0) {\n continue; //just skip the rows if row number is 0 or 1\n }\n String s = \"\";\n while (cells.hasNext()) {\n cell = (XSSFCell) cells.next();\n\n if (cell.getCellType() == HSSFCell.CELL_TYPE_STRING) {\n// System.out.print(cell.getStringCellValue() + \" \");\n s += cell.getStringCellValue().trim() + \"|\";\n } else if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) {\n// System.out.print(cell.getNumericCellValue() + \" \");\n s += cell.getRawValue().trim() + \"|\";\n } else if (cell.getCellType() == HSSFCell.CELL_TYPE_BLANK) {\n// System.out.print(cell.getNumericCellValue() + \" \");\n s += cell.getStringCellValue().trim() + \"|\";\n }\n /*else {\n //U Can Handel Boolean, Formula, Errors\n }*/\n }\n if (!s.equals(\"\") && s.split(\"\\\\|\").length == 8) {\n input.setLoadName(s.split(\"\\\\|\")[6]);\n input.setLoadSize(s.split(\"\\\\|\")[1]);\n input.setLoadDate(s.split(\"\\\\|\")[0]);\n input.setLoadPath(s.split(\"\\\\|\")[4]);\n input.setLoadType(s.split(\"\\\\|\")[2]);\n input.setCicsName(s.split(\"\\\\|\")[5]);\n input.setRowId(s.split(\"\\\\|\")[7]);\n System.out.println(input.getRowId());\n inputDtos.add(input);\n// ss[i] = s;\n\n } else {\n throw new Exception(\"EXCEL DATA IS NOT COMPELETED\");\n }\n i++;\n }\n\n return inputDtos;\n }", "public static void main(String[] args) {\n String path = System.getProperty(\"user.dir\")+\"\\\\src\\\\test\\\\java\\\\FileHandling\\\\Data.xlsx\";\n //Xls_Reader xls = new Xls_Reader(path);\n\n // counting rows\n\n //counting cols\n\n //reading\n\n //writing\n\n }", "@BeforeMethod\n public void openBrowser() throws IOException, BiffException {\n driver = navigate(driver,\"https://www.weightwatchers.com\");\n //define readable workbook path\n readableFile = Workbook.getWorkbook(new File(\"src/main/resources/weightWatchersExcelSheet.xls\"));\n //now locate the readable sheet\n readableSheet = readableFile.getSheet(0);\n //physical count of the rows(non empty rows)\n rows = readableSheet.getRows();\n //create writable JxL file to duplicate the readable file\n writableFile = Workbook.createWorkbook(new File(\"src/main/resources/Weight_Watchers_Data_Driven_Results.xls\"),readableFile);\n //locate the writable sheet to write back to it\n writableSheet = writableFile.getSheet(0);\n }", "public Object[][] getExcelData(String excelLoc) throws EncryptedDocumentException, InvalidFormatException, IOException {\r\n\t\t\r\n\t\tInputStream inputStream = null;\r\n\t\t \r\n\t\tinputStream = new FileInputStream(new File(excelLoc));\r\n\t\tWorkbook wb = WorkbookFactory.create(inputStream);\r\n\t\tSheet sheet = wb.getSheetAt(0);\r\n\t\t int lastRowNum = sheet.getLastRowNum() ;\r\n\t\t int lastCellNum = sheet.getRow(0).getLastCellNum();\r\n\t\t Object[][] obj = new Object[lastRowNum][1];\r\n\r\n\t\t for (int i = 0; i < lastRowNum; i++) {\r\n\t\t Map<Object, Object> datamap = new HashMap<Object, Object>();\r\n\t\t for (int j = 0; j < lastCellNum; j++) {\r\n\t\t datamap.put(sheet.getRow(0).getCell(j).toString(), sheet.getRow(i+1).getCell(j).toString());\r\n\t\t }\r\n\t\t obj[i][0] = datamap;\r\n\r\n\t\t }\r\n\t\t return obj;\r\n\t\t }", "@SuppressWarnings(\"deprecation\")\n@Test\n public void f() throws Exception{\nFile fi=new File(\"e://Loginwebtourdata.xls\");\n\t\t Workbook w=Workbook.getWorkbook(fi);\n\t\t Sheet s=w.getSheet(0);\n// Creating Result file in Results columns\n\t WritableWorkbook wwb=Workbook.createWorkbook(fi,w);\n\t\tWritableSheet sh=wwb.getSheet(0);\nfor (int i = 1; i < s.getRows(); i++) {\n//Enter username, Password and click on signin by taking data from testdata file\t\ndriver.findElement(By.name(\"userName\")).sendKeys(s.getCell(0, i).getContents());\ndriver.findElement(By.name(\"password\")).sendKeys(s.getCell(1, i).getContents());\ndriver.findElement(By.name(\"login\")).click();\n\tThread.sleep(1000);\n//Validate signout, if available assign Pass to str, else assign Fail to str\t\n\tif(selenium.isElementPresent(\"link=SIGN-OFF\"))\n\t{\n\tdriver.findElement(By.linkText(\"SIGN-OFF\")).click();\n\tThread.sleep(1000);\n\tdriver.get(\"http://newtours.demoaut.com\");\n\tdriver.manage().window().maximize();\n\tReporter.log(\"both user and password are valid\",true);\n\tstr=\"Pass\";\n\t}else{\n\t\tstr=\"Fail\";\n\t\tReporter.log(\"both user and password are invalid\",true);\n\t\t\t}\n// Add the str value to Result file under result column\t\n\tLabel result=new Label(2, i, str);\n\tsh.addCell(result);\n}//Add 3 labels in Result file\n\t\t Label rs=new Label(2,0,\"Result\");\n\t\t sh.addCell(rs);\n\t// Write and close result file\t \n\t\t wwb.write();\n\t\t wwb.close();\n\t\t }", "public static void main(String[] args) throws FileNotFoundException,IOException, JXLException {\nFileOutputStream fo=new FileOutputStream(\"./testdata/testoutput.xls\");\r\nWritableWorkbook ww=Workbook.createWorkbook(fo);\r\nWritableSheet ws=ww.createSheet(\"testing\",0);\r\n//to move data into specific loationa using labels\r\nLabel a = new Label(0,0,\"Username\");//now the label store in ram loaction\r\n// to move data into specific location\r\nLabel b = new Label(1,0,\"password\");\r\nws.addCell(b);\r\n\r\nws.addCell(a);\r\nww.write();\r\nww.close();\r\n\t}", "private boolean initSpreadsheet()\n {\n boolean bOk = true;\n XSpreadsheets aSheets = maSpreadsheetDoc.getSheets();\n try\n {\n XIndexAccess aSheetsIA = (XIndexAccess) UnoRuntime.queryInterface( XIndexAccess.class, aSheets );\n maSheet = (XSpreadsheet) UnoRuntime.queryInterface(XSpreadsheet.class, aSheetsIA.getByIndex( 0 ));\n\n // enter some values in B3:B11\n for( int iCounter=1; iCounter < 10; iCounter++ )\n {\n XCell aCell = maSheet.getCellByPosition( 1, 1 + iCounter );\n aCell.setValue( (double) iCounter );\n }\n }\n catch( Exception ex )\n {\n System.err.println( \"Couldn't initialize Spreadsheet Document: \" + ex );\n ex.printStackTrace();\n bOk = false;\n }\n return bOk;\n }", "public void processInput(Exchange exchange) {\n String fileName = (String) exchange.getIn().getHeaders().get(Exchange.FILE_NAME);\n logger.info(\"fileProcessing:{}\",fileName);\n try {\n List<DailyReconcilationRecord> dailyReconcilationRecordList = (List<DailyReconcilationRecord>)exchange.getIn().getBody();\n try (XSSFWorkbook xssfWorkbook = new XSSFWorkbook()) {\n XSSFSheet lasSheet = xssfWorkbook.createSheet(ReCAPConstants.DAILY_RR_LAS);\n xssfWorkbook.setSheetOrder(ReCAPConstants.DAILY_RR_LAS, 0);\n int i = 0;\n setColumnWidthForSheet(lasSheet);\n CellStyle cellStyle = xssfWorkbook.createCellStyle();\n cellStyle.setAlignment(HorizontalAlignment.LEFT);\n logger.info(\"started creating las sheet\");\n for (DailyReconcilationRecord dailyReconcilationRecord : dailyReconcilationRecordList) {\n XSSFRow row = lasSheet.createRow(i);\n createCell(xssfWorkbook, row,cellStyle, dailyReconcilationRecord.getRequestId(), 0);\n createCell(xssfWorkbook, row,cellStyle, dailyReconcilationRecord.getBarcode(), 1);\n createCell(xssfWorkbook, row,cellStyle, dailyReconcilationRecord.getCustomerCode(), 2);\n createCell(xssfWorkbook, row,cellStyle, dailyReconcilationRecord.getStopCode(), 3);\n createCell(xssfWorkbook, row,cellStyle, dailyReconcilationRecord.getPatronId(), 4);\n createCell(xssfWorkbook, row,cellStyle, dailyReconcilationRecord.getCreateDate(), 5);\n createCell(xssfWorkbook, row,cellStyle, dailyReconcilationRecord.getLastUpdatedDate(), 6);\n createCell(xssfWorkbook, row,cellStyle, dailyReconcilationRecord.getRequestingInst(), 7);\n createCell(xssfWorkbook, row,cellStyle, dailyReconcilationRecord.getOwningInst(), 8);\n createCell(xssfWorkbook, row,cellStyle, dailyReconcilationRecord.getDeliveryMethod(), 9);\n createCell(xssfWorkbook, row,cellStyle, dailyReconcilationRecord.getStatus(), 10);\n createCell(xssfWorkbook, row,cellStyle, dailyReconcilationRecord.getErrorCode(), 11);\n createCell(xssfWorkbook, row,cellStyle, dailyReconcilationRecord.getErrorNote(), 12);\n i++; \n }\n logger.info(\"completed creating las sheet\");\n Sheet readLasSheet = xssfWorkbook.getSheetAt(0);\n XSSFSheet scsbSheet = xssfWorkbook.createSheet(ReCAPConstants.DAILY_RR_SCSB);\n xssfWorkbook.setSheetOrder(ReCAPConstants.DAILY_RR_SCSB, 1);\n createHeader(scsbSheet);\n XSSFCellStyle dateCellStyle = getXssfCellStyleForDate(xssfWorkbook);\n logger.info(\"started creating scsb sheet\");\n for (int j = 1; j <= readLasSheet.getLastRowNum(); j++) {\n readValuesFromLasSheet(xssfWorkbook, readLasSheet, scsbSheet, dateCellStyle, j);\n }\n logger.info(\"completed creating scsb sheet\");\n compareLasAndScsbSheets(xssfWorkbook,cellStyle);\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(ReCAPConstants.DAILY_RR_FILE_DATE_FORMAT);\n FileOutputStream fileOutputStream = new FileOutputStream(filePath + \"/\" + ReCAPConstants.DAILY_RR + simpleDateFormat.format(new Date()) + \".xlsx\");\n xssfWorkbook.write(fileOutputStream);\n fileOutputStream.flush();\n fileOutputStream.close();\n logger.info(\"total number of sheets created {}\",xssfWorkbook.getNumberOfSheets());\n camelContext.startRoute(ReCAPConstants.DAILY_RR_FS_ROUTE_ID);\n logger.info(\"started \"+ReCAPConstants.DAILY_RR_FS_ROUTE_ID);\n }\n }\n catch (Exception e){\n logger.error(ReCAPConstants.LOG_ERROR + e);\n }\n logger.info(\"fileProcessed:{}\",fileName);\n }", "public static void main(String[] args) throws IOException {\n\n ExcelUtils excel = new ExcelUtils(\"Sheet1\",\"Excel/data.xlsx\");\n excel.getRowCount(0);\n excel.getCellStringData(0,0); //prints username\n excel.getCellStringData(0,1); //prints password\n excel.getNumericCellData(1,1); //prints 1234.0\n excel.getColCount(1);\n }", "@DataProvider\n\tpublic String[][] getExcelData() throws InvalidFormatException, IOException {\n\t\tReadExcel read = new ReadExcel();\n\t\treturn read.getCellData(\"Testdata/FOE.xlsx\", \"sheet1\");\n\t }", "private void initSpreadsheet() {\r\n fluSpreadsheet = Keikai.newClient(Configuration.LOCAL_KEIKAI_SERVER); //connect to keikai server\r\n //pass target element's id and get keikai script URI\r\n String scriptUri = fluSpreadsheet.getURI(spreadsheetBlock.getUuid());\r\n //load the initial script to getUpdateRunner spreadsheet at the client\r\n Script initialScript = new Script();\r\n initialScript.setSrc(scriptUri);\r\n initialScript.setDefer(true);\r\n initialScript.setAsync(true);\r\n initialScript.setPage(getPage());\r\n\r\n String fileName = \"swineFlu.xlsx\";\r\n File file = new File(WebApps.getCurrent().getRealPath(Configuration.DEMO_BOOK_PATH), fileName);\r\n final Desktop desktop = getPage().getDesktop();\r\n try {\r\n fluSpreadsheet.importAndReplace(fileName, file);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public static void Read() throws IOException {\n\t\tFile file = new File(\"C:\\\\Users\\\\villu\\\\Documents\\\\Book12.xlsx\");\n\t\tFileInputStream excel= new FileInputStream(file);\n\t\tXSSFWorkbook workbook= new XSSFWorkbook(excel);\n\t\tXSSFSheet sheet= workbook.getSheetAt(0);\n\t\tIterator<Row> rowIterator=sheet.iterator();\n\t\twhile(rowIterator.hasNext()) {\n\t\t\tRow rowvalue=rowIterator.next();\n\t\t\tIterator<Cell> columnIterator=rowvalue.cellIterator();\n\t\t\tint i = 1;\n\t\t\twhile(columnIterator.hasNext()) \n\t\t\t{\n\t\t\t\tif(i==1) {\n\t\t\t\t\tFirst_Name.add(columnIterator.next().toString());\n\t\t\t\t\t}\n\t\t\t\telse if(i==2)\n\t\t\t\t{\n\t\t\t\t\tMiddle_Name.add(columnIterator.next().toString());\n\t\t\t\t\t}\n\t\t\t\telse if(i==3)\n\t\t\t\t{\n\t\t\t\t\tLast_Name.add(columnIterator.next().toString());\n\t\t\t\t\t}\n\t\t\t\telse if(i==4)\n\t\t\t\t{\n\t\t\t\t\tUser_Name.add(columnIterator.next().toString());\n\t\t\t\t\t}\n\t\t\t\telse if(i==5)\n\t\t\t\t{\n\t\t\t\t\tEmployee_Id.add(columnIterator.next().toString());\n\t\t\t\t\t}\n\t\t\t\telse if(i==6)\n\t\t\t\t{\n\t\t\t\t\tPassword.add(columnIterator.next().toString());\n\t\t\t\t\t}\n\t\t\t\telse if(i==7)\n\t\t\t\t{\n\t\t\t\t\tGender.add(columnIterator.next().toString());\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tMarital_Status.add(columnIterator.next().toString());\n\t\t\t\t\t}\n\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t}workbook.close();\n\t\n}" ]
[ "0.69913054", "0.6827788", "0.67797923", "0.66221195", "0.65277624", "0.64976037", "0.63901997", "0.6369907", "0.63423574", "0.6328653", "0.62705064", "0.62452203", "0.6136664", "0.6129895", "0.6123529", "0.6089508", "0.60894793", "0.6078659", "0.604222", "0.60359675", "0.5969417", "0.59587497", "0.59516215", "0.5941753", "0.5927876", "0.5919765", "0.58934814", "0.5878822", "0.58760214", "0.5872545", "0.58580303", "0.5849699", "0.58163226", "0.5813749", "0.5799936", "0.57928014", "0.5779986", "0.5771583", "0.5764168", "0.57526517", "0.5747938", "0.5746245", "0.57438296", "0.5703747", "0.5694959", "0.5661428", "0.56540334", "0.56460387", "0.5642175", "0.5639088", "0.56389666", "0.5628746", "0.5625029", "0.56146544", "0.5614065", "0.5597719", "0.55903345", "0.5573101", "0.55706", "0.5565831", "0.5564167", "0.55628383", "0.5557288", "0.5556063", "0.5553438", "0.5540882", "0.55259335", "0.5521639", "0.5508374", "0.54944694", "0.54933274", "0.54844534", "0.548163", "0.5472827", "0.5471236", "0.54666036", "0.54655904", "0.5461247", "0.5457605", "0.54575795", "0.5448953", "0.54414093", "0.5430224", "0.5420471", "0.54096186", "0.5408308", "0.5406821", "0.5406785", "0.5403623", "0.539002", "0.53816396", "0.53804624", "0.5371266", "0.5370812", "0.53671587", "0.53597337", "0.53557456", "0.53459865", "0.5338347", "0.5328711", "0.5327501" ]
0.0
-1
Constructor for objects of class Player
public Player(){ cards = new ArrayList<String>(); indexes = new ArrayList<Integer>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Player(){}", "public Player(){}", "public Player() {}", "public Player() {}", "public Player() {}", "public Player() {}", "public Player(){\r\n\r\n }", "public Player(){\n\n }", "public Player() {\t\n\t}", "public Player() {\n this(\"\", \"\", \"\");\n }", "public Player(){\n default_init();\n }", "public GamePlayer() {}", "public AbstractPlayer() {\r\n }", "public Player(String name) {\n this(name, null);\n }", "public Player(String name) {\r\n this.name = name;\r\n }", "Player(String playerName) {\n this.playerName = playerName;\n }", "public Player()\r\n\t{\r\n\t\tscore = 0;\r\n\t\tsetPlayerName();\r\n\t}", "public Player(){\r\n\t\tname = \"\";\r\n\t\tchip = 0;\r\n\t\tbet = 0;\r\n\t\tplayerHand = new PlayerHand();\r\n\t\ttable = null;\r\n\t}", "public Player()\n\t{\n\t\tmyName = DEFAULT_NAME;\n\t\tmyHand = new PokerHand(5);\n\t\tmyNumberWins = 0;\n\t\tmyAmAI = false;\n\t}", "public Player(String name)\n\t{\n\t\tthis.name = name;\n\t}", "public Player(String name) {\r\n this.name = name;\r\n// Maxnum = 0;\r\n special = 0;\r\n index = 0;\r\n }", "public Player(String s) //only constructor\n {\n \tsuper(s,1,false);\n \tposition=-1;\n \tship=false;\n \tSetHealth();\n \tSetWealth();\n }", "public Player(){\n reset();\n }", "public Player(String name) {\n this.NAME = name;\n this.ownedCountries = new ArrayList<>();\n this.totArmyCount = 0;\n this.PlayerTurn = false;\n }", "public Multi_Player()\r\n {\r\n \r\n }", "public Player(String name) {\n setName(name);\n setId(++idCounter);\n setHealthPoints(100);\n setYourTurn(false);\n }", "public Player(String name) {\n this.name = name;\n this.points = 0;\n }", "public Player() {\n hand = new Hand();\n }", "public computerPlayer(Player player) {\n\t\tsuper(player);\n\t\t\n\t}", "public Player(String name)\n {\n // initialise instance variables\n this.name = name;\n // start out with $100 in your wallet\n wallet = new Wallet(100);\n inventory = new HashMap<String, Item>();\n currentRoom = null;\n olcc = new OLCC();\n\n }", "public Player(Game game){\r\n this.game = game;\r\n }", "public Player(String username)\n\t{\n\t\tm_username = username;\n\t\tm_requests = new HashMap<String, RequestType>();\n\t}", "public Player() {\n//\t\thand = new Hand();\n\t\tthis.cardsInhand = new ArrayList<Card>();\n\t}", "public Player(String name)\n\t{\n\t\tthis.money = START_MONEY;\n\t\tthis.name = name;\n\t}", "public Player2(){\n super();\n name=\"110\";\n }", "public Player(String type){\n \n this.type = type;\n }", "public Player() {\r\n\t\tname=null;\r\n\t\tinitializeGameboard();\r\n\t\tlastRedNumber=2; \r\n\t\tlastYellowNumber=2;\r\n\t\tlastGreenNumber=12;\r\n\t\tlastBlueNumber=12;\r\n\t\tnegativePoints=0;\r\n }", "public StudentPlayer() {\n super(\"260740998\");\n }", "public TestPlayer()\n {\n }", "public HumanPlayer(String name) {\n super(name);\n }", "public Player()\n\t{\n\t\tsetUserName(\"\");\n\t\tsetFamilyName(\"\");\n\t\tsetGivenName(\"\");\n\t\tsetGamesPlayed(0);\n\t\tsetGamesWon(0);\n\t\tsetGamesDrawn(0);\n\t}", "public Player1() {\n dbg = new DBG(DBG.PLAYERS, \"Player1\");\n }", "public Player(String Name)\n {\n // initialise instance variables\n score = 0;\n energy = 100;\n this.name = Name;\n items = new ArrayList<>();\n }", "public StudentPlayer() {\n super(\"260622641\");\n }", "public StudentPlayer() {\n super(\"260719721\");\n }", "public Player(String inName)\n {\n // initialise instance variables\n mName = inName;\n mBrokenRules = new RuleBook();\n }", "Player createPlayer();", "public Player(Player p){\n this.dead = p.dead;\n this.hiddenTreasures = p.hiddenTreasures;\n this.level = p.level;\n this.name = p.name;\n this.pendingBadConsequence = p.pendingBadConsequence;\n this.visibleTreasures = p.visibleTreasures;\n }", "public Player()\n\t{\n\t\tthis.name = \"\";\n\t\tthis.numPlayed = 0;\n\t\tthis.numCompleted = 0;\n\t\tthis.averageTime = new Time(0);\n\t\tthis.bestTime = new Time(0);\n\t\tthis.accuracy = 0;\n\t}", "public StudentPlayer() {\r\n super(\"260767897\");\r\n }", "public Player(World world) {\n\n super(world, playerShape);\n addImage(idleImage);\n score = 0;\n lives = 3;\n\n }", "public Player() {\n\n\t\tnumberOfPlayers++;\n\t\tthis.playerNumber = \"Player \" + numberOfPlayers; \n\t\tthis.balance = 500.00; \n\t\tthis.numberOfLoans = 0;\n\t\tthis.score = 0;\n\t\tthis.inRound = true; \n\t}", "Player(String name){\n\t\tthis.name = name;\n\t}", "public Player(String name)\n {\n this.name = name;\n cash = 0;\n }", "public Player()\n // POST: A default Player object is created with all class members set to 0\n\t{\n\t\tthis(2000, 0);\n\t}", "public Player(int i){\r\n playerID=i;\r\n }", "public Player(String name, int x, int y) {\n \t\t\n \t\tsuper(x*Main.gridSize, y*Main.gridSize);\n \t\t\n \t\tsetMaxHP(100);\n \t\tsetMaxPP(100);\n \t\t\n \t\tsetLevel(1);\n \t\tsetExp(0);\n \t\t\n \t\tsetScene(0, 0);\n \t\t\n \t\tthis.name = name;\n \t}", "public Player() {\n\t\tscore = 0;\n\t}", "public Player()\r\n\t{\r\n\t\tpCards = new String[DECK_SIZE];\r\n\t\thandCount = 0;\r\n\t\tstand = false;\r\n\t}", "public HexComputerPlayer1(String name) {\n // invoke superclass constructor\n super(name); // invoke superclass constructor\n }", "public Game(){\n player = new Player(createRooms());\n parser = new Parser(); \n }", "public Player(String nickname) {\n this(nickname, -1, -1);\n }", "void createPlayer(Player player);", "public UserPlayer(){\n this.playerNum = 0;\n this.isLead = false;\n this.playerHand = new Hand();\n this.suitUserChose = null;\n }", "public Player(String name){\r\n\t\tthis.name = name;\r\n\t\tDie die = new Die();\r\n\t\tthis.die = die;\r\n\t}", "public Player()\r\n {\r\n playerItem = new ArrayList();\r\n }", "public Player() {\n fleetMap = new Map();\n battleMap = new Map();\n sunkShipNum = 0;\n }", "public RandomPlayer() {\n\t\tsuper(\"Random\");\n\t}", "public Player(String name) {\n\t\tthis.name = name;\n\t\tscore = 0;\n\t}", "public DefensivePlayers(){}", "public Player(String name) {\n this.name = name;\n this.badges = new LinkedList<>();\n }", "public Player(Position position) {\n this.position = position;\n this.image = new Image(\"O\");\n }", "public Player(Player p)\r\n {\r\n this(p.isCompletingGame, p.averageTime, p.fastestTime, p.gamesCompleted, p.rank, p.title, p.username);\r\n }", "public Player(Othello othello, char player) {\n\t\tthis.othello=othello;\n\t\tthis.player=player;\n\t\tthis.type = null;\n\t}", "public Player()\n {\n playerItem = new ArrayList();\n }", "public Player(String name) {\n this.name = name;\n gameDeck = new Deck(false);\n wonDeck = new Deck(false);\n }", "public Player(String name) {\r\n\t\tthis.name=name;\r\n\t\tinitializeGameboard();\r\n\t\tlastRedNumber=2; \r\n\t\tlastYellowNumber=2;\r\n\t\tlastGreenNumber=12;\r\n\t\tlastBlueNumber=12;\r\n\t\tnegativePoints=0;\r\n\t}", "public Player2(State state){\n super(state);\n name=\"110\";\n }", "public Command(int Player) {\r\n\t\tmyPlayer = Player;\r\n\t}", "public Player(){\n this.health = 9;\n this.orientation = Orientation.FACING_NORTH;\n evaluateSprite();\n }", "public Player(String unitId, int x, int y) {\n this(unitId, x, y, new Random());\n }", "Player()\n\t{\n\t\tiHP = 30;\n\t\tstrEquippedWeapon = \"None\";\n\t\tiLocation = 1;\n\t\tblnPlayerState = true;\n\t\tblnPlayerVictory = false;\n\t\tblnSearchedDirt = false;\n\t\tblnSearchedBarrels = false;\n\t\t\n\t}", "public Game() {\n\t\tbPlayer = new Player(false);\n\t\twPlayer = new Player(true);\n\t\t// TODO Auto-generated constructor stub\n\t}", "public Player() {\n\t\tsetDimensions(16, 16);\n\t\tsetLocation(512 + 16, 512 + 16);\n\t\tsetKeyBindings();\n\t}", "public Player(String playerId) {\n\t\tthis.playerid = playerId;\n\t\tthis.pieceType = null;\n\t}", "public ComputerPlayer()\r\n {\r\n x = 0;\r\n }", "public Pawn(Player player) {\n super(player);\n }", "public Game()//Method was given\n {\n parser = new Parser();\n player = new Player();\n }", "public Player(String name)\n { \n if (name == \"\")\n {\n setName(\"Anonymous\");\n }\n else\n {\n setName(name);\n }\n }", "public Player(int r, int c) { // contructor that makes the player object and declares the varaibles\r\n\t\t_row = r;\r\n\t\t_col = c;\r\n\t\t_isAlive = true;\r\n\t}", "public Player(int balance){\n this.hand = new Hand();\n this.balance = balance;\n this.scoreboard = new Scoreboard(balance);\n }", "public Player(Level level, double x, double y){\n\t\tsuper(level ,x, y);\n\t\tsprite = sprite.player;\n\t\twidth = sprite.getWidth();\n\t\theight = sprite.getHeight();\n\t\tspeed = 1.5;\n\t}", "public Player (String name) {\n this.name = name;\n score = 0;\n usedWords = new HashSet<>();\n }", "Player(int id, String name){\n\t\tthis();\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t}", "Player(String name, int health)\r\n {\r\n this.name = name;\r\n this.health = health;\r\n }", "public Player(String name){\n\t\tthis.name = name;\n\t\t//this.deck = new Deck(1);\n\t\t((Deck) this.deck).buildDeck();\n\t\t//this.inhand = new CardsGroup();\n\t\tthis.bench = new CardsGroup();\n\t\tthis.userDiscardPile = new CardsGroup();\n\t}", "private void initPlayers() {\n this.playerOne = new Player(1, 5, 6);\n this.playerTwo = new Player(2, 0, 1);\n this.currentPlayer = playerOne;\n\n }", "Player(String Name){\n\t\tthis.Name=Name;\n\t\tdate=new Date();\n\t\tthis.Score=Score;\n\t\tScore=0;\n\t}", "public Player() {\n\t\t\n\t\tif (Main.role == 0) this.role = Role.Attacker;\n\t\tif (Main.role == 1) this.role = Role.Defender;\n\t\t\n\t\tnavigator = Main.nav;\n\t\t\n\t\tballGrabber = new BallGrab();\n\t\t\n\t\tballPlatform[0] = Main.upperRightX + 35; //120\n\t\tballPlatform[1] = Main.upperRightY - 8; //165\n\t\t\n\t\tstartingCorner = Main.startingCorner;\n\t\t\n\t\t\n\t}", "public Player(){\n\t\tthis.cell = 0;\n\t}" ]
[ "0.8846843", "0.8846843", "0.8750101", "0.8750101", "0.8750101", "0.8750101", "0.8706595", "0.86768675", "0.86615485", "0.8353497", "0.8328291", "0.79638517", "0.79355764", "0.790654", "0.7851676", "0.78115505", "0.7786668", "0.77821946", "0.7757074", "0.77302176", "0.7727505", "0.7726524", "0.7718258", "0.7703822", "0.76875246", "0.768576", "0.7684139", "0.76360595", "0.7627603", "0.7619338", "0.761857", "0.7615486", "0.76130384", "0.76098657", "0.76088005", "0.7587435", "0.75777054", "0.7565171", "0.7564991", "0.75391185", "0.75357556", "0.75278455", "0.75084585", "0.7498766", "0.74981284", "0.7489657", "0.7465591", "0.7464938", "0.7441401", "0.7441333", "0.74261", "0.74108195", "0.7401813", "0.73966986", "0.73903877", "0.7382826", "0.737481", "0.7352838", "0.73252666", "0.73239976", "0.7315048", "0.73069024", "0.73058724", "0.7290492", "0.72894317", "0.72841895", "0.7276733", "0.7263758", "0.7257281", "0.72557914", "0.725283", "0.72361755", "0.7232973", "0.7230629", "0.72305197", "0.7215135", "0.72121733", "0.72051626", "0.7199333", "0.7198362", "0.71903306", "0.7162333", "0.7144337", "0.7139592", "0.7138165", "0.7137222", "0.7111681", "0.7087614", "0.708739", "0.7087308", "0.7082094", "0.707854", "0.70753145", "0.70712066", "0.7068609", "0.7059055", "0.70544696", "0.7049671", "0.70482975", "0.70360583" ]
0.7392923
54
Date currentTime = Calendar.getInstance().getTime();
@Override public void onClick(View v) { final String addedAmount = amount.getText().toString().trim(); final String comments = comment.getText().toString().trim(); if (!(addedAmount.isEmpty())) { AlertDialog.Builder builder = new AlertDialog .Builder(AddedCash.this); builder.setMessage("Do you want to insert Added cash of " + addedAmount + " Ksh ?"); builder.setTitle("Alert !"); builder.setCancelable(false); builder .setPositiveButton( "Yes", new DialogInterface .OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { Integer addedCash = Integer.valueOf(addedAmount); long timeMillis = System.currentTimeMillis(); insert(DateAndTime.getDate(),addedCash, comments); amount.setText(""); comment.setText(""); Toast.makeText(AddedCash.this,"Added successfully",Toast.LENGTH_SHORT).show(); } }); builder .setNegativeButton( "No", new DialogInterface .OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }); AlertDialog alertDialog = builder.create(); alertDialog.show(); } else { Toast.makeText(AddedCash.this,"Amount cannot be empty",Toast.LENGTH_SHORT).show(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date getCurrentTime() {\r\n return currentTime.getTime();\r\n }", "public static Date now() {\n return Calendar.getInstance().getTime();\n }", "public static Date now() {\n return Calendar.getInstance().getTime();\n }", "private static long getCurrentTime() {\n return (new Date()).getTime();\n }", "static long getDateTime(){\n return System.currentTimeMillis();\n }", "private long now() {\n\treturn System.currentTimeMillis();\n }", "public long getCurrentTime() {\n return currentTime;\n }", "private String getCurrentTimestamp() {\n\n String mytime = java.text.DateFormat.getTimeInstance().format(Calendar.getInstance().getTime());\n String mydate =java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime());\n return mytime;\n }", "public double getCurrentTime() {\n\t\treturn currentTime;\n\t}", "public CurrentDate getCurrentDate() { \n return mCurrentDate; \n }", "long getCurrentTimeMs() {\n return System.currentTimeMillis();\n }", "public String getCurrentTime() {\n return currentTime;\n }", "protected long getCurrentTime() {\n return System.currentTimeMillis();\n }", "long getCurrentDateTimeMillis() {\n return System.currentTimeMillis();\n }", "public Date getTime() {\n return new Date(currentTime.getTime());\n }", "private String getCurrentDate() {\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n Calendar cal = Calendar.getInstance();\n return dateFormat.format(cal.getTime());\n }", "long getCurrentTimeMs();", "public float getCurrentTime()\n\t{\n\t\treturn currentTime;\n\t}", "int getTime();", "int getTime();", "protected Date getCurrentDateAndTime() {\n\t\tDate date = new Date();\n\t\tDate updatedDate = new Date((date.getTime() + (1000 * 60 * 60 * 24)));//(1000 * 60 * 60 * 24)=24 hrs. **** 120060 = 2 mins\n\t\treturn updatedDate;\n\t}", "public static Date now()\r\n\t{\r\n\t\treturn new Date(System.currentTimeMillis());\r\n\t}", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "long getTime();", "public static Date getCurrentDate() {\r\n\t\tCalendar calendar = Calendar.getInstance();\r\n\t\tjava.util.Date currentDate = calendar.getTime();\r\n\t\tDate date = new Date(currentDate.getTime());\r\n\t\treturn date;\r\n\t}", "public static Date getCurrentDate() {\n return new Date();\n }", "private Date getTime(long millis){\n\tCalendar calender = Calendar.getInstance();\r\n\tcalender.setTimeInMillis(millis);\r\n\treturn calender.getTime();\r\n\t\r\n\t\r\n}", "public Date getTimeNow() {\r\n return timeNow;\r\n }", "public Date getCurrentDate() {\n\t\treturn new Date();\n\t}", "public float getCurrentTime()\r\n\t{\r\n\t\tcurrenttime = Calendar.getInstance();\r\n\t\treturn currenttime.getTimeInMillis();\r\n\t}", "private String getCurrentTime() {\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\n Date date = new Date();\n return dateFormat.format(date);\n }", "public Date getCurrentDate()\r\n {\r\n return (m_currentDate);\r\n }", "@Override\n\tpublic long getCurrentTime() {\n\t\treturn 0;\n\t}", "public static String getCurrentTime()\n\t{\n\t\treturn getTime(new Date());\n\t}", "private String currentTime()\t{\n\t\tCalendar c = Calendar.getInstance(); \n\n\t\tString seconds;\n\t\tif(c.get(Calendar.SECOND) < 10)\t{\n\t\t\tseconds = \"0\"+Integer.toString(c.get(Calendar.SECOND));\n\t\t} else {\n\t\t\tseconds = Integer.toString(c.get(Calendar.SECOND));\n\t\t}\n\n\t\tString minutes;\n\t\tif(c.get(Calendar.MINUTE) < 10)\t{\n\t\t\tminutes = \"0\"+Integer.toString(c.get(Calendar.MINUTE));\n\t\t} else {\n\t\t\tminutes = Integer.toString(c.get(Calendar.MINUTE));\n\t\t}\n\n\t\tString hours;\n\t\tif(c.get(Calendar.HOUR_OF_DAY) < 10)\t{\n\t\t\thours = \"0\"+Integer.toString(c.get(Calendar.HOUR_OF_DAY));\n\t\t} else {\n\t\t\thours = Integer.toString(c.get(Calendar.HOUR_OF_DAY));\n\t\t}\n\n\t\tString day;\n\t\tif(c.get(Calendar.DATE) < 10)\t{\n\t\t\tday = \"0\"+Integer.toString(c.get(Calendar.DATE));\n\t\t} else {\n\t\t\tday = Integer.toString(c.get(Calendar.DATE));\n\t\t}\n\n\t\tString month;\n\t\tif((c.get(Calendar.MONTH)+1) < 10)\t{\n\t\t\tmonth = \"0\"+Integer.toString(c.get(Calendar.MONTH)+1);\n\t\t} else {\n\t\t\tmonth = Integer.toString(c.get(Calendar.MONTH)+1);\n\t\t}\n\n\t\tString year;\n\t\tif(c.get(Calendar.YEAR) < 10)\t{\n\t\t\tyear = \"0\"+Integer.toString(c.get(Calendar.YEAR));\n\t\t} else {\n\t\t\tyear = Integer.toString(c.get(Calendar.YEAR));\n\t\t}\n\n\t\treturn day+\"/\"+month+\"/\"+year + \" \"+hours+\":\"+minutes+\":\"+seconds;\t\n\t}", "public static String getCurrentTime() {\r\n\t\tDate date = new Date();\r\n\t\treturn date.toString();\r\n\t}", "public static long getTime() {\r\n\t\treturn System.currentTimeMillis();\r\n\t}", "public static String getCurrentTimeStamp(){\n try {\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\n // Find todays date\n String currentDateTime = dateFormat.format(new Date());\n\n return currentDateTime;\n } catch (Exception e) {\n e.printStackTrace();\n\n return null;\n }\n }", "public long getTime();", "public long now() {\n return System.currentTimeMillis();\n }", "private Date getCurrentDateTime() {\n return Date.from(LocalDateTime.now().atZone(ZoneId.systemDefault()).toInstant());\n }", "DateTime getTime();", "private static java.sql.Timestamp getCurrentDate() {\n\n\t\tjava.sql.Timestamp date = new java.sql.Timestamp(new java.util.Date().getTime());\n\t\treturn date;\n\t}", "public int getTime() { return _time; }", "public static String getTime() {\r\n\r\n\t\t//Gets current date and time\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\tDate date = new Date();\r\n\t\tcurrDateTime = dateFormat.format(date);\r\n\t\treturn currDateTime;\r\n\t}", "public String getCurrentDateAndTime(){\n return dateTimeFormatter.format(current);\n }", "String getCurTime();", "public long getCurrentTimeMillis() {\n return System.currentTimeMillis();\n }", "private String currentDateTime() {\n DateFormat df = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSSZ\");\n String date = df.format(Calendar.getInstance().getTime());\n return date;\n }", "public Date getCurrentDate() {\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.HOUR_OF_DAY, 0); // ! clear would not reset the hour of day !\n cal.clear(Calendar.MINUTE);\n cal.clear(Calendar.SECOND);\n cal.clear(Calendar.MILLISECOND);\n\n Date currentDate = cal.getTime();\n return currentDate;\n }", "public long getTime(){\n return this.time;\n }", "Date getTimeStamp();", "public static String getDate()\r\n {\r\n Date now = new Date();\r\n DateFormat df = new SimpleDateFormat (\"yyyy-MM-dd'T'hh-mm-ss\");\r\n String currentTime = df.format(now);\r\n return currentTime; \r\n \r\n }", "protected fr.inria.phoenix.diasuite.framework.datatype.daytime.DayTime getCurrentTime() throws Exception {\n return _currentTime;\n }", "private Date getCurrentDate() {\n return Date.from(LocalDate.now().atStartOfDay(ZoneId.systemDefault()).toInstant());\n }", "public static String getCurrentDateTime()\n\t{\n\t\treturn getDateTime(new Date());\n\t}", "public LocalDateTime getCurrentTime() {\n return clock.instant().atZone(ZoneId.systemDefault()).toLocalDateTime();\n }", "public long getTime() {\n\t\treturn date.getTime();\n }", "public static String getCurrentDate()\n\t{\n\t\treturn getDate(new Date());\n\t}", "String getTime(){\n\t\tCalendar c = Calendar.getInstance();\n int mseconds = c.get(Calendar.MILLISECOND);\n String currentDateandTime = mDateFormat.format(new Date()) + String.format(\"-%04d\", mseconds);\n \n return currentDateandTime;\n\t}", "Date getTimestamp()\n{\n return time_stamp;\n}", "public String getCurrentDateTime(){\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\n \"yyyy-MM-dd HH:mm:ss\", Locale.getDefault()\n );\n Date date = new Date();\n return simpleDateFormat.format(date);\n }", "private static String getDate() {\n return new SimpleDateFormat(\"yyyyMMddHHmmss\").format\n (new Date(System.currentTimeMillis()));\n }", "public String getCurrentDate() {\n return currentDate;\n }", "public static String getCurrentTime(){\n Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone(\"Asia/Singapore\"));\n Date currentDate = calendar.getTime();\n return currentDate.toString();\n }", "private String getDate()\r\n\t{\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\r\n\t\treturn sdf.format(cal.getTime());\r\n\t}", "private java.sql.Timestamp getCurrentTimeStamp() {\n\n\t\tjava.util.Date today = new java.util.Date();\n\t\treturn new java.sql.Timestamp(today.getTime());\n\n\t}", "public long getCurrentDate() {\n\t\treturn LocalDate.now().atStartOfDay(ZONE).toInstant().toEpochMilli();\n\t}", "long time() {\r\n\t\treturn System.currentTimeMillis();\r\n\t}", "public org.ros.message.Time getCurrentTime() {\n return time.getCurrentTime();\n }", "double getTime();", "private long getCurrentTimeInMillionSeconds(){\n Date currentData = new Date();\n return currentData.getTime();\n }", "public static Date getNowUtilDate()\n {\n return new Date();\n }", "void setCurrentTime(long currentTime);", "public static String getNowTime(){\r\n\t\tDate date = new Date();\r\n\t\tDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\tString time = format.format(date);\r\n\t\treturn time;\r\n\t}", "public String getCurrentTime() {\r\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"dd/MM/yyyy HH:mm:ss\"); //https://www.javatpoint.com/java-get-current-date\r\n LocalDateTime now = LocalDateTime.now();\r\n return dtf.format(now);\r\n }", "public abstract long now();", "public void setcurrent_time() {\n\t\tthis.current_time = LocalTime.now();\n\t}", "public static void currentDateTime() {\n // Just the date\n LocalDate date = LocalDate.now();\n System.out.println(\"LocalDate now: \" + date);\n\n // Just the time\n LocalTime time = LocalTime.now();\n System.out.println(\"LocalTime now: \" + time);\n\n // Date and time\n LocalDateTime dateTime = LocalDateTime.now();\n System.out.println(\"LocalDateTime now: \" + dateTime);\n\n // Date, time and time zone! Fancy\n ZonedDateTime zonedDateTime = ZonedDateTime.now();\n System.out.println(\"ZonedDateTime now: \" + zonedDateTime);\n System.out.println();\n }", "private long CurrentTime(){\n return (TotalRunTime + System.nanoTime() - StartTime)/1000000;\n }", "public float getCurrentTime () {\n\t\treturn timer;\n\t}", "public Date getDate() {\n return this.currentDate;\n }", "private static String currentTimestamp()\r\n {\n \r\n long currentTime = System.currentTimeMillis();\r\n sCalendar.setTime(new Date(currentTime));\r\n \r\n String str = \"\";\r\n str += sCalendar.get(Calendar.YEAR) + \"-\";\r\n \r\n final int month = sCalendar.get(Calendar.MONTH) + 1;\r\n if (month < 10)\r\n {\r\n str += 0;\r\n }\r\n str += month + \"-\";\r\n \r\n final int day = sCalendar.get(Calendar.DAY_OF_MONTH);\r\n if (day < 10)\r\n {\r\n str += 0;\r\n }\r\n str += day;\r\n \r\n str += \"T\";\r\n \r\n final int hour = sCalendar.get(Calendar.HOUR_OF_DAY);\r\n if (hour < 10)\r\n {\r\n str += 0;\r\n }\r\n str += hour + \":\";\r\n \r\n final int minute = sCalendar.get(Calendar.MINUTE);\r\n if (minute < 10)\r\n {\r\n str += 0;\r\n }\r\n str += minute + \":\";\r\n \r\n final int second = sCalendar.get(Calendar.SECOND);\r\n if (second < 10)\r\n {\r\n str += 0;\r\n }\r\n str += second + \".\";\r\n \r\n final int milli = sCalendar.get(Calendar.MILLISECOND);\r\n str += milli;\r\n \r\n str += \"Z\";\r\n \r\n return str;\r\n }", "public Instant now() {\n return _clock.instant();\n }", "public static long now() {\n return System.nanoTime();\n }", "public static float getCurrentTime(){\n return (float)(System.currentTimeMillis()-t0)/1000.0f;\r\n }", "public Calendar getTime () {\n return this.time;\n }", "public static String getDate() {\n\t\tString\ttoday=\"\";\n\n\t\tCalendar Datenow=Calendar.getInstance();\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t today = formatter.format(Datenow.getTime());\n\n\t return today;\n\t}", "public static long time() {\n return date().getTime();\n }", "public String currentDate() {\n DateFormat df = new SimpleDateFormat(\"dd-MM-yyyy\");\n String date = df.format(Calendar.getInstance().getTime());\n return date;\n }", "public Date getSystemDateTime(){\n\t\tDate systemDate = new Date();\t\t\n\t\treturn systemDate;\n\t}" ]
[ "0.77315027", "0.7536944", "0.7536944", "0.75274855", "0.7525281", "0.7494304", "0.737909", "0.7268929", "0.7257321", "0.725322", "0.72385156", "0.7209542", "0.7178848", "0.7169831", "0.71625173", "0.71601003", "0.7148734", "0.71259624", "0.71237177", "0.71237177", "0.71044576", "0.710214", "0.70734906", "0.70734906", "0.70734906", "0.70734906", "0.70734906", "0.70734906", "0.70734906", "0.70734906", "0.70734906", "0.70734906", "0.70734906", "0.70734906", "0.707185", "0.7067207", "0.69924057", "0.6986751", "0.6961242", "0.6945805", "0.694441", "0.69313776", "0.6930523", "0.68974423", "0.6865111", "0.68611705", "0.6850766", "0.6849934", "0.6828845", "0.6824088", "0.68148166", "0.68119806", "0.6810857", "0.6804577", "0.6803456", "0.6783697", "0.6782649", "0.67817414", "0.67759854", "0.6768497", "0.67596143", "0.6753512", "0.6747165", "0.67226905", "0.6721641", "0.6705955", "0.670342", "0.6693833", "0.6689345", "0.66826653", "0.66798985", "0.66711456", "0.6670587", "0.6667523", "0.6654956", "0.66388905", "0.663838", "0.6631601", "0.66238636", "0.6610927", "0.66095436", "0.66045964", "0.66012883", "0.6600159", "0.65887016", "0.6578679", "0.6559284", "0.6557593", "0.65556556", "0.6549227", "0.65342164", "0.6523935", "0.65191895", "0.65119445", "0.65001094", "0.6497852", "0.6484717", "0.6484277", "0.64806277", "0.6480176", "0.64732873" ]
0.0
-1
Functions for loading icon while verifying login
public void showProgressDialog() { if (mProgressDialog == null) { mProgressDialog = new ProgressDialog(this); mProgressDialog.setCancelable(false); mProgressDialog.setCanceledOnTouchOutside(false); mProgressDialog.setMessage(getString(R.string.msg_loading)); mProgressDialog.setIndeterminate(true); } mProgressDialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override public void showLoading() {\n LoginViewState vs = (LoginViewState) viewState;\n vs.setShowLoading();\n\n errorView.setVisibility(View.GONE);\n setFormEnabled(false);\n }", "private void loadLogin(){\n }", "private void displayLoader() {\n pDialog = new ProgressDialog(RegisterActivity.this);\n pDialog.setMessage(\"Signing Up.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "@Override\n\t\t\t\t\tpublic void onLoginSuccess() {\n\t\t\t\t\t\tToast.makeText(TestRolateAnimActivity.this, \"登录成功\",\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\tloginBtn.setVisibility(View.GONE);\n\t\t\t\t\t\tlogoutBtn.setVisibility(View.VISIBLE);\n\t\t\t\t\t}", "private void showLogin() {\n \t\tLogin.actionHandleLogin(this);\n \t}", "public final void showLoadingIndicator(boolean z) {\n if (z) {\n ProgressBar progressBar = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLogin);\n if (progressBar != null) {\n progressBar.setVisibility(0);\n return;\n }\n return;\n }\n ProgressBar progressBar2 = (ProgressBar) _$_findCachedViewById(C2723R.C2726id.pbLogin);\n if (progressBar2 != null) {\n progressBar2.setVisibility(8);\n }\n }", "private void showIndicator() {\n mProgressBarHolder.setVisibility(View.VISIBLE);\n mEmailView.setFocusableInTouchMode(false);\n mEmailView.setFocusable(false);\n mEmailView.setEnabled(false);\n mPasswordView.setFocusableInTouchMode(false);\n mPasswordView.setFocusable(false);\n mPasswordView.setEnabled(false);\n mRegister.setEnabled(false);\n mEmailSignInButton.setEnabled(false);\n }", "public FrmLogin() {\n initComponents();\n //lbl_cadeado.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/sigma/imagens/security.png\")))\n this.setIconImage(new ImageIcon(getClass().getResource(\"/clinica/imagens/cadeado.png\")).getImage());\n }", "private void initUIAfterLogin() {\n lnLoggedOutState.setVisibility(View.GONE);\n lnLoggedInState.setVisibility(View.VISIBLE);\n initUserProfileUI();\n }", "public void showLoading() {\n }", "@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2)\n private void showLoginProgress(final boolean show) {\n // On Honeycomb MR2 we have the ViewPropertyAnimator APIs, which allow\n // for very easy animations. If available, use these APIs to fade-in\n // the progress spinner.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {\n int shortAnimTime = getResources().getInteger(\n android.R.integer.config_shortAnimTime);\n\n mLoginStatusView.setBackground(new BitmapDrawable(getResources(),\n ImageUtils.decodeSampledBitmapFromResource(getResources(),\n R.drawable.end_form_1280x768, screenWidth, screenHeight)\n ));\n\n mLoginStatusView.setVisibility(View.VISIBLE);\n mLoginStatusView.animate().setDuration(shortAnimTime)\n .alpha(show ? 1 : 0)\n .setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mLoginStatusView.setVisibility(show ? View.VISIBLE\n : View.GONE);\n }\n });\n\n mFinishGameView.setVisibility(View.VISIBLE);\n mFinishGameView.animate().setDuration(shortAnimTime)\n .alpha(show ? 0 : 1)\n .setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n mFinishGameView.setVisibility(show ? View.GONE\n : View.VISIBLE);\n }\n });\n } else {\n // The ViewPropertyAnimator APIs are not available, so simply show\n // and hide the relevant UI components.\n mLoginStatusView.setVisibility(show ? View.VISIBLE : View.GONE);\n mFinishGameView.setVisibility(show ? View.GONE : View.VISIBLE);\n }\n }", "private void setLoginMarker() {\n\t\tif (pass.getText().toString().equals(Config.RESET_PASSWORD)) {\n\t\t\tupdateStatusText();\n\t\t\tscrollView.setVisibility(View.VISIBLE);\n\t\t\tsendScroll();\n\t\t} else\n\t\t\tscrollView.setVisibility(View.GONE);\n\n\t\tif (((pass.getText().length() == 4) && ((inTruckMode && (vehicle != null)) || (!inTruckMode && (site != null))))\n\t\t\t\t|| (pass.getText().toString().equals(Config.RESET_PASSWORD))) {\n\t\t\tbtn_connect.setImageResource(R.drawable.green_mark);\n\t\t\tbtn_connect.setClickable(true);\n\t\t} else {\n\t\t\tbtn_connect.setImageResource(R.drawable.white_mark);\n\t\t\tbtn_connect.setClickable(false);\n\t\t}\n\t}", "private void displayProgressDialog() {\n pDialog.setMessage(\"Logging In.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n }", "public void LoginButton() {\n\t\t\r\n\t}", "public void clickOnLogin() throws FileNotFoundException, IOException, ParseException, InterruptedException\n\t{\n\t\tnew WebDriverWait(driver, 10).until(ExpectedConditions.invisibilityOfElementLocated(By.className(\"yokart-loader\")));\n\t\twaitForVisibility(clicklogin);\n\t\tclicklogin.click();\n\t}", "public void loadLoginUI()\r\n\t{\r\n\t\tString logoImagePath = GameConstants.PATH_UI_IMAGES + \"hawkstersvmk_100px.png\";\r\n\t\tString emailImagePath = GameConstants.PATH_UI_IMAGES + \"email.png\";\r\n\t\tString passwordImagePath = GameConstants.PATH_UI_IMAGES + \"password.png\";\r\n\t\tString loginImagePath = GameConstants.PATH_UI_IMAGES + \"login.png\";\r\n\t\t\r\n\t\tfinal LoginModule loginModule = new LoginModule();\r\n\t\t\r\n\t\tthis.removeAll();\r\n\t\t\r\n\t\t// set general properties of the main window frame\r\n\t\tthis.setPreferredSize(new Dimension(800, 600));\r\n\t\tthis.setSize(800,600);\r\n\t\tthis.setLayout(null);\r\n\t\t\r\n\t\t// logo label\r\n\t\tfinal JLabel logoLabel = new JLabel(AppletResourceLoader.getImageFromJar(logoImagePath));\r\n\t\tlogoLabel.setBounds(new Rectangle(loginOffsetX + 10, loginOffsetY + 10, 100, 128));\r\n\t\tadd(logoLabel);\r\n\t\t\r\n\t\t// Email label\r\n\t\tfinal JLabel emailLabel = new JLabel(AppletResourceLoader.getImageFromJar(emailImagePath));\r\n\t\temailLabel.setBounds(new Rectangle(loginOffsetX + 125, loginOffsetY + 100, 75, 25));\r\n\t\tadd(emailLabel);\r\n\t\t\r\n\t\t// Password label\r\n\t\tfinal JLabel passwordLabel = new JLabel(AppletResourceLoader.getImageFromJar(passwordImagePath));\r\n\t\tpasswordLabel.setBounds(new Rectangle(loginOffsetX + 125, loginOffsetY + 130, 75, 25));\r\n\t\tadd(passwordLabel);\r\n\t\t\r\n\t\t// Email text box\r\n\t\tfinal JTextField emailTextBox = new JTextField();\r\n\t\temailTextBox.setBorder(null);\r\n\t\temailTextBox.setBounds(new Rectangle(loginOffsetX + 205, loginOffsetY + 100, 150, 25));\r\n\t\tadd(emailTextBox);\r\n\t\t\r\n\t\t// Password text box\r\n\t\tfinal JPasswordField passwordTextBox = new JPasswordField();\r\n\t\tpasswordTextBox.setBorder(null);\r\n\t\tpasswordTextBox.setBounds(new Rectangle(loginOffsetX + 205, loginOffsetY + 130, 150, 25));\r\n\t\tadd(passwordTextBox);\r\n\t\t\r\n\t\t// \"Error\" label\r\n\t\tfinal JLabel errorLabel = new JLabel(\"* Invalid email/password combination *\", JLabel.CENTER);\r\n\t\terrorLabel.setForeground(Color.ORANGE);\r\n\t\terrorLabel.setBackground(new Color(0, 128, 0));\r\n\t\terrorLabel.setBounds(new Rectangle(loginOffsetX + 0, loginOffsetY + 165, 400, 25));\r\n\t\terrorLabel.setVisible(false);\r\n\t\tadd(errorLabel);\r\n\t\t\r\n\t\t// Login button\r\n\t\tfinal JButton loginButton = new JButton(AppletResourceLoader.getImageFromJar(loginImagePath));\r\n\t\tloginButton.setBackground(new Color(0, 128, 0));\r\n\t\tloginButton.setBounds(new Rectangle(loginOffsetX + 150, loginOffsetY + 200, 75, 25));\r\n\t\tloginButton.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\t// trim the email and password for whitespace upon a login attempt\r\n\t\t\t\temailTextBox.setText(emailTextBox.getText().trim());\r\n\t\t\t\tpasswordTextBox.setText(new String(passwordTextBox.getPassword()).trim());\r\n\t\t\t\t\r\n\t\t\t\tloginButton.setEnabled(false);\r\n\t\t\t\temailTextBox.setEnabled(false);\r\n\t\t\t\tpasswordTextBox.setEnabled(false);\r\n\t\t\t\t\r\n\t\t\t\t// check the login credentials\r\n\t\t\t\tif(loginModule.login(emailTextBox.getText(), new String(passwordTextBox.getPassword())))\r\n\t\t\t\t{\r\n\t\t\t\t\t// correct credentials and authentication\r\n\t\t\t\t\terrorLabel.setVisible(false);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// load up the Room Viewer window\r\n\t\t\t\t\tif(!loginModule.getUsername().trim().equals(\"\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// set basic properties based upon the login result\r\n\t\t\t\t\t\troomViewerUI.setAvatarBasicData(new AStarCharacterBasicData(loginModule.getUsername(), emailTextBox.getText(), loginModule.getGender(), loginModule.getContentRating(), loginModule.getCredits()));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// close the login window\r\n\t\t\t\t\tloginLoadRoomViewerUI();\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// incorrect credentials\r\n\t\t\t\t\terrorLabel.setText(loginModule.getErrorMessage());\r\n\t\t\t\t\terrorLabel.setVisible(true);\r\n\t\t\t\t\t\r\n\t\t\t\t\tloginButton.setEnabled(true);\r\n\t\t\t\t\temailTextBox.setEnabled(true);\r\n\t\t\t\t\tpasswordTextBox.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tadd(loginButton);\r\n\t\t\r\n\t\t// set a background color\r\n\t\tsetBackground(Color.black); // black\r\n\t\t//setBackground(new Color(0,128,0)); // medium-green\r\n\t\t\r\n\t // pack the window and display it\r\n\t this.setName(\"Hawk's Virtual Magic Kingdom\");\r\n\t this.setVisible(true);\r\n\t \r\n\t repaint();\r\n\t \r\n\t roomViewerUI = this;\r\n\t}", "public Login() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"214302.png\")));\n }", "private void displayProgressDialog() {\n pDialog.setMessage(\"Logging in.. Please wait...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n\n }", "public void premutoLogin()\n\t{\n\t\tnew _FINITO_funzione_loginGUI();\n\t}", "public Login() {\n initComponents();\n lblstar.setVisible(false); // hide the red star that indicates that the user didnt fill in a form\n lblstar1.setVisible(false);\n }", "public ForgotPassword() {\n initComponents();\n setTitle(\"File Locker\");\n ImageIcon logo = new ImageIcon(\"logo.jpg\");\n this.setIconImage(logo.getImage());\n }", "private void showLoginScreen()\n {\n logIngEditText.setVisibility(View.VISIBLE);\n passwordEditText.setVisibility(View.VISIBLE);\n loginButton.setVisibility(View.VISIBLE);\n textViewLabel.setVisibility(View.VISIBLE);\n }", "public login() {\n initComponents();\n jLabel4.setIcon(null);\n jLabel4.setText(null);\n jLabel7.setVisible(false);\n setLocationRelativeTo(null);\n this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n }", "public Login() {\n initComponents();\n this.getContentPane().setBackground(new Color(255,255,255));\n int [] background = UI.frameBackGround();\n jPanel1.setBackground(new Color(background[0],background[1],background[2]));\n int [] backgroundBtn = UI.buttonBackground();\n login.setBackground(new Color(backgroundBtn[0],backgroundBtn[1],backgroundBtn[2]));\n ImageIcon icon = new ImageIcon(getClass().getResource(\"/files/Logo.png\"));\n this.setIconImage(icon.getImage());\n }", "@Override\n public void onLoginClicked(String username, String password) {\n loginView.showProgress();\n loginInteractor.authorize(username, password, this);\n }", "private void checkIfAtLogin(){\n checkIfIdDisplayed(R.id.login_main_view);\n checkIfIdDisplayed(R.id.username_text_input);\n checkIfIdDisplayed(R.id.password_text_input);\n checkIfIdDisplayed(R.id.login_button);\n }", "private void showLoading()\n {\n relLoadingPanel.setVisibility(View.VISIBLE);\n ViewHelper.setViewGroupEnabled(scrMainContainer, false);\n }", "@Override\n public void enableProgressBar() {\n et_log_email.setEnabled(false);\n et_log_password.setEnabled(false);\n acb_login.setVisibility(View.GONE);\n acb_register.setVisibility(View.GONE);\n\n //Enable progressbar\n pb_login.setVisibility(View.VISIBLE);\n }", "public Login() {\n initComponents();\n txtAccountStatus.setVisible(false); \n showDate(); // Class para sa Date\n showTime(); // Class para sa Time\n }", "void showLoading(boolean isLoading);", "public pageLogin() {\n initComponents();\n labelimage.setBorder(new EmptyBorder(0,0,0,0));\n enterButton.setBorder(null);\n enterButton.setContentAreaFilled(false);\n enterButton.setVisible(true);\n usernameTextField.setText(\"Username\");\n usernameTextField.setForeground(new Color(153,153,153));\n passwordTextField.setText(\"Password\");\n passwordTextField.setForeground(new Color(153,153,153));\n usernameAlert.setText(\" \");\n passwordAlert.setText(\" \");\n \n }", "private void checkLogin() {\n SharedPref sp = new SharedPref(this);\n if (!sp.readLoginStatus()) {\n Intent i = new Intent(this, LoginActivity.class);\n i.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);\n startActivity(i);\n }\n }", "public T01Login() {\n initComponents();\n btnMenu.setVisible(false);\n }", "public static void login() {\n\t\trender();\n\t}", "@Override public void showLoginForm() {\n LoginViewState vs = (LoginViewState) viewState;\n vs.setShowLoginForm();\n\n errorView.setVisibility(View.GONE);\n\n setFormEnabled(true);\n //loginButton.setLoading(false);\n }", "public LoginUser() {\n initComponents();\n setIconImage(new ImageIcon(getClass().getResource(\"/resources/uTorrent.gif\")).getImage());\n// jLabel3.setVisible(false);\n// cmbGudang.setVisible(false);\n\n // this.setState(Frame.ICONIFIED);\n txtKasir.addFocusListener(txtFoculListener);\n txtPass.addFocusListener(txtFoculListener);\n \n }", "protected final void showLoadingDialog() {\n }", "public void openLoginMenu()\n {\n login.drawMainMenu();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tmLoading.start(\"正在登陆中。。。\");\n\t\t}", "public Login() {\n initComponents();\n\n // Centra la ventana\n this.setLocationRelativeTo(null);\n\n // Cambia el ícono de la ventana de Login\n this.setIconImage(new ImageIcon(getClass().getResource(\"/imagenes/login.png\")).getImage());\n }", "private void showRequestLoginForm() {\n final LayoutInflater li = LayoutInflater.from(FinishGameActivity.this);\n final View loginView = li.inflate(R.layout.popup_login_confirm, null);\n final AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(FinishGameActivity.this);\n final ImageView loginBtn = (ImageView) loginView.findViewById(R.id.login_confirm_button);\n mUsernameView = (EditText) loginView.findViewById(R.id.login_confirm_username);\n mPasswordView = (EditText) loginView.findViewById(R.id.login_confirm_password);\n final AlertDialog loginAlertDialog = alertDialogBuilder.create();\n loginAlertDialog.setView(loginView);\n loginBtn.setOnTouchListener(motionButtonListener);\n loginBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n v.postOnAnimation(new Runnable() {\n @Override\n public void run() {\n if (GeneralHelper.hasConnection()) {\n attemptLogin(loginAlertDialog);\n } else {\n final AlertDialog alertDialog = new AlertDialog.Builder(FinishGameActivity.this, AlertDialog.THEME_HOLO_DARK).create();\n // Setting Dialog Title\n alertDialog.setTitle(\"ASEAN Game\");\n alertDialog.setMessage(\"No Internet connection!\");\n alertDialog.setButton(DialogInterface.BUTTON_NEGATIVE, \"Close\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // Invokes inserting bundled data into the database.\n alertDialog.cancel();\n }\n });\n alertDialog.show();\n }\n }\n });\n }\n });\n loginAlertDialog.show();\n }", "public void showLoading() {\n loadingLayout.setVisibility(View.VISIBLE);\n mapView.setVisibility(View.GONE);\n errorLayout.setVisibility(View.GONE);\n }", "public void onLoginClick()\n {\n user.setEmail(email.getValue());\n user.setPassword(password.getValue());\n\n if(!user.isValidEmail())\n {\n Toast.makeText(context, \"Invalid Email\", Toast.LENGTH_SHORT).show();\n }\n\n else if(!user.isValidPassword())\n {\n Toast.makeText(context, \"Password Should be Minimum 6 Characters\", Toast.LENGTH_SHORT).show();\n }\n\n else if(user.isValidCredential())\n {\n getBusy().setValue(View.VISIBLE);\n\n doLogin(user.getEmail(),user.getPassword());\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run()\n {\n getBusy().setValue(View.GONE);\n\n // Toast.makeText(context, \"Login Successful\", Toast.LENGTH_SHORT).show();\n /* Intent intent = new Intent(context, NewsActivity.class);\n intent.putExtra(\"USER_OBJ\", user);\n context.startActivity(intent);\n */\n\n\n }\n }, 500);\n }\n\n else\n {\n Toast.makeText(context, \"Invalid Credentials\", Toast.LENGTH_SHORT).show();\n }\n }", "public loginGUI() {\r\n\r\n\t\tsuper.frame.setTitle(\"Login\");\r\n\t\ttry {\r\n\t\t\tJLabel label = new JLabel(new ImageIcon(ImageIO.read(new File(\"..\\\\images\\\\login-background.png\"))));\r\n\t\t\tframe.setContentPane(label);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Image doesn't exist...\");\r\n\t\t}\r\n\r\n\t\tcopyright();\r\n\t\tlabels();\r\n\t\ttextField();\r\n\t\tstartButton();\r\n\t\tsignup();\r\n\r\n\t\tsuper.frame.setVisible(true);\r\n\t}", "public interface LoginView {\n\n void showLoading();\n\n void dismissLoading();\n\n}", "void displayLoadingErrorMessage();", "private void setLaunchPageStatus() {\n double rWidth = rootPanel.getWidth();\n double rHeight = rootPanel.getHeight();\n // set login page advertisement icon\n loginAdsIcons[0] = new ImageIcon(rootPath.concat(\"/img/xingbake1.jpg\"));\n loginAdsIcons[1] = new ImageIcon(rootPath.concat(\"/img/xingbake2.jpg\"));\n loginAdsIcons[2] = new ImageIcon(rootPath.concat(\"/img/xingbake3.jpg\"));\n loginAdsIcons[3] = new ImageIcon(rootPath.concat(\"/img/kendeji1.jpg\"));\n loginAdsIcons[4] = new ImageIcon(rootPath.concat(\"/img/kendeji2.jpg\"));\n double raRatio = 0.33;\n for(ImageIcon icon: loginAdsIcons) {\n Utils.setIconByHeight(raRatio,rHeight,icon);\n }\n launchAdsLabel.setText(\"\");\n // set wifi icons\n wifiLaunchIcons[0] = new ImageIcon(rootPath + \"/img/launch1.png\");\n wifiLaunchIcons[1] = new ImageIcon(rootPath + \"/img/launch2.png\");\n wifiLaunchIcons[2] = new ImageIcon(rootPath + \"/img/launch3.png\");\n wifiLaunchIcons[3] = new ImageIcon(rootPath + \"/img/launch4.png\");\n double rlRatio = 0.2;\n for(ImageIcon icon: wifiLaunchIcons) {\n Utils.setIconByWidth(rlRatio,rWidth,icon);\n }\n launchIcon = wifiLaunchIcons[3];\n Utils.setIconByWidth(rlRatio,rWidth,rootPath.concat(\"/img/unLaunch.png\"));\n wifiIconLabel.setText(\"\");\n // set visibility\n connectStatusL.setVisible(false);\n connectStatusL.setText(\"\");\n // set connect status icon\n connectedIcon = new ImageIcon(rootPath + \"/img/connected.png\");\n connectedOpaqueIcon = new ImageIcon(rootPath + \"/img/connected_opaque.png\");\n unconnectedIcon = new ImageIcon(rootPath + \"/img/unconnected.png\");\n connectingIcon = new ImageIcon(rootPath + \"/img/connecting.png\");\n double rcRatio = 0.03;\n ImageIcon connIcons[] = {connectedIcon,connectedOpaqueIcon,unconnectedIcon,connectingIcon};\n for(ImageIcon icon: connIcons) {\n Utils.setIconByWidth(rcRatio,rWidth,icon);\n }\n // set icons\n connectStatusL.setIcon(connectedIcon);\n }", "public abstract boolean showLogin();", "private void showLoginFailed() {\n try {\n Toast.makeText(getApplicationContext(), \"Login Failed\", Toast.LENGTH_SHORT).show();\n } catch (Exception e) {\n Looper.prepare();\n Toast.makeText(getApplicationContext(), \"Login Failed\", Toast.LENGTH_SHORT).show();\n Looper.loop();\n }\n }", "@Test(priority = 1)\n\tprotected void landingpageVerification() {\n\t\tAssert.assertEquals(spincoLandingPage.isLogoDisplayed(),true);\n\t\tspincoLandingPage.clickLoginRegister();\n\t}", "private void showSignInBar() {\n Log.d(TAG, \"Showing sign in bar\");\n findViewById(R.id.sign_in_bar).setVisibility(View.VISIBLE);\n findViewById(R.id.sign_out_bar).setVisibility(View.GONE);\n }", "public static void showLogin() throws IOException {\n Main.FxmlLoader(LOGINPAGE_PATH);\n }", "private void loadLogin() throws IOException{\n FXMLLoader loginLoader = new FXMLLoader(getClass().getResource(\"/com/slackers/inc/Boundary/FXML/loginregisterform.fxml\"));\n Parent login = loginLoader.load();\n String cssDoc = getClass().getResource(\"/com/slackers/inc/Boundary/CSS/custom.css\").toExternalForm();\n login.getStylesheets().add(cssDoc);\n\n LoginController loginController = loginLoader.getController();\n loginController.setMainController(this);\n\n Stage stage = new Stage();\n stage.setTitle(\"Login or Signup\");\n stage.setScene(new Scene(login));\n stage.showAndWait();\n\n\n if (userController.getUser().getEmail() == null || userController.getUser().getEmail().equals(\"\")\n || userController.getUser().getPassword() == null || userController.getUser().getPassword().equals(\"\")) {\n Platform.exit();\n System.exit(1);\n }\n\n programPref.put(\"email\", userController.getUser().getEmail());\n try {\n programPref.put(\"password\", CryptoTools.encrypt(userController.getUser().getPassword(), programPref));\n } catch (GeneralSecurityException | IOException e) {\n e.printStackTrace();\n Notifications.create().title(\"Username Not Saved\").text(\"Could not save username and password for reiterations. Please try again later.\").showError();\n System.out.println(\"Could not save username and password for reiterations\");\n }\n\n }", "public static void showLoadingDialog(Context context) {\n// mDialog = new MaterialDialog.Builder(context)\n// .title(R.string.login_dialog_title)\n// .content(R.string.login_dialog_content)\n// .progress(true, 0)\n// .widgetColor(context.getResources().getColor(R.color.colorPrimary))\n// .show();\n }", "private void showLoading() {\n hideNoNetwork();\n mRecipesBinding.fragmentRecipesProgressBar.setVisibility(View.VISIBLE);\n }", "@Override\r\n\t\tpublic void onLoadingComplete(String arg0, View arg1, Bitmap arg2) {\n\t\t\tholder.app_icon.setVisibility(View.VISIBLE);\r\n\t\t}", "@Override\n public void onClick(View view)\n {\n String email = email_from_layout.getText().toString();\n final String password = password_from_layout.getText().toString();\n validate_input validate= new validate_input(login_activity.this,getApplicationContext());\n\n if(validate.isValidEmail(email) && validate.isValidPassword(password))\n {\n\n progressBar_from_layout.setVisibility(View.VISIBLE);\n\n // Authenticate the user\n firebaseAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(login_activity.this, new OnCompleteListener<AuthResult>()\n {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task)\n {\n progressBar_from_layout.setVisibility(View.GONE);\n\n if(!task.isSuccessful())\n {\n helperFunctions_class.showToast(login_activity.this,\"User Login Failed\");\n login_label_from_layout.setText(\"Login Failed!!\\n Please try again\");\n progressBar_from_layout.setVisibility(View.GONE);\n }\n else\n {\n progressBar_from_layout.setVisibility(View.GONE);\n\n call_register_details_activity_page();\n\n\n }\n }\n });\n }\n else\n {\n login_label_from_layout.setText(\"Login Failed!!\\n Please try again\");\n }\n\n\n\n }", "public boolean verifyPageLoad() {\n\t\tboolean result = lnkLoginButton.isDisplayed();\n\t\tLog.info(\"Home Page Loaded Successfully\");\n\t\treturn result;\n\t}", "public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}", "public void btnLoginClicked() {\n String username = txfUsername.getText();\n String password = txfPassword.getText();\n DatabaseController database = new DatabaseController(new TuDbConnectionFactory());\n Authentication auth = new Authentication(database);\n if (auth.signIn(username, password)) {\n Player player = new Player(username, database.getPersonalTopScore(username));\n game.setScreen(new PreGameScreen(game,\"music/bensound-funkyelement.mp3\", player));\n } else {\n txfUsername.setColor(Color.RED);\n txfPassword.setColor(Color.RED);\n }\n }", "public LoginW() {\n this.setUndecorated(true);\n initComponents();\n origin = pnlBackG.getBackground();\n lblErrorLogin.setVisible(false);\n this.setLocationRelativeTo(null);\n Fondo();\n }", "public void clickLogin() {\n\t\tcontinueButton.click();\n\t}", "public ImageIcon getLoadingIcon() {\n\t\ttry {\n\t\t\treturn new ImageIcon(Image.class.getResource(\"/qu/master/blockchain/gui//resources/loading.gif\"));\n\t\t}\n\t\t\n\t\tcatch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public void validateCredentials(ObjLogin objLogin, Context mContext) {\n if (loginView != null) {\n loginView.showProgress();\n loginInteractor.login(objLogin, this, mContext);\n }\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n //caso sucesso ao fazer login usuario\n if (task.isSuccessful()){\n progressBarLogin.setVisibility(View.GONE);\n //instancio a activity de destino\n startActivity(new Intent(getApplicationContext(),SolicitacaoAreaActivity.class));\n finish();//fecha a activity atual\n }else{\n Toast.makeText(AutentinticacaoActivity.this,\n \"Erro ao fazer login\",\n Toast.LENGTH_SHORT).show();\n progressBarLogin.setVisibility(View.GONE);\n }\n\n\n }", "public void onModuleLoad() {\n\t final Label pleaseLogIn = new Label(\"Please Log In\");\n\t \n\t final Grid grid = new Grid(3, 2);\n\t \n\t final Label loginPrompt = new Label(\"Login\");\n\t final TextBox textBox = new TextBox();\n\t \n\t final Label passwordPrompt = new Label(\"Password\");\n\t final PasswordTextBox passwordTextbox = new PasswordTextBox();\n\t \n\t final Button buttonLogin = new Button(\"Login\");\n\t final Button buttonCancel = new Button(\"Cancel\");\n\t \n\t grid.setWidget(0, 0, loginPrompt);\n\t grid.setWidget(0, 1, textBox);\n\t \n\t grid.setWidget(1, 0, passwordPrompt);\n\t grid.setWidget(1, 1, passwordTextbox);\n\t \n\t grid.setWidget(2, 0, buttonLogin);\n\t grid.setWidget(2, 1, buttonCancel);\n\t \n\t RootPanel.get().add(pleaseLogIn);\n\t RootPanel.get().add(grid);\n\t}", "public Login() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "Icon getSplashImage();", "@Override\n public void showSplash() {\n }", "public void clickIconSignin()\n\t{\n \telementUtils.performElementClick(wbIconSignin); //wbIconSignin.click();\n\t}", "@Override\n\tpublic void onActivate() {\n\t\tsetCurrentPageWhenReady(StaticPageNames.Core_UserLogin, 30, pageName -> {\n\t\t\t//TODO: Show error popup\n\t\t\tlogger.severe(\"Failed to load Login page, timed out while waiting for page!\");\n\t\t});\n\t}", "private void initsimpleLoginPanel() {\n\t\tfont1 = new Font(\"黑体\",Font.PLAIN,18);\n\t\tfont2 = new Font(\"黑体\",Font.BOLD,18);\n\t\tJLabel bg = new PictureLabel(\"src/main/java/image/3.jpg\");\n\t\tbg.setBounds(0,0,this.getWidth(),this.getHeight());\n\t\t\n\t\tUserID = new JLabel(\"用 户 名:\",JLabel.LEFT);\n\t\tUserID.setFont(new Font(\"华文细黑\",Font.PLAIN,18));\n\t\tUserID.setBounds(330, 230, 130, 80);\n\t\tid = new JTextField(20);\n\t\tid.setBounds(408, 250, 230, 40);\n\t\tid.addKeyListener(new KeyListener(){\n\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif(e.getKeyCode()==KeyEvent.VK_ENTER){\n\t\t\t\t\te.consume();\n\t\t\t\t\t KeyboardFocusManager.getCurrentKeyboardFocusManager().focusNextComponent();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tPassword = new JLabel(\"密 码:\",JLabel.LEFT);\n\t\tPassword.setFont(new Font(\"华文细黑\",Font.PLAIN,18));\n\t\tPassword.setBounds(330, 312, 130, 80);\n\t\t\n\t\tkey = new JPasswordField(20);\n\t\tkey.setBounds(408, 330, 230, 40);\n\t\tkey.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlogin();\n\t\t\t}\t\t\t\n\t\t});\t\n\t\t\n\t\tlogin = new JButton(\"登录\");\n\t\tlogin.setFont(font1);\n\t\tlogin.setBounds(550, 420, 80, 40);\n\t\tlogin.setFocusPainted(false);\n\t\tlogin.setContentAreaFilled(false);\n\t\tlogin.addMouseListener(new MouseListener(){\n\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlogin();\n\t\t\t}\n\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\n\t\t\t}\n\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlogin.setFont(font2);\n\t\t\t}\n\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tlogin.setFont(font1);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\t\n\t\texit = new JButton(\"取消\");\n\t\texit.setFont(font1);\n\t\texit.setBounds(408, 420, 80, 40);\n\t\texit.setFocusPainted(false);\n\t\texit.setContentAreaFilled(false);\n\t\texit.addMouseListener(new MouseListener(){\n\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tsimpleLoginPanel.this.setVisible(false);\t\n\t\t\t\tClient.frame.remove(simpleLoginPanel.this);\n\t\t\t\tClient.frame.add(new simpleWelcomePanel());\n\t\t\t\tClient.frame.repaint();\n\t\t\t}\n\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\texit.setFont(font2);\n\t\t\t}\n\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\texit.setFont(font1);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tthis.add(login);\n\t\tthis.add(exit);\n\t\tthis.add(id);\n\t\tthis.add(key);\n\t\tthis.add(UserID);\n\t\tthis.add(Password);\n\t\tthis.add(bg);\n\t}", "public void showLoadingScreen() {\n setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\n getSelectGameScreenIfActive().ifPresent(new Consumer<SelectGameScreen>() {\n @Override\n public void accept(SelectGameScreen gameScreen) {\n gameScreen.setDisabled();\n }\n });\n }", "public AccesoLogin() {\n initComponents();\n this.setSize(410, 500);\n this.setResizable(false);\n this.setLocationRelativeTo(null);\n this.setIconImage(new ImageIcon(getClass().getResource(\"/imagenes/principal/logo.png\")).getImage());\n this.setTitle(\"ACCESO - SISTEMA ENRAMADA SALAS (SIENSA)\");\n }", "@Override\n public void onClick(View v) {\n Log.d(TAG, new Date().toString());\n mONIDSignupWV.setVisibility(View.VISIBLE);\n mONIDSignupWV.loadUrl(\"https://login.oregonstate.edu/idp/profile/cas/login?service=http://web.engr.oregonstate.edu/~habibelo/ihc_server/appscripts/studentsignup.php\");\n getSupportLoaderManager().initLoader(IHC_STUDENT_SIGNUP_LOADER_ID, null, SignupPageActivity.this);\n }", "private void LoginOwner() {\n Transaksi.setEnabled(false);\n Transaksi.setVisible(false);\n }", "public interface LoginView {\n\n void showLoadingDialog();\n\n void hideLoadingDialog();\n\n void loginSuccess(String userName);\n\n void loginError(String errorInfo);\n\n}", "void successLogin();", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()){\n\n //progressDialog.dismiss(); - no need to dismiss the logInAnim\n\n\n //load the main page fragment\n\n //I am also required to do a little memory management here. I think if I pass in the widget's instances,\n //on attachment of the fragment, I'll be able to remove the bitmaps and manage memory better. Probably use the getter methods\n //Done in onCreateView, at the fragment, having gotten the widgets using the getter methods\n MainScreenFragment fragment = new MainScreenFragment();\n FragmentManager manager = getFragmentManager();\n manager.beginTransaction().replace(R.id.fragmentHolder,fragment).commit();\n }else{\n //Toast.makeText(getApplicationContext(),\"Failed to log in. Please check your details and try again\",Toast.LENGTH_LONG).show();\n\n //progressDialog.setMessage(\"Failed to log in. Please check your details\");\n //progressDialog.setCanceledOnTouchOutside(true);\n\n //Stop logInAnim and reshow loginbutton\n //mLogInAnim.clearAnimation();\n //stopLogInAnim();\n\n //set repeat to false\n repeat = false;\n\n mTxtFail.setVisibility(View.VISIBLE);\n mTxtFail.startAnimation(mExpandLR);\n\n }\n }", "public void loggedIn(){\n Button view = findViewById(R.id.buttonView);\n view.setVisibility(View.VISIBLE);\n Button logout = findViewById(R.id.buttonLogout);\n logout.setVisibility(View.VISIBLE);\n EditText username = findViewById(R.id.username);\n username.setVisibility(View.INVISIBLE);\n EditText pass = findViewById(R.id.password);\n pass.setVisibility(View.INVISIBLE);\n Button login = findViewById(R.id.buttonLogin);\n login.setVisibility(View.INVISIBLE);\n Button createAcc = findViewById(R.id.buttonCreateAccount);\n createAcc.setVisibility(View.INVISIBLE);\n TextView accountName = findViewById(R.id.accountName);\n accountName.setVisibility(View.VISIBLE);\n accountName.setText(user);\n }", "public Login() {\n initComponents();\n hideregister ();\n }", "public void ensureIsNotVisibleLoginBtn() {\n (new WebDriverWait(driver, 10)).until(ExpectedConditions.invisibilityOfElementLocated(By.id(\"signInBtn\")));\n }", "public LoginFrame() {\n initComponents();\n this.setIconImage(new ImageIcon(getClass().getResource(\"/image/Home/Logo Company.png\")).getImage());\n //\n UIManager UI = new UIManager();\n UI.put(\"OptionPane.background\", Color.white);\n UI.put(\"Panel.background\", Color.white);\n //\n setBackground(new Color(0, 0, 0, 0));\n setLocationRelativeTo(null);\n userNameTextField.requestFocus();\n setTitle(\"Click Login\");\n }", "void showLoading(boolean visible);", "public ReceptionistSingIn() {\n initComponents();\n setVisible(true);\n setResizable(false);\n setTitle(\"Receptionist Sign In\");\n setLocationRelativeTo(null);\n }", "private void checkToLogin() {\n Intent intent = new Intent(this, LoginActivity.class);\n startActivityForResult(intent, ConstantValue.LOG_IN_CODE);\n }", "public login() {\n initComponents();\n \n \n }", "private void login(){\n displayPane(loginP);\n }", "public frm_LoginPage() {\n initComponents();\n setIcon();\n txt_userName.setText(\"\");\n txt_userName.requestFocus();\n password_password.setText(\"\");\n }", "public void onLoginCompleted() {\r\n\t\tLog.d(TAG, \"Login was completed\");\r\n\t\t/* Transition to the gridview which will hold the images */\r\n\t\tIntent viewAllImages = new Intent(this,ImageGridView.class);\r\n this.startActivityForResult(viewAllImages, 0);\r\n\t}", "private void showLoading() {\n mRecycleView.setVisibility(View.INVISIBLE);\n /* Finally, show the loading indicator */\n mLoadingIndicator.setVisibility(View.VISIBLE);\n }", "@Override\r\n\t\tpublic void onLoadingCancelled(String arg0, View arg1) {\n\t\t\tholder.app_icon.setVisibility(View.VISIBLE);\r\n\t\t}", "@Override\n public void onSuccess() {\n login_success = true;\n showInfoAndGoto();\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(LogInActivity.this, \"Login success\", Toast.LENGTH_SHORT).show();\n startActivity(new Intent(getApplicationContext(), SelectionActivity.class));\n finish();\n loginButton.setEnabled(true);\n progressBar.setVisibility(View.GONE);\n } else {\n Toast.makeText(LogInActivity.this, \"Your email or password is incorrect \"+task.getException(), Toast.LENGTH_SHORT).show();\n loginButton.setEnabled(true);\n progressBar.setVisibility(View.GONE);\n }\n }", "public Login() {\n initComponents();\n setIconImage(new ImageIcon(getClass().getResource(\"/login/imagenes/logo_150px.png\")).getImage()); //cambiar icono\n LOGO.requestFocusInWindow(); //hacer que no se focusee el textfield usuario ni bien abrir el programa\n this.setLocationRelativeTo(null);\n }", "void loginDone();", "@Override\n public void showLoading() {\n Log.i(Tag, \"showLoading\");\n }", "public void loginScreen() {\n\t\t\n\t\t//Initialize windows\n\t\tDimension loginSize = new Dimension(loginWidth, loginHeight);\n\t\tloginWindow = new JFrame(\"Login\");\n\t\tloginWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tloginWindow.setSize(loginSize);\n\t\tloginWindow.setBackground(new Color(51, 153, 255));\n\t\tloginWindow.setLayout(new BorderLayout());\n\t\tloginWindow.setResizable(false);\n\t\tloginWindow.setLocationRelativeTo(null);\n\t\t\n\t\t//Set Background\n\t\tJLabel background = new JLabel(new ImageIcon(\"Resource/loginBackground.jpg\"));\n\t\tbackground.setBounds(0, 0, loginWidth, loginHeight);\n\t\tloginWindow.add(background);\n\t\t\n\t\t//LoginIcon JLabel\n\t\tJLabel loginIcon = new JLabel(new ImageIcon(\"Resource/EOS-icon.png\"));\n\t\tloginIcon.setBounds(255, 30, 90, 90);\n\t\tbackground.add(loginIcon);\n\t\t\n\t\t//Username JLabel\n\t\tJLabel usernameL = new JLabel(\"Username\");\n\t\tusernameL.setForeground(Color.LIGHT_GRAY);\n\t\tusernameL.setBackground(Color.WHITE);\n\t\tusernameL.setFont(masterFont);\n\t\tusernameL.setOpaque(true);\n\t\tusernameL.setEnabled(false);\n\t\tusernameL.setBounds(215, 145, 200, 35);\n\t\tbackground.add(usernameL);\n\t\t\n\t\t//UserIcon JLabel\n\t\tImageIcon userIcon = new ImageIcon(\"Resource/username.png\");\n\t\tImage userImage = userIcon.getImage().getScaledInstance(35, 35, Image.SCALE_SMOOTH);\n\t\tJLabel userIconL = new JLabel(new ImageIcon(userImage));\n\t\tuserIconL.setBounds(180, 145, 35, 35);\n\t\tuserIconL.setOpaque(true);\n\t\tbackground.add(userIconL);\n\t\t\n\t\t//Username JTextField\n\t\tusernameTF = new JTextField();\n\t\tusernameTF.setBounds(215, 145, 200, 35);\n\t\tusernameTF.setOpaque(false);\n\t\tusernameTF.addMouseListener(this);\n\t\tbackground.add(usernameTF);\n\t\t\n\t\t//Password JLabel\n\t\tJLabel passwordL = new JLabel(\"Password\");\n\t\tpasswordL.setForeground(Color.LIGHT_GRAY);\n\t\tpasswordL.setBackground(Color.WHITE);\n\t\tpasswordL.setFont(masterFont);\n\t\tpasswordL.setOpaque(true);\n\t\tpasswordL.setEnabled(false);\n\t\tpasswordL.setBounds(215, 210, 200, 35);\n\t\tbackground.add(passwordL);\n\t\t\n\t\t//PasswordIcon JLabel\n\t\tImageIcon passwordIcon = new ImageIcon(\"Resource/password.png\");\n\t\tImage passwordImage = passwordIcon.getImage().getScaledInstance(35, 35, Image.SCALE_SMOOTH);\n\t\tJLabel passwordIconL = new JLabel(new ImageIcon(passwordImage));\n\t\tpasswordIconL.setBounds(180, 210, 35, 35);\n\t\tpasswordIconL.setOpaque(true);\n\t\tbackground.add(passwordIconL);\n\n\t\t//Password JPasswordField\n\t\tpasswordPF = new JPasswordField();\n\t\tpasswordPF.setBounds(215, 210, 200, 35);\n\t\tpasswordPF.setForeground(Color.BLACK);\n\t\tpasswordPF.setOpaque(false);\n\t\tpasswordPF.addMouseListener(this);\n\t\tbackground.add(passwordPF);\n\t\t\n\t\t//Login JButton\n\t\tJButton loginB = new JButton(\"LOGIN\");\n\t\tloginB.setBounds(200, 280, 95, 45);\n\t\tloginB.setFont(masterFont);\n\t\tloginB.setOpaque(true);\n\t\tloginB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \tlogin = true;\n\t \tif (usernameTF.getText().equals(\"jmn7080\")) {\n\t \t\t\n\t \t\t//Retrieve password input by user\n\t\t\t\tchar[] input = passwordPF.getPassword();\n\t\t\t\tchar[] correctPassword = { 's', 'a', 'v', 'e', 'm', 'e'};\n\t\t\t\t\t\n\t\t\t\tif (isPasswordCorrect(input, correctPassword)) {\n\t\t\t\t\tloginWindow.dispose();\n\t\t\t\t\tcreateTempData();\n\t\t\t\t\tteacherPortalScreen();\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(loginWindow,\"Incorrect login or password\",\n\t\t\t\t\t\t\t\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\tpasswordPF.setText(\"\");\n\t\t\t \t}\n\t } else {\n\t\t\t\tJOptionPane.showMessageDialog(loginWindow,\"Invalid username\",\n\t\t\t\t\t\t\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\tusernameTF.setText(\"\");\n\t\t\t\tpasswordPF.setText(\"\");\n\t }\n\t }\n\t \t});\n\t\tbackground.add(loginB);\n\t\t\n\t\t//Sign-up JButton\n\t\tJButton signupB = new JButton(\"SIGN UP\");\n\t\tsignupB.setBounds(305, 280, 95, 45);\n\t\tsignupB.setFont(masterFont);\n\t\tsignupB.setOpaque(true);\n\t\tsignupB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \tloginWindow.dispose();\n\t \t\tnewUserScreen();\n\t }\n\t \t});\n\t\tbackground.add(signupB);\n\t\t\n\t\t//Forgot Username JButton\n\t\tJButton forgotUsernameB = new JButton(\"Forgot your username?\");\n\t\tforgotUsernameB.setBounds(200, 180, 200, 35);\n\t\tforgotUsernameB.setFont(new Font(\"Candara\", Font.PLAIN, 12));\n\t\tforgotUsernameB.setOpaque(false);\n\t\tforgotUsernameB.setContentAreaFilled(false);\n\t\tforgotUsernameB.setBorderPainted(false);\n\t\tforgotUsernameB.setForeground(Color.WHITE);\n\t\tforgotUsernameB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \tloginWindow.dispose();\n\t \t\t//forgotUsernameScreen();\n\t }\n\t \t});\n\t\tbackground.add(forgotUsernameB);\n\t\t\n\t\t//Forgot Password JButton\n\t\tJButton forgotPasswordB = new JButton(\"Forgot your password?\");\n\t\tforgotPasswordB.setBounds(200, 240, 200, 35);\n\t\tforgotPasswordB.setFont(new Font(\"Candara\", Font.PLAIN, 12));\n\t\tforgotPasswordB.setOpaque(false);\n\t\tforgotPasswordB.setContentAreaFilled(false);\n\t\tforgotPasswordB.setBorderPainted(false);\n\t\tforgotPasswordB.setForeground(Color.WHITE);\n\t\tforgotPasswordB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t \tloginWindow.dispose();\n\t \t\t//forgotPasswordScreen();\n\t }\n\t \t});\n\t\tbackground.add(forgotPasswordB);\n\t\t\n\t\t//Display the window\n\t\tloginWindow.pack();\n\t\tloginWindow.setVisible(true);\n\t}", "private void attemptLogin() {\n if (mAuth == null) {\n return;\n }\n showIndicator();\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n mEmailView.requestFocus();\n hideIndicator();\n return;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n mEmailView.requestFocus();\n hideIndicator();\n return;\n }\n\n // Check for nonempty password\n if (TextUtils.isEmpty(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n mPasswordView.requestFocus();\n hideIndicator();\n return;\n }\n\n // TODO is it a good idea to move this to function? will it show in memory?????\n mAuth.signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n hideIndicator();\n Intent intent = new Intent(LoginActivity.this, ItemListActivity.class);\n startActivity(intent);\n } else {\n hideIndicator();\n // show error\n Toast.makeText(LoginActivity.this, task.getException().getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "void showMainLoadingWheel();", "public interface ILoginView {\n //等待加载\n void showLoading();\n\n String getUserName();\n\n String getPassword();\n\n void dismissLoading();\n\n void goMainTabActivity();\n\n void alert(String s);\n}" ]
[ "0.6804783", "0.66385144", "0.6614599", "0.6608382", "0.65792793", "0.64598095", "0.6375945", "0.635375", "0.6306731", "0.6272058", "0.6264237", "0.6239322", "0.6205909", "0.61937314", "0.61915034", "0.6183311", "0.61484456", "0.6140479", "0.6138595", "0.61050797", "0.6065933", "0.6052568", "0.60462826", "0.6043291", "0.6042395", "0.6030505", "0.6011654", "0.5993459", "0.59930634", "0.5990077", "0.5985938", "0.5977186", "0.5973734", "0.5963561", "0.59633857", "0.5957184", "0.5955536", "0.59437156", "0.5939012", "0.59194213", "0.5915417", "0.5909503", "0.58871484", "0.5885686", "0.588515", "0.5877508", "0.5876342", "0.58600837", "0.58564353", "0.5855104", "0.584873", "0.58467025", "0.58407253", "0.5834061", "0.5830146", "0.5808625", "0.58086234", "0.5806348", "0.5793468", "0.579288", "0.57923025", "0.5785258", "0.5772471", "0.5754167", "0.5751022", "0.57502484", "0.5745539", "0.5744421", "0.574084", "0.57337487", "0.5732666", "0.5725238", "0.5722166", "0.5720344", "0.5720275", "0.57095325", "0.5708965", "0.57034034", "0.5702379", "0.56983835", "0.5696473", "0.568529", "0.5684697", "0.56811243", "0.5673387", "0.5673114", "0.5672226", "0.5670733", "0.56623775", "0.56615394", "0.5660514", "0.5660435", "0.5653995", "0.5653441", "0.5652962", "0.5652644", "0.56474614", "0.56473994", "0.5641858", "0.5628139", "0.56216085" ]
0.0
-1
Unregister receiver when not needed for memory management
@Override protected void onDestroy() { super.onDestroy(); unregisterReceiver(broadcastReceiver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void unregister();", "private void unregisterReceivers() {\n \t\t\n\t\tunregisterReceiver(newReadingsReceiver);\n\t\tunregisterReceiver(sensorStatusReceiver);\n\t\tunregisterReceiver(servalMeshStatusReceiver);\n \t}", "private void cleanupReceiver ()\n {\n if (receiver != null)\n {\n unregisterReceiver(receiver);\n receiver = null;\n }\n }", "public void unregister() {\n this.dispatcher.context.unregisterReceiver(this);\n }", "@Override\n\t\t\t\t\tpublic void myUnregisterReceiver(BroadcastReceiver receiver)\n\t\t\t\t\t{\n\t\t\t\t\t\tunregisterReceiver(receiver);\n\t\t\t\t\t}", "@Override\n public void onDestroy() {\n this.unregisterReceiver(mReceiver);\n }", "public void unregisterReceiver() {\n try {\n mContext.unregisterReceiver(mReceiver);\n } catch (IllegalArgumentException e) {\n }\n }", "private void m17251h() {\n this.f13994d.unregisterReceiver(this.f13995e);\n }", "@Override\n protected void onUnregister() {\n Core.unregister(this);\n }", "public void unregister() {\n unregistered = true;\n }", "@Override\n protected void onDestroy() {\n unregisterReceiver(mReceiver);\n super.onDestroy();\n }", "private void deregisterBroadcastReceiver(){\n activity.unregisterReceiver(hceNotificationsReceiver);\n }", "@Override\n protected void onDestroy() {\n unregisterReceiver();\n super.onDestroy();\n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n unregisterReceiver(myReceiver);\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tunregisterReceiver(mReceiver);\n\t}", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tunregisterReceiver(mReceiver);\r\n\t}", "@Override\n protected void onDestroy() {\n super.onDestroy();\n unregisterReceiver(receiver);\n }", "public void m4567b() {\n try {\n LocalBroadcastManager.getInstance(this.f4212b).unregisterReceiver(this);\n } catch (Exception e) {\n }\n }", "@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tthis.unregisterReceiver(receiver);\n\t}", "@Override\n public void unregister(Object subscriber) {\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t\n\t\tif(mReceiver != null) unregisterReceiver(mReceiver);\n\t}", "@Override\n protected void onDestroy() {\n Log.e(TAG, \"onDestroy\");\n unregisterReceiver(mReceiver);\n super.onDestroy();\n }", "private void m22003b() {\n if (this.f23836h) {\n this.f23833e.unregisterReceiver(this.f23837i);\n this.f23836h = false;\n }\n }", "public void unregister(T o);", "protected abstract void unregisterObserver();", "public void unregister(Observer obj);", "@Override\n protected void onDestroy() {\n stopRepTask();\n LocalBroadcastManager.getInstance(this).unregisterReceiver(DayStartedMessageRec);\n LocalBroadcastManager.getInstance(this).unregisterReceiver(DayEndedMessageRec);\n LocalBroadcastManager.getInstance(this).unregisterReceiver(TermEndedMessageRec);\n LocalBroadcastManager.getInstance(this).unregisterReceiver(SoundAlteredRec);\n LocalBroadcastManager.getInstance(this).unregisterReceiver(SharesTransactionedRec);\n LocalBroadcastManager.getInstance(this).unregisterReceiver(SpecificElementUpdate);\n super.onDestroy();\n }", "private void unregisterBroadcastReceivers(){\n if (mBufferBroadcastIsRegistered)\n try {\n this.unregisterReceiver(BufferBroadcastReceiver);\n mBufferBroadcastIsRegistered=false;\n }catch (Exception e){\n e.printStackTrace();\n }\n\n /**unregister broadcastReceiver for seekBar*/\n if (mSeekBarBroadcastIsRegistered){\n try {\n this.unregisterReceiver(seekBarBroadcastReceiver);\n mSeekBarBroadcastIsRegistered=false;\n }catch (Exception e){\n e.printStackTrace();\n }\n }\n\n /** register broadcastReceiver for afterCall alertDialog\n * in StopService in case of call while playing */\n\n }", "public void unregisterNotify( Notify notify );", "public void mo29430b() {\n Log.w(\"MessageCenter\", \"unregistering MessageCenter's Broadcast Receiver\");\n C1049a.m3996a(this.f9292a).mo4058a((BroadcastReceiver) this.f9298g);\n }", "@Override\n public void deregisterForMessage(CommReceiver recClass) {\n commSender.deregisterForMessage(recClass);\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tif(sendReceiver != null){\n\t\t\tunregisterReceiver(sendReceiver);\n\t\t}\n\t\tif(deliverReceiver != null){\n\t\t\tunregisterReceiver(deliverReceiver);\n\t\t}\n\t}", "@Override\n public void onDetach() {\n super.onDetach();\n if (busIsRegistered) {\n BusService.getBus().unregister(this);\n busIsRegistered = false;\n }\n }", "public abstract void unregisterListeners();", "public void unregister()\n\t{\n\t\tcancelPrevRegisterTask();\n\n\t\tpushRegistrar.unregisterPW(mContext);\n\t}", "@Override\n protected void onDestroy() {\n LocalBroadcastManager.getInstance(this).unregisterReceiver(mMessageReceiver);\n super.onDestroy();\n }", "@Override\n protected void onDestroy() {\n LocalBroadcastManager.getInstance(this).unregisterReceiver(\n mMessageReceiver);\n super.onDestroy();\n }", "@Override\n protected void onUnregistered() throws RemoteException {\n\n }", "@Override\n public void onDestroy() {\n super.onDestroy();\n activity.unregisterReceiver(brocast);\n }", "private void unregisterReceivers() {\n LocalBroadcastManager.getInstance(getActivity()).unregisterReceiver(userUpdater);\n postChangeController.unregisterReceivers(getActivity());\n }", "public abstract void unregisterDataReceiverToAndroid(Context context);", "public void onDestroy() {\n PackageManagerActivity.super.onDestroy();\n LocalBroadcastManager.getInstance(this).unregisterReceiver(this.h);\n }", "@Override\n public void onDestroy() {\n LocalBroadcastManager.getInstance(getContext()).unregisterReceiver(us);\n LocalBroadcastManager.getInstance(getContext()).unregisterReceiver(ud);\n super.onDestroy();\n }", "@Override\n\tpublic void onDestroy() {\n\t\tthis.unregisterReceiver(notifyServiceReceiver);\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tif(otgReceiver!=null){\n\t\t\tunregisterReceiver(otgReceiver);\n\t\t}\n\t\tif(finishReceiver!=null){\n\t\t\tunregisterReceiver(finishReceiver);\n\t\t}\n\t}", "public final void onDeregistration()\n {\n onObjectDeregistration();\n this.container = null;\n }", "@Override\n\tprotected void onDestroy() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onDestroy();\n\t\ttry {\n\t\t\tunregisterReceiver(mHandleMessageReceiver);\n\t\t\tGCMRegistrar.onDestroy(this);\n\t\t} catch (Exception e) {\n\n\t\t\tLog.e(\"UnRegister Receiver Error\", \"> \" + e.getMessage());\n\t\t}\n\t}", "@Override\n protected void onDestroy() {\n super.onDestroy();\n unregisterReceiver(mCtstReceiver);\n }", "void unregisterAll();", "boolean unregister(Counter counter);", "private void unregisterAfterCallBroadcastReceiver(){\n if (mADialogBroadcastIsRegistered){\n try {\n this.unregisterReceiver(afterCallBroadcastReceiver);\n mADialogBroadcastIsRegistered=false;\n }catch (Exception e){\n e.printStackTrace();\n }\n }\n }", "@Override\n public void removeNotify()\n {\n unregisterListeners();\n super.removeNotify();\n }", "void onUnregisterForPremount();", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\ttry {\r\n\t\t\tunregisterReceiver(newReceiver);\r\n\t\t} catch (Exception e) {\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tunregisterReceiver(userReceiver);\r\n\t\t} catch (Exception e) {\r\n\t\t}\r\n\t\tBmobChat.getInstance(this).stopPollService();\r\n\t}", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tunregisterReceiver(mUIReceiver);\r\n\t}", "protected void onDestroy(){\n super.onDestroy();\n LocalBroadcastManager.getInstance(this).unregisterReceiver(timeReceiver);\n }", "void unregister(String methodName);", "public void unRegister(Context context) {\n context.unregisterReceiver(this);\n Log.d(TAG, \"ConnectionReceiver unregistered!\");\n }", "@Override\n protected void onStop() {\n unregisterReceiver(myReceiverActivity);\n super.onStop();\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\ttry {\n\t\t\tunregisterReceiver(getServerSetting);\n\t\t\t\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public void unregisterListeners(){\n listeners.clear();\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tunregisterReceiver(smsReceiver);\n\t}", "@Override\r\n protected void onDestroy() {\r\n GlobalBus.getBus().unregister(this);\r\n super.onDestroy();\r\n }", "public void mo33397g() {\n try {\n if (this.f23285A == null && this.f23292L != null) {\n C6973b.m29776f().unregisterReceiver(this.f23292L);\n }\n } catch (Throwable unused) {\n }\n }", "public void unregisterListener() {\n mPhone.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);\n /* SPRD: Bug 697839 add For VOLTE and VoWiFi icon. @{ */\n try {\n if (mIsImsListenerRegistered) {\n mIsImsListenerRegistered = false;\n if (mIImsServiceEx != null) {\n mIImsServiceEx.unregisterforImsRegisterStateChanged(mImsUtListenerExBinder);\n }\n }\n /* SPRD: modify for bug723743 @{ */\n if (mIsImsReceiverRegistered) {\n mContext.unregisterReceiver(mImsIntentReceiver);\n mIsImsReceiverRegistered = false;\n }\n if (mIsModemReciverRegistered) {\n mContext.unregisterReceiver(mModemStateChangeReciver);\n mIsModemReciverRegistered = false;\n }\n /* @} */\n } catch (RemoteException e) {\n Log.e(mTag, \"RemoteException: \" + e);\n }\n /* @} */\n mContext.getContentResolver().unregisterContentObserver(mObserver);\n /* SPRD: Dual volte signalStrength display for bug 666045. @{ */\n if (mDualVoLTEListener != null) {\n mPhone.listen(mDualVoLTEListener, PhoneStateListener.LISTEN_NONE);\n }\n mContext.unregisterReceiver(mReceiver);\n /* @} */\n }", "void unregisterListeners();", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t// 取消监听器的注册\n\t\tunregisterReceiver(listMsgReceive);\n\t}", "private void onUnregistered() {\n setUnregisteringInProcess(false);\n C2DMSettings.clearC2DMRegistrationId(context);\n for (C2DMObserver observer : observers) {\n onUnregisteredSingleObserver(observer);\n }\n }", "void unRegister(NotificationListener<ObservableIntentServiceNotificationType> notificationStrategy);", "@Override\n public void onDestroy() {\n BusProvider.getInstance().unregister(this);\n super.onDestroy();\n }", "@Override\r\n public void onDestroy() {\n\t if (accountChangedReceiver != null) {\r\n\t try {\r\n\t \tunregisterReceiver(accountChangedReceiver);\r\n\t } catch (IllegalArgumentException e) {\r\n\t \t// Nothing to do\r\n\t }\r\n\t }\r\n\r\n // Stop the core\r\n Thread t = new Thread() {\r\n /**\r\n * Processing\r\n */\r\n public void run() {\r\n stopCore();\r\n }\r\n };\r\n t.start();\r\n }", "void deregister() {\n Thread patientLoaderThread = new Thread(new RegistrationRunnable(false));\n patientLoaderThread.start();\n }", "void registerReceiver(IReceiver receiver);", "<T> void unregister(Class<T> messageType, Destination<T> destination);", "public void onDestroy() {\n super.onDestroy();\n BroadcastReceiver broadcastReceiver = this.mScreenReceiver;\n if (broadcastReceiver != null) {\n unregisterReceiver(broadcastReceiver);\n }\n }", "@Override\n\tpublic void unregister() {\n\t\tEventBus.INSTANCE.removeListener(this);\n\t\tcompletedGameSound.dispose();\n\t\tlostGameSound.dispose();\n\t\tsucceededSound.dispose();\n\t\tfailSound.dispose();\n\t}", "@Override\n\tprotected void onStop() {\n\t\tsuper.onStop();\n\t\tunregisterReceiver(mMessageReceiver);\n\t}", "boolean unregister(String name);", "@Override\r\n public void unregisterMonitor(String name, ProfileMonitor monitor) {\n\r\n }", "@Override\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tif (baseBroadcase != null) {\n\t\t\tgetActivity().unregisterReceiver(baseBroadcase);\n\t\t}\n\t}", "public void mo5995q() {\n ScreenBroadcastReceiver screenBroadcastReceiver;\n if (AppFeature.f5621q && (screenBroadcastReceiver = this.f5428la) != null) {\n unregisterReceiver(screenBroadcastReceiver);\n this.f5428la = null;\n }\n }", "private void deRegister() {\n\t\ttry {\n\t\t\tOverlayNodeSendsDeregistration deregister = new OverlayNodeSendsDeregistration(\n\t\t\t\t\tmyIPAddress, myServerThreadPortNum, this.myAssignedID);\n\t\t\tthis.registry.getSender().sendData(deregister.getBytes());\n\t\t} catch (UnknownHostException e1) {\n\t\t\tSystem.out.println(e1.getMessage()\n\t\t\t\t\t+ \" Trouble sending DEregistration event.\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage()\n\t\t\t\t\t+ \" Trouble sending DEregistration event.\");\n\t\t}\n\t}", "@Override\n protected void onDestroy() {\n super.onDestroy();\n EventBus.getDefault().unregister(this);\n }", "private synchronized void stop()\n\t{\n\t\ttry\n\t\t{\n\t\t\tunregisterReceiver( mConnectivityReceiver );\n\t\t}\n\t\tcatch ( IllegalArgumentException e )\n\t\t{\n\t\t\te.printStackTrace();\n\n\t\t} // try/catch\n\n\t}", "@Override\n protected void onDestroy() {\n EventBus.getDefault().unregister(this);\n\n super.onDestroy();\n }", "@Override\n public void onDestroy() {\n EventBusWraper.getInstance().unregister(mContext);\n super.onDestroy();\n // unRegister();\n }", "@Override\n\t\tpublic void finish() {\n\t\t\tunregisterReceiver(mBroadcastReceiver);\n\t\t\tsuper.finish();\n\t\t}", "private void unregister() {\n Intent regIntent = new Intent(REQUEST_UNREGISTRATION_INTENT);\n regIntent.setPackage(GSF_PACKAGE);\n regIntent.putExtra(\n EXTRA_APPLICATION_PENDING_INTENT, PendingIntent.getBroadcast(context, 0, new Intent(), 0));\n setUnregisteringInProcess(true);\n context.startService(regIntent);\n }", "@Override\r\n\tpublic void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tif (wt != null && !wt.isCancelled()) {\r\n\t\t\twt.cancel(true);\r\n\t\t}\r\n\t\t\r\n\t\tactivity.unregisterReceiver(receiver);\r\n\t}", "@Override\n\tprotected void onStop() {\n\t\tsuper.onStop();\n\t\tunregisterReceiver(broadcastReceiver);\n\t}", "public void stopReceiver() {\r\n\t\tif(receiver != null) {\r\n\t\t\treceiver.stop();\r\n\t\t\treceiver = null;\r\n\t\t}\r\n\t}", "public void stopReceiving() {\n\t\tcallerContext.unregisterReceiver(this);\n\t}", "public void destroy(){\n Log.i(Constant.TAG, \"destroy...\") ;\n //if sim1 signal listener not null, unregister it\n if (null != mSim1SignalListener) {\n Log.i(Constant.TAG, \"destroy unregister mSim1SignalListener...\") ;\n mTelephonyManager.listen(mSim1SignalListener, PhoneStateListener.LISTEN_NONE);\n mSim1SignalListener = null ;\n }\n\n //if sim1 signal listener not null, unregister it\n if (null != mSim2SignalListener) {\n Log.i(Constant.TAG, \"destroy unregister mSim2SignalListener...\") ;\n mTelephonyManager.listen(mSim2SignalListener, PhoneStateListener.LISTEN_NONE);\n mSim2SignalListener = null ;\n }\n\n // if sim state receiver not null, unregister it\n if (mSimStateReceiver != null && mContext.get() != null){\n Log.i(Constant.TAG, \"destroy unregister mSimStateReceiver...\") ;\n try {\n mContext.get().unregisterReceiver(mSimStateReceiver);\n }catch (Exception e){}\n mSimStateReceiver = null ;\n }\n\n //clear sim state listeners\n if (mSignalStateListeners != null){\n Log.i(Constant.TAG, \"destroy clear mSignalStateListeners...\") ;\n mSignalStateListeners.clear();\n mSignalStateListeners = null ;\n }\n //set instance to null\n Log.i(Constant.TAG, \"destroy set sInstance to null...\") ;\n sInstance = null ;\n }", "@Override\n\tprotected void unregisterTouch() {\n\t\t\n\t}", "@Override\n protected void onPause() {\n super.onPause();\n unregisterReceiver(myReciever);\n }", "@Override \n protected void onPause() {\n\t super.onPause(); \n\t unregisterReceiver(mReceiver); \n }", "@Override\r\n\tpublic void shutdown() {\n\t\tunRigisterMBean();\r\n\t}", "@Override\n\tpublic void onDestroy(){\n\t\tmNotifMng.cancel(NOTIFICATION_ID);\n\t\tif(mConnectThread != null){\n\t\t\tmConnectThread.interrupt();\n\t\t\tmConnectThread.stopRunning();\n\t\t}\n\t\t//Unregister the phone receiver\n\t\tunregisterReceiver(mSmsListener);\n\t}", "void unregister(String uuid);", "@Override\n protected void onDestroy() {\n super.onDestroy();\n\n unbindService(conn);\n unregisterReceiver(mbtBroadcastReceiver);\n }" ]
[ "0.7793637", "0.77882016", "0.7733466", "0.7695679", "0.7622773", "0.7448569", "0.74237037", "0.7398343", "0.73821086", "0.7368183", "0.7358573", "0.73338413", "0.7330483", "0.7263063", "0.7234591", "0.7214115", "0.71936697", "0.7189207", "0.71527815", "0.70625407", "0.70383227", "0.70258325", "0.7002328", "0.69864774", "0.697175", "0.6920714", "0.6902728", "0.6897284", "0.6839508", "0.68230987", "0.6813823", "0.6810475", "0.6787615", "0.6760863", "0.67477435", "0.6733722", "0.6725637", "0.67254347", "0.6702714", "0.6700072", "0.6694257", "0.66865957", "0.66778314", "0.66578233", "0.6657068", "0.6650744", "0.6646601", "0.66290987", "0.6610216", "0.6603756", "0.6584837", "0.6578208", "0.6575071", "0.65740263", "0.6561735", "0.6552145", "0.65276605", "0.65205413", "0.65173423", "0.65037376", "0.64446205", "0.6436363", "0.6405509", "0.6400909", "0.64007384", "0.6392068", "0.6390698", "0.6375978", "0.6349642", "0.63356525", "0.6328629", "0.63265795", "0.6326513", "0.6317769", "0.631453", "0.6306096", "0.63052034", "0.630048", "0.6296926", "0.6288938", "0.6283942", "0.6254201", "0.6238615", "0.6236716", "0.6229861", "0.62298256", "0.6217725", "0.6215295", "0.6212424", "0.62009996", "0.6194594", "0.6188042", "0.61725616", "0.6170879", "0.6163055", "0.61331326", "0.61269325", "0.611252", "0.6101034", "0.6096001" ]
0.66682047
43
This will clear the internal checks map and frees the static available memory. Will also reset the validation flag to "not failed"
public static void reset() { HealthCheck.failed = false; HealthCheck.checks.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void clearValidationError() {\n\n\t\tdataValid = false;\n\n\t\tvalidationErrorPending = false;\n\t\tvalidationErrorParent = null;\n\t\tvalidationErrorTitle = null;\n\t\tvalidationErrorMessage = null;\n\t\tvalidationErrorType = 0;\n\t}", "@Override\n public void clear() {\n validations.remove();\n }", "public void freeAll()\n\t\t{\n\t\t\ts_cGameInstance = null; \n\t\t}", "public void clearValidateExceptions();", "public static void cleanUp() {\n\t\tHashDecay.stopAll();\n\t\tSystem.gc();\n\t}", "public final void cleanUp() {\n\t\tmgdmfunctions = null;\n\t\tmgdmlabels = null;\n\t\theap.finalize();\n\t\theap = null;\n\t\tSystem.gc();\n\t}", "private void invalidate() {\n cud = null;\n fileNameRefs = null;\n jsniMethods = null;\n if (exposedCompiledClasses != null) {\n for (CompiledClass compiledClass : exposedCompiledClasses) {\n compiledClass.invalidate();\n }\n exposedCompiledClasses = null;\n }\n }", "void clearValidators();", "public void finalize() {\r\n\r\n mask = null;\r\n newMask = null;\r\n newShortMask = null;\r\n System.gc();\r\n }", "@Override\r\n protected void clearStaticReferences() {\r\n // free static fields :\r\n documentFactory = null;\r\n transformerFactory = null;\r\n schemaFactory = null;\r\n\r\n cacheDOM.clear();\r\n cacheDOM = null;\r\n\r\n cacheXSL.clear();\r\n cacheXSL = null;\r\n }", "@AfterClass\n public static void tearDownValidator()\n {\n //gracefully teardown the validator factory\n vf.close();\n }", "public void cleanUp() {\r\n\t\tscalerStore.cleanUp();\r\n\t\tv2Store.cleanUp();\r\n\t\tv3Store.cleanUp();\r\n\t\tv4Store.cleanUp();\r\n\t\tvnStore.cleanUp();\r\n\t\tm22Store.cleanUp();\r\n\t\tm23Store.cleanUp();\r\n\t\tm24Store.cleanUp();\r\n\t\tm32Store.cleanUp();\r\n\t\tm33Store.cleanUp();\r\n\t\tm34Store.cleanUp();\r\n\t\tm42Store.cleanUp();\r\n\t\tm43Store.cleanUp();\r\n\t\tm44Store.cleanUp();\r\n\t\tmnnStore.cleanUp();\r\n\t}", "Form clearValidation();", "private void clearMemory() {\n\t\tRunningAppMgr.getInstance(this).killAll();\n\t\tsetMemory();\n\t}", "public void cleanAll() {\r\n\t\ttos.clear();\r\n\t\tbcs.clear();\r\n\t\tccs.clear();\r\n\t\tattachments.clear();\r\n\t\tinLines.clear();\r\n\t\tsubject= null;\r\n\t\ttext= null;\r\n\t\tfrom= null;\r\n\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 }", "protected void clearCaches() {\n DescriptorFactory.clearInstance();\n ObjectTypeFactory.clearInstance();\n TypeQualifierApplications.clearInstance();\n TypeQualifierAnnotation.clearInstance();\n TypeQualifierValue.clearInstance();\n // Make sure the codebases on the classpath are closed\n AnalysisContext.removeCurrentAnalysisContext();\n Global.removeAnalysisCacheForCurrentThread();\n MethodInfo.clearCaches();\n if (classPath != null) {\n classPath.close();\n }\n }", "public static void reset() {\n\t\tCAUGHT.clear();\n\t\tLOAD_CACHE.clear();\n\t}", "public void clean(){\n\t\tsynchronized(this.lock){\n\t\t\tint index=0;\n\t\t\tfor(ResourceStatus<T> resourceStatus:this.resourcesStatus){\n\t\t\t\tif(resourceStatus!=null){\n\t\t\t\t\tif(!resourceStatus.isInUse()){\n\t\t\t\t\t\tlong lastTime=resourceStatus.getLastNotInUseTime();\n\t\t\t\t\t\tlong currentTime=System.currentTimeMillis();\n\t\t\t\t\t\tT resource=resourceStatus.getResource();\n\t\t\t\t\t\tif((currentTime-lastTime)>=this.resourceAliveTime){\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tdestroyResource(resource);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tlogger.error(Constants.Base.EXCEPTION, e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis.resourcesStatus[index]=null;\n\t\t\t\t\t\t\tthis.currentSize--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t}", "public void invalidateAll() {\n synchronized (this) {\n long l10;\n this.H = l10 = 512L;\n }\n this.requestRebind();\n }", "public void invalidateAll() {\n synchronized (this) {\n long l10;\n this.m = l10 = (long)8;\n }\n this.requestRebind();\n }", "public void clean() {\n\t\tserver.clearPersistentData();\n\t\t_offlineMessages.clear();\n\t\t_onlineClients.clear();\n\t\t_clientFriends.clear();\n\t}", "public void clean() {\n\t\tdata = new ServerData();\n\t\tdataSaver.clean();\n\t}", "public void clearLookups() {\n diseaseMap = null;\n feedMap = null;\n healthMapProvenance = null;\n }", "private void unsetOneAllChecks() {\r\n\r\n checkIman.setEnabled(false);\r\n checkBonferroni.setEnabled(false);\r\n checkHolm.setEnabled(false);\r\n checkHochberg.setEnabled(false);\r\n checkHommel.setEnabled(false);\r\n checkHolland.setEnabled(false);\r\n checkRom.setEnabled(false);\r\n checkFinner.setEnabled(false);\r\n checkLi.setEnabled(false);\r\n\r\n }", "public void resetValid()\n\t{\n\t\tthis.valid = true;\n\t}", "private void cleanResources() {\r\n// return;\r\n placeholder = DEFAULT_PLACEHOLDER;\r\n errorImage = DEFAULT_PLACEHOLDER;\r\n imageUri = null;\r\n tag = null;\r\n imageResourceId = DEFAULT_PLACEHOLDER;\r\n simple = false;\r\n withScaling = false;\r\n widthResId = DEFAULT_PLACEHOLDER;\r\n heigthResId = DEFAULT_PLACEHOLDER;\r\n transformation = null;\r\n callback = null;\r\n fit = false;\r\n centerCrop = false;\r\n centerInside = false;\r\n }", "public void clean() {\n\tmTaskCompletedCallback = null;\n\tmTaskUpdateCallback = null;\n\tmIsDirty = false;\n }", "public void testNormalClearIsEmpty()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkClearMap(pmf,\r\n HashMap1.class,\r\n ContainerItem.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }", "public void invalidateAll() {\n synchronized (this) {\n long l10;\n this.u = l10 = (long)32;\n }\n this.requestRebind();\n }", "private void reset() {\n clearSolutions();\n clearHeapUsages(this.pm_heap);\n placeMappings(this.pm_heap, this.instance.getPhysicalMachines(), this.mappings);\n }", "protected static void resetManager() {\n externalCameras.clear();\n resolutionMap.clear();\n isStartedMap.clear();\n trackerAPIMap.clear();\n internalCamera = null;\n internalCameraId = null;\n }", "protected void cleaningUp() {\n\t}", "void reset() {\n errors.clear();\n variables.clear();\n }", "private void clean() {\n aggregatedValues.clear();\n this.numMessageSent = 0;\n this.numMessageReceived = 0;\n }", "public void cleanUp();", "public void cleanUp();", "void invalidateAll();", "public void reset() {\n solving = false;\n length = 0;\n checks = 0;\n }", "private void clean() {\n nodesToRemove.clear();\n edgesToRemove.clear();\n }", "public static void reset(){\n breedToShapeMapping = null;\n contents = null;\n \n pages.clear();\n speciesMap.clear();\n blocks.clear();\n constraintsMap.clear();\n BlockData.reset();\n }", "private void clearResetCache() {\n for(IoBuffer buf : resetCache) {\n buf.free();\n }\n resetCache = null;\n }", "public void cleanup() {\n\t\tref.removeEventListener(listener);\n\t\tmodels.clear();\n\t\tmodelNames.clear();\n\t\tmodelNamesMapping.clear();\n\t}", "public void shutdown()\n {\n valid = false;\n quitSafely();\n\n synchronized (loading) {\n loading.clear();\n }\n synchronized (toLoad) {\n toLoad.clear();\n }\n synchronized (tilesByFetchRequest) {\n tilesByFetchRequest.clear();\n }\n }", "@Override\n\tpublic void cleanUp() {\n\t\tofferingStrategy = null;\n\t\tacceptConditions = null;\n\t\topponentModel = null;\n\t\tnegotiationSession = null;\n\t\tutilitySpace = null;\n\t\tdagent = null;\n\t}", "public static void reset()\r\n {\r\n errorCount = 0;\r\n warningCount = 0;\r\n }", "public void clearAllAppMapCaches(){\n\t\tappmaps.clear();\n\t}", "public void deallocate()\n\t{\n\t\t//for(int i = 0; i <= maxsize; i++){\n\t\t//\t notusemap[i].addAll(inusemap[i]);\n\t\t//\t inusemap[i].clear();\n\t\t//}\n\t}", "protected void clearResolvedObjects() {\n\t\ttype = null;\n\t\tmanagedType = null;\n\t\ttypeDeclaration = null;\n\t}", "@Override\r\n\tprotected void clean() {\n\t\tcacheDataImpl.del(CacheConfig.GROUPMEMBER_USERNAME);//数据库id\r\n\t\tcacheDataImpl.del(CacheConfig.GROUPMEMBER_GROUPID);//\r\n\t\tcacheDataImpl.del(CacheConfig.GROUPMEMBER_GRADE);\r\n\t}", "public void clearAll()\n {\n textureMap.clear();\n componentMap.clear();\n }", "private static void gc() {\n System.gc();\n System.gc();\n }", "public void cleanup() {\r\n }", "public void clear() {\n helpers.clear();\n islandKeysCache.clear();\n setDirty();\n }", "public void cleanCSRFBlackListCache() throws AAException\r\n\t{\r\n\t\tSystemConfigCacheHelper.getInstance().cleanCSRFBlackListCache();\r\n\r\n\t\tthis.initCSRFBlackListCache(null);\r\n\t}", "public void clean();", "public void clean();", "public void clean();", "public void clean();", "@Override\n\tpublic void invalidateAll() {\n\t\t\n\t}", "public synchronized void clearResources()\r\n {\r\n // create a new root, making old tree eligible for GCing\r\n createRootNode();\r\n\r\n // clear all registered objects\r\n unRegisterAll();\r\n }", "private void unsetMultipleChecks() {\r\n\r\n checkNemenyi.setEnabled(false);\r\n checkShaffer.setEnabled(false);\r\n checkBergman.setEnabled(false);\r\n\r\n }", "public void clean()\r\n {\r\n this.extension = null;\r\n this.extensionValueList = null;\r\n this.extensionLabelList = null;\r\n this.archivoVO = null;\r\n this.archivoVOValueList = null;\r\n this.archivoVOLabelList = null;\r\n this.nuevoNombre = null;\r\n this.nuevoNombreValueList = null;\r\n this.nuevoNombreLabelList = null;\r\n this.action = null;\r\n this.actionValueList = null;\r\n this.actionLabelList = null;\r\n }", "public void cleanUp(){\n for(ShaderProgram sp : shaderlist){\n sp.cleanup();\n }\n }", "public void reset() {\n counters = null;\n counterMap = null;\n counterValueMap = null;\n }", "void cleanUp();", "void cleanUp();", "void cleanUp();", "public void resetAll() {\n triggered = false;\n classBlacklist.clear();\n policies.clear();\n protectedFiles.clear();\n System.setSecurityManager(defaultSecurityManager);\n }", "void resetTesting() {\r\n\t\tcompanyCars.clear();\r\n\t\trentDetails.clear();\r\n\t}", "public void clearErrors() {\n mErrors = new ArrayList();\n }", "public void dispose() {\n if (executionPlan != null)\n executionPlan.dispose();\n if (appClassList != null)\n appClassList.clear();\n if (classObserverList != null)\n classObserverList.clear();\n if (referencedClassSet != null)\n referencedClassSet.clear();\n analysisOptions.analysisFeatureSettingList = null;\n bugReporter = null;\n classFactory = null;\n classPath = null;\n classScreener = null;\n detectorFactoryCollection = null;\n executionPlan = null;\n progress = null;\n project = null;\n analysisOptions.userPreferences = null;\n }", "void unsetComplianceCheckResult();", "private void cleanAfterMatch() {\n\t\t// clean all consumables from all calculators\n\t\tfor (AggregationCalculator calc : calculators.values()) {\n\t\t\tcalc.cleanConsumables();\n\t\t}\n\t}", "public void free(){\n\t\t//android.util.Log.d(TAG,\"free()\");\n\t\tthis.freeGeometries();\n\t\tthis.freeLights();\n\t\tthis.freeCameras();\n\t\tthis.freeTextures();\n\t\tthis.freeMaterials();\n\t}", "public void cleanup() {\n this.index = new TreeMap<String, PostingsList>();\n this.count = 0;\n }", "public void revalidate() {}", "public void invalidateCaches() {\n cfgCache.invalidateAll();\n analysisCache.invalidateAll();\n }", "public void clearCollections() {\n sevenStates = new int[7][16];\n moveGeneratedFrom.clear();\n movesWithFreeTurn.clear();\n movesWhichPreventSteals.clear();\n opponentChoicesToSteal.clear();\n opponentBoardsBeforeSteal.clear();\n }", "protected void tearDown() throws Exception {\r\n validator = null;\r\n bundle = null;\r\n TestHelper.clearConfiguration();\r\n }", "public static void reset() {\n\t\tE_Location.THIS.reset();\n\t\tE_Resource.THIS.reset();\n\t\t\n\t\tT_Object.reset();\n\t\tT_Location.reset();\n\t\tT_Resource.reset();\n\t\t\n\t}", "private void clean_all() {\n\t\tpkttype=0;\r\n\t\tpacket=new byte[]{0};\r\n\t\tID=new byte[]{0};\r\n\t\tIP=new byte[]{0};\r\n\t\tTTL=0;\r\n\t\tport_no=new byte[]{0};\r\n\t\treqrep=0;\r\n\t\tdata=new byte[]{0};\r\n\t\tpaylength=new byte[]{0};\r\n\t}", "public void clean();", "public void cleanup() {\n\t}", "public void clean() {\n\t\tbufferSize = 0;\n\t\tbuffer = new Object[Consts.N_ELEMENTS_FACTORY];\n\t}", "public void clearErrors() {\n\t\tnameCG.setClassName(\"control-group\");\n\t\tdescriptionCG.setClassName(\"control-group\");\n\t\tpriceCG.setClassName(\"control-group\");\n\n\t\tvalidationButton.setVisible(false);\n\t\tvalidationPanel.setVisible(false);\n\t}", "public synchronized void cleanup() {\n\t\t// by freeing the mother group we clean up all the nodes we've created\n\t\t// on the SC server\n\t\tsendMessage(\"/g_freeAll\", new Object[] { _motherGroupID });\n\t\tfreeNode(_motherGroupID);\n\t\tfreeAllBuffers();\n\t\t\n\t\t//reset the lists of sound nodes, nodeIds, busses, etc\n\t\tSoundNode sn;\n\t\tEnumeration<SoundNode> e = _soundNodes.elements();\n\t\twhile (e.hasMoreElements()) {\n\t\t\tsn = e.nextElement();\n\t\t\tsn.setAlive(false);\n\t\t}\n\t\t_soundNodes.clear();\n\t\t_nodeIdList.clear();\n\t\t_busList.clear();\n\t\t_bufferMap.clear();\n\t}", "@Override\n public void cleanUp() {\n }", "public void Clean()\n\t{\n\t\tstorage.clear();\n\t}", "public void cleanup() {\n }", "public void cleanUp() {\r\n if(getFunctionType() != VIEW_HIERARCHY)\r\n panel.dispose();\r\n cvGroupsData = null;\r\n cvHierarchyData = null;\r\n cvSortData = null;\r\n sponsorHierarchyBean = null;\r\n sponsorHierarchyTree = null;\r\n model = null;\r\n selectedNode = null;\r\n selTreePath = null;\r\n groupsController = null;\r\n hierarchyRenderer = null;\r\n hierarchyTreeCellEditor = null;\r\n treeDropTarget = null;\r\n panel = null;\r\n editor = null;\r\n changePassword = null;\r\n backGroundColor = null;\r\n maintainSponsorHierarchyBaseWindow = null;\r\n }", "public void clear() {\n\t\tnegatedConcepts.clear();\n\t\tnegex.clear();\n\t\tconcepts.clear();\n\t}", "public void reset(){\n if (isValidated()) resetAndUnblock();\n }", "public void validate() {\n\t\tthis.invalidated = false;\n\t}", "public void cleanup() {\n try {\n if (processingUnits != null) {\n for (int i = 0; i < processingUnits.length; i++) {\n processingUnits[i].cleanup();\n }\n }\n\n if (dbgCtrlThread != null) {\n dbgCtrlThread.stop();\n }\n\n if (casConsumerPU != null) {\n casConsumerPU.cleanup();\n }\n casConsumerPU = null;\n\n if (collectionReader != null) {\n collectionReader.close();\n }\n collectionReader = null;\n\n if (producer != null) {\n producer.cleanup();\n }\n producer = null;\n producerResult = null;\n\n if (consumerDeployList != null) {\n consumerDeployList.clear();\n }\n consumerDeployList = null;\n\n if (analysisEngines != null) {\n analysisEngines.clear();\n }\n analysisEngines = null;\n\n if (annotatorDeployList != null) {\n annotatorDeployList.clear();\n }\n annotatorDeployList = null;\n\n if (annotatorList != null) {\n annotatorList.clear();\n }\n annotatorList = null;\n\n if (consumerList != null) {\n consumerList.clear();\n }\n consumerList = null;\n\n if (consumers != null) {\n consumers.clear();\n }\n consumers = null;\n\n processingUnits = null;\n processingUnitResults = null;\n casprocessorList = null;\n // this.enProcSt = null;\n stats = null;\n statusCbL = null;\n // this.tcas = null;\n casPool = null;\n // this.restoredProcTr = null;\n checkpointData = null;\n procTr = null;\n cpeFactory = null;\n } catch (Exception e) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.FINER, this.getClass().getName(),\n \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_exception__FINER\",\n new Object[] { Thread.currentThread().getName(), e.getMessage() });\n\n }\n }", "private static void _reset() {\n // clear metrics\n HystrixCommandMetrics.reset();\n HystrixThreadPoolMetrics.reset();\n HystrixCollapserMetrics.reset();\n // clear collapsers\n HystrixCollapser.reset();\n // clear circuit breakers\n HystrixCircuitBreaker.Factory.reset();\n HystrixPlugins.reset();\n HystrixPropertiesFactory.reset();\n currentCommand.set(new LinkedList<HystrixCommandKey>());\n }", "public static void reset() {\n Set<Map.Entry<Class<?>, DatabaseDefinition>> entrySet = globalDatabaseHolder.databaseClassLookupMap.entrySet();\n for (Map.Entry<Class<?>, DatabaseDefinition> value : entrySet) {\n value.getValue().reset(getContext());\n }\n globalDatabaseHolder.reset();\n loadedModules.clear();\n }", "public void cleanUp() {\r\n\t\tsuper.cleanUp() ;\r\n\t}", "private void invalidateCache() {\n\t\tLog.d(TAG, \"invalidateCache() is removing in-memory cache\");\n\t\tpackageMapping.clear();\n\t\tvalidCache = false;\n\t}", "public void clear() {\n classifiedSamples.clear();\n classificationNameMap.clear();\n classifications.clear();\n sampleClassificationMap.clear();\n nextIndex = 0;\n }" ]
[ "0.70059085", "0.6573175", "0.6251663", "0.6237225", "0.6217342", "0.62003946", "0.61748767", "0.61286885", "0.61190397", "0.61126834", "0.5988672", "0.59684104", "0.592179", "0.59128237", "0.59102553", "0.58951", "0.5894457", "0.5887394", "0.5867161", "0.5862562", "0.584811", "0.5842693", "0.58313537", "0.5819251", "0.5810599", "0.5806769", "0.5803505", "0.5783626", "0.5773613", "0.5761934", "0.5759844", "0.5743773", "0.5736502", "0.5727238", "0.5723492", "0.5722408", "0.5722408", "0.5719284", "0.5714103", "0.56920254", "0.56847125", "0.5682688", "0.56795627", "0.56571037", "0.5643943", "0.562811", "0.5626217", "0.5625483", "0.56246465", "0.5620067", "0.56199294", "0.56068015", "0.5590019", "0.558821", "0.55852365", "0.5582378", "0.5582378", "0.5582378", "0.5582378", "0.5569789", "0.5562601", "0.5559837", "0.5555266", "0.5550461", "0.55355376", "0.55354965", "0.55354965", "0.55354965", "0.5532565", "0.553173", "0.55305564", "0.5526426", "0.55245376", "0.55231494", "0.5522759", "0.55221176", "0.5519005", "0.5518053", "0.55173975", "0.55136603", "0.55116004", "0.5510389", "0.54982615", "0.549271", "0.54911727", "0.5480533", "0.5477263", "0.5469044", "0.54653734", "0.54650635", "0.5464119", "0.54600155", "0.54577804", "0.5457186", "0.5454707", "0.5453722", "0.5445585", "0.5445196", "0.54431987", "0.5442191" ]
0.6737678
1
Will mark the current Health check as failed. This is bound static to the class and therefore needs to be reset if another checks should be performaned
private static void setFailed() { HealthCheck.failed = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void markAsFailed() {\n execution.setErrorReported();\n }", "public void markAsFailed() {\n \n \t\texecutionStateChanged(ExecutionState.FAILED, \"Execution thread died unexpectedly\");\n \t}", "void setFailed(Throwable lastFailure);", "public void brakeFailureStatus() {\n \tthis.brakeFailureActive = this.trainModelGUI.brakeFailStatus();\n }", "public static void reset() {\n HealthCheck.failed = false;\n HealthCheck.checks.clear();\n }", "public void engineFailureStatus() {\n \tthis.engineFailureActive = this.trainModelGUI.engineFailStatus();\n }", "void markFailed(Throwable t) {\n\t}", "public void setToFailed() {\n if (currentStep.getCurrentPhase() != Step.Phase.FAILED) {\n changeCurrentStep(Step.Phase.FAILED);\n }\n setCompleteTime(System.currentTimeMillis());\n }", "@Override\n\t\t\tpublic void onFail() {\n\t\t\t\tcallBack.onCheckUpdate(-1, null); // 检查出错\n\t\t\t}", "public void setFailure(boolean value) {\n\t\tif (value) {\n\t\t\tcountdown = EXIT_COUNT;\n\t\t}\n\t\tfailed = value;\n\t}", "ScriptBuilder setFailUnhealthy(Boolean failUnhealthy) {\n this.failUnhealthy = failUnhealthy;\n return this;\n }", "void markFailed(Execution execution, Throwable cause);", "private void fail() {\n mFails++;\n if(mFails > MAX_NUMBER_OF_FAILS) {\n gameOver();\n }\n }", "public void setFailed() throws RemoteException;", "public void fail() {\n _siteStatus = false;\n _lockTable.clear();\n _accessedTransactions.clear();\n _uncommitDataMap.clear();\n _lastFailTime = _tm.getCurrentTime();\n }", "protected void failed()\r\n {\r\n //overwrite\r\n }", "public void fail() {\r\n\t\tcontestantIt.currentC().updatePoints(-FAIL);\r\n\t}", "public int getFailedCheckCount() {\n return iFailedCheckCount;\n }", "public void signalFailureStatus() {\n \tthis.signalFailureActive = this.trainModelGUI.signalFailStatus();\n \tif(this.signalFailureActive) {\n \tthis.setGPSAntenna(true);\n \tthis.setMBOAntenna(true);\n \t} else {\n \t\tthis.setGPSAntenna(false);\n \tthis.setMBOAntenna(false);\n \t}\n\n \t\n }", "@Override\n public WorkflowStep fail() {\n this.boardChangeDetected = 0;\n this.missingFutures = 0;\n this.missingTetromino = 0;\n return INITIAL_BOARD.execute(false);\n }", "@Override\n boolean isFailed() {\n return false;\n }", "void doCheckHealthy();", "public void pendingRecordFailed() {\n pendingRecordFailed(0);\n }", "public void failed(String msg) {\n failureMsg = msg;\n }", "public void fix_gamesFailed() {\n this._gamesFailed -= 1;\n }", "public void setFailStatus(java.lang.String newFailStatus) {\n\tfailStatus = newFailStatus;\n}", "@Override\n boolean canFail() {\n return true;\n }", "@Override\n\t\t\t\tpublic void doFail() {\n\t\t\t\t}", "public static void fail() throws IllegalStateException {\n check(false);\n }", "@Override\r\n\tpublic void onFail() {\n\t\tif(bSendStatus)\r\n\t\t\tnativeadstatus(E_ONFAIL);\r\n\t}", "public void setWorkitemsFailed(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(WORKITEMSFAILED_PROP.get(), value);\n }", "public void setWorkitemsFailed(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(WORKITEMSFAILED_PROP.get(), value);\n }", "@Override\n\tpublic void setFailureMode(boolean arg0) {\n\n\t}", "@Test\n public void accuseFailTest() throws Exception {\n assertTrue(\"failure - accused status was not set to true\", target.isAccused());\n\n }", "public final boolean isFailed() {\n return failed;\n }", "public boolean hasFailed() {\n\t\treturn failed;\n\t}", "public void onFailure(Throwable caught) {\n\t\t\tGWT.log(\"Error changing status\", caught);\t\n\t\t}", "private void addTransitionsToFailed() {\n List<ReplicateStatus> abortable = getFailableStatuses();\n addTransition(abortable, FAILED);\n addTransition(WORKER_LOST, FAILED); // when <status> -> WORKER_LOST -> FAILED\n addTransition(RECOVERING, FAILED); // when <status> -> RECOVERING -> FAILED\n }", "public boolean isFailure( ) {\n\t\treturn failed;\n\t}", "public void queryError()\r\n {\r\n myFailedQueryCountProvider.setValue(Integer.valueOf(myFailedQueryCounter.incrementAndGet()));\r\n }", "public void setRunningTasksToFailure() {\r\n\t\tsetRunningTasksToFailureRecursive(elements);\r\n\t}", "public void setDied();", "void failed (Exception e);", "private final void onInvocationFailed(final InstanceGoal<InstanceParameters> goal) {\n assert false;\n rlgm.event(goal, SpecificationEvent.FAILED_EVENT, null);\n }", "private void recordConfigurationInvocationFailed(ITestNGMethod tm, IConfigurationAnnotation annotation, XmlSuite suite) {\n // If beforeTestClass/beforeTestMethod or afterTestClass/afterTestMethod \n // failed, mark this entire class as failed, but only this class (the other \n // classes should keep running normally)\n if (annotation.getBeforeTestClass()\n || annotation.getAfterTestClass()\n || annotation.getBeforeTestMethod()\n || annotation.getAfterTestMethod()) \n {\n setClassInvocationFailure(tm.getRealClass(), false);\n }\n\n // If beforeSuite or afterSuite failed, mark *all* the classes as failed\n // for configurations. At this point, the entire Suite is screwed\n else if (annotation.getBeforeSuite() || annotation.getAfterSuite()) {\n m_suiteState.failed();\n }\n\n // beforeTest or afterTest: mark all the classes in the same\n // <test> stanza as failed for configuration\n else if (annotation.getBeforeTest() || annotation.getAfterTest()) {\n setClassInvocationFailure(tm.getRealClass(), false);\n XmlClass[] classes= findClassesInSameTest(tm.getRealClass(), suite);\n for(XmlClass xmlClass : classes) {\n setClassInvocationFailure(xmlClass.getSupportClass(), false);\n }\n }\n String[] beforeGroups= annotation.getBeforeGroups();\n if(null != beforeGroups && beforeGroups.length > 0) {\n for(String group: beforeGroups) {\n m_beforegroupsFailures.put(group, Boolean.FALSE);\n }\n }\n }", "public AlwaysFailsCheck() {\n this(\"Compulsory integrity failure\");\n }", "private void setFailed(int errorCode){\n\t\tCartPayIndent currentIndent = mCoffeeIndentsList.get(mCurrentIndentIndex);\n\t\tString indentID = currentIndent.getIndentID();\n\t\tint coffeeID = currentIndent.getCoffeeID();\n\t\tLogUtil.e(TAG, \"make coffee unsuccessully, code:\" + errorCode + \", indent:\" + indentID);\n\t\tupdateIndentStatusDB(FLAG_ERROR, indentID, coffeeID);\n\t\t// rollback order\n\t\trollBackOrder(errorCode);\n\t\t// report server\n\t\tList<Integer> status = new ArrayList<Integer>();\n\t\tMachineStatusReportInfo info = new MachineStatusReportInfo();\n\t\tinfo.setUid(U.getMyVendorNum());\n\t\tinfo.setTimestamp(TimeUtil.getNow_millisecond());\n\t\tstatus.add(errorCode);\n\t\tinfo.setStatus(status);\n\t\texecute(info.toRemote());\n\n\t\tmMachineStatus = CoffeeMachineStatus.READY;\n\t\t// quit time\n\t\tmUIHandler.sendEmptyMessage(MSG_UI_MAKE_COFFEE_FAIL);\n\t\tmQuitTimer.startCountDownTimer(QUIT_WAIT_TIME, 1000, 1000);\n\t}", "SendFailure() {\n super(ACLMessage.FAILURE);\n }", "public boolean hasFailed(){\n\t\treturn failures;\n\t}", "@Override\n public WorkflowStep fail() {\n this.boardChangeDetected = 0;\n QQTetris.calculationThread.cancel();\n return INITIAL_BOARD.execute(false);\n }", "@Override\r\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult Result) {\n\t\t\r\n\t}", "public void failed(String attribute, String message, Exception ex) {\n\t\tthis.removeFailedState(attribute);\n\t\tthis.selfState.add(new AttributeState(attribute, HealthState.ALERT,\n\t\t\t\tHealthUtils.createMessageWithStacktrace(message, ex)));\n\t}", "default void failWithReason(final String name, final HealthFailReason reason) {\n }", "public void setNumChargedFail(Byte numChargedFail) {\n this.numChargedFail = numChargedFail;\n }", "public int failed() {\n return this.failed;\n }", "public Builder setFailures(int value) {\n\n failures_ = value;\n bitField0_ |= 0x00000004;\n onChanged();\n return this;\n }", "public IllegalConnectionCheck() {\n listener = new LinkedHashSet<CheckListener>();\n active = true;\n }", "long invalidations();", "private void notifyUploadFail() {\n numberOfFail++;\n notificationBuilder.setContentText(getNotificationContent());\n notificationManger.notify(0, notificationBuilder.build());\n }", "public void failedChallenge() {\n addGameRound(false);\n playedRounds++;\n updateActivePlayer();\n updateActiveChallenge();\n }", "void instanceFailed(String pid, IFailedResult result);", "public void setFailure(AfFailure failure)\n {\n _failure = failure;\n }", "@Override\n\t\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\t\n\t\t}", "void onBatchFailure(Exception failure) {\n this.failure = Objects.requireNonNull(failure);\n this.publishedStateConsumer = null;\n this.clusterStateAckListener = null;\n }", "private boolean failInReporting() {\n\t\tboolean toForget = false;\n\t\t//synchronized (this) {\n\t\t\tif (++this.failureCount >= this.config.getNumOfFailuresBeforeForgetCollector()) {\n\t\t\t\ttoForget = true;\n\t\t\t\tthis.failureCount = 0;\n\t\t\t}\n\t\t//}\n\n\t\t// forget\n\t\tif (toForget) {\n\t\t\tlogger.log(Level.WARNING, \"Forget a stat collector.\");\n\n\t\t\tthis.provider.setMessagingCollectorAddress(null);\n\t\t}\n\n\t\treturn toForget;\n\t}", "@Override\n\tpublic void endCheck() {\n\t}", "public static void setPermanentlyFailed(StateStore stateStore, PodInstance podInstance) {\n stateStore.storeTasks(\n StateStoreUtils.fetchPodTasks(stateStore, podInstance).stream()\n .map(taskInfo -> taskInfo.toBuilder()\n .setLabels(new TaskLabelWriter(taskInfo).setPermanentlyFailed().toProto())\n .build())\n .collect(Collectors.toList()));\n }", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\n\t}", "@Override\n\tprotected Result check() throws Exception {\n\t\tif (failedMessageMeter != null && failedMessageMeter.getFifteenMinuteRate() > 0) {\n\t\t\treturn Result.unhealthy(\">1 messages failed to be sent to Kafka in the past 15minutes\");\n\t\t} else {\n\t\t\treturn Result.healthy();\n\t\t}\n\t}", "@Override\r\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t\t\r\n\t}", "@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\t}", "@Override\n\tpublic void endFail() {\n\t\t\n\t}", "private void check() {\n ShedSolar.instance.haps.post( Events.WEATHER_REPORT_MISSED );\n LOGGER.info( \"Failed to receive weather report\" );\n\n // check again...\n startChecker();\n }", "public void onTestFailedButWithinSuccessPercentage(ITestResult arg0) {\n\t\t\n\t}", "public void onTestFailedButWithinSuccessPercentage(ITestResult arg0) {\n\t\t\n\t}", "@Override\n\tpublic void onTestFailedButWithinSuccessPercentage(ITestResult result) {\n\n\t}", "public void fail(boolean hcf);", "public static void error()\r\n {\r\n valid=false;\r\n\r\n }", "@Override\r\n\t\t\t\t\tpublic void failed(String message) {\n\r\n\t\t\t\t\t}", "public void setGeneralFailure(boolean flag) {\n this.generalFailure = flag;\n }", "@Override\n\t\t\tpublic void onFail(int code) {\n\t\t\t\t\t\n\t\t\t}", "public void onTryFails(int currentRetryCount, Exception e) {}", "List<Member> failed(long now);" ]
[ "0.71629405", "0.70878845", "0.65337974", "0.6503027", "0.6470259", "0.6430004", "0.6418774", "0.63889486", "0.6380162", "0.6295824", "0.61972797", "0.6191984", "0.618148", "0.6176825", "0.6061291", "0.60469", "0.6014493", "0.59918195", "0.5974132", "0.5966419", "0.59598416", "0.5942132", "0.58823293", "0.5867941", "0.58547276", "0.58368796", "0.57611746", "0.5759264", "0.575141", "0.57121164", "0.57096165", "0.56960356", "0.5695985", "0.5691005", "0.56764805", "0.5670978", "0.56382495", "0.56236935", "0.5613077", "0.5610571", "0.56051654", "0.56035626", "0.5596195", "0.5587625", "0.55795056", "0.5563199", "0.55585086", "0.5555006", "0.55532056", "0.5552069", "0.5544827", "0.55430067", "0.5533382", "0.55276674", "0.5523657", "0.5523265", "0.55228305", "0.550988", "0.5505233", "0.5504883", "0.54962355", "0.5486511", "0.5475853", "0.5471763", "0.5467419", "0.5460522", "0.5447051", "0.54423034", "0.54423034", "0.54423034", "0.5426819", "0.5426819", "0.5426819", "0.5426819", "0.5426819", "0.54239273", "0.54239273", "0.54239273", "0.54239273", "0.54239273", "0.54239273", "0.54239273", "0.54223967", "0.54135597", "0.54135597", "0.54135597", "0.54135597", "0.5399811", "0.53836066", "0.5380948", "0.5374824", "0.5374824", "0.5370853", "0.5362888", "0.53489697", "0.53487396", "0.5346177", "0.5344917", "0.5339003", "0.5334979" ]
0.8277814
0
Will go through all defined properties by addCheck and addOptionalCheck to find out if anything did not pass validation
public static void validateConfiguration() throws HealthCheckException { for (Map.Entry<String, CheckState> entry : HealthCheck.checks.entrySet()) { LOG.info("Checking '{}'...", entry.getKey()); switch (entry.getValue().check) { case STRING: processValidation(validateString(entry), entry.getKey(), entry.getValue().check); break; case INTEGER: processValidation(validateInteger(entry), entry.getKey(), entry.getValue().check); break; case BOOL: processValidation(validateBoolean(entry), entry.getKey(), entry.getValue().check); break; case FILE_EXISTS: processValidation(validateFileExists(entry), entry.getKey(), entry.getValue().check); break; default: LOG.error("Unknown CHECK type for '{}'", entry.getKey()); throw new HealthCheckException("Unable to validate config key " + entry.getKey()); } } if (HealthCheck.failed) { throw new HealthCheckException("Healthcheck has detected a misconfiguration for Styx, please fix the preceding issues"); } else { LOG.info("Configuration validation passed"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void doExtraValidation(Properties props) {\n /* nothing by default */\n }", "private void check()\n {\n Preconditions.checkArgument(name != null, \"Property name missing\");\n Preconditions.checkArgument(valueOptions != null || valueMethod != null, \"Value method missing\");\n Preconditions.checkArgument(\n !(this.validationRegex != null && this.valueOptions != null && this.valueOptionsMustMatch),\n \"Cant have regexp validator and matching options at the same time\");\n\n if (required == null)\n {\n /*\n If a property has a default value, the common case is that it's required.\n However, we need to allow for redundant calls of required(): defaultOf(x).required();\n and for unusual cases where a property has a default value but it's optional: defaultOf(x).required(false).\n */\n required = this.defaultValue != null;\n }\n\n if (description == null)\n description = \"Property name: \" + name + \", required = \" + required;\n\n if (valueOptions != null && defaultValue != null)\n {\n for (PropertySpec.Value v : valueOptions)\n {\n if (v.value.equals(defaultValue.value))\n v.isDefault = true;\n }\n }\n\n if (dependsOn != null)\n {\n if (category == null)\n throw new IllegalArgumentException(\"category required when dependsOn is set \" + name);\n\n if (!dependsOn.isOptionsOnly())\n throw new IllegalArgumentException(\n \"Invalid dependsOn propertySpec (must be optionsOnly) \" + dependsOn.name());\n }\n }", "void calculateValidationRequirement() {\n this.elementRequiringJSR303Validation = Util.hasValidation(this.type);\n\n // Check for JSR 303 or @OnValidate annotations in default group\n if (Util.requiresDefaultValidation(this.type)) {\n this.requiresDefaultValidation = true;\n return;\n }\n\n // Check for any simple index uniqueness constraints\n if (!this.uniqueConstraintFields.isEmpty()) {\n this.requiresDefaultValidation = true;\n return;\n }\n\n // Check for any composite index uniqueness constraints\n if (!this.uniqueConstraintCompositeIndexes.isEmpty()) {\n this.requiresDefaultValidation = true;\n return;\n }\n }", "private boolean CheckAllRequiredFields() {\n\t\tboolean res = true;\n\t\tres &= CheckParkSelection();\n\t\tres &= CheckDateSelection();\n\t\tres &= CheckVisitorHour();\n\t\tres &= CheckEmail();\n\t\tres &= CheckPhoneNumber();\n\t\treturn res;\n\t}", "private void processPropValidators() {\n getMethodsWithAnnotation(component, PropValidator.class).forEach(method -> {\n PropValidator propValidator = method.getAnnotation(PropValidator.class);\n\n if (!TypeName.get(method.getReturnType()).equals(TypeName.BOOLEAN)) {\n printError(\"Method \"\n + method.getSimpleName()\n + \" annotated with PropValidator must return a boolean.\");\n }\n\n String exposedMethodName = exposeExistingJavaMethodToJs(method);\n String propertyName = propValidator.value();\n optionsBuilder.addStatement(\"options.addJavaPropValidator(p.$L, $S)\",\n exposedMethodName,\n propertyName);\n });\n }", "private static void checkRequiredProperties()\n\t{\n\t\tfor (ServerProperty prop : ServerProperty.values())\n\t\t{\n\t\t\tif (prop.isRequired())\n\t\t\t{\n\t\t\t\t// TODO\n//\t\t\t\tswitch (prop)\n//\t\t\t\t{\n//\t\t\t\t\tcase GERMINATE_AVAILABLE_PAGES:\n//\t\t\t\t\t\tSet<Page> availablePages = getSet(prop, Page.class);\n//\t\t\t\t\t\tif (CollectionUtils.isEmpty(availablePages))\n//\t\t\t\t\t\t\tthrowException(prop);\n//\t\t\t\t\t\tbreak;\n//\n//\t\t\t\t\tcase GERMINATE_USE_AUTHENTICATION:\n//\t\t\t\t\t\tboolean useAuthentication = getBoolean(prop);\n//\t\t\t\t\t\tif (useAuthentication)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tif (StringUtils.isEmpty(get(ServerProperty.GERMINATE_GATEKEEPER_SERVER)))\n//\t\t\t\t\t\t\t\tthrowException(ServerProperty.GERMINATE_GATEKEEPER_SERVER);\n//\t\t\t\t\t\t\tif (StringUtils.isEmpty(get(ServerProperty.GERMINATE_GATEKEEPER_NAME)))\n//\t\t\t\t\t\t\t\tthrowException(ServerProperty.GERMINATE_GATEKEEPER_NAME);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tbreak;\n//\n//\t\t\t\t\tcase GERMINATE_GATEKEEPER_REGISTRATION_ENABLED:\n//\t\t\t\t\t\tboolean registrationNeedsGatekeeper = getBoolean(prop);\n//\n//\t\t\t\t\t\tif (registrationNeedsGatekeeper)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tString gatekeeperUrl = get(ServerProperty.GERMINATE_GATEKEEPER_URL);\n//\n//\t\t\t\t\t\t\tif (StringUtils.isEmpty(gatekeeperUrl))\n//\t\t\t\t\t\t\t\tthrowException(ServerProperty.GERMINATE_GATEKEEPER_URL);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tbreak;\n//\n//\t\t\t\t\tdefault:\n\t\t\t\tif (StringUtils.isEmpty(get(prop)))\n\t\t\t\t\tthrowException(prop);\n//\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void checkValid() {\n getSimType();\n getInitialConfig();\n getIsOutlined();\n getEdgePolicy();\n getNeighborPolicy();\n getCellShape();\n }", "private void setupRequiredValidation() {\n requiredMafExpressions.put(FIELD_HUGO_SYMBOL, Pattern.compile(\"\\\\S+\"));\r\n requiredFieldDescriptions.put(FIELD_HUGO_SYMBOL, \"may not be blank\");\r\n requiredMafExpressions.put(FIELD_ENTREZ_GENE_ID, Pattern.compile(\"\\\\d+\")); // number\r\n requiredFieldDescriptions.put(FIELD_ENTREZ_GENE_ID, \"must be an integer number\");\r\n requiredMafExpressions.put(FIELD_MATCHED_NORM_SAMPLE_BARCODE, QcLiveBarcodeAndUUIDValidatorImpl.ALIQUOT_BARCODE_PATTERN);\r\n requiredFieldDescriptions.put(FIELD_MATCHED_NORM_SAMPLE_BARCODE, \"must be a full aliquot barcode\");\r\n requiredMafExpressions.put(FIELD_TUMOR_SAMPLE_BARCODE, QcLiveBarcodeAndUUIDValidatorImpl.ALIQUOT_BARCODE_PATTERN);\r\n requiredFieldDescriptions.put(FIELD_TUMOR_SAMPLE_BARCODE, \"must be a full aliquot barcode\");\r\n requiredMafExpressions.put(FIELD_VALIDATION_STATUS, Pattern.compile(\"Valid|Wildtype|Unknown|\\\\S?\"));\r\n requiredFieldDescriptions.put(FIELD_VALIDATION_STATUS, \"must be Valid, Wildtype, Unknown, or blank\");\r\n requiredMafExpressions.put(FIELD_CHROMOSOME, Pattern.compile(\"\\\\S+\"));\r\n requiredFieldDescriptions.put(FIELD_CHROMOSOME, \"must be one of: X, Y, M, 1-22, or full name of unassigned fragment\");\r\n setupMafSpecificChecks();\r\n }", "@Test\n public void testCheckValidity_InvalidFields() throws Exception {\n expectCheckValidityFailure(msg -> msg.setSource(null));\n \n // null protocol\n expectCheckValidityFailure(msg -> msg.setProtocol(null));\n \n // null or empty topic\n expectCheckValidityFailure_NullOrEmpty((msg, value) -> msg.setTopic(value));\n \n // null payload\n expectCheckValidityFailure(msg -> msg.setPayload(null));\n \n // empty payload should NOT throw an exception\n Forward forward = makeValidMessage();\n forward.setPayload(\"\");\n forward.checkValidity();\n \n // null or empty requestId\n expectCheckValidityFailure_NullOrEmpty((msg, value) -> msg.setRequestId(value));\n \n // invalid hop count\n expectCheckValidityFailure(msg -> msg.setNumHops(-1));\n }", "public static boolean checkMandatoryFields(Object obj) {\n\n\t\tif (obj instanceof UserDTO) {\n\n\t\t\tUserDTO userDTO = (UserDTO) obj;\n\n\t\t\tif (userDTO.getPasscode().trim().isEmpty()) {\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "protected void validate() {\n // no op\n }", "@Test (priority = 2)\n\tpublic void TC2_CheckAllFields_Exisit ()\n\n\t{\n\t\tCreateUserPage UserObj = new CreateUserPage (driver);\n\n\t\t// This is to Validate If all fields of create user page are existing\n\t\tUserObj.Validate_AllFields_Exsist();\n\t\n\n\t}", "private static void processValidation(boolean passed, String property, CHECK check) {\n if (!passed) {\n LOG.error(\"'{}' failed in {} validation\", property, check);\n HealthCheck.setFailed();\n } else {\n LOG.info(\"'{}' passed\", property);\n }\n }", "public void validate() {}", "void validateProperties() {\n super.validateProperties();\n validatePropertySet(\"token\", getToken());\n }", "private void validateProperties() throws BuildException {\r\n if (this.port == null || this.port.length() == 0) {\r\n throw new BuildException(\"Attribute 'port' must be set.\");\r\n }\r\n if (this.depotPath == null || this.depotPath.length() == 0) {\r\n throw new BuildException(\"Attribute 'repositoryUrl' must be set.\");\r\n }\r\n if (this.userName == null || this.userName.length() == 0) {\r\n throw new BuildException(\"Attribute 'userName' must be set.\");\r\n }\r\n if (this.password == null || this.password.length() == 0) {\r\n throw new BuildException(\"Attribute 'password' must be set.\");\r\n }\r\n if (this.depotPath == null || this.depotPath.length() == 0) {\r\n throw new BuildException(\"Attribute 'repositoryUrl' must be set.\");\r\n }\r\n if (this.p4ExecutablePath == null || this.p4ExecutablePath.length() == 0) {\r\n throw new BuildException(\"Attribute 'p4ExecutablePath' must be set.\");\r\n }\r\n File p4Executable = new File(this.p4ExecutablePath);\r\n if (!p4Executable.exists()) {\r\n throw new BuildException(\"Attribute 'p4ExecutablePath' \" + this.p4ExecutablePath +\r\n \" does not appear to point to an actual file.\");\r\n }\r\n \r\n // If default* is specified, then all should be specified. \r\n if (((this.defaultHackystatAccount != null) || \r\n (this.defaultHackystatPassword != null) ||\r\n (this.defaultHackystatSensorbase != null)) &&\r\n ((this.defaultHackystatAccount == null) || \r\n (this.defaultHackystatPassword == null) ||\r\n (this.defaultHackystatSensorbase == null))) {\r\n throw new BuildException (\"If one of default Hackystat account, password, or sensorbase \" +\r\n \"is specified, then all must be specified.\");\r\n }\r\n \r\n // Check to make sure that defaultHackystatAccount looks like a real email address.\r\n if (!ValidateEmailSyntax.isValid(this.defaultHackystatAccount)) {\r\n throw new BuildException(\"Attribute 'defaultHackystatAccount' \" + this.defaultHackystatAccount\r\n + \" does not appear to be a valid email address.\");\r\n }\r\n \r\n // If fromDate and toDate not set, we extract commit information for the previous day.\r\n if (this.fromDateString == null && this.toDateString == null) {\r\n Day previousDay = Day.getInstance().inc(-1);\r\n this.fromDate = new Date(previousDay.getFirstTickOfTheDay() - 1);\r\n this.toDate = new Date(previousDay.getLastTickOfTheDay());\r\n }\r\n else {\r\n try {\r\n if (this.hasSetToAndFromDates()) {\r\n this.fromDate = new Date(Day.getInstance(this.dateFormat.parse(this.fromDateString))\r\n .getFirstTickOfTheDay() - 1);\r\n this.toDate = new Date(Day.getInstance(this.dateFormat.parse(this.toDateString))\r\n .getLastTickOfTheDay());\r\n }\r\n else {\r\n throw new BuildException(\r\n \"Attributes 'fromDate' and 'toDate' must either be both set or both not set.\");\r\n }\r\n }\r\n catch (ParseException ex) {\r\n throw new BuildException(\"Unable to parse 'fromDate' or 'toDate'.\", ex);\r\n }\r\n\r\n if (this.fromDate.compareTo(this.toDate) > 0) {\r\n throw new BuildException(\"Attribute 'fromDate' must be a date before 'toDate'.\");\r\n }\r\n }\r\n }", "protected abstract boolean isValidate();", "public void doRequiredCheck() {\n\t\tthis.checkValue(listener);\n\t}", "private void fillMandatoryFields() {\n\n }", "public static boolean checkMandatoryFieldsRegistration(Object obj) {\n\n\t\tif (obj instanceof UserDTO) {\n\n\t\t\tUserDTO userDTO = (UserDTO) obj;\n\n\t\t\tif (userDTO.getPasscode().trim().isEmpty()) {\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "@Override\n public boolean validate() throws ValidationException\n {\n boolean isValid = super.validate();\n return checkAAField() && isValid;\n }", "private boolean checkFields() {\n if (editTxtName.getText().equals(\"\")) return false;//name\n if (editTxtDesc.getText().equals(\"\")) return false;//desc\n if (editClrColor.getValue() == null) return false;//color\n if (oldEnvironment == null) return false;//environment is null\n return true;//everything is valid\n }", "@Override\r\n\tpublic boolean checkValidity() {\n\t\treturn false;\r\n\t}", "@Override\n public void customValidation() {\n }", "@Override\n public void customValidation() {\n }", "@Override\n public void customValidation() {\n }", "@Test\n\tpublic void testCheckForEmptyFields() {\n\t\t\n\t\t// Case 1: when all fields are present\n\t\tRequestData requestDataObj1 = new RequestData();\n\t\trequestDataObj1.setDomain(\"PBTV\");\n\t\trequestDataObj1.setOwningBusinessEntity(\"CH\");\n\t\trequestDataObj1.setSourceSystemName(\"CDI\");\n\t\tboolean expectedResponse1 = true;\n\t\tboolean response1 = tokenisationMainObj.checkForEmptyFields(requestDataObj1);\n\t\tassertEquals(response1, expectedResponse1);\n\n\t\t// Case 2: when any of them is empty\n\t\tRequestData requestDataObj2 = new RequestData();\n\t\trequestDataObj2.setDomain(\"PBTV\");\n\t\trequestDataObj2.setOwningBusinessEntity(\"CH\");\n\t\trequestDataObj2.setSourceSystemName(\"\");\n\t\tboolean expectedResponse2 = false;\n\t\tboolean response2 = tokenisationMainObj.checkForEmptyFields(requestDataObj2);\n\t\tassertEquals(response2, expectedResponse2);\n\t}", "private boolean validateInputs() {\n return !proID.getText().isEmpty() || \n !proName.getText().isEmpty() ||\n !proPrice.getText().isEmpty();\n }", "private boolean checkFields() {\n\t\tboolean status = true;\n\n\t\treturn status;\n\t}", "public void validate() {\n transportStats.validate(this);\n\n for (String unitName : produces) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit name \" + unitName + \" in build unit stats\");\n }\n\n for (Map.Entry<String, String> entry : buildCities.entrySet()) {\n String terrainName = entry.getKey();\n String cityName = entry.getValue();\n Args.validate(!TerrainFactory.hasTerrainForName(terrainName), \"Illegal terrain \" + terrainName + \" in build cities stats\");\n Args.validate(!CityFactory.hasCityForName(cityName), \"Illegal city \" + cityName + \" in build cities stats\");\n }\n\n for (String unitName : supplyUnits) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit \" + unitName + \" in supply units stats\");\n }\n\n for (String unitName : supplyUnitsInTransport) {\n Args.validate(!UnitFactory.hasUnitForName(unitName), \"Illegal unit \" + unitName + \" in supply units in transport stats\");\n }\n\n Args.validate(StringUtil.hasContent(primaryWeaponName) && !WeaponFactory.hasWeapon(primaryWeaponName),\n \"Illegal primary weapon \" + primaryWeaponName + \" for unit \" + name);\n Args.validate(StringUtil.hasContent(secondaryWeaponName) && !WeaponFactory.hasWeapon(secondaryWeaponName),\n \"Illegal secondary weapon \" + secondaryWeaponName + \" for unit \" + name);\n }", "public void checkFields(){\n }", "private boolean checkFields() {\n boolean test = true;\n if (fname.isEmpty()) {\n test = false;\n }\n if (lname.isEmpty()) {\n test = false;\n }\n if (cin.isEmpty()) {\n test = false;\n }\n if (typeCompte.equals(\"Bancaire\")) {\n if (decouvertNF.isEmpty())\n test = false;\n } else if (typeCompte.equals(\"Epargne\")) {\n if (tauxInteretNF.isEmpty())\n test = false;\n }\n if (s_datePK.getValue() == null) {\n s_datePK.setStyle(\"-fx-border-color:red;-fx-border-radius:3px;-fx-border-size: 1px;\");\n test = false;\n }\n\n return test;\n }", "private void validateOptionalParams(StringBuilder errors) throws Exception {\n // Validate RECON_PARTIAL_TRIGGER Option configuration.\n String paramValue = inputParams.getProperty(\"RECON_PARTIAL_TRIGGER\");\n if(paramValue!=null && !paramValue.trim().isEmpty()){\n StringTokenizer tokens = new StringTokenizer(paramValue, Constants.TOKEN_SEPARATOR);\n while(tokens.hasMoreElements()){\n try{\n PartialTriggerOptions.valueOf(tokens.nextToken());\n }catch(Exception ex){\n errors.append(\"Invalid Parameter Configuration for RECON_PARTIAL_TRIGGER. Please correct.\"\n + System.getProperty(\"line.separator\"));\n }\n }\n }\n // Validate TARGET_SHARED_IDSTORE_SEARCHBASE\n paramValue = inputParams.getProperty(\"TARGET_SHARED_IDSTORE_SEARCHBASE\");\n if(paramValue==null || paramValue.trim().isEmpty()){\n Logger.getLogger(IdentityReconciliationProcessor.class.getName()).log(Level.INFO, \n \"Parameter [Optional] TARGET_SHARED_IDSTORE_SEARCHBASE not configured. \" +\n \"Highly recommended to configure this parameter. Note that - This may result in performance issue.\");\n }\n paramValue = inputParams.getProperty(Constants.BATCH_SIZE_ATTR);\n if(paramValue!=null && !paramValue.trim().isEmpty()){\n try{\n getBatchSize(paramValue);\n }catch(Exception ex){\n errors.append(\"Invalid Parameter Configuration for Batch Size. Please correct.\"\n + System.getProperty(\"line.separator\"));\n }\n }\n }", "private void validCheck ()\n\t{\n\t\tassert allButLast != null || cachedFlatListOrMore != null;\n\t}", "private boolean verifyObligedFields() {\n if(label.getText().toString().isEmpty() || label.getText().toString().equals(\"\"))\n {\n Toast.makeText(ExpenseCardViewDetails.this, R.string.label_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(category.getSelectedItem().toString().isEmpty())\n {\n Toast.makeText(ExpenseCardViewDetails.this, R.string.category_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(cost.getText().toString().isEmpty()){\n Toast.makeText(ExpenseCardViewDetails.this, R.string.cost_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n if(dateDue.getText().toString().isEmpty()){\n Toast.makeText(ExpenseCardViewDetails.this, R.string.date_due_must_be_filled, Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }", "public Set<YValidationAspekt> validateComponent() {\r\n\t\tthis.foundErrors = EnumSet.noneOf(YValidationAspekt.class);\r\n\t\tthis.foundWarnings = EnumSet.noneOf(YValidationAspekt.class);\r\n\r\n\t\tassertModelSpecification();\r\n\t\tassertModelImplementation();\r\n\r\n\t\tassertIdAndVarName();\r\n\t\tassertProperties();\r\n\r\n\t\treturn this.foundErrors;\r\n\t}", "public static boolean checkEmptyFields(Node... itemToCheck) {\n List<Node> failedFields = new ArrayList<>();\n toolTip.setStyle(\"-fx-background-color: linear-gradient(#FF6B6B , #FFA6A6 );\"\n + \" -fx-font-weight: bold;\");\n hackTooltipStartTiming(toolTip);\n for (Node n : arrayToList(itemToCheck)) {\n // Validate TextFields\n if (n instanceof TextField) {\n TextField textField = (TextField) n;\n textField.textProperty().addListener((ObservableValue<? extends String> observable, String oldValue, String newValue) -> {\n removeToolTipAndBorderColor(textField, toolTip);\n });\n if (textField.getText() == null || textField.getText().trim().equals(\"\")) {\n failedFields.add(n);\n addToolTipAndBorderColor(textField, toolTip);\n } else {\n removeToolTipAndBorderColor(textField, toolTip);\n }\n } // Validate Combo Box\n else if (n instanceof ComboBox) {\n ComboBox comboBox = (ComboBox) n;\n comboBox.valueProperty().addListener((ObservableValue observable, Object oldValue, Object newValue) -> {\n removeToolTipAndBorderColor(comboBox, toolTip);\n });\n if (comboBox.getValue() == null) {\n failedFields.add(n);\n addToolTipAndBorderColor(comboBox, toolTip);\n } else {\n removeToolTipAndBorderColor(comboBox, toolTip);\n }\n } // Validate TextArea\n else if (n instanceof TextArea) {\n TextArea textArea = (TextArea) n;\n textArea.textProperty().addListener((ObservableValue<? extends String> observable, String oldValue, String newValue) -> {\n removeToolTipAndBorderColor(textArea, toolTip);\n });\n if (textArea.getText() == null || textArea.getText().trim().equals(\"\")) {\n failedFields.add(n);\n addToolTipAndBorderColor(textArea, toolTip);\n } else {\n removeToolTipAndBorderColor(textArea, toolTip);\n }\n }\n //ADD YOUR VALIDATION HERE\n //TODO\n }\n\n return failedFields.isEmpty();\n }", "void checkValid();", "public boolean parseCheck ()\n\t{\n\t\tIterator iterator = getBasicValidationList().iterator();\n\n\t\ttry\n\t\t{\n\t\t\twhile (iterator.hasNext())\n\t\t\t\t((ValidationComponent)iterator.next()).validate();\n\t\t}\n\t\tcatch (ModelValidationException e)\n\t\t{\n\t\t\tLogHelperModel.getLogger().log(Logger.FINER, \n\t\t\t\t\"model.parse_error\", e);\t// NOI18N\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Override\r\n\tpublic void validate() {\n\t\tsuper.validate();\r\n\t\tif(nofck == null)\r\n\t\t\tnofck = false;\r\n\t}", "private void checkMandatoryArgs(UserResource target, Errors errors) {\n final String proc = PACKAGE_NAME + \".checkMandatoryArgs.\";\n final String email = target.getEmail();\n final String password = target.getPassword();\n final String lastName = target.getLastName();\n\n logger.debug(\"Entering: \" + proc + \"10\");\n\n if (TestUtils.isEmptyOrWhitespace(email)) {\n errors.rejectValue(\"email\", \"user.email.required\");\n }\n logger.debug(proc + \"20\");\n\n if (TestUtils.isEmptyOrWhitespace(password)) {\n errors.rejectValue(\"password\", \"user.password.required\");\n }\n logger.debug(proc + \"30\");\n\n if (TestUtils.isEmptyOrWhitespace(lastName)) {\n errors.rejectValue(\"lastName\", \"userLastName.required\");\n }\n logger.debug(\"Leaving: \" + proc + \"40\");\n }", "@Override\n\t@NotDbField\n\tpublic void check() throws ApiRuleException {\n\t\t\n\t}", "@Override\n\t@NotDbField\n\tpublic void check() throws ApiRuleException {\n\t\t\n\t}", "@Override\n\t@NotDbField\n\tpublic void check() throws ApiRuleException {\n\t\t\n\t}", "private void performSanityCheck()\n\t{\n\t\tif (variableNames != null && domainSizes != null\n\t\t\t\t&& propositionNames != null)\n\t\t{\n\t\t\tcheckStateSizes();\n\t\t\tcheckDomainSizes();\n\t\t}\n\t}", "boolean valid() {\n boolean valid = true;\n\n if (!isAgencyLogoPathValid()) {\n valid = false;\n }\n if (!isMemFieldValid()) {\n valid = false;\n }\n if (!isLogNumFieldValid()) {\n valid = false;\n }\n\n return valid;\n }", "@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}", "private void validate() {\n\n if (this.clsname == null)\n throw new IllegalArgumentException();\n if (this.dimension < 0)\n throw new IllegalArgumentException();\n if (this.generics == null)\n throw new IllegalArgumentException();\n }", "private void validateData() {\n }", "private void validateEmptyElements()\n {\n // Check if something is missing\n if (_dietTreatment.getName().length() < 1)\n {\n getErrors().add(\"Kein Name angegeben.\");\n }\n\n // TODO: check that at least one user is TREATING!\n if (_dietTreatment.getSystemUsers().isEmpty())\n {\n getErrors().add(\"Kein verantwortlicher User angegeben.\");\n }\n\n if (_dietTreatment.getPatientStates().isEmpty())\n {\n getErrors().add(\"Keine Zuweisungsdiagnose angegeben.\");\n }\n }", "private static void isValid(Map<String, Set<String>> propertiesGroupedBy, String key) {\n stringPredicate = s -> {\n final String property = PropertiesUtil.getInstance().getProperty(s);\n return (property == null || property.isEmpty());\n };\n\n //but you can write more predicates as per your needs\n\n\n final Optional<String> optional = propertiesGroupedBy.get(key).stream().filter(stringPredicate).findFirst();\n\n if (optional.isPresent()) {\n try {\n throw new Exception(optional.get() + \" value is null or empty \");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public PropertiesMandatoryFieldsValidator(RuleRankProperties properties) {\n\t\tthis.properties = properties;\n\t\temptyParameter = RuleRankParametersService.getInstance().getDefaultParameter();\n\t\tvalidate();\n\t}", "protected void validate() throws Exception{\t\n\t\tsuper.validate();\n\t\tvalidateProperty(PROPERTY_KEY_USERNAME);\n\t}", "private void validate() {\n\n etCardNumber.validate();\n\n etCardExpiryDate.validate();\n\n etCardCvv.validate();\n\n etCardHolderName.validate();\n\n etPhoneNumber.validate();\n\n etCustomerName.validate();\n }", "@Test\r\n void B6007089_test_SemeterMustNotBeNull() {\r\n System.out.println(\"\\n=======================================\");\r\n System.out.println(\"\\nTest Time Must Not Be Null\");\r\n System.out.println(\"\\n=======================================\\n\");\r\n Section section = new Section();\r\n section.setSec(\"1\");\r\n section.setTime(null);\r\n\r\n\r\n Set<ConstraintViolation<Section>> result = validator.validate(section);\r\n assertEquals(1, result.size());\r\n\r\n ConstraintViolation<Section> v = result.iterator().next();\r\n assertEquals(\"must not be null\", v.getMessage());\r\n assertEquals(\"time\", v.getPropertyPath().toString());\r\n }", "public void printValidateInformation() {\n\n if(!validateFirstName()){\n System.out.println(\"The first name must be filled in\");\n }\n if(!validateFirstNameLength()){\n System.out.println(\"The first name must be at least 2 characters long.\");\n }\n if(!validateLastName()){\n System.out.println(\"The last name must be filled in\");\n }\n if(!validateLastNameLength()){\n System.out.println(\"The last name must be at least 2 characters long.\");\n }\n if(!validateZipcode()){\n System.out.println(\"The zipcode must be a 5 digit number.\");\n }\n if (!validateEmployeeID()){\n System.out.println(\"The employee ID must be in the format of AA-1234.\");\n }\n\n if(validateFirstName() && validateFirstNameLength() && validateLastName() && validateLastNameLength()\n && validateZipcode() && validateEmployeeID()){\n System.out.println(\"There were no errors found.\");\n }\n }", "@Override\n\tprotected boolean validateRequiredParameters() throws Exception {\n\t\treturn true;\n\t}", "private boolean validateFields(){ \n ImplLogger.enterMethod(); \n StringBuffer validationMessage = new StringBuffer();\n boolean isValidationPassed = true;\n if(!ImplValidationUtils.isAlphaSpace(pharmaNameTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_NAME);\n validationMessage.append(ImplConst.NEXT_LINE);\n pharmaNameTextField.setBackground(Color.red);\n isValidationPassed = false;\n } \n if(!ImplValidationUtils.isAlphabetOnly(userNameTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_USERNAME);\n validationMessage.append(ImplConst.NEXT_LINE);\n userNameTextField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(ImplCommonUtil.isUserNameExist(userNameTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_USERNAME_EXIST);\n validationMessage.append(ImplConst.NEXT_LINE);\n userNameTextField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(!ImplValidationUtils.isInteger(contactTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_CONTACT);\n validationMessage.append(ImplConst.NEXT_LINE);\n contactTextField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(!ImplValidationUtils.isInteger(zipCodeTextField.getText())){\n validationMessage.append(ImplConst.VALIDATE_ZIPCODE);\n validationMessage.append(ImplConst.NEXT_LINE);\n zipCodeTextField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(ImplValidationUtils.isStringEmptyOrNull(passwordField.getText())){\n validationMessage.append(ImplConst.VALIDATE_PASSWORD);\n validationMessage.append(ImplConst.NEXT_LINE);\n passwordField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if(ImplValidationUtils.isStringEmptyOrNull(confirmPasswordField.getText())){\n validationMessage.append(ImplConst.CONFIRM_VALIDATE_PASSWORD);\n validationMessage.append(ImplConst.NEXT_LINE);\n confirmPasswordField.setBackground(Color.red);\n isValidationPassed = false;\n }\n if (!ImplValidationUtils.isStringEmptyOrNull(confirmPasswordField.getText()) && !confirmPasswordField.getText().equals(passwordField.getText())){\n validationMessage.append(ImplConst.CONFIRM_VALIDATE_PASSWORD);\n validationMessage.append(ImplConst.NEXT_LINE);\n isValidationPassed = false; \n }\n if(!isValidationPassed){\n JOptionPane.showMessageDialog(null,validationMessage);\n } \n ImplLogger.exitMethod();\n return isValidationPassed;\n }", "@Override\n public void afterPropertiesSet() {\n validateProperties();\n }", "public static boolean checkMandatoryFieldsUpdateUser(Object obj) {\n\n\t\tif (obj instanceof UpdateUserDTO) {\n\n\t\t\tUpdateUserDTO updateUserDTO = (UpdateUserDTO) obj;\n\n\t\t\tif (updateUserDTO.getFirstName().trim().isEmpty()\n\t\t\t\t\t|| updateUserDTO.getLastName().trim().isEmpty()\n\t\t\t\t\t|| updateUserDTO.getAddress1().trim().isEmpty()\n\t\t\t\t\t|| updateUserDTO.getCity().trim().isEmpty()\n\t\t\t\t\t|| updateUserDTO.getState().trim().isEmpty()\n\t\t\t\t\t|| updateUserDTO.getZipCode().trim().isEmpty()\n\t\t\t\t\t|| updateUserDTO.getNewEmailId().trim().isEmpty()\n\n\t\t\t) {\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public void validate(){\r\n\t\ttry{\r\n\t\t\t//First name, last name, date of birth and email are compulsory.\r\n\t\tif(FirstName==null||LastName==null||Dob==null||Email==null) \r\n\t\t\tthrow new Exception(\"One of the field is Empty :\\n(First name / last name / dob / email )\");\r\n\t\tif(TelephoneNumber!=0||MobileNumber!=0)\r\n\t\t\tthrow new Exception(\"Enter Contact Number\");\r\n\t\t\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\t\r\n\t\t/*finally{\r\n\t\t\tSystem.out.println(\"Program Executed\");\r\n\t\t}*/\r\n\t}", "@Override\n\tpublic void validate()\n\t{\n\n\t}", "public boolean validations() {\n boolean result = false;\n String nameString = mItemNameEditText.getText().toString().trim();\n String locationString = mItemLocationEditText.getText().toString().trim();\n\n if (nameString.isEmpty() || nameString == null || locationString.isEmpty() || locationString == null || isImageNotPresent()) {\n displayToastMessage(getString(R.string.fields_mandatory_msg));\n return result;\n } else {\n result = true;\n return result;\n }\n }", "public void verifyNoMatching(AcProperty e)\n {\n }", "@Override\n\tpublic void validate() {\n\t}", "protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please specify at least one component\");\n else {\n \t\t//TODO add more checks\n \t\tok();\n }\n }", "protected void validate() {\n // no implementation.\n }", "private void validateInputParameters(){\n\n }", "private void validatePropertiesModels(GraphContext context) throws Exception\n {\n GraphService<PropertiesModel> service = new GraphService<>(context, PropertiesModel.class);\n\n int numberFound = 0;\n for (PropertiesModel model : service.findAll())\n {\n numberFound++;\n\n Properties props = model.getProperties();\n Assert.assertEquals(\"value1\", props.getProperty(\"example1\"));\n Assert.assertEquals(\"anothervalue\", props.getProperty(\"anotherproperty\"));\n Assert.assertEquals(\"1234\", props.getProperty(\"timetaken\"));\n }\n\n Assert.assertEquals(1, numberFound);\n }", "@Override\r\n public void validate() {\r\n }", "private void validateInput () throws IOException, Exception {\n\t\t\n\t\t// Check that the properties file exists\n\t\tFile propFile = new File(propertiesFile);\n\t\tif (!propFile.exists()) { \n\t\t\tthrow new IOException(\"Unable to open properties file \" + propertiesFile);\t\n\t\t}\n\t\t\n\t\t// Check that the list of register files is not empty\n\t\tif (inputFiles == null || inputFiles.isEmpty()) {\n\t\t\tthrow new Exception(\"No files to process\");\n\t\t}\n\t}", "protected void validate() {\n Validator mandatoryValidator = validateMandatoryOptions();\n Validator exclusionsValidator = validateOptionExclusions();\n Validator inapplicableOptionValidator = validateInapplicableOptions();\n Validator optionalValidator = validateOptionalParameters();\n\n List<String> validationMessages = new LinkedList<>();\n\n validationMessages.addAll(mandatoryValidator.getValidationMessages());\n validationMessages.addAll(exclusionsValidator.getValidationMessages());\n validationMessages.addAll(optionalValidator.getValidationMessages());\n validationMessages.addAll(inapplicableOptionValidator.getValidationMessages());\n\n if (!validationMessages.isEmpty()) {\n String tablePathString =\n (tablePath != null) ? SourceUtils.pathToString(tablePath) : \"null\";\n throw new DeltaOptionValidationException(tablePathString, validationMessages);\n }\n }", "private void checkRequiredFields() {\n // check the fields which should be non-null\n if (configFileName == null || configFileName.trim().length() == 0) {\n throw new DAOConfigurationException(\n \"The 'configFileName' should not be null.\");\n }\n if (configNamespace == null || configNamespace.trim().length() == 0) {\n throw new DAOConfigurationException(\n \"The 'configNamespace' should not be null.\");\n }\n if (searchBundleManagerNamespace == null\n || searchBundleManagerNamespace.trim().length() == 0) {\n throw new DAOConfigurationException(\n \"The 'searchBundleManagerNamespace' should not be null.\");\n }\n if (entityManager == null) {\n throw new DAOConfigurationException(\n \"The 'entityManager' should not be null.\");\n }\n }", "protected boolean isAllRequiredTxtFieldsFilled() {\r\n JTextField[] txtFields = {\r\n txtFieldFirstName, txtFieldLastName,\r\n txtFieldDateOfBirth, txtFieldIBAN,\r\n txtFieldState, txtFieldHouseNumber,\r\n txtFieldPostcode, txtFieldLocation,\r\n txtFieldCountry, txtFieldState\r\n };\r\n\r\n for (JTextField txtField : txtFields) {\r\n if (txtField.getText().equals(\"\")) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }", "public boolean isRequired();", "private boolean checkfields() {\n try {\n Integer.parseInt(checknum.getText().toString());\n Integer.parseInt(banknum.getText().toString());\n Integer.parseInt(branchnum.getText().toString());\n Integer.parseInt(accountnum.getText().toString()); //was commented\n\n } catch (NumberFormatException e) { // at least one of these numbers is not Integer\n return false;\n }\n\n if (checknum.getText().toString().equals(null) || banknum.getText().toString().equals(null) ||branchnum.getText().toString().equals(null)|| accountnum.getText().toString().equals(null))\n return false; // At least one of the fields is empty\n\n return true;\n }", "boolean isRequired();", "boolean isRequired();", "boolean isRequired();", "public boolean isValidationEnabled();", "protected boolean validateProperties() throws IOException, Throwable {\n return (disableDNS() &&\n rebootAndWait(\"all\") &&\n changeProps() &&\n enableDNS() &&\n rebootAndWait(\"all\"));\n }", "private boolean validateInputs() {\n if (Constants.NULL.equals(review)) {\n reviewET.setError(\"Must type a review!\");\n reviewET.requestFocus();\n return false;\n }\n if (Constants.NULL.equals(heading)) {\n headingET.setError(\"Heading cannot be empty\");\n headingET.requestFocus();\n return false;\n }\n return true;\n }", "@Override\n\tprotected boolean verifyFields() {\n\t\treturn false;\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (!is_set_status()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'status' is unset! Struct:\" + toString());\n }\n\n if (!is_set_data()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'data' is unset! Struct:\" + toString());\n }\n\n if (!is_set_feature()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'feature' is unset! Struct:\" + toString());\n }\n\n if (!is_set_predictResult()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'predictResult' is unset! Struct:\" + toString());\n }\n\n if (!is_set_msg()) {\n throw new org.apache.thrift.protocol.TProtocolException(\"Required field 'msg' is unset! Struct:\" + toString());\n }\n\n // check for sub-struct validity\n if (feature != null) {\n feature.validate();\n }\n }", "private void fillMandatoryFields_custom() {\n\n }", "private static boolean verifyProperties(Properties pProperties){\n boolean completeParams = false;\n if (pProperties.getProperty(UtilsConnection.CONSUMER_KEY) != null &&\n pProperties.getProperty(UtilsConnection.CONSUMER_SECRET) != null &&\n pProperties.getProperty(UtilsConnection.ACCESS_TOKEN) != null &&\n pProperties.getProperty(UtilsConnection.ACCESS_TOKEN_SECRET) != null )\n completeParams = true;\n return completeParams;\n }", "public abstract void\n bypassValidation_();", "private List<String> returnEmptyRequiredFields(List<String> requiredFields, Object givenObject){\n return requiredFields.stream()\n .filter(x -> {\n try {\n return StringUtils.isEmpty((String) givenObject.getClass().getDeclaredField(x).get(givenObject));\n } catch (Exception e) {\n //Not going to try and scmOrganization for exceptions; if there is an exception we probably have greater issues than an empty/null field\n getLog().debug(String.format(\"Unable to ascertain if %s is null/empty\",x));\n return true;\n }\n })\n .collect(Collectors.toList());\n }", "public boolean validate(Object o){\r\n\t\treturn false;\r\n\t}", "private boolean validateData() {\n if (!mCommon.validateData()) return false;\n\n Core core = new Core(this);\n\n // Due Date is required\n if (TextUtils.isEmpty(getRecurringTransaction().getDueDateString())) {\n core.alert(R.string.due_date_required);\n return false;\n }\n\n if (TextUtils.isEmpty(mCommon.viewHolder.dateTextView.getText().toString())) {\n core.alert(R.string.error_next_occurrence_not_populate);\n\n return false;\n }\n\n // Payments Left must have a value\n if (getRecurringTransaction().getPaymentsLeft() == null) {\n core.alert(R.string.payments_left_required);\n return false;\n }\n return true;\n }", "@Override\r\n\tprotected void validate() {\n\t}", "public boolean externalFilled() {\n return firstName != null && !firstName.isEmpty()\n || lastName != null && !lastName.isEmpty()\n || email != null && !email.isEmpty();\n }", "public boolean inputIsValid() {\n return nameIsValid() &&\n descriptionIsValid() &&\n priceIsValid() &&\n streetIsValid() &&\n zipcodeIsValid() &&\n cityIsValid() &&\n imageIsSelected();\n }", "boolean getValidateOnly();", "boolean getValidateOnly();", "public void validateSchedular() {\n boolean startDateCheck = false, cronTimeCheck = false, dateFormatCheck = false;\n /*\n Schedular Properties\n */\n\n System.out.println(\"Date: \" + startDate.getValue());\n if (startDate.getValue() != null) {\n System.out.println(\"Date: \" + startDate.getValue());\n startDateCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Start Date should not be empty.\\n\");\n }\n\n if (!cronTime.getText().isEmpty()) {\n cronTimeCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Cron Time should not be empty.\\n\");\n }\n// if (!dateFormat.getText().isEmpty()) {\n// dateFormatCheck = true;\n// } else {\n// execptionData.append((++exceptionCount) + \". Date Format should not be empty.\\n\");\n// }\n\n if (startDateCheck == true && cronTimeCheck == true) {\n schedularCheck = true;\n } else {\n schedularCheck = false;\n startDateCheck = false;\n cronTimeCheck = false;\n dateFormatCheck = false;\n }\n\n }", "public void validateAfterParse() \r\n\t{\n\t\tValidate.fieldNotBlank(getName(), \"name\");\r\n\t\t\r\n\t\t//Must have columns and they can't be null\r\n\t\tValidate.fieldNotEmptyWithNoNullElements(getColumns(), \"columns\");\r\n\t\t\r\n\t\tint numPrimaryKeysDefined = 0;\r\n\t\t\r\n\t\tfor (ColumnDefinition def : getColumns())\r\n\t\t{\r\n\t\t\tif (def.isPrimaryKey())\r\n\t\t\t{\r\n\t\t\t\tnumPrimaryKeysDefined++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Can only have 1 PK\r\n\t\tValidate.isTrue(numPrimaryKeysDefined == 1);\r\n\r\n\t\tfor (ColumnDefinition def : getColumns())\r\n\t\t{\r\n\t\t\tdef.validateAfterParse();\r\n\t\t}\r\n\t\t\r\n\t\t//Check over indexes, make sure each column name for the indexes actually exists\r\n\t\tfor(IndexDefinition def : getIndexes())\r\n\t\t{\r\n\t\t\tfor(String idxColName : def.getColumnNames())\r\n\t\t\t{\r\n\t\t\t Validate.isTrue(getColumns().contains(ColumnDefinition.valueOf(idxColName))); //Can't use containsColumn yet as that map gets initialized in postParse()\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean validatePersonalData() {\n\t\tif (firstName == null)\n\t\t\treturn false;\n\t\tif (lastName == null)\n\t\t\treturn false;\n\t\tif (phoneNum == null)\n\t\t\treturn false;\n\t\tif (email == null)\n\t\t\treturn false;\n\n\t\treturn true;\n\t}" ]
[ "0.733566", "0.73229665", "0.6648659", "0.6492695", "0.6397906", "0.63760626", "0.6155728", "0.6135324", "0.61291057", "0.60495526", "0.6044025", "0.6013029", "0.59874713", "0.5974156", "0.595246", "0.5912535", "0.5892669", "0.58869535", "0.58696556", "0.58598536", "0.5858108", "0.58550054", "0.5844887", "0.5837677", "0.5837677", "0.5837677", "0.5826595", "0.58215857", "0.5816917", "0.5802195", "0.57928616", "0.579101", "0.57872516", "0.5785307", "0.57791024", "0.57776254", "0.57755697", "0.5774524", "0.5767678", "0.5762697", "0.576136", "0.5760597", "0.5760597", "0.5760597", "0.57369703", "0.57364786", "0.5732267", "0.57293147", "0.5729207", "0.5728159", "0.5717334", "0.56941354", "0.56910074", "0.56737655", "0.56716174", "0.5668387", "0.5666287", "0.565817", "0.56425714", "0.56386507", "0.56354755", "0.56342393", "0.5623641", "0.56174207", "0.5617138", "0.5616374", "0.5614191", "0.56065184", "0.56051564", "0.5601926", "0.55840474", "0.55797654", "0.5577123", "0.5573071", "0.55719465", "0.5570816", "0.5567799", "0.5567799", "0.5567799", "0.5563094", "0.5560391", "0.5552633", "0.5549879", "0.55491966", "0.55491966", "0.55491966", "0.55464727", "0.5543803", "0.5541102", "0.5536207", "0.5533341", "0.5532025", "0.55317134", "0.55275273", "0.55239487", "0.5523824", "0.5514912", "0.5514912", "0.5512837", "0.5509741", "0.5508001" ]
0.0
-1
Validates the given property path as String
private static boolean validateString(Map.Entry<String, CheckState> entry) { String prop = System.getProperty(entry.getKey()); if (entry.getValue().isOptional && prop == null) { return true; } return prop != null && !"".equals(prop); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void validate(Path path) {\n }", "protected void validateProperty(String name, PolylineMapObject line) throws RuntimeException {\n if (line.getProperties().get(name) == null)\n throw new RuntimeException(\"Property '\" + name + \"' not found when loading platform\");\n\n String value = line.getProperties().get(name).toString();\n\n /*if (value == null)\n throw new RuntimeException(\"Property '\" + name + \"' must be != NULL\");*/\n\n if (value.trim().length() == 0)\n throw new RuntimeException(\"Property '\" + name + \"' cannot be empty\");\n }", "private String getRequiredStringProperty(String property) throws MissingRequiredTestPropertyException{\n\t\tString value = testProperties.getProperty(property);\n\t\tif (value == null)\n\t\t\tthrow new MissingRequiredTestPropertyException(\"test.properties is missing required property \" + property);\n\t\treturn value;\n\t}", "private String getRequiredProperty(Properties props, String key) {\r\n\t\tString value = props.getProperty(key);\r\n\t\tif ((value == null) || (value.trim().length() == 0)) {\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Property file must provide a value for '\" + key + \"'\");\r\n\t\t}\r\n\t\treturn value;\r\n\t}", "private boolean isValueAProperty(String name)\n {\n int openIndex = name.indexOf(\"${\");\n\n return openIndex > -1;\n }", "static FormValidation doCheckPath(@QueryParameter String value) {\n if (StringUtils.isBlank(value)) {\n return FormValidation.ok();\n }\n try {\n final FilePath filePath = new FilePath(new File(value));\n filePath.exists();\n } catch (Exception e) {\n return FormValidation.error(\"The specified value is not a valid path\");\n }\n return FormValidation.ok();\n }", "private String getRequiredStringProperty(String[] propertyNameList) throws MissingRequiredTestPropertyException{\n\t\tif (propertyNameList.length == 0)\n\t\t\tthrow new IllegalArgumentException(\"empty property name list\");\n\t\tString value = getOptionalStringProperty(propertyNameList);\n\t\tif (value == null)\n\t\t\tthrow new MissingRequiredTestPropertyException(\"test.properties is missing required property \" + propertyNameList[0]);\n\t\treturn value;\n\t}", "@Override\n protected void performValidation(String path, Object value, List<ValidationResult> results) {\n super.performValidation(path, value, results);\n\n if (value == null)\n return;\n\n String name = path != null ? path : \"value\";\n Map<String, Object> properties = ObjectReader.getProperties(value);\n\n // Process defined properties\n if (_properties != null) {\n for (PropertySchema propertySchema : _properties) {\n String processedName = null;\n\n for (Map.Entry<String, Object> entry : properties.entrySet()) {\n String propertyName = entry.getKey();\n Object propertyValue = entry.getValue();\n // Find properties case insensitive\n if (propertyName.equalsIgnoreCase(propertySchema.getName())) {\n propertySchema.performValidation(path, propertyValue, results);\n processedName = propertyName;\n break;\n }\n }\n\n if (processedName == null)\n propertySchema.performValidation(path, null, results);\n else\n properties.remove(processedName);\n }\n }\n\n // Process unexpected properties\n for (Map.Entry<String, Object> entry : properties.entrySet()) {\n String propertyPath = path == null || path.length() == 0 ? entry.getKey() : path + \".\" + entry.getKey();\n\n results.add(new ValidationResult(propertyPath, ValidationResultType.Warning, \"UNEXPECTED_PROPERTY\",\n name + \" contains unexpected property \" + entry.getKey(), null, entry.getKey()));\n }\n }", "public static boolean isValidPath(String path) {\n\t\ttry {\n\t\t\tPaths.get(path);\n\t\t\treturn true;\n\t\t} catch (InvalidPathException e) {\n\t\t\treturn false;\n\t\t}\n\t}", "private static <E> Path<?> getPropertyPath(Path<E> root, String propertyPath) {\n\t\tString[] pathItems = StringUtils.split(propertyPath, \".\");\n\n\t\tPath<?> path = root.get(pathItems[0]);\n\t\tfor (int i = 1; i < pathItems.length; i++) {\n\t\t\tpath = path.get(pathItems[i]);\n\t\t}\n\t\treturn path;\n\t}", "@Override\n public boolean isLenientProperties() {\n return true;\n }", "public static Path<?> getPath(Path<?> path, String propertyPath) {\n\tif (StringUtils.isEmpty(propertyPath))\n\t return path;\n\n\tString name = StringUtils.substringBefore(propertyPath, PropertyUtils.PROPERTY_SEPARATOR);\n\tPath<?> p = path.get(name);\n\n\treturn getPath(p,\n\t\tStringUtils.substringAfter(propertyPath, PropertyUtils.PROPERTY_SEPARATOR));\n\n }", "private static void isValid(Map<String, Set<String>> propertiesGroupedBy, String key) {\n stringPredicate = s -> {\n final String property = PropertiesUtil.getInstance().getProperty(s);\n return (property == null || property.isEmpty());\n };\n\n //but you can write more predicates as per your needs\n\n\n final Optional<String> optional = propertiesGroupedBy.get(key).stream().filter(stringPredicate).findFirst();\n\n if (optional.isPresent()) {\n try {\n throw new Exception(optional.get() + \" value is null or empty \");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "@SuppressWarnings(\"rawtypes\")\n private boolean containsNoValidValueFor(final Dictionary properties,\n final String propertyKey) {\n final Object propertyValue = properties.get(propertyKey);\n return !(propertyValue instanceof String) || StringUtils.isEmpty((String) propertyValue);\n }", "static void checkKey(String firstProperty, String secondProperty) {\n firstProperty = firstProperty.toUpperCase();\n secondProperty = secondProperty.toUpperCase();\n if (!properties.contains(firstProperty) && !properties.contains(secondProperty)\n && !negativeProperties.contains(firstProperty) && !negativeProperties.contains(secondProperty)) {\n System.out.printf(\"The properties [%s, %s] are wrong.\\n\" +\n \"Available properties: %s%n\\n\", firstProperty, secondProperty, properties);\n Start.start();\n }\n }", "static String validateObjectName(String objectName, boolean allowEmptyObjectName) {\n logger.atFiner().log(\"validateObjectName('%s', %s)\", objectName, allowEmptyObjectName);\n\n if (isNullOrEmpty(objectName) || objectName.equals(PATH_DELIMITER)) {\n if (allowEmptyObjectName) {\n objectName = \"\";\n } else {\n throw new IllegalArgumentException(\n String.format(\n \"GCS path must include non-empty object name [objectName='%s',\"\n + \" allowEmptyObjectName=%s]\",\n objectName, allowEmptyObjectName));\n }\n }\n\n // We want objectName to look like a traditional file system path,\n // therefore, disallow objectName with consecutive '/' chars.\n for (int i = 0; i < (objectName.length() - 1); i++) {\n if (objectName.charAt(i) == '/' && objectName.charAt(i + 1) == '/') {\n throw new IllegalArgumentException(\n String.format(\"GCS path must not have consecutive '/' characters: '%s'\", objectName));\n }\n }\n\n // Remove leading '/' if it exists.\n if (objectName.startsWith(PATH_DELIMITER)) {\n objectName = objectName.substring(1);\n }\n\n logger.atFiner().log(\"validateObjectName -> '%s'\", objectName);\n return objectName;\n }", "boolean containsProperty(String name);", "String getPropertyExists();", "public String jsonPathBuilder(String path){\n\t\tString validJsonPath=\"$\";\n\t\tString[] pathArray = path.split(\"/\");\n\t\tfor(int i=0; i<pathArray.length; i++){\n\t\t\tvalidJsonPath = validJsonPath + \".\" + pathArray[i];\n\t\t}\n\t\treturn validJsonPath;\n\t}", "private String formatPropertyName(String property) {\r\n property = property.replace( '/', '.' );\r\n property = property.replace( '@', '.' );\r\n return StringExtend.validateString( property, \".\" );\r\n }", "public static boolean isValidCarbideProjectPathSegment(String pathSegment) {\r\n\t\tIWorkspace workspace = ResourcesPlugin.getWorkspace();\r\n\t\tint typeMask = IResource.FILE | IResource.FOLDER;\r\n\t\tboolean valid = pathSegment.length() == 0 || \r\n\t\t\tworkspace.validateName(pathSegment, typeMask).isOK();\r\n\t\tif (valid) {\r\n\t\t\tfor (int i = 0; i < pathSegment.length(); i++) {\r\n\t\t\t\tchar c = pathSegment.charAt(i);\r\n\t\t\t\tvalid = Character.isLetterOrDigit(c) || (c == '-') || (c == '_') || (c == '.');\r\n\t\t\t\tif (!valid)\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn valid;\r\n\t}", "protected boolean isSigninPath(final String path)\n\t{\n\t\treturn applicationProperties.getSigninPathPatterns().contains(path);\n\t}", "public Optional<Path> getOptionalPathProperty(String propertyName) {\n if(propertiesMap.containsKey(propertyName)) {\n Path path = Paths.get(propertiesMap.get(propertyName));\n if(Files.isReadable(path)) {\n return Optional.of(path);\n }\n }\n System.out.println(\"Property name \" + propertyName + \" is invalid\");\n return Optional.empty();\n }", "@Override\n protected boolean isValueIsValid(String value) {\n return false;\n }", "public void validate(String value) throws UnsupportedPreferenceException { }", "@Override\n public boolean hasProperty(final String relPath) {\n return false;\n }", "@Override\r\n\t\tpublic boolean accept(Path path) {\n\t\t\tboolean flag = path.toString().matches(regex);\r\n\t\t\treturn flag;\r\n\t\t}", "public static boolean isSafe(String pathComponent) {\n if (pathComponent == null) {\n return false;\n }\n if (!pathComponent.trim().equals(pathComponent)) {\n return false;\n }\n return pathComponent.matches(\"\\\\w([- .]|\\\\w)*\");\n }", "public String getPropertyPath();", "public String getPropertyPath();", "private boolean validateFile(String path) {\n return !path.equals(AppStrings.NO_FILE_PATH);\n }", "public static String verifyAndFetchMandatoryProperty(String key,\r\n\t\t\tProperties prop) throws PropertyNotConfiguredException {\r\n\t\tString property;\r\n\t\t// Mandatory property should not be null.\r\n\t\tproperty = Objects.requireNonNull(fetchProperty(key, prop),\r\n\t\t\t\t\"ERROR: Must set configuration value for \" + key);\r\n\r\n\t\t// Mandatory property should not be blank.\r\n\r\n\t\tif (property.isEmpty()) {\r\n\t\t\tthrow new PropertyNotConfiguredException(\r\n\t\t\t\t\t\"ERROR: Must set configuration value for \" + key);\r\n\t\t}\r\n\t\treturn property;\r\n\t}", "boolean hasProperty(String key);", "@Override\r\n\t\tpublic boolean accept(Path path) {\n\t\t\tboolean flag = path.toString().matches(regex);\r\n\t\t\treturn !flag;\r\n\t\t}", "private static String getPropertyValue(Properties properties, String propertyName) {\n \n String value = properties.getProperty(propertyName);\n \n if (\"\".equals(value)) {\n return null;\n }\n \n return value;\n }", "@Override\n public boolean validate(String str) {\n\n if (Utils.isEmpty(str)) {\n return false;\n }\n\n // Assuming str is relative url\n if (str.startsWith(\"/\")) {\n try {\n URL url = new URL(\"http://www.stub.com\" + str);\n if (url.getQuery() != null) {\n for (String word : keyWords) {\n Map<String, String> params = getQueryParams(url.getQuery());\n if (params.containsKey(word)) {\n resource = str;\n return true;\n }\n }\n }\n } catch (MalformedURLException ignored) {\n return false;\n }\n }\n\n // Or plain 'get/update/etc' resources\n if (str.chars().allMatch(Character::isLetter)) {\n for (String keyWord : keyWords) {\n if (str.startsWith(keyWord)) {\n resource = str;\n return true;\n }\n }\n }\n\n return false;\n }", "String getProperty(String property);", "boolean hasProperty(String propertyName);", "public boolean isProperty(String classPath, String fieldName)\n throws EnhancerMetaDataUserException, EnhancerMetaDataFatalError\n {\n final JDOField field = getJDOField(classPath, fieldName);\n return (field != null && field.isProperty());\n }", "public void testAssertPropertyLenientEquals_equals() {\r\n assertPropertyLenientEquals(\"stringProperty\", \"stringValue\", testObject);\r\n }", "@Test\n public void getSlidesDocumentPropertyInvalidPropertyNameTest() throws ApiException {\n Boolean needAssertResponse = false;\n try {\n GetSlidesDocumentPropertyRequest request = createGetSlidesDocumentPropertyRequest();\n request.setPropertyName((String)invalidizeTestValue(request.getPropertyName(), \"propertyName\", \"String\"));\n initialize(\"getSlidesDocumentProperty\", \"propertyName\", request.getPropertyName());\n DocumentPropertyResponse response = api.getSlidesDocumentProperty(request);\n needAssertResponse = true;\n } catch (ApiException ex) {\n assertException(ex, \"propertyName\", \"getSlidesDocumentProperty\");\n }\n if (needAssertResponse) {\n assertResponse(\"propertyName\", \"getSlidesDocumentProperty\");\n }\n }", "private int getRequiredProperty(String propName, Properties prop)\n {\n if ((propName == null) || (propName.trim().length() < 1))\n throw new IllegalArgumentException(\"propName may not be null or empty\");\n if (prop == null)\n throw new IllegalArgumentException(\"prop may not be null\");\n\n String strValue = prop.getProperty(propName);\n if ((strValue == null) || (strValue.trim().length() < 1))\n {\n PSLogger.logInfo(\n \"Value of property : \" + propName + \" is null or empty.\");\n return -1;\n }\n\n int value = -1;\n try\n {\n value = Integer.parseInt(strValue);\n }\n catch (Throwable t)\n {\n PSLogger.logInfo(\n \"Value of property : \" + propName + \" is invalid.\");\n PSLogger.logInfo(t.getLocalizedMessage());\n return -1;\n }\n return value;\n }", "boolean hasPropertyLike(String name);", "boolean containsProperties(\n java.lang.String key);", "boolean isValidValue(String value);", "public abstract boolean getProperty(String propertyName);", "private static String getRequiredParam(String param, Properties properties,\r\n String[] arguments) throws IllegalArgumentException\r\n {\r\n String value = properties.getProperty(param);\r\n if (value == null)\r\n {\r\n if ((arguments != null) && (arguments.length > 0))\r\n {\r\n value = arguments[0].trim();\r\n }\r\n else\r\n {\r\n throw new IllegalArgumentException(\"'\" + param + \"' is a required \"\r\n + \"initialization parameter. Aborting.\");\r\n }\r\n }\r\n return value;\r\n }", "public void setPath(String path)\n {\n try\n {\n // Tokenize the path\n pathArray = getPathResolved(path);\n \n // Set path property\n this.path = path;\n }\n catch (NumberFormatException nfe)\n {\n // Reset path property\n this.path = \"\";\n }\n }", "java.lang.String getProperty();", "@Test\n public void testGetProperty_String_String() throws Exception {\n String key = \"doesn't exist\";\n String defaultValue = \"default\";\n DatabaseProperties instance = cveDb.getDatabaseProperties();\n String expResult = \"default\";\n String result = instance.getProperty(key, defaultValue);\n assertEquals(expResult, result);\n }", "@Override\n\t\tpublic boolean hasProperty(String key) {\n\t\t\treturn false;\n\t\t}", "public\n String getProperty_String(String key)\n {\n if (key == null)\n return null;\n\n String val = getProperty(key);\n\n return val;\n }", "@Override\r\n\tpublic boolean propertyExists(String absPath) throws RepositoryException {\n\t\treturn false;\r\n\t}", "public boolean hasProperty( String key );", "public String getOptionalStringProperty(String property) {\n\t\treturn testProperties.getProperty(property);\n\t}", "private String sanitizePath(String path)\r\n\t{\r\n\t\tif (path == null)\r\n\t\t\treturn \"\";\r\n\t\telse if (path.startsWith(\"/\"))\r\n\t\t\tpath = path.substring(1);\r\n\r\n\t\treturn path.endsWith(\"/\") ? path : path + \"/\";\r\n\t}", "@Test\n public void testCreateFromProperties_String() throws Exception {\n System.out.println(\"createFromProperties\");\n \n EngineConfiguration result = EngineConfiguration.createFromProperties(propertiesName);\n assertProperties(result);\n }", "public void setStringProperty(String propertyName, String value);", "@Test\n void testAssertPropertyLenientEquals_equals() {\n assertPropertyLenientEquals(\"stringProperty\", \"stringValue\", testObject);\n }", "public String getStringProperty(String propertyName) ;", "protected void checkXpathFormat(String xpath) {\n\t\tif (!Selectors.isXPath(xpath)) {\n\t\t\texceptionLauncher.throwSerenityExeption(new Exception(),\n\t\t\t\t\tString.format(\"The format for the xpath [%s] is not correct.\", xpath));\n\t\t}\n\t}", "Object getPropertyexists();", "private static void checkPath(String path) {\n Objects.requireNonNull(path);\n Path file = new File(path).toPath();\n boolean exists = Files.exists(file); // Check if the file exists\n boolean isDirectory = Files.isDirectory(file); // Check if it's a directory\n if (!exists || !isDirectory)\n throw new IllegalArgumentException(path + \" must be exist and a directory\");\n }", "protected boolean verifyPath(PathUtils.ResolvedDestination resolvedDest, String destPath) {\n if (resolvedDest==null) {\r\n showErrorDialog(Translator.get(\"invalid_path\", destPath), errorDialogTitle);\r\n return false;\r\n }\r\n return true;\r\n \t}", "protected abstract void loadProperty(String key, String value);", "@Override\n public boolean validate(final String param) {\n return false;\n }", "@Test\n public void a_hierarchical_non_existent_path_can_be_created_and_value_set() {\n\n String path = \"$.shipment.extensionFields.carrier\";\n JsonPath compiledPath = JsonPath.compile(path);\n Object output = compiledPath.set(pathConfiguration.jsonProvider().parse(inputObject),\n \"Alpha Transports\",pathConfiguration);\n String result = parse(output).read(path);\n assertThat(result).matches(\"Alpha Transports\");\n\n }", "protected void validate() throws Exception{\t\n\t\tsuper.validate();\n\t\tvalidateProperty(PROPERTY_KEY_USERNAME);\n\t}", "public boolean canProvideString();", "private static String verifyXPathRoot(String schemaNS, String rootProp) throws XMPException {\n\n\t\tif (schemaNS == null || schemaNS.length() == 0) {\n\t\t\tthrow new XMPException(\"Schema namespace URI is required\", XMPError.BADSCHEMA);\n\t\t}\n\n\t\tif ((rootProp.charAt(0) == '?') || (rootProp.charAt(0) == '@')) {\n\t\t\tthrow new XMPException(\"Top level name must not be a qualifier\", XMPError.BADXPATH);\n\t\t}\n\n\t\tif (rootProp.indexOf('/') >= 0 || rootProp.indexOf('[') >= 0) {\n\t\t\tthrow new XMPException(\"Top level name must be simple\", XMPError.BADXPATH);\n\t\t}\n\n\t\tString prefix = XMPMetaFactory.getSchemaRegistry().getNamespacePrefix(schemaNS);\n\t\tif (prefix == null) {\n\t\t\tthrow new XMPException(\"Unregistered schema namespace URI\", XMPError.BADSCHEMA);\n\t\t}\n\n\t\t// Verify the various URI and prefix combinations. Initialize the\n\t\t// expanded XMPPath.\n\t\tint colonPos = rootProp.indexOf(':');\n\t\tif (colonPos < 0) {\n\t\t\t// The propName is unqualified, use the schemaURI and associated\n\t\t\t// prefix.\n\t\t\tverifySimpleXMLName(rootProp); // Verify the part before any colon\n\t\t\treturn prefix + rootProp;\n\t\t} else {\n\t\t\t// The propName is qualified. Make sure the prefix is legit. Use the associated\n\t\t\t// URI and\n\t\t\t// qualified name.\n\n\t\t\t// Verify the part before any colon\n\t\t\tverifySimpleXMLName(rootProp.substring(0, colonPos));\n\t\t\tverifySimpleXMLName(rootProp.substring(colonPos));\n\n\t\t\tprefix = rootProp.substring(0, colonPos + 1);\n\n\t\t\tString regPrefix = XMPMetaFactory.getSchemaRegistry().getNamespacePrefix(schemaNS);\n\t\t\tif (regPrefix == null) {\n\t\t\t\tthrow new XMPException(\"Unknown schema namespace prefix\", XMPError.BADSCHEMA);\n\t\t\t}\n\t\t\tif (!prefix.equals(regPrefix)) {\n\t\t\t\tthrow new XMPException(\"Schema namespace URI and prefix mismatch\", XMPError.BADSCHEMA);\n\t\t\t}\n\n\t\t\treturn rootProp;\n\t\t}\n\t}", "@Test\n public void testGetProperty_String() throws DatabaseException {\n String key = \"version\";\n DatabaseProperties instance = cveDb.getDatabaseProperties();\n String result = instance.getProperty(key);\n \n int major = Integer.parseInt(result.substring(0, result.indexOf('.')));\n \n assertTrue(major >= 5);\n }", "String getProperty(String key);", "String getProperty(String key);", "String getProperty(String key);", "String getProperty();", "String getProperty();", "String getProperty();", "@Override\n\tpublic boolean hasProperty(String fieldName, String value) {\n\t\tString[] fields = doc.getValues(fieldName);\n\t\tif (fields != null) {\n\t\t\tfor (String field : fields) {\n\t\t\t\tif (value.equals(field)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "boolean isAgencyLogoPathValid() {\n boolean valid = true;\n\n if (defaultLogoRB.isSelected()) {\n agencyLogoPathFieldValidationLabel.setText(\"\");\n } else {\n String agencyLogoPath = agencyLogoPathField.getText();\n if (agencyLogoPath.isEmpty()) {\n agencyLogoPathFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_agencyLogoPathFieldValidationLabel_pathNotSet_text());\n valid = false;\n } else {\n File file = new File(agencyLogoPathField.getText());\n if (file.exists() && file.isFile()) {\n BufferedImage image;\n try { //ensure the image can be read\n image = ImageIO.read(file); //create it as an image first to support BMP files\n if (image == null) {\n throw new IOException(\"Unable to read file as a BufferedImage for file \" + file.toString());\n }\n agencyLogoPathFieldValidationLabel.setText(\"\");\n } catch (IOException | IndexOutOfBoundsException ignored) {\n agencyLogoPathFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_agencyLogoPathFieldValidationLabel_invalidImageSpecified_text());\n valid = false;\n }\n } else {\n agencyLogoPathFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_agencyLogoPathFieldValidationLabel_invalidPath_text());\n valid = false;\n }\n }\n }\n\n return valid;\n }", "java.lang.String getPropertiesOrThrow(\n java.lang.String key);", "String validate(PluginConfig pluginConfig, String value);", "private String getStringProperty(ParameterList key, boolean isFile) \n throws NumberFormatException, NullPointerException, MissingOptionException{\n try {\n boolean keyPresent = fileParameters.containsKey(key.name);\n String strValue = keyPresent ? fileParameters.getProperty(key.name).replaceAll(\"\\\\s\", \"\") : null;\n if (!keyPresent && key.mandatory) {\n throw new MissingOptionException(\"Input parameter not found: \" + key.name);\n }\n else if(!keyPresent){\n return null;\n }\n if(isFile){\n strValue = strValue.replaceFirst(\"^~\",System.getProperty(\"user.home\"));\n }\n loadedParametersLog.append(key.name).append(\"=\").append(strValue).append(\"\\n\");\n return strValue;\n } catch (NullPointerException e) {\n throw new NullPointerException(e.getMessage() + \"\\nThe parameter file was not initialized.\");\n }\n }", "public static boolean checkName(final String basePath, final String path, final NameScope scope) {\r\n if (scope == NameScope.FILE_SYSTEM) {\r\n // All good\r\n return true;\r\n }\r\n\r\n if (!path.startsWith(basePath)) {\r\n return false;\r\n }\r\n\r\n int baseLen = basePath.length();\r\n if (VFS.isUriStyle()) {\r\n // strip the trailing \"/\"\r\n baseLen--;\r\n }\r\n\r\n if (scope == NameScope.CHILD) {\r\n return path.length() != baseLen && (baseLen <= 1 || path.charAt(baseLen) == SEPARATOR_CHAR)\r\n && path.indexOf(SEPARATOR_CHAR, baseLen + 1) == -1;\r\n }\r\n if (scope == NameScope.DESCENDENT) {\r\n return path.length() != baseLen && (baseLen <= 1 || path.charAt(baseLen) == SEPARATOR_CHAR);\r\n }\r\n if (scope == NameScope.DESCENDENT_OR_SELF) {\r\n return baseLen <= 1 || path.length() <= baseLen || path.charAt(baseLen) == SEPARATOR_CHAR;\r\n }\r\n throw new IllegalArgumentException();\r\n }", "public Optional<Path> getOptionalResourcePath(@Nonnull String propertyName) {\n if(propertiesMap.containsKey(propertyName)) {\n try {\n URL resource = com.datagraphice.fcriscuo.alsdb.graphdb.poc.ReadResourceFileTest.class.getResource(propertiesMap.get(propertyName));\n return Optional.of( Paths.get(resource.toURI()));\n } catch (URISyntaxException e) {\n e.printStackTrace();\n }\n }\n System.out.println(\"Property name \" + propertyName + \" is invalid\");\n return Optional.empty();\n }", "public void validateComponent() throws org.apache.ant.common.util.ExecutionException {\n if (name == null) {\n throw new org.apache.ant.common.util.ExecutionException(\"\\\"name\\\" attribute of \" + \"<property> must be supplied\");\n }\n if (value == null) {\n throw new org.apache.ant.common.util.ExecutionException(\"\\\"value\\\" attribute of \" + \"<property> must be supplied\");\n }\n }", "private char[] getProperty(String string) {\n\t\treturn null;\r\n\t}", "public abstract boolean isValidValue(String input);", "public boolean isAnimProperty(String aPropertyName)\n{\n // Declare anim properties\n String animProps[] = { \"X\", \"Y\", \"Width\", \"Height\", \"Roll\", \"ScaleX\", \"ScaleY\", \"SkewX\", \"SkewY\", \"Opacity\",\n \"Radius\", // Bogus - for RMRectangle\n \"StartAngle\", \"SweepAngle\", // Bogus - for RMOval\n \"Depth\", \"Yaw\", \"Pitch\", \"Roll3D\", \"FocalLenth\", \"OffsetZ\", // for RMScene3D\n \"Playing\", // Bogus - for RMSound\n \"Morphing\", // Bogus - for RMMorphShape\n \"Distance\", \"PreservesOrientation\" // Bogus - for RMAnimPath\n };\n \n // Return true if is anim property\n return RMArrayUtils.contains(animProps, aPropertyName);\n}", "public String verifyCssProperty(String object, String data) {\n\t\ttry {\n\t\t\n\t\t\twaitForPageLoad(driver);\n\t\t\t\n\t\t\tString property[] = data.split(\":\",2);\n\t\t\tString exp_prop = property[0];\n\t\t\tString exp_value = property[1];\n\t\t\tboolean flag = false;\n\t\t\tString prop = wait.until(explicitWaitForElement(By.xpath(OR.getProperty(object)))).getCssValue(exp_prop);\n\t\t\tlogger.debug(prop);\n\t\t\tlogger.debug(exp_value);\n\t\t\tif (prop.trim().equals(exp_value.trim())) \n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t}\n\t\t\tif (flag)\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \"--actvalue-\" + prop + \"--expectes-\" + exp_value;\n\t\t\telse\n\t\t\t\t\treturn Constants.KEYWORD_FAIL;\n\t\t} \t\ncatch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" \" + e.getMessage();\n\t\t}\n\t}", "protected boolean isValidSwagger(final String path) {\n return \"/openapi.json\".equals(path) || path.startsWith(\"/swagger-ui/\");\n }", "public <T> T expectProperty(String name, Class<T> type) {\n return getProperty(name, type).orElseThrow(() -> new IllegalArgumentException(String.format(\n \"Property `%s` is not part of %s, `%s`\", name, getClass().getSimpleName(), this)));\n }", "public void validateStringField(String field, String nameField) throws ParamsInvalidException {\n if (field == null) {\n throw new ParamsInvalidException(10, nameField);\n }\n if (field.isEmpty()) {\n throw new ParamsInvalidException(11, nameField);\n }\n }", "public static boolean propertyExists(String aKey) {\n checkArgument(!isNullOrEmpty(aKey), \"aKey cannot be null or empty\");\n \n loadPropertiesFile();\n boolean exists = props.containsKey(aKey);\n return exists;\n }", "public static boolean isValid(String name) {\n if (name == null) {\n throw new IllegalArgumentException(\"Name is missing\");\n }\n\n boolean slash = false;\n for (int i = 0; i < name.length(); i++) {\n char ch = name.charAt(i);\n if (ch <= ' ' || ch >= 127 || ch == '(' || ch == ')' || ch == '<' || ch == '>' ||\n ch == '@' || ch == ',' || ch == ';' || ch == ':' || ch == '\\\\' || ch == '\"' ||\n ch == '[' || ch == ']' || ch == '?' || ch == '=') {\n return false;\n } else if (ch == '/') {\n if (slash || i == 0 || i + 1 == name.length()) {\n return false;\n }\n slash = true;\n }\n }\n return slash;\n }", "protected String transformAttributePath(AttributePath attributePath) {\n\t\treturn attributePath.getProperty();\n\t}", "boolean isPattern(String path);", "private boolean isAddressValid(String s) {\n for (Property prt : propertyList) { //(String t : propertyAddrLine1s)\n if (prt.getAddrline1().matches(s)) {\n createdProperty = prt;\n return true;\n }\n }\n return false;\n }", "boolean isPathValid(LttlPath p)\n\t{\n\t\tif (p == null || !p.closed)\n\t\t{\n\t\t\tif (p != null && (!p.closed || p.controlPoints.size() < 3)\n\t\t\t\t\t&& !pathWarning)\n\t\t\t{\n\t\t\t\tLttl.logNote(\"Path or Cutout Path on \"\n\t\t\t\t\t\t+ toString()\n\t\t\t\t\t\t+ \" must be closed and have more than 3 points to create mesh.\");\n\t\t\t\tr().setMesh(null);\n\t\t\t\tpathWarning = true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "protected boolean isPublicPath(final String path)\n\t{\n\t\treturn applicationProperties.getPublicPathPatterns().contains(path);\n\t}", "private boolean isPropertyRelevant(String property) {\n return relevantProperties == null || relevantProperties.contains(property);\n }" ]
[ "0.6258166", "0.596977", "0.57602763", "0.575782", "0.5700642", "0.56416714", "0.55518556", "0.5481346", "0.5434186", "0.54187495", "0.5369635", "0.52891284", "0.5282643", "0.52682114", "0.52625996", "0.5261767", "0.52563405", "0.5238816", "0.52269363", "0.5223125", "0.5191372", "0.51817214", "0.51816076", "0.51689094", "0.51530504", "0.51403177", "0.5139963", "0.5132165", "0.5126029", "0.5126029", "0.5112839", "0.510591", "0.50712585", "0.50406396", "0.50356984", "0.5029278", "0.50184", "0.50137866", "0.5012475", "0.50117457", "0.50007516", "0.49966007", "0.4994291", "0.4990595", "0.49865165", "0.49820694", "0.49751195", "0.4965668", "0.49641788", "0.495956", "0.4941979", "0.49414846", "0.49375513", "0.4915106", "0.49040008", "0.4891556", "0.48911878", "0.4877063", "0.48761225", "0.48740944", "0.4871267", "0.48708043", "0.48686564", "0.48466936", "0.4826301", "0.48176113", "0.48085842", "0.4805889", "0.4789738", "0.4785658", "0.4784009", "0.47836378", "0.47836378", "0.47836378", "0.4773985", "0.4773985", "0.4773985", "0.47730848", "0.4767785", "0.47652465", "0.47599787", "0.47555476", "0.4752767", "0.4751611", "0.47493106", "0.47467446", "0.47330728", "0.47236568", "0.47178227", "0.471629", "0.4708796", "0.47075248", "0.4704047", "0.47032234", "0.46951827", "0.46921295", "0.46917388", "0.46906865", "0.46854916", "0.46797755" ]
0.5842988
2
Validates the given property path as Integer
private static boolean validateInteger(Map.Entry<String, CheckState> entry) { String prop = System.getProperty(entry.getKey()); if (entry.getValue().isOptional && prop == null) { return true; } try { Integer.parseInt(prop); } catch (NumberFormatException e) { return false; } return !"".equals(prop); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int getIntegerProperty(String key) {\n String value = PROPERTIES.getProperty(key);\n // if the key is not found, Properties will return null and we should return a default value\n if (value == null) {\n return 0;\n }\n return Integer.parseInt(value);\n }", "public\n int getProperty_int(String key)\n {\n if (key == null)\n return 0;\n\n String val = getProperty(key);\n\n if (val == null)\n return 0;\n\n int ret_int = 0;\n try\n {\n Integer workint = new Integer(val);\n ret_int = workint.intValue();\n }\n catch(NumberFormatException e)\n {\n ret_int = 0;\n }\n\n return ret_int;\n }", "private static Integer getIntegerProperty(Dictionary<?, ?> properties,\n String propertyName) {\n Integer value = null;\n try {\n String s = Tools.get(properties, propertyName);\n value = isNullOrEmpty(s) ? value : Integer.parseInt(s);\n } catch (NumberFormatException | ClassCastException e) {\n value = null;\n }\n return value;\n }", "@Test\n public void testIntProperty() {\n try (ReleasableVariant procId = classObject.get(\"ProcessId\")) {\n Assertions.assertNotEquals(0, procId.intValue());\n }\n }", "public int getIntegerProperty(String key) {\n String val = getProperty(key);\n return (null == val ? 1 : Integer.parseInt(val));\n }", "private int getRequiredProperty(String propName, Properties prop)\n {\n if ((propName == null) || (propName.trim().length() < 1))\n throw new IllegalArgumentException(\"propName may not be null or empty\");\n if (prop == null)\n throw new IllegalArgumentException(\"prop may not be null\");\n\n String strValue = prop.getProperty(propName);\n if ((strValue == null) || (strValue.trim().length() < 1))\n {\n PSLogger.logInfo(\n \"Value of property : \" + propName + \" is null or empty.\");\n return -1;\n }\n\n int value = -1;\n try\n {\n value = Integer.parseInt(strValue);\n }\n catch (Throwable t)\n {\n PSLogger.logInfo(\n \"Value of property : \" + propName + \" is invalid.\");\n PSLogger.logInfo(t.getLocalizedMessage());\n return -1;\n }\n return value;\n }", "private void validateInteger(String line) throws VectorException{\r\n\t\tif(line.contains(\".\"))\r\n\t\t\tthrow new VectorException(\"Value must be an integer\\nand cannot contain rational number\");\r\n\t}", "public static int getPropertyInt(String prop) {\n int ret = 0;\n try{\n ret = Integer.valueOf(properties.getProperty(prop));\n } catch (NumberFormatException e){\n log.log(Level.SEVERE, \"Integer return could not be found for property: \" + prop + \" - Exception: \" + e, e);\n }\n return ret;\n }", "@SuppressWarnings(\"unused\")\n public int getInt(String path) {\n return yml.getInt(path);\n }", "public static int getIntProperty(String key) {\r\n\t\treturn getIntProperty(key, 0);\r\n\t}", "private int getIntProperty(String propName) {\n return Integer.parseInt(Objects.requireNonNull(env.getProperty(propName)));\n }", "public int getIntegerProperty(String key) {\n\t\treturn Integer.parseInt(this.getProperty(key));\n\t}", "@Test\n public void testIntPropertyQuick() {\n Assertions.assertNotEquals(0, classObject.getInt(\"ProcessId\"));\n }", "private int getIntProperty(String p) {\n\t\tString propval=env.getProperty(p);\n\t\tint propvalint=Integer.parseInt(propval);\n\t\treturn propvalint;\n\t}", "public int getPropertyInt(String key);", "public int getMandatoryInt(String key) throws ConfigNotFoundException;", "private int getIntProperty(String propName) {\n\t\t\n\t\tString propVal = env.getProperty(propName);\n\t\t\n\t\t// convert to int \n\t\tint intPropVal = Integer.parseInt(propVal);\n\t\t\n\t\treturn intPropVal;\n\t}", "public Integer getPropertyAsInteger(String property) {\n try {\n return Integer.valueOf(properties.getProperty(property));\n } catch (NumberFormatException e) {\n }\n return null;\n }", "public static Integer getInteger(String inKey) {\r\n Object o = getProperties().get(inKey);\r\n\r\n if (o == null) {\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(\"getInteger: \" + inKey + \", result null\");\r\n }\r\n return null;\r\n }\r\n\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(\"getInteger: \" + inKey + \", result \" + o);\r\n }\r\n if (o instanceof Integer) {\r\n return (Integer) o;\r\n }\r\n if (!(o instanceof String)) {\r\n throw new IllegalArgumentException(\"Config property: \" + inKey\r\n + \" is not an Integer or String: \" + o.getClass());\r\n }\r\n try {\r\n return new Integer((String) o);\r\n } catch (Exception e) {\r\n LOG.warn(\"Not an integer value: \" + o + \" for property \" + inKey);\r\n return null;\r\n }\r\n }", "@Ignore\n @Test(expected = IllegalArgumentException.class)\n public void require_that_illegal_int_throws_exception() throws IOException {\n Slime slime = new Slime();\n Cursor root = slime.setObject();\n root.setString(\"intval\", \"invalid\");\n InnerCNode def = new DefParser(\"simpletypes\", new StringReader(StringUtilities.implode(SimpletypesConfig.CONFIG_DEF_SCHEMA, \"\\n\"))).getTree();\n new ConfigFileFormat(def).encode(new ByteArrayOutputStream(), slime);\n }", "private int getInt(String whatProperty, String levelConfigFilePath) {\n return getInt(levelConfig, whatProperty, levelConfigFilePath);\n }", "@Test\n\tpublic void testInt2() {\n\t\tTextField intText = new TextField(\"-23\");\n\t\tboolean checkIntText = initTest.checkIntValues(intText);\n\t\tassertFalse(checkIntText);\n\t}", "public int getInt(String property)\n\tthrows PropertiesPlusException\n\t{\n\t\tString value = getProperty(property);\n\t\tif (value == null)\n\t\t\tthrow new PropertiesPlusException(property+\" is not defined.\");\n\t\ttry\n\t\t{\n\t\t\treturn Integer.valueOf(value);\n\t\t}\n\t\tcatch (NumberFormatException ex)\n\t\t{\n\t\t\tthrow new PropertiesPlusException(String.format(\n\t\t\t\t\t\"%s = %s cannot be converted to type int\", property, value));\n\t\t}\n\t}", "@Test(expectedExceptions=NumberFormatException.class)\r\n\tpublic void chkNumberFrmtExcep(){\r\n\t\tString x=\"100A\";\r\n\t\tint f=Integer.parseInt(x);//it will throw exception bcoz x=100A, if it is 100 it will not throw exception\r\n\t}", "boolean isInt(TextField input);", "public static int getInt(String key) throws UnknownID, ArgumentNotValid {\n\t\tString value = get(key);\n\t\ttry {\n\t\t\treturn Integer.parseInt(value);\n\t\t} catch (NumberFormatException e) {\n\t\t\tString msg = \"Invalid setting. Value '\" + value + \"' for key '\" + key\n\t\t\t\t\t+ \"' could not be parsed as an integer.\";\n\t\t\tthrow new ArgumentNotValid(msg, e);\n\t\t}\n\t}", "private void assertJSONIntValue (String json, String fieldname, int exptectedFieldValue) {\n\n String regex = \"\\\"\" + fieldname + \"\\\":\" + exptectedFieldValue;\n// throw new ComparisonFailure(\"Expected double quoted value \\\"\"+exptectedFieldValue+\"\\\" value in json \", 1, matchCount(regex, json));\n assertTrue(\"Expected to find JSON int syntax, value \\\"\"+exptectedFieldValue+\"\\\", for field \\\"\"+fieldname+\"\\\"\", 1 == matchCount(regex, json));\n }", "private int getIntegerProperty(ParameterList key, int defaultValue) \n throws NumberFormatException, NullPointerException, MissingOptionException{\n try {\n boolean keyPresent = fileParameters.containsKey(key.name);\n String strValue = keyPresent ? fileParameters.getProperty(key.name).replaceAll(\"\\\\s\", \"\") : null;\n if (!keyPresent && key.mandatory) {\n throw new MissingOptionException(\"The input parameter (\" + key.name + \") was not found\");\n }\n else if(!keyPresent || strValue.equals(\"\")){\n loadedParametersLog.append(key.name).append(\"=\").append(defaultValue).append(\" (DEFAULT)\\n\");\n return defaultValue;\n }\n loadedParametersLog.append(key.name).append(\"=\").append(strValue).append(\"\\n\");\n return Integer.parseInt(strValue);\n } catch (NumberFormatException e) {\n throw new NumberFormatException(e.getMessage() + \"\\nThe input parameter (\" + key.name + \") could not be converted to int.\");\n } catch (NullPointerException e) {\n throw new NullPointerException(e.getMessage() + \"\\nThe parameter file was not initialized.\");\n }\n }", "private void assert_validPID(int pid) throws IllegalArgumentException{\n\t\tif(!validPID(pid)){\n\t\t\tthrow new IllegalArgumentException(\"Tried to get a property from layer '\"+ name\n\t\t\t\t\t+\"' with an invalid property ID: \"+pid);\n\t\t}\n\t}", "public void validateIntegerField(int field, String nameField) throws ParamsInvalidException {\n if (field < 0) {\n throw new ParamsInvalidException(12, nameField);\n }\n }", "public int getInt(String key) {\n\t\tString value = getString(key);\n\t\t\n\t\ttry {\n\t\t\treturn Integer.parseInt(value);\n\t\t}\n\t\tcatch( NumberFormatException e ) {\n\t\t\tthrow new IllegalStateException( \"Illegal value for integer configuration parameter: \" + key);\n\t\t}\n\t}", "public static int verifyAndFetchOptionalProperty(String key,\r\n\t\t\tint defaultValue, Properties prop) {\r\n\t\tString property;\r\n\t\tproperty = fetchProperty(key, prop);\r\n\r\n\t\t// Property should not be blank.\r\n\t\tif (property == null || (property != null && property.trim().isEmpty())) {\r\n\t\t\treturn defaultValue;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\treturn Integer.parseInt(property);\r\n\t\t} catch (NumberFormatException numEx) {\r\n\t\t\treturn defaultValue;\r\n\t\t}\r\n\t}", "private int getOptionalIntegerProperty(String property, int defaultValue) {\n\t\ttry {\n\t\t\tString value = testProperties.getProperty(property);\n\t\t\tif (value == null)\n\t\t\t\treturn defaultValue;\n\t\t\treturn Integer.parseInt(value);\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn defaultValue;\n\t\t}\n\t}", "int getInt(int index) throws PropertyException {\n return this.getNumber(index).intValue();\n }", "public int getPropertyInt(String key, int defaultValue);", "int getInt(String key) throws KeyValueStoreException;", "public static PropertyDescriptionBuilder<Integer> integerProperty(String name) {\n return PropertyDescriptionBuilder.start(name, Integer.class, Parsers::parseInteger);\n }", "public int getInteger(String key) {\n\t\tint defaultValue = 0;\n\t\tif (getDefault(key) != null)\n\t\t\tdefaultValue = (Integer) getDefault(key);\n\t\tString sp = internal.getProperty(key);\n\t\tif (sp == null) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\tint value;\n\t\ttry {\n\t\t\tvalue = Integer.parseInt(sp);\n\t\t} catch (NumberFormatException ex) {\n\t\t\tinternal.remove(key);\n\t\t\treturn defaultValue;\n\t\t}\n\t\treturn value;\n\t}", "public Integer ValidateOption(String option){\n try {\n return Integer.parseInt(option.trim());\n }\n catch (NumberFormatException ex){\n return -1;\n }\n }", "private void validate(Path path) {\n }", "IntegerProperty getXProperty();", "@Test\n\tpublic void testInt4() {\n\t\tTextField intText = new TextField(\"23abc\");\n\t\tboolean checkIntText = initTest.checkIntValues(intText);\n\t\tassertFalse(checkIntText);\n\t}", "public static int getIntParam(String key) throws InvalidParam {\n return getCurrentConfig().getInt(key);\n }", "public static int validInt(String message){\n boolean success = false;\n int value = -1;\n do {\n try {\n value = (int)readNumber(message, \"int\");\n success = true;\n } catch (InputMismatchException e){\n System.out.println(\"Debe introducir un valor numérico... \");\n }\n } while(!success);\n return value;\n }", "void verifyIntProperties() throws IllegalStateException {\n if (mProperties.size() < 2) {\n return;\n }\n int last = getIntPropertyValue(0);\n for (int i = 1; i < mProperties.size(); i++) {\n int v = getIntPropertyValue(i);\n if (v < last) {\n throw new IllegalStateException(String.format(\"Parallax Property[%d]\\\"%s\\\" is\"\n + \" smaller than Property[%d]\\\"%s\\\"\",\n i, mProperties.get(i).getName(),\n i - 1, mProperties.get(i - 1).getName()));\n } else if (last == IntProperty.UNKNOWN_BEFORE && v == IntProperty.UNKNOWN_AFTER) {\n throw new IllegalStateException(String.format(\"Parallax Property[%d]\\\"%s\\\" is\"\n + \" UNKNOWN_BEFORE and Property[%d]\\\"%s\\\" is UNKNOWN_AFTER\",\n i - 1, mProperties.get(i - 1).getName(),\n i, mProperties.get(i).getName()));\n }\n last = v;\n }\n }", "public int getInt( String key )\n {\n int value = 0;\n try\n {\n if ( config != null )\n {\n value = config.getInt( key );\n LOG.debug( \"getInt name [{}] value [{}]\", key, value );\n }\n else\n {\n LOG.warn( \"getInt invalid config, can't read prop [{}]\", key );\n }\n }\n catch (org.apache.commons.configuration.ConversionException e)\n {\n LOG.debug( \"getInt can't read prop [{}], exception [{}]\", key, e );\n }\n return value;\n }", "public int getInt(String path)\n {\n if (configuration.contains(path))\n return configuration.getInt(path);\n else return defaultConfig.getInt(path);\n }", "@Test\n public void testIntProperty() throws JMSException {\n int messageCount = responseMessage.getIntProperty(\n ServerListener.MESSAGE_COUNT);\n\n assertTrue(\"The message count should've been equal to or greater than\" +\n \" 1\", (messageCount >= 1));\n }", "protected static int verifyInt(Text field, String fieldName)\r\n\t\t\tthrows MusicTunesException {\r\n\t\tint number = 0;\r\n\t\ttry {\r\n\t\t\tnumber = Integer.parseInt(field.getText());\r\n\t\t} catch (NumberFormatException e2) {\r\n\t\t\tfield.setFocus();\r\n\t\t\tfield.selectAll();\r\n\t\t\tthrow new MusicTunesException(\"Invalid \" + fieldName\r\n\t\t\t\t\t+ \": \" + field.getText());\r\n\t\t}\r\n\t\treturn number;\r\n\t}", "public static boolean isInt(String pram)\r\n {\r\n try{\r\n Integer.parseInt(pram);\r\n return true;\r\n }catch(NumberFormatException e){\r\n return false;\r\n }\r\n }", "public static int getInt(String pName) {\n int out = 0;\n try {\n out = Integer.parseInt(properties.getProperty(pName));\n } catch (NumberFormatException e) {\n out = Integer.parseInt(defaults.getProperty(pName));\n Log.debug(\"Cannot parse property: \" + pName);\n Log.debug(e);\n }\n return out;\n }", "public Integer getAsInt(final String name) {\r\n Integer returnValue = null;\r\n try {\r\n returnValue = Integer.parseInt(getProperty(name));\r\n }\r\n catch (final NumberFormatException e) {\r\n LOGGER.error(\"Error on parsing configuration property '\" + name + \"'. Property must be a integer!.\");\r\n if (LOGGER.isDebugEnabled()) {\r\n LOGGER.debug(\"Error on parsing configuration property '\" + name + \"'. Property must be a integer!\", e);\r\n }\r\n }\r\n return returnValue;\r\n }", "@Test\n\tpublic void testInt6() {\n\t\tTextField intText = new TextField(\"23.0\");\n\t\tboolean checkIntText = initTest.checkIntValues(intText);\n\t\tassertFalse(checkIntText);\n\t}", "@Test\n\tpublic void testInt3() {\n\t\tTextField intText = new TextField(\"abc\");\n\t\tboolean checkIntText = initTest.checkIntValues(intText);\n\t\tassertFalse(checkIntText);\n\t}", "private int getOptionalIntegerProperty(String[] propertyNameList, int defaultValue) {\n\t\ttry {\n\t\t\tString value = getOptionalStringProperty(propertyNameList);\n\t\t\tif (value == null)\n\t\t\t\treturn defaultValue;\n\t\t\treturn Integer.parseInt(value);\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\t\n\t}", "public IntegerValidator() {\r\n }", "public int getInt(String urlKey) {\n\t\tint value = 0;\n\t\tString text = null;\n\t\ttry{\n\t\t\ttext = properties.getProperty(urlKey).trim();\n\t\t\tvalue = Integer.parseInt(text);\n\t\t}catch(Exception e){\n\t\t\tLOGGER.error(\"Couldn't parse \"+urlKey +\":\" + text+\"\\n\"+e);\n\t\t}\n\t\treturn value;\t\t\t\t\n\t}", "@Test\n\tpublic void testInt5() {\n\t\tTextField intText = new TextField(\"23.4\");\n\t\tboolean checkIntText = initTest.checkIntValues(intText);\n\t\tassertFalse(checkIntText);\n\t}", "static Value<Integer> parseInteger(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Integer.parseInt(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }", "public IntPropertyMap getIntProperty(String owner, String propertyName, boolean create)\n\t\t\tthrows PropertyTypeMismatchException;", "@Override\n\tpublic void setValue(String path, int value) {\n\t\tsetValue(path, new Integer(value));\n\t}", "public boolean isInt(String value) {\n try {\n Integer.parseInt(value);\n return true;\n } catch (Exception e) {\n return false;\n }\n }", "@Test\n\tpublic void testPropertyIntegralType() {\n\t\tfinal Base base = context.mock(Base.class);\n\t\tcontext.checking(new PropertyEnabledExpectations() {\n\t\t\t{\n\t\t\t\tallowingProperty(base).isValid();\n\t\t\t\twill(returnValue(true));\n\t\t\t}\n\t\t});\n\n\t\tassertTrue(\"Initial value was not set\", base.isValid());\n\t\tbase.setValid(false);\n\t\tassertFalse(\"Value didn't change\", base.isValid());\n\t}", "public static int integerValidation() {\n\t\tboolean flag = true;\n\t\tint input = 0;\n\t\tString temp = \"\";\n\t\twhile (flag) {\n\t\t\ttry {\n\t\t\t\ttemp = in.nextLine().trim();\n\t\t\t\tinput = Integer.parseInt(temp);\n\t\t\t\tflag = false;\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Please Enter a valid input\");\n\t\t\t}\n\t\t}\n\t\treturn input;\n\t}", "public static boolean setIntValue(String propID, int v)\n {\n return SystemProps.setStringValue(propID, String.valueOf(v));\n }", "public static int parseInt(String value) throws ServiceException {\n OMUtil.nullCheck(value);\n\n try {\n return Integer.parseInt(value);\n } catch (NumberFormatException ex) {\n throw new ServiceException(ServiceStatus.MALFORMED_REQUEST);\n }\n }", "public static boolean isInteger(String str) {\n if (str == null || str.isEmpty()) {\n return false;\n }\n int length = str.length();\n if (length == 0) {\n return false;\n }\n int i = 0;\n if (str.charAt(0) == '-') {\n if (length == 1) {\n return false;\n }\n i = 1;\n }\n for (; i < length; i++) {\n char c = str.charAt(i);\n if (c <= '/' || c >= ':') {\n return false;\n }\n }\n return true;\n }", "public static int[] getPathResolved(String path)\n throws NumberFormatException\n {\n try\n {\n // Initialize the token array\n int[] returnArray = new int[0];\n \n // Tokenize the path\n StringTokenizer st = new StringTokenizer(path,\":\");\n \n // Reset the array with the number of tokens\n returnArray = new int[st.countTokens()];\n \n // Save value of each token in the array\n if (st.countTokens() > 0)\n {\n for (int i = 0; i < returnArray.length; i++)\n {\n returnArray[i] = Integer.parseInt\n (st.nextToken().trim());\n }\n }\n \n // Return path array\n return returnArray;\n }\n catch (Exception e)\n {\n // Wrap the exception in a NumberFormatException\n throw new NumberFormatException(e.getMessage());\n }\n }", "private boolean isInt(TextField input){\r\n input.setStyle(\"-fx-border-color: green; -fx-border-radius: 15;-fx-background-radius: 20;\");\r\n try {\r\n int number = Integer.parseInt(input.getText());\r\n System.out.println(\"Input is\" + number );\r\n return true;\r\n } catch (Exception e) {\r\n input.setStyle(\"-fx-border-color: red;\");\r\n input.setText(null);\r\n input.setPromptText(\"Only digits/numbers must be filled\");\r\n return false;\r\n }\r\n }", "public boolean isInteger() {\n try {\n Integer.parseInt(txt.getText());\n return true;\n } catch (Exception e) {\n return error(\"El valor debe ser un numero entero!\");\n }\n }", "public boolean isInteger(String x){\n try{\n Integer.parseInt(x);\n \n }\n catch(NumberFormatException e){\n return false;\n }\n return true;\n }", "private boolean checkInteger(String str) {\n try {\n return Integer.parseInt(str) <= 30; // Check if the entered value is an Integer and <= 30;\n } catch (NumberFormatException e) {\n return false;\n }\n }", "private boolean check_int_only(Question q)\n\t{\n\t\tNode val = doc.selectSingleNode(\"//document/question_attributes/rows/row[qid=\" + q.getQid() + \" and attribute='num_value_int_only']/value\");\n\t\treturn val.getText().equals(\"1\") ? true : false;\n\t}", "public boolean validateID() {\n\t\tif (this.id == null || this.id.length() < 1)\n\t\t\treturn false;\n\t\ttry {\n\t\t\tInteger.parseInt(this.id);\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "Integer validateDetail(String detail) throws DvdStoreException;", "public final void bindIntegerProperty(IntegerProperty property) {\n formatter.valueProperty().bindBidirectional(property.asObject());\n }", "@Test\n public void testParseInt() {\n IntegerSpec integerSpec = new IntegerSpec();\n integerSpec.setDefaultValue(0);\n dataTypeParser.setDataTypeSpec(integerSpec);\n dataTypeParser.parse();\n IntegerSpec parsedIntegerSpec = (IntegerSpec) dataTypeParser.getDataTypeSpec();\n\n assertNull(parsedIntegerSpec.getMinValue());\n assertNull(parsedIntegerSpec.getMaxValue());\n }", "@Override\n\t\tpublic void validate() throws ValidationError {\n\t\t\tif (newValueOfPropertyToChange < 0) {\n\t\t\t\tthrow new TestFailure(\"propertyToChange is not ok\");\n\t\t\t}\n\t\t}", "public static boolean isInt(String val){\n\t try\n\t {\n\t Integer.parseInt(val);\n\t return true;\n\t } catch (NumberFormatException ex)\n\t {\n\t \tSystem.out.println(\"Please enter integer\");\n\t return false;\n\t }\n\t \n\t}", "private static int getNestedPropertySeparatorIndex(String propertyPath, boolean last) {\n\t\tboolean inKey = false;\n\t\tfinal int length = propertyPath.length();\n\t\tint i = (last ? length - 1 : 0);\n\t\twhile (last ? i >= 0 : i < length) {\n\t\t\tswitch (propertyPath.charAt(i)) {\n\t\t\t\tcase PropertyAccessor.PROPERTY_KEY_PREFIX_CHAR:\n\t\t\t\tcase PropertyAccessor.PROPERTY_KEY_SUFFIX_CHAR:\n\t\t\t\t\tinKey = !inKey;\n\t\t\t\t\tbreak;\n\t\t\t\tcase PropertyAccessor.NESTED_PROPERTY_SEPARATOR_CHAR:\n\t\t\t\t\tif (!inKey) {\n\t\t\t\t\t\treturn i;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif (last)\n\t\t\t\ti--;\n\t\t\telse\n\t\t\t\ti++;\n\t\t}\n\t\treturn -1;\n\t}", "@Override\n public HangarMessages addConstraintsTypeIntegerMessage(String property) {\n assertPropertyNotNull(property);\n add(property, new UserMessage(CONSTRAINTS_TypeInteger_MESSAGE));\n return this;\n }", "public static void setInteger(String prop, int value)\n {\n props.setProperty(prop, \"\" + value);\n }", "private static boolean validateInteger(String intString) {\n try {\n Integer.parseInt(intString);\n } catch (NumberFormatException e) {\n // Not a valid integer\n return false;\n }\n return true;\n }", "public static int validate(int level) {\n if (validLevels.contains(level)) {\n return level;\n } else {\n throw new IllegalArgumentException(\"Invalid level\");\n }\n }", "public Integer getInt(String propertyName) {\n if (this.has(propertyName) && !this.propertyBag.isNull(propertyName)) {\n return Integer.valueOf(this.propertyBag.getInt(propertyName));\n } else {\n return null;\n }\n }", "public static boolean isIntValid (String str) {\r\n try {Integer.parseInt(str);} catch (NumberFormatException e) {return false;}\r\n return true;\r\n }", "@Test(expected = IllegalArgumentException.class)\n public void testGetPropertyValueSetEmptyPropertyName1(){\n List<User> list = toList(new User(2L), new User(5L), new User(5L));\n CollectionsUtil.getPropertyValueSet(list, \" \", Integer.class);\n }", "public boolean check(int value);", "void setMyProperty1(Integer a) {}", "public static int getInt(final String key) {\r\n if (PROP == null) {\r\n throw new RuntimeException(\"Config hasn't been initialized yet.\");\r\n }\r\n if (PROP.containsKey(key))\r\n return Integer.parseInt(PROP.getProperty(key));\r\n else\r\n throw new RuntimeException(\"No config key found for [\" + key + \"].\");\r\n }", "public static int getInteger(JSONObject data, Object key, int errorValue) {\r\n Object value = data.get(key);\r\n if (value != null && value instanceof Number) {\r\n return ((Number)value).intValue();\r\n }\r\n return errorValue;\r\n }", "private boolean tryParseInt(String str) {\n try {\n Integer.parseInt(str);\n } catch (Exception ex) {\n return false;\n }\n return true;\n }", "public final static int getChangeFromPath(String path) {\n\t\tint i = path.indexOf('@');\n\t\tif(0 > i)\n\t\t\treturn -1;\n\t\ttry {\n\t\t\treturn Integer.valueOf(path.substring(i + 1)).intValue();\n\t\t} catch(NumberFormatException ex) {\n\t\t\treturn -1;\n\t\t}\n\t}", "public boolean checkPosIntValues(TextField tempField) { //check if integer is positive\n \tString param = \"Nframes and N_reactions\";\n \treturn Values.checkPosIntValues(param, tempField);\n }", "public static int checkInt() {\n\t\tboolean is_Nb = false; int i = 0;\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\ti = Integer.parseInt(scan.nextLine());\r\n\t\t\t\tis_Nb= true;\r\n\t\t\t\tif(i<0) {\r\n\t\t\t\t\tSystem.out.println(\"Enter a positive number\");\r\n\t\t\t\t\tis_Nb = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e) {\r\n\t\t\t\tSystem.out.println(\"Enter a number\");\r\n\t\t\t}\r\n\t\t}while(!is_Nb);\r\n\t\treturn i;\r\n\t}", "public final void mRULE_INT() throws RecognitionException {\n try {\n int _type = RULE_INT;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:40361:10: ( ( '0' .. '9' )+ )\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:40361:12: ( '0' .. '9' )+\n {\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:40361:12: ( '0' .. '9' )+\n int cnt3=0;\n loop3:\n do {\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( ((LA3_0>='0' && LA3_0<='9')) ) {\n alt3=1;\n }\n\n\n switch (alt3) {\n \tcase 1 :\n \t // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:40361:13: '0' .. '9'\n \t {\n \t matchRange('0','9'); \n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt3 >= 1 ) break loop3;\n EarlyExitException eee =\n new EarlyExitException(3, input);\n throw eee;\n }\n cnt3++;\n } while (true);\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public int getInt(String key) {\n Object value = get(key);\n return ((value instanceof Long) ? ((Long)value).intValue() : 0);\n }", "public void setC_POSDocType_ID (int C_POSDocType_ID)\n{\nif (C_POSDocType_ID < 1) throw new IllegalArgumentException (\"C_POSDocType_ID is mandatory.\");\nset_ValueNoCheck (COLUMNNAME_C_POSDocType_ID, Integer.valueOf(C_POSDocType_ID));\n}", "private boolean checkInt(String str) {\n\t\ttry {\n\t\t\tint integer = Integer.parseInt(str);\n\t\t\tif(integer>=0&&integer<100000){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public static Integer getInteger(String key)\n\t\t\tthrows MissingResourceException {\n\t\treturn Integer.valueOf(resourceBundle.getString(key));\n\t}" ]
[ "0.63300455", "0.6247952", "0.6233836", "0.6077267", "0.60738957", "0.6061498", "0.59472257", "0.5901514", "0.5848221", "0.5801995", "0.57750475", "0.57555735", "0.5719726", "0.57165986", "0.57094365", "0.56865317", "0.5612386", "0.5605943", "0.56055284", "0.5471032", "0.54619694", "0.5359689", "0.53537583", "0.53349096", "0.5296087", "0.52902234", "0.52800393", "0.52509993", "0.523511", "0.52284825", "0.5228439", "0.52035844", "0.5194472", "0.5188538", "0.51649004", "0.51522714", "0.51399845", "0.50913966", "0.50822985", "0.506822", "0.50489706", "0.50476795", "0.50336087", "0.5001124", "0.4995644", "0.49898845", "0.4989074", "0.49866366", "0.49768472", "0.4973669", "0.49722362", "0.49501908", "0.49473172", "0.491979", "0.491887", "0.49172547", "0.49160928", "0.48977453", "0.48961675", "0.48646197", "0.4845715", "0.4839213", "0.4837009", "0.483038", "0.48209822", "0.48119947", "0.48031998", "0.4802073", "0.47829103", "0.4781535", "0.47812632", "0.47769728", "0.4772218", "0.4769332", "0.47633743", "0.4762961", "0.47566378", "0.47560248", "0.4755914", "0.47524709", "0.47501695", "0.47477096", "0.4745134", "0.4742734", "0.47308272", "0.47203693", "0.47167626", "0.4690693", "0.4690443", "0.46872935", "0.4682021", "0.46701285", "0.46681947", "0.46655363", "0.4661837", "0.4661188", "0.46516103", "0.465124", "0.46490806", "0.4646638" ]
0.6489233
0
Validates a given property path as Boolean
private static boolean validateBoolean(Map.Entry<String, CheckState> entry) { String prop = System.getProperty(entry.getKey()); if (entry.getValue().isOptional && prop == null) { return true; } return Boolean.TRUE.toString().equals(prop) || Boolean.FALSE.toString().equals(prop); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasProperty1();", "public\n boolean getProperty_boolean(String key)\n {\n if (key == null)\n return false;\n\n String val = getProperty(key);\n\n if (val == null)\n return false;\n\n boolean ret_boolean = false;\n if (val.equalsIgnoreCase(\"ON\") ||\n val.equalsIgnoreCase(\"YES\") ||\n val.equalsIgnoreCase(\"TRUE\"))\n {\n ret_boolean = true;\n }\n else\n if (val.equalsIgnoreCase(\"OFF\") ||\n val.equalsIgnoreCase(\"NO\") ||\n val.equalsIgnoreCase(\"FALSE\"))\n {\n ret_boolean = false;\n }\n\n return ret_boolean;\n }", "boolean hasProperty2();", "boolean hasProperty();", "boolean hasProperty();", "boolean hasProperty();", "boolean hasProperty(String key);", "boolean containsProperty(String name);", "boolean hasPropertyLike(String name);", "public boolean getBooleanProperty(String key) {\n String val = getProperty(key);\n return (null == val ? true : Boolean.valueOf(val).booleanValue());\n }", "boolean hasProperty(String propertyName);", "public boolean isProperty();", "boolean hasProperty0();", "private static boolean isPropertyEnabled(Dictionary<?, ?> properties,\n String propertyName) {\n boolean enabled = false;\n try {\n String flag = Tools.get(properties, propertyName);\n enabled = isNullOrEmpty(flag) ? enabled : flag.equals(\"true\");\n } catch (ClassCastException e) {\n // No propertyName defined.\n enabled = false;\n }\n return enabled;\n }", "public boolean hasBooleanProperty( Property propertyId ) {\n Object value = getProperty(propertyId);\n return (value instanceof Boolean && ((Boolean)value).booleanValue());\n }", "public static boolean getBoolProperty(String key) {\r\n\t\treturn getBoolProperty(key, false);\r\n\t}", "public boolean getBooleanProperty(String key) {\n\t\treturn Boolean.parseBoolean(this.getProperty(key));\n\t}", "public boolean hasProperty( String key );", "boolean getBoolean(int index) throws PropertyException {\n Object object = this.get(index);\n if (object.equals(Boolean.FALSE)\n || (object instanceof String && ((String) object).equalsIgnoreCase(\"false\"))) {\n return false;\n } else if (object.equals(Boolean.TRUE)\n || (object instanceof String && ((String) object).equalsIgnoreCase(\"true\"))) {\n return true;\n }\n throw new PropertyException(\"JSONArray[\" + index + \"] is not a boolean.\");\n }", "boolean isValidBoolean(boolean value);", "boolean hasValue(PropertyValue<?, ?> value);", "public boolean isProperty(String classPath, String fieldName)\n throws EnhancerMetaDataUserException, EnhancerMetaDataFatalError\n {\n final JDOField field = getJDOField(classPath, fieldName);\n return (field != null && field.isProperty());\n }", "Object getPropertyexists();", "public PropertyBoolean(String name) {\n super(name);\n }", "public boolean booleanValue(String name)\n\t{\n\t\tString p = _props.getProperty(name);\n\t\tif(p != null && p.length() > 0 \n\t\t\t\t&& (p.toLowerCase().charAt(0) == 'y'\n\t\t\t\t|| p.toLowerCase().charAt(0) == 't'))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean getBoolean(String path) {\n return yml.getBoolean(path);\n }", "<T> boolean containsValue(Property<T> property);", "boolean containsProperties(\n java.lang.String key);", "public interface IBooleanProperty {\n /**\n * A simple implementation that holds its own state.\n */\n class WithState implements IBooleanProperty {\n private boolean value;\n\n public WithState(boolean value) {\n this.value = value;\n }\n\n @Override\n public boolean getBoolean() {\n return this.value;\n }\n\n @Override\n public void setBoolean(boolean value) {\n this.value = value;\n }\n\n @Override\n public boolean isValidBoolean(boolean value) {\n return true;\n }\n }\n\n /**\n * Get the boolean value.\n * @return the boolean value\n */\n boolean getBoolean();\n\n /**\n * Set the boolean value, regardless of it being a valid value or not.\n * The validity of the boolean value should be evaluated with isValidBoolean.\n * @param value the boolean value\n */\n void setBoolean(boolean value);\n\n /**\n * Returns true if the boolean value is valid.\n * @param value the boolean value\n * @return true if the boolean value is valid\n */\n boolean isValidBoolean(boolean value);\n\n /**\n * Try to set the boolean value. Returns true if it succeeded.\n * @param value the boolean value\n * @return true if it succeeded\n */\n default boolean trySetBoolean(boolean value) {\n if (this.isValidBoolean(value)) {\n this.setBoolean(value);\n return true;\n } else {\n return false;\n }\n }\n}", "boolean hasGetProperty();", "public boolean isSetPath() {\n return this.path != null;\n }", "public boolean isSetPath() {\n return this.path != null;\n }", "public boolean isSetPath() {\n return this.path != null;\n }", "public boolean isSetPath() {\n return this.path != null;\n }", "public boolean isSetPath() {\n return this.path != null;\n }", "public boolean isSetPath() {\n return this.path != null;\n }", "public boolean isSetPath() {\n return this.path != null;\n }", "public boolean isSetPath() {\n return this.path != null;\n }", "public boolean isSetPath() {\n return this.path != null;\n }", "public boolean isSetPath() {\n return this.path != null;\n }", "public boolean isSetPath() {\n return this.path != null;\n }", "public boolean isSetPath() {\n return this.path != null;\n }", "public boolean isSetPath() {\n return this.path != null;\n }", "public boolean isSetPath() {\n return this.path != null;\n }", "public boolean isSetPath() {\n return this.path != null;\n }", "public boolean isSetPath() {\n return this.path != null;\n }", "public boolean isSetPath() {\n return this.path != null;\n }", "public boolean isSetPath() {\n return this.path != null;\n }", "public boolean isSetPath() {\n return this.path != null;\n }", "public boolean isSetPath() {\n return this.path != null;\n }", "public static PropertyDescriptionBuilder<Boolean> booleanProperty(String name) {\n return PropertyDescriptionBuilder.start(name, Boolean.class, Parsers::parseBoolean);\n }", "public abstract boolean getProperty(String propertyName);", "public boolean getMandatoryBoolean(String key) throws ConfigNotFoundException;", "@Override\n public boolean hasProperty(final String relPath) {\n return false;\n }", "Boolean getIsValid();", "public static boolean getBoolean(String pName) {\n boolean out = false;\n try {\n out = Boolean.parseBoolean(properties.getProperty(pName));\n } catch (Exception e) {\n out = Boolean.parseBoolean(defaults.getProperty(pName));\n Log.debug(\"Cannot parse property: \" + pName);\n Log.debug(e);\n }\n return out;\n }", "@Test\n public void testBooleanProperty() {\n try (ReleasableVariant started = classObject.get(\"Started\")) {\n Assertions.assertTrue(started.booleanValue());\n }\n }", "public boolean getBoolean(String property)\n\tthrows PropertiesPlusException\n\t{\n\t\tString value = getProperty(property);\n\t\tif (value == null)\n\t\t\tthrow new PropertiesPlusException(property+\" is not defined.\");\n\t\t\n\t\tvalue = value.trim();\n\t\tif (value.equalsIgnoreCase(\"true\"))\n\t\t\treturn true;\n\t\t\n\t\tif (value.equalsIgnoreCase(\"false\"))\n\t\t\treturn false;\n\t\t\n\t\tthrow new PropertiesPlusException(String.format(\n\t\t\t\t\t\"%s = %s cannot be converted to type boolean\", property, value));\n\t}", "public static boolean checkTrueOrFalse(Properties attributes, String key) {\n\t\treturn \"true\".equalsIgnoreCase(attributes.getProperty(key));\n\t}", "boolean hasBoolValue();", "boolean hasSetProperty();", "public boolean getBoolean(String key) {\n\t\tif (internal.getProperty(key) != null)\n\t\t\treturn internal.getProperty(key).equals(\"true\");\n\t\telse if (getDefault(key) != null)\n\t\t\treturn (Boolean) getDefault(key);\n\t\telse\n\t\t\treturn false;\n\t}", "@Test\n public void testBooleanPropertyQuick() {\n Assertions.assertTrue(classObject.getBoolean(\"Started\"));\n }", "public static boolean getBoolean(final String key) {\r\n if (PROP == null) {\r\n throw new RuntimeException(\"Config hasn't been initialized yet.\");\r\n }\r\n if (PROP.containsKey(key))\r\n if (PROP.getProperty(key).equals(\"true\")\r\n || PROP.getProperty(key).equals(\"1\"))\r\n return true;\r\n else\r\n return false;\r\n else\r\n throw new RuntimeException(\"No config key found for [\" + key + \"].\");\r\n }", "private boolean isValueAProperty(String name)\n {\n int openIndex = name.indexOf(\"${\");\n\n return openIndex > -1;\n }", "private boolean getOptionalBooleanProperty(String property, boolean defaultValue) {\n\t\tString value = getOptionalStringProperty(property);\n\t\tif (value != null)\n return value.equalsIgnoreCase(\"true\") || value.equalsIgnoreCase(\"yes\");\n return defaultValue;\n\t}", "public static boolean verifyAndFetchOptionalProperty(String key,\r\n\t\t\tboolean defaultValue, Properties prop) {\r\n\t\tString property;\r\n\t\tproperty = fetchProperty(key, prop);\r\n\r\n\t\t// Property should not be blank.\r\n\t\tif (property == null || (property != null && property.trim().isEmpty())) {\r\n\t\t\treturn defaultValue;\r\n\t\t}\r\n\t\treturn Boolean.parseBoolean(property);\r\n\t}", "public static boolean getPropertyValueAsBoolean(Set<ConfigProperty> properties,\n String name) {\n Optional<ConfigProperty> property =\n properties.stream().filter(p -> p.name().equals(name)).findFirst();\n\n return property.map(ConfigProperty::asBoolean).orElse(false);\n }", "boolean hasPropType();", "private boolean getBooleanProperty(ParameterList key, boolean defaultValue) \n throws NumberFormatException, NullPointerException, MissingOptionException{\n try {\n boolean keyPresent = fileParameters.containsKey(key.name);\n String strValue = keyPresent ? fileParameters.getProperty(key.name).replaceAll(\"\\\\s\", \"\") : null;\n if (!keyPresent && key.mandatory) {\n throw new MissingOptionException(\"The input parameter (\" + key.name + \") was not found\");\n }\n else if(!keyPresent || strValue.equals(\"\")){\n loadedParametersLog.append(key.name).append(\"=\").append(defaultValue).append(\" (DEFAULT)\\n\");\n return defaultValue;\n }\n loadedParametersLog.append(key.name).append(\"=\").append(strValue).append(\"\\n\");\n return Boolean.parseBoolean(strValue);\n } catch (NumberFormatException e) {\n throw new NumberFormatException(e.getMessage() + \"\\nThe input parameter (\" + key.name + \") could not be converted to boolean.\");\n } catch (NullPointerException e) {\n throw new NullPointerException(e.getMessage() + \"\\nThe parameter file was not initialized.\");\n }\n }", "String getPropertyExists();", "boolean getBoolean(String key) throws KeyValueStoreException;", "private boolean isPropertyRelevant(String property) {\n return relevantProperties == null || relevantProperties.contains(property);\n }", "public void setProperty(String propertyName, boolean value);", "public boolean getAsBoolean(final String name) {\r\n Boolean result = false;\r\n String prop = (String) this.properties.get(name);\r\n if (prop != null) {\r\n prop = prop.toLowerCase();\r\n if (prop != null && (TRUE.equals(prop) || ONE.equals(prop))) {\r\n result = true;\r\n }\r\n }\r\n return result;\r\n }", "@Override\n\t\tpublic boolean hasProperty(String key) {\n\t\t\treturn false;\n\t\t}", "private static boolean validateBoolean(String boolString) {\n if (boolString.equals(\"true\") || boolString.equals(\"false\") \n || boolString.equals(\"1\") || boolString.equals(\"0\")) {\n return true;\n } else {\n return false;\n }\n }", "public boolean isSetProperties() {\n return this.properties != null;\n }", "private boolean getOptionalBooleanProperty(String[] propertyNameList, boolean defaultValue) {\n\t\tString value = getOptionalStringProperty(propertyNameList);\n if (value != null)\n return value.equalsIgnoreCase(\"true\") || value.equalsIgnoreCase(\"yes\");\n return defaultValue;\n\t}", "public Boolean getBoolean(String key)\n\t{\n\t\tverifyParseState();\n\t\t\n\t\tValue value = values.get(key);\n\t\tif(value == null || value.value == null)\n\t\t\treturn null;\n\t\tif(value.type != ValueType.BOOLEAN)\n\t\t\tthrow new JsonTypeException(value.value.getClass(), Boolean.class);\n\t\treturn (Boolean)value.value;\n\t}", "public abstract boolean isMatching(Properties p);", "public boolean getBoolean(String key) {\r\n try {\r\n String string = getString(key);\r\n return string.equalsIgnoreCase(\"true\") || string.equals(\"1\");\r\n }\r\n catch (MissingResourceException e) {\r\n return false;\r\n }\r\n }", "boolean isPathValid(LttlPath p)\n\t{\n\t\tif (p == null || !p.closed)\n\t\t{\n\t\t\tif (p != null && (!p.closed || p.controlPoints.size() < 3)\n\t\t\t\t\t&& !pathWarning)\n\t\t\t{\n\t\t\t\tLttl.logNote(\"Path or Cutout Path on \"\n\t\t\t\t\t\t+ toString()\n\t\t\t\t\t\t+ \" must be closed and have more than 3 points to create mesh.\");\n\t\t\t\tr().setMesh(null);\n\t\t\t\tpathWarning = true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean hasProperty(String fieldName, String value) {\n\t\tString[] fields = doc.getValues(fieldName);\n\t\tif (fields != null) {\n\t\t\tfor (String field : fields) {\n\t\t\t\tif (value.equals(field)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public abstract boolean isAllowCustomProperties();", "public boolean isAnimProperty(String aPropertyName)\n{\n // Declare anim properties\n String animProps[] = { \"X\", \"Y\", \"Width\", \"Height\", \"Roll\", \"ScaleX\", \"ScaleY\", \"SkewX\", \"SkewY\", \"Opacity\",\n \"Radius\", // Bogus - for RMRectangle\n \"StartAngle\", \"SweepAngle\", // Bogus - for RMOval\n \"Depth\", \"Yaw\", \"Pitch\", \"Roll3D\", \"FocalLenth\", \"OffsetZ\", // for RMScene3D\n \"Playing\", // Bogus - for RMSound\n \"Morphing\", // Bogus - for RMMorphShape\n \"Distance\", \"PreservesOrientation\" // Bogus - for RMAnimPath\n };\n \n // Return true if is anim property\n return RMArrayUtils.contains(animProps, aPropertyName);\n}", "public void check(final Predicate<T> property);", "public static boolean getBoolean(String key) throws UnknownID, ArgumentNotValid {\n\t\tArgumentNotValid.checkNotNullOrEmpty(key, \"String key\");\n\t\tString value = get(key);\n\t\treturn Boolean.parseBoolean(value);\n\t}", "public static boolean isValidPath(String path) {\n\t\ttry {\n\t\t\tPaths.get(path);\n\t\t\treturn true;\n\t\t} catch (InvalidPathException e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public void setPropertyToRoot(String propertyName, boolean value);", "boolean isRequired();", "boolean isRequired();", "boolean isRequired();", "public Boolean getBoolean(String propertyName) {\n if (this.has(propertyName) && !this.propertyBag.isNull(propertyName)) {\n return Boolean.valueOf(this.propertyBag.getBoolean(propertyName));\n } else {\n return null;\n }\n }", "boolean valid() {\n boolean valid = true;\n\n if (!isAgencyLogoPathValid()) {\n valid = false;\n }\n if (!isMemFieldValid()) {\n valid = false;\n }\n if (!isLogNumFieldValid()) {\n valid = false;\n }\n\n return valid;\n }", "public static boolean getBooleanParam(String key) throws InvalidParam {\n return getCurrentConfig().getBoolean(key);\n }", "public Boolean validateBoundaryFields(Property property, String field, RequestInfo requestInfo)\n\t\t\tthrows InvalidPropertyBoundaryException {\n\n\t\tPropertyLocation propertyLocation = property.getBoundary();\n\t\tLong id;\n if (field.equalsIgnoreCase(env.getProperty(\"revenue.boundary\"))) {\n\t\t\tid = propertyLocation.getRevenueBoundary().getId();\n\t\t} else if (field.equalsIgnoreCase(env.getProperty(\"location.boundary\"))) {\n\t\t\tid = propertyLocation.getLocationBoundary().getId();\n\t\t} else {\n\t\t\tid = propertyLocation.getAdminBoundary().getId();\n\t\t}\n return boundaryRepository.isBoundaryExists(property, requestInfo, id);\n\t\t\n\t}", "public PropertyBoolean(String uid, String value) {\n super(uid, value);\n setFixedValues(new HashSet<Boolean>(Arrays.asList(Boolean.TRUE, Boolean.FALSE)));\n }", "public boolean hasProperty(Pp property) {\n return properties.contains(property);\n }", "private static boolean validateFileExists(Map.Entry<String, CheckState> entry) {\n String prop = System.getProperty(entry.getKey());\n if (entry.getValue().isOptional && prop == null) {\n return true;\n }\n\n if (prop == null || \"\".equals(prop)) {\n return false;\n }\n\n return Files.exists(new File(prop).toPath());\n }" ]
[ "0.63724816", "0.63297904", "0.63209844", "0.6309336", "0.6309336", "0.6309336", "0.6206824", "0.6189822", "0.61692995", "0.6145869", "0.6128914", "0.60819066", "0.6072868", "0.6026343", "0.6014392", "0.5974429", "0.5943546", "0.59348077", "0.5910565", "0.58946794", "0.585261", "0.58404505", "0.5829009", "0.58285034", "0.5775472", "0.57653236", "0.5759577", "0.574812", "0.5742784", "0.5715533", "0.5700396", "0.5700396", "0.5700396", "0.5700396", "0.5700396", "0.5700396", "0.5700396", "0.5700396", "0.5700396", "0.5700396", "0.5700396", "0.5700396", "0.5700396", "0.5700396", "0.5700396", "0.5700396", "0.5700396", "0.5700396", "0.5700396", "0.5700396", "0.5685882", "0.5674548", "0.5672832", "0.56635016", "0.5663283", "0.5653131", "0.5646503", "0.562391", "0.5601889", "0.55678403", "0.55497754", "0.55296004", "0.5525923", "0.5505808", "0.55014545", "0.54984224", "0.54932475", "0.5491936", "0.54755706", "0.5464447", "0.54329824", "0.542611", "0.5406203", "0.53973067", "0.5385416", "0.53774875", "0.53765017", "0.537509", "0.53744006", "0.53722733", "0.53624743", "0.5345463", "0.5339553", "0.53383213", "0.532967", "0.52964586", "0.5291115", "0.52876115", "0.5280015", "0.52719027", "0.5254139", "0.5254139", "0.5254139", "0.5236", "0.5228477", "0.5216907", "0.52119476", "0.5199976", "0.519995", "0.5184383" ]
0.67452216
0
Validates if the given property values actually resolves to a valid filepath and existing file
private static boolean validateFileExists(Map.Entry<String, CheckState> entry) { String prop = System.getProperty(entry.getKey()); if (entry.getValue().isOptional && prop == null) { return true; } if (prop == null || "".equals(prop)) { return false; } return Files.exists(new File(prop).toPath()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void validateInput () throws IOException, Exception {\n\t\t\n\t\t// Check that the properties file exists\n\t\tFile propFile = new File(propertiesFile);\n\t\tif (!propFile.exists()) { \n\t\t\tthrow new IOException(\"Unable to open properties file \" + propertiesFile);\t\n\t\t}\n\t\t\n\t\t// Check that the list of register files is not empty\n\t\tif (inputFiles == null || inputFiles.isEmpty()) {\n\t\t\tthrow new Exception(\"No files to process\");\n\t\t}\n\t}", "boolean hasFilePath();", "static FormValidation doCheckPath(@QueryParameter String value) {\n if (StringUtils.isBlank(value)) {\n return FormValidation.ok();\n }\n try {\n final FilePath filePath = new FilePath(new File(value));\n filePath.exists();\n } catch (Exception e) {\n return FormValidation.error(\"The specified value is not a valid path\");\n }\n return FormValidation.ok();\n }", "@Test\n\tpublic void validFileTest() {\n\t\t// Test valid file with full file path\n\t\tworkDir = new File(workingDir);\n\t\texpected = validFile.getAbsolutePath();\n\t\tactual = Helper.isValidFile(workDir, validFile.getAbsolutePath());\n\t\tassertEquals(expected, actual.getAbsolutePath());\n\n\t\t// Test valid file with only file name\n\t\texpected = workDir.getAbsolutePath() + pathSep + fileName; // Bugs: OS\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// compatible \\\\\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// changed to /\n\t\tactual = Helper.isValidFile(workDir, fileName);\n\t\tassertEquals(expected, actual.getAbsolutePath());\n\t}", "private boolean validateFile(String path) {\n return !path.equals(AppStrings.NO_FILE_PATH);\n }", "private void validate(Path path) {\n }", "boolean hasFileLocation();", "private static void validPaths(String args[]){\n if(args.length!=2){\r\n System.out.println(\"First argument required is path, Second argument required is output directory\");\r\n System.exit(-1);\r\n }\r\n File json = new File(args[0]);\r\n File csv = new File (args[1]);\r\n if(json.exists() == false || csv.exists() == false){\r\n if(json.exists()==false){\r\n System.out.println(\"Path: \" + args[0] + \" does not exist\");\r\n }\r\n if(csv.exists()==false){\r\n System.out.println(\"Path: \" + args[1] + \" does not exist\");\r\n }\r\n System.exit(-1);\r\n }\r\n }", "private void validateSource(SourcePointer.FileSource src) {\n File f = src.path.toFile();\n if (!f.exists() || !f.canRead()) {\n throw new SolrException(\n ErrorCode.BAD_REQUEST,\n String.format(\n Locale.US, \"File at %s either does not exist or cannot be read.\", src.path));\n }\n }", "private boolean checkProperties(IConfiguration buildcfg, AVRProjectProperties props) {\n\n\t\tboolean perconfig = ProjectPropertyManager.getPropertyManager(fProject).isPerConfig();\n\t\tString source = perconfig ? SOURCE_BUILDCONFIG : SOURCE_PROJECT;\n\n\t\t// Check that a Programmer has been selected\n\t\tif (props.getAVRDudeProperties().getProgrammer() == null) {\n\t\t\tString message = MessageFormat.format(MSG_NOPROGRAMMER, source);\n\t\t\tMessageDialog.openError(getShell(), TITLE_UPLOAD, message);\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check that the MCU is valid for avrdude\n\t\tString mcuid = props.getMCUId();\n\t\tif (!AVRDude.getDefault().hasMCU(mcuid)) {\n\t\t\tString message = MessageFormat.format(MSG_WRONGMCU, AVRMCUidConverter.id2name(mcuid));\n\t\t\tMessageDialog.openError(getShell(), TITLE_UPLOAD, message);\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check that there is actually anything to upload\n\t\tList<String> actionlist = props.getAVRDudeProperties().getActionArguments(buildcfg, true);\n\t\tif (actionlist.size() == 0) {\n\t\t\tString message = MessageFormat.format(MSG_NOACTIONS, source);\n\t\t\tMessageDialog.openWarning(getShell(), TITLE_UPLOAD, message);\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check all referenced files\n\t\t// It would be cumbersome to go through all possible cases. Instead we\n\t\t// convert all action arguments back to AVRDudeActions and get the\n\t\t// filename from it.\n\t\tIPath invalidfile = null;\n\t\tString formemtype = null;\n\t\tfor (String argument : actionlist) {\n\t\t\tAVRDudeAction action = AVRDudeAction.getActionForArgument(argument);\n\t\t\tString filename = action.getFilename();\n\t\t\tif (filename == null)\n\t\t\t\tcontinue;\n\t\t\tIPath rawfile = new Path(filename);\n\t\t\tIPath unresolvedfile = rawfile;\n\t\t\tIPath resolvedfile = rawfile;\n\t\t\tif (!rawfile.isAbsolute()) {\n\t\t\t\t// The filename is relative to the build folder. Get the build\n\t\t\t\t// folder and append our filename. Then resolve any macros\n\t\t\t\tunresolvedfile = buildcfg.getBuildData().getBuilderCWD().append(rawfile);\n\t\t\t\tresolvedfile = new Path(BuildMacro.resolveMacros(buildcfg, unresolvedfile\n\t\t\t\t\t\t.toString()));\n\t\t\t}\n\t\t\tFile realfile = resolvedfile.toFile();\n\t\t\tif (!realfile.canRead()) {\n\t\t\t\tinvalidfile = unresolvedfile;\n\t\t\t\tformemtype = action.getMemType().toString();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (invalidfile != null) {\n\t\t\tString message = MessageFormat.format(MSG_MISSING_FILE, invalidfile.toString(),\n\t\t\t\t\tformemtype);\n\t\t\tMessageDialog.openError(getShell(), TITLE_UPLOAD, message);\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check that the fuses and locks are valid (if they are to be uploaded)\n\t\tfor (FuseType type : FuseType.values()) {\n\n\t\t\tif (props.getAVRDudeProperties().getBytesProperties(type, buildcfg).getWrite()) {\n\t\t\t\tBaseBytesProperties bytesproperties = props.getAVRDudeProperties()\n\t\t\t\t\t\t.getBytesProperties(type, buildcfg);\n\t\t\t\tif (bytesproperties.getMCUId() == null) {\n\t\t\t\t\t// A non-existing file has been selected as source for the fuses\n\t\t\t\t\tString message = MessageFormat.format(MSG_MISSING_FUSES_FILE, type.toString(),\n\t\t\t\t\t\t\tbytesproperties.getFileNameResolved());\n\t\t\t\t\tMessageDialog.openError(getShell(), TITLE_UPLOAD, message);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (!bytesproperties.isCompatibleWith(props.getMCUId())) {\n\t\t\t\t\tString fusesmcuid = AVRMCUidConverter.id2name(bytesproperties.getMCUId());\n\t\t\t\t\tString propsmcuid = AVRMCUidConverter.id2name(props.getMCUId());\n\t\t\t\t\tString message = MessageFormat.format(MSG_INVALIDFUSEBYTE, type.toString(),\n\t\t\t\t\t\t\tfusesmcuid, propsmcuid, source);\n\t\t\t\t\tMessageDialog.openError(getShell(), TITLE_UPLOAD, message);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Everything is OK\n\t\treturn true;\n\t}", "@Override\n\tpublic void checkPropertyConfiguration() throws IOException, CustomizedException {\n\t\tString conf=PropertyReader.getProperty(\"configuration\");\n\t\tString\tfileName=\"\";\n\t\tconfiguration=conf;\n\t\tif(conf == null || conf.isEmpty())\n\t\t{\n\t\t\tthrow new CustomizedException(\"Configuration property is not set,it must be set to 1 or 2 \");\n\n\t\t}\n\t\tif(conf.equals(\"1\"))\n\t\t{\n\t\t\titeration=1;\n\t\t\tfileName=PropertyReader.getProperty(\"anagram_file\");\n\t\t\n\t\t\tif(fileName == null || fileName.isEmpty())\n\t\t\t{\n\t\t\t\tthrow new CustomizedException(\"Filename property is not set,it must be set to sample against the key anagramFile \");\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if(conf.equals(\"2\"))\n\t\t{\n\t\t\titeration=Integer.parseInt(PropertyReader.getProperty(\"load_testing_iteration\"));\n\t\t\tfileName=PropertyReader.getProperty(\"large_file\");\n\t\t\tif(fileName == null || fileName.isEmpty())\n\t\t\t{\n\t\t\t\tthrow new CustomizedException(\"Filename property is not set,it must be bigFile against the key largeFile \");\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tthis.fileName=fileName;\n\t\t\n\t}", "boolean isAgencyLogoPathValid() {\n boolean valid = true;\n\n if (defaultLogoRB.isSelected()) {\n agencyLogoPathFieldValidationLabel.setText(\"\");\n } else {\n String agencyLogoPath = agencyLogoPathField.getText();\n if (agencyLogoPath.isEmpty()) {\n agencyLogoPathFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_agencyLogoPathFieldValidationLabel_pathNotSet_text());\n valid = false;\n } else {\n File file = new File(agencyLogoPathField.getText());\n if (file.exists() && file.isFile()) {\n BufferedImage image;\n try { //ensure the image can be read\n image = ImageIO.read(file); //create it as an image first to support BMP files\n if (image == null) {\n throw new IOException(\"Unable to read file as a BufferedImage for file \" + file.toString());\n }\n agencyLogoPathFieldValidationLabel.setText(\"\");\n } catch (IOException | IndexOutOfBoundsException ignored) {\n agencyLogoPathFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_agencyLogoPathFieldValidationLabel_invalidImageSpecified_text());\n valid = false;\n }\n } else {\n agencyLogoPathFieldValidationLabel.setText(Bundle.AutopsyOptionsPanel_agencyLogoPathFieldValidationLabel_invalidPath_text());\n valid = false;\n }\n }\n }\n\n return valid;\n }", "public void setPropertyFile(String value) {\n File f = (new File(value)).getAbsoluteFile();\n if (f.isDirectory()) {\n throw new IllegalArgumentException(\n String.format(\"The file %s is a directory.\", f));\n }\n File parent = f.getParentFile();\n if (parent != null) {\n if (!parent.isDirectory()) {\n throw new IllegalArgumentException(\n String.format(\"The directory %s does not exist.\", parent));\n }\n }\n propertyFile = f.getPath();\n }", "@Override\n protected void performValidation(String path, Object value, List<ValidationResult> results) {\n super.performValidation(path, value, results);\n\n if (value == null)\n return;\n\n String name = path != null ? path : \"value\";\n Map<String, Object> properties = ObjectReader.getProperties(value);\n\n // Process defined properties\n if (_properties != null) {\n for (PropertySchema propertySchema : _properties) {\n String processedName = null;\n\n for (Map.Entry<String, Object> entry : properties.entrySet()) {\n String propertyName = entry.getKey();\n Object propertyValue = entry.getValue();\n // Find properties case insensitive\n if (propertyName.equalsIgnoreCase(propertySchema.getName())) {\n propertySchema.performValidation(path, propertyValue, results);\n processedName = propertyName;\n break;\n }\n }\n\n if (processedName == null)\n propertySchema.performValidation(path, null, results);\n else\n properties.remove(processedName);\n }\n }\n\n // Process unexpected properties\n for (Map.Entry<String, Object> entry : properties.entrySet()) {\n String propertyPath = path == null || path.length() == 0 ? entry.getKey() : path + \".\" + entry.getKey();\n\n results.add(new ValidationResult(propertyPath, ValidationResultType.Warning, \"UNEXPECTED_PROPERTY\",\n name + \" contains unexpected property \" + entry.getKey(), null, entry.getKey()));\n }\n }", "public static void generateLocalizedFile() throws IOException {\n GenerateFile generateFile = new GenerateFile();\n Stream<String> fileStream1 = createStreamFromPath(\"src\"+File.separator+\"test.properties\");\n Stream<String> fileStream2 = createStreamFromPath(\"src\"+File.separator+\"test.txt\");\n Map<String, String> with_key_values = convertTomap(fileStream1, \"=\");\n Map<String, String> with_only_values = convertTomap(fileStream2, \"\\\\|\");\n if (!with_key_values.isEmpty() && with_key_values != null && !with_only_values.isEmpty() && with_only_values != null) {\n generateFile.createFileFromList(findAndAppendkeyWithValue(with_key_values, with_only_values),\"file.properties\");\n } else {\n logger.info(\"Either one of your files are not following the rules\");\n }\n }", "protected void checkV2Path(final boolean create) throws FileException {\r\n\t\tAssert.hasLength(v2Path,\r\n\t\t\t\t\"property v2Path of class \" + this.getClass().getName() + \" can not be null\");\r\n\t\tcheckPath(v2Path, create);\r\n\t}", "private boolean validateFile(JTextField fileTF,\n Component parentComp) {\n if (fileTF.getText().trim().length() == 0)\n {\n JOptionPane.showMessageDialog(parentComp,\n \"Please enter a file name in the file field\",\n \"No File Name\", JOptionPane.ERROR_MESSAGE);\n return false;\n }\n String text = fileTF.getText().trim();\n File file = new File(text);\n if (!file.exists())\n {\n JOptionPane\n .showMessageDialog(\n parentComp,\n \"The file you entered does not exist. Please enter a valid file name\",\n \"Incorrect File Name\", JOptionPane.ERROR_MESSAGE);\n return false;\n }\n return true;\n }", "@Override\n\tprotected boolean isFileValid(List<String> lines) {\n\t\treturn lines.size() == SAVE_FILE_LENGTH && lines.get(0).length() > 0 && lines.get(1).length() > 0; // id and first name is required\n\t}", "private File validateFile(String filename)\n {\n if (filename == null)\n {\n throw new IllegalArgumentException(\"Filename is null\");\n }\n File f = new File(filename);\n //if (!f.exists()) sometimes this throws false even if the program does exist.\n //{\n // throw new IllegalArgumentException(\"Path \"+filename+\" does not refer to a file\");\n //}\n return f;\n }", "private static boolean isValidCreate(String pFilePath) {\n\t\tassert pFilePath != null;\n\t\tFile f = new File(pFilePath);\n\t\treturn f.exists();\n\t}", "@Test\n\tpublic void invalidFileTest() {\n\t\t// Test error handling: invalid file\n\t\tfileName = \"invalid.txt\";\n\t\tactual = Helper.isValidFile(workDir, fileName);\n\t\tassertNull(actual);\n\n\t\t// Test error handling: invalid file\n\t\tfileName = \"./misc/secondinvalid.txt\";\n\t\tactual = Helper.isValidFile(workDir, fileName);\n\t\tassertNull(actual);\n\n\t\t// Test error handling: invalid file name with numbers\n\t\tfileName = \"12345\";\n\t\tactual = Helper.isValidFile(workDir, fileName);\n\t\tassertNull(actual);\n\n\t\t// Test error handling: invalid file name with spaces\n\t\tfileName = \"not a file\";\n\t\tactual = Helper.isValidFile(workDir, fileName);\n\t\tassertNull(actual);\n\n\t\t// Test error handling: blank file\n\t\tfileName = \"\";\n\t\tactual = Helper.isValidFile(workDir, fileName);\n\t\tassertNull(actual);\n\n\t\tfileName = \" \";\n\t\tactual = Helper.isValidFile(workDir, fileName);\n\t\tassertNull(actual);\n\n\t\tfileName = null;\n\t\tactual = Helper.isValidFile(workDir, fileName);\n\t\tassertNull(actual);\n\n\t}", "@Test\n public void testAnalyzeFileByExtension() {\n incorrectValues(null, \"test.txt\");\n incorrectValues(\"\", \"test.txt\");\n incorrectValues(\"lof\", null);\n incorrectValues(\"file\", \"\");\n incorrectValues(\"resources\", \".png\");\n }", "boolean safeIsFile(FsPath path);", "@Test\n public void testInvalidSlashesRuleMatches() throws Exception {\n Assume.assumeFalse(SystemInfo.isWindows);\n\n File file = new File(\"at\\\\least/one\\\\of/these\\\\slashes/are\\\\wrong\");\n assertRuleFails(myFileOp, PathValidator.INVALID_SLASHES, file);\n }", "public static boolean checkFileType(String fileName) {\n\t\t// properties file has a comma delimited list of extensions\n\t\tString extension_value = PropertiesFile.getInstance().getProperty(\"accepted_ext\");\n\n\t\tif (extension_value != null) {\n\t\t\tString[] extensions = extension_value.split(\",\");\n\t\t\tfor (int i = 0; extensions != null && i < extensions.length; i++) {\n\t\t\t\tif (fileName.endsWith(extensions[i].trim()))\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private void validateProperties() throws BuildException {\r\n if (this.port == null || this.port.length() == 0) {\r\n throw new BuildException(\"Attribute 'port' must be set.\");\r\n }\r\n if (this.depotPath == null || this.depotPath.length() == 0) {\r\n throw new BuildException(\"Attribute 'repositoryUrl' must be set.\");\r\n }\r\n if (this.userName == null || this.userName.length() == 0) {\r\n throw new BuildException(\"Attribute 'userName' must be set.\");\r\n }\r\n if (this.password == null || this.password.length() == 0) {\r\n throw new BuildException(\"Attribute 'password' must be set.\");\r\n }\r\n if (this.depotPath == null || this.depotPath.length() == 0) {\r\n throw new BuildException(\"Attribute 'repositoryUrl' must be set.\");\r\n }\r\n if (this.p4ExecutablePath == null || this.p4ExecutablePath.length() == 0) {\r\n throw new BuildException(\"Attribute 'p4ExecutablePath' must be set.\");\r\n }\r\n File p4Executable = new File(this.p4ExecutablePath);\r\n if (!p4Executable.exists()) {\r\n throw new BuildException(\"Attribute 'p4ExecutablePath' \" + this.p4ExecutablePath +\r\n \" does not appear to point to an actual file.\");\r\n }\r\n \r\n // If default* is specified, then all should be specified. \r\n if (((this.defaultHackystatAccount != null) || \r\n (this.defaultHackystatPassword != null) ||\r\n (this.defaultHackystatSensorbase != null)) &&\r\n ((this.defaultHackystatAccount == null) || \r\n (this.defaultHackystatPassword == null) ||\r\n (this.defaultHackystatSensorbase == null))) {\r\n throw new BuildException (\"If one of default Hackystat account, password, or sensorbase \" +\r\n \"is specified, then all must be specified.\");\r\n }\r\n \r\n // Check to make sure that defaultHackystatAccount looks like a real email address.\r\n if (!ValidateEmailSyntax.isValid(this.defaultHackystatAccount)) {\r\n throw new BuildException(\"Attribute 'defaultHackystatAccount' \" + this.defaultHackystatAccount\r\n + \" does not appear to be a valid email address.\");\r\n }\r\n \r\n // If fromDate and toDate not set, we extract commit information for the previous day.\r\n if (this.fromDateString == null && this.toDateString == null) {\r\n Day previousDay = Day.getInstance().inc(-1);\r\n this.fromDate = new Date(previousDay.getFirstTickOfTheDay() - 1);\r\n this.toDate = new Date(previousDay.getLastTickOfTheDay());\r\n }\r\n else {\r\n try {\r\n if (this.hasSetToAndFromDates()) {\r\n this.fromDate = new Date(Day.getInstance(this.dateFormat.parse(this.fromDateString))\r\n .getFirstTickOfTheDay() - 1);\r\n this.toDate = new Date(Day.getInstance(this.dateFormat.parse(this.toDateString))\r\n .getLastTickOfTheDay());\r\n }\r\n else {\r\n throw new BuildException(\r\n \"Attributes 'fromDate' and 'toDate' must either be both set or both not set.\");\r\n }\r\n }\r\n catch (ParseException ex) {\r\n throw new BuildException(\"Unable to parse 'fromDate' or 'toDate'.\", ex);\r\n }\r\n\r\n if (this.fromDate.compareTo(this.toDate) > 0) {\r\n throw new BuildException(\"Attribute 'fromDate' must be a date before 'toDate'.\");\r\n }\r\n }\r\n }", "public boolean isSetFilePath() {\n return this.filePath != null;\n }", "public boolean isSetFilePath() {\n return this.filePath != null;\n }", "public boolean isSetFilePath() {\n return this.filePath != null;\n }", "public boolean isSetFilePath() {\n return this.filePath != null;\n }", "@Test\n public void filesValidateTest() throws ApiException {\n String owner = null;\n String repo = null;\n FilesValidate data = null;\n api.filesValidate(owner, repo, data);\n\n // TODO: test validations\n }", "@Test\n\tpublic void executeInvalidFileForSlash() {\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"\\\\/\"));\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"\\\\\"));\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"//\"));\n\t\tassertEquals(null, Helper.isValidFile(\n\t\t\t\tnew File(System.getProperty(\"user.dir\")), \"/\"));\n\t}", "public static void insurePathToFileExists(String filename) {\r\n insurePathToFileExists(new File(filename));\r\n }", "private void validatePropertiesByDriver(PSPublishServerInfo pubServerInfo, String[] requieredProperties) throws PSValidationException {\n PSValidationErrorsBuilder builder = validateParameters(\"validatePropertiesByDriver\");\n String val = pubServerInfo.findProperty(IPSPubServerDao.PUBLISH_AS3_USE_ASSUME_ROLE);\n boolean useAssumeRole = false;\n if(val != null){\n useAssumeRole = Boolean.valueOf(val);\n }\n for (String property : requieredProperties)\n {\n String value = pubServerInfo.findProperty(property);\n if(IPSPubServerDao.PUBLISH_AS3_BUCKET_PROPERTY.equals(property)){\n builder.rejectIfBlank(property, value).throwIfInvalid();\n }else if(IPSPubServerDao.PUBLISH_AS3_ACCESSKEY_PROPERTY.equals(property)){\n if(!isEC2Instance()){\n builder.rejectIfBlank(property, value).throwIfInvalid();\n }\n }else if(IPSPubServerDao.PUBLISH_AS3_SECURITYKEY_PROPERTY.equals(property)){\n if(!isEC2Instance()){\n builder.rejectIfBlank(property, value).throwIfInvalid();\n }\n }else if(IPSPubServerDao.PUBLISH_AS3_ARN_ROLE.equals(property)){\n if(useAssumeRole) {\n builder.rejectIfBlank(property, value).throwIfInvalid();\n }\n }\n }\n }", "private void loadPropertyFiles() {\n if ( _sax_panel != null ) {\n _property_files = ( ( SAXTreeModel ) _sax_panel.getModel() ).getPropertyFiles();\n if ( _property_files == null )\n return ;\n HashMap filelist = new HashMap();\n ArrayList resolved = new ArrayList();\n Iterator it = _property_files.keySet().iterator();\n while ( it.hasNext() ) {\n Object o = it.next();\n if ( o == null )\n continue;\n File f = null;\n if ( o instanceof File ) {\n f = ( File ) o;\n Long lastModified = ( Long ) _property_files.get( f );\n filelist.put( f, lastModified );\n }\n else if ( _project != null ) {\n String value = o.toString();\n String filename = value;\n if ( value.startsWith( \"${\" ) && value.endsWith( \"}\" ) ) {\n filename = filename.substring( 2, filename.length() - 1 );\n }\n filename = _project.getProperty( filename );\n if ( filename != null )\n f = new File( filename );\n if ( f != null && !f.exists() ) {\n f = new File( _project.getBaseDir(), filename );\n }\n if ( f != null && f.exists() ) {\n filelist.put( f, new Long( f.lastModified() ) );\n resolved.add( value );\n }\n // see issue #21, Ant standard is to quietly ignore files not found\n //else\n // _logger.warning( \"Unable to find property file for \" + value );\n }\n }\n it = resolved.iterator();\n while ( it.hasNext() ) {\n filelist.remove( it.next() );\n }\n _property_files = filelist;\n }\n }", "@Test\n public void testAnalyzeFileByName() {\n incorrectValues(null, \"test.txt\");\n incorrectValues(\"\", \"test.txt\");\n incorrectValues(\"lof\", null);\n incorrectValues(\"file\", \"\");\n\n incorrectValues(DIR, \"\");\n incorrectValues(DIR, null);\n }", "public boolean isValidSong() { \n\t\tString filepath = aFilePath.toString();\n\t\tFile f = new File(filepath);\n\t\treturn f.exists();\n\t}", "@java.lang.Override\n public boolean hasFilePath() {\n return instance.hasFilePath();\n }", "public static void checkFile(Path path) {\n\n if (!path.isAbsolute()) {\n System.out.format(\"%s must be an absolute path to a file.\", path);\n System.exit(0);\n } else if (!Files.exists(path)) {\n System.out.format(\"%s does not exist.\", path);\n System.exit(0);\n }\n\n // Verify that the path references a file\n try {\n BasicFileAttributes attr = Files.readAttributes(path, BasicFileAttributes.class);\n if (!attr.isRegularFile()) {\n System.out.format(\"%s is not a file.\", path);\n System.exit(0);\n }\n } catch (IOException e) {\n System.err.println(\"I/O error: \" + e);\n e.printStackTrace();\n System.exit(1);\n }\n }", "private void checkFileNames(DSpaceRunnable dSpaceRunnable, List<MultipartFile> files) {\n List<String> fileNames = new LinkedList<>();\n for (MultipartFile file : files) {\n String fileName = file.getOriginalFilename();\n if (fileNames.contains(fileName)) {\n throw new UnprocessableEntityException(\"There are two files with the same name: \" + fileName);\n } else {\n fileNames.add(fileName);\n }\n }\n\n List<String> fileNamesFromOptions = dSpaceRunnable.getFileNamesFromInputStreamOptions();\n if (!fileNames.containsAll(fileNamesFromOptions)) {\n throw new UnprocessableEntityException(\"Files given in properties aren't all present in the request\");\n }\n }", "@Test\n public void exportProperties_nullFile_throwsNullPointerException() {\n assertThrows(NullPointerException.class, () -> exportProperties(getTypicalAddressBook(), (File) null));\n }", "private boolean checkFile(Object[] fileObject) {\n for (Object lineObject : fileObject) {\n if (lineObject.toString().split(\",\").length != 11 || lineObject.toString().contains(\"%\")) {\n System.out.println(\"Check File Error on line: \" + lineObject.toString());\n return false;\n }\n }\n return true;\n }", "private File createTestSpecificPropFile(String errorLibName) throws Exception {\n\t\tFile testProp = testingdir.getFile(ERRORLIBPROPS);\n\t\tAssert.assertTrue(\"Creating empty file: \" + testProp, testProp.createNewFile());\n\t\t\n\t\treturn testProp;\n\t}", "private static void checkPath(String path) {\n Objects.requireNonNull(path);\n Path file = new File(path).toPath();\n boolean exists = Files.exists(file); // Check if the file exists\n boolean isDirectory = Files.isDirectory(file); // Check if it's a directory\n if (!exists || !isDirectory)\n throw new IllegalArgumentException(path + \" must be exist and a directory\");\n }", "private boolean checkValidity(String path) {\n File checkFile = new File(path);\n return checkFile.exists();\n }", "@Override\r\n\tpublic boolean propertyExists(String absPath) throws RepositoryException {\n\t\treturn false;\r\n\t}", "boolean isFile(FsPath path);", "boolean hasFileLoc();", "public HasFileExpression(String path) {\r\n\t\tthis.path = path;\r\n\t}", "@Test (dataProvider = \"testData\")\n public void readingPropertiesFileTest (final String testUrl, final String userName, final int port) {\n assertWithMessage (\"testurl\").that (testUrl)\n .isNotEmpty ();\n assertWithMessage (\"username\").that (userName)\n .isNotEmpty ();\n assertWithMessage (\"port\").that (port)\n .isNotNull ();\n }", "public void checkValid() throws StyxException\n {\n if (this.getJSAPParameter() instanceof Option)\n {\n Option op = (Option)this.getJSAPParameter();\n if (this.valueSet)\n {\n if (this.param.getInputFile() != null)\n {\n // This parameter represents an input file. See if this is a URL\n // and if so, download it\n // TODO: if this is not a URL, check that it exists\n String str = this.getParameterValue();\n if (str.startsWith(URL_PREFIX))\n {\n // This could be a URL\n String urlStr = str.substring(URL_PREFIX.length());\n try\n {\n URL url = new URL(urlStr);\n File urlPath = new File(url.getPath());\n // TODO: be cleverer about file names, particularly\n // watching out for name clashes\n String name = urlPath.getName().equals(\"\") ? \"random.dat\" : urlPath.getName();\n this.instance.downloadFrom(url, name);\n // Now set the contents of this file to the new file name\n this.setParameterValue(name);\n }\n catch(MalformedURLException mue)\n {\n throw new StyxException(urlStr + \" is not a valid URL\");\n }\n }\n }\n }\n else\n {\n // A value hasn't been set\n if (op.required())\n {\n throw new StyxException(this.name + \" is a required parameter:\" +\n \" a value must be set\");\n }\n }\n }\n }", "protected void validateNewFiles(java.lang.String[] param){\r\n \r\n }", "public abstract String getPropertyFile();", "@java.lang.Override\n public boolean hasFilePath() {\n return ((bitField0_ & 0x00000008) != 0);\n }", "void setPropertiesFile(File file);", "@Override\n\tpublic boolean checkExistFile(String aFilePath) {\n\t\treturn eDao.checkExistFile(aFilePath);\n\t}", "protected void validateFile() {\r\n\t\tFile f = new File(FileUltil.joinPath(dOutputFolder, dFileName));\r\n\t\tif (f.exists() && !f.isDirectory()) {\r\n\t\t\tdFileName = \"Copy of \" + dFileName;\r\n\t\t\tvalidateFile();\r\n\t\t}\r\n\t}", "private static String verifyPath(String fileOrDir) {\n if (!new File(fileOrDir).exists()) {\n if (fileOrDir.startsWith(File.separator) || fileOrDir.startsWith(\"\\\\\") || fileOrDir.startsWith(\"/\")) {\n fileOrDir = systemDataDirectory + fileOrDir;\n } else {\n fileOrDir = systemDataDirectory + File.separator + fileOrDir;\n }\n }\n return fileOrDir;\n }", "File getPropertiesFile();", "private void getPropValues() {\n Properties prop = new Properties();\n \n InputStream inputStream = getClass().getClassLoader().getResourceAsStream(propFileName);\n try {\n prop.load(inputStream);\n } catch (IOException ex) {\n Logger.getLogger(PropResources.class.getName()).log(Level.SEVERE, null, ex);\n }\n if (inputStream == null) {\n try {\n throw new FileNotFoundException(\"ERROR: property file '\" + propFileName + \"' not found in the classpath\");\n } catch (FileNotFoundException ex) {\n Logger.getLogger(PropResources.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n // get property values\n this.defaultDirectory = prop.getProperty(\"defaultDirectory\");\n this.topicsFile = this.defaultDirectory + prop.getProperty(\"topics\");\n this.scripturesFile = this.defaultDirectory + prop.getProperty(\"scriptures\");\n this.defaultJournalXML = this.defaultDirectory + prop.getProperty(\"defaultJournalXML\");\n this.defaultJournalTxt = this.defaultDirectory + prop.getProperty(\"defaultJournalTxt\");\n }", "public static boolean readFromFile()\n\t{\n\t\ttry (BufferedReader bufferedReader = new BufferedReader(new FileReader(SAVE_LOCATION)))\n\t\t{\n\t\t\t// Stores the value of the current line in the file\n\t\t\tString currentLine = null;\n\t\t\t\n\t\t\t// Stores the alias and value separated by the \":\"\n\t\t\tString[] lineSplit;\n\t\t\t\n\t\t\t// Stores the alias and value from the line into their own variable\n\t\t\tString alias, value;\n\t\t\t\n\t\t\twhile ((currentLine = bufferedReader.readLine()) != null)\n\t\t\t{\n\t\t\t\t// Ignore the line if it starts with a comment\n\t\t\t\tif (currentLine.startsWith(COMMENT)) continue;\n\t\t\t\t\n\t\t\t\t// Gets the alias and value from either side of the \":\"\n\t\t\t\tlineSplit = currentLine.split(\":\");\n\t\t\t\t\n\t\t\t\t// Ignore if line is incorrectly formatted\n\t\t\t\tif (lineSplit.length == 0) continue;\n\t\t\t\t\n\t\t\t\t// Gets the alias and value of the line to store in the property\n\t\t\t\t// Removes any unnecessary trailing spaces and converts to lower case\n\t\t\t\talias = lineSplit[0].trim().toLowerCase();\n\t\t\t\tvalue = lineSplit[1].trim().toLowerCase();\n\t\t\t\t\n\t\t\t\t// Gets the current property object\n\t\t\t\t// Associated from the alias found on the current line\n\t\t\t\tProperty property = CustomCrosshairMod.INSTANCE.getCrosshair().properties.get(alias);\n\t\t\t\t\n\t\t\t\t// Checks whether there is a property with the current alias\n\t\t\t\tif (property != null)\n\t\t\t\t{\n\t\t\t\t\t// Updates the property value with the new value from the config file\n\t\t\t\t\tCustomCrosshairMod.INSTANCE.getCrosshair().properties.set(alias, property.setValue(value));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public static boolean storeProperties(String filename, Properties properties) {\n\n try {\n FileOutputStream out = new FileOutputStream(filename);\n if (properties != null) {\n properties.store(out, null);\n }\n out.close();\n return true;\n } catch (Exception e) {\n // Do nothing\n return false;\n }\n\n }", "protected void validateProperty(String name, PolylineMapObject line) throws RuntimeException {\n if (line.getProperties().get(name) == null)\n throw new RuntimeException(\"Property '\" + name + \"' not found when loading platform\");\n\n String value = line.getProperties().get(name).toString();\n\n /*if (value == null)\n throw new RuntimeException(\"Property '\" + name + \"' must be != NULL\");*/\n\n if (value.trim().length() == 0)\n throw new RuntimeException(\"Property '\" + name + \"' cannot be empty\");\n }", "private static void isValid(Map<String, Set<String>> propertiesGroupedBy, String key) {\n stringPredicate = s -> {\n final String property = PropertiesUtil.getInstance().getProperty(s);\n return (property == null || property.isEmpty());\n };\n\n //but you can write more predicates as per your needs\n\n\n final Optional<String> optional = propertiesGroupedBy.get(key).stream().filter(stringPredicate).findFirst();\n\n if (optional.isPresent()) {\n try {\n throw new Exception(optional.get() + \" value is null or empty \");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "@SuppressWarnings(\"IfStatementWithIdenticalBranches\")\n public final String getPropertyFromFile(final String key) {\n final var file = this.getPropertyCatalog();\n String data = \"\";\n File prop = new File(file);\n if (!prop.exists() || prop.length() == 0) {\n data = \"Refuse.Missing property file.\";\n } else {\n try (BufferedReader reader = new BufferedReader(\n new FileReader(file))) {\n String line;\n while ((line = reader.readLine()) != null) {\n if (line.contains(\"=\") && line.contains(key)) {\n if (line.split(\"=\").length >= 2) {\n data = line.split(\"=\")[1];\n break;\n } else {\n data = \"abuse parameter.\";\n break;\n }\n }\n }\n } catch (IOException e) {\n data = \"Refuse.Mistake in-out property file.\";\n }\n }\n return data;\n }", "protected boolean verifyPath(PathUtils.ResolvedDestination resolvedDest, String destPath) {\n if (resolvedDest==null) {\r\n showErrorDialog(Translator.get(\"invalid_path\", destPath), errorDialogTitle);\r\n return false;\r\n }\r\n return true;\r\n \t}", "@Test\r\n public void setRuntimePropertiesFileNameTest() {\r\n try {\r\n runtimeConfigDAOPropertiesFile.setRuntimePropertiesFilename(runtimeConfigDAOPropertiesFile.getRuntimePropertiesFilename());\r\n } catch (RuntimeConfigInitialisationException e) {\r\n Assert.fail(\"The file should have been created OK.\");\r\n }\r\n }", "private void check() {\n Path pathroot = getPath();\n // check the path is file or directory\n checkFileOrDirectory(pathroot);\n }", "public void validate() throws org.apache.thrift.TException {\n if (File != null) {\n File.validate();\n }\n }", "void btnValidateFile(File file);", "@Test\n public void testBadFile() {\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"non-json.json\");\n Properties logProps = new Properties(defaults);\n logProps.setProperty(PRE + \"redactor.policy.rules\",\n resourcePath + \"/non-json.json\");\n PropertyConfigurator.configure(logProps);\n Logger log = Logger.getLogger(RedactorAppenderTest.class);\n log.info(\"This is a test\");\n }", "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 Optional<Path> getOptionalPathProperty(String propertyName) {\n if(propertiesMap.containsKey(propertyName)) {\n Path path = Paths.get(propertiesMap.get(propertyName));\n if(Files.isReadable(path)) {\n return Optional.of(path);\n }\n }\n System.out.println(\"Property name \" + propertyName + \" is invalid\");\n return Optional.empty();\n }", "private boolean loadPropertiesDefinition()\n\t{\n\t\tString dname = org.apache.commons.io.FilenameUtils.concat(Paths.docDir,\n\t\t\t\torg.apache.commons.io.FilenameUtils.concat(lan.isoName, \"Lexical Analysis\"));\n\t\tString pname = org.apache.commons.io.FilenameUtils.concat(dname, \"_properties.def\");\n\t\tString errmessage = null;\n\t\tRefObject<String> errmessageRef = new RefObject<String>(errmessage);\n\t\tif (!loadCategoryPropertiesFeatures(pname, errmessageRef))\n\t\t{\n\t\t\terrmessage = errmessageRef.argvalue;\n\t\t\tJOptionPane.showMessageDialog(Launcher.getDesktopPane(), \"Warning: \" + errmessage, \"NooJ WARNING\",\n\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean isLenientProperties() {\n return true;\n }", "@Test\n void nonEXistingFile () {\n assertThatThrownBy(()-> testObj.parseMap(\"no file\")).isInstanceOf(PacmanConfigurationException.class);\n }", "private void validateReflexMapFile(String mapToCheck) throws FileNotFoundException\n {\n //Initialize the map scanner\n reflexValidator = new Scanner(new File(mapToCheck));\n\n if (reflexValidator.next().contains(\"reflex\"))\n {\n reflexValidated = true;\n System.out.println(\"\\nThis is a valid Reflex Arena map file\");\n }\n\n else\n {\n System.out.println(\"\\nThis is not a Reflex Arena map file\");\n }\n }", "public abstract boolean isPath();", "private void check()\n {\n Preconditions.checkArgument(name != null, \"Property name missing\");\n Preconditions.checkArgument(valueOptions != null || valueMethod != null, \"Value method missing\");\n Preconditions.checkArgument(\n !(this.validationRegex != null && this.valueOptions != null && this.valueOptionsMustMatch),\n \"Cant have regexp validator and matching options at the same time\");\n\n if (required == null)\n {\n /*\n If a property has a default value, the common case is that it's required.\n However, we need to allow for redundant calls of required(): defaultOf(x).required();\n and for unusual cases where a property has a default value but it's optional: defaultOf(x).required(false).\n */\n required = this.defaultValue != null;\n }\n\n if (description == null)\n description = \"Property name: \" + name + \", required = \" + required;\n\n if (valueOptions != null && defaultValue != null)\n {\n for (PropertySpec.Value v : valueOptions)\n {\n if (v.value.equals(defaultValue.value))\n v.isDefault = true;\n }\n }\n\n if (dependsOn != null)\n {\n if (category == null)\n throw new IllegalArgumentException(\"category required when dependsOn is set \" + name);\n\n if (!dependsOn.isOptionsOnly())\n throw new IllegalArgumentException(\n \"Invalid dependsOn propertySpec (must be optionsOnly) \" + dependsOn.name());\n }\n }", "boolean hasFileInfo();", "boolean hasFileInfo();", "public File isCompleteOrError(File dir, String property) throws Exception {\r\n return isComplete(dir,property);\r\n }", "private boolean load(Properties properties) {\n\t\tlog.info(\"Looking for config file api.properties\");\n\n\t try {\n\t // properties.load(new FileReader(cfg));\n\t\t \tInputStream is = getClass().getClassLoader().getResourceAsStream(\"api.properties\");\n\t\t \tif(is != null && is.available() > 0) {\n\t\t properties.load(is);\n\t\t return true;\n\t\t \t}\n\t } catch (IOException e) {\n\t \t\tthrow new IllegalStateException(\"Could not load file \", e);\n\t }\n\n\t\tlog.warn(\"Could not find api.properties\");\n\t\treturn false;\n\t}", "private static void loadPropertiesFile() {\n checkNotNull(propertyFileName, \"propertyFileName cannot be null\");\n String currentDir = new File(\"\").getAbsolutePath();\n propertyFile = currentDir + \"/\" + propertyFileName;\n File propFile = new File(propertyFile);\n try {\n propFile.createNewFile();\n } catch (IOException ex) {\n Debugger.logMessage(ex);\n }\n\n props = new Properties();\n try {\n FileInputStream fis = new FileInputStream(propertyFile);\n props.load(fis);\n fis.close();\n } catch (IOException ex) {\n Debugger.logMessage(ex);\n }\n }", "public boolean isValidFile(RandomAccessFile raf) throws IOException {\n // need a fast failure for non-GRADS files\n if (GradsDataDescriptorFile.failFast(raf))\n return false;\n raf.seek(0);\n\n // we think its a GRADS file, but we have lots of restrictions on what we can handle\n try {\n gradsDDF = new GradsDataDescriptorFile(raf.getLocation(), 5000);\n if (gradsDDF.error)\n return false;\n\n GradsDimension x = gradsDDF.getXDimension();\n GradsDimension y = gradsDDF.getYDimension();\n // J-\n\n return gradsDDF.getDataType() == null && // only handle raw binary\n gradsDDF.getDataFile() != null && !gradsDDF.hasProjection() && // can't handle projections\n !gradsDDF.getVariables().isEmpty() && // must have valid entries\n !gradsDDF.getDimensions().isEmpty() && (x.getSize() > 1) && (y.getSize() > 1); // can't handle cross sections\n // J+\n } catch (Exception ioe) {\n return false;\n }\n }", "private static Properties resolveLogFiles(final Properties logProps) {\n\n Properties filteredProps = new Properties();\n\n for(String key : logProps.stringPropertyNames()) {\n if(key.endsWith(\".File\")) {\n String filename = logProps.getProperty(key);\n if(filename.startsWith(\"/\")) {\n filteredProps.put(key, filename);\n } else {\n filteredProps.put(key, systemInstallDir() + filename);\n }\n } else {\n filteredProps.put(key, logProps.getProperty(key));\n }\n }\n\n return filteredProps;\n }", "private boolean isValidPath(String path) {\n File file = new File(path);\n return file.exists() && file.isDirectory();\n }", "private boolean comparePathAttribute(String value, List<String> includePaths) {\n\t\treturn false;\r\n\t}", "public void validate() throws ValidationException {\r\n\r\n // unmapped request and image dirs are only used by LC, no validation needed\r\n\r\n // mapped image dir validation\r\n\r\n File useDir = (mapImageDir != null) ? mapImageDir : imageDir;\r\n\r\n // expand file into ascending list of files\r\n LinkedList list = new LinkedList();\r\n while (useDir != null) {\r\n list.addFirst(useDir);\r\n useDir = useDir.getParentFile();\r\n }\r\n\r\n // the first must be the UNC marker; cf. FileMapper.getRoot\r\n if ( ! ((File) list.removeFirst()).getPath().equals(\"\\\\\\\\\") ) throw new ValidationException(Text.get(this,\"e6\"));\r\n\r\n // the second is the UNC share name\r\n if (list.isEmpty()) throw new ValidationException(Text.get(this,\"e7\"));\r\n list.removeFirst();\r\n // no validation here; it can contain at least IP dots, possibly more\r\n\r\n // the rest must satisfy the strict rule\r\n while ( ! list.isEmpty() ) {\r\n File file = (File) list.removeFirst();\r\n if (ruleStrict.matcher(file.getName()).find()) throw new ValidationException(Text.get(this,\"e8\"));\r\n }\r\n\r\n // other validations\r\n\r\n if (ruleAlpha.matcher(prefix).find()) throw new ValidationException(Text.get(this,\"e3\"));\r\n\r\n if (useDigits < NDIGIT_ORDER_MIN) throw new ValidationException(Text.get(this,\"e4\",new Object[] { Convert.fromInt(NDIGIT_ORDER_MIN) }));\r\n\r\n if (prefix.length() + useDigits > NDIGIT_TOTAL_MAX) throw new ValidationException(Text.get(this,\"e5\",new Object[] { Convert.fromInt(NDIGIT_TOTAL_MAX) }));\r\n\r\n MappingUtil.validate(mappings);\r\n }", "private boolean readFileProperties()\n {\n boolean propertiesServidorCorrecto = false;\n boolean propertiesClienteCorrecto = true;\n try\n {\n InputStream fis = null;\n Properties properties = null;\n File archivo = null;\n // LEE PROPERTIES DEL SERVIDOR\n fis = \n this.getClass().getResourceAsStream(\"/PtoVentaServ.properties\");\n //25.01.2008 ERIOS Se lee la ruta del parametro\n if( fis == null)\n {\n log.info(\"No leyo archivo\");\n //archivo = new File(\"AdmCentralServ.properties\");\n archivo = new File(prop1);\n fis = new FileInputStream(archivo);\n log.info(\"\" + archivo);\n }\n if (fis != null)\n {\n properties = new Properties();\n properties.load(fis);\n FarmaVariables.vCodGrupoCia = \n properties.getProperty(\"CodigoGrupoCompania\");\n //log.debug(\"FarmaVariables.vCodGrupoCia=\" + FarmaVariables.vCodGrupoCia);\n FarmaVariables.vCodCia = properties.getProperty(\"CodigoCompania\");\n FarmaVariables.vCodLocal = properties.getProperty(\"CodigoLocal\");\n //log.debug(\"FarmaVariables.vCodLocal=\" + FarmaVariables.vCodLocal);\n FarmaVariables.vImprReporte = \n properties.getProperty(\"ImpresoraReporte\");\n //log.debug(\"FarmaVariables.vImprReporte=\" + FarmaVariables.vImprReporte);\n FarmaVariables.vIPBD = properties.getProperty(\"IpServidor\");\n /**\n * Se comento para cargarlos junto con la clave\n * @author dubilluz\n * @since 13.10.2007\n */\n /*\n FarmaVariables.vSID = properties.getProperty(\"SID\");\n //log.debug(\"FarmaVariables.vSID=\" + FarmaVariables.vSID);\n if(FarmaVariables.vSID == null)\n FarmaVariables.vSID = ConstantsPtoVenta.SID;\n\n //FarmaVariables.vUsuarioBD = FarmaEncripta.desencripta(properties.getProperty(\"UsuarioBD\"));\n FarmaVariables.vUsuarioBD = properties.getProperty(\"UsuarioBD\");\n //log.debug(\"FarmaVariables.vUsuarioBD=\" + FarmaVariables.vUsuarioBD);\n if(FarmaVariables.vUsuarioBD == null)\n FarmaVariables.vUsuarioBD = ConstantsPtoVenta.USUARIO_BD;\n */\n log.info(\"cargo properties servidor ptoventa\");\n\n propertiesServidorCorrecto = true;\n }\n else\n {\n FarmaUtility.showMessage(myparent, \n \"Archivo de Configuracion del Servidor no Encontrado.\\nPóngase en contacto con el área de sistemas.\", \n null);\n log.info(\"NO cargo properties servidor ptoventa\");\n propertiesServidorCorrecto = false;\n }\n if (propertiesServidorCorrecto && propertiesClienteCorrecto)\n return true;\n else\n return false;\n }\n catch (FileNotFoundException fnfException)\n {\n log.error(\"\",fnfException);\n FarmaUtility.showMessage(myparent, \n \"Archivo de Configuracion del Servidor no Encontrado.\\nPóngase en contacto con el área de sistemas.\", \n null);\n }\n catch (IOException ioException)\n {\n log.error(\"\",ioException);\n FarmaUtility.showMessage(myparent, \n \"Error al leer archivo de Configuracion.\\nPóngase en contacto con el área de sistemas.\", \n null);\n }\n myparent.dispose();\n return false;\n }", "public static void main(String... args) {\n // lookup a file sspecified in the properties file\n String propertyName = \"PPI_INTACT_FILE\";\n String filePath = FrameworkPropertyService.INSTANCE.getStringProperty(propertyName);\n edu.jhu.fcriscu1.als.graphdb.util.AsyncLoggingService.logInfo(\"Property: \" +propertyName +\" value: \"+filePath);\n // look up a resource file\n propertyName = \"TEST_PROACT_ADVERSE_EVENT_FILE\";\n FrameworkPropertyService.INSTANCE.getOptionalResourcePath(propertyName)\n .ifPresent(path -> System.out.println(\"Resource path = \" +path.toString()));\n // look up bad property - should get error message\n propertyName = \"XXXXXXXXXX\";\n String badValue = FrameworkPropertyService.INSTANCE.getStringProperty(propertyName);\n }", "@Override\n public void validateEntity() {\n if ((Strings.isNullOrEmpty(this.getIdentity()) &&\n Strings.isNullOrEmpty(this.getFileSystemPath())) ||\n Strings.isNullOrEmpty(this.getSourceId())) {\n throw new IllegalArgumentException(\n \"Either the Entity Id or file system path used\" +\n \" to generate the id must be present along with the source id\");\n }\n }", "public void testNonEmptyMultiPropFind() throws Exception\n {\n String content = TestUtils.getFileContent();\n String file = TestUtils.getFileName();\n String[] propValues =\n new String[]{\"No sacrifice is too great in the service of freedom.\",\n \"Freedom is the right of all sentient beings.\"};\n\n Node node =\n TestUtils.addContent(session, file, new ByteArrayInputStream(content.getBytes()), WEBDAV_NT_FILE,\n WEBDAV_NT_RESOURCE, CONTENT_TYPE);\n\n // set multi-valued property\n node.getNode(\"jcr:content\").setProperty(WEBDAV_TEST_PROPERTY, propValues);\n session.save();\n\n MultivaluedMap<String, String> headers = new MultivaluedMapImpl();\n headers.add(HttpHeaders.CONTENT_TYPE, CONTENT_TYPE);\n\n ContainerResponse responseFind =\n service(WebDAVMethods.PROPFIND, getPathWS() + file, \"\", headers, multiPropFindXML.getBytes());\n assertEquals(HTTPStatus.MULTISTATUS, responseFind.getStatus());\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n PropFindResponseEntity entity = (PropFindResponseEntity)responseFind.getEntity();\n entity.write(outputStream);\n String find = outputStream.toString();\n assertTrue(\"Response should contain requested property element.\", find.contains(WEBDAV_TEST_PROPERTY));\n assertTrue(\"Property element should contain value data.\",\n find.contains(\"No sacrifice is too great in the service of freedom.\"));\n }", "private ActionMessages validateFormValues(UploadForm fileForm) {\n\n ActionMessages messages = new ActionMessages();\n\n FormFile file = fileForm.getFile();\n // retrieve the file name\n String fileName = file.getFileName().toLowerCase();\n\n if (!fileName.equals(\"\")) {\n if (!fileName.endsWith(\"jpg\") && !fileName.endsWith(\"jpeg\")\n && !fileName.endsWith(\"gif\")) {\n\n messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\n \"label.upload.image\", true));\n }\n }\n\n if (!fileName.equals(\"\")) {\n\n if (file.getFileSize() > 50000) {\n messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\n \"upload.image.size\", true));\n\n }\n }\n\n if (fileName.equals(\"\")) {\n\n messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(\n \"label.upload.emplty\"));\n }\n\n return messages;\n }", "private boolean directoryContainsConfig(File file) {\n return Arrays.asList(file.list()).contains(\"config.properties\");\n }", "@Override\n public boolean doCheck() {\n logger.debug(\" check if destination file exists: \" + strDestFile);\n if (strDestFile != null) {\n if (new File(strDestFile).exists()) {\n return true;\n }\n }\n return false;\n }", "private void testReadFile() {\n System.out.println(\"------ TESTING : readFile(String filename) ------\");\n try{\n if(iTestFileList.readFile(sFile)){\n //throw exception if the values are not copied correctly\n if(iTestFileList.get(0) != 42175){\n throw new RuntimeException(\"FAILED -> readFile(String filename) not working correctly\");\n }\n if(iTestFileList.get(5) != 45545){\n throw new RuntimeException(\"FAILED -> readFile(String filename) not working correctly\");\n }\n if(iTestFileList.get(10) != 86908) {\n throw new RuntimeException(\"FAILED -> readFile(String filename) not working correctly\");\n }\n }\n else{\n throw new RuntimeException(\"FAILED -> readFile(String filename) not working correctly\");\n }\n }catch(RuntimeException e){\n System.out.print(e.getMessage());\n }\n System.out.print(\"\\n\");\n }", "public boolean validarDireccion() {\n\t\treturn direccion != null;\n\t}", "private String getRequiredProperty(Properties props, String key) {\r\n\t\tString value = props.getProperty(key);\r\n\t\tif ((value == null) || (value.trim().length() == 0)) {\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Property file must provide a value for '\" + key + \"'\");\r\n\t\t}\r\n\t\treturn value;\r\n\t}", "private boolean checkFileExists(String fPath) {\n\t\tFile file = new File(fPath);\n\t\treturn file.exists();\n\t}" ]
[ "0.60541797", "0.5847205", "0.57613534", "0.5610022", "0.5584552", "0.5560153", "0.55392236", "0.55214244", "0.5456956", "0.5452689", "0.54101634", "0.54071903", "0.5363234", "0.53299284", "0.5318159", "0.5291902", "0.52888024", "0.52708894", "0.52400684", "0.518831", "0.5177151", "0.5172142", "0.5171142", "0.51517457", "0.51507914", "0.51403195", "0.5125097", "0.5125097", "0.5125097", "0.5125097", "0.510642", "0.50905156", "0.5085755", "0.5060512", "0.50551814", "0.50361633", "0.503598", "0.50331795", "0.5028944", "0.5022806", "0.50224227", "0.50143516", "0.4996724", "0.498832", "0.4984137", "0.4973931", "0.49498442", "0.49280378", "0.49271202", "0.49251524", "0.48976204", "0.48954386", "0.48864684", "0.48788086", "0.48681453", "0.4858209", "0.4849539", "0.4840387", "0.48334867", "0.4832669", "0.48262656", "0.4824854", "0.4823989", "0.48204908", "0.48172367", "0.48141065", "0.48100957", "0.4802458", "0.48019743", "0.47954175", "0.4791304", "0.47881427", "0.4786564", "0.4786166", "0.47801968", "0.4746708", "0.47411156", "0.47404456", "0.47385532", "0.4732909", "0.4732909", "0.47315288", "0.47272536", "0.4723238", "0.4715342", "0.4714218", "0.47140795", "0.47123477", "0.47093534", "0.47015324", "0.47003937", "0.46975362", "0.46957722", "0.4694594", "0.46838763", "0.46807796", "0.46785662", "0.46767178", "0.46746236", "0.46739167" ]
0.6192028
0
strictly tests whether the system property exists and if the type is correct
public static void addCheck(String property, CHECK check) { HealthCheck.checks.put(property, new CheckState(check)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object getPropertyexists();", "String getPropertyExists();", "@Override\r\n public boolean isSystemProperty() throws Exception\r\n {\n return false;\r\n }", "boolean hasProperty();", "boolean hasProperty();", "boolean hasProperty();", "boolean hasGetProperty();", "public boolean hasProperty( final String name )\n {\n return getPropertyClass( name ) != null;\n }", "@SuppressWarnings({ \"static-method\", \"nls\" })\n @Test\n public final void testGetSystemProperty()\n {\n TestEasyPropertiesObject object = new TestEasyPropertiesObject();\n if (object.getOperatingSystemName().isEmpty())\n {\n fail(\"System property: os.name should not be empty!\");\n }\n }", "boolean hasPropertyLike(String name);", "boolean hasProperty(String propertyName);", "public abstract boolean getProperty(String propertyName);", "boolean hasSetProperty();", "boolean hasPropType();", "boolean hasProperty2();", "boolean hasProperty0();", "boolean hasProperty1();", "public boolean isProperty();", "protected abstract boolean isSupportedTestType(Properties prop);", "boolean hasProperty(String key);", "boolean hasValue(PropertyValue<?, ?> value);", "boolean containsProperty(String name);", "@Override\n\t\tpublic boolean hasProperty(String key) {\n\t\t\treturn false;\n\t\t}", "public boolean existsProperty(String name)\r\n\t{\r\n\t\treturn obtainOntProperty(name) != null;\r\n\t}", "public boolean hasProperty( String key );", "@Override\n public boolean hasProperty(final String relPath) {\n return false;\n }", "@Override\n public boolean knownProperty(final QName tag) {\n if (propertyNames.get(tag) != null) {\n return true;\n }\n\n // Not ours\n return super.knownProperty(tag);\n }", "@Override\n public boolean knownProperty(final QName tag) {\n if (propertyNames.get(tag) != null) {\n return true;\n }\n\n // Not ours\n return super.knownProperty(tag);\n }", "public void testGetProperty()\n {\n assertEquals(\"MSM Extension not present, or incorrect specification version -\", MSM_SPECIFICATION_VERSION,\n System.getProperty(MSM_PROPERTY_NAME));\n }", "@Override\n public boolean isResolvableAs(Class<?> clazz) throws ContextInitializationException {\n return clazz == null ? false : clazz.isAssignableFrom(Properties.class);\n }", "default <T> boolean hasProperty(ProjectEntity entity, Class<? extends PropertyType<T>> propertyTypeClass) {\n return !getProperty(entity, propertyTypeClass).isEmpty();\n }", "boolean propertyExists(Object name) throws JMSException;", "public static boolean hasProperty(String propID)\n throws DBException\n {\n SystemProps.Key propKey = new SystemProps.Key(propID);\n return propKey.exists();\n }", "private static void checkSystemProperties() \n\tthrows ArgumentMissingException {\n\n\t\tif (System.getProperty(\"properties\") == null) {\n\t\t\tthrow new ArgumentMissingException(\n\t\t\t\t\t\"Please specify the path to the properties file, \" +\n\t\t\t\"e.g. using -Dproperties=/path/to/file.\");\t\t\t\n\t\t}\n\n\t\tif (System.getProperty(\"gold\") == null) {\n\t\t\tthrow new ArgumentMissingException(\n\t\t\t\t\t\"Please specify the path to the Gold trees, \" +\n\t\t\t\"e.g. using -Dgold=/path/to/file.\");\n\t\t}\n\n\t\tif (System.getProperty(\"test\") == null) {\n\t\t\tthrow new ArgumentMissingException(\n\t\t\t\t\t\"Please specify the path to the Test trees, \" +\n\t\t\t\"e.g. using -Dtest=/path/to/file.\");\n\t\t}\t\t\n\n\t}", "private static boolean hasProperty(int settings, int property){\n\t\tint bit = 0; // log2(property)\n\t\twhile ((property >>= 1) > 0) bit ++;\n\t\treturn ItFromBit.getTheBit(settings, bit);\n\t}", "protected boolean isSupportedProperty(String propertyName, Namespace namespace) {\n if (!WebdavConstants.DAV_NAMESPACE.equals(namespace)) {\n return true;\n }\n \n return DAV_PROPERTIES.contains(propertyName);\n }", "private JSType getPropertyType(JSType objType, String propName, Node n, FlowScope scope) {\nJSType unknownType = getNativeType(UNKNOWN_TYPE);\n JSType propertyType = null;\n boolean isLocallyInferred = false;\n // Scopes sometimes contain inferred type info about qualified names.\nString qualifiedName = n.getQualifiedName();\n StaticSlot<JSType> var = scope.getSlot(qualifiedName);\n if (var != null) {\n JSType varType = var.getType();\n if (varType != null) {\n boolean isDeclared = !var.isTypeInferred();\n isLocallyInferred = (var != syntacticScope.getSlot(qualifiedName));\n if (isDeclared || isLocallyInferred) {\n propertyType = varType;\n }\n }\n }\n if (propertyType == null && objType != null) {\n JSType foundType = objType.findPropertyType(propName);\n if (foundType != null) {\n propertyType = foundType;\n }\n }\n if ((propertyType == null || propertyType.isUnknownType()) && qualifiedName != null) {\n // If we find this node in the registry, then we can infer its type.\nObjectType regType = ObjectType.cast(registry.getType(qualifiedName));\n if (regType != null) {\n propertyType = regType.getConstructor();\n }\n }\n if (propertyType == null) {\n return getNativeType(UNKNOWN_TYPE);\n } else if (propertyType.equals(unknownType) && isLocallyInferred) {\n return getNativeType(CHECKED_UNKNOWN_TYPE);\n } else {\n return propertyType;\n }\n }", "abstract boolean hasXMLProperty(XMLName name);", "SystemPropertiesType createSystemPropertiesType();", "public boolean hasProperty(String name) {\n return properties.has(name);\n }", "private boolean isValueAProperty(String name)\n {\n int openIndex = name.indexOf(\"${\");\n\n return openIndex > -1;\n }", "public static boolean checkPropertyExists(String propertyName) {\n\t\treturn CatPawConfig.getConfig().containsKey(propertyName);\n\n\t}", "@Override\r\n\tpublic boolean propertyExists(String absPath) throws RepositoryException {\n\t\treturn false;\r\n\t}", "Object getPropertytrue();", "boolean hasStoredType();", "public void verify()\n\t{\n\t\ttry\n\t\t{\n\t\t\tClass<?> propertyType = descriptor.getPropertyType();\n\t\t\t// delegate first to the provided type factory to create a type\n\t\t\t// instance\n\t\t\tObject propertyInstance = typeFactory.create(propertyType);\n\t\t\tif (propertyInstance == null)\n\t\t\t{\n\t\t\t\tpropertyInstance = createInstanceOfType(propertyType);\n\t\t\t}\n\t\t\tif (propertyInstance == null)\n\t\t\t{\n\t\t\t\t// Use Mockito to mock the property\n\t\t\t\t// TODO Use the Reflection API's Proxy instead\n\t\t\t\tpropertyInstance = mock(propertyType);\n\t\t\t}\n\t\t\tif (propertyInstance == null)\n\t\t\t{\n\t\t\t\tfail(\"Failed to create a mock object of type\" + propertyType.getName());\n\t\t\t}\n\n\t\t\t// Setup\n\t\t\tObject system = typeFactory.create(type);\n\t\t\tif (system == null)\n\t\t\t{\n\t\t\t\tsystem = type.newInstance();\n\t\t\t}\n\n\t\t\t// Execute\n\t\t\tMethod writeMethod = descriptor.getWriteMethod();\n\t\t\tMethod readMethod = descriptor.getReadMethod();\n\t\t\twriteMethod.invoke(system, propertyInstance);\n\t\t\tObject actualObject = readMethod.invoke(system, (Object[]) null);\n\n\t\t\t// Verify\n\t\t\tassertEquals(String.format(\"Verification failed for property %s\", descriptor.getName()), propertyInstance,\n\t\t\t\t\tactualObject);\n\t\t}\n\t\tcatch (IllegalAccessException illegalEx)\n\t\t{\n\t\t\tlogger.error(null, illegalEx);\n\t\t\tfail(\"Verification failed for property:\" + descriptor.getName());\n\t\t}\n\t\tcatch (InstantiationException instanceEx)\n\t\t{\n\t\t\tlogger.error(null, instanceEx);\n\t\t\tfail(\"Verification failed for property:\" + descriptor.getName());\n\t\t}\n\t\tcatch (InvocationTargetException invokeEx)\n\t\t{\n\t\t\tlogger.error(null, invokeEx);\n\t\t\tfail(\"Verification failed for property:\" + descriptor.getName());\n\t\t}\n\t}", "protected boolean isAPropertyType(Class<?> clazz) {\n return AnyProperty.class.isAssignableFrom(clazz);\n }", "@Override\n public boolean isPropertySupported(String name) {\n // !!! TBI: not all these properties are really supported\n return mConfig.isPropertySupported(name);\n }", "private boolean isAdditionalPorperty(String propertyName)\n\t{\n\t\tif (propertyName == null)\n\t\t\treturn false;\n\t\t\n\t\treturn (!(this.definedPropertyKeys.contains(propertyName)));\n\t}", "private boolean hasCorrespondingReadProperty(Method paramMethod, Class paramClass, String paramString) {\n/* 268 */ String str = paramMethod.getName();\n/* 269 */ Class[] arrayOfClass = paramMethod.getParameterTypes();\n/* 270 */ boolean bool = false;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ try {\n/* 276 */ String str1 = str.replaceFirst(\"set\", paramString);\n/* 277 */ Method method = paramClass.getMethod(str1, new Class[0]);\n/* */ \n/* */ \n/* */ \n/* 281 */ bool = (isPropertyAccessorMethod(method, paramClass) && method.getReturnType() == arrayOfClass[0]) ? true : false;\n/* */ }\n/* 283 */ catch (Exception exception) {}\n/* */ \n/* */ \n/* */ \n/* 287 */ return bool;\n/* */ }", "public boolean isPropertyMissing() {\n \t\t\t\t\t\t\t\t\treturn false;\n \t\t\t\t\t\t\t\t}", "public boolean isProperty(String classPath, String fieldName)\n throws EnhancerMetaDataUserException, EnhancerMetaDataFatalError\n {\n final JDOField field = getJDOField(classPath, fieldName);\n return (field != null && field.isProperty());\n }", "public abstract boolean isAllowCustomProperties();", "private static boolean hasPropertyV2(int settings, int property){\n\t\tint bit = -1;\n\t\twhile (property > 0) {\n\t\t\tproperty >>= 1;\n\t\t\tbit ++;\n\t\t}\n\t\treturn ItFromBit.getTheBit(settings, bit);\n\t}", "private static boolean validateFileExists(Map.Entry<String, CheckState> entry) {\n String prop = System.getProperty(entry.getKey());\n if (entry.getValue().isOptional && prop == null) {\n return true;\n }\n\n if (prop == null || \"\".equals(prop)) {\n return false;\n }\n\n return Files.exists(new File(prop).toPath());\n }", "public <T> T expectProperty(String name, Class<T> type) {\n return getProperty(name, type).orElseThrow(() -> new IllegalArgumentException(String.format(\n \"Property `%s` is not part of %s, `%s`\", name, getClass().getSimpleName(), this)));\n }", "private boolean readHasCorrespondingIsProperty(Method paramMethod, Class paramClass) {\n/* 294 */ return false;\n/* */ }", "@Test\n public void testResolveWithSysPropResolver() {\n Resolver sysPropResolver = VariableExpansion.SYS_PROP_RESOLVER;\n\n assertNull(\"System property value unexpectedly set already\", System.getProperty(testPropName));\n assertNull(\"Expected resolve to return null as property not set\", sysPropResolver.resolve(testPropName));\n\n setTestSystemProperty(testPropName, testPropValue);\n\n assertEquals(\"System property value not as expected\", testPropValue, System.getProperty(testPropName));\n assertEquals(\"Resolved variable not as expected\", testPropValue, sysPropResolver.resolve(testPropName));\n }", "protected void validateProperty(String name, PolylineMapObject line) throws RuntimeException {\n if (line.getProperties().get(name) == null)\n throw new RuntimeException(\"Property '\" + name + \"' not found when loading platform\");\n\n String value = line.getProperties().get(name).toString();\n\n /*if (value == null)\n throw new RuntimeException(\"Property '\" + name + \"' must be != NULL\");*/\n\n if (value.trim().length() == 0)\n throw new RuntimeException(\"Property '\" + name + \"' cannot be empty\");\n }", "public void testIsCompatible() {\n System.out.println(\"isCompatible\"); // NOI18N\n \n TypeID requiredType = TYPEID_JAVA_LANG_STRING; // NOI18N\n PropertyValue instance = TypesSupport.createStringValue(FirstCD.PROPERTY_TEST); // NOI18N\n boolean expResult = true;\n boolean result = instance.isCompatible(requiredType);\n \n assertEquals(expResult, result);\n }", "boolean hasSetting(Setting<?> setting);", "public boolean hasProperty(Contribution contrib, String property) {\n // update, updates, updatable, upgrade\n if (property.startsWith(\"updat\") || property.startsWith(\"upgrad\")) {\n return hasUpdates(contrib);\n }\n if (property.startsWith(\"instal\") && !property.startsWith(\"installabl\")) {\n return contrib.isInstalled();\n }\n if (property.equals(\"tool\")) {\n return contrib.getType() == Contribution.Type.TOOL;\n }\n if (property.startsWith(\"lib\")) {\n return contrib.getType() == Contribution.Type.LIBRARY\n || contrib.getType() == Contribution.Type.LIBRARY_COMPILATION;\n }\n if (property.equals(\"mode\")) {\n return contrib.getType() == Contribution.Type.MODE;\n }\n if (property.equals(\"compilation\")) {\n return contrib.getType() == Contribution.Type.LIBRARY_COMPILATION;\n }\n \n return false;\n }", "private boolean isPropertyRelevant(String property) {\n return relevantProperties == null || relevantProperties.contains(property);\n }", "public boolean hasProperty() {\n return !properties.isEmpty();\n }", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();" ]
[ "0.71395284", "0.70160574", "0.6998735", "0.6857051", "0.6857051", "0.6857051", "0.68162477", "0.6778554", "0.66539854", "0.6652424", "0.66156316", "0.6607704", "0.6600254", "0.6582983", "0.65602344", "0.6541984", "0.65371835", "0.6484719", "0.64405", "0.63512355", "0.63463455", "0.6319439", "0.6312933", "0.6261486", "0.62571114", "0.62412", "0.6172787", "0.6172787", "0.6162341", "0.61480284", "0.61291176", "0.6122563", "0.61171865", "0.6116405", "0.60705817", "0.60564893", "0.60514355", "0.6041911", "0.6040067", "0.6015054", "0.60106266", "0.6008042", "0.5973523", "0.5963722", "0.59488106", "0.5941359", "0.5929856", "0.5929605", "0.592376", "0.5916413", "0.59014946", "0.5897067", "0.5880448", "0.5872971", "0.58603483", "0.58425653", "0.5840594", "0.5812405", "0.57735777", "0.57618135", "0.5760038", "0.5738399", "0.57360643", "0.5728834", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688", "0.5689688" ]
0.0
-1
does the same as addCheck, but the actual check onto system property is only performed in case it is set within the system properties in that case it is just validated as non optional properties
public static void addOptionalCheck(String property, CHECK check) { HealthCheck.checks.put(property, new CheckState(check, true)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void check()\n {\n Preconditions.checkArgument(name != null, \"Property name missing\");\n Preconditions.checkArgument(valueOptions != null || valueMethod != null, \"Value method missing\");\n Preconditions.checkArgument(\n !(this.validationRegex != null && this.valueOptions != null && this.valueOptionsMustMatch),\n \"Cant have regexp validator and matching options at the same time\");\n\n if (required == null)\n {\n /*\n If a property has a default value, the common case is that it's required.\n However, we need to allow for redundant calls of required(): defaultOf(x).required();\n and for unusual cases where a property has a default value but it's optional: defaultOf(x).required(false).\n */\n required = this.defaultValue != null;\n }\n\n if (description == null)\n description = \"Property name: \" + name + \", required = \" + required;\n\n if (valueOptions != null && defaultValue != null)\n {\n for (PropertySpec.Value v : valueOptions)\n {\n if (v.value.equals(defaultValue.value))\n v.isDefault = true;\n }\n }\n\n if (dependsOn != null)\n {\n if (category == null)\n throw new IllegalArgumentException(\"category required when dependsOn is set \" + name);\n\n if (!dependsOn.isOptionsOnly())\n throw new IllegalArgumentException(\n \"Invalid dependsOn propertySpec (must be optionsOnly) \" + dependsOn.name());\n }\n }", "private static void checkSystemProperties() \n\tthrows ArgumentMissingException {\n\n\t\tif (System.getProperty(\"properties\") == null) {\n\t\t\tthrow new ArgumentMissingException(\n\t\t\t\t\t\"Please specify the path to the properties file, \" +\n\t\t\t\"e.g. using -Dproperties=/path/to/file.\");\t\t\t\n\t\t}\n\n\t\tif (System.getProperty(\"gold\") == null) {\n\t\t\tthrow new ArgumentMissingException(\n\t\t\t\t\t\"Please specify the path to the Gold trees, \" +\n\t\t\t\"e.g. using -Dgold=/path/to/file.\");\n\t\t}\n\n\t\tif (System.getProperty(\"test\") == null) {\n\t\t\tthrow new ArgumentMissingException(\n\t\t\t\t\t\"Please specify the path to the Test trees, \" +\n\t\t\t\"e.g. using -Dtest=/path/to/file.\");\n\t\t}\t\t\n\n\t}", "@Override\r\n public boolean isSystemProperty() throws Exception\r\n {\n return false;\r\n }", "public void doRequiredCheck() {\n\t\tthis.checkValue(listener);\n\t}", "public static void main(String[] args){\n PropertiesDemo.check();\n }", "private static void processValidation(boolean passed, String property, CHECK check) {\n if (!passed) {\n LOG.error(\"'{}' failed in {} validation\", property, check);\n HealthCheck.setFailed();\n } else {\n LOG.info(\"'{}' passed\", property);\n }\n }", "boolean hasSetProperty();", "protected void doExtraValidation(Properties props) {\n /* nothing by default */\n }", "@SuppressWarnings({ \"static-method\", \"nls\" })\n @Test\n public final void testGetSystemProperty()\n {\n TestEasyPropertiesObject object = new TestEasyPropertiesObject();\n if (object.getOperatingSystemName().isEmpty())\n {\n fail(\"System property: os.name should not be empty!\");\n }\n }", "Object getPropertyexists();", "boolean hasProperty();", "boolean hasProperty();", "boolean hasProperty();", "protected void validateProperty(String name, PolylineMapObject line) throws RuntimeException {\n if (line.getProperties().get(name) == null)\n throw new RuntimeException(\"Property '\" + name + \"' not found when loading platform\");\n\n String value = line.getProperties().get(name).toString();\n\n /*if (value == null)\n throw new RuntimeException(\"Property '\" + name + \"' must be != NULL\");*/\n\n if (value.trim().length() == 0)\n throw new RuntimeException(\"Property '\" + name + \"' cannot be empty\");\n }", "boolean hasProperty2();", "private void processPropValidators() {\n getMethodsWithAnnotation(component, PropValidator.class).forEach(method -> {\n PropValidator propValidator = method.getAnnotation(PropValidator.class);\n\n if (!TypeName.get(method.getReturnType()).equals(TypeName.BOOLEAN)) {\n printError(\"Method \"\n + method.getSimpleName()\n + \" annotated with PropValidator must return a boolean.\");\n }\n\n String exposedMethodName = exposeExistingJavaMethodToJs(method);\n String propertyName = propValidator.value();\n optionsBuilder.addStatement(\"options.addJavaPropValidator(p.$L, $S)\",\n exposedMethodName,\n propertyName);\n });\n }", "private static boolean validateBoolean(Map.Entry<String, CheckState> entry) {\n String prop = System.getProperty(entry.getKey());\n if (entry.getValue().isOptional && prop == null) {\n return true;\n }\n return Boolean.TRUE.toString().equals(prop) || Boolean.FALSE.toString().equals(prop);\n }", "String getPropertyExists();", "private static boolean validateFileExists(Map.Entry<String, CheckState> entry) {\n String prop = System.getProperty(entry.getKey());\n if (entry.getValue().isOptional && prop == null) {\n return true;\n }\n\n if (prop == null || \"\".equals(prop)) {\n return false;\n }\n\n return Files.exists(new File(prop).toPath());\n }", "private static boolean validateString(Map.Entry<String, CheckState> entry) {\n String prop = System.getProperty(entry.getKey());\n if (entry.getValue().isOptional && prop == null) {\n return true;\n }\n return prop != null && !\"\".equals(prop);\n }", "public abstract boolean isAllowCustomProperties();", "boolean hasPropertyLike(String name);", "protected boolean validateProperties() throws IOException, Throwable {\n return (disableDNS() &&\n rebootAndWait(\"all\") &&\n changeProps() &&\n enableDNS() &&\n rebootAndWait(\"all\"));\n }", "@Override\n public void afterPropertiesSet() {\n validateProperties();\n }", "boolean hasProperty1();", "@Override\n\t\tpublic void validate() throws ValidationError {\n\t\t\tif (newValueOfPropertyToChange < 0) {\n\t\t\t\tthrow new TestFailure(\"propertyToChange is not ok\");\n\t\t\t}\n\t\t}", "public static void addCheck(String property, CHECK check) {\n HealthCheck.checks.put(property, new CheckState(check));\n }", "private static void checkRequiredProperties()\n\t{\n\t\tfor (ServerProperty prop : ServerProperty.values())\n\t\t{\n\t\t\tif (prop.isRequired())\n\t\t\t{\n\t\t\t\t// TODO\n//\t\t\t\tswitch (prop)\n//\t\t\t\t{\n//\t\t\t\t\tcase GERMINATE_AVAILABLE_PAGES:\n//\t\t\t\t\t\tSet<Page> availablePages = getSet(prop, Page.class);\n//\t\t\t\t\t\tif (CollectionUtils.isEmpty(availablePages))\n//\t\t\t\t\t\t\tthrowException(prop);\n//\t\t\t\t\t\tbreak;\n//\n//\t\t\t\t\tcase GERMINATE_USE_AUTHENTICATION:\n//\t\t\t\t\t\tboolean useAuthentication = getBoolean(prop);\n//\t\t\t\t\t\tif (useAuthentication)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tif (StringUtils.isEmpty(get(ServerProperty.GERMINATE_GATEKEEPER_SERVER)))\n//\t\t\t\t\t\t\t\tthrowException(ServerProperty.GERMINATE_GATEKEEPER_SERVER);\n//\t\t\t\t\t\t\tif (StringUtils.isEmpty(get(ServerProperty.GERMINATE_GATEKEEPER_NAME)))\n//\t\t\t\t\t\t\t\tthrowException(ServerProperty.GERMINATE_GATEKEEPER_NAME);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tbreak;\n//\n//\t\t\t\t\tcase GERMINATE_GATEKEEPER_REGISTRATION_ENABLED:\n//\t\t\t\t\t\tboolean registrationNeedsGatekeeper = getBoolean(prop);\n//\n//\t\t\t\t\t\tif (registrationNeedsGatekeeper)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tString gatekeeperUrl = get(ServerProperty.GERMINATE_GATEKEEPER_URL);\n//\n//\t\t\t\t\t\t\tif (StringUtils.isEmpty(gatekeeperUrl))\n//\t\t\t\t\t\t\t\tthrowException(ServerProperty.GERMINATE_GATEKEEPER_URL);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tbreak;\n//\n//\t\t\t\t\tdefault:\n\t\t\t\tif (StringUtils.isEmpty(get(prop)))\n\t\t\t\t\tthrowException(prop);\n//\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void checkAssert(final Consumer<T> property);", "protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please specify a configuration\");\n else {\n \t\t//TODO add more checks\n \t\tok();\n }\n }", "public void check() throws XMLBuildException {\r\n\t\tif (this.attribute == null) \r\n\t\t\tthrow new XMLBuildException(\"you must set the attribute\", this);\r\n\t}", "public static void validateProperty(RuleTemplateProperty ruleTemplateProperty) throws TemplateManagerException { //todo: conversion null pointer exception\n if (ruleTemplateProperty.getDefaultValue() == null) {\n // todo: throw exception\n }\n if (ruleTemplateProperty.getType().equals(\"option\") && (ruleTemplateProperty.getOptions() == null || ruleTemplateProperty.getOptions().size() < 1)) {\n // todo: throw exception\n }\n }", "public boolean setPropertyValue(String propName, String value) {\n System.setProperty(propName, value);\n return true;\n }", "void setManualCheck (boolean value);", "void validateProperties() {\n super.validateProperties();\n validatePropertySet(\"token\", getToken());\n }", "@Override\n\tpublic void check() {\n\t\t\n\t}", "@Override\n\tpublic void check() {\n\t\t\n\t}", "@Override\n\t@NotDbField\n\tpublic void check() throws ApiRuleException {\n\t\t\n\t}", "@Override\n\t@NotDbField\n\tpublic void check() throws ApiRuleException {\n\t\t\n\t}", "@Override\n\t@NotDbField\n\tpublic void check() throws ApiRuleException {\n\t\t\n\t}", "boolean hasProperty0();", "public void check(final Predicate<T> property);", "public void verify()\n\t{\n\t\ttry\n\t\t{\n\t\t\tClass<?> propertyType = descriptor.getPropertyType();\n\t\t\t// delegate first to the provided type factory to create a type\n\t\t\t// instance\n\t\t\tObject propertyInstance = typeFactory.create(propertyType);\n\t\t\tif (propertyInstance == null)\n\t\t\t{\n\t\t\t\tpropertyInstance = createInstanceOfType(propertyType);\n\t\t\t}\n\t\t\tif (propertyInstance == null)\n\t\t\t{\n\t\t\t\t// Use Mockito to mock the property\n\t\t\t\t// TODO Use the Reflection API's Proxy instead\n\t\t\t\tpropertyInstance = mock(propertyType);\n\t\t\t}\n\t\t\tif (propertyInstance == null)\n\t\t\t{\n\t\t\t\tfail(\"Failed to create a mock object of type\" + propertyType.getName());\n\t\t\t}\n\n\t\t\t// Setup\n\t\t\tObject system = typeFactory.create(type);\n\t\t\tif (system == null)\n\t\t\t{\n\t\t\t\tsystem = type.newInstance();\n\t\t\t}\n\n\t\t\t// Execute\n\t\t\tMethod writeMethod = descriptor.getWriteMethod();\n\t\t\tMethod readMethod = descriptor.getReadMethod();\n\t\t\twriteMethod.invoke(system, propertyInstance);\n\t\t\tObject actualObject = readMethod.invoke(system, (Object[]) null);\n\n\t\t\t// Verify\n\t\t\tassertEquals(String.format(\"Verification failed for property %s\", descriptor.getName()), propertyInstance,\n\t\t\t\t\tactualObject);\n\t\t}\n\t\tcatch (IllegalAccessException illegalEx)\n\t\t{\n\t\t\tlogger.error(null, illegalEx);\n\t\t\tfail(\"Verification failed for property:\" + descriptor.getName());\n\t\t}\n\t\tcatch (InstantiationException instanceEx)\n\t\t{\n\t\t\tlogger.error(null, instanceEx);\n\t\t\tfail(\"Verification failed for property:\" + descriptor.getName());\n\t\t}\n\t\tcatch (InvocationTargetException invokeEx)\n\t\t{\n\t\t\tlogger.error(null, invokeEx);\n\t\t\tfail(\"Verification failed for property:\" + descriptor.getName());\n\t\t}\n\t}", "public void testGetProperty()\n {\n assertEquals(\"MSM Extension not present, or incorrect specification version -\", MSM_SPECIFICATION_VERSION,\n System.getProperty(MSM_PROPERTY_NAME));\n }", "boolean containsProperty(String name);", "boolean hasProperty(String propertyName);", "@Override\n public boolean isPropertySupported(String name) {\n // !!! TBI: not all these properties are really supported\n return mConfig.isPropertySupported(name);\n }", "public boolean hasProperty( final String name )\n {\n return getPropertyClass( name ) != null;\n }", "protected void check(String name, Object value) {\n\t\tcheck(name,value,false);\n\t}", "private static void addProperty(HashMap<String, DefinedProperty> propSet, String name, DefinedPropertyType type, String defaultValue, int usage, boolean hidden, boolean userDefined) {\n if (propSet.containsKey(name))\n \tOrdt.errorMessage(\"invalid user-defined property name \" + name + \" specified\");\n else putProperty(propSet, name, type, defaultValue, usage, hidden, userDefined);\n\t}", "private static void registerToSystem() {\n Enumeration<?> enumeration = properties.propertyNames();\r\n while (enumeration.hasMoreElements()) {\r\n String name = (String) enumeration.nextElement();\r\n String value = properties.getProperty(name);\r\n if (value != null) {\r\n System.setProperty(name, value);\r\n }\r\n }\r\n\t}", "boolean hasGetProperty();", "@Override\r\n protected boolean validateSystemSettings() {\n return true;\r\n }", "@Override\n\tpublic void checkPropertyConfiguration() throws IOException, CustomizedException {\n\t\tString conf=PropertyReader.getProperty(\"configuration\");\n\t\tString\tfileName=\"\";\n\t\tconfiguration=conf;\n\t\tif(conf == null || conf.isEmpty())\n\t\t{\n\t\t\tthrow new CustomizedException(\"Configuration property is not set,it must be set to 1 or 2 \");\n\n\t\t}\n\t\tif(conf.equals(\"1\"))\n\t\t{\n\t\t\titeration=1;\n\t\t\tfileName=PropertyReader.getProperty(\"anagram_file\");\n\t\t\n\t\t\tif(fileName == null || fileName.isEmpty())\n\t\t\t{\n\t\t\t\tthrow new CustomizedException(\"Filename property is not set,it must be set to sample against the key anagramFile \");\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if(conf.equals(\"2\"))\n\t\t{\n\t\t\titeration=Integer.parseInt(PropertyReader.getProperty(\"load_testing_iteration\"));\n\t\t\tfileName=PropertyReader.getProperty(\"large_file\");\n\t\t\tif(fileName == null || fileName.isEmpty())\n\t\t\t{\n\t\t\t\tthrow new CustomizedException(\"Filename property is not set,it must be bigFile against the key largeFile \");\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tthis.fileName=fileName;\n\t\t\n\t}", "boolean hasValue(PropertyValue<?, ?> value);", "@Override\n\t\tpublic boolean hasProperty(String key) {\n\t\t\treturn false;\n\t\t}", "public void checkValid() throws StyxException\n {\n if (this.getJSAPParameter() instanceof Option)\n {\n Option op = (Option)this.getJSAPParameter();\n if (this.valueSet)\n {\n if (this.param.getInputFile() != null)\n {\n // This parameter represents an input file. See if this is a URL\n // and if so, download it\n // TODO: if this is not a URL, check that it exists\n String str = this.getParameterValue();\n if (str.startsWith(URL_PREFIX))\n {\n // This could be a URL\n String urlStr = str.substring(URL_PREFIX.length());\n try\n {\n URL url = new URL(urlStr);\n File urlPath = new File(url.getPath());\n // TODO: be cleverer about file names, particularly\n // watching out for name clashes\n String name = urlPath.getName().equals(\"\") ? \"random.dat\" : urlPath.getName();\n this.instance.downloadFrom(url, name);\n // Now set the contents of this file to the new file name\n this.setParameterValue(name);\n }\n catch(MalformedURLException mue)\n {\n throw new StyxException(urlStr + \" is not a valid URL\");\n }\n }\n }\n }\n else\n {\n // A value hasn't been set\n if (op.required())\n {\n throw new StyxException(this.name + \" is a required parameter:\" +\n \" a value must be set\");\n }\n }\n }\n }", "public abstract void setCheck(Boolean check);", "public void setValidatorProperty(String property) {\n _validatorProperty = property;\n }", "PropertyRule createPropertyRule();", "public void setExpression(Expression nullCheck) {\n \tif (nullCheck != null && nullCheck instanceof PropertyName) {\n this.nullCheck = nullCheck;\n } else {\n throw new IllegalFilterException(\"PropertyName expression required\");\n }\n }", "protected void validate() throws Exception{\t\n\t\tsuper.validate();\n\t\tvalidateProperty(PROPERTY_KEY_USERNAME);\n\t}", "public boolean hasProperty(Contribution contrib, String property) {\n // update, updates, updatable, upgrade\n if (property.startsWith(\"updat\") || property.startsWith(\"upgrad\")) {\n return hasUpdates(contrib);\n }\n if (property.startsWith(\"instal\") && !property.startsWith(\"installabl\")) {\n return contrib.isInstalled();\n }\n if (property.equals(\"tool\")) {\n return contrib.getType() == Contribution.Type.TOOL;\n }\n if (property.startsWith(\"lib\")) {\n return contrib.getType() == Contribution.Type.LIBRARY\n || contrib.getType() == Contribution.Type.LIBRARY_COMPILATION;\n }\n if (property.equals(\"mode\")) {\n return contrib.getType() == Contribution.Type.MODE;\n }\n if (property.equals(\"compilation\")) {\n return contrib.getType() == Contribution.Type.LIBRARY_COMPILATION;\n }\n \n return false;\n }", "@Test\n public void testResolveWithSysPropResolver() {\n Resolver sysPropResolver = VariableExpansion.SYS_PROP_RESOLVER;\n\n assertNull(\"System property value unexpectedly set already\", System.getProperty(testPropName));\n assertNull(\"Expected resolve to return null as property not set\", sysPropResolver.resolve(testPropName));\n\n setTestSystemProperty(testPropName, testPropValue);\n\n assertEquals(\"System property value not as expected\", testPropValue, System.getProperty(testPropName));\n assertEquals(\"Resolved variable not as expected\", testPropValue, sysPropResolver.resolve(testPropName));\n }", "@Override\n\tpublic void check() throws ApiRuleException {\n\t\t\n\t}", "boolean hasProperty(String key);", "@Override\n\t\tprotected boolean initializeSpecificProperties(Component c, AWTEvent introspectionRequestEvent,\n\t\t\t\tTestEditor testEditor) {\n\t\t\tif (c instanceof CustomComponent) {\n\t\t\t\texpectpedValueOfPropertyToCheck = ((CustomComponent) c).propertyToCheck;\n\t\t\t\tnewValueOfPropertyToChange = ((CustomComponent) c).propertyToChange + 1;\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "private static boolean allowAddCheckOrder(Group group,\n \t\t\tQName propertyName, final DefinitionGroup groupDef) {\n \t\tboolean before = true;\n \t\t\n \t\tCollection<? extends ChildDefinition<?>> children = DefinitionUtil.getAllChildren(groupDef);\n \t\t\n \t\tfor (ChildDefinition<?> childDef : children) {\n \t\t\tif (childDef.getName().equals(propertyName)) {\n \t\t\t\tbefore = false;\n \t\t\t}\n \t\t\telse {\n \t\t\t\t// ignore XML attributes\n \t\t\t\tif (childDef.asProperty() != null && childDef.asProperty().getConstraint(XmlAttributeFlag.class).isEnabled()) {\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t// ignore groups that contain no elements\n \t\t\t\tif (childDef.asGroup() != null && !StreamGmlHelper.hasElements(childDef.asGroup())) {\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tif (before) {\n \t\t\t\t\t// child before the property\n \t\t\t\t\t// the property may only be added if all children before are valid in their cardinality\n \t\t\t\t\tif (!isValidCardinality(group, childDef)) {\n \t\t\t\t\t\treturn false;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\t// child after the property\n \t\t\t\t\t// the property may only be added if there are no values for children after the property\n \t\t\t\t\tObject[] values = group.getProperty(childDef.getName());\n \t\t\t\t\tif (values != null && values.length > 0) {\n \t\t\t\t\t\treturn false;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t\t// no fail -> allow add\n \t\treturn true;\n \t}", "public void validateComponent() throws org.apache.ant.common.util.ExecutionException {\n if (name == null) {\n throw new org.apache.ant.common.util.ExecutionException(\"\\\"name\\\" attribute of \" + \"<property> must be supplied\");\n }\n if (value == null) {\n throw new org.apache.ant.common.util.ExecutionException(\"\\\"value\\\" attribute of \" + \"<property> must be supplied\");\n }\n }", "T setSystemProperty(String key, String value);", "abstract boolean hasXMLProperty(XMLName name);", "private static boolean validateInteger(Map.Entry<String, CheckState> entry) {\n String prop = System.getProperty(entry.getKey());\n if (entry.getValue().isOptional && prop == null) {\n return true;\n }\n try {\n Integer.parseInt(prop);\n } catch (NumberFormatException e) {\n return false;\n }\n return !\"\".equals(prop);\n }", "private static boolean hasProperty(int settings, int property){\n\t\tint bit = 0; // log2(property)\n\t\twhile ((property >>= 1) > 0) bit ++;\n\t\treturn ItFromBit.getTheBit(settings, bit);\n\t}", "private void validateProperties() throws BuildException {\r\n if (this.port == null || this.port.length() == 0) {\r\n throw new BuildException(\"Attribute 'port' must be set.\");\r\n }\r\n if (this.depotPath == null || this.depotPath.length() == 0) {\r\n throw new BuildException(\"Attribute 'repositoryUrl' must be set.\");\r\n }\r\n if (this.userName == null || this.userName.length() == 0) {\r\n throw new BuildException(\"Attribute 'userName' must be set.\");\r\n }\r\n if (this.password == null || this.password.length() == 0) {\r\n throw new BuildException(\"Attribute 'password' must be set.\");\r\n }\r\n if (this.depotPath == null || this.depotPath.length() == 0) {\r\n throw new BuildException(\"Attribute 'repositoryUrl' must be set.\");\r\n }\r\n if (this.p4ExecutablePath == null || this.p4ExecutablePath.length() == 0) {\r\n throw new BuildException(\"Attribute 'p4ExecutablePath' must be set.\");\r\n }\r\n File p4Executable = new File(this.p4ExecutablePath);\r\n if (!p4Executable.exists()) {\r\n throw new BuildException(\"Attribute 'p4ExecutablePath' \" + this.p4ExecutablePath +\r\n \" does not appear to point to an actual file.\");\r\n }\r\n \r\n // If default* is specified, then all should be specified. \r\n if (((this.defaultHackystatAccount != null) || \r\n (this.defaultHackystatPassword != null) ||\r\n (this.defaultHackystatSensorbase != null)) &&\r\n ((this.defaultHackystatAccount == null) || \r\n (this.defaultHackystatPassword == null) ||\r\n (this.defaultHackystatSensorbase == null))) {\r\n throw new BuildException (\"If one of default Hackystat account, password, or sensorbase \" +\r\n \"is specified, then all must be specified.\");\r\n }\r\n \r\n // Check to make sure that defaultHackystatAccount looks like a real email address.\r\n if (!ValidateEmailSyntax.isValid(this.defaultHackystatAccount)) {\r\n throw new BuildException(\"Attribute 'defaultHackystatAccount' \" + this.defaultHackystatAccount\r\n + \" does not appear to be a valid email address.\");\r\n }\r\n \r\n // If fromDate and toDate not set, we extract commit information for the previous day.\r\n if (this.fromDateString == null && this.toDateString == null) {\r\n Day previousDay = Day.getInstance().inc(-1);\r\n this.fromDate = new Date(previousDay.getFirstTickOfTheDay() - 1);\r\n this.toDate = new Date(previousDay.getLastTickOfTheDay());\r\n }\r\n else {\r\n try {\r\n if (this.hasSetToAndFromDates()) {\r\n this.fromDate = new Date(Day.getInstance(this.dateFormat.parse(this.fromDateString))\r\n .getFirstTickOfTheDay() - 1);\r\n this.toDate = new Date(Day.getInstance(this.dateFormat.parse(this.toDateString))\r\n .getLastTickOfTheDay());\r\n }\r\n else {\r\n throw new BuildException(\r\n \"Attributes 'fromDate' and 'toDate' must either be both set or both not set.\");\r\n }\r\n }\r\n catch (ParseException ex) {\r\n throw new BuildException(\"Unable to parse 'fromDate' or 'toDate'.\", ex);\r\n }\r\n\r\n if (this.fromDate.compareTo(this.toDate) > 0) {\r\n throw new BuildException(\"Attribute 'fromDate' must be a date before 'toDate'.\");\r\n }\r\n }\r\n }", "@SuppressWarnings({ \"unchecked\", \"cast\" })\n @Override\n protected boolean addPropertyDefs(@SuppressWarnings(\"unused\")\n Object obj, String propName, Object pvalue, Map<String, Object> defs)\n {\n if (defs == null)\n throw new IllegalArgumentException(\"defs may not be null.\");\n\n if (pvalue instanceof String)\n {\n super.addPropertyDefs((String)pvalue, null, defs);\n }\n else if (pvalue instanceof List)\n {\n addFixmePropertyDefsForList(propName, (List)pvalue, defs);\n }\n else if (pvalue instanceof Map)\n {\n addPropertyDefsForMap(propName, pvalue, null, defs);\n }\n return true;\n }", "public abstract boolean getProperty(String propertyName);", "public boolean hasProperty( String key );", "private boolean isValueAProperty(String name)\n {\n int openIndex = name.indexOf(\"${\");\n\n return openIndex > -1;\n }", "@Override\n public boolean knownProperty(final QName tag) {\n if (propertyNames.get(tag) != null) {\n return true;\n }\n\n // Not ours\n return super.knownProperty(tag);\n }", "@Override\n public boolean knownProperty(final QName tag) {\n if (propertyNames.get(tag) != null) {\n return true;\n }\n\n // Not ours\n return super.knownProperty(tag);\n }", "public boolean isProperty();", "Object getPropertytrue();", "@Override\r\n\tpublic boolean checkValidity() {\n\t\treturn false;\r\n\t}", "protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please specify at least one component\");\n else {\n \t\t//TODO add more checks\n \t\tok();\n }\n }", "@Test\n\tpublic void testPropertyIntegralType() {\n\t\tfinal Base base = context.mock(Base.class);\n\t\tcontext.checking(new PropertyEnabledExpectations() {\n\t\t\t{\n\t\t\t\tallowingProperty(base).isValid();\n\t\t\t\twill(returnValue(true));\n\t\t\t}\n\t\t});\n\n\t\tassertTrue(\"Initial value was not set\", base.isValid());\n\t\tbase.setValid(false);\n\t\tassertFalse(\"Value didn't change\", base.isValid());\n\t}", "public void _hasPropertyByName() {\n requiredMethod(\"getProperties()\");\n tRes.tested(\"hasPropertyByName()\",\n (\n (oObj.hasPropertyByName(IsThere.Name)) &&\n (!oObj.hasPropertyByName(\"Jupp\")) )\n );\n }", "public void verifyConfig() {\r\n if (getSpecialHandlingManager() == null)\r\n throw new ConfigurationException(\"The required property 'specialHandlingManager' is missing.\");\r\n }", "@Override\n public void checkConfiguration() {\n }", "private void addProperties() {\n\n\t\t/**\n\t\t * Add fusion.conf = src/test/resource\n\t\t */\n\t\tif (isPropertyRequired(\"fusion.conf.dir\")) {\n\t\t\texpect(bundleContextMock.getProperty(\"fusion.conf.dir\")).andReturn(\n\t\t\t\t\t\"src/test/resources/\").anyTimes();\n\t\t}\n\t\t/**\n\t\t * set fusion.process.dir\n\t\t */\n\t\tif (isPropertyRequired(\"fusion.process.dir\")) {\n\t\t\texpect(bundleContextMock.getProperty(\"fusion.process.dir\"))\n\t\t\t\t\t.andReturn(\"src/test/resources/\").anyTimes();\n\t\t}\n\n\t\t/**\n\t\t * set fusion.process.temp\n\t\t */\n\t\tif (isPropertyRequired(\"fusion.process.temp.dir\")) {\n\t\t\texpect(bundleContextMock.getProperty(\"fusion.process.temp.dir\"))\n\t\t\t\t\t.andReturn(\"src/test/resources/\").anyTimes();\n\t\t}\n\n\t\t/**\n\t\t * set fusion.home\n\t\t */\n\t\tif (isPropertyRequired(\"fusion.home\")) {\n\t\t\texpect(bundleContextMock.getProperty(\"fusion.home\")).andReturn(\n\t\t\t\t\t\"src/test/resources/\").anyTimes();\n\t\t}\n\t}", "private boolean isAdditionalPorperty(String propertyName)\n\t{\n\t\tif (propertyName == null)\n\t\t\treturn false;\n\t\t\n\t\treturn (!(this.definedPropertyKeys.contains(propertyName)));\n\t}", "@PostConstruct\n protected void checkInitialization() {\n ValidationUtility.checkNotNullNorEmpty(profileTaskCheckers, \"profileTaskCheckers\",\n ProfileActionConfigurationException.class);\n ValidationUtility.checkNotNullElements(profileTaskCheckers, \"profileTaskCheckers\",\n ProfileActionConfigurationException.class);\n }", "private static boolean hasPropertyV2(int settings, int property){\n\t\tint bit = -1;\n\t\twhile (property > 0) {\n\t\t\tproperty >>= 1;\n\t\t\tbit ++;\n\t\t}\n\t\treturn ItFromBit.getTheBit(settings, bit);\n\t}", "public void setiHaveCheck(boolean iHaveCheck) {\n this.iHaveCheck = iHaveCheck;\n }", "public boolean hasProperty(String name) {\n return properties.has(name);\n }", "@Test\n\tpublic void addProperty() {\n\t\tXMLTagParser.addNewElement(\"Person\");\n\t\tXMLTagParser.editElement(\"Person\", \"residence\", \"milan\");\n\n\t\tXMLTagParser.editProperty(\"Person\", \"residence\", \"isRenting\", \"false\");\n\t\tassertEquals(XMLTagParser.getPropertyValueFromTag(\"Person\", \"residence\", \"isRenting\"), \"false\");\n\t\tXMLTagParser.editProperty(\"Person\", \"residence\", \"hasGarage\", \"true\");\n\t\tassertEquals(XMLTagParser.getPropertyValueFromTag(\"Person\", \"residence\", \"hasGarage\"), \"true\");\n\t}", "@Override\n\tpublic boolean checkInput() {\n\t\treturn true;\n\t}", "static void checkKey(String firstProperty, String secondProperty) {\n firstProperty = firstProperty.toUpperCase();\n secondProperty = secondProperty.toUpperCase();\n if (!properties.contains(firstProperty) && !properties.contains(secondProperty)\n && !negativeProperties.contains(firstProperty) && !negativeProperties.contains(secondProperty)) {\n System.out.printf(\"The properties [%s, %s] are wrong.\\n\" +\n \"Available properties: %s%n\\n\", firstProperty, secondProperty, properties);\n Start.start();\n }\n }", "@Override\r\n\tpublic boolean CheckConditions() {\n\t\treturn true;\r\n\t}", "void calculateValidationRequirement() {\n this.elementRequiringJSR303Validation = Util.hasValidation(this.type);\n\n // Check for JSR 303 or @OnValidate annotations in default group\n if (Util.requiresDefaultValidation(this.type)) {\n this.requiresDefaultValidation = true;\n return;\n }\n\n // Check for any simple index uniqueness constraints\n if (!this.uniqueConstraintFields.isEmpty()) {\n this.requiresDefaultValidation = true;\n return;\n }\n\n // Check for any composite index uniqueness constraints\n if (!this.uniqueConstraintCompositeIndexes.isEmpty()) {\n this.requiresDefaultValidation = true;\n return;\n }\n }", "@Override\n public boolean hasProperty(final String relPath) {\n return false;\n }" ]
[ "0.659791", "0.6271391", "0.5994416", "0.59504354", "0.5930479", "0.59090716", "0.59075254", "0.5878256", "0.58511996", "0.5776337", "0.57424027", "0.57424027", "0.57424027", "0.57406396", "0.57048845", "0.5695074", "0.5685516", "0.5682613", "0.5643695", "0.55900997", "0.5590035", "0.55728793", "0.5557048", "0.55416995", "0.5509905", "0.548236", "0.54636073", "0.5458329", "0.543495", "0.5426311", "0.5410132", "0.54050815", "0.53898036", "0.53857076", "0.53742665", "0.53717524", "0.53717524", "0.5369964", "0.5369964", "0.5369964", "0.5357551", "0.53451174", "0.53451127", "0.5337756", "0.5335565", "0.531192", "0.53086406", "0.5304683", "0.5304468", "0.5298224", "0.5288086", "0.5283949", "0.5265307", "0.5241651", "0.5221234", "0.5213599", "0.5201615", "0.5191857", "0.5184828", "0.51813203", "0.51657873", "0.5147842", "0.5124973", "0.5122095", "0.51198745", "0.5114787", "0.5113662", "0.51081634", "0.5098569", "0.5090788", "0.5084994", "0.50763375", "0.5062585", "0.50601476", "0.50597966", "0.50551", "0.5051544", "0.50462794", "0.50418484", "0.50418484", "0.503437", "0.5033803", "0.500746", "0.49985832", "0.49928716", "0.49905416", "0.49891838", "0.49652165", "0.49597684", "0.4954478", "0.49524233", "0.4946859", "0.49462104", "0.4944035", "0.49438268", "0.4935547", "0.49280578", "0.4926743", "0.49166697", "0.49070084" ]
0.60683143
2
Logs and fails the test in cases a validation could not be passed
private static void processValidation(boolean passed, String property, CHECK check) { if (!passed) { LOG.error("'{}' failed in {} validation", property, check); HealthCheck.setFailed(); } else { LOG.info("'{}' passed", property); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testValidationFailed() {\n fail();\n }", "public void validationErr()\r\n\t{\n\t\tSystem.out.println(\"validation err\");\r\n\t}", "@Test\r\n\t public void feelingLucky() {\r\n\t \t Assert.fail();\r\n\t Assert.fail();\r\n\t }", "@Test\n public void testCantRegisterInvalidEmail() {\n enterValuesAndClick(\"\", \"invalidemail\", \"123456\", \"123456\");\n checkErrors(nameRequiredError, emailInvalidError, pwdNoError, pwdRepeatNoError);\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void EditViewLessthan15AcctsErrorValidation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether proper error message is displayed in view when continuing with out enabling the accounts check box\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvManageView\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t\t.clicktestacct();\n\t\t/*.ClickManageUserLink()\n\t\t.ManageViews()\n\t\t.VerifyEditviewname(userProfile)\n\t\t.EditViewNameErrorValidation(userProfile); \t \t\t\t\t\t\t \t \t\t\n\t}*/\n\t}", "@Test\n public void testFail() {\n fail();\n }", "@Test\n public void testCantRegisterMismatchPassword() {\n enterValuesAndClick(\"name\", \"[email protected]\", \"123456\", \"123478\");\n checkErrors(nameNoError, emailNoError, pwdsDoNotMatchError, pwdsDoNotMatchError);\n }", "@Test\n public void testFail(){\n fail(\"This is meant to fail\");\n }", "@Override\n\t\t\t\tpublic void doFail() {\n\t\t\t\t}", "@Test(priority = 2)\r\n\tpublic void invalidUserTest()\r\n\t{\r\n\t\tAdminDashboardPage adminPage=new AdminDashboardPage(driver);\r\n\t\tadminPage.clickUsersTab();\r\n\t\t\r\n\t\tUsersListViewPage ulPage=new UsersListViewPage(driver);\r\n\t\tulPage.clickNewUser();\r\n\r\n\t\tCreateNewUserPage crUserPage=new CreateNewUserPage(driver);\r\n\t\tcrUserPage.enterUserDetails(\"Kathy\",\"pass\",\"[email protected]\");\r\n\t\tcrUserPage.clickCreateUser();\r\n\t\t\r\n\t\t\r\n\t\tString expectedError=\"has already been taken\";\t\t\r\n\t\t\r\n\t\tString actualNameError=crUserPage.getUserNameErrorMessage().trim();\r\n\t\tAssert.assertEquals(actualNameError, expectedError);\t\r\n\t\t\r\n\t\t\r\n\t\tString actualEmailError= crUserPage.getEmailErrorMessage().trim();\r\n\t\tAssert.assertEquals(actualEmailError, expectedError);\r\n\t\t\r\n\t}", "@Test\n public void testCantRegisterValidEmailEmptyPassword() {\n enterValuesAndClick(\"\", \"[email protected]\", \"\", \"\");\n checkErrors(nameRequiredError, emailNoError, pwdRequiredError, pwdRepeatRequiredError);\n }", "@Override\n boolean canFail() {\n return true;\n }", "@Test\n\tpublic void testInvalidValidators() {\n\t\tProject project = new Project();\n\t\tproject.setEstimates(76);\n\t\tproject.setType(\"DOCSMANAGEYY\");\n\t\tSet<ConstraintViolation<Project>> constraintViolations = validator.validate(project);\n\t\tassertEquals(constraintViolations.size(), 2);\n\t}", "private static void testFail() throws Throwable {\n Scheduler userInt = SchedulerTHelper.getSchedulerInterface();\n\n for (int i = 0; i < jobs_fail; i++) {\n String job_path = new File(jobs_path.toURI()).getAbsolutePath() + \"/flow_fail_\" + (i + 1) +\n \".xml\";\n\n Exception exc = null;\n JobId job = null;\n try {\n job = userInt.submit(JobFactory.getFactory().createJob(job_path));\n } catch (Exception e) {\n exc = e;\n }\n Assert\n .assertTrue(\"Job \" + job_path + \" was supposed to be rejected but was created\",\n job == null);\n Assert.assertTrue(exc != null);\n }\n SchedulerTHelper.log(jobs_fail + \" invalid jobs successfully rejected\");\n }", "@Test\n public void testSaveUserWithoutParameterShouldValidated() throws Exception {\n mockMvc.perform(post(\"/save-user\"))\n .andExpect(status().isOk())\n .andDo(print())\n .andExpect(model().hasErrors())// checking model to ensure has errors\n .andExpect(model().attributeHasErrors(\"user\"))// checking the model name has errors\n .andExpect(model().attributeHasFieldErrors(\"user\", \"firstName\", \"lastName\")) // checking model has a field errors\n .andExpect(view().name(\"user-detail\"));//the url should still at the same\n\n }", "@Test\n public void testCantRegisterInvalidEmailShortPassword() {\n enterValuesAndClick(\"name\", \"invalidemail\", \"124\", \"\");\n checkErrors(nameNoError, emailInvalidError, pwdTooShortError, pwdRepeatRequiredError);\n }", "@Test(expected = IllegalArgumentException.class)\n public void testCheckPositiveFailure() {\n Helper.checkPositive(0, \"obj\", \"method\", LogManager.getLog());\n }", "@Test\n void fail_the_test() {\n }", "public abstract void\n fail(ValidationError error);", "public AlwaysFailsCheck() {\n this(\"Compulsory integrity failure\");\n }", "@Test\n public void testCheckValidity_InvalidFields() throws Exception {\n expectCheckValidityFailure(msg -> msg.setSource(null));\n \n // null protocol\n expectCheckValidityFailure(msg -> msg.setProtocol(null));\n \n // null or empty topic\n expectCheckValidityFailure_NullOrEmpty((msg, value) -> msg.setTopic(value));\n \n // null payload\n expectCheckValidityFailure(msg -> msg.setPayload(null));\n \n // empty payload should NOT throw an exception\n Forward forward = makeValidMessage();\n forward.setPayload(\"\");\n forward.checkValidity();\n \n // null or empty requestId\n expectCheckValidityFailure_NullOrEmpty((msg, value) -> msg.setRequestId(value));\n \n // invalid hop count\n expectCheckValidityFailure(msg -> msg.setNumHops(-1));\n }", "@Test\n public void loginWithEmptyName(){\n\n Assert.assertEquals(createUserChecking.creationChecking(\"\",email),\"APPLICATION ERROR #11\");\n log.info(\"Empty login and email \"+ email+\" were typed\");\n }", "@Test\n public void accuseFailTest() throws Exception {\n assertTrue(\"failure - accused status was not set to true\", target.isAccused());\n\n }", "@Test\n public void testInvalidInput() {\n LocalUserManager ua = new LocalUserManager();\n try {\n ua.createUser(\"gburdell1\", \"buzz\", \"[email protected]\", \"George\", \"Burdell\", \"SUPERHUMAN\");\n } catch (Exception e) {\n Assert.assertEquals(0, ua.getUsers().size());\n return;\n }\n Assert.fail();\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void readingGasErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify functionality of Gas reading dials and its appropriate error messages for non SAP-ISU customer\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGas\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Gas\")\n\t.validateGasreadingFiledErrormsg(smrProfile);\t\t\t\n}", "@Test(groups = { \"survey-creation\", \"all-tests\", \"key-tests\" })\r\n public void unsuccessfullyCreatedSurveyWhenEmailIsNotMappedAndClickSaveButton() throws Exception {\r\n\r\n log.startTest( \"LeadEnable: Verify that survey can not be created when Email is not mapped and you click Save button\" );\r\n unsuccessfullyCreateSurveyWhenSaving( true );\r\n log.endTest();\r\n }", "@Test\r\n\tpublic void testValidationSuccess() {\r\n\t\tAccountTransferRequest accountTransferRequest = new AccountTransferRequest();\r\n\t\taccountTransferRequest.setUsername(VALID_USERNAME);\r\n\t\taccountTransferRequest.setPassword(VALID_PASSWORD);\r\n\t\taccountTransferRequest.setSenderAccount(VALID_SENDER_ACCOUNT_NUMBER);\r\n\t\taccountTransferRequest.setReceiverAccount(VALID_RECEIVER_ACCOUNT_NUMBER);\r\n\t\taccountTransferRequest.setTransferAmount(400.0);\t\t\r\n\t\ttry {\r\n\t\t\ttransferValidationUnit.validate(accountTransferRequest);\r\n\t\t} catch (ValidationException e) {\r\n\t\t\tAssert.fail(\"Found_Exception\");\r\n\t\t}\r\n\t}", "@Test(groups = { \"survey-creation\", \"all-tests\", \"key-tests\" })\r\n public void unsuccessfullyCreatedSurveyWhenEmailIsNotMappedAndClickSaveAndContinueButton()\r\n throws Exception {\r\n\r\n log.startTest( \"LeadEnable: Verify that survey can not be created when Email is not mapped and you click Save and Continue to Theme button\" );\r\n unsuccessfullyCreateSurveyWhenSaving( false );\r\n log.endStep();\r\n }", "public TestCase fail();", "@Test\n\tpublic void testValidInvalidEstimtes() {\n\t\tProject project = new Project();\n\t\tproject.setEstimates(-1);\n\t\tproject.setType(\"DOCSMANAGE\");\n\t\tSet<ConstraintViolation<Project>> constraintViolations = validator.validate(project);\n\t\tassertEquals(constraintViolations.size(), 1);\n\t}", "public void validate() throws Exception {\n }", "@Override\n\tpublic void onTestFailure(ITestResult arg0) {\n\n\t}", "@Override\n boolean isFailed() {\n return false;\n }", "@Test\n public void testValidPassword() {\n String password = \"PassWord123\";\n\n try {\n User.validatePassword(password);\n } catch (IntelligenceIdentityException e) {\n fail(\"Password is ok, exception wrongly thrown, check implementation of password validation\");\n }\n\n }", "void onValidationFailed();", "@Override\r\n\tpublic void onTestFailure(ITestResult arg0) {\n\t\t\r\n\t}", "public void testFail1() throws Exception {\n helperFail(new String[] {\"j\", \"i\"}\r\n , new String[] {\"I\", \"I\"}\r\n , RefactoringStatus.ERROR);\r\n }", "@Override\n public void onTestFailure(ITestResult tr) {\n StatusPrinter.printTestFailure(tr);\n }", "@Test\n\tpublic void testCase2()\n\t{\n\t\tint numberOfCases=-1;\n\t\t\n\t\t//checking number of case is positive or not\n\t\tboolean valid=BillEstimation.numberOfCaseValidation(numberOfCases);\n\t\tassertFalse(valid);\n\t\t\n\t}", "@Test\t\t\n\tpublic void TestToFail()\t\t\t\t\n\t{\t\t\n\t System.out.println(\"This method to test fail\");\t\t\t\t\t\n\t // Assert.assertTrue(false);\t\t\t\n\t}", "@Test\n public void loginAsEmptyUser(){\n Assert.assertEquals(createUserChecking.creationChecking(\"\",\"\"),\"APPLICATION ERROR #11\");\n log.info(\"Empty login and email were typed\");\n }", "@Test\n void test010_addUsersDuplicateUserException() {\n // adding duplicate user --> DuplicateUserException\n\n }", "@Then(\"^validation error message should be displayed$\")\n public void verifyThatValidationErrorMessageIsDiplayed() {\n assertion.assertTrue(StoryBoard.validationError());\n }", "@Test\n public void findProductListExceptionTest(){\n }", "public void validate () { throw new RuntimeException(); }", "private static void testValid() throws Throwable {\n Scheduler userInt = SchedulerTHelper.getSchedulerInterface();\n\n for (int i = 0; i < jobs_valid; i++) {\n String job_path = new File(jobs_path.toURI()).getAbsolutePath() + \"/flow_valid_\" + (i + 1) +\n \".xml\";\n\n Exception exc = null;\n JobId job = null;\n try {\n job = userInt.submit(JobFactory.getFactory().createJob(job_path));\n } catch (Exception e) {\n exc = e;\n } finally {\n userInt.removeJob(job);\n }\n Assert.assertTrue(\"JobFactory returned null for valid job \" + job_path, job != null);\n Assert.assertTrue(\"JobFactory threw an exception for valid job \" + job_path, exc == null);\n }\n SchedulerTHelper.log(jobs_valid + \" valid jobs successfully created\");\n }", "public void printFailure() {\n //\n }", "@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 }", "@Test\n\tpublic void testValidInvalidEstimtesFib() {\n\t\tProject project = new Project();\n\t\tproject.setEstimates(10);\n\t\tproject.setType(\"DOCSMANAGE\");\n\t\tSet<ConstraintViolation<Project>> constraintViolations = validator.validate(project);\n\t\tassertEquals(constraintViolations.size(), 1);\n\t}", "public void performValidation() {\n/* 623 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void accuseSuccesTest() throws Exception {\n }", "@Test\n\tpublic void testValidInvalid() {\n\t\tProject project = new Project();\n\t\tproject.setEstimates(5);\n\t\tproject.setType(\"DOCSMANAGEYY\");\n\t\tSet<ConstraintViolation<Project>> constraintViolations = validator.validate(project);\n\t\tassertEquals(constraintViolations.size(), 1);\n\t}", "@Test(priority = 1)\n\tpublic void checkInvalidLogin() {\n\t\ttest = report.createTest(\"CheckInvalidLogin\");\n\t\t\n\t\tloginpage = loginpage.setLanguage(ChangeLanguageFields.ENGLISH);\n\t\ttest.log(Status.INFO, \"Set language\");\n\t\t\n\t\tloginpage = loginpage.unSuccessfullLogin(UserContainer.getInvalidData());\n\t\ttest.log(Status.INFO, \"Filled in invalid credentials and clicked 'Sig in'\");\n\t\t\n\t\tAssert.assertTrue(loginpage.getErrorMessage().getText().contains(\"Wrong login or password\"));\n\t\ttest.log(Status.PASS, \"Verified error message is correct\");\n\t}", "@Override\n\tpublic void onTestFailure(ITestResult tr) {\n\t\tsuper.onTestFailure(tr);\n\t}", "@Override\n\tpublic void onTestFailure(ITestResult tr) {\n\t\tsuper.onTestFailure(tr);\n\t}", "@Test\n void cadastraPesquisadorInvalido() {\n assertEquals(\"Campo fotoURL nao pode ser nulo ou vazio.\", verificaExcecao(() -> controllerPesquisador.cadastraPesquisador(\"killua zoldyck\", \"estudante\",\n \"Interessado em eletricidade, o terceiro de cinco filhos da famosa familia Zaoldyeck.\", \"hunterxhunter@1998\",\"\")));\n assertEquals(\"Campo nome nao pode ser nulo ou vazio.\", verificaExcecao(() -> controllerPesquisador.cadastraPesquisador(null, \"estudante\",\n \"Interessado em eletricidade, o terceiro de cinco filhos da famosa familia Zaoldyeck.\", \"hunterxhunter@1998\",\"https://godspeed\")));\n assertEquals(\"Formato de foto invalido.\", verificaExcecao(() -> controllerPesquisador.cadastraPesquisador(\"killua zoldyck\", \"estudante\",\n \"Interessado em eletricidade, o terceiro de cinco filhos da famosa familia Zaoldyeck.\", \"hunterxhunter@1998\",\"sem o necessario\")));\n assertEquals(\"Formato de foto invalido.\", verificaExcecao(() -> controllerPesquisador.cadastraPesquisador(\"killua zoldyck\", \"estudante\",\n \"Interessado em eletricidade, o terceiro de cinco filhos da famosa familia Zaoldyeck.\", \"hunterxhunter@1998\",\"https\")));\n assertEquals(\"Formato de email invalido.\", verificaExcecao(() -> controllerPesquisador.cadastraPesquisador(\"killua zoldyck\", \"estudante\",\n \"Interessado em eletricidade, o terceiro de cinco filhos da famosa familia Zaoldyeck.\", \"testeteste\",\"https://godspeed\")));\n assertEquals(\"Formato de email invalido.\", verificaExcecao(() -> controllerPesquisador.cadastraPesquisador(\"killua zoldyck\", \"estudante\",\n \"Interessado em eletricidade, o terceiro de cinco filhos da famosa familia Zaoldyeck.\", \"teste@\",\"https://godspeed\")));\n }", "@Test(expected=IllegalArgumentException.class)\n public void validNotNullTestWhenInputIsNull(){\n Validator.validateNotNull(null);\n //THEN exception thrown\n }", "@Test(priority=5)\n\tpublic void validatePleaseEnterTheValueErrorMsg1()\n\t{\n\t\tc.addButton.click();\n\t\tAssert.assertTrue(c.msg.getText().equalsIgnoreCase(\"Please Enter A Value.\"));\n\t}", "@Override\n\tpublic void onTestFailure(ITestResult arg0) {\n\t\tSystem.out.println(\"on failure\");\n\t\t\n\t}", "@Test\n public void testNoNumberPassword() {\n String password = \"PassWordNoNumber\";\n\n try {\n User.validatePassword(password);\n } catch (IntelligenceIdentityException e) {\n return;\n }\n\n fail(\"Password is wrong, an exception should be thrown, check implementation of password validation\");\n }", "@Test\n public void testValidarNome() throws Exception {\n System.out.println(\"validarNome\");\n try {\n TratamentoDeExcecoes.validarNome(\"1234567890\");\n fail(\"Deveria dar erro! Números não são permitidos no campo nome.\");\n } catch (NomeInvalidoException e) {\n //Sucesso\n }\n try {\n TratamentoDeExcecoes.validarNome(\";~´[]-=.,}{\");\n fail(\"Deveria dar erro! Caracteres especiais não são permitidos no campo nome.\");\n } catch (NomeInvalidoException e) {\n //Sucesso\n }\n try {\n TratamentoDeExcecoes.validarNome(\"Leticia\");\n } catch (NomeInvalidoException e) {\n fail(\"Deveria dar erro! Caracteres especiais não são permitidos no campo nome.\");\n }\n try{ \n TratamentoDeExcecoes.validarNome(\"Robson\");\n } catch (NomeInvalidoException e) {\n fail(\"Deveria dar erro! Caracteres especiais não são permitidos no campo nome.\");\n }\n\n }", "@Test(groups ={Slingshot,Regression})\n\tpublic void ManageViewDeleteViewErroValidation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the proper error message is displayed on clicking the delete view link when the View is already assigned for a user\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvTestdataforFAA\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink() \t \t \t\t\t\t\t\t \t \t\t\n\t\t.DeleteViewOverlay(userProfile); \t \t \t\t\t\t\t\t \t \t\t\n\t}", "public void onTestFailure(ITestResult tr) {\n\t\ttest= extent.createTest(tr.getName());\n\t\ttest.log(Status.FAIL, MarkupHelper.createLabel(tr.getName(), ExtentColor.RED));\n\t\tString screenShotPath = \"./Screenshot/\"+tr.getName()+\".png\";\n\t\tFile file = new File(screenShotPath);\n\t\tif(file.exists()) {\n\t\t\ttest.fail(\"Screenshot below \"+test.addScreenCaptureFromPath(screenShotPath));\n\t\t}\n\t\t\t\n\t}", "public void onTestFailure(ITestResult result) {\n\t\tSystem.out.println(\"********** \tTest Failed : \"+result.getName());\n\t\t\n\t}", "boolean isFailure();", "@Test\n void saveFail() {\n try {\n Api2 instance = new Api2();\n instance.save(new TestEntity());\n } catch (Exception error) {\n System.out.println(error);\n }\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void TitileFieldErrorValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the functionality of Title drop down and its appropriate error messages\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRElectricityUserforsingleMeter\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.verifyAndValidateSMRTitleFieldContent(smrProfile); \n}", "@Test\n public void testValidator() throws Exception {\n\n // No warnings/error\n Device device = buildDevice();\n List<Issue> issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 0);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 0);\n\n // Error for missing statusReason\n device = buildDevice().toBuilder().statusReason(Collections.emptyList()).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 1);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 0);\n\n // Warning for statusReason\n device = buildDevice().toBuilder().statusReason(Arrays.asList(\n CodeableConcept.builder().coding(Coding.builder().system(Uri.of(\"http://terminology.hl7.org/CodeSystem/device-status-reason\")).code(Code.of(\"invalidCode\")).build()).build(),\n CodeableConcept.builder().coding(Coding.builder().system(Uri.of(\"invalidSystem\")).code(Code.of(\"online\")).build()).build()\n )).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 0);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 2);\n\n // Warning for type\n device = buildDevice().toBuilder()\n .type(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(\"tlh\")).build()).build()).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 0);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 1);\n\n // Error for type\n device = buildDevice().toBuilder()\n .type(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(\"invalidLanguage\")).build()).build()).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 2);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 1);\n\n // Warning and error for specialization.systemType\n device = buildDevice().toBuilder().specialization(Arrays.asList(\n Specialization.builder().systemType(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(\"tlh\")).build()).build()).build(),\n Specialization.builder().systemType(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(\"invalidSystem\")).build()).build()).build())).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 2);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 2);\n\n // Warning and error for safety\n device = buildDevice().toBuilder().safety(Arrays.asList(\n CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(\"tlh\")).build()).build(),\n CodeableConcept.builder().coding(Coding.builder().system(Uri.of(\"invalidSystem\")).code(Code.of(ENGLISH_US)).build()).build()\n )).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 2);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 2);\n\n // Warning for test-language-primary-extension\n device = buildDevice().toBuilder()\n .extension(Collections.singletonList(Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-primary-extension\")\n .value(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(\"tlh\")).build()).build()).build())).build();\n issues = FHIRValidator.validator().validate(device);\n issues.forEach(System.out::println);\n assertEquals(FHIRValidationUtil.countErrors(issues), 0);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 1);\n\n // Error for test-language-primary-extension\n device = buildDevice().toBuilder()\n .extension(Collections.singletonList(Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-primary-extension\")\n .value(CodeableConcept.builder().coding(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(\"invalidLanguage\")).build()).build()).build())).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 2);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 1);\n assertEquals(FHIRValidationUtil.countInformation(issues), 1);\n\n // Warning for test-language-secondary-extension\n device = buildDevice().toBuilder()\n .extension(Collections.singletonList(Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-secondary-extension\")\n .value(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(\"tlh\")).build()).build())).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 0);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 2);\n\n // Error for test-language-secondary-extension\n device = buildDevice().toBuilder()\n .extension(Collections.singletonList(Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-secondary-extension\")\n .value(Coding.builder().system(Uri.of(ValidationSupport.BCP_47_URN)).code(Code.of(\"invalidLanguage\")).build()).build())).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 2);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 2);\n assertEquals(FHIRValidationUtil.countInformation(issues), 1);\n\n // Warning for test-language-tertiary-extension\n device = buildDevice().toBuilder()\n .extension(Collections.singletonList(Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-tertiary-extension\")\n .value(Code.of(\"tlh\")).build())).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 0);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 2);\n\n // Error for test-language-tertiary-extension\n device = buildDevice().toBuilder()\n .extension(Collections.singletonList(Extension.builder().url(\"http://ibm.com/fhir/StructureDefinition/test-language-tertiary-extension\")\n .value(Code.of(\"invalidLanguage\")).build())).build();\n issues = FHIRValidator.validator().validate(device);\n assertEquals(FHIRValidationUtil.countErrors(issues), 2);\n assertEquals(FHIRValidationUtil.countWarnings(issues), 2);\n }", "public void testInvalidNoType() { assertInvalid(\"a\"); }", "@Test\n\tvoid shouldFailIfBadTestsAreNotFiltered() {\n\t\tfinal Set<String> failingMethods = new HashSet<String>(Arrays.asList(\"shouldNotBeTestedGroup\", \"shouldNotBeTestedGroup3\", \"shouldNotBeTestedGroup2\"));\n\t\tTestResults results = runner.runTest(CLASS_UNDER_TEST);\n\t\tint counter = 0;\n\t\tfor (TestEvent testEvent : results) {\n\t\t\tcounter++;\n\t\t\tassertTrue(failingMethods.contains(testEvent.getTestMethod()));\n\t\t\tassertEquals(AssertionError.class.getName(), testEvent.getFullErrorClassName());\n\t\t\tassertEquals(CLASS_UNDER_TEST, testEvent.getTestName());\n\t\t}\n\t\tassertEquals(failingMethods.size(), counter);\n\t}", "public void onTestFailure(ITestResult result) {\n \t\n \tSystem.out.println(\"The test case is failed :\"+result.getName());\n }", "boolean isFail();", "public void testImproperUseOfTheCircuit() {\n \t fail(\"testImproperUseOfTheCircuit\");\n }", "public void testFailure(Failure failure) throws java.lang.Exception {\n test.fail(failure.getException().getLocalizedMessage());\n\n System.out.println(\"Execution of test case failed : \" + failure.getMessage());\n }", "@Test\r\n public void validatingEstateWhenEstateIsValidShouldNotThrowException() throws InvalidEstateException {\n estateValidator.validate(estateDto);\r\n\r\n // Then no exception is thrown\r\n }", "@Override\n\tpublic void onTestFailure(ITestResult result) {\n\t\t\n\t\tSystem.out.println(\"Failed Test \" + result.getName());\n\t}", "public final void testValidate() {\r\n\r\n Errors errors;\r\n\r\n // Validate a command. Validate with errors.\r\n errors = new BindException(sampleValidatableCommand,\r\n \"sampleValidatableCommand\");\r\n commandValidator.validate(sampleValidatableCommand, errors);\r\n assertEquals(1, errors.getErrorCount());\r\n\r\n // Validate without errors.\r\n errors = new BindException(\r\n sampleValidatableCommand, \"sampleValidatableCommand\");\r\n sampleValidatableCommand.setField(\"Not empty field\");\r\n commandValidator.validate(sampleValidatableCommand, errors);\r\n assertEquals(0, errors.getErrorCount());\r\n\r\n // Validate a validatable. Validate with errors.\r\n errors = new BindException(sampleValidatable, \"sampleValidatable\");\r\n commandValidator.validate(sampleValidatable, errors);\r\n assertEquals(1, errors.getErrorCount());\r\n\r\n // Validate without errors.\r\n errors = new BindException(sampleValidatable, \"sampleValidatable\");\r\n sampleValidatable.setField(\"Not empty field\");\r\n commandValidator.validate(sampleValidatable, errors);\r\n assertEquals(0, errors.getErrorCount());\r\n }", "public void assertErrorMsgCheck() {\r\n\t\t\tassertEquals(errorMsg.getText().substring(0,52), \"Warning: Please check the form carefully for errors!\");\r\n\t\t\tSystem.out.println(\"Asserted that the msg has been displayed: \"+ errorMsg.getText().substring(0,52));\r\n\t\t}", "public void validate() {}", "public void onTestFailure(ITestResult result) {\n\t\tSystem.out.println(\"*********Test onTestFailure :\"+result.getName());\r\n\t}", "@Test\r\n public void testErrors() {\r\n try {\r\n isPalindrome(null);\r\n fail(\"Checking null to see if it's a palindrome should throw IllegalArgumentException!\");\r\n } catch (IllegalArgumentException iae) {\r\n /* Test Passed! */ }\r\n }", "private void constructObjectsExpectFailure(String missingData) throws Exception {\n\t\ttry {\n\t\t\tConfig.getConfig();\n\t\t\tfail(\"Expected exception\");\n\t\t} catch (CustomValidationException e) {\n\t\t\tassertTrue(e.getMessage().contains(missingData));\n\t\t}\n\n\t\ttry {\n\t\t\tStudents.forceLoad();\n\t\t\tfail(\"Expected exception\");\n\t\t} catch (ConfigNotValidException e) {\n\t\t\tassertTrue(e.getMessage().contains(missingData));\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tnew Supervisors();\n\t\t\tfail(\"Expected exception\");\n\t\t} catch (ConfigNotValidException e) {\n\t\t\tassertTrue(e.getMessage().contains(missingData));\n\t\t}\n\t}", "@Test\r\n\tpublic void testIsValidPasswordInvalidSequence()\r\n\t{\r\n\t\ttry{\r\n\t\t\tassertTrue(PasswordCheckerUtility.isValidPassword(\"AAAdd2$\"));\r\n\t\t}\r\n\t\tcatch(InvalidSequenceException e)\r\n\t\t{\r\n\t\t\tassertTrue(\"Successfully threw a InvalidSequenceExcepetion\",true);\r\n\t\t}\r\n\t}", "private void fail() {\n mFails++;\n if(mFails > MAX_NUMBER_OF_FAILS) {\n gameOver();\n }\n }", "@Test(expected = BusinessRuleException.class)\n public void shouldAddCartNot(){\n }", "@Test\n\tpublic void testValidationTrace() throws Exception {\n\t\ttry {\n\t\t\tSchema schema = factory.create(basicSchema);\n\t\t\tschema.validate(parser.read(basicJsonError));\n\t\t} catch (ValidationException e) {\n\t\t\tassertEquals(\"model.members[1].size\", e.toString());\n\t\t}\n\t}", "@Test\n public void bookHotelTestError3() throws BookHotelFault, DatatypeConfigurationException{ \n BookHotelInputType input = CreateBookHotelInputType(\"booking_Hotel_1\", \"Tobiasen Inge\", \"50408823\", 9, 10);\n try {\n assertTrue(bookHotel(input));\n } catch (BookHotelFault e) {\n assertEquals(\"The account has not enough money\",e.getMessage());\n } \n }", "@Test\n void cadastraEspecialidadeProfessorInvalido(){\n assertEquals(\"Campo email nao pode ser nulo ou vazio.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"\", \"Doutorado\", \"DSC\", \"01/01/2011\")));\n assertEquals(\"Campo formacao nao pode ser nulo ou vazio.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email@email\", null, \"DSC\", \"01/01/2011\")));\n assertEquals(\"Campo unidade nao pode ser nulo ou vazio.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email@email\", \"Doutorado\", \"\", \"01/01/2011\")));\n assertEquals(\"Campo data nao pode ser nulo ou vazio.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email@email\", \"Doutorado\", \"DSC\", null)));\n assertEquals(\"Formato de email invalido.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email@\", \"Doutorado\", \"DSC\", \"01/05/2015\")));\n assertEquals(\"Pesquisadora nao encontrada.\", verificaExcecao(() ->\n controllerPesquisador.cadastraEspecialidadeProfessor(\"email1@email\", \"Doutorado\", \"DSC\", \"01/05/2015\")));\n cadastraPesquisador();\n assertEquals(\"Pesquisador nao compativel com a especialidade.\",\n verificaExcecao(() -> controllerPesquisador.cadastraEspecialidadeProfessor(\"hunterxhunter@1998\",\"Doutorado\", \"DSC\", \"01/05/2015\")));\n assertEquals(\"Atributo data com formato invalido.\",\n verificaExcecao(() -> controllerPesquisador.cadastraEspecialidadeProfessor(\"breakingbad@2008\",\"Doutorado\", \"DSC\", \"01052015\")));\n assertEquals(\"Atributo data com formato invalido.\",\n verificaExcecao(() -> controllerPesquisador.cadastraEspecialidadeProfessor(\"breakingbad@2008\",\"Doutorado\", \"DSC\", \"2015/05/15\")));\n assertEquals(\"Atributo data com formato invalido.\",\n verificaExcecao(() -> controllerPesquisador.cadastraEspecialidadeProfessor(\"breakingbad@2008\",\"Doutorado\", \"DSC\", \"1/5/2015\")));\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void mpanNameErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the functionality of Supply field and its appropriate error messages\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRGasUserforsingleMeter\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.ValidatempanErrormsg(smrProfile);\t\t\t\n}", "@Then ( \"^The labor and delivery report is not updated successfully$\" )\n public void unsuccessfulEdit () {\n // confirm that the error message is displayed\n waitForAngular();\n try {\n final String temp = driver.findElement( By.name( \"errorMsg\" ) ).getText();\n if ( temp.equals( \"\" ) ) {\n fail();\n }\n }\n catch ( final Exception e ) {\n }\n }", "@Test\n public void loginWithWrongEmail(){\n String randomLog=random.getNewRandomName()+\"_auto\";\n String randomPassword=random.getNewRandomName();\n Assert.assertEquals(createUserChecking.creationChecking(randomLog,randomPassword),\"APPLICATION ERROR #1200\");\n log.info(\"login \"+randomLog+\" and email \"+randomPassword+\" were typed\");\n }", "public void testInvalid() {\n\t\tassertNotNull(\"Should have compiler available (for testing to be available)\", this.compiler);\n\t}", "@Test(expected = UsernameNotFoundException.class)\n public void createNewComputerBuildFailure() {\n ComputerBuild computerBuild = createComputerBuild(SAMPLE_BUDGET_COMPUTER_BUILD_NAME, SAMPLE_GAMING_COMPUTER_BUILD_DESCRIPTION);\n computerBuildService.createNewComputerBuild(computerBuild);\n }", "@Test (priority=9)\n\tpublic void verifyInvalidLoginErrorMessage() throws InterruptedException {\n\t\tlp.invalidLogin(\"\", \"\");\n\t\tThread.sleep(2000);\n\t\tAssert.assertEquals(lp.getErrorMessage(), prop.getProperty(\"lp.errorMessageUserNameBlankAndPswdBlank\"));\n\n\t\t//Validate Login error for only username \n\t\tlp.invalidLogin(\"evion\", \"\");\n\t\tThread.sleep(2000);\n\t\tAssert.assertEquals(lp.getErrorMessage(), prop.getProperty(\"lp.errorMessageUserNameAndPswdBlank\"));\n\t\tlp.clearUserNameText();\n\t\t\n\t\t//Validate Login error for only password \n\t\tlp.invalidLogin(\"\", \"123\");\n\t\tThread.sleep(2000);\n\t\tAssert.assertEquals(lp.getErrorMessage(), prop.getProperty(\"lp.errorMessageUserNameBlankAndPswd\"));\n\t\tlp.clearPasswordText();\n\t\t\t\t\n\t\t//validate when pswd & username both wrong\n\t\tlp.invalidLogin(\"wwww\", \"123\");\n\t\tThread.sleep(2000);\n\t\tAssert.assertEquals(lp.getErrorHeader(), prop.getProperty(\"lp.errorMessageUserNameWrongAndPswdWrong\"));\n\t\tlp.clearUserNameText();\n\t\tlp.clearPasswordText();\n\n\t}", "@Override\n\tpublic void fail(Throwable t) {\n\t}", "public void assertValid() throws ValidationException {\n\n\t\tList<String> validationMessages = this.validate();\n\t\tif (!validationMessages.isEmpty()) {\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tsb.append(this.getClassAndIdentity());\n\t\t\tsb.append(\" is in an invalid state, validationMessages: \");\n\t\t\tIterator<String> iterator = validationMessages.iterator();\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString validationMessage = iterator.next();\n\t\t\t\tsb.append(validationMessage);\n\t\t\t}\n\t\t\tthrow new ValidationException(this.getClassAndIdentity(), sb.toString());\n\t\t}\n\t}", "@Test\n\tpublic void createUsersServiceTestKo_allNull() {\n\t\tUserDto user = null;\n\t\tDate now = Calendar.getInstance().getTime();\n\t\ttry {\n\t\t\t\t//insert users\n\t\t\t\tuser = new UserDto();\n\t\t\t\tuser.setModificationDate(now);\n\t\t\t\tuser.setCreationDate(now);\n\t\t\t\tuser.setPassword(\"password\");\n\t\t\t\tuserService.createUser(user);\n\t\t\t\tfail();\n\t\t} catch (HangTechnicalException e) {\n\t\t\tassertThat(\"Erro while saving user\", equalTo(e.getMessage()));\n\t\t\tassertTrue(e.getCause() instanceof ConstraintViolationException);\n\t\t\tConstraintViolationException exp = (ConstraintViolationException) e.getCause();\n\t\t\tSet<ConstraintViolation<?>> violations = exp.getConstraintViolations();\n\t\t\tif (violations.size() != 4)\n\t\t\t\tfail();\n\t\t\tIterator<ConstraintViolation<?>> iter = violations.iterator();\n\t\t\tConstraintViolation<?> violationInError;\n\t\t\twhile (iter.hasNext()){\n\t\t\t\tviolationInError = iter.next();\n\t\t\t\tString msgTemplate = violationInError.getMessageTemplate();\n\t\t\t\tassertThat(\"{javax.validation.constraints.NotNull.message}\", equalTo(msgTemplate));\n\t\t} \n\t}\n\n\t}", "public void testSoThatTestsDoNotFail() {\n\n }", "@Test\n\tvoid invalidLoginTest() throws Exception {\n\t\tUser userObj = new User();\n\t\tuserObj.setUsername(\"sivass\");\n\t\tuserObj.setPassword(\"Sivas23@\");\n\t\tString userJson = new ObjectMapper().writeValueAsString(userObj);\n\t\twhen(userService.loginValidation(any(String.class), any(String.class)))\n\t\t\t\t.thenThrow(new InvalidLoginException(\"Invalid Login Credentials\"));\n\t\tmockMvc.perform(post(\"/vegapp/v1/users/login\").contentType(MediaType.APPLICATION_JSON).content(userJson))\n\t\t\t\t.andExpect(status().isUnauthorized())\n\t\t\t\t.andExpect(jsonPath(\"$.errorMessage\").value(\"Invalid Login Credentials\"));\n\t}", "@Test\n public void tcEditProfileWithInvalidData() {\n\n }", "@Test\n public void testRegisterPatientInvalidDate(){\n assertThrows(IllegalArgumentException.class,\n () -> { register.registerPatient(\"Donald\", \"Trump\", \"00019112345\", \"Doctor Proctor\");});\n }" ]
[ "0.79444665", "0.6970267", "0.6936345", "0.68473095", "0.6732435", "0.67280227", "0.672374", "0.66838354", "0.667027", "0.6602048", "0.6600774", "0.6580019", "0.6541942", "0.6526843", "0.64602476", "0.6451515", "0.64463437", "0.6446209", "0.64369464", "0.64192337", "0.6413417", "0.6403734", "0.6399587", "0.63854927", "0.63691336", "0.6364401", "0.63587606", "0.6347749", "0.63300174", "0.6323208", "0.63218695", "0.6301694", "0.63015944", "0.6296497", "0.62928945", "0.6284953", "0.627953", "0.6277878", "0.62692", "0.62607586", "0.6260177", "0.62598664", "0.6248982", "0.6242366", "0.6238915", "0.6236616", "0.6235675", "0.6234852", "0.62313646", "0.62201625", "0.6206995", "0.61952925", "0.6192995", "0.61678386", "0.61678386", "0.6149559", "0.614839", "0.6146921", "0.61159074", "0.610824", "0.6103004", "0.6097863", "0.6096592", "0.60929376", "0.6089336", "0.6088442", "0.6066374", "0.60649043", "0.6062671", "0.6060661", "0.60592717", "0.6056129", "0.6050068", "0.60444814", "0.60358447", "0.6035248", "0.6029605", "0.60259056", "0.6025132", "0.60209644", "0.6020784", "0.60187894", "0.60186064", "0.6008151", "0.5996985", "0.5996051", "0.59935063", "0.5987531", "0.598115", "0.59720975", "0.59712964", "0.5971073", "0.59700686", "0.5966518", "0.5965874", "0.5964852", "0.59592265", "0.5955346", "0.5955086", "0.59546405", "0.5953796" ]
0.0
-1
Toast.makeText(mActivity, "Connection failed. Please try again", Toast.LENGTH_LONG).show();
@Override public void onErrorResponse(VolleyError error) { SSLog.e(TAG, "sendUserAccess :- ", error.getMessage()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displayErrorToast()\n {\n Toast.makeText(\n getApplicationContext(),\n \"Connection to the server failed, please try again!\",\n Toast.LENGTH_LONG ).show();\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\t\tToast.makeText(context, \"Connection Failed\", Toast.LENGTH_SHORT).show();\n\t}", "@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(),\"\"+e.getMessage(),Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(),\"Uh-oh! something went wrong, please try again.\",Toast.LENGTH_SHORT).show();\n }", "@Override\n\t\t\tpublic void onFailed(String str) {\n\t\t\t\tToast.makeText(MainActivity.this, str, Toast.LENGTH_LONG).show();\n\t\t\t}", "@Override\n public void onFailure(@NonNull Exception exception) {\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tR.string.No_Internet_Connection,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.show();\n\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n public void onFailure(@NonNull Exception e) {\n showToast(\"ERROR\", Color.RED);\n e.printStackTrace();\n }", "@Override\n public void onFailure(Throwable t) {\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }", "public void showErrorMessage(){\n Toast.makeText(context, R.string.generic_error_message, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n\tpublic void connectionFailed(String message) {\n\t\tToast.makeText(this, \"Connection Failed !\", Toast.LENGTH_SHORT).show();\n\t}", "@Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.dismiss();\n error.printStackTrace();\n Toast toast = Toast.makeText(Commissioner.this, getString(R.string.servernotconnect), Toast.LENGTH_LONG);\n toast.show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.dismiss();\n error.printStackTrace();\n Toast toast = Toast.makeText(Commissioner.this, getString(R.string.servernotconnect), Toast.LENGTH_LONG);\n toast.show();\n }", "private void showLoginFailed() {\n try {\n Toast.makeText(getApplicationContext(), \"Login Failed\", Toast.LENGTH_SHORT).show();\n } catch (Exception e) {\n Looper.prepare();\n Toast.makeText(getApplicationContext(), \"Login Failed\", Toast.LENGTH_SHORT).show();\n Looper.loop();\n }\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\tR.string.No_Internet_Connection,\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\n\t\t\t\t\t\t\t\t}", "@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n Toast toast = Toast.makeText(Commissioner.this, getString(R.string.servernotconnect), Toast.LENGTH_LONG);\n toast.show();\n }", "@Override\n public void onFailure(Throwable t) {\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }", "private void showErrorToast() {\n }", "@Override\n public void onFailure(Call call, IOException e) {\n TemoignageActivity.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(TemoignageActivity.this, R.string.no_internet, Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void networkError() {\n Context context = getActivity();\n if (context == null) {\n return;\n }\n\n showToast(context.getString(R.string.status_network_error), Toast.LENGTH_LONG);\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Context context = getApplicationContext();\n CharSequence text = \"Erreur lors de la connexion ! Veuillez recommencer\";\n\n Toast toast = Toast.makeText(context, text, Toast.LENGTH_LONG);\n toast.show();\n }", "private void ShowNoInternetConnection(){\n StopWhaitSpinner();\n //There was an error show error message\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder.setMessage(R.string.recconnecting_request)\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 onErrorResponse(VolleyError error) {\n if (dialog != null)\n dialog.dismiss();\n\n //Display appropriate toast message depending upon internet connectivity was a reason for failure or something else..\n if(ConstantsDefined.isOnline(ForgotPassword.this)){\n Toast.makeText(ForgotPassword.this, \"Couldn't connect..Please try again..\", Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(ForgotPassword.this, \"Sorry! No internet connection\", Toast.LENGTH_SHORT).show();\n }\n }", "private void showErrorOnToast(String msg) {\n mFailToLoadTextView.setVisibility(View.VISIBLE);\n mFailToLoadTextView.setText(R.string.error_msg_unable_to_load);\n Toast.makeText(MainActivity.this, msg, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.dismiss();\n error.printStackTrace();\n Toast.makeText(Commissioner.this, getString(R.string.servernotconnect) + \"->\" + error.getMessage().toString(), Toast.LENGTH_LONG).show();\n\n }", "@Override\n public void run() {\n showToast(\"请检查您的网络\");\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\tR.string.No_Internet_Connection, Toast.LENGTH_SHORT)\n\t\t\t\t\t\t\t.show();\n\t\t\t\t}", "@Override\n public void onFailure(Call<Void> call, Throwable t)\n {\n Log.e(TAG, \"FAIL = \" + call.toString());\n t.printStackTrace();\n Toast.makeText(getApplicationContext(), \"Check your network connection\", Toast.LENGTH_LONG).show();\n }", "@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}", "@Override\n public void onError(Status status) {\n Toast.makeText(getApplicationContext(), \"error\",\n Toast.LENGTH_SHORT).show();\n\n\n }", "@Override\n\t\t\tpublic void onFailure(VolleyError error) {\n\t\t\t\tshowToast(R.string.network_error);\n\t\t\t}", "@Override\n\t\t\tpublic void onFailure(VolleyError error) {\n\t\t\t\tshowToast(R.string.network_error);\n\t\t\t}", "private void exibe_mensagem(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getActivity(), \"Something went wrong!PLEASE CHECK YOUR NETWORK CONNECTION\", Toast.LENGTH_SHORT).show();\n\n\n }", "public void loadToast(){\n Toast.makeText(getApplicationContext(), \"Could not find city\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n dialog.dismiss();\n //Display err toast msg\n Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_SHORT).show();\n }", "private void showErrorToast(String message) {\n Toast.makeText(CreateAccountActivity.this, message, Toast.LENGTH_LONG).show();\n }", "private void showErrorToast(String message) {\n Toast.makeText(CreateAccountActivity.this, message, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onCancelled(@NonNull @NotNull DatabaseError error) {\n Toast.makeText(MainActivity.this, getResources().getString(R.string.errorToast), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onCancelled(@NonNull @NotNull DatabaseError error) {\n Toast.makeText(MainActivity.this, getResources().getString(R.string.errorToast), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "public void showErrorMessage(String message){\n Toast.makeText(context, message, Toast.LENGTH_LONG).show();\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 }", "void showToast(String message);", "void showToast(String message);", "private void showErrorDialogue() {\n\t\ttry {\n\t\t\tnew AlertDialog.Builder(mContext)\n\t\t\t\t\t.setTitle(\"Something unfortunate happened...\")\n\t\t\t\t\t.setMessage(\"Your device was not able to verify activation. Please check your internet connection and ensure you are using the latest version of the application.\")\n\t\t\t\t\t.setNeutralButton(\"Close\", new DialogInterface.OnClickListener() {\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.show();\n\t\t} catch (Exception e) {\n\t\t\t//not in main activity, not a problem\n\t\t\tLog.w(TAG, e.getMessage());\n\t\t}\n\t}", "@Override\r\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(MainActivity.this, \"Error\", Toast.LENGTH_SHORT).show();\r\n hideProgress();\r\n }", "@Override\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n Toast.makeText(getApplicationContext(), \"We are not connected\" , Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(Call<String> call, Throwable t) {\n /*dismiss the dialog*/\n Util.dissmisDialog(dialog);\n /*handle network error and notify the user*/\n if (t instanceof SocketTimeoutException) {\n Toast.makeText(activity, R.string.connection_timeout, Toast.LENGTH_SHORT).show();\n }\n\n }", "private void showToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(Call<ResponseBody> call, Throwable t) {\n Logger.write(t.getMessage());\n MyUtils.showConnectionErrorToast(getActivity());\n DialogUtils.closeProgress();\n }", "public void onError(Exception error) {\n Toast.makeText(getApplicationContext(),\n error.getMessage(),\n Toast.LENGTH_LONG\n ).show();\n }", "public void showToast(String msg){\n Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onFailure(int reasonCode) {\n Toast.makeText(getApplicationContext(), \"Please turn on WiFi. Error Code \" + reasonCode,\n Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onFailure(Call<String> call, Throwable t) {\n if (t instanceof SocketTimeoutException) {\n Toast.makeText(activity, R.string.connection_timeout, Toast.LENGTH_SHORT).show();\n }\n }", "@Override\r\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\r\n\r\n //and displaying error message\r\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\r\n }", "private void toastmessage(String message){\n Toast.makeText(Accountinfo.this,message,Toast.LENGTH_SHORT).show();\n }", "public void showAlert(){\n MainActivity.this.runOnUiThread(new Runnable() {\n public void run() {\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(\"Login Error.\");\n builder.setMessage(\"User not Found.\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n });\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 result) {\n Log.d(\"SCXTT\", \" onConnectionFailed \" + result.toString());\n\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"response is:\", error.toString());\n Toast.makeText(getActivity(), \"Server not connected\", Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"response is:\", error.toString());\n Toast.makeText(getActivity(), Settings.getword(getActivity(),\"server_not_connected\"), Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }", "@Override\n public void onError() {\n Toast.makeText(getApplicationContext(), \"아이디랑 비밀번호를 확인해 주세요.\", Toast.LENGTH_LONG).show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(mContext, error.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(mContext, error.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\r\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\t\t\tactivityContext,\r\n\t\t\t\t\t\t\t\tR.string.unable_to_fetch_the_details,\r\n\t\t\t\t\t\t\t\t2000);\r\n\r\n\t\t\t\t\t\t }", "@Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(LoginActivity.this, R.string.wangluo, Toast.LENGTH_SHORT).show();\n }", "private void showToast(String msg) {\r\n Toast.makeText(Imprimir.this, msg, Toast.LENGTH_LONG).show();\r\n }", "private void sendToCatTheater()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Theater'\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n\n Toast.makeText(getApplicationContext(), error.getMessage(), Toast.LENGTH_LONG).show();\n }", "private void showToast(String message){\n\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "@Override\n protected void onGetDataFailed(String message) {\n Toast.makeText(getContext(), message, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(mContext, \"Something Went Wrong\", 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 }", "private void displayToast(String message) {\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult result) {\n\t\tLog.d(\"ANDROID\", \"faild contected\");\n\t}", "@Override\n public void onCancelled(DatabaseError error) {\n Toast.makeText(MainActivity.this, error.getMessage(), Toast.LENGTH_SHORT).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "public void DisplayToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_SHORT).show();\n }", "public void showNetErrorMessage() {\n showMessage(R.string.ic_net_error_tipinfo);\n }", "private void showErrorMessage(String message) {\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(this, message, duration);\n toast.show();\n\n }", "public void showMessage(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void onFail(String msg) {\n\t\t\t\t\t\t\t\tToast.makeText(PhotoImagePagerActivity.this, \"服务器错误\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t\t\t}", "@Override\n public void failure(RetrofitError error) {\n Toast.makeText(MainActivity.this, error.toString(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onError(Status status) {\n createToast(\"Error occurred, please wait\");\n }", "@Override\n public void onFailure(Call call, IOException e) {\n call.cancel();\n\n // In order to access the TextView inside the UI thread, the code is executed inside runOnUiThread()\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n// TextView responseText = findViewById(R.id.responseText);\n// responseText.setText(\"Failed to Connect to Server\");\n Log.d(\"Flask Server\",\"Failed to connect to server\");\n }\n });\n }", "public void showAlert(){\n Loguin.this.runOnUiThread(new Runnable() {\n public void run() {\n AlertDialog.Builder builder = new AlertDialog.Builder(Loguin.this);\n builder.setTitle(\"Login Error.\");\n builder.setMessage(\"User not Found.\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n });\n }", "private void sendToCatEd()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Education'\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onFailure(Call call, final IOException e) {\n activity.runOnUiThread(() -> {\n textView.setText(e.getMessage());\n Toast.makeText(activity, \"fail\", Toast.LENGTH_SHORT).show();\n });\n }", "private void toastMessage (String message){\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onCancelled(DatabaseError error) {\n Toast.makeText(MainActivity.this, \"error\", Toast.LENGTH_SHORT).show();\n }", "protected void error(String error) {\n Toast.makeText(getApplicationContext(), error, Toast.LENGTH_LONG).show();\n }" ]
[ "0.824417", "0.7591219", "0.73856604", "0.7384699", "0.73612225", "0.7317538", "0.73037046", "0.72954994", "0.72828394", "0.72806895", "0.72752863", "0.72706467", "0.7236222", "0.7236222", "0.71992224", "0.71972203", "0.7142329", "0.71345633", "0.7130448", "0.71017164", "0.70906067", "0.7060928", "0.7032968", "0.7008146", "0.6999937", "0.69921833", "0.69694114", "0.6962018", "0.6902044", "0.6882167", "0.6882167", "0.687141", "0.6854704", "0.6854704", "0.6837977", "0.6800032", "0.6795634", "0.6791328", "0.67903", "0.67903", "0.6789958", "0.6789958", "0.67890745", "0.67759717", "0.67756194", "0.6759032", "0.6759032", "0.67580664", "0.6752007", "0.67478395", "0.6733211", "0.6733211", "0.6733211", "0.6733211", "0.6733211", "0.6717158", "0.6708819", "0.6695515", "0.6680255", "0.6676553", "0.6667743", "0.6662741", "0.6626307", "0.6624117", "0.661961", "0.66121656", "0.661196", "0.66119033", "0.6606469", "0.6606219", "0.6602968", "0.6601917", "0.6601917", "0.6600152", "0.6597614", "0.6591159", "0.6585481", "0.6584514", "0.65774465", "0.65723056", "0.65715575", "0.6571341", "0.6564406", "0.6554986", "0.6548075", "0.65321153", "0.65321153", "0.6527841", "0.6525009", "0.6521281", "0.6518441", "0.6518061", "0.6514124", "0.6510578", "0.65079576", "0.64865685", "0.6485546", "0.6484196", "0.647882", "0.64575756", "0.6446592" ]
0.0
-1
Toast.makeText(mActivity, "Connection failed. Please try again", Toast.LENGTH_LONG).show();
@Override public void onErrorResponse(VolleyError error) { try { SSLog.e(TAG, " callBusTrip", error.toString()); } catch (Exception e) { SSLog.e(TAG, " callBusTrip", e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displayErrorToast()\n {\n Toast.makeText(\n getApplicationContext(),\n \"Connection to the server failed, please try again!\",\n Toast.LENGTH_LONG ).show();\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\t\tToast.makeText(context, \"Connection Failed\", Toast.LENGTH_SHORT).show();\n\t}", "@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(),\"\"+e.getMessage(),Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(),\"Uh-oh! something went wrong, please try again.\",Toast.LENGTH_SHORT).show();\n }", "@Override\n\t\t\tpublic void onFailed(String str) {\n\t\t\t\tToast.makeText(MainActivity.this, str, Toast.LENGTH_LONG).show();\n\t\t\t}", "@Override\n public void onFailure(@NonNull Exception exception) {\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tR.string.No_Internet_Connection,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.show();\n\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n public void onFailure(@NonNull Exception e) {\n showToast(\"ERROR\", Color.RED);\n e.printStackTrace();\n }", "@Override\n public void onFailure(Throwable t) {\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }", "public void showErrorMessage(){\n Toast.makeText(context, R.string.generic_error_message, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n\tpublic void connectionFailed(String message) {\n\t\tToast.makeText(this, \"Connection Failed !\", Toast.LENGTH_SHORT).show();\n\t}", "@Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.dismiss();\n error.printStackTrace();\n Toast toast = Toast.makeText(Commissioner.this, getString(R.string.servernotconnect), Toast.LENGTH_LONG);\n toast.show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.dismiss();\n error.printStackTrace();\n Toast toast = Toast.makeText(Commissioner.this, getString(R.string.servernotconnect), Toast.LENGTH_LONG);\n toast.show();\n }", "private void showLoginFailed() {\n try {\n Toast.makeText(getApplicationContext(), \"Login Failed\", Toast.LENGTH_SHORT).show();\n } catch (Exception e) {\n Looper.prepare();\n Toast.makeText(getApplicationContext(), \"Login Failed\", Toast.LENGTH_SHORT).show();\n Looper.loop();\n }\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\tR.string.No_Internet_Connection,\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\n\t\t\t\t\t\t\t\t}", "@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n Toast toast = Toast.makeText(Commissioner.this, getString(R.string.servernotconnect), Toast.LENGTH_LONG);\n toast.show();\n }", "@Override\n public void onFailure(Throwable t) {\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }", "private void showErrorToast() {\n }", "@Override\n public void onFailure(Call call, IOException e) {\n TemoignageActivity.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(TemoignageActivity.this, R.string.no_internet, Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void networkError() {\n Context context = getActivity();\n if (context == null) {\n return;\n }\n\n showToast(context.getString(R.string.status_network_error), Toast.LENGTH_LONG);\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Context context = getApplicationContext();\n CharSequence text = \"Erreur lors de la connexion ! Veuillez recommencer\";\n\n Toast toast = Toast.makeText(context, text, Toast.LENGTH_LONG);\n toast.show();\n }", "private void ShowNoInternetConnection(){\n StopWhaitSpinner();\n //There was an error show error message\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder.setMessage(R.string.recconnecting_request)\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 onErrorResponse(VolleyError error) {\n if (dialog != null)\n dialog.dismiss();\n\n //Display appropriate toast message depending upon internet connectivity was a reason for failure or something else..\n if(ConstantsDefined.isOnline(ForgotPassword.this)){\n Toast.makeText(ForgotPassword.this, \"Couldn't connect..Please try again..\", Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(ForgotPassword.this, \"Sorry! No internet connection\", Toast.LENGTH_SHORT).show();\n }\n }", "private void showErrorOnToast(String msg) {\n mFailToLoadTextView.setVisibility(View.VISIBLE);\n mFailToLoadTextView.setText(R.string.error_msg_unable_to_load);\n Toast.makeText(MainActivity.this, msg, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.dismiss();\n error.printStackTrace();\n Toast.makeText(Commissioner.this, getString(R.string.servernotconnect) + \"->\" + error.getMessage().toString(), Toast.LENGTH_LONG).show();\n\n }", "@Override\n public void run() {\n showToast(\"请检查您的网络\");\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\tR.string.No_Internet_Connection, Toast.LENGTH_SHORT)\n\t\t\t\t\t\t\t.show();\n\t\t\t\t}", "@Override\n public void onFailure(Call<Void> call, Throwable t)\n {\n Log.e(TAG, \"FAIL = \" + call.toString());\n t.printStackTrace();\n Toast.makeText(getApplicationContext(), \"Check your network connection\", Toast.LENGTH_LONG).show();\n }", "@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}", "@Override\n public void onError(Status status) {\n Toast.makeText(getApplicationContext(), \"error\",\n Toast.LENGTH_SHORT).show();\n\n\n }", "@Override\n\t\t\tpublic void onFailure(VolleyError error) {\n\t\t\t\tshowToast(R.string.network_error);\n\t\t\t}", "@Override\n\t\t\tpublic void onFailure(VolleyError error) {\n\t\t\t\tshowToast(R.string.network_error);\n\t\t\t}", "private void exibe_mensagem(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getActivity(), \"Something went wrong!PLEASE CHECK YOUR NETWORK CONNECTION\", Toast.LENGTH_SHORT).show();\n\n\n }", "public void loadToast(){\n Toast.makeText(getApplicationContext(), \"Could not find city\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n dialog.dismiss();\n //Display err toast msg\n Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onCancelled(@NonNull @NotNull DatabaseError error) {\n Toast.makeText(MainActivity.this, getResources().getString(R.string.errorToast), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onCancelled(@NonNull @NotNull DatabaseError error) {\n Toast.makeText(MainActivity.this, getResources().getString(R.string.errorToast), Toast.LENGTH_LONG).show();\n }", "private void showErrorToast(String message) {\n Toast.makeText(CreateAccountActivity.this, message, Toast.LENGTH_LONG).show();\n }", "private void showErrorToast(String message) {\n Toast.makeText(CreateAccountActivity.this, message, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\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 }", "public void showErrorMessage(String message){\n Toast.makeText(context, message, Toast.LENGTH_LONG).show();\n }", "void showToast(String message);", "void showToast(String message);", "private void showErrorDialogue() {\n\t\ttry {\n\t\t\tnew AlertDialog.Builder(mContext)\n\t\t\t\t\t.setTitle(\"Something unfortunate happened...\")\n\t\t\t\t\t.setMessage(\"Your device was not able to verify activation. Please check your internet connection and ensure you are using the latest version of the application.\")\n\t\t\t\t\t.setNeutralButton(\"Close\", new DialogInterface.OnClickListener() {\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t.show();\n\t\t} catch (Exception e) {\n\t\t\t//not in main activity, not a problem\n\t\t\tLog.w(TAG, e.getMessage());\n\t\t}\n\t}", "@Override\r\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(MainActivity.this, \"Error\", Toast.LENGTH_SHORT).show();\r\n hideProgress();\r\n }", "@Override\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n Toast.makeText(getApplicationContext(), \"We are not connected\" , Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(Call<String> call, Throwable t) {\n /*dismiss the dialog*/\n Util.dissmisDialog(dialog);\n /*handle network error and notify the user*/\n if (t instanceof SocketTimeoutException) {\n Toast.makeText(activity, R.string.connection_timeout, Toast.LENGTH_SHORT).show();\n }\n\n }", "private void showToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(Call<ResponseBody> call, Throwable t) {\n Logger.write(t.getMessage());\n MyUtils.showConnectionErrorToast(getActivity());\n DialogUtils.closeProgress();\n }", "public void onError(Exception error) {\n Toast.makeText(getApplicationContext(),\n error.getMessage(),\n Toast.LENGTH_LONG\n ).show();\n }", "public void showToast(String msg){\n Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onFailure(int reasonCode) {\n Toast.makeText(getApplicationContext(), \"Please turn on WiFi. Error Code \" + reasonCode,\n Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onFailure(Call<String> call, Throwable t) {\n if (t instanceof SocketTimeoutException) {\n Toast.makeText(activity, R.string.connection_timeout, Toast.LENGTH_SHORT).show();\n }\n }", "@Override\r\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\r\n\r\n //and displaying error message\r\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\r\n }", "private void toastmessage(String message){\n Toast.makeText(Accountinfo.this,message,Toast.LENGTH_SHORT).show();\n }", "public void showAlert(){\n MainActivity.this.runOnUiThread(new Runnable() {\n public void run() {\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(\"Login Error.\");\n builder.setMessage(\"User not Found.\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n });\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.d(\"SCXTT\", \" onConnectionFailed \" + result.toString());\n\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 onErrorResponse(VolleyError error) {\n Log.e(\"response is:\", error.toString());\n Toast.makeText(getActivity(), Settings.getword(getActivity(),\"server_not_connected\"), Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"response is:\", error.toString());\n Toast.makeText(getActivity(), \"Server not connected\", Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }", "@Override\n public void onError() {\n Toast.makeText(getApplicationContext(), \"아이디랑 비밀번호를 확인해 주세요.\", Toast.LENGTH_LONG).show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(mContext, error.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(mContext, error.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\r\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\t\t\tactivityContext,\r\n\t\t\t\t\t\t\t\tR.string.unable_to_fetch_the_details,\r\n\t\t\t\t\t\t\t\t2000);\r\n\r\n\t\t\t\t\t\t }", "@Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(LoginActivity.this, R.string.wangluo, Toast.LENGTH_SHORT).show();\n }", "private void showToast(String msg) {\r\n Toast.makeText(Imprimir.this, msg, Toast.LENGTH_LONG).show();\r\n }", "private void sendToCatTheater()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Theater'\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n\n Toast.makeText(getApplicationContext(), error.getMessage(), Toast.LENGTH_LONG).show();\n }", "private void showToast(String message){\n\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "@Override\n protected void onGetDataFailed(String message) {\n Toast.makeText(getContext(), message, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(mContext, \"Something Went Wrong\", 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 }", "private void displayToast(String message) {\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult result) {\n\t\tLog.d(\"ANDROID\", \"faild contected\");\n\t}", "@Override\n public void onCancelled(DatabaseError error) {\n Toast.makeText(MainActivity.this, error.getMessage(), Toast.LENGTH_SHORT).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "public void DisplayToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_SHORT).show();\n }", "public void showNetErrorMessage() {\n showMessage(R.string.ic_net_error_tipinfo);\n }", "private void showErrorMessage(String message) {\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(this, message, duration);\n toast.show();\n\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void onFail(String msg) {\n\t\t\t\t\t\t\t\tToast.makeText(PhotoImagePagerActivity.this, \"服务器错误\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t\t\t}", "public void showMessage(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void failure(RetrofitError error) {\n Toast.makeText(MainActivity.this, error.toString(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onError(Status status) {\n createToast(\"Error occurred, please wait\");\n }", "@Override\n public void onFailure(Call call, IOException e) {\n call.cancel();\n\n // In order to access the TextView inside the UI thread, the code is executed inside runOnUiThread()\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n// TextView responseText = findViewById(R.id.responseText);\n// responseText.setText(\"Failed to Connect to Server\");\n Log.d(\"Flask Server\",\"Failed to connect to server\");\n }\n });\n }", "private void sendToCatEd()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Education'\", Toast.LENGTH_SHORT).show();\n }", "public void showAlert(){\n Loguin.this.runOnUiThread(new Runnable() {\n public void run() {\n AlertDialog.Builder builder = new AlertDialog.Builder(Loguin.this);\n builder.setTitle(\"Login Error.\");\n builder.setMessage(\"User not Found.\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n });\n }", "@Override\n public void onFailure(Call call, final IOException e) {\n activity.runOnUiThread(() -> {\n textView.setText(e.getMessage());\n Toast.makeText(activity, \"fail\", Toast.LENGTH_SHORT).show();\n });\n }", "private void toastMessage (String message){\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onCancelled(DatabaseError error) {\n Toast.makeText(MainActivity.this, \"error\", Toast.LENGTH_SHORT).show();\n }", "protected void error(String error) {\n Toast.makeText(getApplicationContext(), error, Toast.LENGTH_LONG).show();\n }" ]
[ "0.8243605", "0.75909364", "0.7387289", "0.7386915", "0.7362543", "0.7319077", "0.73042464", "0.72970825", "0.7284605", "0.72810507", "0.7276785", "0.72702456", "0.7236901", "0.7236901", "0.72001445", "0.719786", "0.71428365", "0.7136218", "0.71312714", "0.710287", "0.7091424", "0.7061537", "0.7033586", "0.70085293", "0.70004386", "0.6993065", "0.6969447", "0.696227", "0.69028795", "0.6884702", "0.6884702", "0.68721074", "0.6855589", "0.6855589", "0.68392974", "0.6800866", "0.67965305", "0.67932296", "0.6791757", "0.6791757", "0.679078", "0.679078", "0.6790691", "0.67764217", "0.67763704", "0.6759815", "0.6759815", "0.6758092", "0.67538214", "0.67477524", "0.67348015", "0.67348015", "0.67348015", "0.67348015", "0.67348015", "0.6718069", "0.6708903", "0.669654", "0.66804886", "0.66762614", "0.6668562", "0.666358", "0.6627937", "0.6624383", "0.66199666", "0.6613701", "0.66118914", "0.6611571", "0.66072774", "0.66068757", "0.6603356", "0.6603284", "0.6603284", "0.66021943", "0.6598673", "0.65911853", "0.65878975", "0.65858674", "0.657751", "0.6573502", "0.6573342", "0.657159", "0.656495", "0.6555122", "0.65499055", "0.65331274", "0.65331274", "0.65276456", "0.65247035", "0.6521783", "0.651888", "0.6518681", "0.65154743", "0.65107566", "0.6509614", "0.6487219", "0.6486894", "0.6485974", "0.6479256", "0.6459504", "0.6447135" ]
0.0
-1
Put Value Using HashMap
@Override protected Map<String, String> getParams() { Map<String, String> params = new HashMap<String, String>(); params.put("buslabel", sShareBusLable); params.put("direction", sShareDirection); params.put("ss", sSharestopSerial); params = CGlobals_lib_ss.getInstance().getBasicMobileParamsShort(params, Constants_bus.SHARE_BUS_LOCATION_URL, mActivity); String delim = ""; StringBuilder getParams = new StringBuilder(); for (Map.Entry<String, String> entry : params.entrySet()) { getParams.append(delim + entry.getKey() + "=" + entry.getValue()); delim = "&"; } String url1 = Constants_bus.SHARE_BUS_LOCATION_URL; try { String url = url1 + "?" + getParams.toString() + "&verbose=Y"; System.out.println("url " + url); } catch (Exception e) { SSLog_SS.e(TAG + " callBusTrip", e.getMessage()); } return CGlobals_BA.getInstance().checkParams(params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object put(Object key, Object value);", "void put(String key, Object value);", "public Value put(Key key, Value thing) ;", "void setHashMap();", "void putValue(String key, Object data);", "public void put(Object key,Object value) {\n map.put(key,value);\n hashtable.put(key,value);\n }", "public void put(String key, T value);", "protected abstract void put(K key, V value);", "void put(final int hash, final int key, final int value){\r\n//System.out.println(\"put(\"+hash+\",\"+key+\",\"+value+\")\");\r\n if(key==0){\r\n hasZeroKey=true;\r\n zeroValue=value;\r\n return;\r\n }\r\n int i=(hash&hashMask)<<1;\r\n int k;\r\n while((k=data[i])!=0 && k!=key) i=(i+2)&indexMask;\r\n data[i]=key;\r\n data[i+1]=value;\r\n }", "String put(Integer key, String value);", "ValueType put(long key, ValueType entry);", "public abstract V put(K key, V value);", "void put(String name, Object value);", "@Override\n public void putValue(String key, Object value) {\n\n }", "void put(K key, V value);", "void put(K key, V value);", "public boolean put(String key, String value);", "void put(@NonNull String key, @NonNull T value);", "Object put(Object key, Object value) throws NullPointerException;", "public void put(int key, int value) {\n int hashedKey = hash(key);\n Entry entry = map.get(hashedKey);\n if (entry.key == -1){\n // empty entry, insert entry\n entry.key = key;\n entry.value = value;\n }else if (entry.key == key){\n // target entry\n entry.value = value;\n }else{\n // in list, find target entry\n while(entry.key != key && entry.next!=null){\n entry = entry.next;\n }\n if (entry.key == key)\n entry.value = value;\n else\n entry.next = new Entry(key, value);\n }\n }", "public synchronized void put(String key,String val){\n map.put(key, val); \n }", "public void put(Key key, Value val);", "void put(String key, Object obj);", "public int put(int key, String value) {\n int retval = 0;\n\n String sql = \"INSERT INTO data_map(data_key, data_val) VALUES(?, ?)\";\n\n try (Connection con = this.connect();\n PreparedStatement pstmt = con.prepareStatement(sql)) {\n pstmt.setInt(1, key);\n pstmt.setString(2, value);\n retval = pstmt.executeUpdate();\n }\n catch (SQLException e) {\n retval = -1;\n }\n\n return retval;\n }", "V put(K key, V value);", "public void put(int key, int value) {\n\n int index = key % n;\n MapNode node = keys[index];\n// System.out.println(key + \" \" + value + \" \" + (node == null));\n for (int i =0; i < node.list.size(); ++i) {\n if (node.list.get(i) == key) {\n node.list.remove(i);\n vals[index].list.remove(i);\n }\n }\n\n node.list.add(key);\n vals[index].list.add(value);\n }", "public V put(K key, V value);", "public void put(Object key, Object value) {\n\t\tint index = key.hashCode() % SLOTS;\n\t\t// check if key is already present in that slot/bucket.\n\t\tfor(Pair p:table[index]) {\n\t\t\tif(key.equals(p.key)) {\n\t\t\t\tp.value = value; // overwrite value if key already present.\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// if not present, add key-value pair in that slot/bucket.\n\t\tPair pair = new Pair(key, value);\n\t\ttable[index].add(pair);\n\t}", "public V put(K key, V value) {\r\n\t\t// if (this.contains(key)){\r\n\t\t// return this.changeValue(key, value);\r\n\t\t// } else {\r\n\t\treturn linearProbing(key, value);\r\n\t}", "void put(String question, String answer) {\n map.put(question, answer);\n }", "void addEntry(String key, Object value) {\n this.storageInputMap.put(key, value);\n }", "private void put(PrimitiveEntry entry) {\n int hashIndex = findHashIndex(entry.getKey());\n entries[hashIndex] = entry;\n }", "@Override\n\tpublic V put(K key, V value) {\n\t\tint h = Math.abs(key.hashCode()) % nrb;// calculam hash-ul asociat cheii\n\n\t\tfor (int i = 0; i < b.get(h).getEntries().size(); i++) {\n\t\t\t// caut daca cheya mai este folosita si inlocuiesc elementul entry .\n\t\t\tif (b.get(h).e.get(i).getKey().equals(key)) {\n\t\t\t\tV x = b.get(h).getEntries().get(i).getValue();\n\t\t\t\tremove(key);\n\t\t\t\tb.get(h).e.add(new Entry<K, V>(key, value));\n\t\t\t\treturn x;\n\t\t\t}\n\t\t}\n\n\t\tb.get(h).e.add(new Entry<K, V>(key, value));\n\t\treturn null;\n\t}", "@Override\n\tpublic void put(S key, T val) {\n\t\t\n\t}", "private void put(K key, V value) {\n\t\t\tif (key == null || value == null)\n\t\t\t\treturn;\n\t\t\telse if (keySet.contains(key)) {\n\t\t\t\tvalueSet.set(keySet.indexOf(key), value);\n\t\t\t} else {\n\t\t\t\tkeySet.add(key);\n\t\t\t\tvalueSet.add(keySet.indexOf(key), value);\n\t\t\t\tsize++;\n\t\t\t}\n\t\t}", "V put(final K key, final V value);", "public void put(DNA key, long value) {\n total_in++;\n if(this.debug)\n System.out.println(\"ExtHash::put >> insertando cadena: \" + key.toString() + \", hashCode: \" + key.hashCode());\n\n Node actual_node = this.getReference(key);\n if(this.debug)\n System.out.println(\"ExtHash::put >> altura del nodo: \" + actual_node.getAltura());\n\n int reference_page = actual_node.getReference();\n ArrayList<Integer> content = this.fm.read(reference_page); this.in_counter++;\n\n int last_page = reference_page;\n ArrayList<Integer> last_content = content;\n\n int total_elements = 0, altura = actual_node.getAltura();\n while(true) {\n\n if(this.debug)\n System.out.println(\"ExtHash::put >> referencia a pagina: \" + reference_page);\n\n if(this.debug) {\n System.out.println(\"ExtHash::put >> contenido de la pagina:\");\n for(int i=0; i<content.size(); i++)\n System.out.println(\" \" + content.get(i));\n }\n\n total_elements += last_content.get(0);\n if(last_content.get(0) != B-2) {\n if(this.debug)\n System.out.println(\"ExtHash::put >> insertando en: \" + last_page);\n\n ArrayList<Integer> new_content = new ArrayList<>();\n\n new_content.add(last_content.get(0) + 1);\n for(int i=1; i<=last_content.get(0); i++)\n new_content.add(last_content.get(i));\n\n new_content.add(key.hashCode());\n\n if(new_content.get(0) == B-2) {\n total_active_block++;\n new_content.add(this.last);\n\n ArrayList<Integer> last = new ArrayList<>();\n last.add(0);\n this.fm.write(last, this.last); this.out_counter++;\n\n this.last++;\n\n }\n\n if(this.debug) {\n System.out.println(\"ExtHash::put >> contenido en pagina despues de insercion:\");\n for(int i=0; i<new_content.size(); i++)\n System.out.println(\" \" + new_content.get(i));\n }\n\n this.fm.write(new_content, reference_page); this.out_counter++;\n\n total_elements++; // por el elmento que se inserto.\n break;\n\n }\n if(this.debug)\n System.out.println(\"ExtHash::put >> acceciendo a siguiente pagina\");\n\n last_page = last_content.get(B-1);\n last_content = this.fm.read(last_page); this.in_counter++;\n }\n\n // se lleno la pagina y aun no se llega al final del hashing.\n if(total_elements >= B - 2 && altura < 30){\n if(this.debug)\n System.out.println(\"ExtHash::put >> limite de pagina, iniciando duplicacion\");\n\n this.duplicate(actual_node);\n }\n }", "<T> void put(String key, T data);", "@Override\r\n\tpublic void putObject(Object key, Object value) {\n\t\t\r\n\t}", "public void put(int key, int value) {\n store[key] = value; // update operation= overwritten \n }", "private void hashMapPutPlusOne(Map<String, Integer> map, String key) {\n Integer value = map.get(key);\n if (value == null)\n map.put(key, 1);\n else\n map.put(key, value + 1);\n }", "private void put(String aKey, Object aValue) {\n\t\tmData.put(aKey, getValue(aValue));\n\t}", "public V put(K key, V value) {\n\t\tint pos = key.hashCode() / numCub;\n\t\tV valor = this.get(key);\n\t\tif (pos < tam) {\n\t\t\tint indice = tabla.get(pos).keySet().indexOf(key);\n\t\t\tif (indice == -1) {\n\t\t\t\ttabla.get(pos).valueSet().add(value);\n\t\t\t\ttabla.get(pos).keySet().add(key);\n\t\t\t} else {\n\t\t\t\ttabla.get(pos).valueSet().set(indice, value);\n\t\t\t\ttabla.get(pos).keySet().set(indice, key);\n\t\t\t}\n\t\t} else { //Mapa demasiado pequeno, redimensiona y vuelve a intentarlo\n\t\t\tthis.redimensionar();\n\t\t\tthis.put(key, value);\n\t\t}\n\t\treturn valor;\n\t}", "public void put(K key, V value) {\n int keyBucket = hash(key);\n \n HashMapEntry<K, V> temp = table[keyBucket];\n while (temp != null) {\n if ((temp.key == null && key == null) \n || (temp.key != null && temp.key.equals(key))) {\n temp.value = value;\n return;\n }\n temp = temp.next;\n }\n \n table[keyBucket] = new HashMapEntry<K, V>(key, value, table[keyBucket]);\n size++;\n }", "public void put(int key, int value) {\n if (get(key) == -1)\n hashMap.add(new int[]{key, value});\n else {\n hashMap.stream().filter(pair -> pair[0] == key)\n .findAny()\n .map(pair -> pair[1] = value);\n }\n }", "public void put(int key, int value) {\n newkey = hashfunc(key);\n arr[newkey]= value;\n \n }", "void put(Object indexedKey, Object key);", "@Override\n public void put(K key, V value) {\n int index = Math.floorMod(key.hashCode(), entryArr.length);\n if(containsKey(key)) {\n LinkedList<Entry<K, V>> pointer = entryArr[index];\n for(int i = 0; i < pointer.size(); i++) {\n if(pointer.get(i).keyEquals(new Entry<K, V>(key, null))) {\n pointer.get(i).value = value;\n break;\n }\n }\n } else {\n if(loadFactor()>maxLoad) {\n resize();\n }\n if (entryArr[index] == null) {\n entryArr[index] = new LinkedList<Entry<K, V>>();\n }\n entryArr[index].addLast(new Entry<K, V>(key, value));\n size++;\n }\n }", "boolean put(K key, V value);", "public V put(K key, V value) {\n if (null == key) {\n return isertNullKey(key, value);\n } else {\n // inserting other keys\n int location = hashFunction(key.hashCode());\n if (location / capacity >= loadFactor) {\n resize();\n }\n MyEntry<K, V> entry = null;\n entry = bucket[location];\n //if a value exists with same key, we are not overriding that value, just returning the same,\n //in hashMap they actually override the new value\n if (entry != null && key == entry.getKey()) {\n return entry.getValue();\n } else {\n MyEntry ent = new MyEntry();\n ent.setKey(key);\n ent.setValue(value);\n bucket[location] = ent;\n return value;\n }\n\n }\n }", "public Object putItem (String key, Object item);", "private V put(K key, V value, Chain<K, V>[] table) {\r\n int index = key.hashCode() % table.length;\r\n if (index < 0)\r\n index += table.length;\r\n if (table[index]== null)\r\n {\r\n table[index] =new Chain<>(key,value) ;\r\n numKeys++;\r\n return null;\r\n }\r\n else if(table[index].data.equals(key))\r\n return table[index].data.setValue(value);\r\n else if (table[index].next==null)\r\n {\r\n table[index].next=new HashtableChain<>(prime);\r\n prime=previousPrime(prime-1);\r\n numKeys++;\r\n return table[index].next.put(key,value);\r\n }else\r\n return put(key,value,table[index].next.table);\r\n }", "void set(String key, Object value);", "public void put(K key, T elem);", "public boolean put( AnyType key , AnyType value)\n { \n int currentPos = findPos( key );\t//TODO: test this\n \n if( array[ currentPos ] == null )\n ++occupied;\n array[ currentPos ] = new HashEntry<>(key, value);\n \n theSize++;\n \n // Rehash\n if( occupied > array.length / 2 )\n rehash( );\n \n return true;\n }", "public void put(int key, int value) {\n map.put(key,value);\n }", "public void put (String key, Object value) {\n if (trace) {\n getProfiler().checkPoint(\n String.format(\" %s='%s' [%s]\", key, value, Thread.currentThread().getStackTrace()[2])\n );\n }\n getMap().put (key, value);\n synchronized (this) {\n notifyAll();\n }\n }", "public void put(int key, String name){\n\t\tif(get(key)==null){\n\t\t\thashMap[key] = name;\n\t\t\tSystem.out.println(name + \" stored in map under this key \" + key);\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(key + \" is already in the map\");\n\t\treturn;\n\t}", "public native Map<K, V> set(K key, V value);", "void set(K key, V value);", "public void put(K key, V value) {\n if (null == key) {\n throw new IllegalStateException(\"Null value for key is \" +\n \"unsupported!\");\n }\n\n Node<Pair<K, V>> node = findItem(key);\n\n if (node != null) {\n node.getData().value = value;\n return;\n }\n\n Pair<K, V> entry = new Pair<>(key, value);\n\n int hash1 = hash1(key);\n int hash2 = hash2(key);\n\n int count1 = table[hash1] == null ? 0 : table[hash1].list.getCount();\n int count2 = table[hash2] == null ? 0 : table[hash2].list.getCount();\n\n if (count1 <= count2) {\n if (table[hash1] == null) {\n table[hash1] = new Entry<>();\n }\n\n table[hash1].list.put(entry);\n } else {\n if (table[hash2] == null) {\n table[hash2] = new Entry<>();\n }\n\n table[hash2].list.put(entry);\n }\n\n if (++elementsCount > table.length * OCCUPANCY) {\n rehash();\n }\n }", "void put(K id, V cacheable);", "@Override\n\tpublic void put(Object key, Object val) {\n\t\tif(st[hash(key)].size()>=k)\n\t\t\tst[hash(key)].clear();\n\t\tst[hash(key)].put(key, st[hash(key)].size());\n\t}", "@Override\n\t@TimeComplexity(\"O(n)\")\n\tpublic V put(K key, V value) {\n\t/* TCJ\n\t * Binary search operation: log n\n\t * Iterate through new collection: n\n\t */\n\t\t//.getKey().compareTo(null) == 0\n\t\tV oldValue;\n\t\tint j = findIndex(key);\n\t\tif ( map.get(j) == null ) {\n\t\t\toldValue = null;\n\t\t} else {\n\t\t\toldValue = map.get(j).getValue();\n\t\t}\n\t\t\n\t\tif ( j < size() && key.compareTo(map.get(j).getKey()) == 0) {\n\t\t\tmap.get(j).setValue(value);\n\t\t\treturn oldValue;\n\t\t}\n\t\tmap.add(j, new mapEntry<K, V>(key, value));\n\t\treturn null;\n\t}", "protected V bucketPut(int h, K k, V v) {\n int j = findSlot(h, k);\n if (j >= 0) // this key has an existing entry\n return table[j].setValue(v);\n table[-(j + 1)] = new MapEntry<>(k, v); // convert to proper index\n n++;\n return null;\n }", "void put(int partitionID, String key, String value);", "public abstract void map(String key, String value) throws Exception;", "public V put(K key, V value) {\n System.out.println(\"SimpleHashMap.put\");\n return mMap.put(key, value);\n }", "private void storeValues(int source,\n Map<VWBetw, Double> map,\n DiskBufferDriver output) throws DriverException {\n for (Entry<VWBetw, Double> e : map.entrySet()) {\n storeValue(source, e.getKey().getID(), e.getValue(), output);\n }\n }", "public void put(String key, int value) {\r\n //creating hash code using key value given as a string\r\n int hash = new BigInteger(toAscii(key)).mod(new BigInteger(((Integer)TABLE_SIZE).toString())).intValue();\r\n while (table[hash] != null && table[hash].getKey() != key)\r\n hash = (hash + 1) % TABLE_SIZE;\r\n table[hash] = new HashEntry(key, value);\r\n }", "public void put(Key key,Value value){\n\t\troot = insert(root,key,value);\n\t}", "public void put(K key, V value) {\r\n size++;\r\n checkAndModifySize();\r\n\r\n Node newElement = new Node(key, value);\r\n int currentHash = newElement.hash % data.length;\r\n if (currentHash < 0){\r\n currentHash *= -1;\r\n }\r\n\r\n if (data[currentHash] == null) {\r\n data[currentHash] = newElement;\r\n } else {\r\n Node currentElement = data[currentHash];\r\n while (currentElement.next != null) {\r\n if (currentElement.key == key || currentElement.key.equals(key)) {\r\n currentElement.value = value;\r\n size--;\r\n return;\r\n }\r\n currentElement = currentElement.next;\r\n }\r\n currentElement.next = newElement;\r\n }\r\n }", "@Override\r\n\tpublic V putElement(K key, V value) {\n\t\t\r\n\t\tif (capacity == 0)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tif (hashMap.isEmpty()) {\r\n\t\t\thashMap.put(key, value);\r\n\t\t\tque.add(key);\r\n\t\t\treturn value;\r\n\t\t}\t\t\r\n\t\t\r\n\t\tV element = getElement(key);\r\n\t\tV returnValue = hashMap.get(que.get(0));\r\n\t\t\r\n\t\tif (element == null) {\r\n\t\t\tif (hashMap.size() == capacity){\r\n\t\t\t\tremoveElement(que.get(0));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\thashMap.put(key, value);\r\n\t\t\tque.add(key);\r\n\t\t}\r\n\t\t\r\n\t\treturn returnValue;\r\n\t}", "protected Object putElement(int key, Object value) {\n int index = key % capacity;\n if (index < 0) {\n index = -index;\n }\n if (map[index] == null) {\n //.... This is a new key since no bucket exists\n objectCounter++;\n map[index] = create(key, value);\n contents++;\n if (contents > maxLoad) {\n rehash();\n }\n return null;\n } else {\n //.... A bucket already exists for this index: check whether \n // we already have a mapping for this key\n MapElement me = map[index];\n while (true) {\n if (me.getKey() == key) {\n return me.atInsert(value);\n } else {\n if (me.getNext() == null) {\n // No next element: so we have no mapping for this key\n objectCounter++;\n MapElement result = create(key, value);\n me.setNext(result);\n contents++;\n if (contents > maxLoad) {\n rehash();\n }\n return null;\n } else {\n me = me.getNext();\n }\n }\n }\n }\n }", "void updateEntry(K key, V value);", "public void put(int key, int value) {\n if(map.get(key) != null){\n Node node = map.get(key);\n node.value = value;\n deleteNode(node);\n addToHead(node);\n } else {\n Node node = new Node(key, value);\n map.put(key, node);\n if(size < capacity){\n size++;\n addToHead(node);\n } else {\n map.remove(tail.prev.key);\n deleteNode(tail.prev);\n addToHead(node);\n }\n }\n }", "void write(K key, V value);", "@Override\n public V put(K key, V value) {\n\n \tV tempValue = get(key);\n \t\n \tLinkedList<Entry> tempBucket = chooseBucket(key);\n \t\n \tif(tempValue != null) {\n \t\tfor(int i=0;i<tempBucket.size();i++) {\n\t \t\tEntry tempEntry = tempBucket.get(i);\n\t \t\t\n\t \t\tif(tempEntry.getKey() == key) {\n\t \t\t\tV returnValue = tempEntry.getValue();\n\t \t\t\ttempEntry.setValue(value);\n\t \t\t\treturn returnValue;\n\t \t\t}\n\t \t}\n \t} else {\n \t\tsize ++;\n \t\ttempBucket.add(new Entry(key, value));\n \t}\n \t\n \tif(size > buckets.length*ALPHA) {\n \t\trehash(GROWTH_FACTOR);\n \t}\n \t\n return tempValue;\n }", "void add(ThreadLocal<?> key, Object value) {\n for (int index = key.hash & mask;; index = next(index)) {\n Object k = table[index];\n if (k == null) {\n table[index] = key.reference;\n table[index + 1] = value;\n return;\n }\n }\n }", "private HashEntry(K insertKey, V insertValue)\r\n\t\t{\r\n\t\t\tkey = insertKey;\r\n\t\t\tvalue.add(insertValue);\r\n\t\t}", "@Override\n public T put(String key, T value) {\n T old = null;\n // Do I have an entry for it already?\n Map.Entry<String, T> entry = entries.get(key);\n // Was it already there?\n if (entry != null) {\n // Yes. Just update it.\n old = entry.setValue(value);\n } else {\n // Add it to the map.\n map.put(prefix + key, value);\n // Rebuild.\n rebuildEntries();\n }\n return old;\n }", "@Override\n public void put(K key, V value) {\n root = putHelper(key,value,root);\n }", "@Override\n public void put(K key, V value) {\n // Note that the putHelper method considers the case when key is already\n // contained in the set which will effectively do nothing.\n root = putHelper(root, key, value);\n size += 1;\n }", "public void put(String key, Object value)\n\t{\n\t\tverifyParseState();\n\t\tvalues.put(key, ValueUtil.createValue(value));\n\t}", "public void put(String key, Character val){\r\n\t\tint hash = hash(key);\r\n\t\tfor(int i = 0; i < M; i++){\r\n \tif(hash + i < M){\r\n \tif(keys[hash + i] == null || keys[hash + i].equals(key)){\r\n assign(hash + i, key, val);\r\n N++;\r\n break;\r\n \t\t}\r\n \t}else{\r\n \tif(keys[hash + i - M] == null || keys[hash + i - M].equals(key)){\r\n \tassign(hash + i - M, key, val);\r\n \tN++;\r\n \tbreak;\r\n \t}\r\n \t}\r\n\t\t}\r\n\t\treturn;\r\n\t}", "public void setValue(K key, V value);", "public Object putTransient(Object key, Object value);", "@Override\n public V put(K key, V value) {\n reverseMap.put(value, key);\n return super.put(key, value);\n }", "public abstract void Put(WriteOptions options, Slice key, Slice value) throws IOException, BadFormatException, DecodeFailedException;", "public void put(K key, V val) {\n int index = findIndex(key);\n // the real reason we bother to check is \n // to know whether or not to increment pairs.\n if (keys[index] == null) {\n keys[index] = key;\n values[index] = val;\n }\n else\n values[index] = val;\n }", "void addEntry(K key, V value);", "public void put(Value key, Value value) {\n\t\tstorage.put(key, value);\n\t}", "public abstract void putAll(AbstractIntHashMap map);", "Object insert(String key, Object param);", "public void put(Object key, Object value) throws Exception {\n CacheEntry entry = (CacheEntry)_hash.get(key);\n if (entry != null) {\n entry.setValue(value);\n touchEntry(entry);\n } else {\n\n if (_hash.size() == _max) {\n // purge and recycle entry\n entry = purgeEntry();\n entry.setKey(key);\n entry.setValue(value);\n } else {\n entry = new CacheEntry(key, value);\n }\n addEntry(entry);\n _hash.put(entry.getKey(), entry);\n }\n }", "public void put(int key, int value) {\n int index = keys.indexOf(key);\n if(index >= 0) {\n values.set(index, value);\n } else {\n keys.add(key);\n values.add(value);\n }\n }", "public void map(Object key, Text value, Context context)\n\t\t\t\t\tthrows IOException, InterruptedException\n\t\t\t\t\t{\n\t//Passing the string and splitting it by comma separated and storing it in string array\n\t\t\t\tString[] arr_new = value.toString().split(\",\");\n //Inserting the value at the 2nd position of the string array\n\t\t\t\tspeed.set(arr_new[14]);\n\t//Inserting the value at the 4th position of the string array and parsing it to integer\n\t\t\t\taccidents.set(Integer.parseInt(arr_new[6]));\n\t//Passing the key and value to context buffer of the Map output \n\t\t\t\tcontext.write(speed, accidents);\n\t\t\t\t\n\t\t\t\t\n\t\t}", "public void put(int key, int value) {\n int hashCode = key%nodes.length;\n if (nodes[hashCode]==null)\n nodes[hashCode] = new ListNode(-1,-1);\n ListNode pre = findPrev(key);\n if (pre.next==null){\n pre.next = new ListNode(key,value);\n size++;\n }\n else\n pre.next.val = value;\n\n if (size/nodes.length>LOAD_FACTOR){\n rehash();\n }\n }", "public void attach(Object key, Object value);", "public static void put(String key,Object value){\n getThreadContext().put(key,value);\n }", "protected abstract void put(CacheKey cacheKey);" ]
[ "0.71973574", "0.6976438", "0.6910907", "0.68698376", "0.6851966", "0.68216217", "0.67192584", "0.6713592", "0.6712292", "0.6709198", "0.67002106", "0.6693453", "0.6676485", "0.6612553", "0.6609179", "0.6609179", "0.65700555", "0.65627396", "0.6551009", "0.6548328", "0.6521999", "0.6500057", "0.6500037", "0.6496091", "0.64890385", "0.64745367", "0.64419836", "0.64266", "0.64173704", "0.6414158", "0.63985145", "0.6380276", "0.63800365", "0.63686556", "0.6336173", "0.6332888", "0.63311505", "0.6319827", "0.62999666", "0.62930834", "0.627707", "0.6269611", "0.624895", "0.62415063", "0.6240545", "0.62379485", "0.6234492", "0.62226474", "0.6217861", "0.62103355", "0.618314", "0.6152827", "0.61476684", "0.61447954", "0.61444545", "0.61372524", "0.6136842", "0.6129513", "0.6126581", "0.6107616", "0.6106427", "0.6096795", "0.6089212", "0.60870624", "0.6085952", "0.6077122", "0.60740674", "0.60655785", "0.60649514", "0.6064551", "0.6061117", "0.6035942", "0.6032417", "0.6025022", "0.6014273", "0.6006741", "0.6002163", "0.5991991", "0.59914035", "0.59877336", "0.5985383", "0.59851676", "0.5980979", "0.5965823", "0.5964012", "0.59631413", "0.59581995", "0.59542835", "0.5952465", "0.5942699", "0.5942566", "0.59366715", "0.5930809", "0.59295326", "0.5928959", "0.592856", "0.5927936", "0.58998716", "0.58894664", "0.58891135", "0.58827776" ]
0.0
-1
instance variables and constructors could be used, but are not really needed getSum() will return the sum of the numbers from start to stop, not including stop
public static int getSum(int[] numArray, int start, int stop) { int sum = 0; for(int i = start; i<=stop; i++) sum = sum+numArray[i]; return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getSum();", "double getSum();", "private static int findSum(int[] nums, int start, int end) {\n int sum = 0;\n for ( int i = start ; i < end ; i++ ) {\n sum = sum + nums[i];\n }\n return sum;\n }", "public double getSum()\n {\n return first + second;\n }", "private static BigInteger findSum(BigInteger start, BigInteger end) {\n return start.add(end).multiply(end.subtract(start).add(new BigInteger(\"1\"))).divide(new BigInteger(\"2\"));\n }", "public int robTotal(int[] nums, int sums[],int start, int end) {\n\t\tfor (int i = start; i< end+1; i++) {\n\t\t\trobRecAtIndex(i, nums, sums);\n\t\t}\n\t\treturn sums[end];\n\t}", "public int getSum() {\n\t\t\treturn 0;\r\n\t\t}", "@Override\n\tpublic int sum() {\n\t\treturn this.first + this.second + this.third;\n\t}", "public Integer getSum() {\n return sum;\n }", "public String getSum();", "public int sum(int array[], int start, int finish) {\r\n\t\tint sum = 0;\r\n\t\tint i = 0;\r\n\t\tfor (i = start; i < finish; i++) {\r\n\t\t\tsum += array[i];\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "int calculate() {\n return getSum() + b1;\n }", "public int GetSum(int a, int b) {\n\t\tint result = 0;\r\n\t\tint number = 0;\r\n\t\t\r\n\t\t//If a is greater than b, I will loop through all the integers between them, starting by b and summing 1 in every step of the loop \r\n\t\tif (a > b) {\r\n\r\n\t\t\tfor (int x = b; x <= a; x++) {\r\n\t\t\t\t//The number variable will be the x step of the loop, starting from b\r\n\t\t\t\tnumber = x;\r\n\t\t\t\tresult += number;\r\n\t\t\t\tnumber++;\r\n\t\t\t}\r\n\t\t//It will be similar if a is greater than b, but starting counting from a\r\n\t\t} else if (a < b) {\r\n\t\t\tfor (int x = a; x <= b; x++) {\r\n\t\t\t\tnumber = x;\r\n\t\t\t\tresult += number;\r\n\t\t\t\tnumber++;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t//If the two values are similar, the method just return one of them, ie a:\r\n\t\telse {\r\n\t\t\tresult = a;\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\t//Finally the method return the result.\r\n\t\treturn result;\r\n\r\n\t}", "public double getSUM() {\n return sum;\n }", "int getSuma();", "public Integer sumLogic(int startingNumber, int endingNumber){\n\t\tSystem.out.println(\"Print Sum from this number\");\n\t\tint sum = 0;\n\t\tfor(int x = startingNumber; x <= endingNumber; x++){\n\t\t\tsum = sum + x;\n\t\t\tSystem.out.println(\"New number is: \" + x + \" sum: \" + sum);\n\t\t}\n\t\treturn 0;\n\t}", "public static void main(String[] args) {\n\t\tint start,end;\r\n\t\tint sum=0;\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"enter the start number\");\r\n\t\tstart = scan.nextInt();\r\n\t\t\r\n\t\tSystem.out.println(\"enter the end number\");\r\n\t\tend = scan.nextInt();\r\nfor(int i=start;i<=end;i++)\r\n\t{\r\n\t\tfor(int j=1;j<i;j++)\r\n\t\t{\r\n\t\tsum = sum+j;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\tif (sum==start)\r\n\t\r\n\t\tSystem.out.println(sum);\r\n\t\r\n\t\r\n}", "public int calcSum() {\n\t\tint sum = 0;\n\t\tfor (int count = 0; count < data.size(); count++)\n\t\t\tsum += (int)data.get(count);\n\t\treturn sum;\n\t}", "public long getSum()\n {\n long sum = 0;\n\n for(int i = 0; i < integerList.length; i++)\n {\n sum = sum + integerList[i];\n }\n\n return sum;\n }", "public double sum() {\n/* 196 */ return this.mean * this.count;\n/* */ }", "public SumNumbersTest() {\r\n\r\n super();\r\n this.sumNumbers = new SumNumbers();\r\n }", "public int sum()\n {\n return sum(0,0,size);\n }", "double getTotal();", "CheckSum generateCheckSum();", "public static int sum(int begin, int end) {\n\t\tif (begin == end)\n\t\t\treturn begin;\n\t\tint mid = (begin + end) / 2;\n\t\treturn sum(begin, mid) + sum(mid + 1, end);\n\n\t}", "static int sum(int a, int b) {\n return a+b;\r\n }", "public double sum() {\n double sum = x;\n Lista iter = new Lista(this);\n while (iter.next != null) {\n sum += iter.next.x;\n iter = iter.next;\n }\n return sum;\n }", "public T sum();", "public Integer calculateSum() {\n logger.debug(\"Calculating and returning the sum of expenses.\");\n return listOfTargets.stream().map(T::getAmount).reduce(0, Integer::sum);\n }", "public int sum() {\n\t\treturn (x + y);\n\t}", "public Double getTotal();", "default int sumOfAll(int a, int b) {\n\t\t\treturn 0;\n\t\t}", "public double get(){\n sum = 0;\n if(hasFilled){\n for(int j=0; j<list.length; j++)\n {\n sum += list[j];\n }\n \n return sum/(double)list.length;\n }\n else{\n for(int j = 0; j < index;j++){\n sum += list[j];\n }\n return sum/(double)index;\n }\n }", "public int suma(){\r\n return x+y;\r\n }", "private Rational computeDirectly() {\n BigInteger _26390k = _26390.multiply(BigInteger.valueOf(start));\n BigInteger _24591257856pk = _24591257856.pow(start);\n\n Rational sum = Rational.ZERO;\n\n for (int k = start; k < end; k++) {\n BigInteger num = Factorial.verified(BigInteger.valueOf(k << 2));\n num = num.multiply(_1103.add(_26390k));\n\n BigInteger den = Factorial.verified(BigInteger.valueOf(k)).pow(4);\n den = den.multiply(_24591257856pk);\n\n _26390k = _26390k.add(_26390);\n _24591257856pk = _24591257856pk.multiply(_24591257856);\n\n sum = sum.add(Rational.valueOf(num, den).dropTo(context));\n sum = sum.dropTo(context);\n }\n return sum;\n }", "private void getSum() {\n\t\tint sum =0;\r\n\t\t\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\tif(products[i] != null)\r\n\t\t\t\tsum += products[i].getPrice();\r\n\t\t}\r\n\t\tSystem.out.println(sum);\r\n\t}", "public static int p_sum(){\n Scanner keyboard = new Scanner(System.in);\n System.out.println(\"please put the how many numbers you want to sum:\");\n int v_sum_numbers = keyboard.nextInt();\n int v_total_sum= 0;\n for (int i=1; i<=v_sum_numbers;i=i+1){\n System.out.println(\"please input the \"+i+\" number: \");\n int v_sum_num = keyboard.nextInt();\n v_total_sum= v_total_sum+v_sum_num;\n }\n return v_total_sum;\n }", "public long sum() {\n\t\tlong result = 0;\n\t\tfor (int i=0; i<numElements; i++) {\n\t\t\tresult += theElements[i];\n\t\t}\n\t\treturn result;\n\t}", "public int sumar(){\n return this.a+this.b;\n }", "@Override\r\n protected BigDecimal getSum() {\r\n boolean handleOutOfMemoryError = false;\r\n BigDecimal sum = BigDecimal.ZERO;\r\n Grids_GridDouble g = getGrid();\r\n int nrows = g.getChunkNRows(ChunkID, handleOutOfMemoryError);\r\n int ncols = g.getChunkNCols(ChunkID, handleOutOfMemoryError);\r\n double noDataValue = g.getNoDataValue(false);\r\n double value;\r\n int row;\r\n int col;\r\n for (row = 0; row < nrows; row++) {\r\n for (col = 0; col < ncols; col++) {\r\n value = getCell(row, col);\r\n if (Double.isNaN(value) && Double.isFinite(value)) {\r\n if (value != noDataValue) {\r\n sum = sum.add(new BigDecimal(value));\r\n }\r\n }\r\n }\r\n }\r\n return sum;\r\n }", "public int sum2() {\n\t\tint ans = 0;\n\t\tfor (ListNode<T> p = this; p != null; p = p.next) {\n\t\t\tans = ans + p.value; // fail!\n\t\t}\n\t}", "private long calcSum(int a, int b) {\n return (new Long(a) + new Long(b));\n }", "int getSumaAdunata();", "public int sum() {\n\n\t\t// Decide the max number of threads required to count.\n\t\tint maxThreads = numArr.length / NUMBERS_PER_THREAD;\n\t\tint reminder = numArr.length % NUMBERS_PER_THREAD;\n\t\tif (reminder > 0) {\n\t\t\tmaxThreads += 1;\n\t\t}\n\n\t\t// The list to which the results should be added.\n\t\tList<Integer> resultList = Collections.synchronizedList(new ArrayList<Integer>());\n\n\t\t// The list containing threads created.\n\t\tList<Thread> threadList = new ArrayList<Thread>();\n\n\t\t// Create and start threads.\n\t\tint fromIndex = 0;\n\t\tfor (int i = 0; i < maxThreads; i++) {\n\t\t\tString threadName = \"Thread-\" + (i + 1);\n\t\t\tArraySumThread thread = new ArraySumThread(threadName, numArr, fromIndex, NUMBERS_PER_THREAD, resultList);\n\t\t\tfromIndex += NUMBERS_PER_THREAD;\n\t\t\tthreadList.add(thread);\n\t\t\tthread.start();\n\t\t}\n\n\t\t// Join all threads.\n\t\tfor (int i = 0; i < threadList.size(); i++) {\n\t\t\tThread thread = threadList.get(i);\n\t\t\t// System.out.println(\"Waiting for end of thread: \" + thread.getName());\n\t\t\ttry {\n\t\t\t\tthread.join();\n\t\t\t\t// System.out.println(\"Finished thread: \" + thread.getName());\n\t\t\t} catch (InterruptedException e) {\n\t\t\t}\n\t\t}\n\n\t\t// Sum the values returned added by each thread to the resultList\n\t\tint sum = 0;\n\t\tfor (Integer value : resultList) {\n\t\t\tsum += value;\n\t\t}\n\n\t\t// Return sum.\n\t\treturn sum;\n\t}", "public static int sumRange(int a, int b) {\r\n int sum = 0;\r\n int big = 0;\r\n int small = 0;\r\n \r\n if (a > b) {\r\n big = a;\r\n small = b;\r\n } else {\r\n big = b;\r\n small = a;\r\n }\r\n for(int i = small; i <= big; i++) {\r\n //System.out.println( i );\r\n sum += i;\r\n }\r\n return sum;\r\n }", "public java.math.BigDecimal getSum() {\n\treturn sum;\n}", "public static void main(String[] args)\r\n {\n int sum=0;\r\n for (int i=1; i<=10; i++)\r\n sum += i;\r\n System.out.printf(\"The sum was: %d%n\", sum);\r\n \r\n //new way using Streams\r\n System.out.printf(\"The sum with streams is: %d%n\", IntStream.rangeClosed(1,10)\r\n .sum());\r\n \r\n \r\n }", "public void sumValues(){\n\t\tint index = 0;\n\t\tDouble timeIncrement = 2.0;\n\t\tDouble timeValue = time.get(index);\n\t\tDouble packetValue;\n\t\twhile (index < time.size()){\n\t\t\tDouble packetTotal = 0.0;\n\t\t\twhile (timeValue < timeIncrement && index < packets.size()){\n\t\t\t\ttimeValue = time.get(index);\n\t\t\t\tpacketValue = packets.get(index);\n\t\t\t\tpacketTotal= packetTotal + packetValue;\n\t\t\t\tindex = index + 1;\n\t\t\t}\n\t\t\tArrayList<Double> xy = new ArrayList<Double>();\n\t\t\txy.add(timeIncrement);\n\t\t\txy.add(packetTotal);\n\t\t\ttotalIncrements.add(xy);\n\t\t\t// to get max and min need separate arrays\n\t\t\ttimeIncrements.add(timeIncrement);\n\t\t\tbyteIncrements.add(packetTotal);\n\t\t\ttimeIncrement = timeIncrement + 2.0;\t\n\t\t}\n\t\treturn;\n\n\t}", "public TwoSum() {\n numbers = new HashSet<>();\n twoSums = new HashSet<>();\n \n }", "public int getSum(int x, int y){\n return x+y;\n }", "public Integer sumNumbers(List<Integer> numbers) throws Exception;", "public Integer rollAndSum() {\n return null;\n }", "private float getSubSum(){\n float sum = 0;\n for(int i = 0; i < subList.size(); i++){\n sum = sum + subList.get(i).getCost();\n }\n return sum;\n }", "static int sumOf1To100nos() {\r\n\t\t \r\n\t\t int sum =0;\r\n\t\t \r\n\t\t for(int i=1; i<=100;i++) {\r\n\t\t\t sum+=i;\r\n\t\t }\r\n\t\t \r\n\t\t return sum;\r\n\t }", "public static int Sum(int a, int b)\r\n\t{\n\tint sum=a+b;\r\n\treturn sum;\r\n\t}", "static int sumOfNumbers(int x, int y) {\n return x + y;\n }", "public static int sumRange(int c) {\r\n int sum = 0;\r\n for(int i = 0; i <= c; i++) {\r\n //System.out.println( i );\r\n sum += i;\r\n } \r\n return sum;\r\n }", "@Override\r\n\tpublic double calculate() {\n\r\n\t\treturn n1 + n2;\r\n\t}", "int sum(int a, int b) {\n return a + b;\n }", "public static void main(String[] args) {\n\t\tint []nums = {-2,0,3,-5,2,-1};\n\t\tNumArray obj = new NumArray(nums);\n\t\tSystem.out.println(obj.sumRange(0, 2));\n\t}", "public double getTotal (){ \r\n return total;\r\n }", "@Test\n public void testSum() {\n Calculator calculator = new Calculator();\n \n int sumResult = calculator.sum(5, 7);\n \n Assert.assertEquals(12, sumResult);\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"First: \");\n int firstNumber = scanner.nextInt();\n System.out.println(\"Last: \");\n int lastNumber = scanner.nextInt();\n int sum = 0;\n\n for( int i = firstNumber; i<= lastNumber; i++){\n sum +=i;\n\n }\n System.out.println(\"The sum is \" + sum);\n }", "public static void main(String[] args) {\n\t\t int s = MethodDemo2.findSum();\r\n\t\t System.out.println(\"Sum is : \" + s);\r\n\t }", "public double sum() {\n double resultat = 0;\n for (int i = 0; i < tab.size(); i++) {\n resultat += CalculatorArray.sum(tab.get(i));\n }\n System.out.println(\"Sum colonne:\" + resultat);\n return resultat;\n }", "protected int sumIterative(int a, int b){\n int result = a;\n while (b != 0){\n if (b > 0){\n result++;\n b--;\n } else {\n result--;\n b++;\n }\n }\n return result;\n }", "public void setSum(Integer sum) {\n this.sum = sum;\n }", "public void setSum(long sum)\n {\n this.sum = sum;\n }", "private static int sum(List<Integer> L, int i,int j) {\n\t\tSystem.out.println(L+\"\\n\"+\"index i = \"+i+\"\\n\"+\"index j = \"+j);\n\t\tList<Integer> subListToSum = new ArrayList<Integer>();\n\t\t\n\t\tif (i <= j) { //make sure that i is less than j so we have a sublist of at least one\n\t\t\tsubListToSum.addAll(L.subList(i, j));\n\t\t\t\n\t\t}\n\t\t\n\t\telse if (i > j) { //print out a error so the user knows what they did wrong\n\t\t\tSystem.out.println(\"index 'i' is more than index 'j'\");\n\t\t}\n\t\t\n\t\tint sizeList = L.size(); //only reaches here if i <= j\n\t\tSystem.out.println(\"size of list is: \" + sizeList);\n\t\tif (j <= sizeList & i <= sizeList) { //check to account for out of bounds and negatives\n\t\t\tint result = 0;\n\t\t\t\n\t\t\tfor (int allInts : subListToSum) {\n\t\t\t\tresult += allInts;\n\t\t\t};\n\t\t\t\n\t\t\tSystem.out.println(\"Sum(\" + i + \", \" + j + \")\" + \" = \" + result);\n\t\t}\n\t\t\n\t\treturn 0;\n\t}", "public static void main(String[] args) {\n\r\n int sum = 0;\r\n\r\n for (int i = 0; i <=10 ; i++) {\r\n sum += i;\r\n }\r\n System.out.println(sum);\r\n\r\n }", "@Test\r\n public void testGetSum() {\r\n System.out.println(\"getSum\");\r\n int x = 0;\r\n int y = 0;\r\n Calculate instance = new Calculate();\r\n int expResult = 0;\r\n int result = instance.getSum(x, y);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public static double sum() {\n System.out.println(\"Enter augend\");\n double a = getNumber();\n System.out.println(\"Enter addend\");\n double b = getNumber();\n\n return a + b;\n }", "Integer total();", "@Override\n public Integer reduce(Integer value, Integer sum) {\n return value + sum;\n }", "public LinkedListSum() {}", "public String getSum() {\n return sum;\n }", "public static void main(String[] args) {\n\t\tint sum=0;\n\t\tfor(int i=0; i<11; i++) {\n\t\t\tSystem.out.println(\"sum till \" +i+ \" \" + (sum = sum + i));\n\t\t\t\n\t\t}\n\t\tsum = 0;\n\t\tfor(int i=10; i>=0; i--) {\n\t\t\tSystem.out.println(\"sum till \" +i+ \" \" + (sum = sum + i));\n\t\t\t\n\t\t\n\t}\n\t}", "@Test\n\tpublic void testSum() {\n\t\tassertEquals(155, g1.sum(), .0001);\n\t\tassertEquals(226, g2.sum(), .0001);\n\t\tassertEquals(298, g3.sum(), .0001);\n\t}", "@Override\n\t\t\tpublic Integer call(Integer sum, Integer i) throws Exception {\n\t\t\t\treturn sum+i;\n\t\t\t}", "public TwoSum() {\n list = new ArrayList();\n map = new HashMap();\n }", "public int rangeSum(int L, int R)\r\n {\r\n int sum;\r\n return sum = rangeSum(root, L, R);\r\n\r\n }", "public int sumRange(int l, int r) {\n l += n;\n // get leaf with value 'r'\n r += n;\n int sum = 0;\n while (l <= r) {\n if ((l % 2) == 1) {\n sum += tree[l];\n l++;\n }\n if ((r % 2) == 0) {\n sum += tree[r];\n r--;\n }\n l /= 2;\n r /= 2;\n }\n return sum;\n }", "private static int sum(int[] coins,int coinsCount,int startIndex){\n int sum = 0;\n for(int c1=startIndex;c1<startIndex+coinsCount;c1++){\n sum += coins[c1];\n }\n return sum;\n }", "public static void main(String[] args) {\n\t\tSumIntegers k = new SumIntegers();\r\n\tint results = k.sum(78, 98);\r\n\tSystem.out.println(results);\r\n\t\t\r\n\t\r\n\t}", "@Test\r\n public void testGetSumShouldReturnSumOfIntegersInNestedList() {\r\n nestedList=new NestedList();\r\n int sum=nestedList.getsum();\r\n assertEquals(420,sum);\r\n }", "public int sumRange(int i, int j) {\n return sum[j + 1] - sum[i];\n }", "public static double getSum(long num) {\r\n double total = 0;\r\n for(int i = 0; i < digitBit.length; i ++){\r\n double sum = 0;\r\n Bucket bkt = digitBit[i].bucket;\r\n //find sum of buckets of size (j+1)\r\n while(bkt.endTimestamp >= (currentTimeStamp - num + 1)){\r\n sum += bkt.size;\r\n if(bkt.next != null){\r\n bkt = bkt.next;\r\n }else{\r\n break;\r\n }\r\n }\r\n if(bkt.startTimeStamp >= (currentTimeStamp - num + 1)){\r\n sum += (bkt.size)/2;\r\n }\r\n //add the contribution of ith position bits to the total\r\n total += sum * Math.pow(2, i);\r\n }\r\n return total;\r\n }", "public static void main(String[] args){\n Scanner s = new Scanner(System.in);\n System.out.print(\"Enter the first integer: \");\n int intI=Integer.valueOf(s.nextLine());\n System.out.print(\"Enter the second integer: \");\n int intJ=Integer.valueOf(s.nextLine());\n Summation summation=new Summation(intI,intJ);\n System.out.println(\"The sum is: \"+summation.total());\n }", "static int sum(int value1, int value2) {\n return value1 + value2;\n }", "public void exercise_4_31()\n {\n int index = 0;\n int sum = 0;\n \n while (index < 10) {\n index++;\n sum += index;\n }\n System.out.println(sum);\n }", "Double getTotalSpent();", "public static void main(String[] args) {\n range(1, 1000).sum();\n range(1, 1000).reduce(0, Integer::sum);\n Stream.iterate(0, i -> i + 1).limit(1000).reduce(0, Integer::sum);\n IntStream.iterate(0, i -> i + 1).limit(1000).reduce(0, Integer::sum);\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 sumNum() {\n\t\tint result = 0;\n\t\tfor(int i = 1; i<=112; i = i + 3) {\n\t\t\tresult = result + i;\t\n\t\t}\n\tSystem.out.println(\"Sum = \" + result);\n\t}", "public int getSum(List<Integer> a){\n\n int sum = 0;\n\n for(int i = 0; i<a.size(); i++){\n if(a.get(i)<0){\n continue;\n } else{\n sum +=a.get(i);\n }\n }\n return sum;\n }", "private static int sumIntegerList(List<Integer> superGrowingList) {\r\n\t\tint sum = 0;\r\n\t\tIterator<Integer> iterator = superGrowingList.iterator();\r\n\t\twhile (iterator.hasNext()) {\r\n\t\t\tInteger integer = (Integer) iterator.next();\r\n\t\t\tsum += (int)integer;\r\n\t\t}\r\n\t\treturn sum;\r\n\t}", "public void sum(int a, int b)\n {\n int index = a + 1;\n int sum = 0;\n \n while (index < b) {\n sum += index;\n index++;\n }\n System.out.println(sum);\n }", "static long sumOfGroup(int k) {\n long start = 1;\n long sum = 0;\n for(int i=1;i<=k;i++){\n long count = 0;\n sum = 0;\n while(count<i){\n if(start%2 == 1){\n sum = sum+start;\n count++;\n }\n start++;\n }\n }\n return sum;\n }", "public static void main(String[] args) {\n System.out.println(sumBetween(1, 0)); // testing sumBetween\n System.out.println(sumBetween(0, 0));\n System.out.println(sumBetween(26, 31));\n System.out.println(sumBetween(-16, 1));\n }", "void calculateRange() {\n //TODO: See Rules\n }" ]
[ "0.7243919", "0.7243919", "0.6681574", "0.6453937", "0.64436936", "0.64187765", "0.63329434", "0.6251942", "0.62061936", "0.6159163", "0.61499125", "0.61489266", "0.61382926", "0.6136369", "0.6135163", "0.61178136", "0.61142284", "0.6081817", "0.60768294", "0.60717785", "0.60611457", "0.6031236", "0.6019101", "0.5992457", "0.5985251", "0.59556144", "0.59314954", "0.59215814", "0.5888748", "0.5888003", "0.5877397", "0.58757615", "0.5871927", "0.5859388", "0.58413106", "0.5835832", "0.58270603", "0.58244234", "0.5811665", "0.5793122", "0.5769739", "0.5763085", "0.57523894", "0.5752112", "0.57520044", "0.57431346", "0.57254094", "0.570527", "0.56946534", "0.5684086", "0.56757677", "0.56612426", "0.56568956", "0.5650005", "0.56461704", "0.5644537", "0.5639826", "0.5635625", "0.5633395", "0.5622333", "0.5611563", "0.5608947", "0.56082344", "0.56081337", "0.55984724", "0.5598457", "0.5597222", "0.5596617", "0.559186", "0.55910367", "0.558035", "0.5572384", "0.5560585", "0.5559717", "0.5553553", "0.5552645", "0.555001", "0.55331945", "0.5531139", "0.5527396", "0.5526227", "0.5518985", "0.5514307", "0.55080116", "0.54905725", "0.54888856", "0.5484135", "0.54830503", "0.54818726", "0.54793954", "0.54680395", "0.54665554", "0.5462488", "0.5451695", "0.54498214", "0.5441601", "0.54351616", "0.54212034", "0.54208887", "0.54167175" ]
0.6726524
2
getCount() will return number of times val is present
public static int getCount(int[] numArray, int val) { int count = 0; for(int i = 0; i < numArray.length; i++) if(numArray[i] == val) count++; return count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getCount();", "int getCount();", "int getCount();", "int getCount();", "int getCount();", "int getCount();", "int getValuesCount();", "public int getCount();", "public int getCount();", "public int getCount();", "long getCount();", "long getCount();", "boolean hasCount();", "public int getCount()\r\n {\r\n return counts.peekFirst();\r\n }", "public static int getCount() {\r\n\t\treturn count;\r\n\t}", "public static int getCount() {\r\n\t\treturn count;\r\n\t}", "public static int getCount() {\r\n\t\treturn count;\r\n\t}", "public int getCount() {\r\n\t\tif(!isValid)\r\n\t\t\treturn -1;\r\n\t\treturn count;\r\n\t}", "public abstract int getCount();", "public synchronized int getCount()\n\t{\n\t\treturn count;\n\t}", "public int getCount() {\n if(data.size()<=0) return 1;\n return data.size();\n }", "Integer count();", "Integer count();", "private int countVals( String val )\r\n\t{\r\n\t\treturn 0;\r\n\t}", "public Integer getCount() {\n return count;\n }", "public static int getCount() {\n\t\treturn count;\n\t}", "public int getCount() {\n \t Log.i(TAG, \"getCount() called\");\n return provide.getItemCache().getCount();\n }", "public int count();", "public int count();", "public int count();", "public int count();", "public Integer getCount() {\n return count;\n }", "public Integer getCount() {\n return count;\n }", "public Integer getCount() {\n return count;\n }", "public Integer getCount() {\n return count;\n }", "public Integer getCount() {\n return count;\n }", "public Integer getCount() {\n return count;\n }", "public int getCount()\r\n {\r\n int answer=0;\r\n answer+=recCount(root);\r\n return answer;\r\n }", "public static int getCount() {\n return count;\n }", "public long getCount() {\n return count.get();\n }", "public Integer getCount() {\n\t\treturn count;\n\t}", "public Integer getCount() {\n\t\treturn count;\n\t}", "public int getCount() {\n return count_;\n }", "public int getCount() {\n\n if(data.size()<=0)\n return 1;\n return filteredList.size();\n }", "public static int getCount() {\n return count;\n }", "public static int getCount() {\n return count;\n }", "public static int getCount() {\n return count;\n }", "int getListCount();", "public int get_count();", "public long getCount() {\r\n return count;\r\n }", "public long getCount() {\n return count;\n }", "public long getCount() {\n return count;\n }", "Long count();", "Long count();", "Long count();", "Long count();", "Long count();", "public long getCount()\n\t{\n\t\treturn count;\n\t}", "public int getValueCount() {\n return value_.size();\n }", "public Long getCount() {\n return count;\n }", "public int getCount() {\n if (mDataValid) {\n return mCount;\n } else {\n return 0;\n }\n }", "public boolean haveCount () ;", "public int getCount() {\r\n\t\treturn count;\r\n\t}", "public int getCount() {\r\n\t\treturn count;\r\n\t}", "int findCount();", "public int getCount() {\n\t\treturn data.size();\r\n\t}", "public int getCount(){\r\n return sequence.getValue();\r\n }", "public int numberOfOccorrence();", "public static int getCount(){\n\t\treturn countFor;\n\t}", "int getRequestedValuesCount();", "public int getCount() {\n return count_;\n }", "public int count() {\n\t\tint q = 0;\n\t\tfor(int i = 0; i < list.length; i++) if (list[i] != null) q++;\n\t\treturn q;\n\t\t\n\t}", "@Override\r\n\t\tpublic int count() {\n\t\t\treturn 0;\r\n\t\t}", "public int getCount() {\n return definition.getInteger(COUNT, 1);\n }", "@VTID(9)\r\n int getCount();", "public long getCount() {\n return count_;\n }", "public Long getCount() {\r\n return count;\r\n }", "public synchronized int getCount(){\n return count;\n }", "public int getCount() {\n return _data.size();\n }", "public int getCount()\n {\n return values.size();\n }", "public boolean hasCount() {\n return result.hasCount();\n }", "public int getValueCount() {\n return value_.size();\n }", "public int getCount() {\n return sync.getCount();\n }", "public long count() ;", "public int getCount() {\n\t\treturn _mData.size();\n\t}", "@Override\npublic long count() {\n\treturn super.count();\n}", "public int getExistCount ()\n {\n return existCount;\n }", "public int getSkoreCount() {\n \tString countQuery = \"SELECT * FROM \" + \"skore\";\n \tSQLiteDatabase db = this.getReadableDatabase();\n \tCursor cursor = db.rawQuery(countQuery, null);\n \tint count = cursor.getCount(); //added line here\n \t\n \tcursor.close(); \t\n \tdb.close();\n \t\n \treturn count;\n }", "public long getCount() {\n return count_;\n }", "public int getCount() {\n\t\treturn count;\r\n\t}", "public synchronized int getCount () {\n int c = count;\n count = 0;\n return c;\n }", "public int getCount() {\n\t\t\treturn data.size();\n\t\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}", "public Integer getCount() {\n return this.count;\n }", "int findAllCount() ;", "public int getCount() {\n\t\t\treturn count;\n\t\t}", "int getEntryCount();", "int getMissingCount();" ]
[ "0.75059325", "0.75059325", "0.75059325", "0.75059325", "0.75059325", "0.75059325", "0.73785335", "0.7376148", "0.7376148", "0.7376148", "0.7231773", "0.7231773", "0.72097015", "0.7181846", "0.71814996", "0.71814996", "0.71814996", "0.7134077", "0.7061935", "0.70557296", "0.7036826", "0.7030052", "0.7030052", "0.702958", "0.7026553", "0.7016061", "0.70070213", "0.69897", "0.69897", "0.69897", "0.69897", "0.6975097", "0.6975097", "0.6975097", "0.6975097", "0.6975097", "0.6975097", "0.695738", "0.69448936", "0.6921316", "0.6908853", "0.6908853", "0.69032013", "0.68932253", "0.6881417", "0.6881417", "0.6881417", "0.68744904", "0.68623716", "0.6849578", "0.6846178", "0.6846178", "0.68379045", "0.68379045", "0.68379045", "0.68379045", "0.68379045", "0.6827007", "0.68260163", "0.68152887", "0.68132955", "0.6808972", "0.67970204", "0.67970204", "0.67961794", "0.679381", "0.6790164", "0.6784497", "0.6778787", "0.67778623", "0.6777802", "0.6772908", "0.6768004", "0.67573065", "0.67509305", "0.6748338", "0.6748258", "0.67444104", "0.67351055", "0.6733487", "0.6731869", "0.670821", "0.67075306", "0.6702491", "0.6701378", "0.6698849", "0.66959757", "0.6691945", "0.66876906", "0.6686855", "0.66834766", "0.6679728", "0.66704834", "0.66704834", "0.66704834", "0.66704834", "0.6668439", "0.6668095", "0.66679287", "0.6664329", "0.6662011" ]
0.0
-1
return contact phone by lookup_key
public static String getPhoneByID(Context context, String id) { Cursor secC = context.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, ContactsContract.CommonDataKinds.Phone.LOOKUP_KEY +" = ?", new String[] {id}, null); if (secC.moveToFirst()) { String phone = secC.getString(secC.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER)); secC.close(); return phone; } secC.close(); return "+1-541-754-3010"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cb.Careerbuilder.Company.PhoneNumber getPhone(int index);", "public PhoneNumber getNumber(Person key) {\n\t\tBookEntry entry = getEntry(key);\n\t\tif (entry != null) {\n\t\t\treturn entry.getNumber(); //Returns the phoneNumber from the entry\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "@TargetApi(Build.VERSION_CODES.ECLAIR)\n @RequiresApi(api = Build.VERSION_CODES.ECLAIR)\n private String returnID(String phonenumber) {\n String ID = \"\";\n\n Uri uri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(phonenumber));\n String[] columns = {ContactsContract.PhoneLookup.CONTACT_ID};\n Cursor cursor = getApplicationContext().getContentResolver().query(uri, columns, null, null, null);\n\n\n if (cursor != null) {\n while (cursor.moveToNext()) {\n\n ID = cursor.getString(cursor.getColumnIndex(ContactsContract.PhoneLookup.CONTACT_ID));\n\n }\n\n } else {\n return null;\n }\n return ID;\n }", "private String getPrimaryNumber(long _id) {\n String primaryNumber = null;\n try {\n Cursor cursor = getContentResolver().query( ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n new String[]{ContactsContract.CommonDataKinds.Phone.NUMBER, ContactsContract.CommonDataKinds.Phone.TYPE},\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID +\" = \"+ _id, // We need to add more selection for phone type\n null,\n null);\n if(cursor != null) {\n while(cursor.moveToNext()){\n switch(cursor.getInt(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE))){\n case ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE :\n primaryNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_HOME :\n primaryNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_WORK :\n primaryNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_OTHER :\n }\n if(primaryNumber != null)\n break;\n }\n }\n } catch (Exception e) {\n Log.i(\"test\", \"Exception \" + e.toString());\n } finally {\n if(cursor != null) {\n cursor.deactivate();\n cursor.close();\n }\n }\n return primaryNumber;\n }", "java.lang.String getPhone();", "String getPhone(int type);", "public static String getPhoneById(String cid, Context context){\n\t\t\n\n\t\t \tString contactNumber = \"\";\n\t\t \t//String contactName = \"\";\n\t \tCursor cursor = context.getContentResolver().query( \n\t \t\t\tContactsContract.Contacts.CONTENT_URI, null, \n\t \t\t\tContactsContract.Contacts._ID + \"=?\", \n\t \t new String[]{cid}, null); \n\t \t\n\t \t//Log.e(\"PARSER\", \"1\");\n\t \tif(cursor.moveToFirst()){\n\t\n\t \t//contactName = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\n Cursor pCur = context.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,null,ContactsContract.CommonDataKinds.Phone.CONTACT_ID +\" = ?\",new String[]{ cid }, null);\n while (pCur.moveToNext()){\n \t\n \t\n contactNumber = pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n contactNumber = contactNumber.replaceAll(\" \", \"\");\n // contactName = pCur.getString(pCur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n //Log.e(\"PARSER\"+contactNumber, \"Name\"+contactNumber);\n //result.put(contactNumber, contactName);\n } \n pCur.close();\n\t //}\n\t \n\t\t\t}\n\t \tcursor.close();\n return contactNumber;\n\t}", "public static String getContactNameByPhoneNumber(Context context, String number) {\n ContentResolver contentResolver = context.getContentResolver();\n Uri uri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number));\n String[] projection = new String[] { PhoneLookup.DISPLAY_NAME, PhoneLookup._ID };\n Cursor cursor = contentResolver.query(uri, projection, null, null, null);\n if (null == cursor) {\n return null;\n }\n String id = null;\n if (cursor.moveToFirst()) {\n id = cursor.getString(cursor.getColumnIndex(PhoneLookup._ID));\n }\n cursor.close();\n if (null == id) {\n return null;\n }\n\n // Build the Entity URI.\n Uri.Builder b = Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_URI, id).buildUpon();\n b.appendPath(ContactsContract.Contacts.Entity.CONTENT_DIRECTORY);\n Uri contactUri = b.build();\n Log.d(TAG, \"XXX: contactUri is \" + contactUri);\n // Create the projection (SQL fields) and sort order.\n projection = new String[] {\n ContactsContract.Contacts.Entity.RAW_CONTACT_ID,\n ContactsContract.Contacts.Entity.DATA1,\n ContactsContract.Contacts.Entity.MIMETYPE\n };\n String sortOrder = ContactsContract.Contacts.Entity.RAW_CONTACT_ID + \" ASC\";\n cursor = context.getContentResolver().query(contactUri, projection, null, null, sortOrder);\n if (null == cursor) {\n return null;\n }\n String name = null;\n int mimeIdx = cursor.getColumnIndex(ContactsContract.Contacts.Entity.MIMETYPE);\n int dataIdx = cursor.getColumnIndex(ContactsContract.Contacts.Entity.DATA1);\n if (cursor.moveToFirst()) {\n do {\n String mime = cursor.getString(mimeIdx);\n if (mime.equalsIgnoreCase(CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE)) {\n name = cursor.getString(dataIdx);\n break;\n }\n } while (cursor.moveToNext());\n }\n cursor.close();\n\n return name;\n }", "java.lang.String getPhoneNumber();", "java.lang.String getPhoneNumber();", "java.lang.String getPhoneNumber();", "public String getPrimaryContact();", "com.demo.springprotobuff.Demoproto.Student.PhoneNumber getPhone(int index);", "public Address getPrimaryContactParsed();", "java.lang.String getUserPhone();", "public Contact findContactByNumber(String number){\n SQLiteDatabase db = this.getReadableDatabase();\n\n // prevent for prefix number\n String number2 = number;\n String number3 = \"+\" + number;\n String number4 = number;\n if(number.length()>=3){\n number4 = \"0\" + number.substring(2);\n if(number.contains(\"+\")){\n number2 = \"0\" + number.substring(3);\n }\n }\n\n Log.d(\"db\", number2);\n\n Cursor cur;\n cur = db.rawQuery(\n \"SELECT DISTINCT c.* FROM \"\n + TABLE_CONTACTS + \" c,\"\n + TABLE_NUMBERS + \" n \"\n + \"WHERE c.\" + _ID + \" = n.\" + C_ID\n + \" AND ( n.\" + PHONE_NUMBER + \" = ? OR\"\n +\" n.\" + PHONE_NUMBER + \" = ? OR\"\n +\" n.\" + PHONE_NUMBER + \" = ? OR\"\n +\" n.\" + PHONE_NUMBER + \" = ? )\", new String[]{number, number2, number3, number4 });\n List<Contact> ctxs = getContactObjct(db, cur, number);\n Contact c ;\n if(ctxs.size()>0){\n c = ctxs.get(0);\n }else{\n c = new Contact(-1, null, number);\n }\n\n db.close();\n return c;\n }", "public static EcidContact doLookup(Context ctx, String number, int numberType)\n {\n Log.d(TAG, \"ECID AOSP VERSION: \" + ECID_AOSP_VERSION);\n if (ctx != null && !TextUtils.isEmpty(number)) {\n// EcidContact cidContact = getEcidContact(number);\n// if (cidContact != null) {\n// if (DBG) Log.d(TAG, \"Skip look up, already done previously: ctx: \" + ctx + \" number: \" + number);\n// return cidContact;\n// }\n EcidContact cidContact = new EcidContact();\n cidContact.m_number = PhoneNumberUtils.stripSeparators(number);\n cidContact.implLookup(ctx, number, numberType != Calls.OUTGOING_TYPE, false);\n m_mapEcidContacts.put(cidContact.m_number, cidContact);\n if (DBG) Log.d(TAG, \"added cidContact \" + cidContact + \"for number: \" + cidContact.m_number);\n\n if (DBG) Log.d(TAG, \"look up completed: number: \" + number);\n return cidContact;\n }\n else {\n Log.d(TAG, \"doLookup Invalid Args: ctx: \" + ctx + \" number: \" + number);\n return null;\n }\n }", "@Override\n\tpublic String getTelephoneByOpenid(String openId) {\n\t\ttry {\n\t\t\treturn register.getPhoneByOpenId(openId);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "private String getContactname(String phoneNumber2) {\n\t\t// TODO Auto-generated method stub\n\t\t ContentResolver cr = context.getContentResolver();\n\t\t Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(phoneNumber));\n\t\t Cursor cursor = cr.query(uri, new String[]{PhoneLookup.DISPLAY_NAME}, null, null, null);\n\t\t if (cursor == null) {\n\t\t return null;\n\t\t }\n\t\t String contactName = null;\n\t\t if(cursor.moveToFirst()) {\n\t\t contactName = cursor.getString(cursor.getColumnIndex(PhoneLookup.DISPLAY_NAME));\n\t\t }\n\n\t\t if(cursor != null && !cursor.isClosed()) {\n\t\t cursor.close();\n\t\t }\n\n\t\t return contactName;\n\t}", "public void numberLookup() {\n\t\tSystem.out.print(\"Number: \");\n\t\tint entryNumber = getInputForNumber();\n\t\tphoneList\n\t\t\t.stream()\n\t\t\t.filter(n -> n.getNumber() == entryNumber)\n\t\t\t.forEach(n -> System.out.println(\"This is the number of \" + n.getName()));\n\t}", "public Long getHome_phone();", "public BookEntry getEntryByPhoneKey(PhoneNumber key) {\n\t\tHashMap<PhoneNumber, BookEntry> clonedBook = this.cloneBook();\n\t\tBookEntry foundEntry = clonedBook.get(key);\n\t\treturn this.cloneBook().get(key);\n\t}", "public String getLookupKey() {\n return queryLookupKey(contactId);\n }", "public String getContactPhone(Integer id) {\n\t\t// On 0 invocation the current contact's will be returned\n\t\tif (id == 0) {\n\t\t\tif (currentContact == null)\n\t\t\t\treturn null;\n\t\t\treturn currentContact.getPhone();\n\t\t}\n\t\tOptional<Contacto> result = currentUser.getContacts().stream().filter(c -> c.getId() == id).findFirst();\n\t\tif (result.isPresent())\n\t\t\treturn result.get().getPhone();\n\t\treturn null;\n\t}", "public static String getPhoneNumber(Context context, String contactId) {\n\n String number = \"\";\n\n Cursor cursor;\n try {\n cursor = context.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,\n Phone.CONTACT_ID + \" = \" + contactId, null, null);\n\n while (cursor.moveToNext()) {\n number = cursor.getString(cursor.getColumnIndex(Phone.NUMBER));\n int type = cursor.getInt(cursor.getColumnIndex(Phone.TYPE));\n\n switch (type) {\n case Phone.TYPE_MOBILE:\n // Return right away if it's a mobile number\n cursor.close();\n return number;\n }\n }\n\n cursor.close();\n } catch (SQLiteException e) {\n e.printStackTrace();\n }\n\n // Return whatever number we found last, since we don't know which is best\n return number;\n }", "public static String getContactNameById(Integer _id, Context context){\n\t\t\n\t\t\t//Map<String, String> result = new HashMap<String, String>();\n\n\t \tString cid = _id.toString(); \n\t\t \t//String contactNumber = \"\";\n\t\t \tString contactName = \"\";\n\t \tCursor cursor = context.getContentResolver().query( \n\t \t\t\tContactsContract.Contacts.CONTENT_URI, null, \n\t \t\t\tContactsContract.Contacts._ID + \"=?\", \n\t \t new String[]{cid}, null); \n\t \t\n\t \t//Log.e(\"PARSER\", \"1\");\n\t \tif(cursor.moveToFirst()){\n\t //String id = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n\t\n\t //if(Integer.parseInt(cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0)\n\t //{\n\t\t\n\t\t\n\t \t//Log.e(\"PARSER\", \"2\");\n\t \t\n\t \tcontactName = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\t \t//contactName = cursor.getString(ContactsQuery.DISPLAY_NAME);\n Cursor pCur = context.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,null,ContactsContract.CommonDataKinds.Phone.CONTACT_ID +\" = ?\",new String[]{ _id.toString() }, null);\n while (pCur.moveToNext()){\n \t\n \t\n // contactNumber = pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n // contactName = pCur.getString(pCur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n \n //Log.e(\"PARSER\"+contactNumber, \"Name\"+contactName);\n //result.put(contactNumber, contactName);\n } \n pCur.close();\n\t //}\n\t \n\t\t\t}\n\t \tcursor.close();\n return contactName;\n\t}", "public BookEntry getEntry(PhoneNumber phoneNumber) {\n\t\t//Create a Set for Map.Entry<K,V> type entries\n\t\tSet<Map.Entry<Person, BookEntry>> phoneBookEntries = phoneBook.entrySet();\n\t\t//Iterate through the entry set\n\t\tfor (Map.Entry<Person, BookEntry> currentEntry : phoneBookEntries) {\n\t\t\t//Compare the PhoneNumber object referenced in current Bookentry with the target phoneNumber\n\t\t\tif (currentEntry.getValue().getNumber().equals(phoneNumber)) { //equals method to be overriden in PhoneNumber class!\n\t\t\t\t//If a match is found, return the full BookEntry by the key\n\t\t\t\treturn phoneBook.get(currentEntry.getKey());\n\t\t\t}\n\t\t}\n\t\t//If this is reached, no BookEntry with phoneNumber was found, return null\n\t\treturn null;\n\t}", "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 }", "SdkPhone selectByPrimaryKey(Integer id);", "public org.erdc.cobie.cobielite.core.CobieTextSimpleType xgetContactPhoneNumber()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.erdc.cobie.cobielite.core.CobieTextSimpleType target = null;\r\n target = (org.erdc.cobie.cobielite.core.CobieTextSimpleType)get_store().find_element_user(CONTACTPHONENUMBER$0, 0);\r\n return target;\r\n }\r\n }", "Phone findPhoneById(int phoneId);", "com.polytech.spik.protocol.SpikMessages.Contact getContact();", "public static String getPersonIdFromPhoneNumber(Context context, String address) {\r\n \t\tif (address == null)\r\n \t\t\treturn null;\r\n \r\n \t\tCursor cursor = context.getContentResolver().query(\r\n \t\t\t\tUri.withAppendedPath(Contacts.Phones.CONTENT_FILTER_URL, address),\r\n \t\t\t\tnew String[] { Contacts.Phones.PERSON_ID }, null, null, null);\r\n \t\tif (cursor != null) {\r\n \t\t\ttry {\r\n \t\t\t\tif (cursor.getCount() > 0) {\r\n \t\t\t\t\tcursor.moveToFirst();\r\n \t\t\t\t\tLong id = Long.valueOf(cursor.getLong(0));\r\n \t\t\t\t\t// Log.v(\"Found person: \" + id);\r\n \t\t\t\t\treturn (String.valueOf(id));\r\n \t\t\t\t}\r\n \t\t\t} finally {\r\n \t\t\t\tcursor.close();\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "public static String getContactDisplayNameByNumber(String number, Context context){\n\t\t\n\t\t Uri uri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number));\n\t\t String name = \"\";\n\t\n\t\t //ContentResolver contentResolver = getContentResolver();\n\t\t Cursor contactLookup = context.getContentResolver().query(uri, new String[] {BaseColumns._ID,\n\t\t ContactsContract.PhoneLookup.DISPLAY_NAME }, null, null, null);\n\t\n\t\t try {\n\t\t if (contactLookup != null && contactLookup.getCount() > 0) {\n\t\t contactLookup.moveToNext();\n\t\t name = contactLookup.getString(contactLookup.getColumnIndex(ContactsContract.Data.DISPLAY_NAME));\n\t\t //String contactId = contactLookup.getString(contactLookup.getColumnIndex(BaseColumns._ID));\n\t\t }\n\t\t } finally {\n\t\t if (contactLookup != null) {\n\t\t contactLookup.close();\n\t\t }\n\t\t }\n\t\n\t\t return name;\n\t}", "kr.pik.message.Profile.Contact getContact();", "@Override\n\tpublic List<PersonTelInfo> findByPhone(String phone) {\n\t\treturn getSqlSession().selectList(getIbatisMapperNameSpace() + \".findByPhone\", phone);\t \n\t}", "public cb.Careerbuilder.Company.PhoneNumber getPhone(int index) {\n if (phoneBuilder_ == null) {\n return phone_.get(index);\n } else {\n return phoneBuilder_.getMessage(index);\n }\n }", "int getPhone();", "java.lang.String getPhonenumber();", "public BookEntry getEntry(Person key) {\n\t\treturn phoneBook.get(key);\n\t}", "public cb.Careerbuilder.Company.PhoneNumber getPhone(int index) {\n return phone_.get(index);\n }", "Optional<String> prefixByPhoneNumber(String phoneNumber);", "private String numberToString(String num, Context ctx){\n\t\t\tUri contactUri = Uri.withAppendedPath(\t\t\t\t// URI for the ContactsContract\n\t\t\t\t\tContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(num));\t\t\t\n\t\t\tCursor cursor = ctx.getContentResolver().query(\t\t// cursor for traversing\n\t\t\t\t\tcontactUri, new String[]{ContactsContract.PhoneLookup.DISPLAY_NAME}, \n\t\t\t\t\tnull, null, null);\n\t\t\t// if there is a cursor with soethign in it\n\t\t\tif(cursor.moveToFirst())\n\t\t\t\tif(!cursor.isAfterLast())\n\t\t\t\t\treturn cursor.getString(cursor.getColumnIndex(ContactsContract.PhoneLookup.DISPLAY_NAME));\t// retunr the name\n\t\t\treturn null;\n\t\t}", "kr.pik.message.Profile.ProfileMessage.ContactAddress getContactAddress(int index);", "public String getCName(Context context, String number) {\n\t\tUri lookupUri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI,\r\n\t\t\t\tUri.encode(number));\r\n\t\tString[] mPhoneNumberProjection = { PhoneLookup._ID,\r\n\t\t\t\tPhoneLookup.NUMBER, PhoneLookup.DISPLAY_NAME };\r\n\t\tCursor cur = context.getContentResolver().query(lookupUri,\r\n\t\t\t\tmPhoneNumberProjection, null, null, null);\r\n\t\ttry {\r\n\t\t\tif (cur.moveToFirst()) {\r\n\t\t\t\treturn cur\r\n\t\t\t\t\t\t.getString(cur.getColumnIndex(PhoneLookup.DISPLAY_NAME));\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tif (cur != null)\r\n\t\t\t\tcur.close();\r\n\t\t}\r\n\t\treturn number;\r\n\t}", "public void assignContactFromPhone(String phoneNumber, boolean lazyLookup) {\n assignContactFromPhone(phoneNumber, lazyLookup, new Bundle());\n }", "public Long getMobile_phone();", "public void personLookup() {\n\t\tSystem.out.print(\"Person: \");\n\t\tString entryName = getInputForName();\n\t\tphoneList\n\t\t\t.stream()\n\t\t\t.filter(n -> n.getName().equals(entryName))\n\t\t\t.forEach(n -> System.out.println(n));\n\t}", "public Contact getContactById(int contactId);", "@Override\n\tpublic CelPhone detail(CelPhone celphone) {\n\t\treturn null;\n\t}", "public Customer searchCustomerByPhone() {\r\n\t\t//Input customer phone.\r\n\t\tString phone = readString(\"Input the customer phone: \");\r\n\t\tCustomer f = my.findByPhone(phone);\r\n\t\treturn f;\r\n\t}", "public abstract String getPhone3();", "@Override\n public void onActivityResult(int reqCode, int resultCode, Intent data) {\n super.onActivityResult(reqCode, resultCode, data);\n\n switch (reqCode) {\n case (1) :\n if (resultCode == Activity.RESULT_OK) {\n Uri contactData = data.getData();\n Cursor c = managedQuery(contactData, null, null, null, null);\n if (c.moveToFirst()) {\n String name = c.getString(c.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n // Fetch other Contact details as you want to use\n\n ContentResolver cr = getContentResolver();\n Cursor cursor = cr.query(ContactsContract.Contacts.CONTENT_URI, null,\n \"DISPLAY_NAME = '\" + name + \"'\", null, null);\n if (cursor.moveToFirst()) {\n String contactId =\n cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n //\n // Get all phone numbers.\n //\n Cursor phones = cr.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \" = \" + contactId, null, null);\n while (phones.moveToNext()) {\n String number = phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n int type = phones.getInt(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE));\n switch (type) {\n case ContactsContract.CommonDataKinds.Phone.TYPE_HOME:\n // do something with the Home number here...\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE:\n // do something with the Mobile number here...\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_WORK:\n // do something with the Work number here...\n break;\n }\n\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"sms:\"\n + number)));\n }\n phones.close();\n }\n cursor.close();\n\n\n\n\n }\n }\n break;\n }\n }", "public abstract String getPhone2();", "public Supplier findSupplierByPhone(String phone) throws NameValidationException, AddressValidationException, ZipCodeValidationException, CityValidationException, PhoneValidationException, EmailValidationException {\n\t\tResultSet rs;\n\t\tSupplier res = null; \n\t\ttry {\n\t\t\tfindSupplierByPhone.setString(1, phone);\n\t\t\trs = findSupplierByPhone.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tres = buildSupplierObject(rs);\n\t\t\t} \n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn res;\n\t}", "cb.Careerbuilder.Company.PhoneNumberOrBuilder getPhoneOrBuilder(\n int index);", "private Place getPlaceWithTelephoneNumber() {\n\n // finds nearby place according the slot value\n List<Place> places = PlaceFinder.findNearbyPlace(GeoCoder.getLatLng(deviceAddress), slotBankNameValue);\n\n // check the list of places for one with opening hours\n return PlaceFinder.findTelephoneNumberPlace(places, slotBankNameValue);\n }", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "public com.demo.springprotobuff.Demoproto.Student.PhoneNumber getPhone(int index) {\n\t\t\t\tif (phoneBuilder_ == null) {\n\t\t\t\t\treturn phone_.get(index);\n\t\t\t\t} else {\n\t\t\t\t\treturn phoneBuilder_.getMessage(index);\n\t\t\t\t}\n\t\t\t}", "public static Customer find(String key) throws NotFoundException\r\n\t{\n\t\taCustomer = null;\r\n\t\t// define the SQL query statement using the phone number key\r\n\t\tString sqlQuery = \"SELECT CustomerName, Address, PhoneNo, \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\" StateRegistrationNo, BoatLength, \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\" Manufacturer, Year\" +\r\n\t\t\t\t\t\t\t\t\t\t\t\" FROM CustomerTable, BoatTable \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\" WHERE PhoneNo = CustomerPhoneNo\" +\r\n\t\t\t\t\t\t\t\t\t\t\t\" AND PhoneNo = '\" + key +\"'\" ;\r\n\r\n\t \t// execute the SQL query statement\r\n\t\ttry\r\n \t\t{\r\n\t \tResultSet rs = aStatement.executeQuery(sqlQuery);\r\n\t\t\t// next method sets cursor & returns true if there is data\r\n\t\t\tboolean gotIt = rs.next();\r\n\t \tif (gotIt)\r\n\t \t\t{\t// extract the data\r\n\t\t\t\t\tname = rs.getString(1);\r\n\t\t\t\t\taddress = rs.getString(2);\r\n\t\t\t\t\tphoneNumber = rs.getString(3);\r\n\t\t\t\t\tstateRegistrationNo = rs.getString(4);\r\n \t\t\t\t\tlength = rs.getDouble(5);\r\n\t\t\t\t\tmanufacturer = rs.getString(6);\r\n\t\t\t\t\tyear = rs.getInt(7);\r\n\r\n\t\t\t\t\t// create Customer & Boat instance\r\n\t\t\t\t\taCustomer = new Customer(name, address, phoneNumber);\r\n\t\t\t\t\taBoat = new Boat(stateRegistrationNo, length, manufacturer, year);\r\n\t\t\t\t\taBoat.assignBoatToCustomer(aCustomer);\r\n\t\t\t\t}\r\n\t\t\telse\t// nothing was retrieved\r\n\t\t\t\t{throw (new NotFoundException(\"not found \"));}\r\n\t\t\trs.close();\r\n\t \t}\r\n\t\tcatch (SQLException e)\r\n\t\t{ System.out.println(e);}\r\n\t\treturn aCustomer;\r\n\t}", "private String populateContacts() {\n // fetch the additional information (currently phone numbers)\n Map<Integer, List<Pair<String, Integer>>> numberCache = getAdditionalInformation();\n\n Cursor cursor = mContentResolver.query(\n ContactsContract.Contacts.CONTENT_URI, QUERY_PROJECTION_CONTACT, null, null, QUERY_ORDERING_CONTACT);\n\n int idIndex = cursor.getColumnIndex(ContactsContract.Contacts._ID);\n int nameIndex = cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME_PRIMARY);\n int hasNumberIndex = cursor.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER);\n\n StringBuilder concatList = new StringBuilder();\n\n // First thing we need to do is sanitize the queryString and split into tokens. One\n // important purpose of doing this is to verify if we truly have tokens to apply to a\n // search process. If we are left with an empty query, then we can simply return the\n // entire contact list. The way the algorithm logic flows, there must be at least one\n // query token in the list, even if a blank placeholder.\n ArrayList<String> sanitizedQueryTokens = new ArrayList<String>();\n if (mQueryString != null) {\n // split up the query string into tokens, based on whitespace and asterisks\n String[] queryTokens = mQueryString.trim().split(\"[\\\\*\\\\s]+\");\n // get rid of any empty string references\n for (String currentString : queryTokens) {\n if (!currentString.equals(\"\")) {\n sanitizedQueryTokens.add(currentString);\n }\n }\n // if the ArrayList is empty, then we assume match everything\n if (sanitizedQueryTokens.size() == 0) {\n mQueryString = null;\n }\n }\n\n // Now perform the search. If the queryString is null, then the search reduces\n // to a dump of all contacts\n if ( mQueryString == null) {\n // The search algorithm is designed to work without search criteria (reduction to\n // entire list dumped). However we need at least one query token to enter the main\n // search loop.\n sanitizedQueryTokens.add(\"\");\n }\n\n StringBuilder concatListMatches = new StringBuilder();\n int numMatches = 0;\n\n while (cursor.moveToNext()) {\n String currentName = cursor.getString(nameIndex);\n\n if (currentName != null && !currentName.isEmpty()) {\n // If we are not actually performing a search, we still need to enter this loop\n // once (hence why we added a blank term above).\n for (String currentString : sanitizedQueryTokens) {\n // Add this contact to the list if we are either not performing a search\n // or if the current search criteria (token) matches\n if (mQueryString == null || currentName.toLowerCase().contains(\n currentString.toLowerCase())) {\n\n concatListMatches.append(currentName).append(\"\\n\");\n\n // If this contact has phone number(s), display them\n if (cursor.getInt(hasNumberIndex) > 0) {\n // grab the number(s) from the phat cache\n List<Pair<String, Integer>> phNums;\n if ((phNums = numberCache.get(cursor.getInt(idIndex))) != null) {\n // Pair<Phone Number, Type of Number>\n for (Pair<String, Integer> phNum : phNums) {\n concatListMatches.append(\"\\t\").append(phNum.first);\n switch(phNum.second) {\n case ContactsContract.CommonDataKinds.Phone.TYPE_HOME:\n concatListMatches.append(\" [HOME]\");\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE:\n concatListMatches.append(\" [MOBILE]\");\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_WORK:\n concatListMatches.append(\" [WORK]\");\n break;\n }\n concatListMatches.append(\"\\n\");\n }\n } else {\n // This should not happen. Means that there is a contact in which a\n // phone number is associated but yet no such number actually can\n // be found in the DB\n concatList.append(\"\\t<Phone number referenced, but not found>\\n\");\n }\n }\n\n ++numMatches;\n break;\n }\n }\n }\n }\n concatList.append(numMatches).append(\" Contacts Found\\n\\n\").append(concatListMatches);\n\n Log.d(\"populate contact list \",\"str \"+concatList.toString());\n return concatList.toString();\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}", "org.multibit.hd.core.protobuf.MBHDContactsProtos.Contact getContact(int index);", "@Override\n\tpublic void onUserIdGetByPhoneNum(int result, AirContact contact)\n\t{\n\n\t}", "public List<HashMap<String,String>> contacts() {\n final Uri uriContact = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;\n ContentResolver cr = getActivity().getContentResolver();\n Cursor cur = cr.query(uriContact, null, null, null, null);\n\n List<HashMap<String,String>> contacts=new ArrayList<>();\n if (cur.getCount() > 0) {\n while (cur.moveToNext()) {\n String id = cur.getString(\n cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone._ID));\n String name = cur.getString(\n cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n\n\n String has_phone = cur.getString(cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.HAS_PHONE_NUMBER));\n HashMap<String,String> contact=new HashMap();\n if(!has_phone.endsWith(\"0\"))\n {\n contact.put(\"name\", name);\n String phoneNumber = cur.getString(cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n contact.put(\"number\",phoneNumber);\n contacts.add(contact);\n }\n }\n }\n this.contacts_phone=contacts;\n contacts=filter_to_app(contacts);\n return contacts;\n }", "public String getPhone(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, PHONE);\n\t}", "public String getPhone(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, PHONE);\n\t}", "public String getPhoneFeature(String phone, String featureName) {\n\treturn null;\n }", "public abstract String getPhone1();", "public PersonaBean getPerson(String searched) {\r\n\t\ttry {\r\n\t\t\tConnectionUtils connectionUtils = new ConnectionUtils();\r\n\t\t\tConnection connection = connectionUtils.openConnection();\r\n\t\t\tPreparedStatement ps = connection.prepareStatement(\"select phone_number from person where name = ?\");\r\n\t\t\tps.setString(1, searched);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\tPersonaBean person = null;\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tperson = new PersonaBean(searched, rs.getString(\"phone_number\"));\r\n\t\t\t}\r\n\t\t\treturn person;\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}", "Optional<Contact> getContact(long id);", "public com.demo.springprotobuff.Demoproto.Student.PhoneNumber getPhone(int index) {\n\t\t\treturn phone_.get(index);\n\t\t}", "public Lookup findLookup(String code, String lookupGroup, long lookupParentId);", "public static EcidContact doCacheLookup(Context ctx, String number, int numberType)\n {\n Log.d(TAG, \"ECID AOSP VERSION: \" + ECID_AOSP_VERSION);\n if (ctx != null && !TextUtils.isEmpty(number)) {\n EcidContact cidContact = getEcidContact(number);\n return cidContact;\n }\n else {\n Log.d(TAG, \"doLookup Invalid Args: ctx: \" + ctx + \" number: \" + number);\n return null;\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n Log.d(TAG, \"[onActivityResult]mAddPosition:\" + mAddPosition);\n mIsWaitingActivityResult = false;\n if (REQUEST_CODE_PICK_CONTACT != requestCode || RESULT_OK != resultCode || data == null) {\n mAddPosition = -1;\n return;\n }\n String dataIndex = data.getData().getLastPathSegment(); \n String number = \"\";\n Cursor cursor = this.getContentResolver().query(Data.CONTENT_URI, new String[]{Data._ID, Data.DATA1}, \"Data._ID\"+\" = \"+dataIndex, null, null);\n if(cursor != null && cursor.getCount() > 0) {\n cursor.moveToFirst();\n number = cursor.getString(1);\n }else{\n if(cursor != null) cursor.close();\n mAddPosition = -1;\n return;\n }\n cursor.close();\n /*\n * Bug Fix by Mediatek Begin.\n * Original Android¡¯s code:\n * xxx\n * CR ID: ALPS00111767\n * Descriptions: ¡­\n */\n\t\t\n Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number));\n Log.i(TAG, \"onActivityResult(), uri = \" + uri);\n Cursor simIdCursor = this.getContentResolver().query(uri, new String[]{PhoneLookup._ID, PhoneLookup.INDICATE_PHONE_SIM, }, null, null, null);\n int simId = -1;\n simIdCursor.moveToFirst();\n if (simIdCursor != null && simIdCursor.getCount() > 0) {\n if(!simIdCursor.isNull(1))\n simId = simIdCursor.getInt(1);\n }\n simIdCursor.close();\t\n// int simId = data.getIntExtra(\"simId\", -1);\n /*\n * Bug Fix by Mediatek End.\n */\n\n getPrefStatus();\n mHasGotPref = true;\n int tempKey = findKeyByNumber(number);\n Log.d(TAG, \"onActivityResult(), after findKeyByNumber(), tempKey=\" + tempKey);\n if (SpeedDialManageActivity.SPEED_DIAL_MIN > tempKey) {\n mPrefNumState[mAddPosition + 1] = number;\n mPrefMarkState[mAddPosition + 1] = simId;\n mHasNumberByKey = false;\n } else {\n mHasNumberByKey = true;\n }\n Log.i(TAG, \"onActivityResult: number = \" + number + \", simId = \" + simId);\n for (int i = 0; i < mPrefNumState.length; ++i) {\n Log.i(TAG, \"mPrefNumState[\" + i + \"] = \" + mPrefNumState[i] + \", mPrefMarkState[\" + i\n + \"]\" + mPrefMarkState[i]);\n }\n }", "void getContributeToday(String phone);", "public String getContactPhone() {\n return contactPhone;\n }", "public String getContactPhone() {\n return contactPhone;\n }", "private Optional<Contact> findContact(AthenzTenant tenant) {\n if (!tenant.propertyId().isPresent()) {\n return Optional.empty();\n }\n List<List<String>> persons = organization.contactsFor(tenant.propertyId().get())\n .stream()\n .map(personList -> personList.stream()\n .map(User::displayName)\n .collect(Collectors.toList()))\n .collect(Collectors.toList());\n return Optional.of(new Contact(organization.contactsUri(tenant.propertyId().get()),\n organization.propertyUri(tenant.propertyId().get()),\n organization.issueCreationUri(tenant.propertyId().get()),\n persons));\n }", "private void requestContactInformation() {\n CONTACTS = new ArrayList<>();\n\n Cursor c = getContentResolver().query(ContactsContract.Contacts.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME_PRIMARY + \" asc\");\n\n while(c.moveToNext()) {\n HashMap<String, String> map = new HashMap<String, String>();\n String id = c.getString(c.getColumnIndex(ContactsContract.Contacts._ID));\n String name = c.getString(c.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME_PRIMARY));\n\n Cursor phoneCursor = getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \" = \" + id,\n null, null\n );\n\n if (phoneCursor.moveToFirst()) {\n String number = phoneCursor.getString(phoneCursor.getColumnIndex(\n ContactsContract.CommonDataKinds.Phone.NUMBER\n ));\n CONTACTS.add(Pair.create(name, number));\n }\n\n phoneCursor.close();\n }\n\n }", "@Generated(hash = 2078921422)\n public Phone getPhone() {\n Long __key = this.phoneId;\n if (phone__resolvedKey == null || !phone__resolvedKey.equals(__key)) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n PhoneDao targetDao = daoSession.getPhoneDao();\n Phone phoneNew = targetDao.load(__key);\n synchronized (this) {\n phone = phoneNew;\n phone__resolvedKey = __key;\n }\n }\n return phone;\n }", "public void implLookup(Context context, CharSequence strNumber, boolean isSystemProvided, boolean isNotNanp)\n {\n if (DBG) Log.d(TAG, \"Lookup \" + strNumber.toString());\n ContentResolver cr = context.getContentResolver();\n\n // TODO: OEM must set the String array appropriately\n // \"NOT-NANP\" should be included if the call was NOT received while on an NANP servicing network\n // \"system\" or \"system provided\" should be included if it was an incoming call, or returning a call from a system-provided number\n // \"user\" or \"user provided\" should be included if it cannot be determined to be a system-provided number\n //\n String[] flags;\n if (isNotNanp)\n flags = new String[] { isSystemProvided ? \"system\" : \"user\", \"NOT-NANP\" };\n else\n flags = new String[] { isSystemProvided ? \"system\" : \"user\" };\n\n m_isNanp = !isNotNanp; // Save this for later\n\n Cursor c = cr.query(CONTENT_URI, null, strNumber.toString(), flags, null);\n if (c != null && c.moveToFirst())\n {\n readColumnIds(c);\n m_callerId = getString(c, COLUMN_NUMBER);\n m_cityName = getString(c, COLUMN_CITY);\n m_stateName = getString(c, COLUMN_STATE);\n m_stateAbbr = getString(c, COLUMN_STATE_ABBR);\n m_countryName = getString(c, COLUMN_COUNTRY);\n\n m_bizName = getString(c, COLUMN_COMPANY);\n m_cname = getString(c, COLUMN_NAME);\n m_firstName = getString(c, COLUMN_FIRST_NAME);\n m_lastName = getString(c, COLUMN_LAST_NAME);\n// m_urlPicture = getString(c, COLUMN_IMAGE);\n// m_bSameNetwork = c.getInt(COLUMN_SAME_NETWORK) != 0;\n// m_bFriends = c.getInt(COLUMN_FRIENDS) != 0;\n// m_bPreferCidImage = c.getInt(COLUMN_PREFER_CID_IMAGE) != 0;\n if (COLUMN_NO_OUTGOING_CALL_RESTRICTION >= 0) {\n m_bNoOutgoingCallRestriction = c.getInt(COLUMN_NO_OUTGOING_CALL_RESTRICTION) != 0;\n }\n }\n else\n {\n Log.d(TAG, \"No CityID found\");\n }\n if ( c != null ) c.close(); // IKHSS6UPGR-11068\n }", "public String getTelephone() {\n return (String) get(\"telephone\");\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t switch (requestCode) { \n\t case 1: \n\t if (data == null) { \n\t return; \n\t } \n\t Uri result = data.getData(); \n\t String contactId = result.getLastPathSegment(); \n\t String phone = \"\"; \n\t String[] projection = new String[] { Phone.CONTACT_ID,Phone.NUMBER}; \n\t Cursor cursor = getContentResolver().query(Phone.CONTENT_URI, \n\t projection, // select sentence \n\t Phone.CONTACT_ID + \" = ?\", // where sentence \n\t new String[] { contactId }, // where values \n\t Phone.CONTACT_ID); // order by \n\t \n\t if (null!=cursor&&cursor.moveToFirst()) { \n\t phone = cursor.getString(cursor.getColumnIndex(Phone.NUMBER)); \n\t CommonUtils.sendMSG(MemberCenter.this, phone, String.format(\"亲,发现好星之家酒店的客户端很好用,可以用手机预定酒店,\" +\n\t\t \t\t\"安卓下载地址:%s 苹果下载地址%s\", MainActivity.proPhone.andUrl,MainActivity.proPhone.ioUrl));\n\t }else\n\t {\n\t \t CommonUtils.showToast(getApplicationContext(), \"获取联系人失败\");\n\t }\n\t break; \n\t } \n\t}", "SdkPhone selectOne(SdkPhoneExample example);", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent i) {\n // TODO Auto-generated method stub\n super.onActivityResult(requestCode, resultCode, i);\n\n if (requestCode == REQUEST_CODE) {\n if (resultCode == RESULT_OK) {\n Uri uri = i.getData();\n String[] projection = {Phone.NUMBER, Phone.DISPLAY_NAME};\n\n Cursor cursor = getContentResolver().query(uri, projection,\n null, null, null);\n cursor.moveToFirst();\n\n int numberColumnIndex = cursor.getColumnIndex(Phone.NUMBER);\n String number = cursor.getString(numberColumnIndex);\n\n etPhone.setText(number);\n }\n }\n }", "private String getRandomContactPhoneNumber() {\n \t\treturn contactPhoneNumbers.get(randy.nextInt(contactPhoneNumbers.size()));\n \t}", "public Call getCallByRemoteAddress2(Address remoteAddress);", "public GoldenContactBuilder phone(String value) {\n phone = value;\n return this;\n }", "public String getPhone() {\r\n\t\treturn this.phone;\r\n\t}", "public kr.pik.message.Profile.Contact getContact() {\n kr.pik.message.Profile.Contact result = kr.pik.message.Profile.Contact.valueOf(contact_);\n return result == null ? kr.pik.message.Profile.Contact.UNRECOGNIZED : result;\n }", "private List<ModelContacts> getContact(){\n String contenue_ecran = tableView.getText().toString().trim();\n List<ModelContacts> list = new ArrayList<>();\n if (!contenue_ecran.equals(\"\")) {\n Cursor cursor = this.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME + \" ASC\");\n assert cursor != null;\n cursor.moveToFirst();\n while (cursor.moveToNext()) {\n String phoneNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n String name = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n String image = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.PHOTO_ID));\n String formatPhoneNumber = \"<font color='#42A5F5'><b>\" + contenue_ecran + \"</b></font>\";\n String formatPhone = phoneNumber.replace(contenue_ecran, formatPhoneNumber);\n if (phoneNumber.contains(contenue_ecran)) {\n list.add(new ModelContacts(name, image, formatPhone));\n }\n }\n cursor.close();\n }\n return list;\n }", "public String getPhone()\r\n/* 41: */ {\r\n/* 42:54 */ return this.phone;\r\n/* 43: */ }", "public Call getCallByRemoteAddress(String remoteAddress);", "public CustomerAddressQuery telephone() {\n startField(\"telephone\");\n\n return this;\n }", "public void searchPerson() {\n\t\tSystem.out.println(\"*****Search a person*****\");\n\t\tSystem.out.println(\"Enter Phone Number to search: \");\n\t\tlong PhoneSearch = sc.nextLong();\n\t\tfor (int i = 0; i < details.length; i++) {\n\t\t\tif (details[i] != null && details[i].getPhoneNo() == PhoneSearch) {\n\t\t\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\t\t\tSystem.out.println(details[i]);\n\t\t\t}\n\t\t}\n\t}", "public interface TwilioService {\n @GET(\"PhoneNumbers/{phoneNumber}?Type=carrier\")\n Call<TwilioLookupResponse> lookup(@Path(\"phoneNumber\") String phoneNumber);\n}" ]
[ "0.65827894", "0.65412086", "0.63920856", "0.6344409", "0.6324169", "0.6283213", "0.62621135", "0.6233264", "0.6176137", "0.6176137", "0.6176137", "0.6156524", "0.6148734", "0.61401093", "0.61274844", "0.61236703", "0.6096312", "0.60498923", "0.6026693", "0.60238415", "0.6016287", "0.59969455", "0.5969956", "0.596961", "0.59476644", "0.59449685", "0.59034085", "0.5869931", "0.5845235", "0.58123446", "0.58040917", "0.5744156", "0.57300836", "0.57290846", "0.5709581", "0.5704042", "0.5703137", "0.57024705", "0.56810796", "0.5673086", "0.56651735", "0.5662108", "0.5661393", "0.5641203", "0.56336087", "0.56140035", "0.55794644", "0.5576348", "0.55755323", "0.5554803", "0.55442905", "0.5535674", "0.55339533", "0.55200744", "0.55139494", "0.54979026", "0.54896265", "0.54834735", "0.54834735", "0.54834735", "0.54834735", "0.5479564", "0.5472675", "0.54565346", "0.5454029", "0.54502773", "0.5449502", "0.5446189", "0.54262614", "0.54262614", "0.5419851", "0.5416133", "0.5414097", "0.54063904", "0.54049975", "0.53848", "0.538313", "0.53792155", "0.5362445", "0.53464115", "0.53464115", "0.53384584", "0.5331353", "0.53260946", "0.5321616", "0.53144073", "0.5310118", "0.5303255", "0.5285238", "0.52847195", "0.5279243", "0.52757305", "0.52709323", "0.52691007", "0.52686065", "0.52466065", "0.52340513", "0.52266246", "0.52265745", "0.5217708" ]
0.60084605
21
return cursor to get contact info: given and family names
private static Cursor getFamilyInfo(Context context, String id) { String whereName = ContactsContract.Data.MIMETYPE + " = ? AND " + ContactsContract.CommonDataKinds.StructuredName.LOOKUP_KEY + " = ?"; String[] whereNameParams = new String[] { ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE, id }; return context.getContentResolver().query( ContactsContract.Data.CONTENT_URI, new String[] { ContactsContract.CommonDataKinds.StructuredName.LOOKUP_KEY, ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME, ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME }, whereName, whereNameParams, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void requestContactInformation() {\n CONTACTS = new ArrayList<>();\n\n Cursor c = getContentResolver().query(ContactsContract.Contacts.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME_PRIMARY + \" asc\");\n\n while(c.moveToNext()) {\n HashMap<String, String> map = new HashMap<String, String>();\n String id = c.getString(c.getColumnIndex(ContactsContract.Contacts._ID));\n String name = c.getString(c.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME_PRIMARY));\n\n Cursor phoneCursor = getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \" = \" + id,\n null, null\n );\n\n if (phoneCursor.moveToFirst()) {\n String number = phoneCursor.getString(phoneCursor.getColumnIndex(\n ContactsContract.CommonDataKinds.Phone.NUMBER\n ));\n CONTACTS.add(Pair.create(name, number));\n }\n\n phoneCursor.close();\n }\n\n }", "public Cursor getAllContact()\n {\n return db.query(DATABASE_TABLE,new String[]{KEY_ROWID,KEY_NAME,\n KEY_EMAIL},null,null,null,null,null);\n }", "public List<Person> readContactlist()\n {\n List<Person> personList=new ArrayList<Person>();\n\n ContentResolver resolver = getContentResolver();\n Cursor cursor = resolver.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n\n while (cursor.moveToNext()) {\n String id = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n String name = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\n\n Cursor phoneCursor = resolver.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"= ?\", new String[]{id}, null);\n\n\n while (phoneCursor.moveToNext()) {\n String phoneNumber = phoneCursor.getString(phoneCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n\n personList.add(new Person(name, phoneNumber));\n }\n }\n return personList;\n }", "public ContactInfo getContactInfo(String document) {\r\n //Scanner object is initialized\r\n Scanner doc = new Scanner(document);\r\n\r\n //Scanner object is used to iterate line-by-line through the document\r\n while(doc.hasNextLine()) {\r\n String line = doc.nextLine();\r\n\r\n //Checks for the '@' char to find what line is an email address\r\n if(line.indexOf('@') >= 0) {\r\n email = line;\r\n }\r\n //Checks for the '-' char to find what line is a number\r\n else if(line.indexOf('-') >= 0) {\r\n if(!line.contains(\"Fax\") && !line.contains(\"Pager\")) {\r\n //Uses a regular expression to remove any character that is not a digit\r\n number = line.replaceAll(\"\\\\D\", \"\");\r\n }\r\n }\r\n }\r\n\r\n doc = new Scanner(document);\r\n\r\n /*Makes a second pass through the document to find the name. It uses the last\r\n name in the email that we found earlier*/\r\n while(doc.hasNextLine()) {\r\n String line = doc.nextLine();\r\n //The index of the last letter of the last name\r\n int emailIndex = document.indexOf('@') - 1;\r\n\r\n /*Iterates through the line in reverse to check for the last name found\r\n on the email*/\r\n for(int i = line.length() - 1; i >= 0; i--) {\r\n //End of last name\r\n if(line.charAt(i) == ' ') {\r\n name = line;\r\n break;\r\n }\r\n //Compares characters from the email and the line\r\n else if(Character.toLowerCase(line.charAt(i)) != Character.toLowerCase(document.charAt(emailIndex))) {\r\n break;\r\n } else {\r\n emailIndex--;\r\n }\r\n }\r\n\r\n if(name != null)\r\n break;\r\n }\r\n\r\n doc.close();\r\n\r\n return this;\r\n }", "private String populateContacts() {\n // fetch the additional information (currently phone numbers)\n Map<Integer, List<Pair<String, Integer>>> numberCache = getAdditionalInformation();\n\n Cursor cursor = mContentResolver.query(\n ContactsContract.Contacts.CONTENT_URI, QUERY_PROJECTION_CONTACT, null, null, QUERY_ORDERING_CONTACT);\n\n int idIndex = cursor.getColumnIndex(ContactsContract.Contacts._ID);\n int nameIndex = cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME_PRIMARY);\n int hasNumberIndex = cursor.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER);\n\n StringBuilder concatList = new StringBuilder();\n\n // First thing we need to do is sanitize the queryString and split into tokens. One\n // important purpose of doing this is to verify if we truly have tokens to apply to a\n // search process. If we are left with an empty query, then we can simply return the\n // entire contact list. The way the algorithm logic flows, there must be at least one\n // query token in the list, even if a blank placeholder.\n ArrayList<String> sanitizedQueryTokens = new ArrayList<String>();\n if (mQueryString != null) {\n // split up the query string into tokens, based on whitespace and asterisks\n String[] queryTokens = mQueryString.trim().split(\"[\\\\*\\\\s]+\");\n // get rid of any empty string references\n for (String currentString : queryTokens) {\n if (!currentString.equals(\"\")) {\n sanitizedQueryTokens.add(currentString);\n }\n }\n // if the ArrayList is empty, then we assume match everything\n if (sanitizedQueryTokens.size() == 0) {\n mQueryString = null;\n }\n }\n\n // Now perform the search. If the queryString is null, then the search reduces\n // to a dump of all contacts\n if ( mQueryString == null) {\n // The search algorithm is designed to work without search criteria (reduction to\n // entire list dumped). However we need at least one query token to enter the main\n // search loop.\n sanitizedQueryTokens.add(\"\");\n }\n\n StringBuilder concatListMatches = new StringBuilder();\n int numMatches = 0;\n\n while (cursor.moveToNext()) {\n String currentName = cursor.getString(nameIndex);\n\n if (currentName != null && !currentName.isEmpty()) {\n // If we are not actually performing a search, we still need to enter this loop\n // once (hence why we added a blank term above).\n for (String currentString : sanitizedQueryTokens) {\n // Add this contact to the list if we are either not performing a search\n // or if the current search criteria (token) matches\n if (mQueryString == null || currentName.toLowerCase().contains(\n currentString.toLowerCase())) {\n\n concatListMatches.append(currentName).append(\"\\n\");\n\n // If this contact has phone number(s), display them\n if (cursor.getInt(hasNumberIndex) > 0) {\n // grab the number(s) from the phat cache\n List<Pair<String, Integer>> phNums;\n if ((phNums = numberCache.get(cursor.getInt(idIndex))) != null) {\n // Pair<Phone Number, Type of Number>\n for (Pair<String, Integer> phNum : phNums) {\n concatListMatches.append(\"\\t\").append(phNum.first);\n switch(phNum.second) {\n case ContactsContract.CommonDataKinds.Phone.TYPE_HOME:\n concatListMatches.append(\" [HOME]\");\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE:\n concatListMatches.append(\" [MOBILE]\");\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_WORK:\n concatListMatches.append(\" [WORK]\");\n break;\n }\n concatListMatches.append(\"\\n\");\n }\n } else {\n // This should not happen. Means that there is a contact in which a\n // phone number is associated but yet no such number actually can\n // be found in the DB\n concatList.append(\"\\t<Phone number referenced, but not found>\\n\");\n }\n }\n\n ++numMatches;\n break;\n }\n }\n }\n }\n concatList.append(numMatches).append(\" Contacts Found\\n\\n\").append(concatListMatches);\n\n Log.d(\"populate contact list \",\"str \"+concatList.toString());\n return concatList.toString();\n }", "public static ContactQueryResult getContactInfo(Context context, Uri uri) {\n ContactQueryResult result = new ContactQueryResult();\n String id = null;\n Cursor cursor = context.getContentResolver().query(uri, null, null, null, null);\n if (null == cursor) {\n return result;\n }\n if (cursor.moveToFirst()) {\n id = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n }\n cursor.close();\n // Build the Entity URI.\n Uri.Builder b = Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_URI, id).buildUpon();\n b.appendPath(ContactsContract.Contacts.Entity.CONTENT_DIRECTORY);\n Uri contactUri = b.build();\n // Create the projection (SQL fields) and sort order.\n String[] projection = { ContactsContract.Contacts.Entity.RAW_CONTACT_ID,\n ContactsContract.Contacts.Entity.DATA1, ContactsContract.Contacts.Entity.MIMETYPE };\n String sortOrder = ContactsContract.Contacts.Entity.RAW_CONTACT_ID + \" ASC\";\n cursor = context.getContentResolver().query(contactUri, projection, null, null, sortOrder);\n if (null == cursor) {\n return result;\n }\n String mime;\n int mimeIdx = cursor.getColumnIndex(ContactsContract.Contacts.Entity.MIMETYPE);\n int dataIdx = cursor.getColumnIndex(ContactsContract.Contacts.Entity.DATA1);\n if (cursor.moveToFirst()) {\n do {\n mime = cursor.getString(mimeIdx);\n if (mime.equalsIgnoreCase(CommonDataKinds.Phone.CONTENT_ITEM_TYPE)) {\n result.phones.add(cursor.getString(dataIdx));\n } else if (mime.equalsIgnoreCase(CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE)) {\n result.name = cursor.getString(dataIdx);\n }\n } while (cursor.moveToNext());\n }\n cursor.close();\n return result;\n }", "private ArrayList<Contact> getContactList(Context context) {\n String[] selectCol = new String[] { ContactsContract.Contacts.DISPLAY_NAME,\n ContactsContract.Contacts.HAS_PHONE_NUMBER, ContactsContract.Contacts._ID };\n\n final int COL_NAME = 0;\n final int COL_HAS_PHONE = 1;\n final int COL_ID = 2;\n\n // the selected cols for phones of a user\n String[] selPhoneCols = new String[] { ContactsContract.CommonDataKinds.Phone.NUMBER,\n ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME, ContactsContract.CommonDataKinds.Phone.TYPE };\n\n final int COL_PHONE_NUMBER = 0;\n final int COL_PHONE_NAME = 1;\n final int COL_PHONE_TYPE = 2;\n\n String select = \"((\" + Contacts.DISPLAY_NAME + \" NOTNULL) AND (\" + Contacts.HAS_PHONE_NUMBER + \"=1) AND (\"\n + Contacts.DISPLAY_NAME + \" != '' ))\";\n\n ArrayList<Contact> list = new ArrayList<Contact>();\n Cursor cursor = context.getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, selectCol, select,\n null, ContactsContract.Contacts.DISPLAY_NAME + \" COLLATE LOCALIZED ASC\");\n if (cursor == null) {\n return list;\n }\n if (cursor.getCount() == 0) {\n return list;\n }\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n int contactId;\n contactId = cursor.getInt(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n if (cursor.getInt(COL_HAS_PHONE) > 0) {\n // the contact has numbers\n // 获得联系人的电话号码列表\n String displayName;\n displayName = cursor.getString(COL_NAME);\n Cursor phoneCursor = context.getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI, selPhoneCols,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"=\" + contactId, null, null);\n if (phoneCursor.moveToFirst()) {\n do {\n // 遍历所有的联系人下面所有的电话号码\n String phoneNumber = phoneCursor.getString(COL_PHONE_NUMBER);\n Contact contact = new Contact(0, displayName);\n contact.phoneNumber = phoneNumber;\n list.add(contact);\n } while (phoneCursor.moveToNext());\n \n phoneCursor.close();\n }\n }\n cursor.moveToNext();\n }\n \n cursor.close();\n\n return list;\n }", "private List getContactNames() {\n List<Contact> contacts = new ArrayList<>();\n // Get the ContentResolver\n ContentResolver cr = getContentResolver();\n // Get the Cursor of all the contacts\n Cursor cursor = cr.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n while (cursor.moveToNext()) {\n\n\n //Sjekker om kontakt har et tlf nummer\n String hasNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.HAS_PHONE_NUMBER));\n String contactName = \"\";\n if (hasNumber.equals(\"1\")) {\n contactName = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n\n Contact contact = new Contact(contactName);\n contacts.add(contact);\n\n\n }\n }\n cursor.close();\n return contacts;\n }", "private void getContactDataBefore() {\n int i = 0;\n List<String> list = new ArrayList<>();\n\n Cursor c1 = getContentResolver()\n .query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);\n\n if ((c1 != null) && c1.moveToFirst()) {\n\n // add contact id's to the mIDs list\n do {\n String id = c1.getString(c1.getColumnIndexOrThrow(ContactsContract.Contacts._ID));\n String name = c1.getString(c1.getColumnIndexOrThrow(ContactsContract.Contacts.DISPLAY_NAME));\n\n // query all contact numbers corresponding to current id\n Cursor c2 = getContentResolver()\n .query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n new String[]{ContactsContract.CommonDataKinds.Phone.NUMBER},\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"=?\",\n new String[]{id}, null);\n\n if (c2 != null && c2.moveToFirst()) {\n // Log.d(\"DEBUG\",\"name =\" + name);\n list = new ArrayList<>();\n\n if (idsHash.containsKey(name)) {\n list = idsHash.get(name);\n } else {\n mIDs.add(id);\n mNames.add(name);\n mNumbers.add(c2.getString(c2\n .getColumnIndexOrThrow(ContactsContract.CommonDataKinds.Phone.NUMBER)));\n }\n\n list.add(id);\n idsHash.put(name, list);\n\n c2.close();\n } else {\n c2.close();\n }\n\n i++;\n } while (c1.moveToNext() && i < c1.getCount());\n\n c1.close();\n }\n }", "@Override\r\n\tpublic ContactInfo getContactInfo(int index) {\r\n\t\tContactInfo cInfo = new ContactInfo();\r\n\t\tmCursor.moveToPosition(index);\r\n\t\tcInfo.setDisplayName(mCursor.getString(NAME));\r\n\t\tcInfo.setPhoneNumber(mCursor.getString(NUMBER));\r\n\t\tcInfo.setPhone_ID(mCursor.getString(PHONE_ID));\r\n\t\tcInfo.set_ID(mCursor.getString(_ID));\r\n\t\t\r\n\t\tcInfo.setIndex(index);\r\n\t\t\r\n\t\tString type;\r\n\t\tint phoneType = Integer.parseInt(mCursor.getString(TYPE));\r\n\t\tswitch(phoneType) {\r\n\t\tcase PhonesColumns.TYPE_HOME:\r\n\t\t\ttype = \"home\";\r\n\t\t\tbreak;\r\n\t\tcase PhonesColumns.TYPE_MOBILE:\r\n\t\t\ttype = \"mobile\";\r\n\t\t\tbreak;\r\n\t\tcase PhonesColumns.TYPE_WORK:\r\n\t\t\ttype = \"work\";\r\n\t\t\tbreak;\r\n\t\tcase PhonesColumns.TYPE_OTHER:\r\n\t\t\ttype = \"other\";\r\n\t\t\tbreak;\r\n\t\tcase PhonesColumns.TYPE_CUSTOM:\r\n\t\t\ttype = \"custom\";\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\ttype = \"\";\r\n\t\t\tbreak;\t\t\t\t\r\n\t\t}\r\n\t\tcInfo.setPhoneType(type);\r\n\t\t\r\n\t\treturn cInfo;\r\n\t}", "@Override\n public Contact getContactDAO(String firstName, String lastName) {\n\n SQLiteDatabase database = contactDB.getReadableDatabase();\n Cursor cursor = null;\n // Cursor cursor = database.query(\"(Select \"+ContactContract.FIRST_NAME_COLUMN+\" ,\"+ContactContract.LAST_NAME_COLUMN+\" \"+\"from\"+\" \"+ContactContract.DATABASE_TABLE+\n // \"where \"+firstName+\"=\"+ContactContract.DATABASE_TABLE+\".\"+ContactContract.FIRST_NAME_COLUMN +\" )\",null,null );\n Contact contact = null;\n if (cursor != null) {\n contact = new Contact();\n contact.setFirstName(cursor.getString(1));\n contact.setLastName(cursor.getString(2));\n }\n return contact;\n }", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "com.ubtrobot.phone.PhoneCall.Contact getContactList(int index);", "public static Cursor getDashboardContactList() {\n\t\tLog.d(\" QuizApp--SQLHelper\", \"Contact--Querying Data\");\n\t\treturn db.rawQuery(\"select * from Contact order by name\", null);\n\t}", "private List<ModelContacts> getContact(){\n String contenue_ecran = tableView.getText().toString().trim();\n List<ModelContacts> list = new ArrayList<>();\n if (!contenue_ecran.equals(\"\")) {\n Cursor cursor = this.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME + \" ASC\");\n assert cursor != null;\n cursor.moveToFirst();\n while (cursor.moveToNext()) {\n String phoneNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n String name = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n String image = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.PHOTO_ID));\n String formatPhoneNumber = \"<font color='#42A5F5'><b>\" + contenue_ecran + \"</b></font>\";\n String formatPhone = phoneNumber.replace(contenue_ecran, formatPhoneNumber);\n if (phoneNumber.contains(contenue_ecran)) {\n list.add(new ModelContacts(name, image, formatPhone));\n }\n }\n cursor.close();\n }\n return list;\n }", "public void getContactInfo(Intent intent, int tag)\n\t{\n\t\ttry{\n\t\t\tllenaCorreo(tag+\"\",\"\");\n\t\t\tllenaCelular(tag+\"\", \"\");\n\t\t\t\n\t\t\tCursor cursor = managedQuery(intent.getData(), null, null, null, null); \n\t\t\t if(!cursor.isClosed()&&cursor!=null){\n\t\t\t while (cursor.moveToNext()) \n\t\t\t { \n\t\t\t String contactId = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n\t\t\t String hasPhone = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER));\n\t\t\n\t\t\t if ( hasPhone.equalsIgnoreCase(\"1\")){\n\t\t\t hasPhone = \"true\";\n\t\t\t \n\t\t\t }else{\n\t\t\t hasPhone = \"false\" ;\n\t\t\t }\n\t\t\t if (Boolean.parseBoolean(hasPhone)) \n\t\t\t {\n\t\t\t Cursor phones = getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,ContactsContract.CommonDataKinds.Phone.CONTACT_ID +\" = \"+ contactId,null, null);\n\t\t\t listaCels= new ArrayList<String>();\n\t\t\t while (phones.moveToNext()) \n\t\t\t {\n\t\t\t \n\t\t\t String phoneNumber = phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n\t\t\t phoneNumber= phoneNumber.replaceAll(\" \", \"\");\n\t\t\t \n\t\t\t final char c = phoneNumber.charAt(0);\n\t\t\t if(c=='+'){\n\t\t\t \t try{\n\t\t\t \t\t phoneNumber = phoneNumber.substring(3, 13); \n\t\t\t \t }catch(Exception e){\n\t\t\t \t\t DatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t \t }\n\t\t\t }\n\t\t\t \n\t\t\t listaCels.add(phoneNumber);\n\t\t\t }\n\t\t\t if(listaCels.size()==1){ //si tiene solo un telefono\n\t\t\t \tllenaCelular(tag+\"\",listaCels.get(0)); \n\t\t\t \t\n\t\t\t }else if(listaCels.size()==0){//si no tiene telefono\n\t\t\t \tllenaCelular(tag+\"\",\"\");\n\t\t\t }else{\n\t\t\t \tdialogoLista(tag+\"\");\n\t\t\t }\n\t\t\t phones.close();\n\t\t\t }\n\t\t\n\t\t\t // Find Email Addresses\n\t\t\t Cursor emails = getContentResolver().query(ContactsContract.CommonDataKinds.Email.CONTENT_URI,null,ContactsContract.CommonDataKinds.Email.CONTACT_ID + \" = \" + contactId,null, null);\n\n\t\t\t while (emails.moveToNext()) \n\t\t\t {\n\t\t\t String emailAddress = emails.getString(emails.getColumnIndex(ContactsContract.CommonDataKinds.Email.DATA));\n\t\t\t \n\t\t\t \tllenaCorreo(tag+\"\",emailAddress);\n\t\t\t \n\t\t\t break;\n\t\t\t }\n\t\t\t \n\t\t\t emails.close();\n\t\t\t break;\n\t\t\t } \n\t\t\t }\n\t\t}catch(Exception e){\n\t\t\tDatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t}\n\t}", "public static String getContactNameById(Integer _id, Context context){\n\t\t\n\t\t\t//Map<String, String> result = new HashMap<String, String>();\n\n\t \tString cid = _id.toString(); \n\t\t \t//String contactNumber = \"\";\n\t\t \tString contactName = \"\";\n\t \tCursor cursor = context.getContentResolver().query( \n\t \t\t\tContactsContract.Contacts.CONTENT_URI, null, \n\t \t\t\tContactsContract.Contacts._ID + \"=?\", \n\t \t new String[]{cid}, null); \n\t \t\n\t \t//Log.e(\"PARSER\", \"1\");\n\t \tif(cursor.moveToFirst()){\n\t //String id = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n\t\n\t //if(Integer.parseInt(cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0)\n\t //{\n\t\t\n\t\t\n\t \t//Log.e(\"PARSER\", \"2\");\n\t \t\n\t \tcontactName = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\t \t//contactName = cursor.getString(ContactsQuery.DISPLAY_NAME);\n Cursor pCur = context.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,null,ContactsContract.CommonDataKinds.Phone.CONTACT_ID +\" = ?\",new String[]{ _id.toString() }, null);\n while (pCur.moveToNext()){\n \t\n \t\n // contactNumber = pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n // contactName = pCur.getString(pCur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n \n //Log.e(\"PARSER\"+contactNumber, \"Name\"+contactName);\n //result.put(contactNumber, contactName);\n } \n pCur.close();\n\t //}\n\t \n\t\t\t}\n\t \tcursor.close();\n return contactName;\n\t}", "public void allContacts(){\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(\"./src/data/contactInfo.text\"));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tSystem.out.println(line);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "Contact searchContact(String searchName){\n for(int i = 0; i < friendsCount; i++){\n if(myFriends[i].name.equals(searchName)){\n return myFriends[i];\n }\n }\n return null;\n }", "public CallSpec<List<XingUser>, HttpError> getYourContacts() {\n return getContacts(ME);\n }", "public void populate(Cursor peopleCur, ContentResolver cResolver) {\n\t\treset();\n\t\tsetPeopleFields(peopleCur);\n\t\tString personID = _id;\n\n\t\t//\n\t\t// Get PeopleColumns fields\n\t\t//\n\t\tCursor structuredName = cResolver.query(Data.CONTENT_URI, null,\n\t\t\t\tData.RAW_CONTACT_ID + \"=?\" + \" AND \" + Data.MIMETYPE + \"='\"\n\t\t\t\t\t\t+ StructuredName.CONTENT_ITEM_TYPE + \"'\",\n\t\t\t\tnew String[] { String.valueOf(personID) }, null);\n\n\t\tif (structuredName != null) {\n\t\t\tif (structuredName.moveToFirst()) {\n\t\t\t\tint selectedColumn = structuredName\n\t\t\t\t\t\t.getColumnIndex(StructuredName.DISPLAY_NAME);\n\t\t\t\tdisplayName = structuredName.getString(selectedColumn);\n\t\t\t}\n\t\t\tstructuredName.close();\n\t\t}\n\n\t\tif (displayName != null) {\n\t\t\tMatcher m = namePattern.matcher(displayName);\n\t\t\tif (m.matches()) {\n\t\t\t\tif (m.group(1) != null) {\n\t\t\t\t\tlastName = m.group(2);\n\t\t\t\t\tfirstName = m.group(3);\n\t\t\t\t} else {\n\t\t\t\t\tfirstName = m.group(5);\n\t\t\t\t\tlastName = m.group(6);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfirstName = displayName;\n\t\t\t\tlastName = \"\";\n\t\t\t}\n\t\t} else {\n\t\t\tfirstName = lastName = \"\";\n\t\t}\n\n\t\tCursor nickNameCursor = cResolver.query(Data.CONTENT_URI, null,\n\t\t\t\tData.RAW_CONTACT_ID + \"=?\" + \" AND \" + Data.MIMETYPE + \"='\"\n\t\t\t\t\t\t+ Nickname.CONTENT_ITEM_TYPE + \"'\",\n\t\t\t\tnew String[] { String.valueOf(personID) }, null);\n\n\t\tif (nickNameCursor != null) {\n\t\t\tif (nickNameCursor.moveToFirst()) {\n\t\t\t\tnickName = nickNameCursor.getString(nickNameCursor\n\t\t\t\t\t\t.getColumnIndex(Nickname.NAME));\n\t\t\t\tLog.d(TAG, \"nickName: \" + nickName);\n\t\t\t}\n\t\t\tnickNameCursor.close();\n\t\t}\n\n\t\tCursor organization = cResolver.query(Data.CONTENT_URI, null,\n\t\t\t\tData.RAW_CONTACT_ID + \"=?\" + \" AND \" + Data.MIMETYPE + \"='\"\n\t\t\t\t\t\t+ Organization.CONTENT_ITEM_TYPE + \"'\",\n\t\t\t\tnew String[] { String.valueOf(personID) }, null);\n\n\t\t// Set the organization fields\n\t\tif (organization != null) {\n\t\t\tif (organization.moveToFirst()) {\n\t\t\t\tdo {\n\t\t\t\t\tsetOrganizationFields(organization);\n\t\t\t\t} while (organization.moveToNext());\n\t\t\t}\n\t\t\torganization.close();\n\t\t}\n\n\t\t// Set all the phone numbers\n\t\tCursor phones = cResolver.query(Data.CONTENT_URI, null,\n\t\t\t\tData.RAW_CONTACT_ID + \"=?\" + \" AND \" + Data.MIMETYPE + \"='\"\n\t\t\t\t\t\t+ Phone.CONTENT_ITEM_TYPE + \"'\",\n\t\t\t\tnew String[] { String.valueOf(personID) }, null);\n\n\t\tif (phones != null) {\n\t\t\tif (phones.moveToFirst()) {\n\t\t\t\tdo {\n\t\t\t\t\tsetPhoneFields(phones);\n\t\t\t\t} while (phones.moveToNext());\n\t\t\t}\n\t\t\tphones.close();\n\n\t\t}\n\n\t\t// emails\n\t\tCursor contactMethods = cResolver.query(Data.CONTENT_URI, null,\n\t\t\t\tData.RAW_CONTACT_ID + \"=?\" + \" AND \" + Data.MIMETYPE + \"='\"\n\t\t\t\t\t\t+ Email.CONTENT_ITEM_TYPE + \"'\",\n\t\t\t\tnew String[] { String.valueOf(personID) }, null);\n\n\t\tif (contactMethods != null) {\n\t\t\tif (contactMethods.moveToFirst()) {\n\t\t\t\tdo {\n\t\t\t\t\tsetEmailMethodsFields(contactMethods);\n\t\t\t\t} while (contactMethods.moveToNext());\n\t\t\t}\n\t\t\tcontactMethods.close();\n\t\t}\n\n\t\t// , addresses\n\t\tCursor addressesMethods = cResolver.query(Data.CONTENT_URI, null,\n\t\t\t\tData.RAW_CONTACT_ID + \"=?\" + \" AND \" + Data.MIMETYPE + \"='\"\n\t\t\t\t\t\t+ StructuredPostal.CONTENT_ITEM_TYPE + \"'\",\n\t\t\t\tnew String[] { String.valueOf(personID) }, null);\n\n\t\tif (addressesMethods != null) {\n\t\t\tif (addressesMethods.moveToFirst()) {\n\t\t\t\tdo {\n\t\t\t\t\tsetAddrMethodsFields(addressesMethods);\n\t\t\t\t} while (addressesMethods.moveToNext());\n\t\t\t}\n\t\t\taddressesMethods.close();\n\t\t}\n\n\t\t// ims\n\t\tCursor imMethods = cResolver.query(Data.CONTENT_URI, null,\n\t\t\t\tData.RAW_CONTACT_ID + \"=?\" + \" AND \" + Data.MIMETYPE + \"='\"\n\t\t\t\t\t\t+ Im.CONTENT_ITEM_TYPE + \"'\",\n\t\t\t\tnew String[] { String.valueOf(personID) }, null);\n\n\t\tif (imMethods != null) {\n\t\t\tif (imMethods.moveToFirst()) {\n\t\t\t\tdo {\n\t\t\t\t\tsetImMethodsFields(imMethods);\n\t\t\t\t} while (imMethods.moveToNext());\n\t\t\t}\n\t\t\timMethods.close();\n\t\t}\n\n\t\t// website\n\t\tCursor c = cResolver.query(Data.CONTENT_URI, null, Data.RAW_CONTACT_ID\n\t\t\t\t+ \"=?\" + \" AND \" + Data.MIMETYPE + \"='\"\n\t\t\t\t+ Website.CONTENT_ITEM_TYPE + \"'\",\n\t\t\t\tnew String[] { String.valueOf(personID) }, null);\n\n\t\tif (c != null) {\n\t\t\twhile (c.moveToNext()) {\n\t\t\t\turls.add(new RowData(Website.TYPE_OTHER, c.getString(c\n\t\t\t\t\t\t.getColumnIndex(Website.URL)), true));\n\t\t\t}\n\t\t\tc.close();\n\t\t}\n\n\t\t// Load a photo if one exists.\n\t\tCursor contactPhoto = cResolver.query(Data.CONTENT_URI, null,\n\t\t\t\tData.RAW_CONTACT_ID + \"=?\" + \" AND \" + Data.MIMETYPE + \"='\"\n\t\t\t\t\t\t+ Photo.CONTENT_ITEM_TYPE + \"'\",\n\t\t\t\tnew String[] { String.valueOf(personID) }, null);\n\n\t\tif (contactPhoto != null) {\n\t\t\tif (contactPhoto.moveToFirst()) {\n\t\t\t\tphoto = contactPhoto.getBlob(contactPhoto\n\t\t\t\t\t\t.getColumnIndex(Photo.PHOTO));\n\t\t\t}\n\t\t\tcontactPhoto.close();\n\t\t}\n\n\t}", "org.multibit.hd.core.protobuf.MBHDContactsProtos.Contact getContact(int index);", "private Contacts getContact(String name) {\n Contacts foundContact = contactList.stream()\n .filter(contact ->\n contact.getFirstName().equals(name) ||\n contact.getLastName().equals(name))\n .findFirst().orElse(null);\n return foundContact;\n }", "public Address SearchContact(String firstName,String lastName) {\r\n int i = 0;\r\n while (!contact.get(i).getFirstName().equals(firstName) && !contact.get(i).getLastName().equals(lastName)){\r\n i++;\r\n }\r\n return contact.get(i);\r\n }", "public void findContact(){\n EtecsaDB database = new EtecsaDB(this.getContext());\n if (!database.hasDatabase()){\n Toast.makeText(this.getContext(), R.string.no_database, Toast.LENGTH_SHORT).show();\n }\n else //buscar contacto\n new Search(this.getActivity()).execute(advancedSearch);\n }", "public static String getContactNameByPhoneNumber(Context context, String number) {\n ContentResolver contentResolver = context.getContentResolver();\n Uri uri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number));\n String[] projection = new String[] { PhoneLookup.DISPLAY_NAME, PhoneLookup._ID };\n Cursor cursor = contentResolver.query(uri, projection, null, null, null);\n if (null == cursor) {\n return null;\n }\n String id = null;\n if (cursor.moveToFirst()) {\n id = cursor.getString(cursor.getColumnIndex(PhoneLookup._ID));\n }\n cursor.close();\n if (null == id) {\n return null;\n }\n\n // Build the Entity URI.\n Uri.Builder b = Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_URI, id).buildUpon();\n b.appendPath(ContactsContract.Contacts.Entity.CONTENT_DIRECTORY);\n Uri contactUri = b.build();\n Log.d(TAG, \"XXX: contactUri is \" + contactUri);\n // Create the projection (SQL fields) and sort order.\n projection = new String[] {\n ContactsContract.Contacts.Entity.RAW_CONTACT_ID,\n ContactsContract.Contacts.Entity.DATA1,\n ContactsContract.Contacts.Entity.MIMETYPE\n };\n String sortOrder = ContactsContract.Contacts.Entity.RAW_CONTACT_ID + \" ASC\";\n cursor = context.getContentResolver().query(contactUri, projection, null, null, sortOrder);\n if (null == cursor) {\n return null;\n }\n String name = null;\n int mimeIdx = cursor.getColumnIndex(ContactsContract.Contacts.Entity.MIMETYPE);\n int dataIdx = cursor.getColumnIndex(ContactsContract.Contacts.Entity.DATA1);\n if (cursor.moveToFirst()) {\n do {\n String mime = cursor.getString(mimeIdx);\n if (mime.equalsIgnoreCase(CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE)) {\n name = cursor.getString(dataIdx);\n break;\n }\n } while (cursor.moveToNext());\n }\n cursor.close();\n\n return name;\n }", "public Cursor getContactInfo(String bookingId) {\r\n\t\tCursor c = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tLog.v(\"derp\", bookingId);\r\n\t\t\tc = database.rawQuery(\"SELECT \" + DatabaseHelper.COLUMN_BOOKING_CONTACT_ID \r\n\t\t\t\t\t+ \" FROM \" + DatabaseHelper.TABLE_BOOKING + \" WHERE \"\r\n\t\t\t\t\t+ DatabaseHelper.COLUMN_BOOKING_ID + \" = '\" + bookingId + \"'\", null);\r\n\t\t\t\r\n\t\t\tc.moveToFirst();\r\n\t\t\tString id = String.valueOf(c.getInt(c.getColumnIndex(DatabaseHelper.COLUMN_BOOKING_CONTACT_ID)));\r\n\t\t\t\r\n\t\t\tc = database.rawQuery(\"SELECT * FROM \" + DatabaseHelper.TABLE_CONTACT + \" WHERE \"\r\n\t\t\t\t\t+ DatabaseHelper.COLUMN_CONTACT_ID + \" = '\" + id + \"';\", null);\r\n\t\t\treturn c;\r\n\t\t} catch (SQLException ex) {\r\n\t\t\tthrow ex;\r\n\t\t}\r\n\t}", "public static List<MMXAttribute<UserQuery.Type>> getAttrsFromContacts(Context context) {\n ContentResolver resolver= context.getContentResolver();\n Cursor cc = null;\n try {\n // Use all email addresses and phone numbers as search criteria.\n cc = resolver.query(Data.CONTENT_URI, SEARCH_PROJECTION,\n Data.MIMETYPE+\" IN (?,?)\", new String[] {\n Phone.CONTENT_ITEM_TYPE, Email.CONTENT_ITEM_TYPE }, null);\n ArrayList<MMXAttribute<UserQuery.Type>> attr = \n new ArrayList<MMXAttribute<UserQuery.Type>>(cc.getCount());\n while (cc.moveToNext()) {\n String data;\n UserQuery.Type type;\n boolean isPhone = Phone.CONTENT_ITEM_TYPE.equals(cc.getString(COLUMN_MIMETYPE));\n if (isPhone) {\n type = UserQuery.Type.phone;\n data = cc.getString(COLUMN_PHONENUM);\n } else {\n type = UserQuery.Type.email;\n data = cc.getString(COLUMN_EMAILADDR);\n }\n if (data == null || data.isEmpty()) {\n continue;\n }\n attr.add(new MMXAttribute<UserQuery.Type>(type, data));\n }\n return attr;\n } catch (Throwable e) {\n e.printStackTrace();\n return null;\n } finally {\n if (cc != null) {\n cc.close();\n }\n }\n }", "public List<ContactBE> getContacts() {\n List<ContactBE> contacts = new ArrayList<>();\n\n try (ContactCurserWrapper cursor = queryContacts(null, null)) {\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n contacts.add(cursor.getContact());\n cursor.moveToNext();\n }\n }\n return contacts;\n }", "public\t ContactList getContactHeaders()\n { return (ContactList) this.getSIPHeaderList(ContactHeader.NAME); }", "com.polytech.spik.protocol.SpikMessages.Contact getContact();", "public static Cursor getBusINFOCursor() {\r\n SQLiteDatabase db = SearchHelper.getReadableDatabase();\r\n if(Bus.isLanguare()==true) {\r\n Cursor cursor = db.rawQuery(Prefix_Data_SQL.QUERY_BUS_BASIC_INFO_TC_SQL, null);\r\n return cursor;\r\n }else{\r\n Cursor cursor = db.rawQuery(Prefix_Data_SQL.QUERY_BUS_BASIC_INFO_EN_SQL, null);\r\n return cursor;\r\n }\r\n }", "public void onActivityResult(int reqCode, int resultCode, Intent data) {\n super.onActivityResult(reqCode, resultCode, data);\n if (reqCode != Activity.RESULT_OK && data != null) {\n Uri contactUri = data.getData();\n String[] rcontact = {ContactsContract.CommonDataKinds.Phone.NUMBER, ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME};\n Cursor c = getContentResolver()\n .query(contactUri, rcontact, null, null, null);\n c.moveToFirst();\n int contact_name = c.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER);\n int contact_number = c.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME);\n String contact_number1 = c.getString(contact_number);\n String contact_name1 = c.getString(contact_name);\n input_msg.setText(\"Number: \" + contact_number1 + \" Name:\" + contact_name1);\n Toast.makeText(this, contact_name1 + \" has number \" + contact_number1, Toast.LENGTH_LONG).show();\n }\n else{\n Toast.makeText(this, \" This Device has no Contacs \", Toast.LENGTH_LONG).show();\n finish();\n }\n }", "private String getContactname(String phoneNumber2) {\n\t\t// TODO Auto-generated method stub\n\t\t ContentResolver cr = context.getContentResolver();\n\t\t Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(phoneNumber));\n\t\t Cursor cursor = cr.query(uri, new String[]{PhoneLookup.DISPLAY_NAME}, null, null, null);\n\t\t if (cursor == null) {\n\t\t return null;\n\t\t }\n\t\t String contactName = null;\n\t\t if(cursor.moveToFirst()) {\n\t\t contactName = cursor.getString(cursor.getColumnIndex(PhoneLookup.DISPLAY_NAME));\n\t\t }\n\n\t\t if(cursor != null && !cursor.isClosed()) {\n\t\t cursor.close();\n\t\t }\n\n\t\t return contactName;\n\t}", "public String getPrimaryContact();", "private void getContactList() {\r\n\r\n\t\tgroupData.clear();\r\n\t\tchildData.clear();\r\n\t\tDataHelper dataHelper = new DataHelper(ContactsActivity.this);\r\n\t\tdataHelper.openDatabase();\r\n\t\tgroupData = dataHelper.queryZoneAndCorpInfo(childData);\r\n\t\tdataHelper.closeDatabase();\r\n\t\thandler.sendEmptyMessage(1);\r\n\r\n\t\tif (groupData == null || groupData.size() == 0) {\r\n\t\t\tDataTask task = new DataTask(ContactsActivity.this);\r\n\t\t\ttask.execute(Constants.KServerurl + \"GetAllOrgList\", \"\");\r\n\t\t}\r\n\t}", "public List<contact> contact_get_all() {\n \treturn contact_get(null, KEY_CONTACT_LASTACT + \" DESC\");\n }", "public Contact findContact(String name)\r\n\t{\r\n\t\tSystem.out.println(\"in FindContact\");\r\n\t\tString name1;\r\n\t\tname = name.toUpperCase();\r\n\t\tfor(int i = 0; i < this.size(); i++)\r\n\t\t{\r\n\t\t\tname1 = this.get(i).getContactName().toUpperCase();\r\n\r\n\t\t\tif (name.equalsIgnoreCase(name1)) {\r\n\t\t\t\tSystem.out.println(this.get(i));\r\n\t\t\t\tContact contact = this.get(i);\r\n\t\t\t\treturn contact; \t\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\t\treturn null;\r\n\t}", "java.util.List<org.multibit.hd.core.protobuf.MBHDContactsProtos.Contact> \n getContactList();", "private List<Contact> getContactsList() {\n\n\t\tList<Contact> contactsList = new ArrayList<>();\n\n\t\tContentResolver cr = getActivity().getContentResolver();\n\n\t\t// Obtiene toda la informarciónd de los contactos\n\t\tCursor cursor = getActivity().getContentResolver().query(\n\t\t\t\tContactsContract.Contacts.CONTENT_URI, null, null, null,\n\t\t\t\t\"display_name\");\n\t\t// Obtiene el número de la columnas que queremos almacenar.\n\t\tint idIndex = cursor.getColumnIndex(ContactsContract.Contacts._ID);\n\t\tint displayNameIndex = cursor\n\t\t\t\t.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME);\n\n\t\tcursor.moveToFirst();\n\t\twhile (cursor.moveToNext()) {\n\t\t\t// Comprueba que tenga numero de teléfono\n\t\t\tif (Integer\n\t\t\t\t\t.parseInt(cursor.getString(cursor\n\t\t\t\t\t\t\t.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0) {\n\t\t\t\tString id = cursor.getString(idIndex);\n\t\t\t\tString name = cursor.getString(displayNameIndex);\n\t\t\t\tString phone = null;\n\n\t\t\t\tString selectionArgs = Phone.CONTACT_ID + \" = ? AND \"\n\t\t\t\t\t\t+ Phone.TYPE + \"= \" + Phone.TYPE_MOBILE;\n\n\t\t\t\tCursor pCur = cr.query(\n\t\t\t\t\t\tContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n\t\t\t\t\t\tnew String[] { Phone.NUMBER }, selectionArgs,\n\t\t\t\t\t\tnew String[] { id }, null);\n\n\t\t\t\tif (pCur.moveToFirst()) {\n\t\t\t\t\tphone = pCur.getString(0);\n\n\t\t\t\t}\n\t\t\t\tpCur.close();\n\n\t\t\t\t// Crea el objeto contact\n\t\t\t\tContact contact = new Contact(id, name, phone);\n\t\t\t\tcontactsList.add(contact);\n\t\t\t}\n\n\t\t}\n\n\t\treturn contactsList;\n\n\t}", "kr.pik.message.Profile.Contact getContact();", "public ArrayList<Contact> getAllContacts(){\r\n\t\t\r\n\t\tArrayList<Contact> contacts = new ArrayList<Contact>();\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\t\r\n\t\tCursor cursor = db.query(DBHelper.CONTACT_TABLE_NAME,\r\n\t\t\t\tnew String[] {DBHelper.COLUMN_NAME, DBHelper.COLUMN_GROUP,\r\n\t\t\t\tDBHelper.COLUMN_LATITUDE, DBHelper.COLUMN_LONGITUDE,\r\n\t\t\t\tDBHelper.COLUMN_MESSAGE, DBHelper.COLUMN_SHARE},\r\n\t\t\t\tnull, null,\r\n\t\t\t\tnull, null, null);\r\n\t\t\r\n\t\tcursor.moveToFirst();\r\n\t while (!cursor.isAfterLast()) {\r\n\t contacts.add(new Contact(cursor.getString(0), cursor.getString(1),\r\n\t \t\t cursor.getDouble(2), cursor.getDouble(3), cursor.getString(4),\r\n\t \t\t int_to_boolean(cursor.getInt(5))));\r\n\t cursor.moveToNext();\r\n\t }\r\n\t \r\n\t cursor.close();\r\n\t db.close();\r\n\t \r\n\t return contacts;\r\n\t}", "private List<BasicContact> getDataForListView() {\n\t\tlong groupId = getIntent().getLongExtra(Constants.INTENT_LONG_GROUP_ID, -1L);\r\n\t\tHashSet<Long> rawContactIds;\r\n\t\tif (groupId != -1) { // a group was selected\r\n\t\t\tList<Long> groupIds = new ArrayList<Long>(1);\r\n\t\t\tgroupIds.add(groupId);\r\n\t\t\trawContactIds = ContactsHelper.getRawContactIds(LabelView.this, groupIds);\r\n\t\t} else { // a tag was selected\r\n\t\t\trawContactIds = ContactsHelper.getRawContactIdsGivenTag(LabelView.this,\r\n\t\t\t\t\tmLabel);\r\n\t\t}\r\n\t\t\r\n\t\treturn ApplicationData.getBasicContacts(rawContactIds);\r\n\t}", "public List<Contact> getAllContactsByName(String searchByName);", "public List<HashMap<String,String>> contacts() {\n final Uri uriContact = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;\n ContentResolver cr = getActivity().getContentResolver();\n Cursor cur = cr.query(uriContact, null, null, null, null);\n\n List<HashMap<String,String>> contacts=new ArrayList<>();\n if (cur.getCount() > 0) {\n while (cur.moveToNext()) {\n String id = cur.getString(\n cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone._ID));\n String name = cur.getString(\n cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n\n\n String has_phone = cur.getString(cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.HAS_PHONE_NUMBER));\n HashMap<String,String> contact=new HashMap();\n if(!has_phone.endsWith(\"0\"))\n {\n contact.put(\"name\", name);\n String phoneNumber = cur.getString(cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n contact.put(\"number\",phoneNumber);\n contacts.add(contact);\n }\n }\n }\n this.contacts_phone=contacts;\n contacts=filter_to_app(contacts);\n return contacts;\n }", "public List<Contact> getAllContacts();", "public Cursor getContact(long rowId) throws SQLException\n {\n Cursor mCursor = db.query(true, DATABASE_TABLE, new String[] {KEY_ROWID,\n KEY_NAME,KEY_EMAIL},KEY_ROWID + \"=\" + rowId,null,null,null,null,null);\n if(mCursor != null)\n {\n mCursor.moveToFirst();\n }\n return mCursor;\n }", "@Override\r\n protected Cursor doInBackground(Long... params)\r\n {\r\n databaseConnector.open();\r\n \r\n // get a cursor containing all data on given entry\r\n return databaseConnector.getOneContact(params[0]);\r\n }", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "java.util.List<com.ubtrobot.phone.PhoneCall.Contact>\n getContactListList();", "public String getAllContacts() {\n\t\treturn \"SELECT * FROM CONTACTS\";\n\t}", "@Override\n public void onActivityResult(int reqCode, int resultCode, Intent data) {\n super.onActivityResult(reqCode, resultCode, data);\n\n switch (reqCode) {\n case (1) :\n if (resultCode == Activity.RESULT_OK) {\n Uri contactData = data.getData();\n Cursor c = managedQuery(contactData, null, null, null, null);\n if (c.moveToFirst()) {\n String name = c.getString(c.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n // Fetch other Contact details as you want to use\n\n ContentResolver cr = getContentResolver();\n Cursor cursor = cr.query(ContactsContract.Contacts.CONTENT_URI, null,\n \"DISPLAY_NAME = '\" + name + \"'\", null, null);\n if (cursor.moveToFirst()) {\n String contactId =\n cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n //\n // Get all phone numbers.\n //\n Cursor phones = cr.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \" = \" + contactId, null, null);\n while (phones.moveToNext()) {\n String number = phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n int type = phones.getInt(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE));\n switch (type) {\n case ContactsContract.CommonDataKinds.Phone.TYPE_HOME:\n // do something with the Home number here...\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE:\n // do something with the Mobile number here...\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_WORK:\n // do something with the Work number here...\n break;\n }\n\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"sms:\"\n + number)));\n }\n phones.close();\n }\n cursor.close();\n\n\n\n\n }\n }\n break;\n }\n }", "public String getContacts() {\n return contacts;\n }", "public Address getPrimaryContactParsed();", "private String retrieveContactName() {\n Cursor cursor = getContentResolver().query(uriContact, null, null, null, null);\n\n if (cursor.moveToFirst()) {\n\n // DISPLAY_NAME = The display name for the contact.\n // HAS_PHONE_NUMBER = An indicator of whether this contact has at least one phone number.\n contactName = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n }\n\n cursor.close();\n\n return contactName;\n\n }", "@Override\r\n\tpublic void loadContacts(ContentResolver contentResolver) {\t\t\r\n\t\t// Get the base URI for People table in Contacts content provider.\r\n\t // ie. content://contacts/people/\r\n\t\tUri contacts = Phones.CONTENT_URI;\r\n\t\t\r\n\t\tmCursor = contentResolver.query(contacts, PROJECTION, \r\n\t\t\t\tnull, //WHERE clause -- not specified\r\n\t\t\t\tnull, //Selection arguments\r\n\t\t\t\tPeopleColumns.NAME + \" ASC\"); //Order by clause\r\n\t\t\r\n\t\tboolean moveSucceeded = mCursor.moveToFirst();\r\n\t\t\r\n\t\tmContactNames = new ArrayList<String>();\r\n\t\twhile(moveSucceeded) {\r\n\t\t\tmContactNames.add(mCursor.getString(NAME));\r\n\t\t\tmoveSucceeded = mCursor.moveToNext();\r\n\t\t}\r\n\t}", "public String getContact() {\r\n return this.contact;\r\n }", "private String E19Contacts() {\n StringBuilder buffer = new StringBuilder();\n Date d = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\")).getTime();\n\n int numCols = 48; // width of flood text\n String tmp1 = \" \";\n String tmp2 = \" \";\n String tmp3 = \" \";\n buffer.append(\"\\f\");\n buffer.append(TextReportConstants.E19_HDR_CONTACTS + \"\\n\\n\");\n\n TextReportData data = TextReportDataManager.getInstance()\n .getDataForReports(lid, 6);\n\n int count1 = countNewlines(buffer.toString());\n\n buffer.append(\n \" SQ CONTACT/REMARKS PHONE\\n\");\n buffer.append(\n \" -- -------------------------------------------------- ------------------\\n\");\n\n int count2 = countNewlines(buffer.toString()) - count1;\n\n int available = getLinesPerPage() - count1 - count2 - 4;\n int avail = available;\n int loop = 0;\n\n if (data.getContactList().size() > 0) {\n for (Contacts contact : data.getContactList()) {\n // Do contact & phone.\n tmp1 = String.format(\" %2d %-51s%s\\n\",\n contact.getPriority(), contact.getContact(),\n contact.getPhone());\n\n // Do email address.\n tmp2 = String.format(\" %-60s\\n\", contact.getEmail());\n\n // Do remark.\n tmp3 = \"\";\n if (contact.getRemark() != null) {\n String[] lines = TextUtil.wordWrap(contact.getRemark(),\n numCols, 0);\n for (String s : lines) {\n if (s.trim().length() > 0) {\n tmp3 = tmp3.concat(\" \" + s + \"\\n\");\n } else {\n tmp3 = tmp3.concat(\"\\n\");\n }\n }\n }\n\n int needed = (countNewlines(tmp3) + 1) + 1 + 1;\n\n buffer.append(tmp1);\n buffer.append(tmp2);\n buffer.append(tmp3);\n avail -= needed;\n\n if (needed > avail) {\n // try to place FOOTER at the bottom\n buffer.append(advanceToFooter(loop, buffer.toString()));\n\n String footer = createFooter(data, E19_RREVISE_TYPE,\n sdf.format(d), \"NWS FORM E-19\", E19_CONTACTS,\n \"CONTACTS\", null, E19_STANDARD_LEFT_MARGIN);\n buffer.append(footer + \"\\n\\n\");\n\n // Do column header.\n buffer.append(\n \" SQ CONTACT/REMARKS PHONE\\n\");\n buffer.append(\n \" -- -------------------------------------------------- ------------------\\n\");\n buffer.append(String.format(\" %-55s PHONE\\n\",\n \"CONTACT/REMARKS\"));\n buffer.append(String.format(\" %-20s%-20s%-15s %-18s\\n\",\n \"--------------------\", \"--------------------\",\n \"---------------\", \"------------------\"));\n\n avail = available + count1;\n loop++;\n }\n }\n }\n\n // try to place FOOTER at the bottom\n buffer.append(advanceToFooter(loop, buffer.toString()));\n\n String footer = createFooter(data, E19_RREVISE_TYPE, sdf.format(d),\n \"NWS FORM E-19\", E19_CONTACTS, \"CONTACTS\", null,\n E19_STANDARD_LEFT_MARGIN);\n buffer.append(footer + \"\\n\\n\");\n\n return buffer.toString();\n }", "private Optional<Contact> findContact(AthenzTenant tenant) {\n if (!tenant.propertyId().isPresent()) {\n return Optional.empty();\n }\n List<List<String>> persons = organization.contactsFor(tenant.propertyId().get())\n .stream()\n .map(personList -> personList.stream()\n .map(User::displayName)\n .collect(Collectors.toList()))\n .collect(Collectors.toList());\n return Optional.of(new Contact(organization.contactsUri(tenant.propertyId().get()),\n organization.propertyUri(tenant.propertyId().get()),\n organization.issueCreationUri(tenant.propertyId().get()),\n persons));\n }", "Donor getContact(String name) {\n SQLiteDatabase db = this.getReadableDatabase();\n\n Cursor cursor = db.query(TABLE_CONTACTS, new String[] { KEY_NAME,\n KEY_PH_NO , KEY_CITY ,KEY_BL_GRP ,KEY_LAT ,KEY_LAN }, KEY_NAME + \"=?\",\n new String[] { name }, null, null, null, null);\n if (cursor != null)\n cursor.moveToFirst();\n\n Donor donor = new Donor(cursor.getString(0),cursor.getString(1), cursor.getString(2),cursor.getString(3),cursor.getString(4),cursor.getString(5));\n // return contact\n return donor;\n }", "@Override\n\tprotected void onActivityResult(int arg0, int arg1, Intent arg2) {\n\t\tsuper.onActivityResult(arg0, arg1, arg2);\n\t\tif(arg0==1&&arg1==RESULT_OK){\n\t\t\tif(arg2.getStringExtra(\"name\")==null)\n\t\t\t\treturn;\n\t\t\tarea=arg2.getStringExtra(\"name\");\n\t\t\tcode=arg2.getStringExtra(\"code\");\n\t\t\tcity=arg2.getStringExtra(\"city\");\n\t\t\tet_region.setText(arg2.getStringExtra(\"name\"));\n\t\t\tiv_loc.setVisibility(View.VISIBLE);\n\t\t}\n\t\tif(arg0==2&&arg1==RESULT_OK){\n\t\t\tif (arg2 == null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\t ContentResolver reContentResolverol = getContentResolver(); \n\t\t\t\t Uri contactData = arg2.getData();\n\t\t\t\t //查询就是输入URI等参数,其中URI是必须的,其他是可选的,如果系统能找到URI对应的ContentProvider将返回一个Cursor对象.\n\t\t\t\t @SuppressWarnings(\"deprecation\")\n\t\t\t\t\t\t\tCursor cursor = managedQuery(contactData, null, null, null, null); \n\t\t\t\t cursor.moveToFirst(); \n\t\t\t\t //获得DATA表中的名字\n\t\t\t\t name = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME)); \n\t\t\t\t //条件为联系人ID\n\t\t\t\t et_name.setText(name);\n\t\t\t\t String contactId = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID)); \n\t\t\t\t // 获得DATA表中的电话号码,条件为联系人ID,因为手机号码可能会有多个\n\t\t\t\t Cursor phone = reContentResolverol.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, \n\t\t\t\t null, \n\t\t\t\t ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \" = \" + contactId, \n\t\t\t\t null, \n\t\t\t\t null); \n\t\t\t\t while (phone.moveToNext()) { \n\t\t\t\t phone_number = phone.getString(phone.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER)); \n\t\t\t\t if(!phone_number.equals(\"\"))\n\t\t\t\t et_phone.setText(phone_number);\n\t\t\t\t } \n\t\t\t\t \n\t\t}\n\t}", "public ContactInfo[] getContactInfo() {\n return contactInfo;\n }", "private ContactsEntry createContactsEntry(ContentResolver cr, Cursor cur) {\n\t\tString strNumber = \"\";\n\t\tString strLookupKey = \"\";\n\t\tString _ID = cur.getString(cur.getColumnIndex(ContactsContract.Contacts._ID));\n\t\tString strName = cur.getString(cur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\n\t\tif(Integer.parseInt(cur.getString(cur.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0) {\n\t\t\tString selection = new StringBuilder().append(ContactsContract.CommonDataKinds.Phone.CONTACT_ID).append(\" = ?\").toString();\n\t\t\tCursor pCur = cr.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, selection, new String[] { _ID }, null);\n\n\t\t\twhile(pCur.moveToNext()) {\n\t\t\t\tstrNumber = pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n\t\t\t}\n\n\t\t\tif(pCur != null) pCur.close();\n\t\t\tpCur = null;\n\t\t}\n\n\t\tstrLookupKey = cur.getString(cur.getColumnIndex(ContactsContract.Contacts.LOOKUP_KEY));\n\n\t\tContactsEntry entry = new ContactsEntry(strLookupKey, strNumber, strName);\n\n\t\treturn entry;\n\t}", "public String getContact() {\n return contact;\n }", "public String getContact() {\n return contact;\n }", "public String getContact() {\n return contact;\n }", "public String getContact() {\n return contact;\n }", "public String getContact() {\n return contact;\n }", "private void setPeopleFields(Cursor cur) {\n\n\t\tint selectedColumn;\n\n\t\t// Set the contact id\n\t\tselectedColumn = cur.getColumnIndex(RawContacts._ID);\n\t\tlong nid = cur.getLong(selectedColumn);\n\t\t_id = String.valueOf(nid);\n\n\t\t// TODO: note and birthday\n\t\t// selectedColumn = cur.getColumnIndex(Contacts.People.NOTES);\n\t\t// notes = cur.getString(selectedColumn);\n\t\t// if (notes != null) {\n\t\t// Matcher ppm = birthdayPattern.matcher(notes);\n\t\t//\n\t\t// if (ppm.find()) {\n\t\t// birthday = ppm.group(1);\n\t\t// notes = ppm.replaceFirst(\"\");\n\t\t// }\n\t\t// }\n\t}", "com.ubtrobot.phone.PhoneCall.ContactOrBuilder getContactListOrBuilder(\n int index);", "com.ubtrobot.phone.PhoneCall.ContactOrBuilder getContactListOrBuilder(\n int index);", "com.ubtrobot.phone.PhoneCall.ContactOrBuilder getContactListOrBuilder(\n int index);", "com.ubtrobot.phone.PhoneCall.ContactOrBuilder getContactListOrBuilder(\n int index);", "public Contact findContactByNumber(String number){\n SQLiteDatabase db = this.getReadableDatabase();\n\n // prevent for prefix number\n String number2 = number;\n String number3 = \"+\" + number;\n String number4 = number;\n if(number.length()>=3){\n number4 = \"0\" + number.substring(2);\n if(number.contains(\"+\")){\n number2 = \"0\" + number.substring(3);\n }\n }\n\n Log.d(\"db\", number2);\n\n Cursor cur;\n cur = db.rawQuery(\n \"SELECT DISTINCT c.* FROM \"\n + TABLE_CONTACTS + \" c,\"\n + TABLE_NUMBERS + \" n \"\n + \"WHERE c.\" + _ID + \" = n.\" + C_ID\n + \" AND ( n.\" + PHONE_NUMBER + \" = ? OR\"\n +\" n.\" + PHONE_NUMBER + \" = ? OR\"\n +\" n.\" + PHONE_NUMBER + \" = ? OR\"\n +\" n.\" + PHONE_NUMBER + \" = ? )\", new String[]{number, number2, number3, number4 });\n List<Contact> ctxs = getContactObjct(db, cur, number);\n Contact c ;\n if(ctxs.size()>0){\n c = ctxs.get(0);\n }else{\n c = new Contact(-1, null, number);\n }\n\n db.close();\n return c;\n }", "public Address[] findContactsByChar(String filter, boolean sipOnly);", "@Override\n\tpublic String getContactos(String nickName) throws RemoteException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tList<String> lista = bbdd.loadContactos(nickName);\n\t\tfor(String nombre : lista){\n\t\t\tsb.append(nombre + \"\\n\");\n\t\t}\n\t\treturn sb.toString();\n\t}", "public static List<Contact> getContacts() {\n List<Contact> contacts = new ArrayList<>();\n contacts.add(new Contact(\"Rabbit\", R.drawable.rabbit, \"4153508881\"));\n contacts.add(new Contact(\"Sheep\", R.drawable.sheep, \"4153508882\"));\n contacts.add(new Contact(\"Octopus\", R.drawable.octopus, \"4153508883\"));\n contacts.add(new Contact(\"Cat\", R.drawable.cat, \"4153508884\"));\n contacts.add(new Contact(\"Lion\", R.drawable.lion, \"4153508885\"));\n contacts.add(new Contact(\"Sheep\", R.drawable.sheep, \"4153508886\"));\n contacts.add(new Contact(\"Dog\", R.drawable.dog, \"4153508887\"));\n contacts.add(new Contact(\"Horse\", R.drawable.horse, \"4153508888\"));\n return contacts;\n }", "java.util.List<kr.pik.message.Profile.ProfileMessage.ContactAddress> \n getContactAddressList();", "public List<Contact> getAllContacts() {\n List<Contact> contactList = new ArrayList<Contact>();\n // Select All Query\n String selectQuery = \"SELECT * FROM \" + TABLE_CONTACTS;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n Contact contact = new Contact();\n contact.set_id((cursor.getInt(0)));\n contact.set_name(cursor.getString(1));\n contact.set_audios(cursor.getString(2));\n contact.set_captured_image(cursor.getString(3));\n contact.set_contents(cursor.getString(4));\n contact.set_delelte_var(cursor.getInt(5));\n contact.set_gallery_image(cursor.getString(6));\n contact.set_recycle_delete(cursor.getInt(7));\n contact.set_photo(cursor.getString(8));\n // Adding contact to list\n contactList.add(contact);\n } while (cursor.moveToNext());\n }\n\n // return contact list\n return contactList;\n }", "public ArrayList<Contact> read_contact_list()\n {\n ArrayList<Contact> result = new ArrayList<Contact>();\n String[] current_data = read();\n\n for (int i = 0; i < current_data.length; i++)\n {\n String line = current_data[i];\n if (line != null)\n {\n String[] split = line.split(\":\");\n if (split.length >= 5)\n {\n result.add(new Contact(split[0], split[1], split[2], split[3], split[4]));\n }\n }\n }\n return result;\n }", "public String getContact() {\n\t\treturn contact;\n\t}", "public static String getPhoneById(String cid, Context context){\n\t\t\n\n\t\t \tString contactNumber = \"\";\n\t\t \t//String contactName = \"\";\n\t \tCursor cursor = context.getContentResolver().query( \n\t \t\t\tContactsContract.Contacts.CONTENT_URI, null, \n\t \t\t\tContactsContract.Contacts._ID + \"=?\", \n\t \t new String[]{cid}, null); \n\t \t\n\t \t//Log.e(\"PARSER\", \"1\");\n\t \tif(cursor.moveToFirst()){\n\t\n\t \t//contactName = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n\n Cursor pCur = context.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,null,ContactsContract.CommonDataKinds.Phone.CONTACT_ID +\" = ?\",new String[]{ cid }, null);\n while (pCur.moveToNext()){\n \t\n \t\n contactNumber = pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n contactNumber = contactNumber.replaceAll(\" \", \"\");\n // contactName = pCur.getString(pCur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n //Log.e(\"PARSER\"+contactNumber, \"Name\"+contactNumber);\n //result.put(contactNumber, contactName);\n } \n pCur.close();\n\t //}\n\t \n\t\t\t}\n\t \tcursor.close();\n return contactNumber;\n\t}", "public ArrayList<Contact> loadContacts()\n\t{\n\t\t//TODO gestion des infos\n\t\t\n\t\t/* Requete SQL */\n\t\tCursor cursor = mainDatabase.rawQuery(\"SELECT \" + DBContract.ContactTable.CONTACT_ID[0] + \", \" +\n\t\t\t\tDBContract.ContactTable.NAME[0] + \", \" + DBContract.ContactTable.SURNAME[0] + \", \" + \n\t\t\t\tDBContract.ContactTable.BILL[0] + \" FROM \" + DBContract.ContactTable.TABLE_NAME, null);\n\t\t\n\t\tArrayList<Contact> result = new ArrayList<Contact>();\n\t\t\n\t\t/* Parcour du resultat */\n\t\tif(cursor.moveToFirst())\n\t\t{\n\t\t\t\twhile(!cursor.isAfterLast())\n\t\t\t\t{\n\t\t\t\t\t/* Instancie le nouveau contact : id-nom-prenom */\n\t\t\t\t\tContact tmp = new Contact(cursor.getInt(0), cursor.getString(1), cursor.getString(2));\n\t\t\t\t\ttmp.addToBill(cursor.getDouble(3));\t\n\t\t\t\t\tresult.add((int) (tmp.getId() - 1), tmp); //TODO mod -1 //TODO verifier qu'il n'y a pas d'id 0 et que tout se passe bien !\n\t\t\t\t\tcursor.moveToNext();\n\t\t\t\t}\n\t\t}\n\t\tcursor.close();\n\t\treturn result;\n\t}", "public Collection<Contact> getContacts();", "public static ArrayList<Contact> read(Context context){\n ContactUtil contactUtil = new ContactUtil();\n ArrayList<Contact> result = contactUtil.getContactList(context);\n return result;\n }", "public ContactDetail getContactDetails(ResultSet resultSet) throws Exception\r\n\t{\r\n\t\tContactDetail contactInfo = new ContactDetail();\r\n\t\tAddress addressInfo = new Address();\r\n\t\t\r\n\t\t\r\n\t\t//set each of the values in contact info to the value of the row in the selected column\r\n\t\tcontactInfo.setPhonenumber(resultSet.getString(\"phonenumber\"));\t\r\n\t\tcontactInfo.setFirstname(resultSet.getString(\"firstname\"));\r\n\t\tcontactInfo.setSurname(resultSet.getString(\"lastname\"));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\taddressInfo.setStreet(resultSet.getString(\"street\"));\r\n\t\taddressInfo.setCity(resultSet.getString(\"city\"));\r\n\t\taddressInfo.setPostcode(resultSet.getString(\"postcode\"));\r\n\t\tcontactInfo.setAddress(addressInfo);\r\n\t\t\r\n\t\treturn contactInfo;\t\t\r\n\t}", "public static String getContactDisplayNameByNumber(String number, Context context){\n\t\t\n\t\t Uri uri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number));\n\t\t String name = \"\";\n\t\n\t\t //ContentResolver contentResolver = getContentResolver();\n\t\t Cursor contactLookup = context.getContentResolver().query(uri, new String[] {BaseColumns._ID,\n\t\t ContactsContract.PhoneLookup.DISPLAY_NAME }, null, null, null);\n\t\n\t\t try {\n\t\t if (contactLookup != null && contactLookup.getCount() > 0) {\n\t\t contactLookup.moveToNext();\n\t\t name = contactLookup.getString(contactLookup.getColumnIndex(ContactsContract.Data.DISPLAY_NAME));\n\t\t //String contactId = contactLookup.getString(contactLookup.getColumnIndex(BaseColumns._ID));\n\t\t }\n\t\t } finally {\n\t\t if (contactLookup != null) {\n\t\t contactLookup.close();\n\t\t }\n\t\t }\n\t\n\t\t return name;\n\t}", "@Override\n\tpublic List<Contact> search(String str) {\n\t\treturn null;\n\t}", "public ArrayList<Contact> getContactByGroup(String groupname){\r\n\t\t\r\n\t\tArrayList<Contact> contacts = new ArrayList<Contact>();\r\n\t\tSQLiteDatabase db = this.getReadableDatabase();\r\n\t\t\r\n\t\tCursor cursor = db.query(DBHelper.CONTACT_TABLE_NAME,\r\n\t\t\t\tnew String[] {DBHelper.COLUMN_NAME, DBHelper.COLUMN_GROUP,\r\n\t\t\t\tDBHelper.COLUMN_LATITUDE, DBHelper.COLUMN_LONGITUDE,\r\n\t\t\t\tDBHelper.COLUMN_MESSAGE, DBHelper.COLUMN_SHARE},\r\n\t\t\t\tDBHelper.COLUMN_GROUP + \"=?\", new String[]{groupname},\r\n\t\t\t\tnull, null, null);\r\n\t\t\r\n\t\tcursor.moveToFirst();\r\n\t while (!cursor.isAfterLast()) {\r\n\t contacts.add(new Contact(cursor.getString(0), cursor.getString(1),\r\n\t \t\t cursor.getDouble(2), cursor.getDouble(3), cursor.getString(4),\r\n\t \t\t int_to_boolean(cursor.getInt(5))));\r\n\t cursor.moveToNext();\r\n\t }\r\n\t \r\n\t cursor.close();\r\n\t db.close();\r\n\t \r\n\t return contacts;\r\n\t}", "public Cursor getcname() {\n\t\tString countQuery = \"SELECT * FROM \" + DATABASE_TABLE1;\n\t \n\t Cursor cursor = ourDatabase.rawQuery(countQuery, null);\n\t \n\t\treturn cursor;\n\t}", "public ArrayList<String> getContacts()\r\n\t{\r\n\t\treturn contacts;\r\n\t}", "private String getName() {\n System.out.println(\"Enter contact name\");\n return scannerForAddressBook.scannerProvider().nextLine();\n }", "public void printContact(){\n for (int i = 0 ; i<contact.size() ; i++){\r\n System.out.print(contact.get(i).getFirstName());\r\n System.out.print(\"\\t\\t\"+contact.get(i).getLastName());\r\n System.out.print(\"\\t\\t\"+contact.get(i).getPhoneNumber());\r\n System.out.println(\"\\t\\t\"+contact.get(i).getAddress());\r\n }\r\n }", "private static String showDetails (String name){\n\t\t//We find the user\n\t\tint position = findContact(name);\n\t\t//If not found, we return null\n\t\tif (position==-1)\n\t\t\treturn null;\n\t\t//We return the details invoking the toString method\n\t\telse\n\t\t\treturn contacts[position].toString();\n\t}", "static CallerInfo getCallerInfo(Context context, Connection c) {\n CallerInfo info = null;\n\n if (c != null) {\n //See if there is a URI attached. If there is, this means\n //that there is no CallerInfo queried yet, so we'll need to\n //replace the URI with a full CallerInfo object.\n Object userDataObject = c.getUserData();\n if (userDataObject instanceof Uri) {\n info = CallerInfo.getCallerInfo(context, (Uri) userDataObject);\n if (info != null) {\n c.setUserData(info);\n }\n } else {\n if (userDataObject instanceof CallerInfoToken) {\n //temporary result, while query is running\n info = ((CallerInfoToken) userDataObject).currentInfo;\n } else {\n //final query result\n info = (CallerInfo) userDataObject;\n }\n if (info == null) {\n // No URI, or Existing CallerInfo, so we'll have to make do with\n // querying a new CallerInfo using the connection's phone number.\n String number = c.getAddress();\n\n if (DBG) log(\"getCallerInfo: number = \" + toLogSafePhoneNumber(number));\n\n if (!TextUtils.isEmpty(number)) {\n info = CallerInfo.getCallerInfo(context, number);\n if (info != null) {\n c.setUserData(info);\n }\n }\n }\n }\n }\n return info;\n }", "@SuppressWarnings(justification = \"connectionManager is OSGi managed\", value = {\n \"NP_UNWRITTEN_FIELD\", \"UWF_UNWRITTEN_FIELD\" })\n private String getMyContacts(String user) {\n List<String> connectedUsers = connectionManager.getConnectedUsers(user,\n ConnectionState.ACCEPTED);\n StringBuilder sb = new StringBuilder();\n for (String u : connectedUsers) {\n sb.append(\"@sakai:user=\\\"\").append(u).append(\"\\\" or \");\n }\n String usersClause = sb.toString();\n int i = usersClause.lastIndexOf(\" or \");\n if (i > -1) {\n usersClause = usersClause.substring(0, i);\n }\n if (usersClause.length() > 0) {\n usersClause = \" and (\" + usersClause + \")\";\n return usersClause;\n }\n\n return \"\";\n }" ]
[ "0.7295636", "0.6922316", "0.68876", "0.67500025", "0.67335767", "0.6681439", "0.6660262", "0.6545843", "0.64168566", "0.6389926", "0.6339201", "0.63265526", "0.63265526", "0.63265526", "0.63265526", "0.6244283", "0.62336624", "0.6229778", "0.61980534", "0.6191785", "0.6178205", "0.617265", "0.61643606", "0.6160234", "0.61570966", "0.613593", "0.6101651", "0.61005443", "0.60856456", "0.6070158", "0.6055316", "0.6046537", "0.6046429", "0.60436654", "0.60226285", "0.6020748", "0.6020538", "0.60000736", "0.599183", "0.5990819", "0.59623635", "0.59514475", "0.59508246", "0.592954", "0.59113", "0.5911182", "0.5905242", "0.5903585", "0.5902788", "0.58980536", "0.5895982", "0.5895982", "0.5895982", "0.5895982", "0.58593875", "0.5855579", "0.5846288", "0.58454627", "0.5827967", "0.58278525", "0.5811055", "0.5810789", "0.5808241", "0.5786413", "0.5782519", "0.5782444", "0.578072", "0.576578", "0.576578", "0.576578", "0.576578", "0.576578", "0.5760416", "0.57339007", "0.57339007", "0.57339007", "0.57339007", "0.5727651", "0.57255226", "0.5715662", "0.57031316", "0.5697", "0.569491", "0.56915253", "0.5686987", "0.5677122", "0.56622446", "0.56426126", "0.5634983", "0.56340665", "0.5628754", "0.5614211", "0.5612453", "0.5608979", "0.5598176", "0.5595927", "0.5595707", "0.55956614", "0.5587735", "0.55874825" ]
0.70326924
1
additional constructor fields may be added, but don't delete or modify anything already here
public Program2(int numStudents) { minHeap = new Heap(); students = new ArrayList<Student>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void __sep__Constructors__() {}", "private FieldInfo() {\r\n\t}", "public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }", "public Field() {\r\n\t}", "private void addConstructors() {\n\t\tthis.rootBindingClass.getConstructor().body.line(\"super({}.class);\\n\", this.name.getTypeWithoutGenerics());\n\t\tGMethod constructor = this.rootBindingClass.getConstructor(this.name.get() + \" value\");\n\t\tconstructor.body.line(\"super({}.class);\", this.name.getTypeWithoutGenerics());\n\t\tconstructor.body.line(\"this.set(value);\");\n\t}", "public Constructor(){\n\t\t\n\t}", "private TigerData() {\n initFields();\n }", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\tprotected void initializeFields() {\n\n\t}", "public FieldInfo() {\r\n \t// No implementation required\r\n }", "@Override\n\t\t\tpublic void visit(ConstructorDeclaration arg0, Object arg1) {\n\t\t\t\tif((arg0.getModifiers() & Modifier.PUBLIC) > 0)\n\t\t\t\t\tfields.add(\"+\" + arg0.getDeclarationAsString(false, false));\n\t\t\t\tsuper.visit(arg0, arg1);\n\t\t\t}", "public mapper3c() { super(); }", "public static void copyConstructor(){\n\t}", "@Test\n public void constructorSetsEmptyExtra()\n {\n //act\n ProductInfo actual = new ProductInfo();\n\n //assert\n assertEquals(\"\", Deencapsulation.getField(actual, \"extra\"));\n }", "public void initForAddNew() {\r\n\r\n\t}", "public Clade() {}", "protected GeometricObject() \n\t{\n\t\tdateCreated = new java.util.Date();\n\t}", "public Field(String watermark,\n String showfieldname,\n String saveRequired,\n String jfunction,\n String onChange,\n String onKeyDown,\n String defaultValue,\n String type,\n String sqlValue,\n String field_name,\n String relation,\n String states,\n String relationField,\n String onClickVList,\n String jIdList,\n String name,\n String searchRequired,\n String id,\n String placeholder,\n String value,\n String fieldType,\n String onclicksummary,\n String newRecord,\n List<Field> dListArray,\n List<OptionModel> mOptionsArrayList,\n String onclickrightbutton,\n String webSaveRequired,\n String field_type) {\n\n this.watermark = watermark;\n this.showfieldname = showfieldname;\n this.saveRequired = saveRequired;\n this.jfunction = jfunction;\n this.onChange = onChange;\n this.onKeyDown = onKeyDown;\n this.defaultValue = defaultValue;\n this.type = type;\n this.sqlValue = sqlValue;\n this.field_name = field_name;\n this.relation = relation;\n this.states = states;\n this.relationField = relationField;\n this.onClickVList = onClickVList;\n this.jIdList = jIdList;\n this.name = name;\n this.searchRequired = searchRequired;\n this.id = id;\n this.placeholder = placeholder;\n this.value = value;\n this.fieldType = fieldType;\n this.onclicksummary = onclicksummary;\n this.newRecord = newRecord;\n this.dListArray = dListArray;\n this.optionsArrayList = mOptionsArrayList;\n this.onclickrightbutton = onclickrightbutton;\n this.webSaveRequired = webSaveRequired;\n this.field_type = field_type;\n\n// this( watermark, showfieldname, saveRequired, jfunction,\n// onChange, onKeyDown, defaultValue, type, sqlValue,\n// field_name, relation, states, relationField,\n// onClickVList, jIdList, name, \"\",\n// searchRequired, id, placeholder, value,\n// fieldType, onclicksummary, newRecord, \"\",\n// dListArray,mOptionsArrayList,onclickrightbutton);\n }", "public Identity()\n {\n super( Fields.ARGS );\n }", "Reproducible newInstance();", "private UniqueChromosomeReconstructor() { }", "protected abstract void construct();", "private Rekenhulp()\n\t{\n\t}", "private SingleObject()\r\n {\r\n }", "public Customer()\n{\n this.firstName = \"noFName\";\n this.lastName = \"noLName\";\n this.address = \"noAddress\";\n this.phoneNumber = 0;\n this.emailAddress = \"noEmail\";\n \n}", "private TMCourse() {\n\t}", "public FieldScrapper() \r\n {\r\n }", "public AirField() {\n\n\t}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "private BigB()\r\n{\tsuper();\t\r\n}", "public Pojo1110110(){\r\n\t}", "private FundInfo() {\n initFields();\n }", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }", "private void constructorPostProcessing()\n {\n prepareNextRequest();\n fetchNextBatch();\n advanceObjectSummary();\n }", "@SuppressWarnings(\"unused\")\r\n\tprivate Person() {\r\n\t}", "public Sad() {\n }", "protected void createFields()\n {\n createEffectiveLocalDtField();\n createDiscontinueLocalDtField();\n createScanTypeField();\n createContractNumberField();\n createContractTypeField();\n createProductTypeField();\n createStatusIndicatorField();\n createCivilMilitaryIndicatorField();\n createEntryUserIdField();\n createLastUpdateUserIdField();\n createLastUpdateTsField();\n }", "private void fillConstructorFields() {\n constructorId.setText(\"\"+ constructorMutator.getConstructor().getConstructorId());\n constructorUrl.setText(\"\"+ constructorMutator.getConstructor().getConstructorUrl());\n constructorName.setText(\"\"+ constructorMutator.getConstructor().getConstructorName());\n constructorNationality.setText(\"\"+ constructorMutator.getConstructor().getNationality());\n teamLogo.setImage(constructorMutator.getConstructor().getTeamLogo().getImage());\n // Display Drivers that were from the JSON File\n constructorMutator.getConstructor().setBuffer(new StringBuffer());\n // Java 8 Streaming\n constructorMutator.getConstructorsList().stream().forEach(constructorList -> constructorMutator.getConstructor().toString(constructorList));\n }", "protected void writeConstructorParams( DataOutput out ) throws\n\t\t\t\t\t\t\tIOException {\n }", "protected ChildType() {/* intentionally empty block */}", "private AccessorModels() {\n // Private constructor to prevent instantiation\n }", "private CustomerReader()\r\n\t{\r\n\t}", "protected Product() {\n\t\t\n\t}", "private Row() {\n }", "private TextReader() {\n // There are no fields required to initialize\n }", "private PropertyAccess() {\n\t\tsuper();\n\t}", "protected ForConstructor(Constructor<?> constructor) {\n this.constructor = constructor;\n }", "private SingleObject(){}", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "private Constructor getConstructor() throws Exception {\r\n return type.getConstructor(Contact.class, label, Format.class);\r\n }", "protected JsonFactory(JsonFactory src, ObjectCodec codec)\n/* */ {\n/* 293 */ this._objectCodec = null;\n/* 294 */ this._factoryFeatures = src._factoryFeatures;\n/* 295 */ this._parserFeatures = src._parserFeatures;\n/* 296 */ this._generatorFeatures = src._generatorFeatures;\n/* 297 */ this._characterEscapes = src._characterEscapes;\n/* 298 */ this._inputDecorator = src._inputDecorator;\n/* 299 */ this._outputDecorator = src._outputDecorator;\n/* 300 */ this._rootValueSeparator = src._rootValueSeparator;\n/* */ }", "protected Product()\n\t{\n\t}", "private JsonUtils() {\n\t\tsuper();\n\t}", "public DesastreData() { //\r\n\t}", "private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }", "private DatabaseValidationProperties() {}", "public JsonField() {\n }", "protected Entity() {\n UID = GEN_COUNT;\n GEN_COUNT++;\n }", "public Person()\n {\n //intentionally left empty\n }", "public PSRelation()\n {\n }", "public ClientDetailsEntity() {\n\t\t\n\t}", "protected AbstractReadablePacket() {\n this.constructor = createConstructor();\n }", "private RoleData() {\n initFields();\n }", "private UserCourseCourse() {\n\t}", "public _355() {\n\n }", "public PersonRecord() {}", "defaultConstructor(){}", "public BaseParameters(){\r\n\t}", "@EnsuresNonNull({\"field2\", \"field3\"})\n private void init_other_fields(@UnderInitialization(MyClass.class) MyClass this) {\n field2 = new Object();\n field3 = new Object();\n }", "private Cat() {\n\t\t\n\t}", "private SomePojoClass(String name) {\n this.name = name;\n }", "public AbstractClass() { //Sobrecarga del constructor AbstractClass ya que se puede inicializar de 2 maneras\n }", "public ClassOne(){\n\t\tthis.age = 55;\t\t// this value won't come while de-serialization.\n\t\tSystem.out.println (\"Default Constructor Running\");\n\t}", "Merge() {\n //Unused Constructor.\n }", "public CompanyData() {\r\n }", "protected NodeProperties() {\r\n }", "public Member() {\n //Empty constructor!\n }", "public Coche() {\n super();\n }", "public Car () {\n\n Make = \"\";\n Model = \"\";\n Year = 2017;\n Price = 0.00;\n }", "public Student() {\n//\t\tname = \"\";\n//\t\tage = 0;\n\t\t\n\t\t\n\t\t//call constructors inside of other constructors\n\t\tthis(999,0);\n\t}", "public Data() {\n \n }", "public City() {\n\t}", "public City() {\n\t}", "public Pleasure() {\r\n\t\t}", "public StudentRecord() {}", "public Member() {\r\n\t}", "private Request() {\n initFields();\n }", "private Params()\n {\n }", "private Person()\r\n\t{\r\n\t\tsuper();\r\n\t\t//created = LocalDateTime.now();\r\n\t\tcreated = Calendar.getInstance().getTime();\r\n\t}", "private UsineJoueur() {}", "private PropertyHolder() {\n }", "protected Settlement() {\n // empty constructor\n }", "private void validateConstructor () throws ModelValidationException\n\t\t\t{\n\t\t\t\t// no constructor or no arg constructor\n\t\t\t\tModel model = getModel();\n\t\t\t\tboolean hasConstr = model.hasConstructor(keyClassName);\n\t\t\t\tObject noArgConstr = \n\t\t\t\t\tmodel.getConstructor(keyClassName, Model.NO_ARGS);\n\t\t\t\tint modifiers = model.getModifiers(noArgConstr);\n\n\t\t\t\tif (hasConstr && \n\t\t\t\t\t((noArgConstr == null) || !Modifier.isPublic(modifiers)))\n\t\t\t\t{\n\t\t\t\t\tthrow new ModelValidationException(keyClass,\n\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\"util.validation.key_class_constructor\", //NOI18N\n\t\t\t\t\t\tkeyClassName, getClassName()));\n\t\t\t\t}\n\t\t\t}", "private Column() {\n }", "private Node() {\n\n }", "private CardExchangeModel() {\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public Card() { this(12, 3); }", "private ObjectRepository() {\n\t}", "private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }" ]
[ "0.7006556", "0.6744522", "0.6459818", "0.6421806", "0.6389514", "0.6348364", "0.62643194", "0.6241476", "0.62226075", "0.620392", "0.61966556", "0.6180202", "0.6166561", "0.6145565", "0.6134678", "0.6099874", "0.6076156", "0.60626006", "0.60536426", "0.60473764", "0.60443926", "0.6026322", "0.60234714", "0.60188437", "0.6013545", "0.60023487", "0.5987558", "0.59829545", "0.5955355", "0.59364307", "0.59335625", "0.59295636", "0.59205544", "0.5912648", "0.5889756", "0.58890116", "0.5880726", "0.5878123", "0.58723736", "0.58697796", "0.58674264", "0.58631825", "0.5852071", "0.58448595", "0.58431005", "0.5838586", "0.5823732", "0.58236337", "0.58182013", "0.58147186", "0.5812411", "0.58052117", "0.5797821", "0.57922286", "0.57886827", "0.578817", "0.5782603", "0.57825506", "0.5773536", "0.5773306", "0.57660514", "0.5763665", "0.576325", "0.5761972", "0.5760998", "0.5750751", "0.57491654", "0.5744671", "0.57348526", "0.5734568", "0.5728122", "0.5727552", "0.57250035", "0.57231796", "0.57225627", "0.5722023", "0.5716637", "0.5715429", "0.57122695", "0.57103455", "0.570372", "0.57028335", "0.5701158", "0.5701158", "0.5699206", "0.5694094", "0.5687178", "0.5686836", "0.56863517", "0.5682612", "0.5679185", "0.5679148", "0.56791127", "0.5679", "0.5678048", "0.567771", "0.56775117", "0.567739", "0.567657", "0.56762177", "0.5675611" ]
0.0
-1
findMinimumStudentCost(Student start, Student dest)
public int findMinimumStudentCost(Student start, Student dest) { initializeSingleSource(start); minHeap.buildHeap(students); //build heap from array of studente keyed by minCost while (minHeap.size() != 0) { //while heap size does not equal 0. Student minimum = minHeap.extractMin(); if (minimum.getName() == dest.getName()) { return minimum.getminCost(); } for (int i = 0; i < minimum.getNeighbors().size(); ++i) { //for each vertex v in m's adjacency list relax(minimum, minimum.getNeighbors().get(i), i); //relax } } return -1; //error message }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int minCost(int cost[][], int srcStation, int destinationStation)\n {\n int minCost[] = new int[destinationStation];\n Arrays.fill(minCost, Integer.MAX_VALUE);\n minCost[srcStation] = 0;\n\n // Go through every station and check if using it\n // as an intermediate station gives better path\n for (int i=srcStation; i < destinationStation; i++)\n {\n for (int j=i+1; j < destinationStation; j++)\n {\n minCost[j] = Math.min(minCost[i] + cost[i][j], minCost[j]);\n }\n }\n return minCost[destinationStation-1];\n }", "static int minCost(int cost[][], int destinationStation)\n {\n // dist[i] stores minimum cost to reach station i\n // from station 0.\n int minCost[] = new int[destinationStation];\n Arrays.fill(minCost, Integer.MAX_VALUE);\n minCost[0] = 0;\n \n // Go through every station and check if using it\n // as an intermediate station gives better path\n for (int i=0; i < destinationStation; i++)\n { \n \tfor (int j=i+1; j < destinationStation; j++)\n \t{ \n \t\tminCost[j] = Math.min(minCost[i] + cost[i][j], minCost[j]);\n \t}\n }\n return minCost[destinationStation-1];\n }", "private int shortestDistance(Vertex dest) {\n Integer d = distance.get(dest);\n if (d==null)\n return Integer.MAX_VALUE;\n return d;\n }", "@Override\n\tpublic double shortestPathDist(int src, int dest) {\n\t\tif(src== dest ) return 0;\n\t\tif(this.GA.getNode(src)==null || this.GA.getNode(dest)==null) throw new RuntimeException(\"Wrong input,Missing nodes.\");\n\t\tsetNodes();\n\t\tnode_data temp = this.GA.getNode(src);\n\t\ttemp.setWeight(0);\n\t\tSTPRec(temp, this.GA.getNode(dest));\n\t\tdouble ans = this.GA.getNode(dest).getWeight();\n\t\treturn ans;\n\t}", "@Override\n public int findLowerCostPath(City src, City dest) {\n List<City> cityList = new ArrayList<>(cityManager.getAll());\n int[] travelCosts = new int[cityList.size()]; // accumulate minimum travel costs through each city\n boolean[] exploredCity = new boolean[cityList.size()];\n int currCityId = src.getId();\n Arrays.fill(travelCosts, INF); //All travel costs are INF\n travelCosts[currCityId - 1] = 0; //except src\n\n //Iterate\n for (int i = 0; i < cityList.size(); i++) {\n int minCost = INF;\n // if we get destination, ignore, it will be last explored city\n if (currCityId != dest.getId())\n exploredCity[currCityId - 1] = true;\n //find all paths of city to iterate\n Set<Path> paths = findAllPaths(cityList.get(currCityId - 1));\n for (Path path : paths) {\n if (exploredCity[path.getDestId() - 1])\n continue;\n //if from city cost + path cost < to city cost, then assign new value\n if (path.getCost() + travelCosts[path.getSrcId() - 1] < travelCosts[path.getDestId() - 1]) {\n travelCosts[path.getDestId() - 1] = travelCosts[path.getSrcId() - 1] + path.getCost();\n }\n //find minimum path cost of cur city\n if (path.getCost() < minCost) {\n minCost = path.getCost();\n currCityId = path.getDestId();\n }\n }\n //to find remaining not explored cities\n if (minCost == INF) {\n for (int j = 0; j < exploredCity.length; j++) {\n if (!exploredCity[j] && dest.getId() != (j + 1) && travelCosts[j] != INF) {\n currCityId = j + 1;\n }\n }\n }\n }\n //last explored city is destination\n exploredCity[dest.getId() - 1] = true;\n\n return travelCosts[dest.getId() - 1];\n }", "@Override\n\tpublic double shortestPathDist(int src, int dest) {\n\t\tfor(node_data vertex : dwg.getV()) {\n\t\t\tvertex.setInfo(\"\"+Double.MAX_VALUE);\n\t\t}\n\t\tnode_data start = dwg.getNode(src);\n\t\tstart.setInfo(\"0.0\");\n\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\tq.add(start);\n\t\twhile(!q.isEmpty()) {\n\t\t\tnode_data v = q.poll();\n\t\t\tCollection<edge_data> edgesV = dwg.getE(v.getKey());\n\t\t\tfor(edge_data edgeV : edgesV) {\n\t\t\t\tdouble newSumPath = Double.parseDouble(v.getInfo()) +edgeV.getWeight();\n\t\t\t\tint keyU = edgeV.getDest();\n\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\tif(newSumPath < Double.parseDouble(u.getInfo())) {\n\t\t\t\t\tu.setInfo(\"\"+newSumPath);\n\t\t\t\t\tq.remove(u);\n\t\t\t\t\tq.add(u);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn Double.parseDouble(dwg.getNode(dest).getInfo());\n\t}", "public double shortestPathDist(int src, int dest);", "@Override\r\n public Double calcDistance(List<Point> src, List<Point> dst) {\r\n // Local Variables\r\n Double shortestDistance = Double.MAX_VALUE;\r\n Double currentDistance;\r\n\r\n // for each point in source\r\n for (Point p1:src) {\r\n // for each point in destination\r\n for (Point p2:dst) {\r\n // calc distance\r\n currentDistance = p1.distanceFrom(p2);\r\n\r\n // current < shortest -> update\r\n if(currentDistance < shortestDistance ){\r\n shortestDistance = currentDistance;\r\n }\r\n\r\n }\r\n }\r\n\r\n return shortestDistance;\r\n }", "@Override\n\tpublic List<node_data> shortestPath(int src, int dest) {\n\t\tfor(node_data vertex : dwg.getV()) {\n\t\t\tvertex.setInfo(\"\"+Double.MAX_VALUE);\n\t\t}\n\t\tint[] prev = new int[dwg.nodeSize()];\n\t\tnode_data start = dwg.getNode(src);\n\t\tstart.setInfo(\"0.0\");\n\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\tq.add(start);\n\t\tprev[src%dwg.nodeSize()] = -1;\n\t\twhile(!q.isEmpty()) {\n\t\t\tnode_data v = q.poll();\n\t\t\tCollection<edge_data> edgesV = dwg.getE(v.getKey());\n\t\t\tfor(edge_data edgeV : edgesV) {\n\t\t\t\tdouble newSumPath = Double.parseDouble(v.getInfo()) +edgeV.getWeight();\n\t\t\t\tint keyU = edgeV.getDest();\n\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\tif(newSumPath < Double.parseDouble(u.getInfo())) {\n\t\t\t\t\tu.setInfo(\"\"+newSumPath);\n\t\t\t\t\tq.remove(u);\n\t\t\t\t\tq.add(u);\n\t\t\t\t\tprev[u.getKey()%dwg.nodeSize()] = v.getKey();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tList<node_data> ans = new ArrayList<node_data>();\n\t\tint run = dest;\n\t\twhile(run != src) {\n\t\t\tans.add(0,dwg.getNode(run));\n\t\t\trun = prev[run%dwg.nodeSize()];\n\t\t}\n\t\tans.add(0, dwg.getNode(src));\n\n\t\treturn ans;\n\t}", "@Override\n public double shortestPathDist(int src, int dest) {\n if(shortestPath(src,dest)==null) return -1;\n double sum=0;\n return shortestPath(src,dest).get(shortestPath(src,dest).size()-1).getTag();\n }", "public int shortestDistance(int [][] maze, int [] start, int [] dest){\n\t\tint [][] distance = new int [maze.length][maze[0].length];\n\t\tfor(int [] row: distance){\n\t\t\tjava.util.Arrays.fill(row, Integer.MAX_VALUE);\n\t\t}\n\t\tdistance[start[0]][start[1]]= 0;\n\t\tdistanceDFS(maze, start, distance);\n\t\treturn distance[dest[0]][dest[1]] == Integer.MAX_VALUE ? -1 : distance[dest[0]][dest[1]];\n\t}", "public static int shortestDistance(int[][] maze, int[] start, int[] dest) {\n\t int[][] distance = new int[maze.length][maze[0].length];\r\n\t int[][] newmaze = new int[maze.length][maze[0].length];\r\n\t \r\n\t //add values to distance array, each elemet is Java Max_Value\r\n\t for (int[] row: distance)\r\n\t Arrays.fill(row, Integer.MAX_VALUE);\r\n\t \r\n\t //distance of starting point is 0\r\n\t distance[start[0]][start[1]] = 0;\r\n\t \r\n\t //backtracking dfs \r\n\t dfs(maze, start, distance, newmaze);\r\n\t \r\n\t for(int[] arr: distance) {\r\n\t \t\t System.out.println(Arrays.toString(arr));\r\n\t \t }\r\n\t return distance[dest[0]][dest[1]] == Integer.MAX_VALUE ? -1 : distance[dest[0]][dest[1]];\r\n\t \r\n\t \r\n\t }", "public int minCost(int[][] distance) {\n Map<Index, Integer> minCostDP = new HashMap<>();\n Map<Index, Integer> parent = new HashMap<>();\n\n List<Set<Integer>> allSets;\n\n for (Set<Integer> set : allSets) {\n for (int currentVertex = 1; currentVertex < distance.length; currentVertex++) {\n if (set.contains(currentVertex)) continue;\n Index index = Index.createIndex(currentVertex,set);\n int minCost = Integer.MAX_VALUE;\n int minPrevVertex = 0;\n\n Set<Integer> copySet = new HashSet<>();\n for (int prevVertex : set) {\n int cost = distance[prevVertex][currentVertex] + getCost(copySet, prevVertex, minCostDP);\n }\n }\n }\n }", "int getStudentTimeCosted(long studentId, Date start, Date end);", "private void findMinimalDistances(City sourceCity) {\n\t\tList<City> adjacentCities = getNeighbors(sourceCity);\r\n\r\n\t\tfor (City target : adjacentCities) {\r\n\t\t\t// Compare the newly calculated tentative transportation cost to the current\r\n\t\t\t// assigned value and assign the smaller one.\r\n\t\t\tif (getShortestDistance(target) > getShortestDistance(sourceCity) + getDistance(sourceCity, target)) {\r\n\t\t\t\tdistance.put(target, getShortestDistance(sourceCity) + getDistance(sourceCity, target));\r\n\t\t\t\t// saves info on what was the city you came from\r\n\t\t\t\tpredecessors.put(target, sourceCity);\r\n\t\t\t\t// add neighbors as unsettled\r\n\t\t\t\tunSettledCities.add(target);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private static double findMinCost(double lemda, Vector finalVector,\r\n Host currentNode,\r\n ArrayList neighbors,\r\n ArrayList destList)\r\n {\n int n = neighbors.size();\r\n int m = destList.size();\r\n int w = n > m ? m : n;\r\n\r\n double [] costFor_r = new double[w];\r\n\r\n double minCost = MaxDistance;\r\n double totalCurToAll = findDistanceCurToAll(currentNode, destList);\r\n for ( int r = 0 ; r < w; r ++ )\r\n {\r\n Vector rSetVector = new Vector();\r\n costFor_r[r] = getMinSetCost_given_r( r+1, rSetVector,\r\n currentNode,\r\n neighbors,\r\n destList);\r\n costFor_r[r] = (1.0 - lemda) * (r + 1) / n + costFor_r[r] / totalCurToAll;\r\n if ( costFor_r[r] < minCost ) {\r\n minCost = costFor_r[r];\r\n finalVector.clear();\r\n for (int k = 0; k < rSetVector.size(); ++k) {\r\n finalVector.add(k, rSetVector.get(k));\r\n }\r\n }\r\n }\r\n\r\n return minCost;\r\n }", "public int minCost(int[][] costs) {\n\nif(costs== null || costs.length == 0)\nreturn 0;\n// int n_houses = costs.length ;\nint lastR = costs[0][0];\nint lastB = costs[0][1];\nint lastG = costs[0][2];\nint currR,currB,currG ;\nfor(int i = 1; i< costs.length ; i++ ){\ncurrR = costs[i][0] + Math.min(lastB,lastG);\ncurrB = costs[i][1] + Math.min(lastR,lastG);\ncurrG = costs[i][2] + Math.min(lastR,lastB);\nlastR = currR;\nlastB = currB;\nlastG = currG;\n}\n// return Math.min(Math.min(lastR,lastB),lastG);\nreturn Math.min(Math.min(lastR,lastB),lastG);\n}", "@Override\n\tpublic List<node_data> shortestPath(int src, int dest) {\n\t\tList<node_data> ans = new ArrayList<>();\n\t\tthis.shortestPathDist(src, dest);\n\t\tif(this.GA.getNode(src).getWeight() == Integer.MAX_VALUE || this.GA.getNode(dest).getWeight() == Integer.MAX_VALUE){\n\t\t\tSystem.out.print(\"There is not a path between the nodes.\");\n\t\t\treturn null;\n\t\t}\n\t\tgraph copied = this.copy();\n\t\ttransPose(copied);\n\t\tnode_data first = copied.getNode(dest);\n\t\tans.add(first);\n\t\twhile (first.getKey() != src) {\n\t\t\tCollection<edge_data> temp = copied.getE(first.getKey());\n\t\t\tdouble check= first.getWeight();\n\t\t\tif(temp!=null) {\n\t\t\t\tfor (edge_data edge : temp) {\n\t\t\t\t\tif (copied.getNode(edge.getDest()).getWeight() + edge.getWeight() == check) {\n\t\t\t\t\t\tfirst = copied.getNode(edge.getDest());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tans.add(first);\n\t\t}\n\t\tList<node_data> ans2 = new ArrayList<>();\n\t\tfor (int i = ans.size()-1;i>=0;i--){\n\t\t\tans2.add(ans.get(i));\n\t\t}\n\t\treturn ans2;\n\t}", "public static int minCostClimbingStairs(int[] cost) {\n int n=cost.length;\n int[] dp =new int[n+1];\n dp[0]=0;\n dp[1]=0;\n for(int i=2;i<=n;i++)\n dp[i]=Math.min(dp[i-2]+cost[i-2],dp[i-1]+cost[i-1]);\n\n return dp[n];\n\n }", "@SuppressWarnings(\"unlikely-arg-type\")\n\tpublic int minCost(List<String> lines, String source, String target, int k) {\n\t\t\n\t\tMap<String, Map<String, Integer>> map = new HashMap<String, Map<String, Integer>>();\n\t\tfor (String line : lines) {\n\t\t\tString[] s = line.trim().split(\",\");\n\t\t\tString[] t = s[0].trim().split(\"->\");\n\t\t\t\n\t\t\tString from = t[0];\n\t\t\tString to = t[1];\n\t\t\tint cost = Integer.valueOf(s[1].trim());\n\t\t\t\n\t\t\tmap.putIfAbsent(from, new HashMap<String, Integer>());\n\t\t\tmap.putIfAbsent(to, new HashMap<String, Integer>());\n\t\t\t\n\t\t\tmap.get(from).put(to, cost);\n\t\t}\n\t\t\n\t\tint min = Integer.MAX_VALUE, stop = 0;\n\t\tQueue<Node> q = new LinkedList<Node>();\n\t\tq.add(new Node(source, 0));\n\t\t\n\t\twhile (!q.isEmpty()) {\n\t\t\tif (stop > k) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tint size = q.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tNode cur = q.poll();\n\t\t\t\tString dest = cur.dest;\n\t\t\t\tint currCost = cur.minCost;\n\t\t\t\t\n\t\t\t\tif (dest.equals(target)) {\n\t\t\t\t\tmin = Math.min(min, currCost);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (String next : map.get(dest).keySet()) {\n\t\t\t\t\tint nextCost = currCost + map.get(dest).get(next);\n\t\t\t\t\t//if (nextCost <= min) {\n\t\t\t\t\t\tq.add(new Node(next, nextCost));\n\t\t\t\t\t//}\n\t\t\t\t}\n\t\t\t}\n\t\t\tstop++;\n\t\t}\n\t\t\n\t\treturn min != Integer.MAX_VALUE ? min : -1;\n\t}", "public int shortestPath(Village startVillage, Village targetVillage) {\n// setting the initial point 's minimum distance to zera\n startVillage.setMinDistance(0);\n// accourting to bellman ford if there are n number of dots then n-1 iterations to be done to find the minimum distances of every dot from one initial dot\n int length = this.villageList.size();\n// looping n-1 times\n for (int i = 0; i < length - 1; i++) {\n// looping through all the roads and mark the minimum distances of all the possible points\n for (Road road : roadList) {\n\n\n// if the road is a main road then skip the path\n if (road.getWeight() == 900)\n continue; //why 900 ? : just a random hightest number as a minimum distance and same 900 is used as a mix number\n Village v = road.getStartVertex();\n Village u = road.getTargetVertex();\n// if the newly went path is less than the path it used to be the update the min distance of the reached vertex\n int newLengtha = v.getMinDistance() + road.getWeight();\n if (newLengtha < u.getMinDistance()) {\n u.setMinDistance(newLengtha);\n u.setPreviousVertex(v);\n }\n int newLengthb = u.getMinDistance() + road.getWeight();\n if (newLengthb < v.getMinDistance()) {\n v.setMinDistance(newLengthb);\n v.setPreviousVertex(v);\n }\n }\n }\n// finally return the minimum distance\n return targetVillage.getMinDistance();\n }", "@Override\n public Double calculateShortestPathFromSource(String from, String to) {\n Node source = graph.getNodeByName(from);\n Node destination = graph.getNodeByName(to);\n source.setDistance(0d);\n Set<Node> settledNodes = new HashSet<>();\n PriorityQueue<Node> unsettledNodes = new PriorityQueue<>(Comparator.comparing(Node::getDistance));\n unsettledNodes.add(source);\n while (unsettledNodes.size() != 0) {\n Node currentNode = unsettledNodes.poll();\n for (Map.Entry<Node, Double> adjacencyPair : currentNode.getAdjacentNodes().entrySet()) {\n Node adjacentNode = adjacencyPair.getKey();\n Double distance = adjacencyPair.getValue();\n if (!settledNodes.contains(adjacentNode)) {\n calculateMinimumDistance(adjacentNode, distance, currentNode);\n unsettledNodes.add(adjacentNode);\n }\n }\n settledNodes.add(currentNode);\n }\n return destination.getDistance() == Double.MAX_VALUE ? -9999d : destination.getDistance();\n }", "private int getMinIndex(List<Integer> cost) {\n int min = cost.get(0);\n int index = 0;\n for (int i = 1; i < cost.size(); i++) {\n if (cost.get(i) < 0) {\n continue;\n }\n if (cost.get(i) < min) {\n min = cost.get(i);\n index = i;\n }\n }\n return index;\n }", "private void findSmallestCost() {\n int best = 0;\n fx = funFitness[0];\n for (int i = 1; i < population; i++) {\n if (funFitness[i] < fx) {\n fx = funFitness[i];\n best = i;\n }\n }\n //System.arraycopy(currentPopulation[best], 0, bestSolution, 0, dimension);\n copy(bestSolution, currentPopulation[best]);\n }", "public int dijkstra(int adj[][], int source,int des) {\n\t\tint temp2=0;\n\t\tint distance[]=new int[vertexs];\n\t\tBoolean span_tree[]=new Boolean[vertexs];\n\t\t\n\t\tfor(int i=0;i<vertexs;i++) {\n\t\t\tdistance[i]=Integer.MAX_VALUE;\n\t\t\tspan_tree[i]=false;\n\t\t}\n\t\tdistance[source]=0;\n\t\tfor(int i=0;i<vertexs-1;i++) {\n\t\t\tint u=minDistance(distance,span_tree);\n\t\t\tspan_tree[u]=true;\n\t\t\tfor(int v=0;v<vertexs;v++) {\n\t\t\t\tif(!span_tree[v] && adj[u][v]!=0 && distance[u]!=Integer.MAX_VALUE && distance[u]\n\t\t\t\t\t\t+ adj[u][v]<distance[v]) {\n\t\t\t\t\tdistance[v]=distance[u]+adj[u][v];\n\t\t\t\t}\n\t\t\t}\n\t\t\ttemp2=distance[des];\n\t\t}\n\t\tprintGraph(distance,vertexs);\n\t\treturn temp2;\n\t}", "public abstract double costPerMin (CallZone zone);", "public List<node_info> shortestPath(int src, int dest);", "public static void calculateMinimumDistance(Node evaluationNode, Integer edgeWeigh, Node sourceNode) {\n Integer sourceDistance = sourceNode.distance;\n if (sourceDistance + edgeWeigh < evaluationNode.distance) {\n evaluationNode.distance = sourceDistance + edgeWeigh;\n LinkedList<Node> shortestPath = new LinkedList<>(sourceNode.shortestPath);\n shortestPath.add(sourceNode);\n evaluationNode.shortestPath = shortestPath;\n }\n }", "int freecabInd(int dest) {\n int index = 0;\n int min = 0;\n int minIndex = 0;\n\n for(int i=0;i<freeCab.length;i++){\n\n int matLandmark = matchingLandmark(freeCab[index][0], freeCab[index][1]);\n\n int dis = distance.dijkstra(adjancy, matLandmark, dest);\n\n if (dis < min) {\n min = dis;\n minIndex = index;\n }\n index++;\n\n }\n\n return minIndex;\n\n }", "private int getMinCostVertexFromTheGraph(int[] minCostComputedForVertices, boolean[] verticesAlreadyVisited) {\n\t\tint minVertex = -1;\n\t\tint minCost = Integer.MAX_VALUE;\n\t\t\n\t\tfor(int i=0;i<minCostComputedForVertices.length;i++) {\n\t\t\tif(verticesAlreadyVisited[i]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(minCost > minCostComputedForVertices[i]) {\n\t\t\t\tminCost = minCostComputedForVertices[i];\n\t\t\t\tminVertex = i;\n\t\t\t}\n\t\t}\n\t\treturn minVertex;\n\t}", "public Map<Node<T>, Cost> dijkstra(T start) throws NodeNotFoundException {\n Node<T> origin = findNode(start);\n Map<Node<T>, Cost> costs = new HashMap<>();\n List<Node<T>> alreadyVisited = new ArrayList<>();\n\n // Step 1 : Initialization\n // Set every cost to infinity, except for the starting summit which is set to 0\n for(Node<T> node : getNodes()) {\n if(origin.equals(node)) { costs.put(node, new Cost(0.0)); }\n else { costs.put(node, new Cost()); }\n }\n\n while(ArrayMethods.similarity(getNodes(), alreadyVisited) != order()) {\n // Step 2 : Taking the node with the smallest cost\n Node<T> reference = Cost.findMin(costs, alreadyVisited);\n\n // Step 3 : Updating the table with the costs from that node\n for(WeightedLink link : findLinks(reference.getData())) {\n Node<T> other = (Node<T>) link.getOther(reference);\n Cost oldCost = costs.get(other);\n double old = oldCost.getCost();\n double cost = link.getWeight() + costs.get(reference).getCost();\n\n costs.put(other, (cost < old) ? new Cost(cost, reference) : oldCost);\n }\n\n // Step 4 : Repeat with the smallest costing summit that wasn't visited already\n alreadyVisited.add(reference);\n }\n\n return costs;\n }", "private int minWeight(int dist[], Boolean sptSet[]){\n int min = Integer.MAX_VALUE;\r\n int minIndex = -1;\r\n\r\n for(int n = 0; n< rideCount; n++){\r\n if(!sptSet[n] && dist[n] <= min) {\r\n min = dist[n];\r\n minIndex = n;\r\n }\r\n }\r\n return minIndex;\r\n }", "public static int minDistance(int[] dist, boolean[] visited) {\n int min = Integer.MAX_VALUE;\n int min_index = 0;\n\n for (int v = 0; v < dist.length; ++v) {\n if (!visited[v] && dist[v] < min) {\n min = dist[v];\n min_index = v;\n }\n }\n\n return min_index;\n }", "int min();", "private static int findMinDistance(int[] distance, boolean[] visitedVertex) {\r\n int minDistance = Integer.MAX_VALUE;\r\n int minDistanceVertex = -1;\r\n for (int i = 0; i < distance.length; i++) {\r\n if (!visitedVertex[i] && distance[i] < minDistance) {\r\n minDistance = distance[i];\r\n minDistanceVertex = i;\r\n }\r\n }\r\n return minDistanceVertex;\r\n }", "private void calculateShortestDistances (GraphStructure graph,int startVertex,int destinationVertex) {\r\n\t\t//traverseRecursively(graph, startVertex);\r\n\t\tif(pathList.contains(destinationVertex)) {\r\n\t\t\tdistanceArray = new int [graph.getNumberOfVertices()];\r\n\t\t\tint numberOfVertices=graph.getNumberOfVertices();\r\n\t\t\tSet<Integer> spanningTreeSet = new HashSet<Integer>();\r\n\t\t\tArrays.fill(distanceArray,Integer.MAX_VALUE);\r\n\t\t\tdistanceArray[startVertex]=0;\r\n\t\t\tadjacencyList = graph.getAdjacencyList();\r\n\t\t\tList<Edge> list;\r\n\t\t\tlist = graph.getAdjacencyList()[startVertex];\r\n\t\t\tif(startVertex==destinationVertex) {\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\tfor(Edge value : list) {\r\n\t\t\t\t\tif(! isVisited[value.getVertex()]) {\r\n\t\t\t\t\t\tint sumOfWeightAndSourceVertexDistanceValue = distanceArray[startVertex] + value.getWeight();\r\n\t\t\t\t\t\tint distanceValueOfDestinationVertex = distanceArray[value.getVertex()];\r\n\t\t\t\t\t\tif( sumOfWeightAndSourceVertexDistanceValue < distanceValueOfDestinationVertex ) {\r\n\t\t\t\t\t\t\tdistanceArray[value.getVertex()] = sumOfWeightAndSourceVertexDistanceValue;\r\n\t\t\t\t\t\t\tshortestPathList.add(value.getVertex());\r\n\t\t\t\t\t\t\tcalculateShortestDistances(graph,value.getVertex(), distanceValueOfDestinationVertex);\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t} \r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/*for(Integer value : spanningTreeSet) {\r\n\t\t\t\tSystem.out.print(value+\" \");\r\n\t\t\t}*/\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No route is present between given vertices !\");\r\n\t\t}\r\n\t}", "public int minCostClimbingStairs(int[] cost) {\n // We initialize an array of size = cost, and it means the minimun cost of reaching n^th stair\n int[] dp = new int[cost.length];\n // We assign values to the first 2 numbers in the array because it can´t be smaller than 3\n dp[0] = cost[0];\n dp[1] = cost[1];\n // We iterate from n=2 to n-1, and in each position we save the min\n // value to reach the stair, the MIN is (dp[i-1] + cost[i] , dp[i-2] + cost[i]\n // that is so that the min way of reaching that stair is either using the n-1 or n-2\n for (int i = 2; i < cost.length; i++) {\n dp[i] = Math.min(dp[i - 1] + cost[i], dp[i - 2] + cost[i]);\n }\n\n // We return the min value of the last 2 stairs because both can reach the end\n return Math.min(dp[cost.length - 1], dp[cost.length - 2]);\n\n\t\t /*\n\t\t\t cost[1,100,1,1,1,100,1,1,100,1]\n\t\t 1.- Imagine this is the array\n\t\t\t dp[]\n\t\t 2.- We add the first two values\n\t\t\t dp[1,100]\n\t\t 3.- Iterate form 2 to n\n\t\t\t This is a representation of the first one\n\t\t dp[2] = Math.min(1+1, 100+1)\n\t\t dp[2] = Math.min(2,101)\n\t\t dp[2] = 2\n\t\t dp[1,100,2]\n\t\t\t After the for, this is how it should look\n\t\t dp[1,100,2,3,3,103,4,5,105,6]\n\t\t 4.- Select the min between last 2 because both can reach last step\n\t\t\treturn min (105,6)\n\t\t\treturn 6\n\n\t\t\tIt should have a space complexity of O(n) becuase we´re using an array of n size\n\t\t\tThe time complexity should also be O(n) because we have to iterate through all the array once\n\n\t\t */\n }", "public int minCostDP(int[][] costs) {\n if (costs.length == 0) return 0;\n int[] workRow = new int[numColors]; //an array for some background work\n int[] prevRow = new int[numColors]; //an array that tracks min costs so far per the color choices\n int currentRow = costs.length - 1;\n //copy the last costs to prev array and thereafter start from second last row\n System.arraycopy(costs[currentRow], 0, prevRow, 0, costs[currentRow].length);\n while (currentRow > 0) {\n currentRow--;\n //for each color calculate the min cost thus far\n workRow[0] = costs[currentRow][0] + Math.min(prevRow[1], prevRow[2]);\n workRow[1] = costs[currentRow][1] + Math.min(prevRow[0], prevRow[2]);\n workRow[2] = costs[currentRow][2] + Math.min(prevRow[0], prevRow[1]);\n //copy working array to previous array\n System.arraycopy(workRow, 0, prevRow, 0, workRow.length);\n }\n //the total cost so far per color choice is available in the prevRow\n //pick the min cost in the array\n return Math.min(Math.min(prevRow[0], prevRow[1]), prevRow[2]);\n }", "public int doDijkstras(String startVertex, String endVertex, ArrayList<String> shortestPath)\r\n\t{\r\n\t\tif(!this.dataMap.containsKey(startVertex) || !this.dataMap.containsKey(endVertex))\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Vertex does not exist in the graph!\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tSet<String> visited = new HashSet<String>();\r\n\t\t\r\n\t\tPriorityQueue<Vertex> minDist = new PriorityQueue<Vertex>();\r\n\t\t\r\n\t\tVertex firstV = new Vertex(startVertex,startVertex,0);\r\n\t\tminDist.add(firstV);\r\n\t\t\r\n\t\tfor(String V : this.adjacencyMap.get(startVertex).keySet())\r\n\t\t{\r\n\t\t\tminDist.add(new Vertex(V,startVertex,this.getCost(startVertex, V)));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//map of vertexName --> VertexObject\r\n\t\tHashMap<String, Vertex> mapV = new HashMap<String,Vertex>();\r\n\t\tmapV.put(startVertex, firstV);\t\r\n\t\t\r\n\t\t/*\r\n\t\t * Init keys-->costs\r\n\t\t */\r\n\t\tfor(String key : this.getVertices())\r\n\t\t{\r\n\t\t\tif(key.equals(startVertex))\r\n\t\t\t{\r\n\t\t\t\tmapV.put(key, new Vertex(key,null,0));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmapV.put(key, new Vertex(key,null,Integer.MAX_VALUE));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\t/*\r\n\t\t * Init List for shortest path\r\n\t\t */\r\n\t\tLinkedList<String> list = new LinkedList<String>();\r\n\t\tlist.add(startVertex);\r\n\r\n\t\tHashMap<String,List<String>> path = new HashMap<String,List<String>>();\r\n\t\tpath.put(startVertex, list);\r\n\t\t\r\n\t\twhile(!minDist.isEmpty())\r\n\t\t{\r\n\t\t\tVertex node = minDist.poll();\r\n\t\t\tString V = node.current;\r\n\t\t\tint minimum = node.cost;\r\n\t\t\tSystem.out.println(minDist.toString());\r\n\t\t\t\r\n\t\t\t\tvisited.add(V);\r\n\t\t\t\t\r\n\t\t\t\tTreeSet<String> adj = new TreeSet<String>(this.adjacencyMap.get(V).keySet());\r\n\t\t\t\t\r\n\t\t\t\tfor(String successor : adj)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(!visited.contains(successor) && !V.equals(successor))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\tint newCost = this.getCost(V, successor)+minimum;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(newCost < mapV.get(successor).cost)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tminDist.remove(mapV.get(successor));\r\n\t\t\t\t\t\t\t\tminDist.add(new Vertex(successor,V,newCost));\r\n\t\t\t\t\t\t\t\tmapV.put(successor, new Vertex(successor,V,newCost));\r\n\r\n\t\t\t\t\t\t\t\tLinkedList<String> newList = new LinkedList<String>(path.get(V));\r\n\t\t\t\t\t\t\t\tnewList.add(successor);\r\n\t\t\t\t\t\t\t\tpath.put(successor, newList);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tint smallestPath = mapV.get(endVertex).cost == Integer.MAX_VALUE ? -1 : mapV.get(endVertex).cost;\r\n\t\t\r\n\t\tif(smallestPath == -1)\r\n\t\t{\r\n\t\t\tshortestPath.add(\"None\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor(String node : path.get(endVertex))\r\n\t\t\t{\r\n\t\t\t\tshortestPath.add(node);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn smallestPath;\r\n\t}", "private static void findShortestPath(ArrayList<WeightedEdge> edges, int start, int dest, int nNodes) {\n int costs[] = new int[nNodes];\n int parents[] = new int[nNodes];\n boolean doneWithNode[] = new boolean[nNodes];\n\n // cost[i] has the cost of getting to node number i or is UNKNOWN if no cost figure out yet.\n // parent[i] contains the parent (or the way) we got to node i.\n // done[i] is true if we've already worked on all the children of node i.\n\n // Initialize the arrays.\n for (int i = 0; i<nNodes; i++) {\n costs[i] = UNKNOWN;\n parents[i] = UNKNOWN;\n doneWithNode[i] = false;\n }\n\n int node = start; // This is the node we are working on. Let's start with start node.\n costs[node] = 0; // The cost of getting to the start node is 0!\n\n // While not done processing all the nodes...\n\n // Loop through all the edges (edges array list).\n // Skip those edges whose source is doesn't match the node we're working on.\n\n // For edge (that has source of current node) figure out potential to\n // get it. (How much does it cost to get to node we're on? Add to\n // that the cost of the edge. That's the new price to set to dest of edge.\n\n // Is that a new low cost for that dest edge node?\n // Or is the dest edge node cost currently UNKNOWN? That means we have no cost.\n // If so, store the cost. Store the parent.\n\n // Once done with all the edges, mark the current node as\n // done being processed.\n doneWithNode[node] = true;\n\n // Get next node to work on.\n node = getLowestCostUnprocessedNode(costs, doneWithNode);\n\n // Done with while loop\n\n for (int i=0; i<parents.length; i++) {\n System.out.println(\"Node: \" + i + \" Cost: \" + costs[i] + \" Backtrace Parent: \" + parents[i]);\n }\n\n backtrace(dest, parents);\n }", "int getMin( int min );", "public int minCostWJumps(int st,int sc,int er,int ec,int cost[][]){\n if(st==er&&sc==ec) return cost[st][sc];\n int c=0;\n for(int jump=1;jump+sc<=ec;jump++){\n c=Math.min(c,minCostWJumps(st,sc+jump,er,ec,cost));\n }\n for(int jump=1;jump+st<=er;jump++){\n c=Math.min(c,minCostWJumps(st+jump,sc,er,ec,cost));\n }\n for(int jump=1;jump+sc<=ec&&jump+st<=er;jump++){\n c=Math.min(c,minCostWJumps(st+jump,sc+jump,er,ec,cost));\n }\n return c+cost[st][sc];\n}", "static double getMinScoreForScholarship(List<Student> studentsWithScholarship) {\n return studentsWithScholarship.stream()\n .mapToDouble(Student::getAverageScore)\n .min()\n .orElseThrow(() -> new RuntimeException(\"No students eligible for scholarship\"));\n }", "public void Djkstra(int source) {\n\t\tfor (int i = 0; i < vertices; i++) {\n\t\t\tdist[i] = Integer.MAX_VALUE; // added infinity to all ,\n\t\t}\n\t\t\n\t\tdist[source] = 0;\n\n\t\t// add source vertex to priority queue\n\t\tq.add(new Node(source, 0));\n\n\n\t\t// while my all vertices are not selected as a min among smallest one time\n\t\t// refracted in visited\n\t\twhile (visited.size() != vertices) {\n\n\t\t\t// pick from priority queue the smallest/min distance\n\t\t\tint i = q.remove().node;\n\n\t\t\t// once node is removed from queue add to set\n\t\t\tvisited.add(i);\n\n\t\t\t// relax adjacent vertex of this node;\n\t\t\t// And add the new node to queue bcoz distance has got updated so add new node as i dont have any method to update \n\t\t\t// already present node and its distance\n\t\t\t\n\n\t\t\tfor (Node v : graph[i]) {\n\t\t\t\tif (!visited.contains(v.node)) {\n\t\t\t\t\tif (dist[i] + v.cost < dist[v.node]) {\n\t\t\t\t\t\tdist[v.node] = dist[i] + v.cost;\n\t\t\t\t\t\tq.add(new Node(v.node, dist[v.node]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "double getMin();", "double getMin();", "private double dijkstrasAlgo(String source, String dest) {\r\n\r\n\t\tclearAll(); // running time: |V|\r\n\t\tint count = 0; // running time: Constant\r\n\t\tfor (Vertex v : vertexMap.values()) // running time: |V|\r\n\t\t\tif (v.isStatus())\r\n\t\t\t\tcount++;\r\n\r\n\t\tVertex[] queue = new Vertex[count]; // running time: Constant\r\n\t\tVertex start = vertexMap.get(source); // running time: Constant\r\n\t\tstart.dist = 0; // running time: Constant\r\n\t\tstart.prev = null; // running time: Constant\r\n\r\n\t\tint index = 0; // running time: Constant\r\n\t\tfor (Vertex v : vertexMap.values()) { // running time: |V|\r\n\t\t\tif (v.isStatus()) {\r\n\t\t\t\tqueue[index] = v;\r\n\t\t\t\tv.setHandle(index);\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbuildMinHeap(queue, count); // running time: |V|\r\n\r\n\t\twhile (count != 0) { // running time: |V|\r\n\t\t\tVertex min = extractMin(queue, count); // running time: log |V|\r\n\t\t\tcount--; // running time: Constant\r\n\r\n\t\t\tfor (Iterator i = min.adjacent.iterator(); i.hasNext();) { // running time: |E|\r\n\t\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\t\tif (edge.isStatus()) {\r\n\t\t\t\t\tVertex adjVertex = vertexMap.get(edge.getDestination());\r\n\t\t\t\t\tif (adjVertex.dist > (min.dist + edge.getCost()) && adjVertex.isStatus()) {\r\n\t\t\t\t\t\tadjVertex.dist = (min.dist + edge.getCost());\r\n\t\t\t\t\t\tadjVertex.prev = min;\r\n\t\t\t\t\t\tint pos = adjVertex.getHandle();\r\n\t\t\t\t\t\tHeapdecreaseKey(queue, pos, adjVertex); // running time: log |V|\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn vertexMap.get(dest).dist; // running time: Constant\r\n\t}", "public static int minCost(int[][] costs) {\n\n\t\treturn 0;\n\t\t\n\t}", "private Path findShortestPath(Address start, Address destination) throws Exception{\n HashMap<Intersection, Segment> pi = dijkstra(start);\n Segment seg = pi.get(destination);\n if(seg == null){\n throw new Exception();\n }\n LinkedList<Segment> newPathComposition = new LinkedList<>();\n Path newPath = new Path(start, destination, newPathComposition);\n newPathComposition.add(seg);\n while (!seg.getOrigin().equals(start)) {\n Intersection s = seg.getOrigin();\n seg = pi.get(s);\n if(seg == null){\n throw new Exception();\n }\n newPathComposition.add(seg);\n }\n Collections.reverse(newPathComposition);\n newPath.setSegmentsOfPath(newPathComposition);\n return newPath;\n }", "public int minimumCost(int N, int[][] connections) {\n int[] parent = new int[N + 1];\n Arrays.fill(parent, -1);\n Arrays.sort(connections, (a,b) -> (a[2]-b[2]));\n int cnt = 0;\n int minCost = 0;\n \n for(int[] edge: connections){\n int src = edge[0];\n int dst = edge[1];\n int cost = edge[2];\n \n int srcSubsetId = find(parent, src);\n int dstSubsetId = find(parent, dst);\n \n if(srcSubsetId == dstSubsetId) {\n // Including this edge will cause cycles, then ignore it\n continue;\n }\n cnt += 1;\n minCost += cost;\n union(parent, src, dst);\n }\n return cnt==N-1? minCost : -1;\n}", "private int min(int index1, int index2) {\n \t\tNode node1 = getNode(index1);\n \t\tNode node2 = getNode(index2);\n \t\tif (node1 == null) {\n \t\t\treturn index2;\n \t\t} else if (node2 == null) {\n \t\t\treturn index1;\n \t\t} else if (node1.myPriority < node2.myPriority) {\n \t\t\treturn index1;\n \t\t} else {\n \t\t\treturn index2;\n \t\t}\n \t}", "int successiveSPMinCostFlow(int d) {\n\t\tSystem.out.println(\"Running Successive Shortest Paths Algorithm:\");\n\t\t mcg = new MinCostGraph(g, source, terminal, capacity, cost);\n\t\tint minCost = mcg.successiveSPMinCostFlow(d);\n\t\tSystem.out.println(\"Flow: \" + mcg.getFlow() + \" Min Cost: \" + minCost);\n\n\t\treturn minCost;\n\t}", "public int scali(int partenza, int destinazione) {\n\t\tif(partenza > grafo.getOrder() || destinazione > grafo.getOrder() || partenza < 0 || destinazione < 0)\n\t\t\tthrow new java.lang.IllegalArgumentException();\n\t\t//variabili\n\t\theap = new MinHeap<Edge,Integer>();\n\t\tscoperti= new boolean[grafo.getOrder()];\n\t\tEdge e;\n\t\tdist = new int[grafo.getOrder()];\n\t\tdist[partenza]=0;\n\t\t//dijkstra\n\t\tfor(Edge edge: grafo.getOutEdges(partenza)) {\n\t\t\tif(edge.getHead()==destinazione) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\theap.add(edge,1 + dist[edge.getTail()]);\n\t\t}\n\t\twhile(!heap.isEmpty()) {\n\t\t\te = heap.extractMin();\n\t\t\tif(!scoperti[e.getHead()]) {\n\t\t\t\tdist[e.getHead()] =1 + dist[e.getTail()];\n\t\t\t\tscoperti[e.getHead()]=true;\n\t\t\t\tfor(Edge edge: grafo.getOutEdges(e.getHead())) {\n\t\t\t\t\tif(!scoperti[edge.getHead()])\n\t\t\t\t\t\theap.add(edge,1+ dist[edge.getTail()]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//controllo finale se sono riuscito a raggiungere la destinazione\n\t\tif(!scoperti[destinazione]) {\n\t\t\treturn -1;\n\t\t}\n\t\treturn dist[destinazione];\n\t}", "public double getMinimumDistance() { return minDistance; }", "public int findMinOptimization(int[] nums) {\n // write your code here\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n int target = nums[end];\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] <= target) {\n end = mid;\n }\n else {\n start = mid;\n }\n }\n if (nums[start] <= nums[end]) return nums[start];\n return nums[end];\n }", "@Override\r\n\tpublic void getMinimumSpanningTree(GraphStructure graph) {\r\n\t\tdistanceArray = new int [graph.getNumberOfVertices()];\r\n\t\tint numberOfVertices=graph.getNumberOfVertices();\r\n\t\tSet<Integer> spanningTreeSet = new HashSet<Integer>();\r\n\t\tArrays.fill(distanceArray,Integer.MAX_VALUE);\r\n\t\tdistanceArray[0]=0;\r\n\t\tadjacencyList = graph.getAdjacencyList();\r\n\t\tList<Edge> list;\r\n\t\twhile(spanningTreeSet.size()!=numberOfVertices) {\r\n\t\t\tfor (int vertex=0; vertex<numberOfVertices;vertex++) {\r\n\t\t\t\tif(! spanningTreeSet.contains(vertex)) {\r\n\t\t\t\t\tspanningTreeSet.add(vertex);\r\n\t\t\t\t\tlist = adjacencyList[vertex];\r\n\t\t\t\t\tfor(Edge value : list) {\r\n\t\t\t\t\t\tint sumOfWeightAndSourceVertexDistanceValue = distanceArray[vertex] + value.getWeight();\r\n\t\t\t\t\t\tint distanceValueOfDestinationVertex = distanceArray[value.getVertex()];\r\n\t\t\t\t\t\tif( sumOfWeightAndSourceVertexDistanceValue < distanceValueOfDestinationVertex ) {\r\n\t\t\t\t\t\t\tdistanceArray[value.getVertex()] = sumOfWeightAndSourceVertexDistanceValue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"\\nvertex\\tdistance from source\");\r\n\t\tfor (int i=0;i<numberOfVertices;i++) {\r\n\t\t\tSystem.out.println(i+\"\\t\"+distanceArray[i]);\r\n\t\t}\r\n\t}", "public int minCost(int[][] costs) {\n if (costs.length == 0 || costs[0].length == 0) return 0;\n int red = 0, blue = 0, green = 0;\n for (int[] cost : costs) {\n int oldred = red, oldblue = blue, oldgreen = green;\n red = Math.min(oldblue, oldgreen) + cost[0];\n blue = Math.min(oldred, oldgreen) + cost[1];\n green = Math.min(oldred, oldblue) + cost[2];\n }\n return Math.min(red, Math.min(blue, green));\n }", "int getStudentTimeCosted(long studentId);", "private static void simpleDijikstra(final DirectedGraph directedGraph,\n final Map<String, Integer> currentShortestPaths,\n final String start, final Set<String> visitedSet, final String destination) {\n // Terminate when we have visited all the nodes or if our start value isn't in our dijikstra table\n if (containsAndNotNull(currentShortestPaths, start) && visitedSet.size() != currentShortestPaths.keySet().size()) {\n compareDistanceAndReplace(directedGraph, currentShortestPaths, start);\n visitedSet.add(start);\n // Calculate the next current smallest node that hasn't been visited and not infinity\n final Optional<Map.Entry<String, Integer>> optionalSmallest =\n currentShortestPaths.entrySet().stream()\n .filter(node -> !visitedSet.contains(node.getKey()) && node.getValue() != null)\n .min(Comparator.comparingInt(Map.Entry::getValue));\n // Continue to next node if there is one available\n optionalSmallest.ifPresent(smallest -> {\n // No need to continue if the next smallest node is our destination\n if (!smallest.getKey().equals(destination)) {\n simpleDijikstra(directedGraph, currentShortestPaths, smallest.getKey(), visitedSet, destination);\n }\n });\n }\n }", "private static int LevenshteinDistance(String src, String dest){\n int[][] d = new int[src.length() + 1][dest.length() + 1];\n int i, j, cost;\n char[] str1 = src.toCharArray();\n char[] str2 = dest.toCharArray();\n \n for (i = 0; i <= str1.length; i++){d[i][0] = i;}\n for (j = 0; j <= str2.length; j++){d[0][j] = j;}\n for (i = 1; i <= str1.length; i++){\n for (j = 1; j <= str2.length; j++){\n if (str1[i - 1] == str2[j - 1])\n cost = 0;\n else\n cost = 1;\n d[i][j] =\n Math.min(\n d[i - 1][j] + 1, // Deletion\n Math.min(\n d[i][j - 1] + 1, // Insertion\n d[i - 1][j - 1] + cost)); // Substitution\n\n if ((i > 1) && (j > 1) && (str1[i - 1] == str2[j - 2]) && (str1[i - 2] == str2[j - 1]))\n {\n d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + cost);\n } \n }\n }\n return d[str1.length][str2.length];\n }", "public Vector<Integer> findMinSeam(GrayImage costs) {\n\t //generate a minimum cost table so that we can find the minimum\n\t float[][] minCosts = getMinCostsTable(costs);\n\t \n\t //find minimum cell in bottom row and work backwards\n\t //to generate the vector\n\t Vector<Integer> seam = getSeam(minCosts);\n\t \n\t return seam;\n }", "public int getCost(String startVertex, String endVertex)\r\n\t{\r\n\t\tif(!this.dataMap.containsKey(startVertex) || !this.dataMap.containsKey(endVertex))\r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"Vertex does not exist in the graph!\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn startVertex.equals(endVertex) ? 0 : this.adjacencyMap.get(startVertex).get(endVertex);\r\n\t}", "public static int smin(int a, int b) {\n return (a < b) ? a : b;\n }", "private Point findStartPoint(){\n Point min = points.get(0);\n for (int i = 1; i < points.size(); i++) {\n min = getMinValue(min, points.get(i));\n }\n return min;\n }", "public double calculateCostInclusive() {\n\t\tdouble accumulatedCost = 0;\n\t\taccumulatedCost += calculateEuclideanDistance(host.grid.getLocation(host), solutionRepresentation.get(0));\n\t\taccumulatedCost += calculateCostExclusive();\n\t\t\n\t\treturn accumulatedCost;\n\t}", "@Override\n public List<node_data> shortestPath(int src, int dest) {\n reset();\n for (node_data node : G.getV()) {\n node.setWeight(Double.POSITIVE_INFINITY);\n }\n\n DWGraph_DS.Node currentNode = (DWGraph_DS.Node) G.getNode(src);\n currentNode.setWeight(0);\n PriorityQueue<node_data> unvisitedNodes = new PriorityQueue(G.nodeSize(), weightComperator);\n unvisitedNodes.addAll(G.getV());\n HashMap<Integer, node_data> parent = new HashMap<>();\n parent.put(src, null);\n\n while (currentNode.getWeight() != Double.POSITIVE_INFINITY) {\n if (G.getNode(dest).getTag() == 1) {\n break;\n }\n for (edge_data edge : G.getE(currentNode.getKey())) {\n DWGraph_DS.Node neighbor = (DWGraph_DS.Node) G.getNode(edge.getDest());\n double tmpWeight = currentNode.getWeight() + edge.getWeight();\n if (tmpWeight < neighbor.getWeight()) {\n neighbor.setWeight(tmpWeight);\n unvisitedNodes.remove(neighbor);\n unvisitedNodes.add(neighbor);\n parent.put(neighbor.getKey(), currentNode);\n }\n }\n currentNode.setTag(1);\n if(currentNode.getKey()==dest) break;\n unvisitedNodes.remove(currentNode);\n currentNode = (DWGraph_DS.Node) unvisitedNodes.poll();\n }\n /*\n Rebuild the path list\n */\n if (!parent.keySet().contains(dest)) return null;\n List<node_data> pathList = new ArrayList<>();\n currentNode = (DWGraph_DS.Node) G.getNode(dest);\n while (parent.get(currentNode.getKey()) != null) {\n pathList.add(currentNode);\n currentNode = (DWGraph_DS.Node) parent.get(currentNode.getKey());\n }\n Collections.reverse(pathList);\n return pathList;\n }", "public T findMin();", "private int minDistance(int dist[], boolean sptSet[]) {\n int min = Integer.MAX_VALUE, min_index = -1;\n\n for (int v = 0; v < V; v++)\n if (!sptSet[v] && dist[v] < min) {\n min = dist[v];\n min_index = v;\n }\n\n return min_index;\n }", "private int min(int index1, int index2) {\n // TODO: YOUR CODE HERE\n E first = getElement(index1);\n E second = getElement(index2);\n if (first == null) { //if null then just return the other one?\n return index2;\n }\n if (second == null) {\n return index1;\n }\n if (first.compareTo(second) > 0) {\n return index2;\n } else {\n return index1;\n }\n }", "public int minCost(int[][] costs) {\n if (costs.length == 0) return 0;\n this.costs = costs;\n numHouses = costs.length;\n int cA = processCosts(0, 0);\n int cB = processCosts(0, 1);\n int cC = processCosts(0, 2);\n return Math.min(Math.min(cA, cB), cC);\n }", "public static void getShortestPath()\r\n\t{\r\n\t\tScanner scan = new Scanner(System.in); //instance for input declared\r\n\t\tSystem.out.print(\"\\nPlease enter the Source node for shortest path: \");\r\n\t\tint src = scan.nextInt() - 1;\r\n\t\twhile(src < 0 || src > routers-1)\r\n {\r\n\t\t\tSystem.out.println(\"The entered source node is out of range, please enter again: \"); // Printing error\r\n\t\t\tsrc = scan.nextInt() - 1;\t//re-input source\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.print(\"Please enter the destination node for shortest path: \");\r\n\t\tint dest = scan.nextInt() - 1;\r\n\t\twhile(dest < 0 || dest > routers-1)\r\n {\r\n\t\t\tSystem.out.println(\"The entered destination node is out of range, please enter again: \"); // Printing error\r\n\t\t\tdest = scan.nextInt() - 1;\t//re-input destination\r\n\t\t}\r\n\t\t\r\n\t\tconnectNetwork(src, dest, true);\r\n\t}", "public static int minCostII(int[][] costs) {\n if (costs.length == 0) return 0;\n int n = costs[0].length;\n int minimum = Integer.MAX_VALUE;\n for (int i = 0; i < costs.length; i++) {\n for (int j = 0; j < n; j++) {\n int minCost = Integer.MAX_VALUE;\n for (int k = 0; k < n; k++) {\n if (k != j && i - 1 >= 0) {\n minCost = Math.min(minCost, costs[i - 1][k]);\n }\n }\n costs[i][j] += minCost == Integer.MAX_VALUE ? 0 : minCost;\n if (i == costs.length - 1) {\n minimum = Math.min(costs[i][j], minimum);\n }\n }\n }\n return minimum;\n }", "@Override\n public List<node_info> shortestPath(int src, int dest) {\n int counter=0;//counter for index of listPath\n List<node_info> listPath=new ArrayList<node_info>();//The reverse list that is returned\n List<node_info> listResult=new ArrayList<node_info>();//the returned list\n if(!DijkstraHelp(src,dest)) return null;//if there is no path from src to dest\n if(src==dest) {\n listPath.add(this.ga.getNode(src));\n return listPath;\n }\n //the other case:\n node_info d=this.ga.getNode(dest);\n listPath.add(counter,d);//insert the dest in order to go from destination to source\n //counter++;\n weighted_graph gCopy=copy();\n Iterator<node_info> it=gCopy.getV().iterator();//run on the whole graph\n while(it.hasNext()){\n if(listPath.get(counter).getKey()==src) break;//if we finished\n if(gCopy.getV(listPath.get(counter).getKey()).contains(it.next())) {//remove the nodes that we were already checked if\n //they need to be insert to listPath\n continue;\n }\n Iterator<node_info> currentIt=gCopy.getV(listPath.get(counter).getKey()).iterator();//iterator on the ni-list of the\n //last node were insert to the listPath\n if(currentIt!=null) {\n node_info min=null;\n while (currentIt.hasNext()){\n node_info currentLoop=currentIt.next();\n if(currentLoop.getTag()+gCopy.getEdge(listPath.get(counter).getKey(),currentLoop.getKey())==\n listPath.get(counter).getTag()){//check if this is the node that appropriate to the shortest path\n min=currentLoop;\n }\n }\n listPath.add(min);//insert to listPath\n counter++;\n }\n }\n for(int i=listPath.size()-1;i>=0;i--){\n listResult.add(listPath.size()-i-1,listPath.get(i));//reverse the list\n }\n return listResult;\n }", "public static int minCostOfRoad(int n, ArrayList<ArrayList<Integer>> edges){\n Collections.sort(edges, new Comparator<ArrayList<Integer>>() { \n @Override\n public int compare(ArrayList<Integer> o1, ArrayList<Integer> o2) {\n return o1.get(2).compareTo(o2.get(2));\n } \n });\n //create a parent array and fill it with the self value\n int []parent = new int[n + 1];\n for(int i = 0;i <= n;i++){\n parent[i] = i;\n }\n\n ArrayList<ArrayList<Integer>> mst = new ArrayList<>();\n int minCost = 0;\n int i = 0;\n int countEdges = 0;\n //Pick the smallest edge. Check if it forms a cycle with the spanning tree formed so far. \n //If cycle is not formed, include this edge. Else, discard it.\n while(countEdges != n - 1){\n ArrayList<Integer>edge = edges.get(i);\n int source = edge.get(0);\n int dest = edge.get(1);\n int weight = edge.get(2);\n int sourceParent = findParent(source, parent);\n int destParent = findParent(dest, parent);\n if(sourceParent != destParent){\n mst.add(edge);\n countEdges++;\n minCost += weight;\n parent[sourceParent] = destParent;\n }\n i++;\n }\n return minCost;\n }", "private Node lowestCostThrough(List<Node> openSet, Map<Node, Double> costThrough){\n Node lowest = openSet.get(0);\n\n for(Node n: openSet){\n if(costThrough.get(n) < costThrough.get(lowest)){\n lowest = n;\n }\n }\n return lowest;\n }", "public Node selectNode(List<Node> nodes){\n float minCost = Integer.MAX_VALUE;\n Node bestNode = null;\n float costToStart = 0, totalCost = 0;\n\n for(Node n:nodes){\n costToStart = n.getCostEstimated();\n int distance = Math.abs(n.getX()-finish.getX())+Math.abs(n.getY()-finish.getY());\n totalCost = costToStart+distance;\n\n if(minCost>totalCost){\n minCost = totalCost;\n bestNode = n;\n }\n }\n return bestNode;\n }", "private Cell getShortestPath(List<Cell> surroundingBlocks, int DestinationX, int DestinationY) {\n \n int cellIdx = random.nextInt(surroundingBlocks.size());\n Cell min = surroundingBlocks.get(0);\n int distMin = euclideanDistance(surroundingBlocks.get(0).x, surroundingBlocks.get(0).y, DestinationX, DestinationY);\n \n for(int i = 0; i < surroundingBlocks.size(); i++) {\n if (i==1) {\n min = surroundingBlocks.get(i);\n }\n if(distMin > euclideanDistance(surroundingBlocks.get(i).x, surroundingBlocks.get(i).y, DestinationX, DestinationY)) {\n distMin = euclideanDistance(surroundingBlocks.get(i).x, surroundingBlocks.get(i).y, DestinationX, DestinationY);\n min = surroundingBlocks.get(i);\n }\n }\n return min;\n }", "private static int min(int d1,int d2){\n\t\treturn d1<d2?d1:d2;\n\t}", "public int minCost(int[][] costs) {\n if (costs == null || costs.length == 0 || costs[0].length != 3) return 0;\n \n int len = costs.length;\n \n for (int i = 1; i < len; i++) {\n costs[i][0] += Math.min(costs[i-1][1], costs[i-1][2]);\n costs[i][1] += Math.min(costs[i-1][0], costs[i-1][2]);\n costs[i][2] += Math.min(costs[i-1][1], costs[i-1][0]);\n }\n \n return Math.min(costs[len-1][0], Math.min(costs[len-1][1], costs[len-1][2]));\n }", "protected double minimumCostPerUnitDistance( ) {\n\t\treturn 0.0;\n\t}", "public static State min(State a, State b){\n return a.score <= b.score ? a: b;\n }", "public void minimum()\n\t{\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tif(rowTick[i]==8888)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(columnTick[j]==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cost[i][j]<min)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmin=cost[i][j];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic int getSingleSourceDistance(E dst) {\r\n\t\tif(containsVertex(dst)) {\r\n\t\t\treturn vertices.get(dst).getDistance();\r\n\t\t}\r\n\t\treturn Integer.MAX_VALUE;\r\n\t}", "public List<Node> computeDijkstraShortestPath(Node source, Node destination) {\n\n source.minDistance = 0.;\n PriorityQueue<Node> nodeQueue = new PriorityQueue<Node>();\n nodeQueue.add(source);\n\n int destinationGroup = destination._groupID;\n\n while (!nodeQueue.isEmpty()) {\n Node v = nodeQueue.poll();\n\n Log.i(\"bbb\", \"In dijsk node name \"+ v._waypointName);\n //Stop searching when reach the destination node\n\n\n if(destinationGroup!=0){\n\n if(v._groupID==destinationGroup){\n destination = navigationGraph.get(navigationGraph.size()-1).nodesInSubgraph.get(v._waypointID);\n Log.i(\"bbb\", \"destination is: \"+destination._waypointName);\n\n break;\n }\n\n }\n\n if (v._waypointID.equals(destination._waypointID))\n break;\n\n\n // Visit each edge that is adjacent to v\n for (Edge e : v._edges) {\n Node a = e.target;\n Log.i(\"bbb\", \"node a \"+a._waypointName);\n double weight = e.weight;\n double distanceThroughU = v.minDistance + weight;\n if (distanceThroughU < a.minDistance) {\n nodeQueue.remove(a);\n a.minDistance = distanceThroughU;\n a.previous = v;\n Log.i(\"bbb\", \"set previous\");\n nodeQueue.add(a);\n }\n }\n }\n\n Log.i(\"bbb\", \"destination is: \"+destination._waypointName);\n\n return getShortestPathToDestination(destination);\n }", "@Override\r\n\tpublic ArrayList<Edge<E>> primMinimumSpanningTree(E src) {\r\n\t\tArrayList<Edge<E>> prim = new ArrayList<Edge<E>>();\r\n\t\tif(containsVertex(src)) {\r\n\t\t\tlastSrc = vertices.get(src);\r\n\t\t\tPriorityQueue<Vertex<E>> pq = new PriorityQueue<Vertex<E>>();\r\n\t\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\t\tu.setDistance(Integer.MAX_VALUE);\r\n\t\t\t\tu.setColor(Color.WHITE);\r\n\t\t\t\tu.setPredecessor(null);\r\n\t\t\t\tpq.offer(u);\r\n\t\t\t});\r\n\t\t\tpq.remove(lastSrc);\r\n\t\t\tlastSrc.setDistance(0);\r\n\t\t\tpq.offer(lastSrc);\r\n\r\n\t\t\twhile(!pq.isEmpty()) {\r\n\t\t\t\tVertex<E> u = pq.poll();\r\n\t\t\t\tfor(Edge<E> ale : adjacencyLists.get(u.getElement())) {\r\n\t\t\t\t\tVertex<E> s = vertices.get(ale.getSrc());\r\n\t\t\t\t\tVertex<E> d = vertices.get(ale.getDst());\r\n\t\t\t\t\tif(d.getColor() == Color.WHITE && d.getDistance() > ale.getWeight()) {\r\n\t\t\t\t\t\tpq.remove(d);\r\n\t\t\t\t\t\tVertex<E> pred = d.getPredecessor();\r\n\t\t\t\t\t\tif(pred != null) { //remove the edge that has ale.dst as dst vertex\r\n\t\t\t\t\t\t\tEdge<E> edgeToRemove = new Edge<>(pred.getElement(), ale.getDst(), 1);\r\n\t\t\t\t\t\t\tprim.remove(edgeToRemove);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\td.setDistance(ale.getWeight());\r\n\t\t\t\t\t\td.setPredecessor(s);\r\n\t\t\t\t\t\tpq.offer(d);\r\n\t\t\t\t\t\tprim.add(ale);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tu.setColor(Color.BLACK);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn prim;\r\n\t}", "private T getMinUnvisited(){\n if (unvisited.isEmpty()) return null;\n T min = unvisited.get(0);\n for (int i = 1; i < unvisited.size(); i++){\n T temp = unvisited.get(i);\n if (distances[vertexIndex(temp)] < distances[vertexIndex(min)]){\n min = temp;\n }\n }\n return min;\n }", "private void computeShortestPath(){\n T current = start;\n boolean atEnd = false;\n while (!unvisited.isEmpty()&& !atEnd){\n int currentIndex = vertexIndex(current);\n LinkedList<T> neighbors = getUnvisitedNeighbors(current); // getting unvisited neighbors\n \n //what is this doing here???\n if (neighbors.isEmpty()){\n \n }\n \n // looping through to find distances from start to neighbors\n for (T neighbor : neighbors){ \n int neighborIndex = vertexIndex(neighbor); \n int d = distances[currentIndex] + getEdgeWeight(current, neighbor);\n \n if (d < distances[neighborIndex]){ // if this distance is less than previous distance\n distances[neighborIndex] = d;\n closestPredecessor[neighborIndex] = current; // now closest predecessor is current\n }\n }\n \n if (current.equals(end)){\n atEnd = true;\n }\n else{\n // finding unvisited node that is closest to start node\n T min = getMinUnvisited();\n if (min != null){\n unvisited.remove(min); // remove minimum neighbor from unvisited\n visited.add(min); // add minimum neighbor to visited\n current = min;\n }\n }\n }\n computePath();\n totalDistance = distances[vertexIndex(end)];\n }", "private double dijkstraSingleTarget(Map<Integer, List<Node>> graph, int vertices, int source, int target) {\n Queue<Node> minHeap = new PriorityQueue<>(\n Comparator.comparingDouble(a -> a.weight)\n );\n\n double[] dist = new double[vertices + 1]; //shortest distance for each vertex\n Arrays.fill(dist, 0.0);\n\n boolean visited[] = new boolean[vertices + 1];\n\n // Distance for starting node is 0\n dist[source] = -1;\n minHeap.add((new Node(-1,source)));\n\n while (!minHeap.isEmpty()) {\n Node topPair = minHeap.remove();\n int currNode = topPair.vertex;\n double currDistance = topPair.weight;\n\n if (!graph.containsKey(currNode)) {\n continue;\n }\n\n if (visited[currNode]) continue;\n visited[currNode] = true;\n\n\n for (Node edge : graph.get(currNode)) {\n double weight = edge.weight;\n int neighborNode = edge.vertex;\n double nextDist = currDistance * weight;\n\n if (!visited[neighborNode] && nextDist < dist[neighborNode]) {\n dist[neighborNode] = nextDist;\n minHeap.add((new Node(nextDist, neighborNode)));\n\n }\n\n }\n\n\n }\n\n return -dist[target];\n }", "private static int indexOfSmallest(int[] a, int start) {\n int minNum = a[start];\n int minIndex = start;\n for(int i=start; i<a.length; i++){\n if(a[i]<minNum){\n minNum = a[i];\n minIndex = i;\n }\n\n }\n return minIndex;\n }", "public int stepOne(int step)\n\t{ \n\t\tint i,j; \n\t\tint min;\n\t\tfor(i=0; i<n; i++) \n\t\t{ \n\t\t\tmin=cost[i][0];\n\t\t\tfor(j=0; j<n; j++)\n\t\t\t {\n\t\t\t\tif(cost[i][j]<min)\n\t\t\t\t{\n\t\t\t\t\tmin = cost[i][j];\n\t\t\t\t}\t\t\t\t\t\t\n\t\t\t}\n\t\t\tfor (j=0; j<n;j++)\n\t\t\t{\n\t\t\t\tcost[i][j] = cost[i][j]- min;\n\t\t\t}\t\t\t\n\t\t}\n\t\tstep=2;\n\t\treturn step;\n\t}", "public int getShortestDistance(final Node source, final Node target) {\n return D[source.id][target.id];\n }", "private PathCostFlow findCheapestPath(int start, int end, double max_flow) throws Exception {\n if (getNode(start) == null || getNode(end) == null\n || !getNode(start).isSource() || getNode(end).isSource()) {\n throw new IllegalArgumentException(\"start must be the index of a source and end must be the index of a sink\");\n }\n double amount = Math.min(Math.min(getNode(start).getResidualCapacity(),\n getNode(end).getResidualCapacity()), max_flow);\n\n boolean[] visited = new boolean[n];\n int[] parent = new int[n];\n for (int i = 0; i < n; i++) {\n parent[i] = -1;\n }\n double[] cost = new double[n];\n for (int i = 0; i < n; i++) {\n cost[i] = Integer.MAX_VALUE;\n }\n cost[start] = 0;\n\n PriorityQueue<IndexCostTuple> queue = new PriorityQueue<IndexCostTuple>();\n queue.add(new IndexCostTuple(start, 0));\n\n while (!queue.isEmpty()) {\n IndexCostTuple current = queue.poll();\n\n // we found the target node\n if (current.getIndex() == end) {\n ArrayList<Integer> path = new ArrayList<Integer>();\n path.add(new Integer(end));\n while (path.get(path.size() - 1) != start) {\n path.add(parent[path.get(path.size() - 1)]);\n }\n Collections.reverse(path);\n if ((path.get(0) != start) || (path.get(path.size() - 1) != end)) {\n throw new Exception(\"I fucked up coding Dijkstra's\");\n }\n return new PathCostFlow(path, cost[end], amount);\n }\n\n // iterate through all possible neighbors of the current node\n for (int i = 0; i < n; i++) {\n SingleEdge e = matrix[current.getIndex()][i];\n if ((!visited[i]) && (e != null)\n && (current.getCost() + e.getCost(amount) < cost[i])) {\n cost[i] = current.getCost() + e.getCost(amount);\n parent[i] = current.getIndex();\n\n // update the entry for this node in the queue\n IndexCostTuple newCost = new IndexCostTuple(i, cost[i]);\n queue.remove(newCost);\n queue.add(newCost);\n }\n }\n visited[current.getIndex()] = true;\n }\n\n return null; //the target node was unreachable\n }", "public int minCost2(int[][] costs) {\n if (costs.length == 0 || costs[0].length == 0) return 0;\n int red = costs[0][0], blue = costs[0][1], green = costs[0][2]; // error: MIN_VAL and 0 both wrong\n for (int i = 1; i < costs.length; i++) {\n int red2 = Math.min(blue, green) + costs[i][0];\n int blue2 = Math.min(red, green) + costs[i][1];\n int green2 = Math.min(red, blue) + costs[i][2];\n red = red2;\n blue = blue2;\n green = green2;\n }\n return Math.min(red, Math.min(blue, green));\n }", "public int getMinDistance(){\n return totalDistance;\n }", "private void findBestPath(int start){\n\t\tint n = this.getDimension(); // for readability\n\t\tint lastCity, minDist = 0, moment = 0;\n\t\t\n\t\tthis.path = new int[this.getDimension() + 1];\n\t\tthis.visited = 0; \n\t\t\n\t\tsetAllUnvisited();\n\t\t\n\t\tvisitCity(moment, start); // visits the first city in time 0\n\t\tlastCity = start;\n//\t\tSystem.out.println(Arrays.toString(this.path) + \" > \" + this.visited);\n\t\t// Repeats until all cities were visited\n\t\twhile(visited < n){\n//\t\t\tSystem.out.println(\"LC:\" + lastCity + \" MD:\" + minDist + \" M:\" + moment);\n\t\t\tmoment++;\n\t\t\t\n\t\t\t// Finds the closest city\n\t\t\tint closest = -1, closestDist = -1;\n\t\t\tfor(int i = 0; i < n; i++){\n\t\t\t\tif(!wasVisited(i)){\n\t\t\t\t\tif(dist(lastCity, i) < closestDist || closestDist == -1){ // If it's the first iteration or found a closer city\n\t\t\t\t\t\tclosest = i;\n\t\t\t\t\t\tclosestDist = dist(lastCity, closest);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Updates distance\n\t\t\tminDist += dist(lastCity, closest);\n\t\t\t\n\t\t\t// Visits the closest city\n\t\t\tvisitCity(moment, closest);\n\t\t\tlastCity = closest;\n//\t\t\tSystem.out.println(Arrays.toString(this.path) + \" > \" + minDist);\n\t\t\t\n\t\t}\n\t\t\n\t\t// Returns to the first city\n\t\tvisitCity(moment + 1, start);\n\t\tminDist += dist(lastCity, start);\n\t\t\n\t\tif(minDist < this.totalDistance || this.totalDistance == -1){\n\t\t\tthis.totalDistance = minDist;\n\t\t\tthis.bestPath = this.path.clone();\n\t\t}\n//\t\tSystem.out.println(Arrays.toString(this.path) + \" -----> \" + minDist);\n\t}", "void prim(AdjacencyLists g, int start)\r\n\t{\r\n\t\t// whether the node is in the tree or not.\r\n\t\tboolean[] intree = new boolean[g.nvertices];\r\n\t\t\r\n\t\t// the cost of adding the edge to the tree\r\n\t\tint[] distance = new int[g.nvertices];\r\n\t\t\r\n\t\tint[] parent = new int[g.nvertices]; \r\n\t\t\r\n\t\tfor (int i = 0; i < g.nvertices; ++i) {\r\n\t\t\tintree[i] = false;\r\n\t\t\tdistance[i] = Integer.MAX_VALUE;\r\n\t\t\tparent[i] = -1;\r\n\t\t}\r\n\t\t\r\n\t\tdistance[start] = 0;\r\n\t\t\r\n\t\t// current vertex to process\r\n\t\tint v = start;\r\n\t\t// candidate next vertex\r\n\t\tint w; \r\n\t\t// edge weight\r\n\t\tint weight;\r\n\t\t// best current distance from start\r\n\t\tint dist;\r\n\t\t\r\n\t\twhile (!intree[v]) {\r\n\t\t\tintree[v] = true;\r\n\t\t\t\r\n\t\t\tEdgeNode p = g.edges[v];\r\n\t\t\t\r\n\t\t\t// for each node w that is not in the tree\r\n\t\t\t// identify the lowest cost\r\n\t\t\twhile (p != null) {\r\n\t\t\t\tw = p.y;\r\n\t\t\t\tweight = p.weight;\r\n\t\t\t\tif (!intree[w] && distance[w] > weight) {\r\n\t\t\t\t\t// pick the edge that is lowest cost from v.\r\n\t\t\t\t\tdistance[w] = weight;\r\n\t\t\t\t\tparent[w] = v;\r\n\t\t\t\t}\r\n\t\t\t\tp = p.next;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// find the node that is not in the list, \r\n\t\t\t// and has the smallest distance value.\r\n\t\t\tv = 0;\r\n\t\t\tdist = Integer.MAX_VALUE;\r\n\t\t\tfor (int i = 0; i < g.nvertices; ++i) {\r\n\t\t\t\tif (!intree[i] && dist > distance[i]) {\r\n\t\t\t\t\tdist = distance[i];\r\n\t\t\t\t\tv = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public K min();", "@Override\n\tpublic List<Path> getShortestRoute(Location src, Location dest, String edgePropertyName) {\n\t\t//array to keep track of visited vertexes\n\t\tboolean[] visited = new boolean[locations.size()];\n\t\t//array to store weights\n\t\tdouble[] weight = new double[locations.size()];\n\t\t//array to store predecessors\n\t\tLocation[] pre = new Location[locations.size()];\n\t\t//creates priority queue\n\t\tPriorityQueue<LocWeight> pq = new PriorityQueue<LocWeight>();\n\t\t// initializes every vertex misted mark to false\n\t\tfor (int i = 0; i < visited.length; i++)\n\t\t\tvisited[i] = false;\n\t\t// initializes every vertex's total weight to infinity\n\t\tfor (int i = 0; i < weight.length; i++)\n\t\t\tweight[i] = Double.POSITIVE_INFINITY;\n\t\t// initializes every vertex's predecessor to null\n\t\tfor (int i = 0; i < pre.length; i++)\n\t\t\tpre[i] = null;\n\t\t//sets start vertex's total weight to 0\n\t\tweight[locations.indexOf(src)] = 0;\n\t\t//insert start vertex in priroty queue\n\t\tpq.add(new LocWeight(src, 0.0));\n\t\t\n\t\tString[] edgeNames = getEdgePropertyNames();\n\t\tint indexProp = 0;\n\t\tfor (int i = 0; i < edgeNames.length; i++) {\n\t\t\tif (edgeNames[i].equalsIgnoreCase(edgePropertyName))\n\t\t\t\tindexProp = i;\n\t\t}\n\t\twhile (!pq.isEmpty()) {\n\t\t\tLocWeight c = pq.remove();\n\t\t\t//set C's visited mark to true\n\t\t\tvisited[locations.indexOf(c)] = true;\n\n\t\t\tList<Location> neighbors = getNeighbors(c.getLocation());\n\t\t\t//for each unvisited successor adjacent to C\n\t\t\tfor (int i = 0; i < neighbors.size(); i++) {\n\t\t\t\tif (visited[locations.indexOf(neighbors.get(i))] == false) {\n\t\t\t\t\t//change successor's total weight to equal C's weight + edge weight from C to successor\n\t\t\t\t\tweight[locations.indexOf(neighbors.get(i))] = c.getWeight() + getEdgeIfExists(c.getLocation(), neighbors.get(i)).getProperties().get(indexProp);\n\t\t\t\t\tpre[locations.indexOf(neighbors.get(i))] = c.getLocation();\n\t\t\t\t\tLocWeight succ = new LocWeight(neighbors.get(i), weight[locations.indexOf(neighbors.get(i))]);\n\t\t\t\t\t//if successor is already in pq, update its total weight\n\t\t\t\t\tif (pq.contains(succ)) {\n\t\t\t\t\t\tpq.remove(succ);\n\t\t\t\t\t}\n\t\t\t\t\t//if not already there, add\n\t\t\t\t\tpq.add(succ);\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t\n\n\n\t\t}\n\t\t\n\t\tArrayList<Path> path = new ArrayList<Path>();\n\t\t//find predecessor of each vertex and construct shortest path then return it\n\t\tLocation curr1 = dest;\n\t\twhile (pre[locations.indexOf(curr1)] != null) {\n\t\t\tpath.add(getEdgeIfExists(pre[locations.indexOf(curr1)], curr1));\n\t\t\tcurr1 = pre[locations.indexOf(curr1)];\n\t\t}\n\t\t//to show path from the start\n\t\tfor (int i = path.size() - 1; i >= 0; i--)\n\t\t\tpath.add(path.remove(i));\n\n\n\t\treturn path;\n\t}", "public static int minCostDP(int[] dimensions, int start, int end) {\n\t\tint m=end+1;\r\n\t\tint[][] storage=new int[m][m];\r\n\t\tfor(int i=0;i<m;i++)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<m;j++)\r\n\t\t\t{\r\n\t\t\t\tstorage[i][j]=-1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//matrix chain length =1\r\n\t\tfor(int i=0;i<m;i++)\r\n\t\t{\r\n\t\t\tstorage[i][i]=0;\r\n\t\t}\r\n\t\t//matrix chain length l\r\n\t\tfor(int l=2;l<m;l++)\r\n\t\t{\r\n\t\t\tfor(int i=1;i<m-l+1;i++)\r\n\t\t\t{\r\n\t\t\t\tint j=i+l-1;//taking the cummulative effect of i and l\r\n\t\t\t\tstorage[i][j]=Integer.MAX_VALUE;\r\n\t\t\t\tint q=0;\r\n\t\t\t\tfor(int k=i;k<j;k++)\r\n\t\t\t\t{\r\n\t\t\t\t\tq=storage[i][k]+storage[k+1][j]+dimensions[i-1]*dimensions[k]*dimensions[j];\r\n\t\t\t\t\tif(q<storage[i][j])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tstorage[i][j]=q;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn storage[start][end];\r\n\t}", "public void recordNodeDistances(Node start, Node end)\n {\n HashSet<Node> inStack = new HashSet<Node>();\n LinkedList<Node> nodeStack = new LinkedList<Node>();\n\n nodeStack.push(start);\n\n Node curNode;\n\n while(!nodeStack.isEmpty())\n {\n //shortest distance from end to start = shortest distance of neighbor to start\n curNode = nodeStack.peekFirst();\n Collection<? extends Node> neighbors = curNode.getNeighbors();\n\n if(curNode == end) //if we've reached the end\n {\n nodeDists.put(curNode, 0); //the distance to the end is 0 (obviously)\n\n inStack.remove(curNode); //remove from our store of nodes that are in the stack\n nodeStack.removeFirst();\n }\n else\n {\n boolean readyForEval = true; //is node ready to have the min distance calculated?\n\n for (Node n : neighbors)\n {\n if (!nodeDists.containsKey(n) && !inStack.contains(n))\n {\n nodeStack.addFirst(n); //in order to calculate the min distance to target any neighbors not in\n inStack.add(n); //the stack must have already been calculated. Neighbors still in the stack\n //are to be considered closer to the source and, thus, \"behind\" curNode\n readyForEval = false;\n }\n }\n\n if (readyForEval)\n {\n int minDist = getMinDist(curNode); //get the minimum distance from this node to the target\n\n nodeDists.put(curNode, minDist); //if unreachable, distance is maxValue\n nodeStack.removeFirst();\n inStack.remove(curNode);\n }\n }\n }\n }" ]
[ "0.72738296", "0.7076849", "0.67571956", "0.66690135", "0.6619677", "0.6516657", "0.64374983", "0.6404116", "0.6256164", "0.6240603", "0.6236904", "0.62254965", "0.6109934", "0.60706735", "0.604111", "0.6016321", "0.60120744", "0.60040003", "0.59854394", "0.5924699", "0.5911044", "0.58929116", "0.58913434", "0.5891086", "0.5871629", "0.5864671", "0.58526343", "0.5808345", "0.5801051", "0.579773", "0.5755335", "0.57360125", "0.5731538", "0.5727395", "0.57237965", "0.57234424", "0.57166773", "0.57076657", "0.57019174", "0.5690971", "0.568651", "0.56833947", "0.5665881", "0.5659991", "0.5649916", "0.5649916", "0.5638816", "0.56332076", "0.56303555", "0.5629202", "0.56017333", "0.5584743", "0.556759", "0.55633765", "0.55629486", "0.55615354", "0.5559458", "0.55524033", "0.5547299", "0.55468565", "0.5546033", "0.55426574", "0.5521154", "0.5516385", "0.5512555", "0.5510817", "0.5507203", "0.5499507", "0.5495553", "0.5492363", "0.54898113", "0.5488517", "0.54848367", "0.54827917", "0.54805905", "0.54779804", "0.54642737", "0.54549396", "0.5453219", "0.54510206", "0.54483503", "0.5441835", "0.5435745", "0.5426446", "0.541858", "0.54131246", "0.5411482", "0.5407534", "0.5404585", "0.54032284", "0.5398873", "0.53967", "0.5394044", "0.53921366", "0.5387769", "0.53785455", "0.5355231", "0.535494", "0.5354047", "0.5344312" ]
0.88153154
0
returns edges and prices in a string.
public String toString() { String o = ""; for (Student v : students) { boolean first = true; o += "Student "; o += v.getName(); o += " has neighbors "; ArrayList<Student> ngbr = v.getNeighbors(); for (Student n : ngbr) { o += first ? n.getName() : ", " + n.getName(); first = false; } first = true; o += " with prices "; ArrayList<Integer> wght = v.getPrices(); for (Integer i : wght) { o += first ? i : ", " + i; first = false; } o += System.getProperty("line.separator"); } return o; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Edge parseToEdge(String s) {\n\t\ts = s.trim();\n\t\tString[] results = s.split(\"[(),]+\");\n\t\tif(results.length == 8 && results[0].equals(\"[\") && results[7].equals(\"]\")) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\tint i1 = Integer.parseInt(results[1]);\n\t\t\t\tint i2 = Integer.parseInt(results[2]);\n\t\t\t\tint i3 = Integer.parseInt(results[3]);\n\t\t\t\tint j1 = Integer.parseInt(results[4]);\n\t\t\t\tint j2 = Integer.parseInt(results[5]);\n\t\t\t\tint j3 = Integer.parseInt(results[6]);\n\t\t\t\treturn new Edge(new Point(i1,i2,i3),new Point(j1,j2,j3));\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(\"Number parse Error\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Format parse Error\");\n\t\tSystem.out.println(\"string: \" + s);\n\t\tSystem.out.println(\"tokens: \" + results.length);\n\t\treturn null;\n\t}", "public static String[] digraphGenerator(String str)\n\t{\n\t\tString plainText = str.replaceAll(\"\\\\s+\",\"\"); // removes spaces\n\t\tint c1 = 0;\n\t\tint c2 = 1;\n\t\twhile( c2 > -6 )\n\t\t{\n\t\t\tif (plainText.charAt(c1) == plainText.charAt(c2))\n\t\t\t{\n\t\t\t\tplainText = plainText.substring(0, c2) + \"q\" + plainText.substring(c2, plainText.length());\n\t\t\t\tc1-=2;\n\t\t\t\tc2-=2;\n\t\t\t}\n\t\t\tc1+=2;\n\t\t\tc2+=2;\n\t\t\tif (c2 >= plainText.length())\n\t\t\t{\n\t\t\t\tif (plainText.length() % 2 == 1)\n\t\t\t\t{\n\t\t\t\t\tplainText += \"q\";\n\t\t\t\t}\n\t\t\t\tString[] blockArray = plainText.split(String.format(\"(?<=\\\\G.{%1$d})\", 2)); // splits the string into groups of 2\n\t\t\t\treturn blockArray;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Edge loadEdgesFromString(String edgeLine){\n\n int index; /* index for loops */\n Edge newEdge; /* new Edge */\n StringBuilder sourceNumber = new StringBuilder(); /* For The Source Number */\n StringBuilder destinationNumber = new StringBuilder(); /* For The Destination Number */\n StringBuilder weight = new StringBuilder(); /* For The Source Name */\n\n /* Pass the until source number */\n for (index = 0; index < edgeLine.length(); ++index) {\n if (edgeLine.charAt(index) == 'v')\n break;\n }\n\n /* Source Number */\n for (index = index + 1 ; index < edgeLine.length(); ++index) {\n if (edgeLine.charAt(index) != '\"')\n sourceNumber.append(edgeLine.charAt(index));\n else\n break;\n }\n\n /* Pass the until destination number */\n for (; index < edgeLine.length(); ++index) {\n if (edgeLine.charAt(index) == 'v')\n break;\n }\n\n /* Destination Number */\n for (index = index + 1; index < edgeLine.length(); ++index) {\n if (edgeLine.charAt(index) != '\"')\n destinationNumber.append(edgeLine.charAt(index));\n else\n break;\n }\n\n /* Pass the until weight */\n for (index = index+1; index < edgeLine.length(); ++index) {\n if (edgeLine.charAt(index) == '\"')\n break;\n }\n\n /* Destination Number */\n for (index = index+1; index < edgeLine.length(); ++index) {\n if (edgeLine.charAt(index) != '\"')\n weight.append(edgeLine.charAt(index));\n else\n break;\n }\n\n return newEdge = new Edge(Integer.parseInt(String.valueOf(sourceNumber)),\n Integer.parseInt(String.valueOf(destinationNumber)),\n Integer.parseInt(String.valueOf(weight)));\n }", "private String edgeString()\n {\n Iterator<DSAGraphEdge<E>> iter = edgeList.iterator();\n String outputString = \"\";\n DSAGraphEdge<E> edge = null;\n while (iter.hasNext())\n {\n edge = iter.next();\n outputString = (outputString + edge.getLabel() + \", \");\n }\n return outputString;\n }", "String getEdges();", "int[] parse(String re, int s, int t)\r\n\t{\r\n\t\tint [] st;\r\n\t\tint i;\r\n\t\t\r\n\t\t//single symbol\r\n\t\tif (s==t)\r\n\t\t{\r\n\t\t\tst=new int[2];\r\n\t\t\tst[0]=incCapacity();\r\n\t\t\tst[1]=incCapacity();\r\n\t\t\tif (re.charAt(s)=='e') //epsilon\r\n\t\t\t\taddEdge(st[0],symbol,st[1]);\r\n\t\t\telse addEdge(st[0],re.charAt(s)-'0',st[1]);\r\n\t\t\treturn st;\r\n\t\t}\r\n\t\t\r\n\t\t//(....)\r\n\t\tif ((re.charAt(s)=='(')&&(re.charAt(t)==')'))\r\n\t\t{\r\n\t\t\tif (next[s]==t)\r\n\t\t\t\treturn parse(re,s+1,t-1);\r\n\t\t}\r\n\t\t\r\n\t\t//RE1+RE2\r\n\t\ti=s;\r\n\t\twhile (i<=t)\r\n\t\t{\r\n\t\t\ti=next[i];\r\n\t\t\t\r\n\t\t\tif ((i<=t)&&(re.charAt(i)=='+'))\r\n\t\t\t{\r\n\t\t\t\tint [] st1=parse(re,s,i-1);\r\n\t\t\t\tint [] st2=parse(re,i+1,t);\r\n\t\t\t\tst = union(st1[0],st1[1],st2[0],st2[1]);\r\n\t\t\t\treturn st;\r\n\t\t\t}\r\n\t\t\t++i;\r\n\t\t}\r\n\t\t\r\n\t\t//RE1.RE2\r\n\t\ti=s;\r\n\t\twhile (i<=t)\r\n\t\t{\r\n\t\t\ti=next[i];\r\n\t\t\t\r\n\t\t\tif ((i<=t)&&(re.charAt(i)=='.'))\r\n\t\t\t{\r\n\t\t\t\tint [] st1=parse(re,s,i-1);\r\n\t\t\t\tint [] st2=parse(re,i+1,t);\r\n\t\t\t\tst = concat(st1[0],st1[1],st2[0],st2[1]);\r\n\t\t\t\treturn st;\r\n\t\t\t}\r\n\t\t\t++i;\r\n\t\t}\r\n\t\t\r\n\t\t//(RE)*\r\n\t\tassert(re.charAt(t)=='*');\r\n\t\tint [] st1=parse(re,s,t-1);\r\n\t\tst=clo(st1[0],st1[1]);\r\n\t\treturn st; \r\n\t}", "private static SimpleEdge e(String s) {\n RangeSpecification spec = RangeSpecification.parse(s);\n Preconditions.checkArgument(spec.length() == 1, \"only specify single digit ranges\");\n return SimpleEdge.fromMask(spec.getBitmask(0));\n }", "private String marketPrices() {\r\n\t\tdouble[] prices=market.getPrices();\r\n\t\tString out = \"Prices Are: \";\r\n\t\tfor(int i=0; i<prices.length;i++) {\r\n\t\t\tout=out.concat(i+\": \"+String.format(\"%.2f\", prices[i])+\" || \");\r\n\t\t}\r\n\t\treturn out;\r\n\t}", "private static String getPriceVeggie(WebElement s) {\n\t\treturn s.findElement(By.xpath(\"following-sibling::td[1]\")).getText();\r\n\t}", "private GDSLayers gdsGetNumbers(String str)\n \t{\n \t\tint openParen = str.indexOf('(');\n \t\tif (openParen < 0) return null;\n \t\tint closeParen = str.lastIndexOf(')');\n \t\tif (closeParen < 0) return null;\n \t\tString gdsNumbers = str.substring(openParen+1, closeParen);\n \t\tGDSLayers numbers = GDSLayers.parseLayerString(gdsNumbers);\n \t\treturn numbers;\n \t}", "private Edge createEdge(String row) {\n String[] columns = row.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\", -1);\n return Edge.fromCsv(columns);\n }", "private void stage1_2() {\n\n\t\tString s = \"E $:( 3E0 , 3E0 ) ( $:( 3E0 , 3E0 ) \";\n\n//\t s = SymbolicString.makeConcolicString(s);\n\t\tStringReader sr = new StringReader(s);\n\t\tSystem.out.println(s);\n\t\tFormula formula = new Formula(s);\n\t\tMap<String, Decimal> actual = formula.getVariableValues();\n\t}", "public String getEdges(){\n double Lx = super.getCentre().x - (this.length / 2);\r\n double Rx = super.getCentre().x + (this.length / 2);\r\n double Dy = super.getCentre().y - (this.width / 2);\r\n double Uy = super.getCentre().y + (this.width / 2);\r\n Point UL = new Point(Lx, Uy);\r\n Point UR = new Point(Rx, Uy);\r\n Point DL = new Point(Lx, Dy);\r\n Point DR = new Point(Rx, Dy);\r\n Point[] Edges = {DL, UL, UR, DR};\r\n this.edge = Edges;\r\n return Arrays.toString(Edges);\r\n }", "public static String getPrice(String s) {\n\t\t// HINT: This method returns a blank String, but that's not right. \n\t\t// Fix this function so it calls calculateCost() to get the price.\n\t\t// If calculateCost() returns -1, return \"UNMAILABLE\", but if \n\t\t// calculateCost() returns any other double, convert it to a String\n\t\t// and return it.\n\t\treturn \"\";\n\t}", "private static Circuit buildCircuit(String s, int start, int end){\n int middle = findMiddle(s, start, end);\n if (middle == -1)\n return new SingleResistor(Double.parseDouble(s.substring(start, end)));\n else {\n int aStart = findNextComma(s, start, middle)+1;\n int aEnd = s.charAt(middle-1) == ')'?middle-1:middle;\n Circuit a = buildCircuit(s, aStart, aEnd);\n\n int bStart = middle+1;\n int bEnd = s.charAt(end-1) == ')'?end-1:end;\n Circuit b = buildCircuit(s, bStart, bEnd);\n\n if (s.charAt(start+1) == '-')\n return new SeriesNetwork(a, b);\n else\n return new ParallelNetwork(a, b);\n }\n }", "public abstract String getEdgeSymbol(int vertexIndex, int otherVertexIndex);", "private static String getPriceFromHtml(String html)\n\t{\n\t\tString price = \"\";\n\t\tPattern p = Pattern.compile(SUPERVALU_PRICE_REGEX);\n\t\tMatcher m = p.matcher(html);\n\t\tboolean b = m.matches();\n\t\tif (b)\n\t\t{\n\t\t\tprice = m.group(1);\n\t\t}\n\t\treturn price;\n\t}", "private GraphSprite parseGraph(String str) {\n ParseResult<GraphAST> result = GraphAST.parse(new StringSlice(str));\n if(result.success()) {\n GraphAST grAST = result.getAST();\n Debug.debugln(\"Parse success. Stringified version of result: \\n\" + grAST.stringify());\n return grAST.toGraph();\n }\n else {\n throw new CazgraphException(\"Could not parse graph: \" + result.getMessage());\n }\n }", "private String compute(String str) {\n String array[];\n array=str.split(\" \");\n Stack<Double> s=new Stack<Double>();\n Double a=Double.parseDouble(array[0]);\n s.push(a);\n for(int i=1;i<array.length;i++) {\n if(i%2==1) {\n if(array[i].compareTo(\"+\")==0)\n {\n double b= Double.parseDouble(array[i+1]);\n s.push(b);\n }\n if(array[i].compareTo(\"-\")==0)\n {\n double b= Double.parseDouble(array[i+1]);\n s.push(-b);\n }\n if(array[i].compareTo(\"*\")==0)\n {\n double b= Double.parseDouble(array[i+1]);\n\n double c=s.pop();\n\n c*=b;\n s.push(c);\n\n\n }\n if(array[i].compareTo(\"/\")==0)\n {\n double b= Double.parseDouble(array[i+1]);\n\n double c=s.peek();\n s.pop();\n c/=b;\n s.push(c);\n\n\n }\n }\n }\n double sum=0;\n while(!s.isEmpty()) {\n sum+=s.pop();\n\n }\n String result=String.valueOf(sum);\n return result;\n }", "public static ArrayDeque<String> parseSingle (String inputString) {\n\n //using ArrayDeque here since it does everything and is flexible. Could do a linkedList though..?\n ArrayDeque inputQueue = new ArrayDeque<String>();; //input queue. not sure if i really need this\n ArrayDeque outputQueue = new ArrayDeque<String>();//output queue\n ArrayDeque operatorStack = new ArrayDeque<String>(); //operator stack\n\n //remove spaces\n inputString = inputString.replaceAll(\"\\\\s+\", \"\");\n\n String inputArray[] = inputString.split(\"(?<==>|&|~|\\\\/|<=>)|(?==>|&|~|\\\\/|<=>)\"); //TODO build this regex dynamically from Connective enum\n for (String inputElement: inputArray) {\n inputQueue.add(inputElement);\n }\n\n //convert to rpn form\n //don't worry about parentheses, do later as part of research\n while (!inputQueue.isEmpty()) {\n //check if element is a operator\n if (isOperator((String)inputQueue.peekFirst())) {\n\n //add operator to stack if empty\n if (operatorStack.isEmpty()) {\n operatorStack.addLast(inputQueue.pollFirst());\n\n //while there is an operator on the operatorStack with greater precedence than the current pop that one\n } else if (compare((String)inputQueue.peekFirst(), (String)operatorStack.peekLast()) <= 0) {\n outputQueue.add(operatorStack.pollLast());\n continue; //need to restart loop since may be operatorStack.size() > 1\n } else {\n operatorStack.addLast(inputQueue.pollFirst());\n }\n //operands\n } else {\n outputQueue.add(inputQueue.pollFirst());\n }\n }\n\n //once inputQueue is empty need to finish draining the operators\n while (!operatorStack.isEmpty()) {\n outputQueue.add(operatorStack.pollLast());\n }\n\n //TODO: maybe convert proposition symbol to Horn form\n\n return (outputQueue);\n }", "private double[] obtainSubstring(String s, int mag) {\n double[] result = new double[2];\n\n //Look for magnitude\n int lastPos = 0;\n for(int i = 0; i<(mag + 2); i++) {\n lastPos = s.indexOf(\" \", lastPos+1);\n }\n\n int nextSpace = s.indexOf(\" \", lastPos+1);\n result[1] = Double.parseDouble(s.substring(lastPos+1, nextSpace + 1));\n\n //Look for age\n int firstSpace = s.indexOf(\" \");\n int secondSpace = s.indexOf(\" \", firstSpace+1);\n\n result[0] = Double.parseDouble(s.substring(firstSpace+1, secondSpace + 1));\n\n return result;\n }", "public String toMathString(){\n String string = \"{\\n\" + nrVertices + \",\\n{\\n\";\n boolean firstElem = true;\n for(DEdge edge : edges){\n if(!firstElem){\n string += \",\";\n }\n else{\n firstElem = false;\n }\n string += \"{\" + (edge.getVertex1()+1) + \",\" + (edge.getVertex2()+1) + \"},\" + (edge.getWeight());\n }\n string += \"\\n}\\n}\\n\";\n return string;\n }", "private ArrayList<Double> fromStringToList(String str){\n ArrayList<Double> list = new ArrayList(0);\n int index = 0;\n for (int i = 0 ; i < str.toCharArray().length ; i++){\n if (str.toCharArray()[i] == '$'){\n String task = str.substring(index, i); //will tell when a task ends\n list.add(Double.parseDouble(task));\n index = i+1;\n }\n }\n return list;\n }", "public static KeysValues<String, List<Double>> stringToTwoLists(String text) {\n\t\tList<String> lines = splitLines(text);\n\t\tint keyIndex = 0;\n\t\tList<String> keys = new ArrayList<String>();\n\t\tList<List<Double>> values = new ArrayList<List<Double>>();\n\t\tfor (int i=0; i<lines.size(); i++) {\n\t\t\ttry {\n\t\t\t\tList<String> splitLine = splitWhitespace(lines.get(i));\n\t\t\t\tif (splitLine.size() > 0) {\n\t\t\t\t\tList<Double> lineValues = new ArrayList<Double>();\n\t\t\t\t\tfor (int wordI=1; wordI<splitLine.size(); wordI++) {\n\t\t\t\t\t\tlineValues.add(Double.parseDouble(splitLine.get(wordI)));\n\t\t\t\t\t}\n\t\t\t\t\tkeys.add(splitLine.get(keyIndex));\n\t\t\t\t\tvalues.add(lineValues);\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(\"Skipping entry \"+i+\": \"+lines.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new KeysValues<String, List<Double>>(keys,values);\n\t}", "private static String getPrice(WebElement s) {\n\n\t\treturn s.findElement(By.xpath(\"following-sibling::td[1]\")).getText();\n\n\t}", "public static String[] obtainMetricKeyFrom(String s)\n {\n if(StringUtils.isEmpty(s)) return null;\n \n String rdo[]=new String[4];\n \n int sIdx=s.indexOf(\"[\",0);\n int fpipe=s.indexOf(\"|\", 0);\n if(sIdx<0 || fpipe<0) return null;\n \n rdo[0]=s.substring(sIdx+1,fpipe);\n \n int spipe=s.indexOf(\"|\",fpipe+1);\n if(spipe<0) return null;\n rdo[1]=s.substring(fpipe+1, spipe);\n \n int tpipe=s.indexOf(\"|\", spipe+1);\n if(tpipe<0) return null;\n rdo[2]=s.substring(spipe+1, tpipe);\n \n rdo[3]=s.substring(tpipe+1, s.length()-1);\n \n return rdo;\n }", "public String SplitCurrencyValueString(String str) {\n\t\t\n\t\tString temp = null;\n\t\tPattern pattern;\n\n\t\tif (str.contains(\",\") && str.contains(\".\")) {\n\t\t\tpattern = Pattern.compile(\"(\\\\d{0,9},)?\\\\d{0,9}\\\\.\\\\d{0,9}\");\n\t\t\tMatcher m = pattern.matcher(str);\n\t\t\twhile (m.find()) {\n\t\t\t\tif (!m.group().isEmpty())\n\t\t\t\t\ttemp = m.group().replaceAll(\",\", \"\");\n\t\t\t}\n\t\t} else if (str.contains(\",\")) {\n\t\t\tpattern = Pattern.compile(\"(\\\\d{0,9},)?\\\\d{0,9}\");\n\t\t\tMatcher m = pattern.matcher(str);\n\t\t\twhile (m.find()) {\n\t\t\t\tif (m.group() != null)\n\t\t\t\t\ttemp = m.group().replaceAll(\",\", \"\");\n\t\t\t}\n\t\t} else if (str.contains(\".\")) {\n\t\t\tpattern = Pattern.compile(\"(\\\\d+(?:\\\\.\\\\d+)?)\");\n\t\t\tMatcher m = pattern.matcher(str);\n\t\t\twhile (m.find()) {\n\t\t\t\tif (m.group() != null)\n\t\t\t\t\ttemp = m.group();\n\t\t\t}\n\t\t} else {\n\t\t\tpattern = Pattern.compile(\"(\\\\d+)\");\n\t\t\tMatcher m = pattern.matcher(str);\n\t\t\twhile (m.find()) {\n\t\t\t\tif (m.group() != null)\n\t\t\t\t\ttemp = m.group();\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(temp);\n\t\treturn df.format(Double.parseDouble(temp));\n\n\t}", "private SXTriple summarize(Edge edge, List<String> sentence) {\n return new SXTriple(edge.getSymbol(), edge.getBegin(), sentence.size() - edge.getEnd());\n }", "@SuppressWarnings(\"null\")\n\tpublic static void main(String[] args) throws IOException{\n\t\tScanner sc = new Scanner(Paths.get(\"C:\\\\Users\\\\RIZERO\\\\Desktop\\\\text.txt\"),\"UTF-8\");\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tString s = \"[a-z]*\", word1 = \"\", word2 = \"\";\n\t\tPattern pattern = Pattern.compile(s);\n\t\tMatcher ma;\n\t\tString str;\n\t\tboolean flag1 = true, flag2 = true;\n\t\t\n\t\tList<Vertex> verList = new LinkedList<Graph.Vertex>();\n\n\t\tMap<String, List<Edge>> ve_Map = new HashMap<String, List<Edge>>();\n\n\t\t\n\t\tVertex vertex = null;\n\n\t\twhile(sc.hasNext()) \n\t\t{\n\t str = sc.next().toLowerCase();\n\t ma = pattern.matcher(str);\n\t\t\twhile(ma.find()) \n\t\t\t\tif(!ma.group().equals(\"\"))\n\t\t\t\t list.add(ma.group());\n\t\t}\n\t\t\tfor(String word : list) {\n\t\t\t\tword1 = word2;\n\t\t\t\tword2 = word;\n\t\t\t\tflag1 = true;\n\t\t\t\tflag2 = true;\n\t\t\t\tvertex = new Vertex(word1);\n\t\t\t\tfor(Vertex ver : verList) {\n\t\t\t\t\tif (word1.equals(ver.getName())|| word1.equals(\"\")) {\n\t\t\t\t\t\tflag1 = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n if(flag1) {\n \tvertex = new Vertex(word1);\n\t\t\t\t\tverList.add(vertex);\n\t\t\t\t\tve_Map.put(vertex.getName(), new LinkedList<Graph.Edge>());\n\t\t\t\t}\n \n for(Edge edge : ve_Map.get(word1)) {\n\t\t\t\t\tif (word2.equals(edge.getEnd().getName())) {\n\t\n\t\t\t\t\t\tedge.upWeight();\n\t\t\t\t\t\tflag2 = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n if(flag2 && !(word1.equals(\"\"))) {\n \tvertex = new Vertex(word2);\n \tve_Map.get(word1).add(new Edge(vertex, 1));\n }\t\n\t\t\t}\n\t\t\n\t\tfor(Vertex ver : verList) {\n\t\t\tfor(Edge edge : ve_Map.get(ver.getName())) {\n\t\t\t\tSystem.out.println(ver.getName()+\"->\"+edge.getEnd().getName()+\" = \"+edge.getWeight());\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(list);\n\t\tSystem.out.println(new Date());\n\t\tsc.close();\n\t}", "private static Double grabPriceText(String s_input, String s_label) {\n Pattern dollabillsyall = Pattern.compile(\"[0-9]{1,4}[.][0-9]{0,4}\");\n Matcher matcher = dollabillsyall.matcher(s_input);\n\n if (matcher.find())\n System.out.println(\"=== \" + s_label + \": \" + matcher.group(0));\n else\n System.out.println(\"=== \" + s_label + \": \" + \"no match\");\n\n return Double.parseDouble(matcher.group(0));\n }", "private static String getPriceFromScanner(Scanner scanner)\n\t{\n\t\tString price = NO_PRICE_FOUND;\n\t\twhile (scanner.hasNextLine())\n\t\t{\n\t\t\tfinal String fromHtml = scanner.nextLine();\n\t\t\tif (fromHtml.contains(\"price\"))\n\t\t\t{\n\t\t\t\tprice = getPriceFromHtml(fromHtml);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn price;\n\t}", "public static Map<String, List<Double>> stringToMapList(String text) {\n\t\tList<String> lines = splitLines(text);\n\t\tint keyIndex = 0;\n\t\tHashMap<String, List<Double>> entries = new HashMap<String, List<Double>>();\n\t\tfor (int i=0; i<lines.size(); i++) {\n\t\t\ttry {\n\t\t\t\tList<String> splitLine = splitWhitespace(lines.get(i));\n\t\t\t\tif (splitLine.size() > 0) {\n\t\t\t\t\tList<Double> values = new ArrayList<Double>();\n\t\t\t\t\tfor (int wordI=1; wordI<splitLine.size(); wordI++) {\n\t\t\t\t\t\tvalues.add(Double.parseDouble(splitLine.get(wordI)));\n\t\t\t\t\t}\n\t\t\t\t\tentries.put(splitLine.get(keyIndex), values);\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(\"Skipping entry \"+i+\": \"+lines.get(i));\n\t\t\t}\n\t\t}\n\t\treturn entries;\n\t}", "private void processPath(String str) {\r\n if (str.equals(\"\")) {\r\n return;\r\n }\r\n\r\n int id1 = Integer.valueOf(str.split(\"->\")[0].trim());\r\n int id2 = Integer.valueOf(str.split(\"->\")[1].trim());\r\n Node node1 = null;\r\n Node node2 = null;\r\n\r\n // Find node according to its id\r\n for (Node node : NodeSet) {\r\n if (node.getID() == id1) {\r\n node1 = node;\r\n } else if (node.getID() == id2) {\r\n node2 = node;\r\n }\r\n }\r\n\r\n g.add(new Edge(node1, node2));\r\n }", "public static String formatDescStr(String sInString) throws java.lang.Exception {\n\n\t\t\tStringBuffer sOut = new StringBuffer();\n\t\t\tboolean bBreakFlag = false;\n\n\t\t\tint iLength = 55;\n\n\t\t\ttry {\n\n\t\t\t\tbyte sTemp[] = sInString.getBytes();\n\n\t\t\t\tsInString = new String(sTemp);\n\n\t\t\t\tint iCounter = 1;\n\n\t\t\t\tif (sInString.length() > iLength) {\n\n\t\t\t\t\tfor (int i = 0; i < sInString.length(); i++) {\n\n\t\t\t\t\t\tif (sTemp[i] == (byte) '\\n') {\n\t\t\t\t\t\t\tiCounter = 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (iCounter % iLength == 0) {\n\t\t\t\t\t\t\tbBreakFlag = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (bBreakFlag) {\n\t\t\t\t\t\t\tiCounter = iCounter + 1;\n\t\t\t\t\t\t\tif (sInString.substring(i, i + 1).equals(\",\") || sInString.substring(i, i + 1).equals(\" \") || sInString.substring(i, i + 1).equals(\";\")) {\n\t\t\t\t\t\t\t\tif (!sInString.substring(i, i + 1).equals(\" \")) {\n\t\t\t\t\t\t\t\t\tsOut.append(sInString.substring(i, i + 1));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsOut.append(\"\\n\");\n\t\t\t\t\t\t\t\tbBreakFlag = false;\n\t\t\t\t\t\t\t\tiCounter = 1;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tsOut.append(sInString.substring(i, i + 1));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tiCounter = iCounter + 1;\n\t\t\t\t\t\t\tsOut.append(sInString.substring(i, i + 1));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tsOut.append(sInString);\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\n\t\t\t\tsOut.setLength(0);\n\t\t\t\tsOut.append(sInString);\n\t\t\t} finally {\n\t\t\t\t\n\t\t\t}\n\t\t\treturn sOut.toString();\n\t\t}", "@Test\r\n\tpublic void testGetString() {\r\n\t\tString s = lattice1.getString();\r\n\t\tString ss = \"[10. 6. 4.](12.328828005937952)\"\r\n\t\t\t\t+ \"[7. 11. 5.](13.96424004376894)\"\r\n\t\t\t\t+ \"[6.8 -4. -9.](11.968291440301744)\";\r\n\t\tAssert.assertEquals(\"getString\", s, ss);\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString st1 = \"abcdefg\";\n\t\t\n\t\tString st2 = st1.substring(2);\n\t\tSystem.out.println(st2);\n\t\t\n\t\tString st3 = st1.substring(2, 4);\n\t\tSystem.out.println(st3);\n\t\t\n\t\tdouble e = 2.7777;\n\t\tString se = String.valueOf(e);\n\t\tSystem.out.println(se);\n\t\t\n\t\tint num = 3;\n\t\tdouble nume = Double.valueOf(num);\n\t\tSystem.out.println(nume);\n\t}", "public static void main(String[] args) {\n\t\tString str = \"32+5*2-40/3\";\r\n\t\t/*\r\n\t\tPattern p = Pattern.compile(\"(([0-9]+)(\\\\+\\\\-\\\\*\\\\/)?)+\");\r\n\t\tMatcher m = p.matcher(str);\r\n\t\tSystem.out.println(m.find());\r\n\t\tSystem.out.println(m.groupCount());\r\n\t\tSystem.out.println(m.group(1));\r\n\t\tSystem.out.println(m.group(2));\r\n\t\tSystem.out.println(m.group(3));\r\n\t\t*/\r\n\t\tString[] sub = str.split(\"\\\\+|\\\\-|\\\\*|\\\\/\");\r\n\t\tfor(String s : sub) {\r\n\t\t\tSystem.out.println(s);\r\n\t\t}\r\n\t\t\r\n\t}", "public static String alienOrder(String[] words) {\n if(words.length==0){\n return \"\";\n }\n else if(words.length==1){\n return words[0];\n }\n else{\n HashMap<Character,HashSet<Character>> graph = new HashMap<Character,HashSet<Character>>();\n //Use this array to denote each node's indegree\n int[] indegree = new int[26];\n Arrays.fill(indegree,-1);\n //****Initialize indegree array, '0' means exits****\n for(String x : words){\n for(char c : x.toCharArray()){\n indegree[c-'a'] = 0;\n }\n }\n int first = 0;\n int second = 1;\n //****Build the graph****\n while(second<words.length){\n int minLen = Math.min(words[first].length(),words[second].length());\n for(int i = 0; i<minLen; i++){\n char f = words[first].charAt(i);\n char s = words[second].charAt(i);\n if(f!=s){\n if(graph.containsKey(s)==true){\n HashSet<Character> hs = graph.get(s);\n if(hs.contains(f)==false){\n indegree[f-'a']++;\n hs.add(f);\n graph.replace(s,hs);\n }\n }\n else{\n HashSet<Character> hs = new HashSet<Character>();\n hs.add(f);\n graph.put(s,hs);\n indegree[f-'a']++;\n }\n break;\n }\n }\n first++;\n second++;\n }\n StringBuilder result = new StringBuilder();\n Queue<Character> topo = new LinkedList<Character>();\n int numOfChar = 0;\n for(int i = 0; i<26; i++){\n if(indegree[i]>=0){\n numOfChar++;\n if(indegree[i]==0){\n topo.offer((char)('a'+i));\n } \n }\n }\n if(topo.size()==0){\n return \"\";\n //Means circle exits\n }\n while(topo.size()>0){\n char c = topo.poll();\n result.append(c);\n if(graph.containsKey(c)==false){\n \tcontinue;\n }\n HashSet<Character> hs = graph.get(c);\n for(char x : hs){\n indegree[x-'a']--;\n if(indegree[x-'a']<0){\n return \"\";\n }\n else if(indegree[x-'a']==0){\n topo.offer(x);\n }\n }\n }\n return result.reverse().toString();\n //return result.length()==numOfChar?result.reverse().toString():\"HAHA\";\n }\n }", "private List<String> parse(String str) {\n List<String> res = new ArrayList<>();\n int par = 0;\n StringBuilder sb = new StringBuilder();\n for(char c: str.toCharArray()){\n if(c == '('){\n par++;\n }\n if(c == ')'){\n par--;\n }\n if(par == 0 && c == ' '){\n res.add(new String(sb));\n sb = new StringBuilder();\n }else{\n sb.append(c);\n }\n }\n if(sb.length() > 0){\n res.add(new String(sb));\n }\n return res;\n }", "private String edgesLeavingVertexToString() {\n \n //make empty string\n String s = \"\";\n \n //for loop to go through all vertices; \n for (int j = 0; j < arrayOfVertices.length; j++) {\n \n //if it has any edges...\n if (arrayOfVertices[j].getDegree() > 0) {\n \n //go through its edges\n for (int k = 0; k < arrayOfVertices[j].getDegree(); k++) {\n \n //declare an array list\n ArrayList<Vertex> newArrayList = \n arrayOfVertices[j].getAdjacent();\n \n //add to string: the vertex itself + space + edge + line break\n s += j + \" \" + newArrayList.get(k).getID() + \"\\n\"; \n \n } \n } \n }\n \n //add -1, -1 after all the edges\n s += \"-1 -1\";\n \n return s; \n }", "public Number[] stringToArrayNumberParser(String string) {\n int stringLength = string.length();\n int arrayLength = (int) (stringLength / 3 * 2 + 5);\n Number[] array = new Number[arrayLength];\n int lastFreeArrayIndex = 0;\n int numberBeginIndex = 0;\n int numberEndIndex = 0;\n char currentCharacter;\n Number number;\n int index;\n boolean isFoundNumber = false;\n for (index = 0; index < stringLength; index++) {\n boolean isSeparator = false;\n currentCharacter = string.charAt(index);\n for (int separatorIndex = 0; separatorIndex < allowedSeparators.length; separatorIndex++) {\n if (currentCharacter == allowedSeparators[separatorIndex]) {\n isSeparator = true;\n }\n }\n if (!isSeparator && !isFoundNumber) {\n isFoundNumber = true; //if not a separator and the first digit of the number\n numberBeginIndex = index;\n } else if (isSeparator && isFoundNumber) {\n isFoundNumber = false; //if separator, after the start of the number\n numberEndIndex = index - 1;\n System.out.println(\"length \" + string.length());\n System.out.println(\"begin: \" + numberBeginIndex);\n System.out.println(\"end \" + (numberEndIndex + 1));\n number = Double.parseDouble(string.substring(numberBeginIndex, numberEndIndex + 1));\n addNumberToArrayByIndex(array, number, lastFreeArrayIndex);\n lastFreeArrayIndex++;\n }\n }\n if (isFoundNumber) {\n numberEndIndex = index - 1;\n number = Double.parseDouble(string.substring(numberBeginIndex, numberEndIndex + 1));\n addNumberToArrayByIndex(array, number, lastFreeArrayIndex); //case, where the number is the last element of the string\n lastFreeArrayIndex++;\n }\n return arrayFinalFormation(array, lastFreeArrayIndex);\n }", "private String testString() {\n\t return\n\t \"CPLEX 10.1.0: optimal integer solution; objective 0\\n\" +\n\t \"0 MIP simplex iterations\\n\" +\n\t \"0 branch-and-bound nodes\\n\" +\n\t \"shipping_amount [*,*] (tr)\\n\" +\n\t \"# $1 = Product98464\\n\" +\n\t \"# $2 = Product98783\\n\" +\n\t \"# $4 = Product98989\\n\" +\n\t \"# $6 = Product99172\\n\" +\n\t \"# $7 = Product98911\\n\" +\n\t \"# $8 = Product98970\\n\" +\n\t \"# $9 = Product98991\\n\" +\n\t \"# $10 = Product99022\\n\" +\n\t \"# $11 = Product98803\\n\" +\n\t \": $1 $2 Product98731 $4 Product99036 $6 $7 $8 $9 $10 $11 :\\n\" +\n\t \"=\\n\" +\n\t \"Store65536 9 9 0 9 19 11 11 16 12 12 17\\n\" +\n\t \"Store65583 0 0 0 0 0 0 0 0 0 0 0\\n\" +\n\t \"Store65581 0 0 0 0 0 0 0 0 0 0 0\\n\" +\n\t \"Store65627 0 0 18 0 0 0 0 0 0 0 0\\n\" +\n\t \"Store65542 0 0 0 0 0 0 0 0 0 0 0\\n\" +\n\t \"Store65631 0 0 0 0 0 0 0 0 0 0 0\\n\" +\n\t \"Store65546 0 0 0 0 0 0 0 0 0 0 0\\n\" +\n\t \"Store65625 0 0 0 0 0 0 0 0 0 0 0\\n\" +\n\t \"Store65610 0 0 0 3 4 0 0 0 0 0 0\\n\" +\n\t \"Store65620 0 0 0 0 0 0 0 0 0 0 0\\n\" +\n\t \"Store65603 0 0 0 0 0 0 0 0 0 0 0\\n\" +\n\t \"Store65634 0 1 0 0 0 0 0 0 0 0 222\\n\" +\n\t \";\\n\";\n\t}", "private static String readAll(Reader rd,boolean graph) throws IOException {\n StringBuilder sb = new StringBuilder();\n int cp;\n int count = 0;\n while ((cp = rd.read()) != -1) {\n count++;\n sb.append((char) cp);\n }\n //System.out.println(sb.toString());\n if(graph == false) {\n System.out.println(sb.deleteCharAt(0));\n System.out.println(sb.deleteCharAt(count - 2));\n }\n return sb.toString();\n }", "private String regex(Edge e) {\n return EdgeWriter.toRegex(e, false /* use dot match */);\n }", "public int parsePrice(String goods) {\n return Integer.parseInt(goods.split(\"\\\\s+\")[2]);\n }", "protected static Item parseStringToItem(String str) {\n String[] strList = str.split(\",\");\n if (strList.length != 3) {\n System.err.println(\"File line data is not in the correct format.\");\n return null;\n }\n\n //find the index of the place where the cost numbers start\n Matcher matcher = Pattern.compile(\"\\\\d\").matcher(strList[2]);\n matcher.find();\n int numberIndex = strList[2].indexOf(matcher.group());\n Item item = new Item(Integer.parseInt(strList[0]),\n Double.valueOf(strList[1]),\n strList[2].substring(0, numberIndex).trim(),\n Double.valueOf(strList[2].substring(numberIndex)));\n return item;\n }", "private String filterDecimalString(String string) {\n return string\n .replaceAll(\"[^0-9.]\", \"\")\n .replaceFirst(\"\\\\.\", \"@\")\n .replaceAll(\"\\\\.\", \"\")\n .replaceFirst(\"@\", \".\");\n }", "public List<String> decode(String s) {\n \tint i=0;\n List<String> result = new ArrayList<String>();\n while(i<s.length()){\n int j=i+1;\n while(s.charAt(j)!='[') j++;\n \tString n=s.substring(i, j);\n int t=Integer.valueOf(n);\n System.out.print(t);\n result.add(s.substring(i+n.length()+1, i+n.length()+1+t));\n \n i=i+n.length()+1+t+1;\n }\n return result;\n }", "public String buildDotString(){\n\t\tString ret=\"digraph NFA{\\n\";\n\t\tint numStarts=0;\n\t\tfor (State s : theStates){\n\t\t\tif(s.getAccept())\n\t\t\t\tret+=\"\\t\"+s.getIndex()+\"[shape=doublecircle]\\n\";\n\t\t\tif(s.getStart()){\n\t\t\t\tString startlbl=\"start\"+(numStarts++);\n\t\t\t\tret+=\"\\t\"+startlbl+\"[shape=none,label=\\\"\\\"]\\n\";\n\t\t\t\tret+=\"\\t\"+startlbl+\"->\"+s.getIndex()+\"[color=green]\\n\";\n\t\t\t}\n\t\t\tfor (Object withChar : s.getToStates().keySet()){\n\t\t\t\t//TODO: combine arrows with same from/to\n\t\t\t\tfor (Integer toNode : (ArrayList<Integer>)s.getToStates().get(withChar)){\n\t\t\t\t\t//find similar arrows\n\t\t\t\t\tString arrowName=(String)withChar;\n\t\t\t\t\t/*for (Object otherChar : s.getToStates().keySet()){\n\t\t\t\t\t\tfor (Integer sameNodeIdx : (ArrayList<Integer>)s.getToStates().get(withChar)){\n\t\t\t\t\t\t\tif(sameNodeIdx==toNode) arrowName+=\",\"+otherChar;\n\t\t\t\t\t\t}\n\t\t\t\t\t}*/\n\t\t\t\t\tret+=\"\\t\"+s.getIndex()+\" -> \"+toNode+\"[label=\\\"\"+arrowName+\"\\\"]\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tret+=\"}\";\n\t\treturn ret;\n\t}", "public String toString(){\n String string = \"\" + nrVertices;\n for(DEdge edge : edges){\n string += \"\\n\" + (edge.getVertex1()) + \" \" + (edge.getVertex2());\n }\n return string;\n }", "public static void stringToGene( String gene ){}", "private static String getEdgeLine(\r\n IEdge edge,\r\n char sep) throws Exception\r\n {\r\n String strInfo; // Returned value\r\n\r\n IHalfEdge orientEdge; // Oriented edge\r\n \r\n // We cretae the info fields for the edge,\r\n // using the top-down orientation\r\n \r\n if (edge.getDirect().getEdgeType() == OrientedEdgeType.SuperClassOf)\r\n {\r\n orientEdge = edge.getDirect();\r\n }\r\n else\r\n {\r\n orientEdge = edge.getInverse();\r\n }\r\n \r\n // We creaste the LINE\r\n \r\n strInfo = Integer.toString(orientEdge.getOpposite().getTarget().getID())\r\n + sep\r\n + Integer.toString(orientEdge.getTarget().getID())\r\n + sep + Double.toString(edge.getCondProbability())\r\n + sep + Double.toString(edge.getWeight()) + \"\\n\";\r\n \r\n // We write the titles\r\n \r\n return (strInfo);\r\n }", "public abstract String edgeToStringWithProb(int nodeSrc, int nodeDst, double prob, Set<String> relations);", "public static String getrp(String s){\n char[] arr = s.toCharArray();\n int len = arr.length;\n String out = \"\";\n\n for(int i = 0; i < len; i++){\n char ch = arr[i];\n if(ch == ' ') continue;\n\n // if is operand, add to\n // the output stream directly\n if(ch >= '0' && ch <= '9') {\n out+=ch;\n continue;\n }\n\n //if is '(', push to the stack directly\n if(ch == '(') op.push(ch);\n\n //if is '+' or '-', pop the operator\n // from the stack until '(' and add to\n // the output stream\n //push the operator to the stack\n if(ch == '+' || ch == '-'){\n while(!op.empty() && (op.peek() != '('))\n out+=op.pop();\n op.push(ch);\n continue;\n }\n\n //if is '*' or '/', pop the operator stack and\n // add to the output stream\n // until lower priority or '('\n //push the operator to the stack\n if(ch == '*' || ch == '/'){\n while(!op.empty() && (op.peek() == '*' || op.peek() == '/'))\n out+=op.pop();\n op.push(ch);\n continue;\n }\n\n //if is ')' pop the operator stack and\n // add to the output stream until '(',\n // pop '('\n if(ch == ')'){\n while(!op.empty() && op.peek() != '(')\n out += op.pop();\n op.pop();\n continue;\n }\n }\n while(!op.empty()) out += op.pop();\n return out;\n }", "private List<StockData> parseMultipleStockData(String data) {\n String[] arr = data.split(\";\\n\");\n List<StockData> list = new ArrayList<>();\n for (String sd : arr) {\n list.add(parseStockData(sd));\n }\n return list;\n }", "public static List<Edge<String,String>> findPath(Graph<String,String> temp, String char1, String char2) {\n\t Node<String> firstCharacter = new Node<String>(char1);\n\t Node<String> endCharacter = new Node<String>(char2);\n\t Queue<Node<String>> worklist = new LinkedList<Node<String>>();\n\t Map<Node<String>, List<Edge<String,String>>> nodeToPath = \n\t \t\tnew HashMap<Node<String>, List<Edge<String,String>>>();\n\t \n\t worklist.add(firstCharacter);\n\t nodeToPath.put(firstCharacter, new ArrayList<Edge<String,String>>());\n\t \t \n\t // Uses BFS algorithm here\n\t while(!worklist.isEmpty()) {\n\t \tNode<String> current = worklist.remove();\n\t \tif(current.equals(endCharacter)) {\n\t \t\treturn nodeToPath.get(current);\n\t \t}\n\t \tfor(Edge<String,String> value : temp.getChildren(current)) { \n\t \t\tNode<String> valueChild = value.getChild(); \n\t \t if(!nodeToPath.containsKey(valueChild)) { \n\t \t \tList<Edge<String,String>> newPath = \n\t \t \t\t\tnew ArrayList<Edge<String,String>>(nodeToPath.get(current)); \n\t \t \tnewPath.add(value);\n\t \t \tnodeToPath.put(valueChild, newPath);\n\t \t \tworklist.add(valueChild);\n\t \t }\n\t \t}\n\n\t }\n\t //return pathToString(null, char1, char2);\n\t return null;\n\t}", "String getCitationString();", "private static String parse(final String input) throws IOException {\n\t\tStringBuilder xml = new StringBuilder(\"<veranstaltung>\\n\");\n\t\taddFields(xml, input);\n\t\taddLecturers(xml, input);\n\t\taddDates(xml, input);\n\t\treturn xml.append(\"</veranstaltung>\").toString();\n\t}", "public static Product convertToProduct(String line) {\n String[] row = line.split(\",\");\n Product item = new Product();\n String thisLine;\n for (int i = 0; i < row.length; i++) {\n switch (i) {\n case (0):\n item.category = row[i];\n break;\n case (1):\n item.name = row[i];\n break;\n case (2):\n thisLine = row[i];\n if (thisLine.contains(\"\\\"\")){\n thisLine +=row[++i];\n item.price = Double.parseDouble(thisLine.replaceAll(\"\\\\$\", \"\").replaceAll(\"\\\"\", \"\").replaceAll(\",\",\"\"));\n item.stockNum = Integer.parseInt(row[++i]);\n break;\n }else {\n item.price = Double.parseDouble(row[i].replaceAll(\"\\\\$\", \"\").replaceAll(\"\\\"\", \"\"));\n }\n break;\n case (3):\n item.stockNum = Integer.parseInt(row[i]);\n }\n }\n\n item.id = createID();\n return item;\n }", "public static SpannableStringBuilder parseString(String string){\n if(string == null){\n throw new IllegalArgumentException(\"String parameter in parseString method must not be null.\");\n }\n List<MetaTag> metaTags = getMetaTags(string);\n SpannableStringBuilder sb = new SpannableStringBuilder();\n BufferedReader reader = null;\n String line;\n try{\n reader = new BufferedReader(new StringReader(string));\n while((line = reader.readLine()) != null){\n //Don't show the MetaTags\n //TODO add formatting and detail support from the MetaTags\n for(String s : getCurvedBracketTags(line)){\n line = line.replace(s, \"\");\n }\n int pos = 0;\n String name;\n MetaTag t;\n List<String> squareBrackets = getSquareBracketTags(line);\n for(String s : squareBrackets){\n int i = line.indexOf(s);\n if(i != -1) {\n //Add spaces to position the Chord correctly\n for (int j = 0; j < i; j++) {\n sb.append(\" \");\n }\n name = s.replace(\"[\", \"\").replace(\"]\", \"\").trim();\n sb.append(name);\n t = getDefineTag(metaTags, name);\n if(t != null){\n sb.setSpan(new ChordSpan(getChordFromDefineTag(t)), sb.length() - name.length(),\n sb.length() + name.length(), 0);\n }\n }\n line = line.replace(s, \"\");\n if(pos + 1 == squareBrackets.size()){\n sb.append(System.getProperty(\"line.separator\"));\n }\n pos++;\n }\n sb.append(line + System.getProperty(\"line.separator\"));\n }\n }catch(Exception e){\n e.printStackTrace();\n }finally {\n try{\n if(reader != null){\n reader.close();\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n }\n return sb;\n }", "public static void main(String[] args) {\n String input = \"( ( 1 + sqrt ( 5 ) ) / 2 )\";\n Stack<String> ops = new Stack<String>();\n Stack<Double> vals = new Stack<Double>();\n String[] temps = input.split(\" \");\n for (String temp : temps) {\n\n if (temp.equals(\"(\")) ;\n else if (temp.equals(\"+\")) ops.push(temp);\n else if (temp.equals(\"-\")) ops.push(temp);\n else if (temp.equals(\"*\")) ops.push(temp);\n else if (temp.equals(\"/\")) ops.push(temp);\n else if (temp.equals(\"sqrt\")) ops.push(temp);\n else if (temp.equals(\")\")){\n String op = ops.pop();\n double v = vals.pop();\n if (op.equals(\"+\")) v = vals.pop() + v;\n else if (op.equals(\"-\")) v = vals.pop() - v;\n else if (op.equals(\"*\")) v = vals.pop() * v;\n else if (op.equals(\"/\")) v = vals.pop() / v;\n else if (op.equals(\"sqrt\")) v = Math.sqrt(v);\n vals.push(v);\n }else {\n vals.push(Double.parseDouble(temp));\n }\n }\n System.out.println(vals.pop());\n }", "public static ArrayList<String> toCNF(String str) {\r\n\t\tArrayList<String> front = new ArrayList<String>();\r\n\t\tArrayList<String> back = new ArrayList<String>();\r\n\t\tArrayList<String> result = new ArrayList<String>();\r\n\t\tString[] orign = str.split(\" \");\t\t\r\n\t\tboolean isfront = true;\r\n\t\tfor(int i =0; i < orign.length; i++) {\r\n\t\t\tif(!orign[i].equals(\"=>\") && isfront && !orign[i].equals(\"&\") && !orign[i].equals(\"=>\") ) {\r\n\t\t\t\tfront.add(orign[i]);\r\n\t\t\t}else if(orign[i].equals(\"=>\")) {\r\n\t\t\t\tisfront = false;\r\n\t\t\t}\r\n\t\t\telse if(!orign[i].equals(\"&\") && !orign[i].equals(\"=>\")){\r\n\t\t\t\tback.add(orign[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t for(String s : front) {\r\n\t \tif(isfront == false) {\r\n\t \t\ts = negation(s);\r\n\t \t\tresult.add(s);\r\n\t \t}else {\r\n\t \t\tresult.add(s);\r\n\t \t}\t\t\t\r\n\t\t}\r\n\t\tfor(String s : back) {\r\n\t\t\tresult.add(s);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@Override\n\tpublic ArrayList<BigDecimal> input(String line) {\n\t\tArrayList<BigDecimal> list = new ArrayList<BigDecimal>();\n\t\tfor (String s : line.split(\"\\\\s+\")) {\n\t\t\tBigDecimal num = new BigDecimal(Double.parseDouble(s));\n\t\t\tlist.add(num);\n\t\t}\n\n\t\treturn list;\n\t}", "public static String SimpleSymbols(String str) {\n char curr_char = '0';\n char prev_char = '0';\n char next_char = '0';\n String out_str = \"true\";\n int i = 0;\n boolean parsing_done = false;\n boolean pattern_found = false;\n boolean wrong_pattern_found = false;\n \n if( Character.isLetterOrDigit(str.charAt(0)))\n {\n wrong_pattern_found = true;\n }\n do\n {\n if( str.length() < 3 )\n {\n parsing_done = true;\n }\n else\n {\n int last_index = str.length() - 1;\n if( i + 2 == last_index )\n {\n parsing_done = true;\n //pattern_found = false;\n //System.out.print(\"Check of last index\" + i + last_index ); \n next_char = str.charAt(i+2);\n curr_char = str.charAt(i+1);\n prev_char = str.charAt(i);\n }\n else if( i+2 > last_index )\n {\n parsing_done = true;\n } //pattern_found = false;\n else\n {\n next_char = str.charAt(i+2);\n curr_char = str.charAt(i+1);\n prev_char = str.charAt(i);\n }\n \n if(Character.isLetterOrDigit(curr_char))\n {\n if(prev_char == '+' && next_char == '+')\n {\n i++;\n pattern_found = true;\n }\n else\n {\n wrong_pattern_found = true;\n parsing_done = true;\n }\n }\n else\n {\n i++;\n }\n }\n } while( !parsing_done );\n \n if(wrong_pattern_found )\n {\n out_str = \"false\";\n } \n else if( pattern_found )\n out_str = \"true\";\n else\n out_str = \"false\";\n \n return out_str;\n \n }", "public static String pathToString(Graph<String,String> graph, String char1, String char2) {\n\t\tNode<String> charOne = new Node<String>(char1);\n\t\tNode<String> charTwo = new Node<String>(char2);\n\t\tString result = \"\";\n\t\t\n\t\t// Case for unknown characters\n\t if(!graph.containsNode(charOne) || !graph.containsNode(charTwo)) {\n\t \tif(!graph.containsNode(charOne)) {\n\t \t\tresult += \"unknown character \" + char1;\n\t \t}\n\t \tif(!graph.containsNode(charOne) && !graph.containsNode(charTwo)) {\n\t \t\tresult += System.lineSeparator() + \"unknown character \" + char2;\n\t \t} else if(!graph.containsNode(charTwo)) {\n\t \t\tresult += \"unknown character \" + char2;\n\t \t}\n\t \treturn result;\n\t } else {\n\t \t// If these characters exist\n\t\t\tresult = \"path from \" + char1 + \" to \" + char2 + \":\";\n\t\t\tList<Edge<String,String>> path = findPath(graph, char1, char2);\n\t\t\tif(path == null) {\n\t\t\t\treturn result + System.lineSeparator() + \"no path found\";\n\t\t\t} else if(char1.equals(char2)) {\n\t\t\t\treturn result + System.lineSeparator();// + \"Same character\";\n\t\t\t} else {\n\t\t\t\tString prev = char1;\n\t\t\t\tString current;\n\t\t\t\tfor(int i = 1; i < path.size(); i++) {\n\t\t\t\t\tcurrent = path.get(i).getParent().getData();\n\t\t\t\t\tresult += System.lineSeparator() + prev + \" to \" + current + \" via \"\n\t\t\t\t\t\t\t+ path.get(i-1).getValue();\n\t\t\t\t\tprev = current;\n\t\t\t\t}\n\t\t\t\tString edge = path.get(path.size() - 1).getValue().toString();\n\t\t\t\tresult += System.lineSeparator() + prev + \" to \" + char2 + \" via \" + edge;\n\t\t\t}\n\t }\n\t\treturn result;\n\t}", "public static BigDecimal getPrice(final String ticker, final String exchange) {\n\n try {\n final URL url = new URL(\"http://www.google.com/finance/info?q=\" + exchange + \":\" + ticker);\n\n final BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));\n String s = reader.lines().collect(Collectors.joining());\n s = s.substring(2);//strip of first two forward slash\n\n JsonReader reader1 = Json.createReader(new ByteArrayInputStream(s.getBytes(StandardCharsets.UTF_8)));\n JsonArray array = reader1.readArray();\n String price = array.getJsonObject(0).getString(\"l\");\n return BigDecimal.valueOf(NumberFormat.getInstance().parse(price).doubleValue());\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n\n }", "public static String math_level2(String line){\n int current_index = 0;\n line = \"+\"+line; //Every element must have a sign before so I add a plus as a sign of the first element.\n while(current_index<line.length() && (line.contains(\"*\") || line.contains(\"/\"))){\n char current_char = line.charAt(current_index);\n if(current_char == '*' || current_char =='/'){\n String first_string = reverser(line.substring(0,current_index));\n if (first_string !=\"\") first_string = reverser(first_string.substring(0,finder(first_string)));\n else first_string = line.substring(0,current_index);\n \n char before_sign = line.charAt(current_index-first_string.length()-1); // Sign before an element has an effect on the result so I'm storing it.\n \n String second_string = line.substring(current_index+1);\n second_string = line.substring(current_index+1,current_index+finder(second_string.substring(1))+2);\n \n boolean is_double_first = first_string.contains(\".\");\n boolean is_second_double = second_string.contains(\".\");\n boolean isdouble = is_double_first || is_second_double;\n\n if(isdouble){\n double number1 = Double.parseDouble(first_string);\n double number2 = Double.parseDouble(second_string);\n double result;\n if(current_char=='*') result = number1*number2;\n else result = number1/number2;\n // I'm using two ternary operations to decide on the sign of the result. If both before sign is a minus and the result is negative, I'm replacing it with result*-1\n line = line.substring(0, current_index-first_string.length()-1)+ ((result<0)?((before_sign=='-')?(\"+\"+(result*-1)):(result+\"\")):(before_sign+\"\"+result)) + line.substring(current_index+second_string.length()+1);\n }\n\n else{\n int number1 = Integer.parseInt(first_string);\n int number2 = Integer.parseInt(second_string);\n int result;\n if(current_char=='*') result = number1*number2;\n else result = number1/number2;\n // Same operation as I do in line 155\n line = line.substring(0, current_index-first_string.length()-1)+ ((result<0)?((before_sign=='-')?(\"+\"+(result*-1)):(result+\"\")):(before_sign+\"\"+result)) + line.substring(current_index+second_string.length()+1);\n\n }\n current_index= current_index-first_string.length();// I'm using index as a cursor and moving it a little left instead of making it zero because this is much faster\n }\n current_index++;\n if(!(line.contains(\"*\") || line.contains(\"/\"))) break;// Breaks the while loop if there are no multiplication or division left.\n }\n return line;\n}", "public static void main(String []args) {calcStack<String> cc = new calcStack<String>();\n//\t\t\n//\t\tString s = \"81,37,-211,+,15,-,/\";\n//\t\tdouble rst = cc.calc(s);\n//\t\tSystem.out.println(rst);\n//\t\t\n//\t\t\n\t\tcalcStack<String> cc2 = new calcStack<String>();\n\t\t\n\t\tString s2 = \"20.5,10.2,+,*\";\n\t\tdouble rst = cc2.calc(s2);\n\t\tSystem.out.println(rst);\n\t}", "public static List<Float> extractFloats(String string) {\r\n\t\t\tList<Float> floats = new ArrayList<Float>();\r\n\r\n\t\t\tScanner scanner = new Scanner(string);\r\n\t\t\tscanner.useDelimiter(\"[^\\\\d,]\");\r\n\r\n\t\t\twhile (scanner.hasNextFloat() || scanner.hasNext()) {\r\n\t\t\t\tif (scanner.hasNextFloat()) {\r\n\t\t\t\t\tfloats.add(scanner.nextFloat());\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tscanner.next();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tscanner.close();\r\n\t\t\treturn floats;\r\n\t\t}", "public String getBSCA_PrintPrice2();", "String getSourcesfromUniqueEndpoit(String graph);", "Contract decodeContract(String s, XElem elem)\n { \n StringTokenizer st = new StringTokenizer(s, \" \");\n ArrayList acc = new ArrayList(); \n while(st.hasMoreTokens()) acc.add(decodeRefUri(st.nextToken(), elem));\n return new Contract((Uri[])acc.toArray(new Uri[acc.size()]));\n }", "private int parseExponentString(String str) {\n\t\treturn Integer.parseInt(str.substring(1));\n\t}", "public static double[] getPointFromGeom(String pointString){\n\t\tString sub = pointString.substring(6, pointString.length()-1);\n\t\tString[] split = sub.split(\" \");\n\t\tdouble[] point = new double[2];\n\t\tpoint[0] = Double.parseDouble(split[0]);\n\t\tpoint[1] = Double.parseDouble(split[1]);\n\t\treturn point;\n\t}", "public String getPriceString() {\n\t\treturn Utils.formatCurrencyNumber(price);//Double.toString(price.doubleValue()); //price.toString();\n\t}", "public static String getCalculation(String input) throws IOException, ParseException, IllegalArgumentException\n\t{\n\n\t\tJSONObject data = getJSON(\"http://api.duckduckgo.com/?q=%s&format=json\", input, true);\n\n\t\tif (!data.get(\"AnswerType\").equals(\"calc\"))\n\t\t\tthrow new IllegalArgumentException(\"Result not a calculation: \" + input + \".\");\n\n\t\tString htmlResult = (String) data.get(\"Answer\");\n\n\t\tif (htmlResult.contains(\"<sup>\") && htmlResult.contains(\"</sup>\"))\n\t\t\thtmlResult = htmlResult.replaceAll(\"<sup>\", \" ^ \").replaceAll(\"</sup>\", \"\");\n\n\t\tString strippedResult = new HtmlToPlainText().getPlainText(Jsoup.parse(htmlResult));\n\n\t\tif (strippedResult.endsWith(\"<>\"))\n\t\t\tstrippedResult = strippedResult.replace(\"<>\", \"\");\n\n\t\treturn strippedResult;\n\t}", "public String getPriceText(){\n\t\treturn getPriceElement().getText();\n\t}", "public double parse(String inputString){\n\t\tclear();\n\t\tinput = inputString;\n\t\treturn expr(true);\n\t}", "public String decodeString(String s) {\n String res = \"\";\n Stack<Integer> countStack = new Stack<>();\n Stack<String> resStack = new Stack<>();\n int idx = 0;\n while (idx < s.length()) {\n if (Character.isDigit(s.charAt(idx))) {\n int count = 0;\n while (Character.isDigit(s.charAt(idx))) {\n count = 10 * count + (s.charAt(idx) - '0');\n idx++;\n }\n countStack.push(count);\n }\n else if (s.charAt(idx) == '[') {\n resStack.push(res);\n res = \"\";\n idx++;\n }\n else if (s.charAt(idx) == ']') {\n StringBuilder temp = new StringBuilder (resStack.pop());\n int repeatTimes = countStack.pop();\n for (int i = 0; i < repeatTimes; i++) {\n temp.append(res);\n }\n res = temp.toString();\n idx++;\n }\n else {\n res += s.charAt(idx++);\n }\n }\n return res;\n }", "public abstract String rawGraphToString();", "private HashMap<String, String> getNodeInfo(String input) {\n HashMap<String, String> tmp = new HashMap<>();\n /* mark negative value*/\n if (input.charAt(0) == '-')\n input = input.replaceFirst(\"-\", \"!\");\n\n Pattern pattern = Pattern.compile(\"(sin|cos|tan|atan|log10|log2|sqrt|/|\\\\^|\\\\+|\\\\*|-)\");\n Matcher matcher = pattern.matcher(input);\n if (matcher.find()) {\n String op = input.substring(matcher.start(), matcher.end());\n tmp.put(\"operator\", op);\n switch (op) {\n case \"+\":\n case \"-\":\n case \"*\":\n case \"/\":\n case \"^\":\n String[] a = input.split(\"\\\\\" + op);\n tmp.put(\"arg1\", a[0]);\n tmp.put(\"arg2\", a[1]);\n break;\n case \"sin\":\n case \"cos\":\n case \"tan\":\n case \"atan\":\n case \"log10\":\n case \"log2\":\n case \"sqrt\":\n tmp.put(\"arg1\", input.replace(op, \"\"));\n tmp.put(\"arg2\", null);\n break;\n }\n } else {\n tmp.put(\"operator\", input.replaceFirst(\"!\", \"-\"));\n tmp.put(\"arg1\", null);\n tmp.put(\"arg2\", null);\n }\n return tmp;\n }", "public ArrayList recuperString_to_Array(String lestring){\n int i;\n char restemp;\n String sretemp=\"\";\n Iterator it;\n ArrayList<String>ListTextString=new ArrayList<String>();\n for(i=0;i<lestring.length();i++){\n restemp=lestring.charAt(i);\n sretemp+=restemp;\n switch (lestring.charAt(i)) {\n case '\\n':\n ListTextString.add(sretemp);\n sretemp=\"\";\n break;\n case '\\t':\n sretemp=\"\";\n break;\n }\n }\n it=ListTextString.iterator();\n while (it.hasNext()){\n System.out.println(it.next().toString());\n\n }\n return ListTextString;\n }", "public static Expr parse(String str) {\r\n\t\tExprBinary at = new ExprBinary(null, null); // the root of the tree\r\n\t\tStringBuilder opstore = new StringBuilder(); // stores operator characters\r\n\t\tStringBuilder adder = new StringBuilder(); // stores value characters\r\n\t\tboolean text = false; // whether inside of a string\r\n\r\n\t\tfor (int i = 0; i < str.length(); i++) {\r\n\t\t\tchar c = str.charAt(i);\r\n\t\t\tboolean add = (c != '\\\\'); // whether to add the char to adder. ignore escape char\r\n\t\t\tboolean leftSide = (opstore.length() == 0); // whether on the left side of the binary expression (before the operator)\r\n\t\t\tString adderStr = adder.toString();\r\n\t\t\tString opStr = opstore.toString();\r\n\r\n\t\t\tif (c == '\"') { // string\r\n\t\t\t\tif (i == 0 || str.charAt(i - 1) != '\\\\') {\r\n\t\t\t\t\ttext = !text; // ignore string contents\r\n\t\t\t\t}\r\n\t\t\t} else if (!text) {\r\n\t\t\t\tif (c == ' ') {\r\n\t\t\t\t\tadd = false; // ignore spaces\r\n\t\t\t\t} else if (c == '(') { // grouping or function\r\n\t\t\t\t\tint closeIndex = getExitIndex(str, i);\r\n\t\t\t\t\tString contents = str.substring(i + 1, closeIndex);\r\n\t\t\t\t\tExpr group; // the expression denoted by the parentheses group\r\n\r\n\t\t\t\t\tif (i > 0 && (!isReserved(str.charAt(i - 1)) || str.charAt(i - 1) == ')')) { // function\r\n\t\t\t\t\t\tif (adderStr.isEmpty()) { // function reference call ... func()()\r\n\t\t\t\t\t\t\tExpr leftLink = leftSide ? at.left() : at.right();\r\n\t\t\t\t\t\t\tExprCall rightLink = new ExprCall(null, contents); // a reference call is only a parameter group, null name\r\n\t\t\t\t\t\t\tgroup = new ExprCallChain(leftLink, rightLink);\r\n\r\n\t\t\t\t\t\t} else { // function call\r\n\t\t\t\t\t\t\tif (adderStr.startsWith(\".\")) { // function sub call ... func().subfunc()\r\n\t\t\t\t\t\t\t\tExpr leftLink = leftSide ? at.left() : at.right();\r\n\t\t\t\t\t\t\t\tExprCall rightLink = new ExprCall(adderStr.substring(1), contents);\r\n\t\t\t\t\t\t\t\tgroup = new ExprCallChain(leftLink, rightLink);\r\n\r\n\t\t\t\t\t\t\t} else { // standalone function ... func()\r\n\t\t\t\t\t\t\t\tif (Character.toString(adderStr.charAt(0)).equals(Operator.REF.op)) { // @func()\r\n\t\t\t\t\t\t\t\t\tgroup = new ExprFuncRef(adderStr.substring(1), contents);\r\n\t\t\t\t\t\t\t\t} else { // func()\r\n\t\t\t\t\t\t\t\t\tgroup = new ExprCall(adderStr, contents);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else { // parenthetical grouping\r\n\t\t\t\t\t\tchar cc = (adderStr.length() == 1 ? adderStr.charAt(0) : 0); // operator before parenthesis ... !()\r\n\t\t\t\t\t\tif (isReserved(cc)) { // operation on the group\r\n\t\t\t\t\t\t\tgroup = new ExprUnary(Operator.get(Character.toString(cc)), parse(contents));\r\n\t\t\t\t\t\t} else { // ignore character, not an operator\r\n\t\t\t\t\t\t\tgroup = parse(contents);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// add to tree\r\n\t\t\t\t\tif (leftSide) at.setLeft(group);\r\n\t\t\t\t\telse at.setRight(group);\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t\ti = closeIndex;\r\n\t\t\t\t\tadd = false;\r\n\r\n\t\t\t\t} else if (c == '{') { // array initializer ... {}\r\n\t\t\t\t\tint closeIndex = getExitIndex(str, i);\r\n\t\t\t\t\tExpr arr = new ExprArray(str.substring(i + 1, closeIndex), adderStr);\r\n\r\n\t\t\t\t\tif (adderStr.length() == 1 && isReserved(adderStr.charAt(0))) {\r\n\t\t\t\t\t\t// unary op done on array initializer ... !{}\r\n\t\t\t\t\t\tarr = new ExprUnary(Operator.get(Character.toString(adderStr.charAt(0))), arr);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (leftSide) at.setLeft(arr);\r\n\t\t\t\t\telse at.setRight(arr);\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t\ti = closeIndex;\r\n\t\t\t\t\tadd = false;\r\n\r\n\t\t\t\t} else if (isOp(c)) { // operator\r\n\t\t\t\t\t// add value used in operation to tree\r\n\t\t\t\t\tif (!adderStr.isEmpty()) {\r\n\t\t\t\t\t\tif (leftSide) { // ex: adderStr + ___\r\n\t\t\t\t\t\t\tat.setLeft(parseValue(adderStr));\r\n\t\t\t\t\t\t} else { // ex: (___ + adderStr) + ___\r\n\t\t\t\t\t\t\tat.setRight(parseValue(adderStr));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (opStr.equals(\"\") || (i > 0 && isOp(str.charAt(i - 1)))) { // accumulate operator from adjacent operator characters (ex: != consists of ! and =)\r\n\t\t\t\t\t\tif (!(adderStr.isEmpty() && (opStr + c).equals(\"-\")) && (Operator.get(opStr + c) != null || (opStr.isEmpty() && isOp(c)))) {// if the operator exists, then it is an operator character\r\n\t\t\t\t\t\t\tif (opStr.equals(\"-\") && c == '-') { // this and the above line handle negatives and double negatives\r\n\t\t\t\t\t\t\t\topStr = \"+\";\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\topStr += c;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tadd = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else { // existing operator operation must be added to tree ... in \"(a + b) * c\", \"(a+b)\" must be abstracted-out so we get \"x * c\"\r\n\t\t\t\t\t\tint endIndex = i + 1; // end index of operator\r\n\r\n\t\t\t\t\t\t// get entire operator if operator is more than 1 character long\r\n\t\t\t\t\t\tfor (int i2 = endIndex; i2 < str.length(); i2++) {\r\n\t\t\t\t\t\t\tif (isOp(str.charAt(i2))) endIndex++;\r\n\t\t\t\t\t\t\telse break;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tOperator nextOp = Operator.get(str.substring(i, endIndex)); // second (right-most) operator\r\n\t\t\t\t\t\tat.op = Operator.get(opStr); // first (left-most) operator\r\n\r\n\t\t\t\t\t\t// group values in operation by operator precedence\r\n\t\t\t\t\t\tint p1 = precedence(nextOp); // right-most op\r\n\t\t\t\t\t\tint p2 = precedence(at.op); // left-most op\r\n\r\n\t\t\t\t\t\tif (p1 > p2) { // group around the right-most op\r\n\t\t\t\t\t\t\tExprBinary right = new ExprBinary(at, nextOp);\r\n\t\t\t\t\t\t\tright.setLeft(at.right());\r\n\r\n\t\t\t\t\t\t\tat.setRight(right);\r\n\t\t\t\t\t\t\tat = right;\r\n\r\n\t\t\t\t\t\t} else if (p1 < p2) { // group around the left-most op\r\n\t\t\t\t\t\t\tExprBinary last = at;\r\n\t\t\t\t\t\t\tExprBinary match = at.parent();\r\n\r\n\t\t\t\t\t\t\t// correctly add to the binary tree based on precedence of operators\r\n\t\t\t\t\t\t\twhile (match instanceof ExprBinary && p1 < (p2 = precedence(((ExprBinary) match).op))) {\r\n\t\t\t\t\t\t\t\tlast = match;\r\n\t\t\t\t\t\t\t\tmatch = match.parent();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tExprBinary tr = new ExprBinary(match, nextOp);\r\n\t\t\t\t\t\t\ttr.setLeft(last);\r\n\r\n\t\t\t\t\t\t\tif (match != null) {\r\n\t\t\t\t\t\t\t\tif (last == match.right()) match.setRight(tr);\r\n\t\t\t\t\t\t\t\telse match.setLeft(tr);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tat = tr;\r\n\r\n\t\t\t\t\t\t} else { // group from left to right (equal operator precedence)\r\n\t\t\t\t\t\t\tExprBinary left = new ExprBinary(at, at.op); // group existing values into left node, add right to open right node spot\r\n\t\t\t\t\t\t\tleft.setLeft(at.left());\r\n\t\t\t\t\t\t\tleft.setRight(at.right());\r\n\r\n\t\t\t\t\t\t\tat.op = nextOp;\r\n\t\t\t\t\t\t\tat.setLeft(left);\r\n\t\t\t\t\t\t\tat.setRight(null);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\topStr = nextOp.op;\r\n\t\t\t\t\t\ti = endIndex - 1;\r\n\t\t\t\t\t\tadd = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// store valid value characters\r\n\t\t\tif (add) {\r\n\t\t\t\tadder.append(c);\r\n\r\n\t\t\t\t// if this is the last character, then add the stored value to the tree.\r\n\t\t\t\t// otherwise, would be incorrectly ignored because there is no next operator\r\n\t\t\t\tif (i + 1 == str.length()) {\r\n\t\t\t\t\tif (opstore.length() == 0) {\r\n\t\t\t\t\t\tat.setLeft(parseValue(adder.toString()));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tat.setRight(parseValue(adder.toString()));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// initialize binary tree operator if not done so already\r\n\t\tif (at.op == null) {\r\n\t\t\tat.op = Operator.get(opstore.toString());\r\n\t\t}\r\n\r\n\t\t// after traversing the tree to some point, we need to get back to root so we can return the entire tree\r\n\t\twhile (at.parent() != null) {\r\n\t\t\tat = (ExprBinary) at.parent();\r\n\t\t}\r\n\r\n\t\t// the expression may not actually be a binary operation\r\n\t\tif (at.op == null && at.right() == NULL) {\r\n\t\t\tif (at.left() == NULL) return NULL; // the expression is empty\r\n\t\t\treturn at.left(); // the expression is a single value/unary-operation\r\n\t\t}\r\n\r\n\t\treturn at;\r\n\t}", "String carsFromColor(String color);", "public static String calculateStringEquation(String equation){\r\n //\"(17*(8-7/7))^2+7-3*-6*s90\"\r\n //Validity Check\r\n String numberSymbols = \"-.0123456789\";\r\n String operators = \"*/+^√sdfzcv\";\r\n \r\n //Replace alternate symbols\r\n equation = equation.replace(\",\", \".\");\r\n equation = equation.replace(\"x\", \"*\");\r\n equation = equation.replace(\"%\", \"/100\");\r\n equation = equation.replace(\"\\\\\", \"/\");\r\n \r\n //Insert + in front of -\r\n int c = 1;\r\n String newEquation = \"\" + equation.charAt(0);//Doesnt need to add + to begin\r\n while (c < equation.length()) {\r\n if (equation.charAt(c) == '-' && !operators.contains(\"\"+equation.charAt(c-1))) {\r\n newEquation += \"+\";\r\n }\r\n newEquation += equation.charAt(c);\r\n c++;\r\n }\r\n equation = newEquation;\r\n \r\n\r\n\r\n\r\n //Convert everything to double (eg 2 -> 2.0)\r\n c = 0;\r\n newEquation = \"\";\r\n boolean inNum = false;\r\n while (c < equation.length()) {\r\n if (numberSymbols.indexOf(equation.charAt(c)) != -1) {\r\n if (!inNum) {//Doesnt re read when going over more difficult numbers eg 2342\r\n newEquation += findNextNumber(equation, c-1);//opIndex is the index before next\r\n inNum = true;\r\n }\r\n }else{\r\n inNum = false;\r\n newEquation += equation.charAt(c);\r\n }\r\n c++;\r\n }\r\n equation = newEquation;\r\n //Brackets\r\n while(equation.contains(\"(\") || equation.contains(\")\")) {\r\n int openIndex = equation.indexOf(\"(\");\r\n int openBrackets = 1;\r\n int closedBrackets = 0;\r\n int closeIndex = openIndex + 1;\r\n\r\n while (openBrackets != closedBrackets) {\r\n if (equation.charAt(closeIndex) == '(') {\r\n openBrackets++;\r\n }\r\n if (equation.charAt(closeIndex) == ')') {\r\n closedBrackets++;\r\n }\r\n closeIndex++;\r\n }\r\n\r\n //Rewrite equation and sub in new value\r\n newEquation = \"\";//Reused\r\n if (openIndex != 0) {\r\n newEquation += equation.substring(0, openIndex);\r\n }\r\n newEquation += calculateStringEquation(equation.substring(openIndex+1, closeIndex-1));\r\n if (closeIndex != equation.length()-1) {\r\n newEquation += equation.substring(closeIndex);\r\n }\r\n equation = newEquation;\r\n }\r\n \r\n //Check order\r\n boolean test = checkStringFormula(equation);\r\n if (checkStringFormula(equation)) {\r\n //Trig (Typically in brackets)\r\n while (equation.contains(\"s\")) {\r\n double num1 = findNextNumber(equation,equation.indexOf(\"s\"));\r\n equation = equation.replace(\"s\" + num1, \"\" + (Math.sin(Math.toRadians(num1))));\r\n }\r\n while (equation.contains(\"d\")) {\r\n double num1 = findNextNumber(equation,equation.indexOf(\"d\"));\r\n equation = equation.replace(\"d\" + num1, \"\" + (Math.cos(Math.toRadians(num1))));\r\n }\r\n while (equation.contains(\"f\")) {\r\n double num1 = findNextNumber(equation,equation.indexOf(\"f\"));\r\n equation = equation.replace(\"f\" + num1, \"\" + (Math.tan(Math.toRadians(num1))));\r\n }\r\n while (equation.contains(\"z\")) {\r\n double num1 = findNextNumber(equation,equation.indexOf(\"z\"));\r\n equation = equation.replace(\"z\" + num1, \"\" + Math.toDegrees(Math.asin(num1)));\r\n }\r\n while (equation.contains(\"c\")) {\r\n double num1 = findNextNumber(equation,equation.indexOf(\"c\"));\r\n equation = equation.replace(\"c\" + num1, \"\" + Math.toDegrees(Math.acos(num1)));\r\n }\r\n while (equation.contains(\"v\")) {\r\n double num1 = findNextNumber(equation,equation.indexOf(\"v\"));\r\n equation = equation.replace(\"v\" + num1, \"\" + Math.toDegrees(Math.atan(num1)));\r\n }\r\n //Exponents\r\n while (equation.contains(\"^\")) {\r\n int opIndex = equation.indexOf(\"^\");\r\n double num1,num2;\r\n num1 = findPreviousNumber(equation,opIndex);//Previous number is answer before ^\r\n num2 = findNextNumber(equation,opIndex);\r\n double ans = num1;//Need num1 for replace\r\n\r\n if (num2 == 0) {\r\n ans = 1;\r\n }else{\r\n for (int i = 0; i < num2-1; i++) {\r\n ans*=ans;\r\n }\r\n if (num2 < 0) {\r\n ans = 1/ans;\r\n }\r\n }\r\n String oldNum = \"\" + num1 + equation.charAt(opIndex) + num2;\r\n String newNum = \"\"+ans;\r\n equation = equation.replace(oldNum, newNum);\r\n }\r\n //Roots\r\n while (equation.contains(\"√\")) {\r\n int opIndex = equation.indexOf(\"√\");\r\n double num1,num2;\r\n num1 = findPreviousNumber(equation,opIndex);//Previous number is answer before ^\r\n num2 = findNextNumber(equation,opIndex);\r\n double ans = num1;//Need num1 for replace\r\n\r\n if (num2 == 0) {\r\n throw new ArithmeticException(\"Math error\");\r\n }else{\r\n ans = Math.pow(num2, 1/num1);\r\n }\r\n String oldNum = \"\" + num1 + equation.charAt(opIndex) + num2;\r\n String newNum = \"\"+ans;\r\n equation = equation.replace(oldNum, newNum);\r\n }\r\n //Division\r\n while (equation.contains(\"/\")) {\r\n int opIndex = equation.indexOf(\"/\");\r\n double num1,num2;\r\n num1 = findPreviousNumber(equation,opIndex);//Previous number is answer before ^\r\n num2 = findNextNumber(equation,opIndex);\r\n double ans = num1;//Need num1 for replace\r\n\r\n if (num2 == 0) {\r\n throw new java.lang.ArithmeticException();\r\n }else{\r\n ans = num1/num2;\r\n }\r\n String oldNum = \"\" + num1 + equation.charAt(opIndex) + num2;\r\n String newNum = \"\"+ans;\r\n equation = equation.replace(oldNum, newNum);\r\n }\r\n //Multiplication\r\n while (equation.contains(\"*\")) {\r\n int opIndex = equation.indexOf(\"*\");\r\n double num1,num2;\r\n num1 = findPreviousNumber(equation,opIndex);//Previous number is answer before ^\r\n num2 = findNextNumber(equation,opIndex);\r\n double ans;//Need num1 for replace\r\n\r\n ans = num1*num2;\r\n String oldNum = \"\" + num1 + equation.charAt(opIndex) + num2;\r\n String newNum = \"\"+ans;\r\n equation = equation.replace(oldNum, newNum);\r\n }\r\n //Addition\r\n while (equation.contains(\"+\")) {\r\n int opIndex = equation.indexOf(\"+\");\r\n double num1,num2;\r\n num1 = findPreviousNumber(equation,opIndex);//Previous number is answer before ^\r\n num2 = findNextNumber(equation,opIndex);\r\n double ans;//Need num1 for replace\r\n\r\n ans = num1+num2;\r\n String oldNum = \"\" + num1 + equation.charAt(opIndex) + num2;\r\n String newNum = \"\"+ans;\r\n equation = equation.replace(oldNum, newNum);\r\n }\r\n\r\n return equation;\r\n }else{\r\n throw new AssertionError(\"Incorrect Format\");\r\n }\r\n }", "static Rule parse(String s) {\n var arr = s.split(\" bags contain \");\n var left = arr[0];\n var right = List.of(arr[1].split(\", \"));\n return new Rule(left, right.map(Bags::parse).filter(bag -> bag != null));\n }", "public String toString()\r\n\t{\r\n\t\tString str = \"\";\r\n\t\t\r\n\t\tSortedSet<String> sortedVertices = new TreeSet<String>(this.getVertices());\r\n\t\t\r\n\t\tstr += \"Vertices: \" + sortedVertices.toString() + \"\\nEdges:\\n\";\r\n\t\t\r\n\t\tfor(String vertex : sortedVertices)\r\n\t\t{\r\n\t\t\tif(this.dataMap.containsKey(vertex))\r\n\t\t\t{\r\n\t\t\t\tHashMap<String,Integer> adjMap = this.adjacencyMap.get(vertex);\r\n\t\t\t\t\r\n\t\t\t\tSortedSet<String> sortedKeys = new TreeSet<String>(adjMap.keySet());\r\n\t\t\t\t\r\n\t\t\t\tstr += \"Vertex(\" + vertex + \")--->{\";\r\n\t\t\t\tfor(String adj : sortedKeys)\r\n\t\t\t\t{\r\n\t\t\t\t\tstr += adj +\"=\"+ adjMap.get(adj) +\", \";\r\n\t\t\t\t}\r\n\t\t\t\tstr = str.trim();\r\n\t\t\t\t\r\n\t\t\t\tif(!sortedKeys.isEmpty())\r\n\t\t\t\t{\r\n\t\t\t\t\tStringBuilder s = new StringBuilder(str);\r\n\t\t\t\t\ts.deleteCharAt(str.length()-1);\r\n\t\t\t\t\tstr = s.toString();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tstr+=\"}\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn str;\r\n\t}", "public String decodeString(String s) {\n\t if(s.length() == 0) return \"\";\n\t StringBuilder result = new StringBuilder();\n\n\t int pos=0;\n\t while(pos < s.length()) {\n\t int multiplier = 0;\n\n\t if((s.charAt(pos) >= 'A' && s.charAt(pos) <= 'Z') || (s.charAt(pos) >= 'a' && s.charAt(pos) <= 'z')) {\n\t result.append(s.charAt(pos));\n\t pos++;\n\t } \n\t else if(s.charAt(pos) >= '0' && s.charAt(pos) <= '9') {\n\t int numPos = pos;\n\t while(pos < s.length() && s.charAt(pos) != '[') {\n\t pos++;\n\t }\n\t multiplier = Integer.parseInt(s.substring(numPos, pos));\n\n\t int diff = 1, subStringPos = pos+1;\n\t pos=subStringPos;\n\t while (diff != 0 && pos < s.length()) {\n\t if(s.charAt(pos) == ']') {\n\t diff--;\n\t } else if(s.charAt(pos) == '[') {\n\t diff++;\n\t }\n\t pos++;\n\t }\n\n\t for(int i=0; i<multiplier; i++) {\n\t result.append(decodeString(s.substring(subStringPos, pos-1)));\n\t }\n\t }\n\t }\n\t return result.toString();\n\t}", "private String linkString()\n {\n Iterator<DSAGraphNode<E>> iter = links.iterator();\n String outputString = \"\";\n DSAGraphNode<E> node = null;\n while (iter.hasNext())\n {\n node = iter.next();\n outputString = (outputString + node.getLabel() + \", \");\n }\n return outputString;\n }", "public double[] calculatefitnessvalue(String str) {\t\n\t\tint a = Integer.parseInt(str.substring(0, 5), 2); \n\t\tint b = Integer.parseInt(str.substring(6, 11), 2);\n\t\tint c = Integer.parseInt(str.substring(12, 17), 2);\n\t\tint d = Integer.parseInt(str.substring(18, 23), 2);\n\t\tint e = Integer.parseInt(str.substring(24, 29), 2);\n\t\tint f = Integer.parseInt(str.substring(30, 35), 2);\n\t\tint g = Integer.parseInt(str.substring(36, 41), 2);\n\t\tint h = Integer.parseInt(str.substring(42, 47), 2);\n\t\tint i = Integer.parseInt(str.substring(48, 53), 2);\n\t\tint j = Integer.parseInt(str.substring(54, 59), 2);\n\n\t\tdouble x1 = a * (6.0 - 0) / (Math.pow(2, 6) - 1); //gene of x\n\t\tdouble x2 = b * (6.0 - 0) / (Math.pow(2, 6) - 1); //gene of y\n\t\tdouble x3 = c * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x4 = d * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x5 = e * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x6 = f * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x7 = g * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x8 = h * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x9 = i * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\tdouble x10 = j * (6.0 - 0) / (Math.pow(2, 6) - 1);\n\t\t\n\t\t//the Objective function\n\t\tdouble fitness = 3 - Math.sin(2 * x1) * Math.sin(2 * x1) \n\t\t\t\t+ Math.sin(2 * x2) * Math.sin(2 * x2)\n\t\t\t\t- Math.sin(2 * x3) * Math.sin(2 * x3)\n\t\t\t\t+ Math.sin(2 * x4) * Math.sin(2 * x4)\n\t\t\t\t- Math.sin(2 * x5) * Math.sin(2 * x5)\n\t\t\t\t+ Math.sin(2 * x6) * Math.sin(2 * x6)\n\t\t\t\t- Math.sin(2 * x7) * Math.sin(2 * x7)\n\t\t\t\t+ Math.sin(2 * x8) * Math.sin(2 * x8)\n\t\t\t\t- Math.sin(2 * x9) * Math.sin(2 * x9)\n\t\t\t\t+ Math.sin(2 * x10) * Math.sin(2 * x10);\n\t\t\n\t\tdouble[] returns = { x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, fitness };\n\t\treturn returns;\n\t}", "public String getPriceOfArticle(Document document) {\n\t\tString price = \"\";\n\t\t// <p class=\"price\" itemprop=\"offers\" itemscope \n\t\t// \titemtype=\"http://schema.org/Offer\"><span data-currency=\"EUR\" itemprop=\"price\">€1,698</span></p>\n\t\t// Peut etre sélectionner la div \"details\" avant de chercher les p ? \n\t\tElements priceElements = document.getElementsByClass(\"price\");\n\t\tfor (Element priceElement : priceElements) {\n\t\t\t// Get the name if the item\n\t\t\t// <p class=\"style protect\" itemprop=\"model\">White</p>\n\t\t\tif (priceElement.attr(\"itemprop\").equals(\"price\")) {\n\t\t\t\t// get the inner text of the html tag if we are on the item name \n\t\t\t\treturn price = priceElement.text(); \n\t\t\t}\n\t\t}\n\t\treturn price;\n\t}", "public static void main(String[] args) {\n\t\tString str = \"264*8/+3-\";\n\t\t\n\t\tStack<Integer> val = new Stack<>();\n\t\tStack<String> in = new Stack<>();\n\t\tStack<String> pre = new Stack<>();\n\t\tfor(int i=0;i<str.length();i++) {\n\t\t\tchar ch = str.charAt(i);\n\t\t\tif(ch=='/'||ch=='+'||ch=='-'||ch=='*') {\n\t\t\t\tint val2 = val.pop();\n\t\t\t\tint val1 = val.pop();\n\t\t\t\tint valueVal = operations(val1, val2, ch);\n\t\t\t\tval.push(valueVal);\n\t\t\t\tString v2in = in.pop();\n\t\t\t\tString v1in = in.pop();\n\t\t\t\tString valueIn = \"(\"+v1in+ch+v2in+\")\";\n\t\t\t\tin.push(valueIn);\n\t\t\t\tString v2pre = pre.pop();\n\t\t\t\tString v1pre = pre.pop();\n\t\t\t\tString valuePre = ch+v1pre+v2pre;\n\t\t\t\tpre.push(valuePre);\n\t\t\t}else {\n\t\t\t\tval.push(ch-'0');\n\t\t\t\tin.push(ch+\"\");\n\t\t\t\tpre.push(ch+\"\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(val.pop());\n\t\tSystem.out.println(pre.pop());\n\t\tSystem.out.println(in.pop());\n\t}", "protected double[] readFeature(String s, int dim) {\n\t\tdouble[] feature = new double[dim];\n\t\tStringTokenizer st = new StringTokenizer(s);\n\t\tif(st.countTokens() != dim) {\n\t\t\tSystem.out.println(\"Error in readFeature - number of tokens incorrect \" + st.countTokens() + \" vs \" + dim);\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t// Convert the string in array of double\n\t\tfor(int i=0; i<dim; i++) {\n\t\t\tfeature[i] = Double.parseDouble(st.nextToken());\n\t\t}\n\t\treturn feature;\n\t}", "public List<String> decode(String s) {\n List<String> ans = new ArrayList<String>();\n int l = 0, r = 0;\n while (r < s.length()) {\n while (s.charAt(r) != '@') r++;\n int len = Integer.parseInt(s.substring(l, r++));\n ans.add(s.substring(r, r+len)); \n l = r = r+len;\n }\n \n return ans;\n }", "public static double atof(String s)\n {\n int i = 0;\n int sign = 1;\n double r = 0; // integer part\n // double f = 0; // fractional part\n double p = 1; // exponent of fractional part\n int state = 0; // 0 = int part, 1 = frac part\n\n while ((i < s.length()) && Character.isWhitespace(s.charAt(i)))\n {\n i++;\n }\n\n if ((i < s.length()) && (s.charAt(i) == '-'))\n {\n sign = -1;\n i++;\n }\n else if ((i < s.length()) && (s.charAt(i) == '+'))\n {\n i++;\n }\n\n while (i < s.length())\n {\n char ch = s.charAt(i);\n\n if (('0' <= ch) && (ch <= '9'))\n {\n if (state == 0)\n {\n r = ((r * 10) + ch) - '0';\n }\n else if (state == 1)\n {\n p = p / 10;\n r = r + (p * (ch - '0'));\n }\n }\n else if (ch == '.')\n {\n if (state == 0)\n {\n state = 1;\n }\n else\n {\n return sign * r;\n }\n }\n else if ((ch == 'e') || (ch == 'E'))\n {\n long e = (int) parseLong(s.substring(i + 1), 10);\n\n return sign * r * Math.pow(10, e);\n }\n else\n {\n return sign * r;\n }\n\n i++;\n }\n\n return sign * r;\n }", "private List<Item> extractItems(String input) {\n String[] i = input.split(\" \");\n List<Item> items = new ArrayList<>();\n\n for(String s: i) {\n int itemNo = extractItemNo(s);\n double weight = extractWeight(s);\n int price = extractCost(s);\n items.add(new Item(itemNo, weight, price));\n }\n\n items.sort(Comparator.comparingDouble(Item::getWeight));\n return items;\n }", "public static void parseEdge(String[] list)\n {\n for (int i = 0; i < list.length; i++) {\n String element = list[i].replace(\" \", \"\");\n if (element.length() > 4) {\n throw new RuntimeException(\"element not handled\");\n }\n Graph.getNode(element.substring(0, 1)).addDestination(\n Graph.getNode(element.substring(1,2)),\n Integer.parseInt(element.substring(2))\n );\n }\n return;\n }", "private static List<Double> getNumbers(String exp) {\n\t\tList<Double> numbers = new ArrayList<Double>();\n\t\t//3-3.4*3/2.5*@3\n\t\texp = getExp(exp);//把表达式中-符号 转成@\n\t\tString[] split = exp.split(\"[\\\\+\\\\-\\\\*/]\");\n\t\tfor (String s : split){\n\t\t\tif (s.charAt(0) == '@') {\n\t\t\t\ts = \"-\" + s.substring(1);\n\t\t\t}\n\t\t\tnumbers.add(Double.parseDouble(s));\n\t\t}\n\t\treturn numbers;\n\t}", "public void loadClusterInfoString(String inputStr, String delimiter, String subDelimiter)\n\t{\n\t\tm_numericValueList = new HashMap<Integer, PDF_Features>();\n\t\tm_nominalValueList = new HashMap<Integer, HashMap<String,Double>>();\n\t\t\n\t\tString tokens[] = inputStr.split(delimiter);\n\t\t\n\t\tm_clusterId = Integer.parseInt(tokens[0]);\n\t\t\n\t\tfor(int i=1; i<tokens.length; i++)\n\t\t{\n\t\t\tint attrIndex = Integer.parseInt(tokens[i++]);\n\t\t\tString attrValue = tokens[i];\n\t\t\t\n\t\t\tString subTokens[] = attrValue.split(subDelimiter);\n\n if(CommonMethods.isNumeric(subTokens[0]))\n\t\t\t{\n\t\t\t\tPDF_Features value = new PDF_Features();\n\t\t\t\tvalue.average = Double.parseDouble(subTokens[0]);\n\t\t\t\tvalue.variance = Double.parseDouble(subTokens[1]);\n\n m_numericValueList.put(attrIndex, value);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tHashMap<String, Double> valueMap = new HashMap<String, Double>();\n\t\t\t\tfor(int k=0; k<subTokens.length; k++)\n\t\t\t\t{\n\t\t\t\t\tString subKey = subTokens[k++];\n\t\t\t\t\tdouble subValue = Double.parseDouble(subTokens[k]);\n\t\t\t\t\tvalueMap.put(subKey, subValue);\n\t\t\t\t}\n\t\t\t\tm_nominalValueList.put(attrIndex, valueMap);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t\tpublic java.math.BigDecimal convert(String s) {\n\t\t\treturn new java.math.BigDecimal(s);\n\t\t}", "public DNode(String s) {\n\t\tString[] parts = s.split(\" @ \");\n\t\tString[] params = parts[0].split(\", \");\n\t\tthis.key = Integer.parseInt(params[0]);\n\t\tthis.location = new Point3D(params[1]);\n\t\tthis.weight = Double.parseDouble(params[2]);\n\t\tthis.info = params[3];\n\t\tthis.tag = Integer.parseInt(params[4]);\n\n\t\tif (parts.length > 1) {\n\t\t\tString[] edges = parts[1].split(\" # \");\n\t\t\tfor (String string : edges) {\n\t\t\t\tDEdge e = new DEdge(string);\n\t\t\t\tif (e.getSrc() == getKey())\n\t\t\t\t\tput(e.getDest(), e);\n\t\t\t\telse\n\t\t\t\t\tthrow new RuntimeException(\"Edge src is \" + e.getSrc() + \" but source node key is \" + getKey());\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.6071164", "0.5997653", "0.58019704", "0.5525655", "0.5496686", "0.535629", "0.523552", "0.52233106", "0.5070715", "0.50591904", "0.5028186", "0.4969273", "0.49488854", "0.4940089", "0.4937746", "0.4933046", "0.48715684", "0.4864091", "0.48590943", "0.4854915", "0.48518366", "0.48234344", "0.47962275", "0.47929955", "0.47842085", "0.47820157", "0.47729045", "0.47431865", "0.47214836", "0.47198975", "0.47111523", "0.47089684", "0.47064883", "0.46914995", "0.46876216", "0.46488857", "0.46409807", "0.46404848", "0.46326053", "0.46283165", "0.46142483", "0.46039414", "0.45996663", "0.45970264", "0.45956132", "0.45752507", "0.45730543", "0.45691895", "0.45687595", "0.45638365", "0.4561588", "0.45571378", "0.45466664", "0.4538548", "0.45277044", "0.45223674", "0.45128408", "0.4511775", "0.45071143", "0.45020494", "0.4500813", "0.44939297", "0.44892403", "0.4480846", "0.4476504", "0.4473237", "0.44726026", "0.44710213", "0.4470374", "0.4469541", "0.44650257", "0.44638652", "0.4454826", "0.44517505", "0.4450772", "0.4447636", "0.4432639", "0.44311365", "0.44292906", "0.4424414", "0.4422164", "0.44213027", "0.44188583", "0.44178987", "0.44168612", "0.4414265", "0.44124135", "0.44065738", "0.43919918", "0.43896487", "0.437632", "0.43722937", "0.43681", "0.4365395", "0.43646497", "0.43624252", "0.4361547", "0.4359788", "0.43591493", "0.43549165", "0.4349347" ]
0.0
-1
///////////////////////////////////////////////////////////////////////////// DANGER ZONE // everything below is used for grading // please do not change :) // /////////////////////////////////////////////////////////////////////////////
public Heap getHeap() { return minHeap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void assignIntoGrade() {\n }", "private void kk12() {\n\n\t}", "String grade(int marks);", "public void gpaConverter() {\r\n\t\tdouble numGPA = this.getNumGrade();\r\n\t\ttry {\r\n\t\t\tif (numGPA >= 4.0) {\r\n\t\t\t\tthis.letterGrade = \"A\"; }\r\n\t\t\tif (3.7 <= numGPA && numGPA < 4.0) {\r\n\t\t\t\tthis.letterGrade = \"A-\"; \r\n\t\t\t}\r\n\t\t\tif (3.3 <= numGPA && numGPA < 3.7) {\r\n\t\t\t\tthis.letterGrade = \"B+\";\r\n\t\t\t}\r\n\t\t\tif (3.0 <= numGPA && numGPA < 3.3) {\r\n\t\t\t\tthis.letterGrade = \"B\";\r\n\t\t\t}\r\n\t\t\tif (2.7 <= numGPA && numGPA < 3.0) {\r\n\t\t\t\tthis.letterGrade = \"B-\";\r\n\t\t\t}\r\n\t\t\tif (2.3 <= numGPA && numGPA < 2.7) {\r\n\t\t\t\tthis.letterGrade = \"C+\";\r\n\t\t\t}\r\n\t\t\tif (2.0 <= numGPA && numGPA < 2.3) {\r\n\t\t\t\tthis.letterGrade = \"C\";\r\n\t\t\t}\r\n\t\t\tif (1.7 <= numGPA && numGPA < 2.0) {\r\n\t\t\t\tthis.letterGrade = \"C-\";\r\n\t\t\t}\r\n\t\t\tif (1.3 <= numGPA && numGPA < 1.7) {\r\n\t\t\t\tthis.letterGrade = \"D+\";\r\n\t\t\t}\r\n\t\t\tif (1.0 <= numGPA && numGPA < 1.3) {\r\n\t\t\t\tthis.letterGrade = \"D\";\r\n\t\t\t}\r\n\t\t\tif (0.7 <= numGPA && numGPA < 1.0) {\r\n\t\t\t\tthis.letterGrade = \"D-\";\r\n\t\t\t}\r\n\t\t\tif (0.0 <= numGPA && numGPA < 0.7) {\r\n\t\t\t\tthis.letterGrade = \"F\";\r\n\t\t\t} \r\n\t\t}\r\n\t\tcatch (InputMismatchException e) {\r\n\t\t\tSystem.out.print(\"Input Mismatch Exception \");\r\n\t\t}\r\n\t\tcatch (NumberFormatException e) {\r\n\t\t\tSystem.out.print(\"Number Format Exception \");\r\n\t\t}\r\n\t\tcatch (Exception e) {}\r\n\t}", "public void main(String[] args) {\n\t\t\t\tint Year = 2000; // leap\n\t\t\t\tboolean LeapYear = Year % 4 == 0;\n\t\t\t\t\n\t\t\t\tif(LeapYear) {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Year \"+Year+\" is a leap year\");\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Year \"+Year+\" is NOT a leap year\");\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 2. grade calculator\n\t\t\t\t\t \tA => 90 ~ 100 \n\t\t\t\t\t \tB => 80 ~ 89\n\t\t\t\t\t \tC => 70 ~ 79\n\t\t\t\t\t \tD => 60 ~ 69\n\t\t\t\t\t \tF => 0 ~ 59\n\t\t\t\t\t \t\n\t\t\t\t\t \t\n\t\t\t\t \n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tint grade = 99;\n\t\t\t\tboolean A = grade >= 90 && grade <= 100;\n\t\t\t\tboolean B = grade >= 80 && grade <= 89;\n\t\t\t\tboolean C = grade >= 70 && grade <= 79;\n\t\t\t\tboolean D = grade >= 60 && grade <= 69;\n\t\t\t\tboolean ValidGrade = grade >=0 && grade <= 100;\n\t\t\t\n\t\t\t\n\t\t\t\t// in order to multi-brach if gets executed, first ValidGrade has to be true\n\t\t\tif(ValidGrade)\t{\n\t\t\t\tif(A) { // 100 >= grade >= 90\n\t\t\t\t\tSystem.out.println(\"You made A\");\n\t\t\t\t}\n\t\t\t\telse if(B) { // 90> grade >= 80\n\t\t\t\t\tSystem.out.println(\"You made B\");\n\t\t\t\t}\n\t\t\t\telse if(C) { // 80> grade >= 70\n\t\t\t\t\tSystem.out.println(\"You made C\");\n\t\t\t\t}\n\t\t\t\telse if(D) { // 70> grade >= 60\n\t\t\t\t\tSystem.out.println(\"You made D\");\n\t\t\t\t}\n\t\t\t\telse{ // 0 =< grade < 60 \n\t\t\t\t\tSystem.out.println(\"You made F\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else { // grade <0 || grade > 100\n\t\t\t\tSystem.out.println(\"Invalid grade\");\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t/*\n\t\t\t\t \n\t\t\t\t declare an int variable called Age\n\t\t\t\t declare a boolean variable \"GoodPerson\"\n\t\t\t\t \n\t\t\t\t if goodperson is false:\n\t\t\t\t\t\t age >= 18 => cigra\n\t\t\t\t\t\t age >= 21 => Hookah\n\t\t\t\t\t\t age >= 25 => alcohol\n\t\t\t\t\t\t \n\t\t\t\t\t\t age < 18 => milk\n\t\t\t\t\t\t \n\t\t\t\telse \n\t\t\t\t// bad for your health\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\tint age =21;\n\t\t\tboolean GoodPerson = false;\n\t\t\t\t\n\t\t\tif( age >= 18) {\n\t\t\t\n\t\t\t\tif(GoodPerson) {\n\t\t\t\t\tSystem.out.println(\"Alcohol is bad for your health\");\n\t\t\t\t}\n\t\t\t\telse { // GoodPerson=false, && age >=18\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"You can buy Cigrates\");\n\t\t\t\t\tif(age>=21) {\n\t\t\t\t\t\tSystem.out.println(\"You can buy Hookah\");\n\t\t\t\t\t}\n\t\t\t\t\tif(age >= 25) {\n\t\t\t\t\t\tSystem.out.println(\"You can buy Alcohol\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"buy milk\");\n\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\n\t\t}", "public void gored() {\n\t\t\n\t}", "public char Grading(RegCourse a){\n\t\t//CODE HERE\n\t\t\t\t\tif(a.getAccumScore()>=0.8&&a.getAccumScore()<=1){\n\t\t\t\t\t\t\n\t\t\t\t\t\ta.setGrade(4.00);\n\t\t\t\t\t\treturn 'A';\n\t\t\t\t\t}else if(a.getAccumScore()>=0.7&&a.getAccumScore()<0.8){\n\t\t\t\t\t\t\n\t\t\t\t\t\ta.setGrade(3.00);\n\t\t\t\t\t\treturn 'B';\n\t\t\t\t\t}else if(a.getAccumScore()>=0.6&&a.getAccumScore()<0.7){\n\t\t\t\t\t\t\n\t\t\t\t\t\ta.setGrade(2.00);\n\t\t\t\t\t\treturn 'C';\n\t\t\t\t\t}else if(a.getAccumScore()>=0.5&&a.getAccumScore()<0.6){\n\t\t\t\t\t\t\n\t\t\t\t\t\ta.setGrade(1.00);\n\t\t\t\t\t\treturn 'D';\n\t\t\t\t\t}else {\n\t\t\t\t\t\t\n\t\t\t\t\t\ta.setGrade(0.00);\n\t\t\t\t\t\treturn 'F';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\n\t\t\n\t}", "private static void print_Assignment(Gradebook gradebook, String[] flags) {\n //sort grades highest to lowest\n if (flags[3] != null && flags[3].equals(\"G\")) {\n List<Student> studentList = gradebook.getAllStudents();\n Map<Integer, Set<Student>> gradeToName = new HashMap<Integer, Set<Student>>();\n Set<Integer> grades = new HashSet<Integer>();\n\n for(Student s : studentList){\n Assignment assign = gradebook.getAssignment(flags[0]);\n Map<Assignment, Integer> gradeMap = gradebook.getStudentGrades(s);\n Integer grade = gradeMap.get(assign);\n\n Set<Student> studs = gradeToName.get(grade);\n if(studs == null){\n\n studs = new HashSet<Student>();\n }\n\n studs.add(s);\n gradeToName.put(grade, studs);\n grades.add(grade);\n }\n\n List<Integer> sortedList = new ArrayList<Integer>(grades);\n Collections.sort(sortedList, Collections.reverseOrder());\n\n for(Integer i : sortedList){\n Set<Student> studs = gradeToName.get(i);\n for(Student s : studs)\n System.out.println(\"(\" + s.getLast() + \", \" + s.getFirst() + \", \" + i + \")\");\n }\n\n // sort display aplhabetically\n } else if (flags[4] != null && flags[4].equals(\"A\")){\n //compare override class at bottom of file\n List<Student> studentsAlpha = gradebook.getAllStudents();\n Collections.sort(studentsAlpha, new Comparator<Student>() {\n @Override\n public int compare(Student o1, Student o2) {\n if ( o2.getLast().compareToIgnoreCase(o1.getLast()) == 0) {\n return o1.getFirst().compareToIgnoreCase(o2.getFirst());\n } else {\n return o1.getLast().compareToIgnoreCase(o2.getLast());\n }\n }\n });\n\n for (Student stud: studentsAlpha) {\n // flags[0] should be assign name\n System.out.println(\"(\" + stud.getLast() + \", \" + stud.getFirst() + \", \" + gradebook.getPointsAssignment(stud, gradebook.getAssignment(flags[0])) + \")\");\n }\n\n } else {\n throw new IllegalArgumentException(\"Please specify if you want the display to be alphabetical or by grades highest to lowest.\");\n }\n return;\n }", "private static void print_Final(Gradebook gradebook, String[] flags){\n if (flags[3] != null && flags[3].equals(\"G\")){\n List<Student> studentsList = gradebook.getAllStudents();\n //Map<Student, Double>\n Map<Double, List<Student>> grades = new HashMap<Double, List<Student>>();\n Set<Double> gradeSet = new HashSet<Double>();\n\n for(Student s : studentsList){\n double grade = gradebook.getGradeStudent(s);\n List<Student> studs = grades.get(grade);\n\n if(studs == null){\n studs = new ArrayList<Student>();\n }\n\n studs.add(s);\n grades.put(grade, studs);\n gradeSet.add(grade);\n }\n\n List<Double> gradeList = new ArrayList<Double>(gradeSet);\n Collections.sort(gradeList, Collections.reverseOrder());\n\n DecimalFormat df = new DecimalFormat(\"#.####\"); //Round to 4 decimal places\n df.setRoundingMode(RoundingMode.HALF_UP);\n for(Double d : gradeList){\n\n List<Student> studs = grades.get(d);\n for(Student s : studs){\n\n System.out.println(\"(\" + s.getLast() + \", \" + s.getFirst() + \", \" + df.format(d) + \")\");\n }\n }\n } else if (flags[4] != null && flags[4].equals(\"A\")){\n //compare override class at bottom of file\n List<Student> studentsAlpha = gradebook.getAllStudents();\n Collections.sort(studentsAlpha, new Comparator<Student>() {\n @Override\n public int compare(Student o1, Student o2) {\n if ( o2.getLast().compareToIgnoreCase(o1.getLast()) == 0) {\n return o1.getFirst().compareToIgnoreCase(o2.getFirst());\n } else {\n return o1.getLast().compareToIgnoreCase(o2.getLast());\n }\n }\n });\n\n DecimalFormat df = new DecimalFormat(\"#.####\"); //Round to 4 decimal places\n df.setRoundingMode(RoundingMode.HALF_UP);\n for (Student stud: studentsAlpha) {\n System.out.println(\"(\" + stud.getLast() + \", \" + stud.getFirst() + \", \" + df.format(gradebook.getGradeStudent(stud)) + \")\");\n }\n\n }\n else{\n throw new IllegalArgumentException(\"Grade or Alphabetical flag missing.\");\n }\n return;\n }", "public static void main(String[]args){\n\t\tScanner s = new Scanner(System.in);\n\t\tint kor=0,eng=0,math=0,total=0,avg=0;\n\t\tString grade = \"\";\n\t\t\n\t\tSystem.out.print(\"name :\");\n\t\tString name = s.next();\n\t\tSystem.out.print(\"kor :\");\n\t\tkor = s.nextInt();\n\t\tSystem.out.print(\"eng :\");\n\t\teng = s.nextInt();\n\t\tSystem.out.print(\"math :\");\n\t\tmath = s.nextInt();\n\t\t\n\t\ttotal = kor+eng+math;\n\t\tavg = total/3;\n\t\t\n\t\tif(avg>89 && avg<=100){\n\t\t\tgrade = \"A\";\n\t\t}\n\t\telse if(avg>79 && avg<=89){\n\t\t\tgrade = \"B\";\n\t\t}\n\t\telse if(avg>69&& avg<=79){\n\t\t\tgrade = \"C\";\n\t\t}\n\t\telse if(avg>59&& avg<=69){\n\t\t\tgrade = \"D\";\n\t\t}\n\t\telse if(avg>0 && avg<=59){\n\t\t\tgrade = \"E\";\n\t\t}\n\t\telse{\n\t\t\tgrade = \"error\";\n\t\t}\n\t\tSystem.out.print(\"************************************\\n\");\n\t\tSystem.out.print(\" 이름 총점 평균 등급\\n\");\n\t\tSystem.out.print(\"------------------------------------\\n\");\n\t\tSystem.out.print(String.format(\"|%s | %d | %d | %s |\\n\",name,total,avg,grade));\n\t\tSystem.out.print(\"************************************\");\n\t\t//System.out.print(String.format(\"%s:%s\",name,grade));\n\t\t\n\t}", "public static int grading(int a){\n if (a<=60) {\n System.out.println (\"F\");\n }\n else if (a<=70) {\n System.out.println (\"D\");\n }\n else if (a<=80) {\n System.out.println (\"C\");\n }\n else if (a<=90) {\n System.out.println (\"B\");\n }\n else if (a<=100) {\n System.out.println (\"A\");\n }\n else {\n System.out.println (\"You have gotten a grade greater than 100, you are a true ling ling\");\n }\n\n return a;\n\n }", "@Override\n\tpublic void view(int grGrade, int lessGrade) {\n\n\t}", "@Override\n\tpublic void view(int intGrade) {\n\n\t}", "public double getGPA(){\n if (grade == \"F-\")\n gpa =0.0 ;\n else if (grade == \"D\")\n gpa =1.0 ;\n else if (grade == \"C\")\n gpa =2.0 ;\n else if (grade == \"C+\")\n gpa =2.5 ;\n else if (grade == \"B\")\n gpa =3.0 ;\n else if (grade == \"B\")\n gpa =3.5 ;\n else if (grade == \"A\")\n gpa =4.0 ;\n return gpa;\n}", "public static void main(String[] args) {\nString name= \"이말자\";\n\nint korean= 90;\nint english= 100;\nint math= 90;\n\ndouble sum= korean+english+math;\ndouble avg= sum/3;\n\nString grade;\n\n\tif(avg >= 90) { \n\t\tgrade =\"A\";\n\t}else if(avg >= 80){\n\t\tgrade =\"B\";\n\t}else if(avg >= 70){\n\t\tgrade= \"C\";\n\t}else if(avg >= 60){\n\t\tgrade=\"D\";\n\t}else {\n\t\tgrade=\"F\";\n\t}\n\t\tSystem.out.println(\"이름 국어 영어 수학 총점 평균 등급 \");\n\t\tSystem.out.printf(\"%s %d %d %d %.0f %.2f %s \\n\",\n\t\t\t\t name, korean,english,math,sum,avg,grade);\n\t\t\n\t\t\n\t}", "public String getGrade(){\n if (avgQuizzes <= 59.49)\n grade = \"F-\";\n else if (avgQuizzes <= 69.49)\n grade = \"D\";\n else if (avgQuizzes <= 74.49)\n grade = \"C\";\n else if (avgQuizzes <= 79.49)\n grade = \"C+\";\n else if (avgQuizzes <= 84.49)\n grade = \"B\";\n else if (avgQuizzes <= 89.49)\n grade = \"B\";\n else if (avgQuizzes <= 100.59)\n grade = \"A\";\n return grade;\n}", "public void skystonePos4() {\n }", "public void mo4359a() {\n }", "private void level7() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\n\t\t\n\t ICCChamp2017();\n\t System.out.println(\"England\");\n\t FinalIndVsPAk();\n\t System.out.println(\"Finals India Lifted ICC 2017\");\n\t \n\t\tFirstUmpieRevire();\n\t\tSystem.out.println(\"Simon Taufel First Umpier Reviews the Score Board\");\n\t SecondUmpireReview();\n\t System.out.println(\"Billy Bowden Second Umpier Reviews the Score Board\");\n\t ThridUmpireReview();\n\t System.out.println(\"David Shepard Thrid Umpier Reviews the Score Board\");\n\t \n\t \n\t Firstcommentary();\n\t System.out.println(\"Ravi is the commentary\");\n\t Secondcommentary();\n\t System.out.println(\"Gavaskar is the commentary\");\n\t \n\t \n\t \n\t \n\t\t\n\t\t\n\t\tint Dhoni, Rahul, Sachin,Kholi;\n\t System.out.println(\"Enter four Batsman Score Display the Mini Score Of the Batsman \");\n\t in = new Scanner(System.in);\n\t \n\t \n\t \n\t \n\t Dhoni = in.nextInt();\n\t Kholi = in.nextInt();\n\t Rahul = in.nextInt();\n\t Sachin = in.nextInt();\n\t \n\t if ( Dhoni <= Kholi && Dhoni <= Rahul && Dhoni <= Sachin )\n\t System.out.println(\"Dhoni is the Mini Scored Btsmans.\");\n\t else\n\t \t if ( Kholi <= Dhoni && Kholi <= Rahul && Kholi <= Sachin )\n\t System.out.println(\"Kholi is the Min Scored Batsmans .\");\n\t else if ( Rahul <= Dhoni && Rahul <= Kholi && Rahul <= Sachin )\n\t System.out.println(\"Rahul is the Min Scored Batsmans.\");\n\t else if ( Sachin <= Dhoni && Sachin <= Kholi && Sachin <= Rahul ) \n\t \t System.out.println(\"Sachin is the Min Scored Batsmans.\"); \n\t else \n\t System.out.println(\"Every one Scored 0 Duck\");\n\t \n\t \n\t int Sami,Irfan, Jaffar,Imran;\n\t System.out.println(\"Enter four Blowers Who Taken Wickets Display the Mini Wickets Of the Match\");\n\t \n\t \n\t \n\t \n\t \n\t Sami = in.nextInt();\n\t Irfan = in.nextInt();\n\t Jaffar = in.nextInt();\n\t Imran = in.nextInt();\n\t \n\t if ( Sami <= Irfan && Sami <= Jaffar && Sami <= Imran )\n\t System.out.println(\"Sami is the Mini Scored Btsmans.\");\n\t else\n\t \t if ( Imran <= Irfan && Imran <= Jaffar && Imran <= Sami )\n\t System.out.println(\"Imran is the Min Scored Batsmans .\");\n\t else if ( Irfan <= Sami && Irfan <= Jaffar && Irfan <= Imran )\n\t System.out.println(\"Irfan is the Min Scored Batsmans.\");\n\t else if (Jaffar <= Irfan && Jaffar <= Jaffar &&Jaffar <= Imran ) \n\t \t System.out.println(\"Jaffar is the Min Scored Batsmans.\"); \n\t else \n\t System.out.println(\"No on Taken Wickets\");\n\t \n\t \n\t \n\t \n\t\t \n\t}", "public void mo38117a() {\n }", "protected abstract boolean gradeable();", "public double introJava(double ass1,double ass2,double ass3,double ass4,double ass5){\n double a = ((5%100)*ass1)/100;\n double b = ((20%100)*ass2)/100;\n double c = ((20%100)*ass3)/100;\n double d = ((25%100)*ass4)/100;\n double e = ((30%100)*ass5)/100;\n double grade = ((a+b+c+d+e)/8);//*100; \n return grade;\n }", "public static void subjectPoints (String subject ,double subjectDegree){\n if((subjectDegree / 25) >= 2.0){\n //3hours subjects\n if(\n subject == \"Arabic1\" || subject == \"English1\" || subject == \"Islamic Culture1\" || subject == \"Basic Mathematics\" || subject == \"Calculus\" || subject == \"Islamic Culture2\" || subject == \"English2\" || subject == \"Arabic2\" || subject == \"programming Fundamentals\" || subject == \"Linear Algebra\" || subject == \"Probability And Statistics\" || subject == \"Human Computer Interaction1\" || subject == \"Information Technology Fundamentals\" || subject == \"Economics\" || subject == \"Computer Architecture\" || subject == \"Database Systems1\" || subject == \"Software Engineering1\" || subject == \"Human Computer Interaction2\" || subject == \"Cryptography And Information Security\" || subject == \"Algorithm Analysis And Design\" || subject == \"Software Engineering2\" || subject == \"Practical Training\" || subject == \"Database Systems3\" || subject == \"Information Security Applications\"\n ){\n currentSemesterPoint += ((subjectDegree / 25) * 3);\n TotalHoursPerSemester += 3;\n }\n\n //4hours subjects\n else if(\n subject == \"Physics\" || subject == \"Introduction To Computer Science\" || subject == \"Accounting Principles\" || subject == \"Information Technology Hardware\" || subject == \"Programming Methods1\" || subject == \"Programming Methods2\" || subject == \"DataStructures And Algorithms\" || subject == \"Operating Systems\" || subject == \"Artificial Intelligence\" || subject == \"Computer Networks And Communication\" || subject == \"Database Systems2\" || subject == \"Web Application Development1\" || subject == \"Elective Subject 1\" || subject == \"Information Technology Project Management\" || subject == \"Web Application Development2\" || subject == \"Mobile Computing\" || subject == \"Elective Subject2\"\n ){\n currentSemesterPoint += (subjectDegree / 25) * 4;\n TotalHoursPerSemester += 4;\n }\n\n //2hours subjects\n else if(subject == \"Human Communications\" || subject == \"Principles Of Management\" || subject == \"Sudanese Studies\" || subject == \"Research Methods\" || subject == \"Professional And Ethical Issues\"){\n currentSemesterPoint += ((subjectDegree / 25) * 2); \n TotalHoursPerSemester += 2;\n\n }\n //6hours subjects\n else if(subject == \"Graduation Project2\"){\n currentSemesterPoint += ((subjectDegree / 25) * 6); \n TotalHoursPerSemester += 6;\n }\n //remove this subject if it was a failure subjecet\n clearFailureSubjects(subject);\n } else {\n //set the current subject as failure subject\n setFailure(subject);\n }\n //add the current subject degree\n setDegreeSubject(subject , (subjectDegree / 25));\n //update global vars\n TotalSubjectsPoints += currentSemesterPoint;\n currentHours += TotalHoursPerSemester;\n }", "private void poetries() {\n\n\t}", "private String convertNumericToLetter (float grade) {\r\n\r\n // letter grades are indexed by grade point\r\n // the letter grade is added (+1) to the gradeCount array\r\n if(grade >= 93 && grade <= 100) { gradeCount[13] += 1; return grades[13]; } // [13] is A+\r\n if(grade >= 86 && grade < 93) { gradeCount[12] += 1; return grades[12]; } // [12] is A\r\n if(grade >= 80 && grade < 86) { gradeCount[11] += 1; return grades[11]; } // .\r\n if(grade >= 77 && grade < 80) { gradeCount[10] += 1; return grades[10]; } // .\r\n if(grade >= 73 && grade < 77) { gradeCount[9] += 1; return grades[9]; } // .\r\n if(grade >= 70 && grade < 73) { gradeCount[8] += 1; return grades[8]; } // .\r\n if(grade >= 67 && grade < 70) { gradeCount[7] += 1; return grades[7]; } // .\r\n if(grade >= 63 && grade < 67) { gradeCount[6] += 1; return grades[6]; } // .\r\n if(grade >= 60 && grade < 63) { gradeCount[5] += 1; return grades[5]; } // .\r\n if(grade >= 57 && grade < 60) { gradeCount[4] += 1; return grades[4]; } // .\r\n if(grade >= 53 && grade < 57) { gradeCount[3] += 1; return grades[3]; } // .\r\n if(grade >= 50 && grade < 53) { gradeCount[2] += 1; return grades[2]; } // .\r\n if(grade >= 35 && grade < 50) { gradeCount[1] += 1; return grades[1]; } // [1] is F\r\n else { gradeCount[0] += 1; return grades[0]; } // [0] is F-\r\n }", "public static void examGrade(Double mark) {\n if (mark < 50) {\r\n System.out.println(\"F\");\r\n }\r\n if (mark > 50 && mark < 59) {\r\n System.out.println(\"D\");\r\n }\r\n if (mark > 60 && mark < 69) {\r\n System.out.println(\"C\");\r\n }\r\n if (mark > 70 && mark < 79) {\r\n System.out.println(\"B\");\r\n }\r\n if (mark > 80) {\r\n System.out.println(\"A\");\r\n }\r\n }", "public void skystonePos5() {\n }", "public void verliesLeven() {\r\n\t\t\r\n\t}", "private stendhal() {\n\t}", "public void redibujarAlgoformers() {\n\t\t\n\t}", "public static void main(String[] args) {\n Homework1 hw1 = new Homework1();\n\n System.out.println(\"===Problem 1===\");\n hw1.problem1();\n\n System.out.println(\"===Problem 2===\");\n System.out.println(hw1.topInt(1.5));\n System.out.println(hw1.topInt(5.1));\n System.out.println(hw1.topInt(1.0));\n System.out.println(hw1.topInt(-4.2));\n\n\n System.out.println(\"===Problem 3===\");\n hw1.draw4x4('-');\n hw1.draw4x4('4');\n\n System.out.println(\"===Problem 4===\");\n System.out.println(hw1.citationName(\"Alastair\", \"Reynolds\"));\n System.out.println(hw1.citationName(\"Grace\", \"Hopper\"));\n\n System.out.println(\"===Problem 5===\");\n System.out.println(String.valueOf(hw1.min3(1.0, 2.0, 3.0)));\n System.out.println(String.valueOf(hw1.min3(4.0, 3.0, 2.0)));\n System.out.println(String.valueOf(hw1.min3(0.5, 0.1, 0.5)));\n \n System.out.println(\"===Problem 6===\");\n System.out.println(hw1.fibonacci(0));\n System.out.println(hw1.fibonacci(1));\n System.out.println(hw1.fibonacci(2));\n System.out.println(hw1.fibonacci(3));\n System.out.println(hw1.fibonacci(10));\n System.out.println(hw1.fibonacci(25));\n \n \n System.out.println(\"===Problem 7===\");\n //System.out.println(hw1.isPalindrome(\"racecar\"));\n //System.out.println(hw1.isPalindrome(\"cat\"));\n //System.out.println(hw1.isPalindrome(\"hannah\"));\n //System.out.println(hw1.isPalindrome(\"saippuakivikauppias\"));\n }", "@Test\n\t/** Level 4 Thunderlord AD vs Thunderlord Arm Pen\n\t * Thunderlord + AD:\n\t * \t\t726.12 AD Dealt\n\t * \t\t47.59 AP Dealt\n\t * \t\tArmor Reduction: 88%\n\t * Thunderlord + Full Arm Pen Runes\n\t * \t\t632.02 AD Dealt\n\t * \t\t43 AP Dealt\n\t * \t\tArmor Reduction: 88%\n\t * \t\tFlat Armor Pen: 19.2\n\t */\n\tpublic void testThunderlordArmPen() {\n\t}", "public double database(double conceptual,double logical,double implementation,double exam,double exercises)\n {\n double e = ((20%100)*exercises)/100;\n double a = ((30%100)*conceptual)/100;\n double b = ((20%100)*logical)/100;\n double c = ((30%100)*implementation)/100;\n double sum = a+b+c+e;\n double overal = (sum/100)*40;//400;\n double d = ((60%100)*exam)/100;\n double grade = ((overal+d)/8);//*100;\n return grade;\n }", "double defendre();", "public void hitunganRule4(){\n penebaranBibitBanyak = 1900;\r\n hariPanenLama = 110;\r\n \r\n //menentukan niu bibit\r\n nBibit = (penebaranBibitBanyak - 1500) / (3000 - 1500);\r\n \r\n //menentukan niu hari panen sedang\r\n if ((hariPanenLama >=80) && (hariPanenLama <=120)) {\r\n nPanen = (hariPanenLama - 100) / (180 - 100);\r\n }\r\n \r\n //tentukan alpha predikat (karena grafik segitiga)\r\n if (nBibit < nPanen) {\r\n a4 = nBibit;\r\n }else if (nBibit > nPanen) {\r\n a4 = nPanen;\r\n }\r\n \r\n //tentukan Z3\r\n z4 = (penebaranBibitBanyak + hariPanenLama) * 500;\r\n System.out.println(\"a4 = \" + String.valueOf(a4));\r\n System.out.println(\"z4 = \" + String.valueOf(z4));\r\n }", "public void mo21792Q() {\n }", "public void skystonePos6() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void challenge17() {\n\n\t}", "public void mo21779D() {\n }", "private String calcFinalGrade() {\n\t\tString finalGrade;\n\t\t\n\t\tif (scorePercent >= .895)\n\t\t\tfinalGrade = \"A\";\n\t\telse if(scorePercent >= .795 && scorePercent < .895)\n\t\t\tfinalGrade = \"B\";\n\t\telse if(scorePercent >= .685 && scorePercent < .795)\n\t\t\tfinalGrade = \"C\";\n\t\telse if (scorePercent > .585 && scorePercent < .685)\n\t\t\tfinalGrade = \"D\";\n\t\telse\n\t\t\tfinalGrade = \"F\";\n\n\t\treturn finalGrade;\n\t}", "private static void cajas() {\n\t\t\n\t}", "public void mo12930a() {\n }", "public void smell() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void calculationScreen() {\n letterGradeMap.put(\"Select a Grade\", 0.001);\n letterGradeMap.put(\"O\", 10.0);\n letterGradeMap.put(\"A+\", 9.0);\n letterGradeMap.put(\"A\", 8.0);\n letterGradeMap.put(\"B+\", 7.0);\n letterGradeMap.put(\"B\", 6.0);\n letterGradeMap.put(\"RA\", 0.0);\n\n HashMap<String, Double> sem1Map = new HashMap<>(sem01Subjects.length);\n sem1Map.put(\"ENGLISH FOR PROFESSIONAL COMMUNICATION\", 3.0);\n sem1Map.put(\"MATRICES AND CALCULUS\", 4.0);\n sem1Map.put(\"PHYSICS FOR INFORMATION SCIENCE\", 3.0);\n sem1Map.put(\"CHEMISTRY FOR INFORMATION SCIENCE\", 3.0);\n sem1Map.put(\"PYTHON PROGRAMMING\", 3.0);\n sem1Map.put(\"ENGINEERING GRAPHICS\", 3.0);\n sem1Map.put(\"PHYSICS AND CHEMISTRY LABORATORY\", 2.0);\n sem1Map.put(\"PYTHON PROGRAMMING LABORATORY\", 2.0);\n perSemesterSubjectCredits.put(\"SEM01\", sem1Map);\n\n HashMap<String, Double> sem2Map = new HashMap<>(sem02Subjects.length);\n sem2Map.put(\"TECHNICAL COMMUNICATION\", 2.0);\n sem2Map.put(\"VECTOR CALCULUS AND TRANSFORMS\", 4.0);\n sem2Map.put(\"BASICS OF ELECTRICAL AND ELECTRONICS ENGINEERING\", 3.0);\n sem2Map.put(\"C PROGRAMMING\", 3.0);\n sem2Map.put(\"ELECTRICAL AND ELECTRONICS LABORATORY\", 2.0);\n sem2Map.put(\"C PROGRAMMING LABORATORY\", 2.0);\n sem2Map.put(\"COMPUTER HARDWARE AND SOFTWARE TOOLS (computer workshop)\", 2.0);\n sem2Map.put(\"FUNDAMENTALS OF COMPUTATIONAL BIOLOGY\", 0.0);\n perSemesterSubjectCredits.put(\"SEM02\", sem2Map);\n\n HashMap<String, Double> sem3Map = new HashMap<>(sem03Subjects.length);\n sem3Map.put(\"PROBABILITY AND QUEUEING THEORY\", 4.0);\n sem3Map.put(\"DIGITAL SYSTEMS\", 3.0);\n sem3Map.put(\"DATA STRUCTURES\", 3.0);\n sem3Map.put(\"SOFTWARE ENGINEERING\", 3.0);\n sem3Map.put(\"OBJECT ORIENTED PROGRAMMING SYSTEMS\", 3.0);\n sem3Map.put(\"DATA STRUCTURES LABORATORY\", 2.0);\n sem3Map.put(\"OBJECT ORIENTED PROGRAMMING SYSTEMS LABORATORY\", 2.0);\n sem3Map.put(\"COMMUNICATION AND SOFT SKILLS\", 0.0);\n perSemesterSubjectCredits.put(\"SEM03\", sem3Map);\n\n HashMap<String, Double> sem4Map = new HashMap<>(sem04Subjects.length);\n sem4Map.put(\"DISCRETE MATHEMATICS\", 4.0);\n sem4Map.put(\"DATABASE MANAGEMENT SYSTEMS\", 3.0);\n sem4Map.put(\"OPERATING SYSTEM CONCEPTS\", 3.0);\n sem4Map.put(\"DESIGN AND ANALYSIS OF ALGORITHMS\", 3.0);\n sem4Map.put(\"COMPUTER ARCHITECTURE\", 3.0);\n sem4Map.put(\"MICRO PROCESSORS AND MICRO CONTROLLERS\", 3.0);\n sem4Map.put(\"DATABASE MANAGEMENT SYSTEMS LABORATORY\", 2.0);\n sem4Map.put(\"INTERPERSONAL SKILLS-LISTENING AND SPEAKING\", 2.0);\n sem4Map.put(\"ENVIRONMENTAL SCIENCE AND ENGINEERING\", 0.0);\n perSemesterSubjectCredits.put(\"SEM04\", sem4Map);\n\n HashMap<String, Double> sem5Map = new HashMap<>(sem05Subjects.length);\n sem5Map.put(\"THEORY OF COMPUTATION\", 3.0);\n sem5Map.put(\"COMPUTER NETWORKS\", 3.0);\n sem5Map.put(\"ELECTIVE I\", 3.0);\n sem5Map.put(\"ELECTIVE II\", 3.0);\n sem5Map.put(\"OPEN ELECTIVE-I\", 3.0);\n sem5Map.put(\"SYSTEM ANALYSIS AND DESIGN LABORATORY\", 2.0);\n sem5Map.put(\"COMPUTER NETWORKS LABORATORY\", 2.0);\n sem5Map.put(\"LIFE SKILLS : APTITUDE\", 0.0);\n perSemesterSubjectCredits.put(\"SEM05\", sem5Map);\n\n HashMap<String, Double> sem6Map = new HashMap<>(sem06Subjects.length);\n sem6Map.put(\"COMPILER DESIGN\", 3.0);\n sem6Map.put(\"CRYPTOGRAPHY AND NETWORK SECURITY\", 3.0);\n sem6Map.put(\"ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING\", 3.0);\n sem6Map.put(\"ELECTIVE III\", 3.0);\n sem6Map.put(\"ELECTIVE IV\", 3.0);\n sem6Map.put(\"OPEN ELECTIVE - II\", 3.0);\n sem6Map.put(\"MOBILE APPLICATION DEVELOPMENT LABORATORY\", 2.0);\n sem6Map.put(\"MINI PROJECT\", 2.0);\n sem6Map.put(\"LIFE SKILLS : COMPETITIVE EXAMS\", 0.0);\n perSemesterSubjectCredits.put(\"SEM06\", sem6Map);\n\n HashMap<String, Double> sem7Map = new HashMap<>(sem07Subjects.length);\n sem7Map.put(\"PROFESSIONAL ETHICS FOR ENGINEERS\", 3.0);\n sem7Map.put(\"GRAPHICS AND MULTIMEDIA\", 3.0);\n sem7Map.put(\"SOFTWARE AND PROJECT MANAGEMENT\", 3.0);\n sem7Map.put(\"ELECTIVE V\", 3.0);\n sem7Map.put(\"ELECTIVE VI\", 3.0);\n sem7Map.put(\"OPEN ELECTIVE - III\", 3.0);\n sem7Map.put(\"GRAPHICS AND MULTIMEDIA LABORATORY\", 2.0);\n sem7Map.put(\"TECHNICAL SEMINAR\", 1.0);\n perSemesterSubjectCredits.put(\"SEM07\", sem7Map);\n\n HashMap<String, Double> sem8Map = new HashMap<>(sem08Subjects.length);\n sem8Map.put(\"ELECTIVE VII\", 3.0);\n sem8Map.put(\"ELECTIVE VIII\", 3.0);\n sem8Map.put(\"OPEN ELECTIVE - IV\", 3.0);\n sem8Map.put(\"PROJECT WORK\", 10.0);\n perSemesterSubjectCredits.put(\"SEM08\", sem8Map);\n\n /** Creating Buttons. */\n JButton[] calculateGPA = new JButton[8];\n JButton[] ResetGPA = new JButton[8];\n ButtonCreation calculateCGPA = new ButtonCreation(\"Calculate CGPA\");\n ButtonCreation resetAll = new ButtonCreation(\"Reset ALL\");\n for (int i = 0; i < 8; i++) {\n calculateGPA[i] = new ButtonCreation(\"Calculate GPA\", font, \"CGPA\");\n ResetGPA[i] = new ButtonCreation(\"Reset Grade Points\", font);\n }\n\n /** Creating ComboBox Arrays. */\n JComboBox[] sem01cb = new JComboBox[sem1Map.size()];\n JComboBox[] sem02cb = new JComboBox[sem2Map.size()];\n JComboBox[] sem03cb = new JComboBox[sem3Map.size()];\n JComboBox[] sem04cb = new JComboBox[sem4Map.size()];\n JComboBox[] sem05cb = new JComboBox[sem5Map.size()];\n JComboBox[] sem06cb = new JComboBox[sem6Map.size()];\n JComboBox[] sem07cb = new JComboBox[sem7Map.size()];\n JComboBox[] sem08cb = new JComboBox[sem8Map.size()];\n\n allComboBoxes.put(\"SEM01\", sem01cb);\n allComboBoxes.put(\"SEM02\", sem02cb);\n allComboBoxes.put(\"SEM03\", sem03cb);\n allComboBoxes.put(\"SEM04\", sem04cb);\n allComboBoxes.put(\"SEM05\", sem05cb);\n allComboBoxes.put(\"SEM06\", sem06cb);\n allComboBoxes.put(\"SEM07\", sem07cb);\n allComboBoxes.put(\"SEM08\", sem08cb);\n\n /** Creating Subject Label Arrays. */\n JLabel[] sem01PaperLabel = new JLabel[8];\n JLabel[] sem02PaperLabel = new JLabel[8];\n JLabel[] sem03PaperLabel = new JLabel[8];\n JLabel[] sem04PaperLabel = new JLabel[9];\n JLabel[] sem05PaperLabel = new JLabel[8];\n JLabel[] sem06PaperLabel = new JLabel[9];\n JLabel[] sem07PaperLabel = new JLabel[8];\n JLabel[] sem08PaperLabel = new JLabel[4];\n\n /** Creating Arrays to perform actions. */\n ArrayList<JComboBox[]> allComboBoxesarray = new ArrayList<>();\n allComboBoxesarray.add(sem01cb);\n allComboBoxesarray.add(sem02cb);\n allComboBoxesarray.add(sem03cb);\n allComboBoxesarray.add(sem05cb);\n allComboBoxesarray.add(sem07cb);\n allComboBoxesarray.add(sem04cb);\n allComboBoxesarray.add(sem06cb);\n allComboBoxesarray.add(sem08cb);\n\n ArrayList<JComboBox[]> allSemesters8 = new ArrayList<>();\n allSemesters8.add(sem01cb);\n allSemesters8.add(sem02cb);\n allSemesters8.add(sem03cb);\n allSemesters8.add(sem05cb);\n allSemesters8.add(sem07cb);\n ArrayList<JComboBox[]> allSemesters9 = new ArrayList<>();\n allSemesters9.add(sem04cb);\n allSemesters9.add(sem06cb);\n ArrayList<JComboBox[]> semester8 = new ArrayList<>();\n semester8.add(sem08cb);\n\n\n\n cgpaButtons.put(\"SEM01\", calculateGPA[0]);\n cgpaButtons.put(\"SEM02\", calculateGPA[1]);\n cgpaButtons.put(\"SEM03\", calculateGPA[2]);\n cgpaButtons.put(\"SEM04\", calculateGPA[3]);\n cgpaButtons.put(\"SEM05\", calculateGPA[4]);\n cgpaButtons.put(\"SEM06\", calculateGPA[5]);\n cgpaButtons.put(\"SEM07\", calculateGPA[6]);\n cgpaButtons.put(\"SEM08\", calculateGPA[7]);\n\n /** Creating ComboBox and adding those into panels along with Subject Labels. */\n for (String key : allComboBoxes.keySet()) {\n JComboBox[] entry = allComboBoxes.get(key);\n for (JComboBox boxes : entry) {\n for (int i = 0; i < entry.length; i++) {\n if ( \"SEM01\".equals( key )) {\n sem01cb[i] = new ComboBoxCreation(sem01cb[i], sem01Subjects[i]);\n sem01PaperLabel[i] = new LabelCreation(sem01PaperLabel[i], sem01Subjects[i]);\n } else {\n if ( \"SEM02\".equals( key )) {\n sem02cb[i] = new ComboBoxCreation(sem02cb[i], sem02Subjects[i]);\n sem02PaperLabel[i] = new LabelCreation(sem02PaperLabel[i], sem02Subjects[i]);\n } else {\n if ( \"SEM03\".equals( key )) {\n sem03cb[i] = new ComboBoxCreation(sem03cb[i], sem03Subjects[i]);\n sem03PaperLabel[i] = new LabelCreation(sem03PaperLabel[i], sem03Subjects[i]);\n } else {\n if ( \"SEM04\".equals( key )) {\n sem04cb[i] = new ComboBoxCreation(sem04cb[i], sem04Subjects[i]);\n sem04PaperLabel[i] = new LabelCreation(sem04PaperLabel[i], sem04Subjects[i]);\n\n } else {\n if ( \"SEM05\".equals( key )) {\n sem05cb[i] = new ComboBoxCreation(sem05cb[i], sem05Subjects[i]);\n sem05PaperLabel[i] = new LabelCreation(sem05PaperLabel[i], sem05Subjects[i]);\n } else {\n if ( \"SEM06\".equals( key )) {\n sem06cb[i] = new ComboBoxCreation(sem06cb[i], sem06Subjects[i]);\n sem06PaperLabel[i] = new LabelCreation(sem06PaperLabel[i], sem06Subjects[i]);\n\n } else {\n if ( \"SEM07\".equals( key )) {\n sem07cb[i] = new ComboBoxCreation(sem07cb[i], sem07Subjects[i]);\n sem07PaperLabel[i] = new LabelCreation(sem07PaperLabel[i], sem07Subjects[i]);\n } else {\n if ( \"SEM08\".equals( key )) {\n sem08cb[i] = new ComboBoxCreation(sem08cb[i], sem08Subjects[i]);\n sem08PaperLabel[i] = new LabelCreation(sem08PaperLabel[i], sem08Subjects[i]);\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n\n\n\n\n // Creating All Panels\n PanelCreation sem01 = new PanelCreation(9, 3, tabNamePanelName[0]);\n PanelCreation sem02 = new PanelCreation(9, 3, tabNamePanelName[1]);\n PanelCreation sem03 = new PanelCreation(9, 3, tabNamePanelName[2]);\n PanelCreation sem04 = new PanelCreation(10, 3, tabNamePanelName[3]);\n PanelCreation sem05 = new PanelCreation(9, 3, tabNamePanelName[4]);\n PanelCreation sem06 = new PanelCreation(10, 3, tabNamePanelName[5]);\n PanelCreation sem07 = new PanelCreation(9, 3, tabNamePanelName[6]);\n PanelCreation sem08 = new PanelCreation(9, 3, tabNamePanelName[7]);\n PanelCreation CGPA = new PanelCreation(1, 1, \"CGPA\");\n\n JTabbedPane semesterPane =\n new JTabbedPane(JTabbedPane.TOP) {\n {\n addTab(tabNamePanelName[0], null, sem01, null);\n addTab(tabNamePanelName[1], null, sem02, null);\n addTab(tabNamePanelName[2], null, sem03, null);\n addTab(tabNamePanelName[3], null, sem04, null);\n addTab(tabNamePanelName[4], null, sem05, null);\n addTab(tabNamePanelName[5], null, sem06, null);\n addTab(tabNamePanelName[6], null, sem07, null);\n addTab(tabNamePanelName[7], null, sem08, null);\n addTab(tabNamePanelName[8], null, CGPA, null);\n setBounds(0, 0, 517, 291);\n setBackground(Color.YELLOW);\n }\n };\n\n for (int i = 0; i < 8; i++) {\n sem01.add(sem01PaperLabel[i]);\n sem01.add(sem01cb[i]);\n sem02.add(sem02PaperLabel[i]);\n sem02.add(sem02cb[i]);\n sem03.add(sem03PaperLabel[i]);\n sem03.add(sem03cb[i]);\n sem05.add(sem05PaperLabel[i]);\n sem05.add(sem05cb[i]);\n sem07.add(sem07PaperLabel[i]);\n sem07.add(sem07cb[i]);\n }\n for (int i = 0; i < sem4Map.size(); i++) {\n // sem04cb[i] = new ComboBoxCreation(sem04cb[i], sem04Subjects[i]);\n sem04PaperLabel[i] = new LabelCreation(sem04PaperLabel[i], sem04Subjects[i]);\n sem04.add(sem04PaperLabel[i]);\n sem04.add(sem04cb[i]);\n }\n\n for (int i = 0; i < sem6Map.size(); i++) {\n sem06PaperLabel[i] = new LabelCreation(sem06PaperLabel[i], sem06Subjects[i]);\n sem06.add(sem06PaperLabel[i]);\n sem06.add(sem06cb[i]);\n }\n\n for (int i = 0; i < sem8Map.size(); i++) {\n sem08PaperLabel[i] = new LabelCreation(sem08PaperLabel[i], sem08Subjects[i]);\n sem08.add(sem08PaperLabel[i]);\n sem08.add(sem08cb[i]);\n }\n\n sem01.add(calculateGPA[0]);\n sem01.add(ResetGPA[0]);\n sem02.add(calculateGPA[1]);\n sem02.add(ResetGPA[1]);\n sem03.add(calculateGPA[2]);\n sem03.add(ResetGPA[2]);\n sem04.add(calculateGPA[3]);\n sem04.add(ResetGPA[3]);\n sem05.add(calculateGPA[4]);\n sem05.add(ResetGPA[4]);\n sem06.add(calculateGPA[5]);\n sem06.add(ResetGPA[5]);\n sem07.add(calculateGPA[6]);\n sem07.add(ResetGPA[6]);\n sem08.add(calculateGPA[7]);\n sem08.add(ResetGPA[7]);\n sem08.add(resetAll);\n CGPA.add(calculateCGPA);\n\n // Creating an array of CGPA and GPA Buttons.\n ArrayList<JButton[]> allSemestersGPAButton = new ArrayList<>();\n allSemestersGPAButton.add(calculateGPA);\n ArrayList<JButton> allSemestersCGPAButton = new ArrayList<>();\n allSemestersCGPAButton.add(calculateCGPA);\n ArrayList<JButton[]> ResetButton = new ArrayList<>();\n ResetButton.add(ResetGPA);\n\n // Creating an Action Listener for all the pull down menus.\n for (JComboBox[] sem : allSemesters8) {\n for (int i = 0; i < 8; i++) {\n sem[i].addActionListener(\n new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent event) {\n\n JComboBox<String> combo = (JComboBox<String>) event.getSource();\n String gradeSelection = (String) combo.getSelectedItem();\n String semesterName = combo.getParent().getName();\n String subjectName = combo.getName();\n Double intGrade = letterGradeMap.get(gradeSelection);\n HashMap<String, Double> semGrades =\n resultsCGPA.getOrDefault(semesterName, new HashMap<>());\n semGrades.put(subjectName, intGrade);\n resultsCGPA.putIfAbsent(semesterName, semGrades);\n }\n });\n }\n }\n for (JComboBox[] sem : allSemesters9) {\n for (int i = 0; i < 9; i++) {\n sem[i].addActionListener(\n new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent event) {\n\n JComboBox<String> combo = (JComboBox<String>) event.getSource();\n String gradeSelection = (String) combo.getSelectedItem();\n String semesterName = combo.getParent().getName();\n String subjectName = combo.getName();\n Double intGrade = letterGradeMap.get(gradeSelection);\n HashMap<String, Double> semGrades =\n resultsCGPA.getOrDefault(semesterName, new HashMap<>());\n semGrades.put(subjectName, intGrade);\n resultsCGPA.putIfAbsent(semesterName, semGrades);\n }\n });\n }\n }\n for (JComboBox[] sem : semester8) {\n for (int i = 0; i < 4; i++) {\n sem[i].addActionListener(\n new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent event) {\n\n JComboBox<String> combo = (JComboBox<String>) event.getSource();\n String gradeSelection = (String) combo.getSelectedItem();\n String semesterName = combo.getParent().getName();\n String subjectName = combo.getName();\n Double intGrade = letterGradeMap.get(gradeSelection);\n HashMap<String, Double> semGrades =\n resultsCGPA.getOrDefault(semesterName, new HashMap<>());\n semGrades.put(subjectName, intGrade);\n resultsCGPA.putIfAbsent(semesterName, semGrades);\n }\n });\n }\n }\n\n // Creating an Action Listener for GPA Button.\n for (JButton[] cgp : allSemestersGPAButton) {\n for (int i = 0; i <= 7; i++) {\n cgp[i].addActionListener(\n new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent event) {\n JButton currentButton = (JButton) event.getSource();\n String semesterName = currentButton.getParent().getName();\n // System.out.println(semesterName);\n HashMap<String, Double> semGrades = resultsCGPA.get(semesterName);\n // semGrades.values().forEach(semesterSubjectsGradeMap.get(sem01Subjects));\n HashMap<String, Double> semGradesMax = perSemesterSubjectCredits.get(semesterName);\n Double sumOfGrades = 0d;\n for (Map.Entry<String, Double> entry : semGrades.entrySet()) {\n sumOfGrades += semGradesMax.get(entry.getKey()) * entry.getValue();\n }\n Double maxCreditsForSem = semGradesMax.values().stream().reduce(0d, Double::sum);\n Double gpa = sumOfGrades / maxCreditsForSem;\n long roundedInt = Math.round(gpa * 100);\n double result = (double) roundedInt / 100;\n currentButton.setText(\n \"(Click to Calculate again) Your GPA for this semester =\"\n + String.valueOf(result));\n }\n });\n }\n }\n\n // Creating an Action Listener for CGPA Button.\n for (JButton cgpa : allSemestersCGPAButton) {\n for (int i = 0; i <= 7; i++) {\n cgpa.addActionListener(\n new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent event) {\n JButton currentButton = (JButton) event.getSource();\n Double sumOfGradesReceived = 0d;\n Double totalCredits = 0d;\n for (String semCompleted : resultsCGPA.keySet()) {\n HashMap<String, Double> semGrades = resultsCGPA.get(semCompleted);\n HashMap<String, Double> semGradesMax =\n perSemesterSubjectCredits.get(semCompleted);\n totalCredits += semGradesMax.values().stream().reduce(0d, Double::sum);\n for (Map.Entry<String, Double> entry : semGrades.entrySet()) {\n sumOfGradesReceived += semGradesMax.get(entry.getKey()) * entry.getValue();\n }\n }\n Double cgpa = sumOfGradesReceived / totalCredits;\n long roundedInt = Math.round(cgpa * 100);\n double result = (double) roundedInt / 100;\n currentButton.setText(\n \"Your CGPA is =\" + String.valueOf(result) + \" \\n Click to Calculate again\");\n }\n });\n }\n }\n\n // Creating an Action Listener for Reset ComboBoxes Button.\n for (JButton[] reset : ResetButton) {\n for (int i = 0; i < perSemesterSubjectCredits.entrySet().size(); i++) {\n {\n reset[i].addActionListener(\n new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent event) {\n JButton currentButton = (JButton) event.getSource();\n String semesterName = currentButton.getParent().getName();\n String panelName = currentButton.getName();\n for (JComboBox semesterComboBoxes : allComboBoxes.get(semesterName)) {\n semesterComboBoxes.setSelectedIndex(0);\n resultsCGPA.get(semesterName).keySet().clear();\n cgpaButtons.get(semesterName).setText(\"Calculate GPA\");\n }\n }\n });\n }\n }\n\n resetAll.addActionListener(\n new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent event) {\n for (Map.Entry<String, JComboBox[]> entry : allComboBoxes.entrySet()) {\n for(JComboBox boxes : entry.getValue ()){\n boxes.setSelectedIndex ( 0 );\n }\n }\n resultsCGPA.clear();\n for (int i = 0; i <= perSemesterSubjectCredits.keySet().size(); i++) {\n //semesterComboBoxes[i].setSelectedIndex(0);\n resultsCGPA.clear();\n for (JButton[] cgp : allSemestersGPAButton) {\n for (int l = 0; l <= 7; l++) {\n cgp[l].setText(\"Calculate GPA\");\n }\n for (JButton ccgp : allSemestersCGPAButton) {\n for (int m = 0; m <= 7; m++) {\n ccgp.setText(\"Calculate CGPA\");\n }\n }\n }\n }\n }\n\n });\n\n // Creating a Tabbed Pane and adding all panels into it.\n getContentPane().add(semesterPane);\n setSize(1300, 500);\n setTitle(\"CGPA Calculation Screen\");\n setLocationRelativeTo(null);\n setResizable(false);\n setVisible(true);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }\n }", "public static void main(String[] args) {\n\n Scanner s = new Scanner(System.in);\n System.out.println(\"Provide a grade for Physics:\");\n int P = s.nextInt();\n System.out.println(\"Provide a grade for Chemistry:\");\n int C = s.nextInt();\n System.out.println(\"Provide a grade for Biology:\");\n int B = s.nextInt();\n System.out.println(\"Provide a grade for Mathematics:\");\n int M = s.nextInt();\n System.out.println(\"Provide a grade for Computer:\");\n int Com = s.nextInt();\n\n int percentage = (P+C+B+M+Com)/5;\nString grade = \"\";\n\n if (percentage>= 90) {\n grade = \"A\";\n }else if (percentage>= 80) {\n grade = \"B\";\n }else if (percentage>= 70) {\n grade = \"C\";\n }else if (percentage>= 60) {\n grade = \"D\";\n }else if (percentage>= 40) {\n grade = \"E\";\n }else if (percentage < 40) {\n grade = \"F\";\n }\n System.out.println(\"Percentage: \" +percentage);\n System.out.println(\"Grade is : \"+grade);\n\n\n }", "protected float j()\r\n/* 67: */ {\r\n/* 68: 80 */ return 1.5F;\r\n/* 69: */ }", "private static void grading(String name, String level, int subjects, int totalQuiz){\n int tempScore, grade = 0;\n\n for (int i = 0; i < totalQuiz; i++) {\n System.out.print(\"Nilai kuis \" + (i + 1) + \": \");\n tempScore = scanner.nextInt();\n while (tempScore < 0 || tempScore > 100) {\n System.out.println(\"\\nMasukan respon yang valid (0 <= Nilai <= 100)\");\n\n System.out.print(\"Nilai kuis \" + (i + 1) + \": \");\n tempScore = scanner.nextInt();\n }\n grade += tempScore;\n }\n grade /= totalQuiz;\n\n System.out.println(\"\\n=============================\");\n System.out.println(\"= Data Siswa =\");\n System.out.println(\"=============================\");\n\n System.out.println(\"Nama: \" + name);\n System.out.println(\"Kelas: \" + level);\n System.out.println(\"Mata Pelajaran: \" + subjectList[subjects - 1]);\n System.out.println(\"Nilai akhir anda: \" + grade);\n if (grade >= 80 && grade <= 100) {\n System.out.println(\"Grade: \" + gradeList[0]);\n } else if (grade >= 70 && grade < 80) {\n System.out.println(\"Grade: \" + gradeList[1]);\n } else if (grade >= 50 && grade < 70) {\n System.out.println(\"Grade: \" + gradeList[2]);\n } else {\n System.out.println(\"Grade: \" + gradeList[3]);\n }\n\n //todo: make a new loop method\n System.out.println(\"\\n===============================================\");\n System.out.println(\"Apakah anda ingin menambahkan data baru? (y/n): \");\n String loops = scanner.next();\n if (loops.equalsIgnoreCase(\"y\")) {\n dataInput();\n } else if (loops.equalsIgnoreCase(\"n\")) {\n System.out.println(\"Proses Selesai. Terima kasih!\");\n System.exit(-1);\n } else {\n System.out.println(\"Mohon maaf respon anda tidak dapat diproses. Silahkan coba lagi\");\n System.exit(-1);\n }\n }", "@Override\n public void computeSatisfaction() {\n\n }", "public void fixTeacherRating()\n {\n // put your code here\n if(profQuality < 5)\n profQuality++;\n }", "private void level5() {\n }", "public void method_4270() {}", "public void stg() {\n\n\t}", "public static void main(String[] args) {\n\n int grade = 100;\n\n if (grade >= 90 && grade <= 100){\n System.out.println(\"Excellent\");\n }\n if (grade >= 70 && grade < 90 ){\n System.out.println(\"Good\");\n }\n if (grade >= 60 && grade < 70){\n System.out.println(\"Pass\");\n }\n if (grade < 60 && grade >= 0){\n System.out.println(\"Fail\");\n }\n if (grade > 100 || grade < 0){\n System.out.println(\"Invalid grade. Please write your grade between 1-100\");\n }\n\n\n\n\n\n\n }", "private void level4() {\n }", "public void printMarks(Result r) { \n\t\tdouble mark;\n\t\tdouble percentage = 0;\n\t\tSubcomponent sub;\n\t\t\n\t\t// if there are no subcomponents\n\t\tif (!haveSub) {\n\t\t\tfor (int j = 0; j < r.getAllGrades().size(); j++) {\n\t\t\t\tGrade tempG = r.getAllGrades().get(j);\n\t\t\t\tif (Objects.equals(tempG.getType(), gradeType.EXAM)) {\n\t\t\t\t\tSystem.out.println(\"EXAM, marks: \" + tempG.getMark() + \", weightage: \" + (mainPercentage*100) + \"%\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"COURSEWORK-TOTAL, marks: \" + tempG.getMark() + \", weightage: \" + (courseworkPercentage*100) + \"%\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (int i = 0; i < r.getAllGrades().size(); i ++) {\n\t\t\t\tGrade tempG = r.getAllGrades().get(i);\n\t\t\t\t// If grade is exam\n\t\t\t\tif (Objects.equals(tempG.getType(), gradeType.EXAM)) {\n\t\t\t\t\tSystem.out.println(\"EXAM, marks: \" + tempG.getMark() + \", weightage: \" + (mainPercentage*100) + \"%\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// find the weightage according to the temG.name\n\t\t\t\t\tfor (int j = 0; j < subcomponent.size(); j ++) {\n\t\t\t\t\t\tsub = subcomponent.get(j);\n\t\t\t\t\t\tString subName = sub.getName();\n\t\t\t\t\t\tif (Objects.equals(subName, tempG.getName())) {\n\t\t\t\t\t\t\tpercentage = sub.getPercentage();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(tempG.getType() + \"-\" + tempG.getName() + \", marks: \" \n\t\t\t\t\t\t\t+ tempG.getMark() + \", weightage: \" + (percentage*100) + \"%\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Print total coursework\n\t\t\tSystem.out.println(\"COURSEWORK-TOTAL, marks: \" + getCourseworkMark(r) + \", weightage: \" + (courseworkPercentage*100) + \"%\");\n\t\t}\n\t\n\t}", "private void level6() {\n }", "public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter the Mark:\");\r\n\t\tint Mark=s.nextInt();\r\n\t\tif(Mark>=90)\r\n\t\t{\r\n\t\t\tSystem.out.printf(\"Grade A\");\r\n\t\t}\r\n\t\telse if(Mark<90 && Mark>=70)\r\n\t\t{\r\n\t\t\tSystem.out.printf(\"Grade B\");\r\n\t\t}\r\n\t\telse if(Mark<70 && Mark>=50)\r\n\t\t{\r\n\t\t\tSystem.out.printf(\"Grade C\");\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\tSystem.out.printf(\"Fail\");\r\n\t\t}\r\n\r\n\r\n\t}", "public void grade() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// grade Method initialized\t\t\t\t\t\t\t\t\t\t\t\t\r\n System.out.print(\"Average Marks of a Student is \"+ average+\" and \");\t\t\t\t\t\t\t\t\t\t\t// This will print out the argument and ends the line\r\n if(average>81)\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// if loop expression, to check the condition\r\n {System.out.print(\"Grade is A : Pass\");}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// then print GRADE A\r\n else if(average>=61 && average<=80)\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t// nested else if loop expression, to check the condition\r\n {System.out.print(\"Grade is B : Pass\");}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// then print GRADE B\r\n else if (average>41 && average<=60)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t// nested else if loop expression, to check the condition\r\n {System.out.print(\"Grade is C : Pass\");}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// then print GRADE C\r\n else if (average>21 && average <=40)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// nested else if loop expression, to check the condition\r\n {System.out.println(\"Grade is D : Fail\"); }\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// then print GRADE D\r\n else if (average<20)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// nested else if loop expression, to check the condition\r\n {System.out.println(\"Fail\"); }\t}", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "boolean judgeValid()\r\n\t{\r\n\t\tif(loc.i>=0 && loc.i<80 && loc.j>=0 && loc.j<80 && des.i>=0 && des.i<80 && des.j>=0 && des.j<80)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t\t\r\n\t}", "public grade(){}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void perder() {\n // TODO implement here\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public static void listing5_14() {\n }", "char getGrade(int score) {\n\tchar grade;\n\tif(score>90) {\n\t\tgrade='A';\n\t}else if (score>80) {\n\t\t\tgrade='B';\n\t}else if(score>70) {\n\t\t\t\tgrade='C';\n\t}else if(score>50) {\n\t\tgrade='D';\n\t}else {\n\t\tgrade='F';\n\t}\n\treturn grade;\n\t\t\t\t\n\t\t\t}", "public void mo21782G() {\n }", "public static void main(String[] args) {\n Scanner in = new Scanner (System.in);\n System.out.print(\"Enter your final average [0-100]: \");\n double finalGrade;\n finalGrade = in.nextDouble();\n Grade finalLetter;\n if(finalGrade >= Grade.A.Min())\n {\n finalLetter = Grade.A;\n }\n else if (finalGrade >= Grade.B.Min())\n {\n finalLetter = Grade.B;\n }\n else if (finalGrade >= Grade.C.Min())\n {\n finalLetter = Grade.C;\n }\n else if(finalGrade >= Grade.D.Min())\n {\n finalLetter = Grade.D;\n }\n else\n {\n finalLetter = Grade.F;\n }\n System.out.printf (\"A final average of %f translates to a letter grade of %s\\n\", finalGrade, finalLetter);\n }", "public static void doExercise4() {\n // TODO: Complete Exercise 4 Below\n\n }", "public void mo21785J() {\n }", "public Grades convertToGrade(int mark)\n {\n if((mark >= 0) && (mark < 40))\n {\n System.out.print(\"Unlucky, you failed with an F.\");\n return Grades.F;\n }\n else if((mark >= 40) && (mark < 50))\n {\n System.out.print(\"You barely passed with a D.\");\n return Grades.D;\n }\n else if((mark >= 50) && (mark < 60))\n {\n System.out.print(\"Not bad. You got a C.\");\n return Grades.C;\n }\n else if((mark >= 60) && (mark < 70))\n {\n System.out.print(\"Good job, You got a B.\");\n return Grades.B;\n }\n else if((mark >=70) && (mark <= 100))\n {\n System.out.print(\"Congratulations, You got an A.\");\n return Grades.A;\n }\n\n return Grades.X;\n }", "public void mo21787L() {\n }", "public void mo3749d() {\n }", "private void courseEffects() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "public int getGrade() { return grade; }", "public void mo9848a() {\n }", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void checkScore() {\n\t\t\n\t}", "public double grade() {\n\n return -1;\n }", "public int getAmplifier()\r\n/* 75: */ {\r\n/* 76: 75 */ return this.amplifier;\r\n/* 77: */ }", "@Override\n\tpublic void anular() {\n\n\t}", "public abstract int getGuideSchematics();", "@Override\n\tpublic void exams() {\n\t\t\n\t}", "@Override\n\tpublic void marks() {\n\t\t\n\t}", "protected void staffIsLegend(){\r\n System.out.println(\"you must show some respect to staff \");\r\n }", "public abstract String mo41079d();", "public static void doExercise5() {\n // TODO: Complete Exercise 5 Below\n\n }", "private void _generateAGradudateStudent(int index) {\n int n;\n ArrayList list;\n String id;\n\n id = _getId(CS_C_GRADSTUD, index);\n writer_.startSection(CS_C_GRADSTUD, id);\n _generateAStudent_a(CS_C_GRADSTUD, index, id);\n n = _getRandomFromRange(GRADSTUD_COURSE_MIN, GRADSTUD_COURSE_MAX);\n list = _getRandomList(n, 0, gradCourses_.size() - 1);\n for (int i = 0; i < list.size(); i++) {\n CourseInfo info = (CourseInfo) gradCourses_.get( ( (Integer) list.get(i)).\n intValue());\n writer_.addProperty(CS_P_TAKECOURSE,\n _getId(CS_C_GRADCOURSE, info.globalIndex), true);\n if(globalVersionTrigger){\t \t \n \t writer_log.addPropertyInstance(id, ontology+\"#takesCourse\", _getId(CS_C_GRADCOURSE, info.globalIndex), true);\t \t \t \t \n }\n }\n writer_.addProperty(CS_P_UNDERGRADFROM, CS_C_UNIV,\n _getId(CS_C_UNIV, random_.nextInt(UNIV_NUM)));\n if(globalVersionTrigger){\t \t \n \t writer_log.addPropertyInstance(id, ontology+\"#undergraduateDegreeFrom\", _getId(CS_C_UNIV, random_.nextInt(UNIV_NUM)), true);\t \t \t \t \n }\n if (0 == random_.nextInt(R_GRADSTUD_ADVISOR)) {\n \tString ad = _selectAdvisor();\n \twriter_.addProperty(CS_P_ADVISOR, _selectAdvisor(), true);\n\t if(globalVersionTrigger){\t \t \n\t \t writer_log.addPropertyInstance(id, ontology+\"#advisor\", ad, true);\t \t \t \t \n\t }\n \n }\n \n _assignGraduateStudentPublications(id, GRADSTUD_PUB_MIN, GRADSTUD_PUB_MAX);\n writer_.endSection(CS_C_GRADSTUD);\n }", "void mo21073d();", "public abstract void mo2624j();", "Groepen maakGroepsindeling(Groepen aanwezigheidsGroepen);", "Programming(){\n\t}", "public void skystonePos3() {\n }", "private TMCourse() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public double web(double html,double javascript,double mySQL,double php,double webExam)\n {\n double a = ((10%100)*html)/100;\n double b = ((15%100)*javascript)/100;\n double c = ((12.5%100)*mySQL)/100;\n double d = ((12.5%100)*php)/100;\n double e = ((50%100)*webExam)/100;\n double grade = ((a+b+c+d+e)/8);//*100;\n return grade;\n }" ]
[ "0.61337084", "0.6054623", "0.59481084", "0.59132475", "0.58231515", "0.58187747", "0.5810579", "0.5780506", "0.5770107", "0.5769565", "0.57590115", "0.57530105", "0.57315195", "0.5723013", "0.5718498", "0.5715296", "0.5707918", "0.5706499", "0.57013077", "0.56798506", "0.567574", "0.56697345", "0.5647031", "0.56428236", "0.5614935", "0.56136906", "0.5606398", "0.5604263", "0.56012833", "0.5598844", "0.5591373", "0.55866253", "0.55798054", "0.5576078", "0.5573772", "0.55724925", "0.5569701", "0.55669063", "0.55640227", "0.55570275", "0.5549549", "0.554264", "0.553786", "0.5537679", "0.55312115", "0.55284774", "0.55276793", "0.5521673", "0.55213445", "0.5517619", "0.5514944", "0.5512776", "0.55095667", "0.55055654", "0.54933137", "0.54905695", "0.54896635", "0.5488043", "0.5486752", "0.5472895", "0.5467152", "0.5461181", "0.5447944", "0.544679", "0.54391927", "0.54341966", "0.54314226", "0.54305", "0.5424238", "0.5420372", "0.54160655", "0.5414691", "0.541115", "0.5409808", "0.54010093", "0.53979665", "0.53971815", "0.53932077", "0.5385034", "0.5379462", "0.53761095", "0.5374062", "0.5373804", "0.5367495", "0.53665906", "0.53662246", "0.53625375", "0.5361529", "0.53587204", "0.5357747", "0.5357678", "0.5353655", "0.5351716", "0.53493094", "0.53481823", "0.5347414", "0.5346756", "0.5345327", "0.5340112", "0.5340084", "0.5339114" ]
0.0
-1
used by Driver class to populate each Student with correct neighbors and corresponding prices
public void setEdge(Student curr, Student neighbor, Integer price) { curr.setNeighborAndPrice(neighbor, price); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n String [][]table1 = new String[][]{{\"Real World Mathematics\", \"ECM0002\"}, {\"Programming\", \"ECM1400\"}, {\"Data Structures\", \"ECM1406\"}, {\"Object-Oriented Programming\", \"ECM1410\"}, {\"Information Systems\", \"BEM2027\"}, {\"Thermal Physics\", \"PHY2023\"}};\n \n double [][]table1Doubles = new double[][]{{0.1, 0.3, 0.6},{0.25, 0.25, 0.25, 0.25},{0.25, 0.25, 0.5},{0.2, 0.3, 0.5},{0.1, 0.3, 0.3, 0.3},{0.4, 0.6}}; \n \n ModuleDescriptor ECM0002 = new ModuleDescriptor(table1[0][0], table1[0][1], table1Doubles[0]);\n ModuleDescriptor ECM1400 = new ModuleDescriptor(table1[1][0], table1[1][1], table1Doubles[1]);\n ModuleDescriptor ECM1406 = new ModuleDescriptor(table1[2][0], table1[2][1], table1Doubles[2]);\n ModuleDescriptor ECM1410 = new ModuleDescriptor(table1[3][0], table1[3][1], table1Doubles[3]);\n ModuleDescriptor BEM2027 = new ModuleDescriptor(table1[4][0], table1[4][1], table1Doubles[4]);\n ModuleDescriptor PHY2023 = new ModuleDescriptor(table1[5][0], table1[5][1], table1Doubles[5]);\n \n //%%%%%%%%%%maing student objects%%%%%%%%%%%%%%%%%%%%%%%%\n int []IDs = new int[]{1000,1001,1002,1003,1004,1005,1006,1007,1008,1009};\n String []names = new String[]{\"Ana\", \"Oliver\", \"Mary\", \"John\", \"Noah\", \"Chico\", \"Maria\", \"Mark\", \"Lia\", \"Rachel\"};\n char []genders = new char[]{'F', 'M', 'F', 'M', 'M', 'M', 'F', 'X', 'F', 'F'};\n \n Student []students_ = new Student[10];\n for (int i=0;i<10;i++){\n students_[i] = new Student(IDs[i], names[i], genders[i]);\n //System.out.println(students_[i]);\n }\n \n //%%%%%%%%%%%%making the module object%%%%%%%%%%%%%%%%%%%%%%%\n Module ECM0002Module = new Module(2020, (byte) 2, ECM0002);\n Module ECM1400Module = new Module(2019, (byte) 2, ECM1400);\n Module ECM1406Module = new Module(2020, (byte) 1, ECM1406);\n Module ECM1410Module = new Module(2020, (byte) 1, ECM1410);\n Module BEM2027Module = new Module(2019, (byte) 2, BEM2027);\n Module PHY2023Module = new Module(2019, (byte) 1, PHY2023);\n \n //%%%%%%%%%%%%%%%making module student and marks objects%%%%%%%%%%%%%%%%%%%%%%%%%%\n double [][]Marks = new double[][]{{9, 10, 10, 10}, {8, 8, 8, 9}, {5, 5, 6, 5}, {6, 4, 7, 9}, {10, 9, 10, 9}, {9, 9}, {6, 9}, {5, 6}, {9, 7}, {8, 5}, {10, 10, 9.5, 10}, {7, 8.5, 8.2, 8}, {6.5, 7.0, 5.5, 8.5}, {5.5, 5, 6.5, 7}, {7, 5, 8, 6}, {9, 10, 10, 10}, {8, 8, 8, 9}, {5, 5, 6, 5}, {6, 4, 7, 9}, {10, 9, 8, 9}, {10, 10, 10}, {8, 7.5, 7.5}, {9, 7, 7}, {9, 8, 7}, {2, 7, 7}, {10, 10, 10}, {8, 7.5, 7.5}, {10, 10, 10}, {9, 8, 7}, {8, 9, 10}, {10, 9, 10}, {8.5, 9, 7.5}, {10, 10, 5.5}, {7, 7, 7}, {5, 6, 10}, {8, 9, 8}, {6.5, 9, 9.5}, {8.5, 10, 8.5}, {7.5, 8, 10}, {10, 6, 10}};\n \n byte []term_ = new byte[]{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2};\n \n int []years_ = new int[]{2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020};\n \n Module []Modules_ = new Module[]{ECM1400Module, ECM1400Module, ECM1400Module, ECM1400Module, ECM1400Module, PHY2023Module, PHY2023Module, PHY2023Module, PHY2023Module, PHY2023Module, BEM2027Module, BEM2027Module, BEM2027Module, BEM2027Module, BEM2027Module, ECM1400Module, ECM1400Module, ECM1400Module, ECM1400Module, ECM1400Module, ECM1406Module, ECM1406Module, ECM1406Module, ECM1406Module, ECM1406Module, ECM1406Module, ECM1406Module, ECM1406Module, ECM1406Module, ECM1406Module, ECM1410Module, ECM1410Module, ECM1410Module, ECM1410Module, ECM1410Module, ECM0002Module, ECM0002Module, ECM0002Module, ECM0002Module, ECM0002Module};\n \n Student []Students = new Student[]{students_[0], students_[1], students_[2], students_[3], students_[4], students_[5], students_[6], students_[7], students_[8], students_[9], students_[0], students_[1], students_[2], students_[3], students_[4], students_[5], students_[6], students_[7], students_[8], students_[9], students_[0], students_[1], students_[2], students_[3], students_[4], students_[5], students_[6], students_[7], students_[8], students_[9], students_[0], students_[1], students_[2], students_[3], students_[4], students_[5], students_[6], students_[7], students_[8], students_[9]};\n \n \n //%%%%%%%%%%%making the student record object%%%%%%%%%%%%%%%%%%\n StudentRecord []studentRecords_ = new StudentRecord[40];\n double []finalmark = new double[40];\n for (int i=0;i<40;i++){\n for (int j=0;j<Marks[i].length;j++){\n double []weights = Modules_[i].getCAweightsm();\n finalmark[i] = finalmark[i] + (Marks[i][j] * weights[j] * 10);\n }\n studentRecords_[i] = new StudentRecord(Students[i], Modules_[i], Marks[i], finalmark[i]);\n }\n \n double []gpa = new double[10];\n int j=0;\n for (int i=0;i<10;j=j+10){\n gpa[i] = gpa[i] + studentRecords_[j].getfinalScore();\n if (j>=30){\n gpa[i] = gpa[i]/4;\n i++;\n j=i;\n }\n }\n \n Student []CompleteStudents_ = new Student[10];\n for (int i=0;i<10;i++){\n StudentRecord []studentsrecords_ = new StudentRecord[4];\n int p = 0;\n for (j=0;j<40;j++){\n if (studentRecords_[j].getStudent() == students_[i]){\n studentsrecords_[p] = studentRecords_[j];\n p++;\n }\n }\n CompleteStudents_[i] = new Student(IDs[i], names[i], genders[i], studentsrecords_, gpa[i]);\n }\n //%%%%%%%%%%%%%%%Creating new module objects with the student records and average scores%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n \n ModuleDescriptor []modulestoadd = new ModuleDescriptor[]{ECM0002, ECM1400, ECM1406, ECM1410, BEM2027, PHY2023};\n StudentRecord [][]moduleStudents = new StudentRecord[6][10];\n double []averageScore = new double[]{0,0,0,0,0,0};\n for (j=0;j<6;j++){\n int p=0;\n for (int i=0;i<40;i++){\n if (studentRecords_[i].getModule().getmoduled().getcode() == modulestoadd[j].getcode()){\n moduleStudents[j][p] = studentRecords_[i];\n averageScore[j] = averageScore[j] + studentRecords_[i].getfinalScore();\n p++;\n }\n }\n averageScore[j] = averageScore[j]/p;\n }\n Module ECM0002ModuleNew = new Module(2020, (byte) 2, ECM0002, moduleStudents[0], averageScore[0]);\n Module ECM1400ModuleNew = new Module(2019, (byte) 2, ECM1400, moduleStudents[1], averageScore[1]);\n Module ECM1406ModuleNew = new Module(2020, (byte) 1, ECM1406, moduleStudents[2], averageScore[2]);\n Module ECM1410ModuleNew = new Module(2020, (byte) 1, ECM1410, moduleStudents[3], averageScore[3]);\n Module BEM2027ModuleNew = new Module(2019, (byte) 2, BEM2027, moduleStudents[4], averageScore[4]);\n Module PHY2023ModuleNew = new Module(2019, (byte) 1, PHY2023, moduleStudents[5], averageScore[5]);\n \n //%%%%%%%%%%%%creating the university object%%%%%%%%%%%%%%%%%%%%%%%%\n \n ModuleDescriptor []moduledescriptors = new ModuleDescriptor[]{ECM0002, ECM1400, ECM1406, ECM1410, BEM2027, PHY2023};\n \n Module []modules_ = new Module[]{ECM0002ModuleNew, ECM1400ModuleNew, ECM1406ModuleNew, ECM1410ModuleNew, BEM2027ModuleNew, PHY2023ModuleNew};\n \n University university = new University(moduledescriptors, CompleteStudents_, modules_);\n \n // You need to create and instantiate university object\n // this can be done in several ways, for instance, you can create an \"empty\" university and add\n // module descriptors, students, and modules, or you can create a university object already \"complete\".\n \n // These decisions about how and where to implement each functionality is part of your OO design.\n // Regardless of your choice, in the end you need to have the university object loaded with the given\n // input data.\n \n // TODO create and initialise the university\n \n // Print Reports \n System.out.println();\n System.out.println(\"The UoK has \" + university.getTotalNumberStudents() + \" students.\");\n\n // best module\n System.out.println(\"\\nThe best module is:\");\n System.out.println(university.getBestModule());\n\n // best student\n System.out.println(\"\\nThe best student is:\");\n System.out.println(university.getBestStudent().printTranscript());\n System.out.println();\n\t}", "private static void populateRecord(Student student, ResultSet res)\n\t\t\tthrows SQLException {\n\t\tstudent.setChildid(res.getString(1));\n\t\tstudent.setC1r4rtsc(res.getFloat(2));\n\t\tstudent.setC2r4rtsc(res.getFloat(3));\n\t\tstudent.setC3r4rtsc(res.getFloat(4));\n\t\tstudent.setC4r4rtsc(res.getFloat(5));\n\t\tstudent.setC5r4rtsc(res.getFloat(6));\n\t\tstudent.setC6r4rtsc(res.getFloat(7));\n\t\tstudent.setC7r4rtsc(res.getFloat(8));\n\t\tstudent.setC1r4mtsc(res.getFloat(9));\n\t\tstudent.setC2r4mtsc(res.getFloat(10));\n\t\tstudent.setC3r4mtsc(res.getFloat(11));\n\t\tstudent.setC4r4mtsc(res.getFloat(12));\n\t\tstudent.setC5r4mtsc(res.getFloat(13));\n\t\tstudent.setC6r4mtsc(res.getFloat(14));\n\t\tstudent.setC7r4mtsc(res.getFloat(15));\n\t\tstudent.setC5r2stsc(res.getFloat(16));\n\t\tstudent.setC6r2stsc(res.getFloat(17));\n\t\tstudent.setC7r2stsc(res.getFloat(18));\n\t\tstudent.setP1chlboo(res.getFloat(19));\n\t\tstudent.setP2librar(res.getFloat(20));\n\t\tstudent.setP3sthlib(res.getFloat(21));\n\t\tstudent.setP4clbcrd(res.getFloat(22));\n\t\tstudent.setP5rlbcrd(res.getFloat(23));\n\t\tstudent.setP6chlboo(res.getFloat(24));\n\t\tstudent.setA2gotoli(res.getFloat(25));\n\t\tstudent.setA2borrow(res.getFloat(26));\n\t\tstudent.setA4gotoli(res.getFloat(27));\n\t\tstudent.setA4kborro(res.getFloat(28));\n\t\tstudent.setA5gotoli(res.getFloat(29));\n\t\tstudent.setA5borrow(res.getFloat(30));\n\t\tstudent.setG6gotoli(res.getFloat(31));\n\t\tstudent.setG6borrow(res.getFloat(32));\n\t\tstudent.setK2q1c_a(res.getFloat(33));\n\t\tstudent.setK2q1c_c(res.getFloat(34));\n\t\tstudent.setK2q1c_f(res.getFloat(35));\n\t\tstudent.setK4q1a_c(res.getFloat(36));\n\t\tstudent.setK4q2a_c(res.getFloat(37));\n\t\tstudent.setK4q2d_c(res.getFloat(38));\n\t}", "private static void init() {\n\n students = new HashMap<String, Student>(); //redundant but there for my reference\n\n //new Student objects, from the Student class, that are in our new HashMap called students\n Student annette = new Student(\"Annette\");\n annette.addGrade(90); // addGrade method from the Student class\n annette.addGrade(85);\n annette.addGrade(40);\n\n annette.recordAttendance( \"2019-10-01\", \"A\");\n annette.recordAttendance( \"2019-10-02\", \"P\");\n annette.recordAttendance( \"2019-10-03\", \"A\");\n annette.recordAttendance( \"2019-10-04\", \"P\");\n\n\n Student bridget = new Student(\"Bridget\");\n bridget.addGrade(90);\n bridget.addGrade(70);\n bridget.addGrade(60);\n\n bridget.recordAttendance( \"2019-10-01\", \"A\");\n bridget.recordAttendance( \"2019-10-02\", \"P\");\n bridget.recordAttendance( \"2019-10-03\", \"A\");\n bridget.recordAttendance( \"2019-10-04\", \"P\");\n\n\n Student bev = new Student(\"Bev\");\n bev.addGrade(97);\n bev.addGrade(96);\n bev.addGrade(95);\n\n bev.recordAttendance( \"2019-10-01\", \"A\");\n bev.recordAttendance( \"2019-10-02\", \"P\");\n bev.recordAttendance( \"2019-10-03\", \"A\");\n bev.recordAttendance( \"2019-10-04\", \"P\");\n\n\n Student glo = new Student(\"Glo\");\n glo.addGrade(94);\n glo.addGrade(93);\n glo.addGrade(92);\n\n glo.recordAttendance( \"2019-10-01\", \"A\");\n glo.recordAttendance( \"2019-10-02\", \"P\");\n glo.recordAttendance( \"2019-10-03\", \"A\");\n glo.recordAttendance( \"2019-10-04\", \"P\");\n\n\n // sets the usernames as keys\n // and values that are student objects\n students.put(\"bmills\", bridget);\n students.put(\"annette1\", annette);\n students.put(\"bevvybev\", bev);\n students.put(\"thegloUp\", glo);\n\n }", "public void setStudentInformation(StudentInfo2 studentInformation) {\n this.studentInformation = studentInformation;\n this.extraRows = 0;\n this.extraGradeLevel = 9;\n gradeAndSemesterList = new SortedArrayList<IntegerLastTriple<Integer, Semester>>(new IntegerSemesterPairComparator());\n generateGradeAndSemesterList();\n //Debug.line(\"Row count from controler after new info:\"+controler.getRowCount());\n //Add or subtract rows as needed\n //this.controler.addRowSelectionInterval(extraRows, extraRows);\n \n }", "static void initializeStudentSystem() {\r\n\r\n Course math = new Course(\"1000\", \"Mathematics\", \"College of Science\");\r\n Course computing = new Course(\"1001\", \"Computing\", \"College of Engineering\");\r\n Course english = new Course(\"1002\", \"English\", \"College of Liberal Arts\");\r\n Course history = new Course(\"1003\", \"History\", \"College of Liberal Arts\");\r\n Course biology = new Course(\"1004\", \"Biology\", \"College of Science\");\r\n courses.put(math.getCRN(), math);\r\n courses.put(computing.getCRN(), computing);\r\n courses.put(english.getCRN(), english);\r\n courses.put(history.getCRN(), history);\r\n courses.put(biology.getCRN(), biology);\r\n //\r\n User admin = new User();\r\n admin.setUsername(\"admin\");\r\n admin.setPassword(\"admin\");\r\n admin.setAccountType(4);\r\n accounts.put(admin.getUsername(), admin);\r\n //\r\n Student defaultStudent = new Student();\r\n defaultStudent.setName(\"Jose Cabrera\");\r\n defaultStudent.setUsername(\"John1\");\r\n defaultStudent.setPassword(\"123\");\r\n defaultStudent.setId(\"80539934\");\r\n defaultStudent.setMajor(\"CS\");\r\n defaultStudent.setAccountType(1);\r\n defaultStudent.setGraduationStatus(21);\r\n accounts.put(\"John1\", defaultStudent);\r\n //\r\n Student defaultStudent2 = new Student();\r\n defaultStudent2.setName(\"Raul Hinostroza\");\r\n defaultStudent2.setUsername(\"John2\");\r\n defaultStudent2.setPassword(\"123\");\r\n defaultStudent2.setId(\"805393\");\r\n defaultStudent2.setMajor(\"CS\");\r\n defaultStudent2.setAccountType(1);\r\n accounts.put(\"John2\", defaultStudent2);\r\n //\r\n Student defaultStudent3 = new Student();\r\n defaultStudent3.setName(\"Max Morales\");\r\n defaultStudent3.setUsername(\"John3\");\r\n defaultStudent3.setPassword(\"123\");\r\n defaultStudent3.setId(\"8053923\");\r\n defaultStudent3.setMajor(\"CS\");\r\n defaultStudent3.setAccountType(1);\r\n accounts.put(\"John3\", defaultStudent3);\r\n defaultStudent.addCourses(\"1000\");\r\n defaultStudent2.addCourses(\"1000\");\r\n defaultStudent3.addCourses(\"1000\");\r\n //\r\n Faculty defaultFaculty = new Faculty();\r\n defaultFaculty.setAccountType(2);\r\n defaultFaculty.setName(\"Smith\");\r\n defaultFaculty.setUsername(\"Smith1\");\r\n defaultFaculty.setPassword(\"123\");\r\n accounts.put(defaultFaculty.getUsername(), defaultFaculty);\r\n //\r\n Staff defaultStaff = new Staff();\r\n defaultStaff.setAccountType(3);\r\n defaultStaff.setName(\"Smith\");\r\n defaultStaff.setUsername(\"Smith2\");\r\n defaultStaff.setPassword(\"123\");\r\n accounts.put(defaultStaff.getUsername(), defaultStaff);\r\n }", "public SeatingChart(List<Student> studentList, int rows, int cols)\n {\n seats = new Student[rows][cols]; // all elements set to null by default\n for (int i=0;i<studentList.size();i++)\n {\n seats[i % rows][i / rows] = studentList.get(i);\n }\n }", "private void prepareReviewData(Map<String,Object> students) {\n //iterate through each user\n for (Map.Entry<String, Object> entry : students.entrySet()){\n //Get user map and Uid and typecast it to Student object\n Map joinedStudent = (Map) entry.getValue();\n String uid = entry.getKey();\n // Review is done only for blacklisted students\n if(joinedStudent.get(\"isBlacklisted\").toString().equals(\"Blacklisted\")) {\n Student student = new Student(joinedStudent.get(\"name\").toString(),\n Integer.valueOf(joinedStudent.get(\"state\").toString()),\n joinedStudent.get(\"isBlacklisted\").toString(),\n joinedStudent.get(\"review\").toString(), uid,\n Integer.valueOf(joinedStudent.get(\"blacklistedState\").toString())\n );\n mStudentList.add(student);\n }\n }\n mAdapter.notifyDataSetChanged(); // start loading into layout\n }", "public static void main(String[] args)\r\n {\r\n Scanner sc=new Scanner(System.in);\r\n int n;\r\n System.out.println(\"Enter number of students: \");\r\n n=sc.nextInt();\r\n Student[] student=new Student[n+2];\r\n for(int i=0; i<n; i++){\r\n student[i]=new Student();\r\n student[i].updateStudentById(-1);\r\n student[i].computeGPAById();\r\n double z=student[i].computeCGPAByID();\r\n student[i].studentDetailsById(student[i].ID);\r\n }\r\n \r\n }", "public void fillPassengersOnPlane(){//private, ändrar till public för grafiska\r\n //int i = 0;\r\n //for (Passenger p : passengers) {//fel med foreach tror jag\r\n for(int i = 0; i < 10; i++){\r\n if (passengers.size() >= 10) {\r\n passengers.get(i).setFirstName(\"Passenger\");//p\r\n passengers.get(i).setLastName(\"Unnamed\" + i);\r\n passengers.get(i).setAge(35 + i);\r\n passengers.get(i).setDestination(getDestination());\r\n passengers.get(i).setSeatNr(i + 1);\r\n if (i < 5) {\r\n passengers.get(i).setTicketPrice(21500);\r\n } else {\r\n passengers.get(i).setTicketPrice(5300);\r\n }\r\n if (seats.size() >= 10) {\r\n seats.get(i).setBooked(true);\r\n seats.get(i).setSeatNumber(i + 1);\r\n seats.get(i).setPassenger(passengers.get(i)); \r\n } else {\r\n seats.add(i, new Seat(i + 1, passengers.get(i)));\r\n }\r\n }\r\n else {\r\n Passenger nyP = new Passenger();\r\n nyP.setFirstName(\"Passenger\");//p\r\n nyP.setLastName(\"Unnamed\" + i);\r\n nyP.setAge(35 + i);\r\n nyP.setDestination(getDestination());\r\n nyP.setSeatNr(i + 1);\r\n if (i < 5) {\r\n nyP.setTicketPrice(21500);\r\n } else {\r\n nyP.setTicketPrice(5300);\r\n }\r\n passengers.add(nyP);\r\n \r\n if (seats.size() >= 10) {\r\n seats.get(i).setBooked(true);\r\n seats.get(i).setSeatNumber(i + 1);\r\n seats.get(i).setPassenger(nyP); \r\n } else {\r\n seats.add(i, new Seat(i + 1, nyP));\r\n }\r\n } \r\n }\r\n }", "public Student(){//default constructor \r\n ID_COUNTER++;\r\n studentNum = ID_COUNTER;\r\n firstName = \"\";\r\n lastName = \"\";\r\n address = \"\";\r\n loginID = \"\";\r\n numCredits = 0;\r\n totalGradePoints = 0;\r\n }", "Neighbors() {\n HashMap<Integer, Double> neighbors = new HashMap<>();\n }", "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 }", "public void initialize(Collection<Bookshelf> basis)\n\t throws IllegalArgumentException {\n\n\tif (null == basis)\n\t throw new IllegalArgumentException(\"input cannot be null.\");\n\n\tIterator<Bookshelf> shelfs = basis.iterator();\n\n\tBookshelf masterShelf = BookshelfOperations.union(basis);\n\n\tidPairs = identifyInputs(masterShelf); // tag | property -> neuron #\n\tthis.numShelfs = basis.size();\n\tint numBooks = masterShelf.size();\n\n\tint i = 0;\n\tdouble[][] inputValues = new double[numBooks][numTags];\n\n\twhile (shelfs.hasNext()) {\n\n\t Bookshelf shelf = shelfs.next();\n\t Iterator<Book> books = shelf.iterator();\n\n\t // System.out.println(\"numShelfs: \" + String.valueOf(numShelfs));\n\n\t while (books.hasNext()) {\n\n\t\tBook book = books.next();\n\t\tIterator<Map.Entry<String, Integer>> tags = book\n\t\t\t.enumerateTags().iterator();\n\n\t\twhile (tags.hasNext()) {\n\n\t\t Map.Entry<String, Integer> tag = tags.next();\n\t\t int index = idPairs.get(tag.getKey());\n\n\t\t if (index > numTags) {\n\t\t\tSystem.out.println(\"ERROR: INDEX OUT OF BOUNDS!\");\n\t\t\tSystem.out.println(\"name: \" + tag.getKey() + \" index: \"\n\t\t\t\t+ index);\n\t\t\tSystem.out.println(\"numTags: \" + numTags);\n\n\t\t } else if (index == numTags) {\n\t\t\t// System.out.println(\"__OTHER__ detected!\");\n\t\t\tinputValues[i][index] += ((double) tag.getValue() / (double) maxTagMag);\n\t\t } else {\n\t\t\tinputValues[i][index] = ((double) tag.getValue() / (double) maxTagMag);\n\t\t }\n\t\t}\n\t\t++i;\n\t }\n\t}\n\n\tNeuralDataSet data = new BasicNeuralDataSet(inputValues, null);\n\n\tbrain = generateBrain(numTags, numShelfs);\n\ttrain(data);\n\n\tflatShelfs = new HashMap<Integer, FlatShelf>();\n\n\tfor (Bookshelf s : basis) {\n\t FlatShelf fs = new FlatShelf(s);\n\t flatShelfs.put(checkBook(fs), fs);\n\t}\n\n\tcurrentWeights = new ButlerWeights(brain.getStructure().getSynapses()\n\t\t.get(0).getMatrix(), numTags, flatShelfs, idPairs);\n\t// initialized = true;\n }", "public static Object[] question4(Student student1, Student student2)\r\n {\r\n \r\n int student1HighestGrade = 0;\r\n double student1total = 0;\r\n double student2total = 0;\r\n int student2HighestGrade = 0; \r\n double student1AverageGrade = 0;\r\n double student2AverageGrade = 0; \r\n Student bestAverageGradeStudent = student1;\r\n Student bestHighGradeStudent = student2; \r\n \r\n // Your code goes Here:\r\n for(int i = 0; i < 8; i++)\r\n {\r\n if(student1HighestGrade < student1.getExamScore(i))\r\n {\r\n \r\n student1HighestGrade = student1.getExamScore(i);\r\n }\r\n \r\n if(student2HighestGrade < student2.getExamScore(i))\r\n {\r\n student2HighestGrade = student2.getExamScore(i);\r\n }\r\n \r\n }\r\n if (bestHighGradeStudent == student2)\r\n {\r\n bestHighGradeStudent = student2;\r\n }\r\n else \r\n {\r\n bestAverageGradeStudent = student1;\r\n }\r\n \r\n \r\n \r\n \r\n for(int c = 0;c < 8; c++)\r\n {\r\n student1total += student1.getExamScore(c);\r\n }\r\n student1AverageGrade = student1total/8;\r\n \r\n for(int d = 0; d < 8; d++)\r\n {\r\n student2total += student2.getExamScore(d);\r\n }\r\n student2AverageGrade = student2total/8;\r\n \r\n \r\n \r\n \r\n // Necessary for Unit Test \r\n return new Object[] {student1HighestGrade, student2HighestGrade, student1AverageGrade, student2AverageGrade, bestHighGradeStudent, bestAverageGradeStudent}; \r\n }", "public static void main(String[] args) {\n Student s1 = new Student(\"Azat\");\n Student s2 = new Student(\"Saida\");\n Student s3 = new Student(\"Adil\");\n Student s4 = new Student(\"Sabira\");\n Student s5 = new Student(\"Saniya\");\n\n\n List<Student> cybertekStudents = new ArrayList<>(Arrays.asList(s1, s2, s3, s4, s5));\n\n School cybertek = new School(\"Cybertek\", cybertekStudents);\n\n cybertekStudents.add(new Student(\"Denis\"));\n cybertekStudents.add(new Student(\"Irina\"));\n\n System.out.println(cybertek);\n System.out.println(cybertek.schoolName);\n System.out.println(cybertek.allStudentsList);\n\n Student[] students = {new Student(\"Gulnaz\"),\n new Student(\"Sardar\")};\n cybertek.addNewStudent(students);\n System.out.println(cybertek.allStudentsList);\n\n for (Student each : cybertekStudents) {\n System.out.println(each.studentName);\n //347-785-9417 munavvar\n //donna fro Wic, how she is share info 718 616 4338\n\n\n }\n }", "@Test \n\tpublic void TestStudentGPA() throws PersonException{\n\t\tArrayList<Enrollment> EnrolledStudents = new ArrayList<Enrollment>();\n\t\tfor (int i = 0; i < Students.size(); i++){\n\t\t\tStudent student = Students.get(i);\n\t\t\tfor (int j = 0; j < Sections.size(); j++){\n\t\t\t\tSection section = Sections.get(j);\n\t\t\t\tEnrollment enrolled = new Enrollment(student.getStudentID(),section.getSectionID());\n\t\t\t\tenrolled.setGrade((i*10)); // Assumes each student gets a consistent grade in every section! (Otherwise average GPAs would be a bit tougher)\n\t\t\t\tEnrolledStudents.add(enrolled);\n\t\t\t}\n\t\t}\n\t\t\n\t\tArrayList<Double> StudentsGPA = new ArrayList<Double>();\n\t\tfor (int i = 0; i < EnrolledStudents.size(); i+=6) {\n\t\t\t\tif (EnrolledStudents.get(i).getGrade() >= 90)\n\t\t\t\t\tStudentsGPA.add(4.0);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 80)\n\t\t\t\t\tStudentsGPA.add(3.66);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 70)\n\t\t\t\t\tStudentsGPA.add(3.33);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 60)\n\t\t\t\t\tStudentsGPA.add(3.0);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 50)\n\t\t\t\t\tStudentsGPA.add(2.66);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 40)\n\t\t\t\t\tStudentsGPA.add(2.33);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 30)\n\t\t\t\t\tStudentsGPA.add(2.0);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 20)\n\t\t\t\t\tStudentsGPA.add(1.66);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 10)\n\t\t\t\t\tStudentsGPA.add(1.33);\n\t\t\t\telse \n\t\t\t\t\tStudentsGPA.add(1.0);\n\t\t}\n\t\tassertTrue(StudentsGPA.get(0) == 1.0);\n\t\tassertTrue(StudentsGPA.get(1) == 1.33);\n\t\tassertTrue(StudentsGPA.get(2) == 1.66);\n\t\tassertTrue(StudentsGPA.get(3) == 2.0);\n\t\tassertTrue(StudentsGPA.get(4) == 2.33);\n\t\tassertTrue(StudentsGPA.get(5) == 2.66);\n\t\tassertTrue(StudentsGPA.get(6) == 3.0);\n\t\tassertTrue(StudentsGPA.get(7) == 3.33);\n\t\tassertTrue(StudentsGPA.get(8) == 3.66);\n\t\tassertTrue(StudentsGPA.get(9) == 4.0);\n\t\t\n\t\tArrayList<Double> CoursesGPA = new ArrayList<Double>();\n\t\tdouble count = 0;\n\t\tfor (int i = 0; i < EnrolledStudents.size(); i+=6){\n\t\t\tcount += EnrolledStudents.get(i).getGrade();\n\t\t}\n\t\tif (count == 450){ // Again, assumes a simple case (average grade = 45 -> average GPA = 2.497)\n\t\t\tCoursesGPA.add(2.497);\n\t\t}\n\t\tassertTrue(CoursesGPA.get(0) == 2.497);\n\t\t\n\t}", "public Student()\r\n {\r\n // initialise variables with defult values\r\n ID=-1;\r\n Name=null;\r\n University=null;\r\n Department=null;\r\n term=0;\r\n cgpa=0.0;\r\n Gpa=new double[10];\r\n Creditsandgrades=new double[10][10][10];\r\n }", "public static void main(String[] args) {\n ExamGrade eg1=new ExamGrade(60, 90);\n ExamGrade eg2=new ExamGrade(20, 60);\n ExamGrade eg3=new ExamGrade(55, 85);\n //instances of student \n Student s1=new Student(\"Barış\", \"Arslan\", \"male\", 3.4, \"CMPE\",eg1);\n Student s2=new Student(\"Fırat\", \"Arslan\", \"male\", 2.5, \"CMPE\", eg1);\n Student s3=new Student(\"ali\", \"mehmet\", \"male\", 1.0, \"EEN\", eg3);\n Student s4=new Student(\"ayşe\", \"pek\", \"female\", 3.0, \"EEN\", eg2);\n Student s5=new Student(\"kai\", \"pek\", \"male\", 3.1, \"TK\", eg2);\n\n Student[] a={s5,s3,s2,s1,s4}; //array for test \n Student[] b=generatedStudent(4); //describing genereted values to b because of testing\n show(b); //instance of show method\n findMinMax(b); //instance of findMinMax method\n \n System.out.println(search(a,118101));//instance of search method\n System.out.println(s2);//these control changeGrade before working method\n changeGrade(a, 118102, eg3);//instance of changeGrade method\n System.out.println(s2);//these control changeGrade after working method\n meanGPA(a);//instance of meanGPA \n }", "public Student( String name , String address ){//constructor with arguments \r\n \tID_COUNTER++;\r\n \tstudentNum = ID_COUNTER;\r\n getFirstAndLastName( name );\r\n this.address = address ;\r\n loginID = makeLoginID() ;\r\n numCredits = 0;\r\n totalGradePoints = 0;\r\n }", "private void initializeShippingPoints() {\n shipping_points = new ShippingPoint[num_shipping_points];\n \n int x_size = 8;\n int y_size = 8;\n int[][] grid = new int[x_size][y_size]; //keeps track of which locations are taken\n //so no two ShippingPoints have the same location\n \n int x = 0;\n int y = 0;\n \n for(int i = 0; i < num_shipping_points; i++)\n {\n x = (int)(Math.random() * x_size);\n y = (int)(Math.random() * y_size);\n while(grid[x][y] != 0) {\n x = (int)(Math.random() * x_size);\n y = (int)(Math.random() * y_size);\n }\n grid[x][y] = 1;\n if(i % 4 == 0) { //be careful -- probably won't work in the general case\n Supplier supplier = new Supplier(x, y, i);\n shipping_points[i] = supplier;\n }\n else {\n Customer customer = new Customer(x, y, i);\n shipping_points[i] = customer;\n }\n }\n \n if(eight_shipping_points) {\n //for 8 shipping points\n shipping_points[0].setPosition(4, 0);\n shipping_points[1].setPosition(8, 0);\n shipping_points[2].setPosition(8, 4);\n shipping_points[3].setPosition(8, 8);\n shipping_points[4].setPosition(4, 8);\n shipping_points[5].setPosition(0, 8);\n shipping_points[6].setPosition(0, 4);\n shipping_points[7].setPosition(0, 0);\n }\n \n else {\n //for 20 shipping points\n /**/shipping_points[0].setPosition(4,0);\n shipping_points[1].setPosition(8, 0);\n shipping_points[2].setPosition(12, 0);\n shipping_points[3].setPosition(16, 0);\n shipping_points[4].setPosition(20, 0);\n shipping_points[5].setPosition(20, 4);\n shipping_points[6].setPosition(20, 8);\n shipping_points[7].setPosition(20, 12);\n shipping_points[8].setPosition(20, 16);\n shipping_points[9].setPosition(20, 20);\n shipping_points[10].setPosition(16, 20);\n shipping_points[11].setPosition(12, 20);\n shipping_points[12].setPosition(8, 20);\n shipping_points[13].setPosition(4, 20);\n shipping_points[14].setPosition(0, 20);\n shipping_points[15].setPosition(0, 16);\n shipping_points[16].setPosition(0, 12);\n shipping_points[17].setPosition(0, 8);\n shipping_points[18].setPosition(0, 4);\n shipping_points[19].setPosition(0, 0);/**/\n }\n \n displayShippingPoints();\n }", "private void setupStuff() {\n\t\tm_seenNumbers = new double[featureArray.length][];\n\t\tm_Weights = new double[featureArray.length][];\n\t\tm_NumValues = new int[featureArray.length];\n\t\tm_SumOfWeights = new double[featureArray.length];\n\t\tfeatureTotals = new int[featureArray.length];\n\n\t\tfor (int i = 0; i < featureArray.length; i++) {\n\t\t\tm_NumValues[i] = 0;\n\t\t\tm_seenNumbers[i] = new double[100];\n\t\t\tm_Weights[i] = new double[100];\n\t\t}\n\n\t\t/*\n\t\t * initialize structures for probabilities of each class and of each\n\t\t * feature\n\t\t */\n\t\tclassCounts = new double[MLearner.NUMBER_CLASSES];\n\t\tprobs = new HashMap[MLearner.NUMBER_CLASSES][featureArray.length];\n\t\tRealprobs = new HashMap[MLearner.NUMBER_CLASSES][featureArray.length];\n\t\tfor (int i = 0; i < MLearner.NUMBER_CLASSES; i++) {\n\t\t\tfor (int j = 0; j < featureArray.length; j++) {\n\t\t\t\tif (featureArray[j]) {//only create if we are using that\n\t\t\t\t\t// feature\n\t\t\t\t\tprobs[i][j] = new HashMap();\n\t\t\t\t\tif (EmailInternalConfigurationWindow.isFeatureDiscrete(j)) {\n\t\t\t\t\t\tprobs[i][j].put(\"_default\", new Double(0));\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tclassCounts[i] = 0;\n\t\t}\n\n\t}", "public static void inserStudentInfo(ArrayList<CandidateDetail> detail) {\r\n\t\tConnection con = null;\r\n\t\r\n\t\ttry {\r\n\t\t\tcon = Connect.prepareConnection();\r\n\t\t\tPreparedStatement ps = con\r\n\t\t\t\t\t.prepareStatement(\"insert into student_info(xstart, xend, y_ratio1, y_ratio2, field, value ) values (?,?,?,?,?,?)\");\r\n\r\n\t\t\tfor (CandidateDetail ob : detail) {\r\n\t\t\t\tps.setDouble(1, ob.xstart);\r\n\t\t\t\tps.setDouble(2, ob.xend);\r\n\t\t\t\tps.setDouble(3, ob.blockUpperratio);\r\n\t\t\t\tps.setDouble(4, ob.blockLowerRatio);\r\n\t\t\t\tps.setString(5, ob.field);\r\n\t\t\t\tps.setInt(6, ob.value);\r\n\t\t\t\tps.addBatch();\r\n\t\t\t}\r\n\t\t\tps.executeBatch();\r\n\t\t\tcon.commit();\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog\r\n\t\t\t\t\t.error(\"error while inserting bubble position in stuent info part : \"\r\n\t\t\t\t\t\t\t+ e);\r\n\t\t} finally {\r\n\t\t\tConnect.freeConnection(con);\r\n\t\t}\r\n\t}", "abstract protected Dataset getNewCandidates();", "private CalcVector getNeighborsInfluence(Student student, int x, int y) {\n \t\t// neighbor ( inf(Neighbor) * state(studentLeft) * neighbor + inf(Neighbor) * state(studentRight) * ... )\n \t\t\n \t\t// x x x factor for each relative position to the student\n \t\t// x o x\n \t\t// x x x\n \t\tCalcVector changeVector = new CalcVector(student.getActualState().size());\n\t\tdouble[][] neighborInf = { { 0.01, 0.01, 0.01 }, { 0.10, 0.00, 0.10 }, { 0.10, 0.10, 0.10 } };// new double[3][3];\n \t\t// for (int i = 0; i < 3; i++) {\n \t\t// for (int j = 0; j < 3; j++) {\n \t\t// neighborInf[j][i] = 0.01;\n \t\t// }\n \t\t// }\n\t\t\n \t\tinfluence.getEnvironmentVector(EInfluenceType.NEIGHBOR, neighborInf[0][0])\n \t\t\t\t.printCalcVector(\"Influence neighbor: \");\n \t\t\n \t\t// System.out.println(\"x: \"+x+\" / y: \"+y);\n \t\tfor (int i = -1; i <= 1; i++) {\n \t\t\tfor (int j = -1; j <= 1; j++) {\n \t\t\t\tif (i != 0 || j != 0) {\n \t\t\t\t\tint newx = x + i;\n \t\t\t\t\tint newy = y + j;\n \t\t\t\t\tif (newx < students[0].length && newx >= 0 && newy < students.length && newy >= 0) {\n \t\t\t\t\t\tIPlace s = students[newy][newx];\n \t\t\t\t\t\tCalcVector studentsState = s.getActualState();\n \t\t\t\t\t\tchangeVector.addCalcVector(influence.getEnvironmentVector(EInfluenceType.NEIGHBOR,\n \t\t\t\t\t\t\t\tneighborInf[j + 1][i + 1]).multiplyWithVector(studentsState));\n \t\t\t\t\t\t\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn changeVector;\n \t}", "private static void doubleRanker(int i, LinkedList<Course> subjectCourses) {\r\n\t\tTreeMap<Double, Course> map = new TreeMap<Double, Course>(Collections.reverseOrder());\r\n\t\tfor (Course c : subjectCourses) {\r\n\t\t\tswitch (i) {\r\n\t\t\tcase 2:\r\n\t\t\t\tmap.put(c.uni.studentSatisfaction, c);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\tmap.put(1 - c.uni.costOfLiving, c); // In reverse order as lower is better.\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\t\tmap.put(c.uni.studentFacultyRatio, c);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 7:\r\n\t\t\t\tmap.put(c.uni.internationalStudentsRatio, c);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 8:\r\n\t\t\t\tmap.put(c.uni.graduateProspects, c);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSet<Entry<Double, Course>> doubleSet = map.entrySet();\r\n\t\tIterator<Entry<Double, Course>> doubleIt = doubleSet.iterator();\r\n\t\tint counter = 1;\r\n\t\twhile (doubleIt.hasNext()) {\r\n\t\t\tMap.Entry<Double, Course> me = (Map.Entry<Double, Course>) doubleIt.next();\r\n\t\t\tLinkedList<RankedCourse> ranked = rankedCourses.get(subjectCourses.getFirst().subject);\r\n\t\t\tRankedCourse rc = new RankedCourse();\r\n\t\t\tfor (RankedCourse course : ranked) {\r\n\t\t\t\tif (course.courseName.equals(me.getValue().courseName) && course.uni.equals(me.getValue().uni)) {\r\n\t\t\t\t\trc = course;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tswitch (i) {\r\n\t\t\tcase 2:\r\n\t\t\t\trc.studentFacultyRatioRank = counter;\r\n\t\t\tcase 4:\r\n\t\t\t\trc.costOfLivingRank = counter;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\t\trc.studentFacultyRatioRank = counter;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 7:\r\n\t\t\t\trc.internationalStudentsRatioRank = counter;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 8:\r\n\t\t\t\trc.graduateProspectsRank = counter;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t}", "public void train() {\n\t\tfor (Instance ins : arrTrainInstances) {\n\t\t\tif (ins.scorePmi_E1E2 > largestPMI)\n\t\t\t\tlargestPMI = ins.scorePmi_E1E2;\n\t\t}\n\t\tSystem.out.println(\"Largest PMI: \" + largestPMI);\n\n\t\tfor (Instance ins : arrTrainInstances) {\n\t\t\tins.scorePmi_E1E2 = ins.scorePmi_E1E2 / largestPMI;\n\t\t}\n\n\t\tfor (Instance ins : arrTestInstances) {\n\t\t\tins.scorePmi_E1E2 = ins.scorePmi_E1E2 / largestPMI;\n\t\t}\n\n\t\tint sizeD0 = arrD0.size();\n\t\tint sizeD1 = arrD1.size();\n\t\tint sizeD2 = arrD2.size();\n\t\tint sizeD3 = arrD3.size();\n\n\t\tint sizeMin = Math.min(sizeD0, Math.min(sizeD1, Math\n\t\t\t\t.min(sizeD2, sizeD3)));\n\t\tSystem.out.println(\"sizeMin=\" + sizeMin);\n\n\t\tint n = instanceNums.length;\n\n\t\tboolean flag = false;\n\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\tint k = instanceNums[i];\n\n\t\t\tif (k > sizeMin) {\n\t\t\t\tk = sizeMin;\n\t\t\t\tinstanceNums[i] = k;\n\t\t\t\tflag = true;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"\\nk=\" + k);\n\n\t\t\tArrayList<Instance> arrSub0 = getInstances(arrD0, k);\n\t\t\tArrayList<Instance> arrSub1 = getInstances(arrD1, k);\n\t\t\tArrayList<Instance> arrSub2 = getInstances(arrD2, k);\n\t\t\tArrayList<Instance> arrSub3 = getInstances(arrD3, k);\n\n\t\t\tArrayList<Instance> arrTrains = new ArrayList<Instance>();\n\t\t\tarrTrains.addAll(arrSub0);\n\t\t\tarrTrains.addAll(arrSub1);\n\t\t\tarrTrains.addAll(arrSub2);\n\t\t\tarrTrains.addAll(arrSub3);\n\t\t\tCollections.shuffle(arrTrains);\n\n\t\t\tSystem.out.println(\"Training size: \" + arrTrains.size());\n\n\t\t\ttrain(arrTrains);\n\n\t\t\tdouble acc = test();\n\t\t\tacc = test();\n\n\t\t\taccuracies[i] = acc;\n\n\t\t\tcount++;\n\n\t\t\tif (flag == true)\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tSystem.out.print(\" | \" + \"K=\" + instanceNums[i]);\n\t\t}\n\t\tSystem.out.println();\n\n\t\tfor (int i = 0; i < count; i++) {\n\n\t\t\tDecimalFormat df = new DecimalFormat(\"#.####\");\n\t\t\tString res = df.format(accuracies[i]);\n\t\t\tSystem.out.print(\" | \" + res);\n\t\t}\n\t\tSystem.out.println();\n\t}", "public Set<Bookshelf> initialize(Bookshelf basis, int numShelfs)\n\t throws IllegalArgumentException {\n\tif (null == basis)\n\t throw new IllegalArgumentException(\"input cannot be null.\");\n\n\tidPairs = identifyInputs(basis); // tag | property -> neuron #\n\tint numBooks = basis.size();\n\tthis.numShelfs = numShelfs;\n\tdouble[][] inputValues = new double[numBooks][numTags];\n\n\tbrain = generateBrain(numTags, numShelfs);\n\n\tint i = 0;\n\n\t// parse through the properties and tags of each book and normalize the\n\t// weights.\n\tfor (Book book : basis) {\n\n\t Iterator<Map.Entry<String, Integer>> tags = book.enumerateTags()\n\t\t .iterator();\n\n\t while (tags.hasNext()) {\n\t\tMap.Entry<String, Integer> tag = tags.next();\n\t\tInteger index = idPairs.get(tag.getKey());\n\n\t\tif (index.intValue() > numTags) {\n\t\t System.out.println(\"ERROR: INDEX OUT OF BOUNDS!\");\n\t\t System.out.println(\"name: \" + tag.getKey() + \" index: \"\n\t\t\t + index);\n\t\t System.out.println(\"numTags: \" + numTags);\n\n\t\t} else if (index.intValue() == numTags) {\n\t\t // System.out.println(\"__OTHER__ detected!\");\n\t\t inputValues[i][index.intValue()] += ((double) tag\n\t\t\t .getValue() / (double) maxTagMag);\n\t\t} else {\n\t\t inputValues[i][index.intValue()] = ((double) tag.getValue() / (double) maxTagMag);\n\t\t}\n\t }\n\t ++i;\n\t}\n\n\tNeuralDataSet data = new BasicNeuralDataSet(inputValues, null);\n\n\ttrain(data);\n\n\t// Export current butler to ButlerWeights.\n\tcurrentWeights = new ButlerWeights(brain.getStructure().getSynapses()\n\t\t.get(0).getMatrix(), numTags, flatShelfs, idPairs);\n\tinitialized = true;\n\n\tMap<Integer, Bookshelf> newShelfs = new HashMap<Integer, Bookshelf>();\n\tfor (int j = 0; j < numShelfs; ++j)\n\t newShelfs.put(j, new VirtualBookshelf());\n\n\tfor (Book book : basis) {\n\n\t double[] outputValues = brain.compute(\n\t\t new BasicNeuralData(readyBook(book))).getData();\n\n\t if (!(outputValues.length == 0)) {\n\t\tdouble[] bestResult = max(outputValues);\n\t\tnewShelfs.get((int) bestResult[1]).insert(book);\n\t }\n\t}\n\n\tMap<Integer, Bookshelf> cleanShelfs = new HashMap<Integer, Bookshelf>();\n\tint j = 0;\n\tfor (Bookshelf b : newShelfs.values()) {\n\t // System.out.println(\"(clean up) shelf size: \" + b.size());\n\n\t if (!b.empty()) {\n\t\tcleanShelfs.put(j, b);\n\t\t++j;\n\t }\n\t}\n\n\t// System.out.println(\"numShelfs input: \" + numShelfs);\n\t// System.out.println(\"actual numShelfs: \" + cleanShelfs.size());\n\n\tif (cleanShelfs.size() < numShelfs) {\n\t // System.out.println(\"retraining needed. \" + numShelfs +\n\t // \" becomes \" + cleanShelfs.size());\n\t return initialize(basis, cleanShelfs.size()); // retrain with the\n\t // proper size.\n\t}\n\n\tCollection<FlatShelf> randomFlatShelfs = flattenAll(cleanShelfs\n\t\t.values());\n\tflatShelfs = new HashMap<Integer, FlatShelf>();\n\n\t// System.out.println(\"naming and sorting flatshelfs\");\n\n\tfor (FlatShelf fs : randomFlatShelfs) {\n\n\t String heaviestTagName = \"\";\n\t int heaviestTagWeight = Integer.MIN_VALUE;\n\t int k = checkBook(fs);\n\n\t Iterator<Map.Entry<String, Integer>> fsTags = fs.enumerateTags()\n\t\t .iterator();\n\n\t while (fsTags.hasNext()) {\n\n\t\tMap.Entry<String, Integer> tag = fsTags.next();\n\t\theaviestTagWeight = Math.max(heaviestTagWeight, tag.getValue());\n\n\t\tif (heaviestTagWeight == tag.getValue())\n\t\t heaviestTagName = tag.getKey();\n\n\t }\n\n\t try {\n\t\tcleanShelfs.get(k).setProperty(\"name\", heaviestTagName);\n\t } catch (Exception e) {\n\t\tint timeout = 0;\n\t\twhile (timeout < 10000) {\n\t\t System.out.println(heaviestTagName == null);\n\t\t System.out.println(cleanShelfs.get(k) == null);\n\t\t timeout++;\n\t\t}\n\t }\n\t // System.out.println(heaviestTagName + \" is shelf #\" + k);\n\n\t flatShelfs.put(k, new FlatShelf(cleanShelfs.get(k)));\n\n\t // System.out.println(flatShelfs.get(k).getProperty(\"name\"));\n\n\t}\n\n\t// System.out.println(\"cleanShelfs size: \" + cleanShelfs.size());\n\n\treturn new HashSet<Bookshelf>(cleanShelfs.values());\n }", "public ScoreTrakker() {\n\t\tstudents =new ArrayList<Student>();\n\t}", "private void initStars( final double costMatrix[][], final int[] starsByRow, final int[] starsByCol )\n\t{\n\n\t\tfinal int[] rowHasStarredZero = new int[ costMatrix.length ];\n\t\tfinal int[] colHasStarredZero = new int[ costMatrix[ 0 ].length ];\n\n\t\tfor ( int i = 0; i < costMatrix.length; i++ )\n\t\t{\n\t\t\tfor ( int j = 0; j < costMatrix[ i ].length; j++ )\n\t\t\t{\n\t\t\t\tif ( 0 == costMatrix[ i ][ j ] && 0 == rowHasStarredZero[ i ] && 0 == colHasStarredZero[ j ] )\n\t\t\t\t{\n\t\t\t\t\tstarsByRow[ i ] = j;\n\t\t\t\t\tstarsByCol[ j ] = i;\n\t\t\t\t\trowHasStarredZero[ i ] = 1;\n\t\t\t\t\tcolHasStarredZero[ j ] = 1;\n\t\t\t\t\tbreak; // move onto the next row\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void loadCurrentPrices() {\n for(SecurityRow row : allSecurities) {\n row.updateCurrentPrice();\n }\n fireTableRowsUpdated(0, allSecurities.size()-1);\n }", "public abstract void populateCells(XMLParser parser, double param, String inputType, List<Double> distribution);", "public void doRegressionAnalysis()\r\n {\n n = Y.getRowDimension();\r\n p = X.getColumnDimension(); \r\n k = p - 1; // k is number of explanatory variables\r\n Resids = new Matrix(n, 1);\r\n StandResids = new Matrix(n, 1);\r\n StudResids = new Matrix(n, 1);\r\n Cooks_D = new Matrix(n, 1);\r\n R_Student = new Matrix(n, 1);\r\n\r\n // MVP, p73\r\n X_Prime = X.transpose();\r\n X_Prime_X = X_Prime.times(X);\r\n X_Prime_X_Inv = X_Prime_X.inverse(); \r\n HatMatrix = X.times(X_Prime_X_Inv.times(X_Prime)); \r\n BetaHats = X_Prime_X_Inv.times(X_Prime.times(Y)); \r\n YHats = HatMatrix.times(Y);\r\n BXY = (BetaHats.transpose()).times(X_Prime.times(Y));\r\n Y_Prime_Y = (Y.transpose()).times(Y); \r\n ssRegression = BXY.get(0,0) - sumY_Squared_Over_n;\r\n SSRes = Y_Prime_Y.minus(BXY);\r\n ssResiduals = SSRes.get(0,0);\r\n ssTotal = Y_Prime_Y.get(0,0) - sumY_Squared_Over_n;\r\n \r\n r2 = ssRegression / ssTotal;\r\n s = Math.sqrt(ssResiduals / (n - k - 1));\r\n adj_r2 = 1.0 - (ssResiduals / (n - k - 1)) / (ssTotal / (n - 1));\r\n \r\n dfReg = k;\r\n dfResid = n - k - 1;\r\n dfTotal = n - 1;\r\n msReg = ssRegression / (double)k;\r\n msResid = ssResiduals / (double)(n - k - 1);\r\n fStatistic = msReg / msResid;\r\n fDist = new FDistribution(k, n - k - 1);\r\n pValue_F = fDist.getRightTailArea(fStatistic);\r\n Resids = Y.minus(YHats);\r\n\r\n tempDouble_01 = 1.0 / Math.sqrt(msResid);\r\n\r\n StandResids = Resids.times(tempDouble_01); \r\n for (int jj = 0; jj < n; jj++)\r\n { \r\n tempDouble_02 = HatMatrix.get(jj, jj);\r\n StudResids.set(jj, 0, Resids.get(jj, 0) * tempDouble_01 / Math.sqrt(1.0 - tempDouble_02));\r\n tempDouble_03 = StudResids.get(jj, 0) * StudResids.get(jj, 0) / (double)p;\r\n tempDouble_04 = tempDouble_02 / (1.0 - tempDouble_02);\r\n Cooks_D.set(jj, 0, tempDouble_03 * tempDouble_04);\r\n \r\n // Student-R calculations from 4.12, 4.13, p135\r\n jjResid = Resids.get(jj, 0);\r\n double e_i_sq = jjResid * jjResid; \r\n double oneMinus_hii = 1.0 - HatMatrix.get(jj, jj);\r\n double s_i_sq = ((n - p)*msResid - e_i_sq/oneMinus_hii) / (n - p - 1);\r\n R_Student.set(jj, 0, jjResid / Math.sqrt(s_i_sq * oneMinus_hii)); \r\n }\r\n\r\n StErrCoef = new Matrix(k + 1, 1); // Explanatory variables + intercept \r\n TStat = new Matrix(k + 1, 1); \r\n PValue_T = new Matrix(k + 1, 1); \r\n tDist = new TDistribution (n - k - 1);\r\n\r\n for (int preds = 0; preds <= k; preds++)\r\n {\r\n StErrCoef.set(preds, 0, Math.sqrt(msResid * X_Prime_X_Inv.get(preds, preds)));\r\n TStat.set(preds, 0, BetaHats.get(preds, 0) / StErrCoef.get(preds, 0));\r\n PValue_T.set(preds, 0, 2.0 * tDist.getRightTailArea(Math.abs(TStat.get(preds, 0))));\r\n }\r\n }", "public CalcPriceTest() {\n goods = new ArrayList<>(NUM_PLANETS);\n planets = new ArrayList<>(NUM_PLANETS);\n for (int i = 0; i < planets.size(); i++) {\n planets.add(new Planet());\n goods.add(new ArrayList<>(NUM_GOODS));\n }\n for (int i = 0; i < planets.size(); i++) {\n Planet thisPlanet = planets.get(i);\n ArrayList<TradeGood> theseGoods = goods.get(i);\n for (TradeGood.GoodType type : TradeGood.GoodType.values()) {\n TradeGood newGood = new TradeGood(type, thisPlanet);\n theseGoods.add(newGood);\n }\n }\n }", "public Overall(ArrayList<Entity> enemies, int generationSize){\n //initialize this.students with actual proper values, mutate them, and create their network\n for (int i = 0; i < generationSize; i++) {\n Entity player = spawn(\"Player\", new SpawnData(Game.getScreenWidth()/2.0,\n Game.getScreenHeight()/2.0).put(\"mode\", 2).put(\"bads\", enemies));\n Student s = new Student(enemies, i, false, player, false);\n s.getBrain().mutate(innovationHistory);\n s.getBrain().generateNetwork();\n students.add(s);\n player.getComponent(PlayerComponent.class).setStudent(s);\n }\n }", "protected abstract List<Double> calcScores();", "public static void main(String[] args) {\n\t\tCustomer depot = new Customer();\n\t\tdepot.x = 50;\n\t\tdepot.y = 50;\n\t\tdepot.demand = 0;\n\n\n\t\tint myBirthNumber = 8021994;\n\n\t\tRandom ran = new Random (myBirthNumber); \n\n\t\tint numberOfCustomers = 30;\n\n\t\t//Creating the list with the customers\t\t\n\t\tArrayList <Customer> customers = new ArrayList<>(); // with this code we initialize the new ArrayList, which is called \"customers\"\n\t\tfor (int i = 1 ; i <= numberOfCustomers; i++)\n\t\t{\n\t\t\tCustomer cust = new Customer();\n\t\t\tcust.x = ran.nextInt(100);\n\t\t\tcust.y = ran.nextInt(100); \n\t\t\tcust.demand = 4 + ran.nextInt(7); \n\t\t\tcustomers.add(cust);\n\t\t}\n\n\t\t//Build the allCustomers array and the corresponding distance matrix\n\t\tArrayList <Customer> allCustomers = new ArrayList<Customer>();\n\n\n\t\tallCustomers.add(depot);\n\t\tfor (int i = 0 ; i < customers.size(); i++)\n\t\t{\n\t\t\tCustomer cust = customers.get(i);\n\t\t\tallCustomers.add(cust);\n\t\t}\n\n\t\tfor (int i = 0 ; i < allCustomers.size(); i++)\n\t\t{\n\t\t\tCustomer nd = allCustomers.get(i);\n\t\t\tnd.ID = i;\n\t\t}\n\n\n\t\t// This is a 2-D array which will hold the distances between node pairs\n\t\t// The [i][j] element of this array is the distance required for moving \n\t\t// from the i-th node of allNodes (node with id : i)\n\t\t// to the j-th node of allNodes list (node with id : j)\n\t\tdouble [][] distanceMatrix = new double [allCustomers.size()][allCustomers.size()];\n\t\tfor (int i = 0 ; i < allCustomers.size(); i++)\n\t\t{\n\t\t\tCustomer from = allCustomers.get(i);\n\n\t\t\tfor (int j = 0 ; j < allCustomers.size(); j++)\n\t\t\t{\n\t\t\t\tCustomer to = allCustomers.get(j);\n\n\t\t\t\tdouble Delta_x = (from.x - to.x);\n\t\t\t\tdouble Delta_y = (from.y - to.y);\n\t\t\t\tdouble distance = Math.sqrt((Delta_x * Delta_x) + (Delta_y * Delta_y));\n\n\t\t\t\tdistance = Math.round(distance);\n\n\t\t\t\tdistanceMatrix[i][j] = distance;\n\n\t\t\t}\n\t\t}\n\n\n\n\t\t// This is the solution object - It will store the solution as it is iteratively generated\n\t\t// The constructor of Solution class will be executed\n\t\tSolution s = new Solution();\n\n\t\tint numberOfVehicles = 10;\n\n\t\t//Let rtList be the ArrayList of Vehicles assigned to the solution \"s\".\t\t\n\t\tArrayList <Route> rtList = s.routes; \n\t\tfor (int i = 1 ; i <= numberOfVehicles; i++)\n\t\t{\n\t\t\tRoute routeTemp = new Route();\n\t\t\trouteTemp.load = 0;\n\t\t\trouteTemp.capacity = 50;\n\t\t\trouteTemp.cost = 0;\n\t\t\trtList.add(routeTemp);\n\t\t}\n\n\t\t// indicate that all customers are non-routed\n\t\tfor (int i = 0 ; i < customers.size(); i++)\n\t\t{\n\t\t\tcustomers.get(i).isRouted = false;\n\t\t}\n\n\n\t\t/* \n\t\t * ##################\n\t\t * # INITIALIZATION #\n\t\t * ##################\n\t\t * */\n\n\t\t// Setting a count for customers who are not inserted in the solution yet\n\t\tint notInserted = numberOfCustomers;\n\n\t\tfor (int j=0; j < numberOfVehicles; j++)\n\t\t{\n\t\t\tArrayList <Customer> nodeSequence = rtList.get(j).customers;\n\t\t\tnodeSequence.add(depot);\t\n\n\t\t\tint capacity = rtList.get(j).capacity; // The capacity of this vehicle (=50)\n\t\t\tint load = rtList.get(j).load; // The initial load of this vehicle (=0)\n\t\t\t// Setting a boolean variable that shows the assignment is not final yet.\n\t\t\tboolean isFinal = false;\n\t\t\t// If we have no more customers to insert, we add the depot at the end of the sequence. \n\t\t\tif (notInserted == 0) {\n\t\t\t\tisFinal = true;\n\t\t\t\tnodeSequence.add(depot);\n\t\t\t}\n\t\t\twhile (isFinal == false)\t\t\t{\n\t\t\t\t//this will be the position of the nearest neighbor customer -- initialization to -1\n\t\t\t\tint positionOfTheNextOne = -1;\n\t\t\t\t// This will hold the minimal cost for moving to the next customer - initialized to something very large\n\t\t\t\tdouble bestCostForTheNextOne = Double.MAX_VALUE;\n\t\t\t\t//This is the last customer of the route (or the depot if the route is empty)\n\t\t\t\tCustomer lastInTheRoute = nodeSequence.get(nodeSequence.size() - 1);\n\t\t\t\t//identify nearest non-routed customer\n\t\t\t\tfor (int k = 0 ; k < customers.size(); k++)\n\t\t\t\t{\n\t\t\t\t\t// The examined customer is called candidate\n\t\t\t\t\tCustomer candidate = customers.get(k);\n\t\t\t\t\t// if this candidate has not been visited by a vehicle\n\t\t\t\t\tif (candidate.isRouted == false)\t\t\t\t\t{\n\t\t\t\t\t\t//This is the cost for moving from the last visited customer to the candidate customer\n\t\t\t\t\t\tdouble trialCost = distanceMatrix[lastInTheRoute.ID][candidate.ID];\n\t\t\t\t\t\t//If this is the minimal cost found so far -> store this cost and the position of this best candidate\n\t\t\t\t\t\tif (trialCost < bestCostForTheNextOne && candidate.demand<= capacity)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpositionOfTheNextOne = k;\n\t\t\t\t\t\t\tbestCostForTheNextOne = trialCost;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} // moving on to the next (candidate) customer\n\n\t\t\t\t// Step 2: Push the customer in the solution\n\t\t\t\t// We have found the customer to be pushed.\n\t\t\t\t// He is located in the positionOfTheNextOne position of the customers list\n\t\t\t\t// Let's inert him and update the cost of the solution and of the route, accordingly\n\n\t\t\t\tif (positionOfTheNextOne != -1 )\n\t\t\t\t{\n\t\t\t\t\tCustomer insertedNode = customers.get(positionOfTheNextOne);\n\t\t\t\t\t//Push the customer in the sequence\n\t\t\t\t\tnodeSequence.add(insertedNode);\n\t\t\t\t\t\n\t\t\t\t\trtList.get(j).cost = rtList.get(j).cost + bestCostForTheNextOne;\n\t\t\t\t\ts.cost = s.cost + bestCostForTheNextOne;\n\t\t\t\t\tinsertedNode.isRouted = true;\n\t\t\t\t\tcapacity = capacity - insertedNode.demand;\n\t\t\t\t\trtList.get(j).load = load + insertedNode.demand;\n\t\t\t\t\tload = load + insertedNode.demand;\n\t\t\t\t\tnotInserted = notInserted - 1;\n\t\t\t\t\t\n\t\t\t\t} else \n\t\t\t\t{ \n\t\t\t\t\t//if the positionOfTheNextOne = -1, it means there is no suitable candidate for this vehicle. So, we add the depot.\n\t\t\t\t\tnodeSequence.add(depot);\n\t\t\t\t\trtList.get(j).cost = rtList.get(j).cost + distanceMatrix[lastInTheRoute.ID][0];\n\t\t\t\t\ts.cost = s.cost + distanceMatrix[lastInTheRoute.ID][0];\n\t\t\t\t\tisFinal = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* \n\t\t * ###########\n\t\t * # RESULTS #\n\t\t * ###########\n\t\t * */\n\n\n\t\tfor (int j=0; j<numberOfVehicles; j++)\n\t\t{\n\t\t\tint vehicle_number = j+1;\n\t\t\tSystem.out.println(\"Route for Vehicle #\" + vehicle_number);\n\t\t\tfor (int k=0; k<s.routes.get(j).customers.size(); k++) \n\t\t\t{\n\t\t\t\tSystem.out.print(s.routes.get(j).customers.get(k).ID + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"Route Cost = \" + s.routes.get(j).cost);\n\t\t\tSystem.out.println(\"Final Load: \" + s.routes.get(j).load);\n\t\t\tSystem.out.println(\"Final Remaining Capacity = \" + (rtList.get(j).capacity - s.routes.get(j).load));\n\t\t\tSystem.out.println(\"----------------------------------------\");\n\n\t\t}\t\t\n\t\tSystem.out.println(\"Total Solution Cost = \" + s.cost);\n\n\t\t// End of GCS Instance\n\n\n\t\t/* \n\t\t * ###################################################\n\t\t * # LOCAL SEARCH USING INTER+INTRA-RELOCATION MOVES #\n\t\t * ###################################################\n\t\t * */\n\n\n\t\t//this is a boolean flag (true/false) for terminating the local search procedure\n\t\tboolean terminationCondition = false;\n\n\t\t//this is a counter for holding the local search iterator\n\t\tint localSearchIterator = 0;\n\n\t\t//Here we apply the best relocation move local search scheme\n\t\t//This is an object for holding the best relocation move that can be applied to the candidate solution\n\t\tRelocationMove rm = new RelocationMove(); // in order to apply one relocation move for all routes - dont want to lose previous if i change vehicle\n\n\t\t//Initialize the relocation move rm\n\t\trm.positionOfRelocated = -1;\n\t\trm.positionToBeInserted = -1;\n\t\trm.fromRoute = 0;\n\t\trm.toRoute = 0;\n\t\trm.fromMoveCost = Double.MAX_VALUE;\n\t\trm.toMoveCost = Double.MAX_VALUE;\n\n\t\t// Until the termination condition is set to true repeat the following block of code\n\t\twhile (terminationCondition == false)\n\t\t{\n\t\t\t//With this function we look for the best relocation move\n\t\t\t//the characteristics of this move will be stored in the object rm\n\t\t\tfindBestRelocationMove(rm, s, distanceMatrix, numberOfVehicles);\n\n\t\t\t// If rm (the identified best relocation move) is a cost improving move, or in other words\n\t\t\t// if the current solution is not a local optimum\n\t\t\tif (rm.moveCost < 0)\n\t\t\t{\n\t\t\t\t//This is a function applying the relocation move rm to the candidate solution\n\t\t\t\tapplyRelocationMove(rm, s, distanceMatrix);\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//if no cost improving relocation move was found,\n\t\t\t\t//or in other words if the current solution is a local optimum\n\t\t\t\t//terminate the local search algorithm\n\t\t\t\tterminationCondition = true;\n\t\t\t}\n\n\t\t\tlocalSearchIterator = localSearchIterator + 1;\n\t\t}\n\n\n\t\t/* \n\t\t * ###########\n\t\t * # RESULTS #\n\t\t * ###########\n\t\t * */\n\t\t\n\t\t\n\t\tSystem.out.println(\"\");\n\t\tfor (int j=0; j<numberOfVehicles; j++)\n\t\t{\n\t\t\tint vehicle_number = j+1;\n\t\t\tSystem.out.println(\"Updated Route for Vehicle #\" + vehicle_number);\n\t\t\tfor (int k=0; k<s.routes.get(j).customers.size(); k++) \n\t\t\t{\n\t\t\t\tSystem.out.print(s.routes.get(j).customers.get(k).ID + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"Route Cost = \" + s.routes.get(j).cost);\n\t\t\tSystem.out.println(\"Final Load: \" + s.routes.get(j).load);\n\t\t\tSystem.out.println(\"Final Remaining Capacity = \" + (rtList.get(j).capacity - s.routes.get(j).load));\n\t\t\tSystem.out.println(\"----------------------------------------\");\n\n\t\t}\t\t\n\t\tSystem.out.println(\"Total Solution Cost = \" + s.cost);\n\t\tSystem.out.println(\"Total Local Search Iterations = \" + localSearchIterator);\n\t\tSystem.out.println(\"Total Local Search Relocations = \" + (localSearchIterator-1));\n\n\n\n\t}", "private static void setStarNeighbours(Galaxy galaxy, JSONArray stars) {\n for (int y = 0; y<stars.length(); y++) {\n JSONArray neighbours = stars.getJSONObject(y).getJSONArray(\"neighbour-stars\");\n //add internal neighbours\n for(int i = 0; i<neighbours.length(); i++){\n int star = (int) neighbours.get(i);\n galaxy.getStar(y+1).addNeighbour(galaxy.getStar(star));\n }\n }\n\n }", "private void createCNSHIsFull() {\r\n createStudentList(new Student(\"Vasile Ana\", 10), new Student(\"Marin Alina\", 6), new Student(\"Ilie David\", 8), new Student(\"Gheorghe Alex\", 9));\r\n createSchoolList(new School(\"C.N.S.H.\", 0), new School(\"C.N.C.H.\", 8), new School(\"C.N.A.E.\", 10));\r\n createStudentPreferences(new LinkedList<>(Arrays.asList(schools[0], schools[1], schools[2])), new LinkedList<>(Arrays.asList(schools[0], schools[1], schools[2])), new LinkedList<>(Arrays.asList(schools[0], schools[1])), new LinkedList<>(Arrays.asList(schools[0], schools[2])));\r\n createSchoolPreferences(new LinkedList<>(Arrays.asList(students[0], students[1], students[2], students[3])), new LinkedList<>(Arrays.asList(students[0], students[1], students[2])), new LinkedList<>(Arrays.asList(students[1], students[3], students[0])));\r\n }", "private void initJTableSchoolStudents() {\n schoolStudents = new SchoolStudents();\n // Load data from database\n schoolStudents.findAll(entityManager);\n\n // Model for JTable, assigning classgroups content\n schoolStudentsTableModel = new SchoolStudentsTableModel(schoolStudents);\n jTableSchoolStudents.setModel(schoolStudentsTableModel); \n\n // Allow only one row selected\n jTableSchoolStudents.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n \n // Listen for student selection in jtable\n jTableSchoolStudents.getSelectionModel().addListSelectionListener(\n new ListSelectionListener() {\n @Override\n public void valueChanged(ListSelectionEvent event) {\n int indexSelectedRow = jTableSchoolStudents.getSelectedRow();\n if(indexSelectedRow >= 0) {\n schoolStudentSelected = schoolStudents.getSchoolStudentList().get(indexSelectedRow);\n showDetailStudentSelected();\n } else {\n jTextFieldName.setText(\"\");\n jTextFieldSurnames.setText(\"\");\n jTextFieldGrade.setText(\"\");\n }\n }\n }\n );\n \n enableEditingStudentDetail(false);\n }", "public void update(){\n\t\tif ( crm.addedNewStudent()){\n\t\t\tList<Student> students = crm.getStudents();\n\t\t\tStudent newest = students.get(students.size()-1);\n\t\t\tint ID = newest.ID();\n\t\t\tString name = newest.name();\n\t\t\tint GradYear = newest.GradYear();\n\t\t\tsv.addStudent(ID, name, GradYear);\n\t\t}\n\t}", "public static ArrayList<ArrayList<ArrayList<Double>>> assignScoreToQueries() {\r\n\t\t\r\n\t\tArrayList<ArrayList<ArrayList<Double>>> allQueries = Queries.createQueries();\r\n\t\tArrayList<ArrayList<String>> dataset = ReadInDataset.finalDataset;\r\n\t\tint Counter = 0;\r\n\t\tDouble Score = 0.0;\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.####\");\r\n\t\tdf.setRoundingMode(RoundingMode.CEILING); // round up to 4 decimal places\r\n\t\t\r\n\t\t\r\n\t\t// initially assign to each query a score of 0\r\n\t\t\r\n\t\tfor (int i = 0; i < allQueries.size(); i++) {\r\n\t\t\tArrayList<Double> zero = new ArrayList<Double>();\r\n\t\t\tzero.add(0.0);\r\n\t\t\tallQueries.get(i).add(zero);}\r\n\t\t\r\n\t\t// go through each query and check how many entries of the dataset it matches\r\n\t\t// with each match increase the score\r\n\t\t\r\n\t\tfor (int i = 0; i < allQueries.size(); i++) { // for each query\r\n\t\t\tfor(int b=0; b < dataset.size(); b++) { // for each dataset\r\n\t\t\t\tCounter = 0; \r\n\t\t\t\tfor (int a=0; a < allQueries.get(i).size()-1; a++) { // for each query clause\r\n\t\t\t\t//check if the query criteria match the dataset and increase the Score accordingly\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //this counter ensures that all query requirements are met in order to increase the score\r\n\t\t\t\t\tif (a != allQueries.get(i).size() - 1) {\t\t\t\t\t\t // ensure that Score entry is not involved in Query Matching\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// take min and max from query along with an entry from the dataset, convert to a double of 4 decimal places\r\n\t\t\t\t\t\tdouble minPoint1 = allQueries.get(i).get(a).get(0);\r\n\t\t\t\t\t\tString minPoint2 = df.format(minPoint1);\r\n\t\t\t\t\t\tdouble minPoint = Double.parseDouble(minPoint2);\r\n\t\t\t\t\t\tdouble maxPoint1 = allQueries.get(i).get(a).get(1);\r\n\t\t\t\t\t\tString maxPoint2 = df.format(maxPoint1);\r\n\t\t\t\t\t\tdouble maxPoint = Double.parseDouble(maxPoint2);\r\n\t\t\t\t\t\tdouble dataPoint1 = Double.parseDouble(dataset.get(b).get(a+1));\r\n\t\t\t\t\t\tString dataPoint2 = df.format(dataPoint1);\r\n\t\t\t\t\t\tdouble dataPoint = Double.parseDouble(dataPoint2);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ( dataPoint<= maxPoint && dataPoint >= minPoint) { Counter++; \r\n\t\t\t\t\t//\tSystem.out.println(\"min:\" + minPoint+\" max: \"+maxPoint+\" data: \"+dataPoint+ \" of Query: \" + b+ \"| Query Match!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {//System.out.println(minPoint+\" \"+maxPoint+\" \"+dataPoint+ \" of \" + b);\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\tif (Counter==(Queries.getDimensions())/2) { // if counter equals the dimensions of the query then increase score\r\n\t\t\t\t\tScore = allQueries.get(i).get(allQueries.get(i).size()-1).get(0);\r\n\t\t\t\t\tallQueries.get(i).get(allQueries.get(i).size()-1).set(0, Score+1.00); \r\n\t\t\t\t\t}}\r\n\t\t\t\t \r\n\t\t\t\t}\r\n\t\t//\tSystem.out.println(\"Score = \" + allQueries.get(i).get(allQueries.get(i).size()-1).get(0));\r\n\t\t}\t\r\n\t\treturn allQueries;\r\n\t}", "TrainingEstimator(RatingMatrix snap, BiasModel baseline, PreferenceDomain dom) {\n ratings = snap.getRatings();\n domain = dom;\n estimates = new double[ratings.size()];\n\n final LongCollection userIds = snap.getUserIds();\n LongIterator userIter = userIds.iterator();\n double global = baseline.getIntercept();\n\n for (RatingMatrixEntry r: snap.getRatings()) {\n double userBias = baseline.getUserBias(r.getUserId());\n double itemBias = baseline.getItemBias(r.getItemId());\n estimates[r.getIndex()] = global + userBias + itemBias;\n }\n }", "@Override\n public WeightedGraph<Long> computeTrustValues(\n DatasetLoader<? extends Rating> datasetLoader,\n Collection<Long> users) throws CannotLoadRatingsDataset {\n boolean printPartialResults;\n\n final RatingsDataset<? extends Rating> ratingsDataset = datasetLoader.getRatingsDataset();\n printPartialResults = ratingsDataset.allRatedItems().size() <= 100 && ratingsDataset.allUsers().size() <= 28;\n\n if (!Global.isInfoPrinted()) {\n printPartialResults = false;\n }\n\n int numTrustValuesThatNeedToBePropagated = 0;\n\n Map<Long, Map<Long, Number>> MSD = new TreeMap<>();\n Map<Long, Map<Long, Number>> UJaccard = new TreeMap<>();\n {\n int i = 1;\n for (Long idUser : users) {\n MSD.put(idUser, new TreeMap<>());\n UJaccard.put(idUser, new TreeMap<>());\n\n Map<Long, ? extends Rating> userRatings;\n try {\n userRatings = ratingsDataset.getUserRatingsRated(idUser);\n } catch (UserNotFound ex) {\n ERROR_CODES.USER_NOT_FOUND.exit(ex);\n return null;\n }\n\n //Para cada vecino calculo el MSD\n for (Long idUserNeighbor : users) {\n try {\n double meanUser = ratingsDataset.getMeanRatingUser(idUser);\n double meanUserNeighbour = ratingsDataset.getMeanRatingUser(idUserNeighbor);\n\n Map<Long, ? extends Rating> userNeighbourRatings = ratingsDataset.getUserRatingsRated(idUserNeighbor);\n\n Set<Long> commonItems = new TreeSet<>(userRatings.keySet());\n commonItems.retainAll(userNeighbourRatings.keySet());\n if (commonItems.isEmpty()) {\n numTrustValuesThatNeedToBePropagated++;\n continue;\n }\n double[] ratings = new double[commonItems.size()];\n double[] predictions = new double[commonItems.size()];\n\n //Compute predictions. At the same time, compute mand min of rating and prediction, to save cycles later on.\n double ratingMax = -Double.MAX_VALUE;\n double ratingMin = Double.MAX_VALUE;\n double predictionMax = -Double.MAX_VALUE;\n double predictionMin = Double.MAX_VALUE;\n\n {\n int index = 0;\n for (Long idItem : commonItems) {\n double rating = userRatings.get(idItem).getRatingValue().doubleValue();\n ratings[index] = rating;\n double prediction = meanUser + userNeighbourRatings.get(idItem).getRatingValue().doubleValue() - meanUserNeighbour;\n predictions[index] = prediction;\n index++;\n\n ratingMax = Math.max(ratingMax, rating);\n ratingMin = Math.min(ratingMin, rating);\n predictionMax = Math.max(predictionMax, prediction);\n predictionMin = Math.min(predictionMin, prediction);\n }\n }\n\n //Ratings MaxMin normalisation\n if (ratingMax == ratingMin) {\n for (int index = 0; index < ratings.length; index++) {\n ratings[index] = 1;\n }\n } else {\n for (int index = 0; index < ratings.length; index++) {\n ratings[index] = (ratings[index] - ratingMin) / (ratingMax - ratingMin);\n }\n }\n\n //Predictions MaxMin normalisation\n if (predictionMax == predictionMin) {\n for (int index = 0; index < predictions.length; index++) {\n predictions[index] = 1;\n }\n } else {\n for (int index = 0; index < ratings.length; index++) {\n predictions[index] = (predictions[index] - predictionMin) / (predictionMax - predictionMin);\n }\n }\n\n //Calculo el MSD\n double sumOfError = 0;\n for (int index = 0; index < ratings.length; index++) {\n sumOfError += Math.pow(ratings[index] - predictions[index], 2);\n }\n\n double MSD_of_pair = 1 - (sumOfError / commonItems.size());\n MSD.get(idUser).put(idUserNeighbor, MSD_of_pair);\n\n //Calculo el Jaccard\n double numUserRatings = userRatings.size();\n double numUserNeighborRatings = userNeighbourRatings.size();\n double numCommon = commonItems.size();\n double jaccard_of_pair = numCommon / (numUserRatings + numUserNeighborRatings - commonItems.size());\n UJaccard.get(idUser).put(idUserNeighbor, jaccard_of_pair);\n } catch (UserNotFound ex) {\n ERROR_CODES.USER_NOT_FOUND.exit(ex);\n }\n }\n\n fireProgressChanged(\"User-Based trust\", (int) ((i * 100.0f) / users.size()), -1);\n\n if (Global.isVerboseAnnoying()) {\n Global.showInfoMessage(new Date().toString() + \": User-based trust \" + ((i * 100.0f) / users.size()) + \"%\\n\");\n }\n i++;\n }\n }\n\n TreeMap<Long, Map<Long, Number>> usersTrust = new TreeMap<>();\n for (Long idUser : users) {\n usersTrust.put(idUser, new TreeMap<>());\n\n for (Long idUserNeighbour : users) {\n\n if (!UJaccard.containsKey(idUser) || !UJaccard.get(idUser).containsKey(idUserNeighbour) || !MSD.containsKey(idUser) || !MSD.get(idUser).containsKey(idUserNeighbour)) {\n continue;\n }\n\n usersTrust.get(idUser).put(idUserNeighbour, MSD.get(idUser).get(idUserNeighbour).doubleValue() * UJaccard.get(idUser).get(idUserNeighbour).doubleValue());\n\n }\n }\n\n UJaccard.clear();\n MSD.clear();\n\n if (propagate == false) {\n return new WeightedGraph<>(usersTrust);\n }\n\n fireProgressChanged(\"Trust propagation\", 0, -1);\n\n /**\n * Las confianzas propagadas se incluyen aqui para no ser tenidas en\n * cuenta al propagar confianza, sólo cuando ha finalizado el proceso.\n */\n Map<Long, Map<Long, Double>> propagatedTrusts = new TreeMap<>();\n {\n int i = 0;\n for (Long idSourceUser : users) {\n for (Long idTargetUser : users) {\n if (usersTrust.get(idSourceUser).containsKey(idTargetUser)) {\n //Los usuarios ya son adyacentes, no es necesario propagar.\n } else {\n if (!propagatedTrusts.containsKey(idSourceUser)) {\n propagatedTrusts.put(idSourceUser, new TreeMap<>());\n }\n //Propagate trust to complete this connection.\n if (printPartialResults) {\n Global.showInfoMessage(\"Propagating trust between user \" + idSourceUser + \" and user \" + idTargetUser + \"\\n\");\n }\n\n Set<Long> adyacentesAAmbos = new TreeSet<>(usersTrust.get(idSourceUser).keySet());\n adyacentesAAmbos.retainAll(usersTrust.get(idTargetUser).keySet());\n if (adyacentesAAmbos.isEmpty()) {\n //No tienen ningún adyacente en común, por lo que no se puede propagar, hay que contar este enlace para el porcentaje de progreso.\n } else {\n double numerador = 0;\n double denominador = 0;\n for (Long idIntermediateUser : adyacentesAAmbos) {\n double usersTrustAB = usersTrust.get(idSourceUser).get(idIntermediateUser).doubleValue();\n double usersTrustBC = usersTrust.get(idIntermediateUser).get(idTargetUser).doubleValue();\n int numCommonAB;\n try {\n TreeSet<Long> commonAB = new TreeSet<>(ratingsDataset.getUserRated(idSourceUser));\n commonAB.retainAll(ratingsDataset.getUserRated(idIntermediateUser));\n numCommonAB = commonAB.size();\n } catch (UserNotFound ex) {\n numCommonAB = 0;\n ERROR_CODES.USER_NOT_FOUND.exit(ex);\n }\n\n int numCommonBC;\n try {\n TreeSet<Long> commonBC = new TreeSet<>(ratingsDataset.getUserRated(idIntermediateUser));\n commonBC.retainAll(ratingsDataset.getUserRated(idTargetUser));\n numCommonBC = commonBC.size();\n } catch (UserNotFound ex) {\n numCommonBC = 0;\n ERROR_CODES.USER_NOT_FOUND.exit(ex);\n }\n\n //Efectivamente, numCommonAB y/o numCommonBC pueden ser cero si la confianza viene de haber sido propagada previamente (Esto ya no se aplica ya que la confianza propagada no se tiene en cuenta para propagar otros valores).\n double contribucionNumerador = numCommonAB * usersTrustAB + numCommonBC * usersTrustBC;\n double contribucionDenominador = numCommonAB + numCommonBC;\n numerador += contribucionNumerador;\n denominador += contribucionDenominador;\n }\n double PTrustAB = numerador / denominador;\n propagatedTrusts.get(idSourceUser).put(idTargetUser, PTrustAB);\n if (printPartialResults) {\n Global.showInfoMessage(\"Propagated trust between user \" + idSourceUser + \" and user \" + idTargetUser + \" --> \" + PTrustAB + \" (\" + (int) ((i * 100f) / numTrustValuesThatNeedToBePropagated) + \"%)\\n\");\n }\n }\n fireProgressChanged(\"User trust propagation\", (int) ((i * 100f) / numTrustValuesThatNeedToBePropagated), -1);\n i++;\n }\n }\n }\n }\n\n //Una vez todas las confianzas propagadas se han calculado, se introducen en el grafo.\n for (Long idSourceUser : propagatedTrusts.keySet()) {\n for (Long idTargetUser : propagatedTrusts.get(idSourceUser).keySet()) {\n double PTrustAB = propagatedTrusts.get(idSourceUser).get(idTargetUser);\n usersTrust.get(idSourceUser).put(idTargetUser, PTrustAB);\n }\n }\n\n fireProgressChanged(\"Finished trust calculation\", 100, -1);\n return new WeightedGraph<>(usersTrust);\n }", "public Siec(ArrayList<Pair<String, ArrayList<Double>>> info) {\n\t\tneurony = new ArrayList<Neuron>();\t\n\t\tfor (Pair<String, ArrayList<Double>> znak : info) {\n\t\t\tNeuron neuron = new Neuron(znak.getRight());\n\t\t\tneuron.nazwa = znak.getLeft();\t\t\n\t\t\tneurony.add(neuron);\n\t\t}\n\t}", "private static void populateBlocks() {\n\n //TODO set sensors for each\n\n /* Path A */\n SW1A.setProceeding(new Block[]{SW2A, STA1Z, SW2B});\n SW1A.setPreceding(new Block[]{PTH5A});\n\n SW2A.setProceeding(new Block[]{LD1A});\n SW2A.setPreceding(new Block[]{SW1A});\n\n SW3A.setProceeding(new Block[]{SW4A});\n SW3A.setPreceding(new Block[]{LD1A});\n\n SW4A.setProceeding(new Block[]{PTH1A});\n SW4A.setPreceding(new Block[]{SW3A, STA1Z, SW3B});\n\n PTH1A.setProceeding(new Block[]{PTH2A});\n PTH1A.setPreceding(new Block[]{SW4A});\n\n PTH2A.setProceeding(new Block[]{PTH3A});\n PTH2A.setPreceding(new Block[]{PTH1A});\n\n PTH3A.setProceeding(new Block[]{PTH4A});\n PTH3A.setPreceding(new Block[]{PTH2A});\n\n PTH4A.setProceeding(new Block[]{PTH5A});\n PTH4A.setPreceding(new Block[]{PTH3A});\n\n PTH5A.setProceeding(new Block[]{SW1A});\n PTH5A.setPreceding(new Block[]{PTH4A});\n\n LD1A.setProceeding(new Block[]{SW3A});\n LD1A.setPreceding(new Block[]{SW2A});\n\n\n /* Station */\n STA1Z.setProceeding(new Block[]{SW4A});\n STA1Z.setPreceding(new Block[]{SW1A});\n\n\n /* Path B */\n //TODO path B items aren't in yet\n LD1B.setProceeding(new Block[]{SW3B});\n LD1B.setPreceding(new Block[]{SW2B});\n\n SW2B.setProceeding(new Block[]{LD1B});\n SW2B.setPreceding(new Block[]{SW1B});\n\n SW3B.setProceeding(new Block[]{SW4B});\n SW3B.setPreceding(new Block[]{LD1B});\n\n\n /* Maintenance Bay */\n //TODO maintenance bay items aren't in yet\n\n\n\n\n /* Set up array */\n blocksArray = new Block[] {}; //TODO fill\n }", "private void update() {\r\n\t\t\r\n\t\tfor(int r = 0; r < seatGrid.length; r++) {\r\n\t\t\tfor(int c =0; c< seatGrid[0].length; c++) {\r\n\t\t\t\tseatGrid[r][c].setText(chart.getStudentName(r, c));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tStudent ivan = new Student(\"Ivan Petrov\", \"Computer Science\");\n\t\tivan.grade=5.5;\n\t\tivan.yearInCollege=2;\n\t\tivan.money=500;\n\t\tivan.age=19;\n\t\t\n\t\tStudent teodor = new Student(\"Teodor Alexiev\", \"Computer Science\");\n\t\tteodor.grade=5.25;\n\t\tteodor.yearInCollege=3;\n\t\tteodor.money=300;\n\t\tteodor.age=20;\n\t\t\n\t\tStudent irina = new Student(\"Irina Paraskelova\", \"Computer Science\");\n\t\tirina.grade = 5.65;\n\t\tirina.money=400;\n\t\tirina.age=18;\n\t\t\n\t\tStudent vasilena = new Student (\"Vasilena Kremenlieva\", \"Computer Science\");\n\t\tvasilena.grade = 5.0;\n\t\tvasilena.money=1000;\n\t\tvasilena.age=18;\n\t\t\n\t\tStudent trifon = new Student(\"Trifon Stoimenov\", \"Computer Science\");\n\t\ttrifon.grade = 5.70;\n\t\ttrifon.yearInCollege=3;\n\t\ttrifon.money = 800;\n\t\ttrifon.age=21;\n\t\t\n\t\tStudent alexander = new Student (\"Alexander Dobrikov\", \"Finance\");\n\t\talexander.grade = 4.75;\n\t\talexander.yearInCollege = 2;\n\t\talexander.money = 600;\n\t\talexander.age = 20;\n\t\t\n\t\tStudent mirela = new Student (\"Mirela Kostadinova\", \"Finance\");\n\t\tmirela.grade = 5.5;\n\t\tmirela.yearInCollege=1;\n\t\tmirela.money=100;\n\t\tmirela.age=19;\n\t\t\n\t\tStudent velizar = new Student(\"Velizar Stoyanov\", \"Finance\");\n\t\tvelizar.grade = 6.0;\n\t\tvelizar.yearInCollege = 3;\n\t\tvelizar.money = 500;\n\t\tvelizar.age = 22;\n\t\t\n\t\tStudent antoaneta = new Student(\"Antoaneta Borisova\", \"Finance\");\n\t\tantoaneta.grade = 5.30;\n\t\tantoaneta.yearInCollege = 2;\n\t\tantoaneta.money = 750;\n\t\tantoaneta.age = 19;\n\t\t\n\t\tirina.upYear();\n\t\tSystem.out.println(\"Irina is in year \"+irina.yearInCollege+\" of college.\");\n\t\t\n\t\tvasilena.receiveScholarship(5.0, 350);\n\t\tSystem.out.println(vasilena.money);\n\t\t\n\t\tStudentGroup cs1 = new StudentGroup(\"Computer Science\");\n\t\tcs1.addStudent(ivan);\n\t\tcs1.addStudent(teodor);\n\t\tcs1.addStudent(irina);\n\t\tcs1.addStudent(vasilena);\n\t\tcs1.addStudent(trifon);\n\t\tteodor.upYear();\n\t\tSystem.out.println(teodor.isDegree);\n\t\t\n\t\tcs1.addStudent(velizar);\n\t\t\n\t\tcs1.printStudentsInGroup();\n\t\tSystem.out.println(cs1.theBestStudent());\n\t\t\n\t\tcs1.emptyGroup();\n\t\tcs1.printStudentsInGroup();\n\t\t\n\t\tStudentGroup fin1 = new StudentGroup(\"Finance\");\n\t\t\n\t\tfin1.addStudent(alexander);\n\t\tfin1.addStudent(mirela);\n\t\tfin1.addStudent(velizar);\n\t\tfin1.addStudent(antoaneta);\n\t\t\n\t\tfin1.printStudentsInGroup();\n\t\t\t\n\t\t\n\t}", "public static void main(String[] args){\n\t\tPersonalData data1= new PersonalData(1982,01,11,234567890);\n\t\tPersonalData data2= new PersonalData(1992,10,19,876543210);\n\t\tPersonalData data3= new PersonalData(1989,04,27,928374650);\n\t\tPersonalData data4= new PersonalData(1993,07,05,819463750);\n\t\tPersonalData data5= new PersonalData(1990,11,03,321678950);\n\t\tPersonalData data6= new PersonalData(1991,11,11,463728190);\n\t\tStudent student1=new Student(\"Ali Cantolu\",5005,50,data1);\n\t\tStudent student2=new Student(\"Merve Alaca\",1234,60,data2);\n\t\tStudent student3=new Student(\"Gizem Kanca\",5678,70,data3);\n\t\tStudent student4=new Student(\"Emel Bozdere\",8902,70,data4);\n\t\tStudent student5=new Student(\"Merter Kazan\",3458,80,data5);\n\n\t\t//A course (let us call it CSE141) with a capacity of 3 is created\n\t\tCourse CSE141=new Course(\"CSE141\",3);\n\n\t\t//Any 4 of the students is added to CSE141.\n\t\tif (!CSE141.addStudent(student1)) System.out.println(student1.toString()+ \" is not added\");\n\t\tif (!CSE141.addStudent(student2)) System.out.println(student2.toString()+ \" is not added\");\n\t\tif (!CSE141.addStudent(student3)) System.out.println(student3.toString()+ \" is not added\");\n\t\tif (!CSE141.addStudent(student4)) System.out.println(student4.toString()+ \" is not added\");\n\n\n\t\t//All students of CSE141 are printed on the screen.\n System.out.println(\"\\nAll students of \"+CSE141.getCourseName()+\": \");\n CSE141.list();\n\n //The capacity of CSE141 is increased.\n CSE141.increaseCapacity();\n\n //Remaining 2 students are added to CSE141.\n\t \tCSE141.addStudent(student4);\n\t \tCSE141.addStudent(student5);\n\n\t \t//All students of CSE141 are printed on the screen.\n\t \tSystem.out.println(\"\\nAll students of \"+CSE141.getCourseName()+\": \");\n\t \tCSE141.list();\n\n\t \t//Student with ID 5005 is dropped from CSE141.\n\t \tCSE141.dropStudent(student1);\n\n\t \t//All students of CSE141 are printed on the screen.\n\t \tSystem.out.println(\"\\nAll students of \"+CSE141.getCourseName()+\": \");\n\t \tCSE141.list();\n\n\t \t//Number of students enrolled to CSE141 is printed.\n\t \tSystem.out.println(\"\\nNumber of students enrolled to \"+CSE141.getCourseName()+\": \" + CSE141.getNumberOfStudents());\n\n\t \t//Birth year of best student of CSE141 is printed on the screen. (You should use getYear() method of java.util.Date class.)\n\t \tSystem.out.println(\"\\nBirth year of best student of CSE141 is \"+CSE141.getBestStudent().getPersonalData().getBirthDate().getYear());\n\n\t \t//A new course (let us call it CSE142) is created.\n\t \tCourse CSE142=new Course(\"CSE142\");\n\n\t \t//All students currently enrolled in CSE141 are added to CSE142. (You should use getStudents() method).\n\t \tStudent[] students = CSE141.getStudents();\n\t \tfor(int i=0;i<CSE141.getNumberOfStudents();i++)\n\t \t\tCSE142.addStudent(students[i]);\n\n\t \t//All students of CSE141 are removed from the course.\n\t \tCSE141.clear();\n\n\t \t//Student with ID 5005 is dropped from CSE141 and result of the operation is printed on the screen.\n\t \tSystem.out.println(\"\\nThe result of the operation 'Student with ID 5005 is dropped from \"+CSE141.getCourseName()+\"' is: \"+CSE141.dropStudent(student1));\n\n\t \t//All students of CSE142 are printed on the screen.\n\t \tSystem.out.println(\"\\nAll students of \"+CSE142.getCourseName()+\": \");\n\t \tCSE142.list();\n\n\t \t//Best student of CSE142 is dropped from CSE142.\n\t \tCSE142.dropStudent(CSE142.getBestStudent());\n\n\t \t//All students of CSE142 are printed on the screen.\n\t \tSystem.out.println(\"\\nAll students of \"+CSE142.getCourseName()+\": \");\n\t \tCSE142.list();\n\n\t \t//GPA of youngest student of CSE142 is printed on the screen.\n\t\tSystem.out.println(\"\\nThe Youngest Student's (\"+CSE142.getYoungestStudent()+\") GPA is \"+CSE142.getYoungestStudent().GPA());\n\n\t \t//Courses CSE141 and CSE142 are printed on the screen.\n\t \tSystem.out.println(\"\\nCourse Information for \"+CSE141.getCourseName()+\":\\n\" + CSE141.toString());\n\t \tSystem.out.println(\"\\nCourse Information for \"+CSE142.getCourseName()+\":\\n\" + CSE142.toString());\n\t }", "public static void main(String[] args) {\n City city = new City(60, 200);\n\n City city2 = new City(180, 200);\n\n City city3 = new City(80, 180);\n City city4 = new City(140, 180);\n\n City city5 = new City(20, 160);\n\n City city6 = new City(100, 160);\n\n City city7 = new City(200, 160);\n\n City city8 = new City(140, 140);\n\n City city9 = new City(40, 120);\n\n City city10 = new City(100, 120);\n\n City city11 = new City(180, 100);\n\n City city12 = new City(60, 80);\n\n City city13 = new City(120, 80);\n City city14 = new City(180, 60);\n City city15 = new City(20, 40);\n\n City city16 = new City(100, 40);\n\n City city17 = new City(200, 40);\n City city18 = new City(20, 20);\n\n City city19 = new City(60, 20);\n City city20 = new City(160, 20);\n List<City> list=new ArrayList<City>();\n list.add(city);list.add(city2);\n list.add(city3);\n list.add(city4);\n list.add(city5);\n list.add(city6);\n list.add(city7);\n list.add(city8);\n list.add(city9);\n list.add(city10);\n list.add(city11);\n list.add(city12);\n list.add(city13);\n list.add(city14);\n list.add(city15);\n list.add(city16);\n list.add(city17);\n list.add(city18);\n list.add(city19);\n list.add(city20);\n\n // Initialize population\n Population pop = new Population(100, true,list);\n System.out.println(\"Initial distance: \" + pop.getBestTour().getDistance());\n\n // Evolve population for 100 generations\n pop = Ga.evolvePopulation(pop);\n for (int i = 0; i < 500; i++) {\n pop = Ga.evolvePopulation(pop);\n System.out.println(\"第\"+i+\"代\"+pop.getBestTour().getDistance());\n }\n\n // Print final results\n System.out.println(\"Finished\");\n System.out.println(\"Final distance: \" + pop.getBestTour().getDistance());\n System.out.println(\"Solution:\");\n System.out.println(pop.getBestTour());\n }", "public static void main(String[] args) {\n\t\tStudent s1 = new Student(\"Joro\", \"KST\", (byte)25);\n\t\tStudent s2 = new Student(\"Pesho\", \"KST\", (byte)25);\n\t\tStudent s3 = new Student(\"Gesho\", \"KST\", (byte)25);\n\t\tStudent s4 = new Student(\"Misho\", \"KST\", (byte)25);\n\t\tStudent s5 = new Student(\"Tisho\", \"KST\", (byte)25);\n\t\tStudent s6 = new Student(\"Ivo\", \"KST\", (byte)25);\n\t\t\n\t\ts3.setGrade(5);\n\t\ts5.setGrade(5.5);\n\t\ts2.setGrade(6);\n\t\t\n\t\ts1.receiveScholarship(4, 500);\n\t\ts2.receiveScholarship(5, 250.00);\n\t\t\n\t\t\n\t\ts2.upYear();\n\t\ts5.upYear();\n\t\ts6.upYear();\n\t\t\n\t\tStudentGroup sg1 = new StudentGroup(\"KST\") ;\n\t\t\n\t\tsg1.addStudent(s1);\n\t\tsg1.addStudent(s2);\n\t\tsg1.addStudent(s3);\n\t\tsg1.addStudent(s4);\n\t\tsg1.addStudent(s5);\n\t\tsg1.addStudent(s6);\n\n\t\n\t\tSystem.out.println(sg1.printStudentsInGroup());\n\t\t\n\t\t\n\t\tSystem.out.println(\"The best student in group is \"+ sg1.theBestStudent());\n\n\t}", "public FrmResult(ArrayList<DataReview> dataRvw) {\n this.dataRvw = dataRvw;\n ArrayList<Results> arrRes = new ArrayList<Results>();\n // ArrayList<Results> arrResFinal = new ArrayList<Results>();\n Results resLower = null;\n initComponents();\n \n Iterator<DataReview> itrDr = this.dataRvw.iterator();\n while(itrDr.hasNext()){\n DataReview dr = itrDr.next();\n String code = dr.getCode();\n float ave = dr.getAverage();\n \n // Data\n Results r = new Results();\n ArrayList<Feature> arrFea = new ArrayList<Feature>(); //Array de Features\n \n // System.out.println(\"code: \"+code+\" ave: \"+ave);\n \n int limit = 1; // Cut String limite\n for (int i = 0; i < code.length()-1; i++) {\n Feature f = new Feature();\n f.setFtr(Integer.parseInt(code.substring(i,limit)));\n limit += 1;\n \n arrFea.add(f);\n }\n \n r.setCode(arrFea);\n r.setAve(ave);\n \n arrRes.add(r);\n }\n \n// Iterator<Results> itrRes = arrRes.iterator();\n// while (itrRes.hasNext()){\n// Results res = itrRes.next();\n// ArrayList<Feature> arrFea2 = res.getCode();\n// float ave = res.getAve();\n// \n// System.out.print(\"ArrayFeatures: \");\n// Iterator<Feature> itrFea = arrFea2.iterator();\n// while (itrFea.hasNext()) {\n// Feature f = itrFea.next();\n// System.out.print(f.getFtr());\n// }\n// System.out.println(\" Average: \"+res.getAve());\n// }\n \n resLower = arrRes.get(0); // Take teh lower result to get the neighbors.\n \n Iterator<Results> itrRes = arrRes.iterator();\n while (itrRes.hasNext()){\n Results res = itrRes.next();\n ArrayList<Feature> arrFeaRes = res.getCode();\n float ave = res.getAve();\n \n ArrayList<Feature> arrFeaRLower = resLower.getCode();\n \n int cont = 0;\n \n for (int i = 0; i < arrFeaRes.size(); i++) {\n if (arrFeaRes.get(i).getFtr()!=arrFeaRLower.get(i).getFtr()) {\n // System.out.println(\"AR: \"+arrFeaRes.get(i).getFtr()+\" >> \"+arrFeaRLower.get(i).getFtr());\n cont += 1;\n }\n }\n \n // System.out.println(\"\");\n \n // Create de Result Final\n Results resFinal = new Results();\n resFinal.setCode(arrFeaRes);\n resFinal.setAve(ave);\n resFinal.setDist(cont);\n \n if(cont!=0){\n this.arrResFinal.add(resFinal);\n }\n }\n \n\n System.out.println(\"<< RESULTS >>\");\n System.out.print(\"Lower Node: \");\n Iterator<Feature> itrFeaResLow = resLower.getCode().iterator();\n while (itrFeaResLow.hasNext()) {\n System.out.print(itrFeaResLow.next().getFtr()); \n }\n System.out.println(\"\");\n \n Iterator<Results> itrResFinal = this.arrResFinal.iterator();\n while (itrResFinal.hasNext()) {\n Results r = itrResFinal.next();\n ArrayList<Feature> arrFea = r.getCode();\n float ave = r.getAve();\n int dist = r.getDist();\n \n System.out.print(\"Features: \");\n Iterator<Feature> itrArrFea = arrFea.iterator();\n while (itrArrFea.hasNext()) {\n Feature f = itrArrFea.next();\n System.out.print(f.getFtr());\n }\n System.out.println(\" Average: \"+ave+\" Distance: \"+dist);\n }\n \n // take the first object DataReview cause it's lower.\n for (int i = 0; i < 1; i++) {\n DataReview dr = this.dataRvw.get(i);\n KnnId.setText(dr.getCode());\n KnnAve.setText(String.valueOf(dr.getAverage()));\n }\n }", "public static void process(Scanner s) {\n\t\tfor (int k = s.nextInt(); k > 0; k--) {\n\t\t\t//Calling all of the information for a student\n\t\t\tString first = s.next();\n\t\t\tString last = s.next();\n\t\t\tdouble assignment = s.nextDouble() * .4;\n\t\t\tdouble participation = s.nextDouble() * .15;\n\t\t\tdouble midterm = s.nextDouble() * .2;\n\t\t\tdouble examFinal= s.nextDouble() * .25;\n\t\t\t//Adding the scores together to make a final grade\n\t\t\tdouble grade = (assignment + participation + midterm + examFinal);\n\t\t\tString finalgrade = \"F\";\n\t\t\tif (grade >= 94) {\n\t\t\t\tfinalgrade = \"A\";\n\t\t\t} else if (grade >= 90) {\n\t\t\t\tfinalgrade = \"A-\";\n\t\t\t} else if (grade >= 86) {\n\t\t\t\tfinalgrade = \"B+\";\n\t\t\t} else if (grade >= 83) {\n\t\t\t\tfinalgrade = \"B\";\n\t\t\t} else if (grade >= 80) {\n\t\t\t\tfinalgrade = \"B-\";\n\t\t\t} else if (grade >= 76) {\n\t\t\t\tfinalgrade = \"C+\";\n\t\t\t} else if (grade >= 73) {\n\t\t\t\tfinalgrade = \"C\";\n\t\t\t} else if (grade >= 70) {\n\t\t\t\tfinalgrade = \"C-\";\n\t\t\t} else if (grade >= 65) {\n\t\t\t\tfinalgrade = \"D+\";\n\t\t\t} else if (grade >= 60) {\n\t\t\t\tfinalgrade = \"D\";\n\t\t\t}\n\t\t\t//Joining the various data points into the correct format\n\t\t\tSystem.out.println(first.charAt(0) + \". \" + last + \" \" + finalgrade);\n\t\t}\n\t}", "void setAdjForSecondType() {\n matrixOfSquares[0][0].setCardinalSquare(null, matrixOfSquares[1][0] , null, matrixOfSquares[0][1]);\n matrixOfSquares[0][1].setCardinalSquare(null, null , matrixOfSquares[0][0], matrixOfSquares[0][2]);\n matrixOfSquares[0][2].setCardinalSquare(null,matrixOfSquares[1][2] , matrixOfSquares[0][1], matrixOfSquares[0][3]);\n matrixOfSquares[0][3].setCardinalSquare(null,matrixOfSquares[1][3] , matrixOfSquares[0][2], null);\n matrixOfSquares[1][0].setCardinalSquare(matrixOfSquares[0][0], null, null, matrixOfSquares[1][1] );\n matrixOfSquares[1][1].setCardinalSquare(null, matrixOfSquares[2][1], matrixOfSquares[1][0], null );\n matrixOfSquares[1][2].setCardinalSquare(matrixOfSquares[0][2] , matrixOfSquares[2][2], null, matrixOfSquares[1][3]);\n matrixOfSquares[1][3].setCardinalSquare(matrixOfSquares[0][3], matrixOfSquares[2][3], matrixOfSquares[1][2], null);\n matrixOfSquares[2][1].setCardinalSquare(matrixOfSquares[1][1],null, null, matrixOfSquares[2][2] );\n matrixOfSquares[2][2].setCardinalSquare(matrixOfSquares[1][2], null, matrixOfSquares[2][1], matrixOfSquares[2][3] );\n matrixOfSquares[2][3].setCardinalSquare(matrixOfSquares[1][3], null, matrixOfSquares[2][2], null);\n\n }", "private void createHeuristics() {\n int linkCount = 0, // Stores the number of linking squares for a\n // particular square\n testRow, // Knight's current row plus a move number value\n testCol; // Knight's current column plus a move number value\n\n // Adds a move number value to the knight's current row and tests\n // whether it is a move candidate.\n // If the location is on the game board, it increments the link count\n for (int row = 0; row < BOARD_SIZE; row++) {\n for (int col = 0; col < BOARD_SIZE; col++) {\n for (int moveNum = 0; moveNum < Knight.NUM_ALLOWED_MOVES; moveNum++) {\n testRow = row + currentKnight.getVerticalMoveValue(moveNum);\n testCol = col\n + currentKnight.getHorizontalMoveValue(moveNum);\n\n if (checkSquareExistsAndIsUnVisted(testRow, testCol) == true) {\n linkCount++;\n }\n }\n\n // Set accessibility and reset link count for next column\n setSquareAccessibility(row, col, linkCount);\n linkCount = 0;\n }\n }\n }", "public static List<Student> getAllStudents(){\r\n Student student1 = new Student(\"Dowlath\",2,3.6,\"male\", Arrays.asList(\"Swim\",\"BasketBall\",\"VolleyBall\"),11);\r\n Student student2 = new Student(\"Bhavya\",2,3.8,\"female\",Arrays.asList(\"Swim\",\"Gymnastics\",\"soccer\"),12);\r\n\r\n\r\n /* 3rd Grade Students */\r\n Student student3 = new Student(\"Priya\",3,4.0,\"female\", Arrays.asList(\"Swim\",\"BasketBall\",\"Aerobics\"),10);\r\n Student student4 = new Student(\"Arsh\",3,3.9,\"male\",Arrays.asList(\"Swim\",\"Gymnastics\",\"soccer\"),9);\r\n\r\n\r\n /* 4th Grade Students */\r\n Student student5 = new Student(\"Sowmiya\",4,3.5,\"female\", Arrays.asList(\"Swim\",\"Dancing\",\"FootBall\"),15);\r\n Student student6 = new Student(\"Ariz\",4,3.9,\"male\",Arrays.asList(\"Swim\",\"BasketBall\",\"BaseBall\",\"FootBall\"),14);\r\n\r\n List<Student> students = Arrays.asList(student1,student2,student3,student4,student5,student6);\r\n return students;\r\n }", "private void createStudentList(Student... student) {\r\n this.students = new Student[student.length];\r\n System.arraycopy(student, 0, this.students, 0, student.length);\r\n this.studentList = new LinkedList<>(Arrays.asList(students));\r\n }", "public static void main (String [] args) {\n Address school = new Address(\"800 Lancaster Ave.\", \"Villanova\",\n \"PA\", 19085);\n //create home address objects for a number of students\n Address home1 = new Address(\"21 Jump Street\", \"Blacksburg\",\n \"VA\", 24551);\n Address home2 = new Address(\"123 Main Street\", \"Euclid\", \"OH\", \n 44132);\n Address home3 = new Address(\"5248 Fortress Circle\", \"Valdosta\",\n \"GA\", 31605);\n Address home4 = new Address(\"505 Cedar Drive\", \"Nashville\",\n \"GA\", 31639);\n //create students\n Student student1 = new Student(\"Rick\",\"Sanchez\",home1,school,99,100,97,94);\n Student student2 = new Student(\"Morty\",\"Smith\" ,home2,school,14,28,37,55); \n Student student3 = new Student(\"Zach\",\"Spencer\",home3,school,98,89,86,95);\n Student student4 = new Student(\"Arron\",\"Croft\" ,home4,school,84,99,90,75);\n //create a CS1301 A course\n Course cs1301A = new Course(\"CS1301 A\");\n //create a CS1301 B course\n Course cs1301B = new Course(\"CS1301 B\"); \n //assign some students to CS1301 A\n cs1301A.addStudent(student1);\n cs1301A.addStudent(student2);\n //assign some students to CS1301 B\n cs1301B.addStudent(student3); \n cs1301B.addStudent(student4);\n //get the averages of the 2 courses\n System.out.println(\"*** Averages of CS1301 Courses ***\");\n System.out.println(\"CS1301 A: \"+cs1301A.average());\n System.out.println(\"CS1301 B: \"+cs1301B.average());\n //display the roll for the 2 courses\n System.out.println(\"\\n*** Roll Call ***\");\n cs1301A.roll();\n cs1301B.roll(); \n }", "public static void main(String[] args) {\n\t\tOilStation benzinostanciq = new OilStation(\"OMV\");\r\n\t\tbenzinostanciq.printInfo();\r\n\t\t\r\n\t\t//2\r\n\t\tString[] names = {\"Petar\", \"Dragomir\", \"Svetoslav\", \"Canko\", \"Dencho\", \"Ivan\", \"Hristo\", \"Stamat\"};\r\n\t\tdouble[] money = {6500, 6100, 4900, 5900, 6000, 5700, 6200};\r\n\t\t\r\n\t\tArrayList<Driver> drivers = new ArrayList<>();\r\n\t\tfor (int i = 0; i < 20; i++) {\r\n\t\t\tdrivers.add(new Driver(names[new Random().nextInt(names.length)], money[new Random().nextInt(money.length)], benzinostanciq));\r\n\t\t}\r\n\t\t\r\n\t\t//3\r\n\t\tArrayList<Vehicle> avtomobili = new ArrayList<>();\r\n\t\t\r\n\t\tfor (int i = 0; i < 200; i++) {\r\n\t\t\tswitch (new Random().nextInt(3)) {\r\n\t\t\tcase 0:\r\n\t\t\t\tavtomobili.add(new Car(\"Golf\", 2005));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\tavtomobili.add(new Bus(\"Man\", 2006));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tavtomobili.add(new Truck(\"Scania\", 2011));\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int i = 0; i < drivers.size(); i++) {\r\n\t\t\tint broiAvt = 10;\r\n\t\t\twhile (broiAvt > 0) {\r\n\t\t\t\tint idx = new Random().nextInt(avtomobili.size());\r\n\t\t\t\tdrivers.get(i).addVehicle(avtomobili.get(idx));\r\n\t\t\t\tavtomobili.remove(idx);\r\n\t\t\t\tbroiAvt--;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//4\r\n\r\n\t\tfor (int i = 0; i < drivers.size(); i++) {\r\n\t\t\tif (i % 3 == 0) {\r\n\t\t\t\tint buyVinetki = 5;\r\n\t\t\t\twhile (buyVinetki > 0) {\r\n\t\t\t\t\tint idx = new Random().nextInt(drivers.get(i).getVehicle().size());\r\n\t\t\t\t\tif (drivers.get(i).getVehicle().get(idx).getVinetka() == null) {\r\n\t\t\t\t\t\tdrivers.get(i).buyVinetka(idx, ValidPeriod.values()[new Random().nextInt(ValidPeriod.values().length)]);\r\n\t\t\t\t\t\tbuyVinetki--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tdrivers.get(i).buyVinetki(ValidPeriod.values()[new Random().nextInt(ValidPeriod.values().length)]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//5\r\n\t\tfor (Driver dr : drivers) {\r\n\t\t\tdr.printInfoForDriver();\r\n\t\t}\r\n\t\t\r\n\t\t//6\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"-----ÑÏÈÑÚÊ ÍÀ ÂÈÍÅÒÊÈ ÑËÅÄ ÏÐÎÄÀÆÁÀ-----\");\r\n\t\tbenzinostanciq.printInfo();\r\n\r\n\t}", "public static void main(String[] args) {\n City city = new City(60, 200);\n TourManager.addCity(city);\n City city2 = new City(180, 200);\n TourManager.addCity(city2);\n City city3 = new City(80, 180);\n TourManager.addCity(city3);\n City city4 = new City(140, 180);\n TourManager.addCity(city4);\n City city5 = new City(20, 160);\n TourManager.addCity(city5);\n City city6 = new City(100, 160);\n TourManager.addCity(city6);\n City city7 = new City(200, 160);\n TourManager.addCity(city7);\n City city8 = new City(140, 140);\n TourManager.addCity(city8);\n City city9 = new City(40, 120);\n TourManager.addCity(city9);\n City city10 = new City(100, 120);\n TourManager.addCity(city10);\n City city11 = new City(180, 100);\n TourManager.addCity(city11);\n City city12 = new City(60, 80);\n TourManager.addCity(city12);\n City city13 = new City(120, 80);\n TourManager.addCity(city13);\n City city14 = new City(180, 60);\n TourManager.addCity(city14);\n City city15 = new City(20, 40);\n TourManager.addCity(city15);\n City city16 = new City(100, 40);\n TourManager.addCity(city16);\n City city17 = new City(200, 40);\n TourManager.addCity(city17);\n City city18 = new City(20, 20);\n TourManager.addCity(city18);\n City city19 = new City(60, 20);\n TourManager.addCity(city19);\n City city20 = new City(160, 20);\n TourManager.addCity(city20);\n\n // Initialize population\n Population pop = new Population(50, true);\n System.out.println(\"Initial distance: \" + pop.getFittest().getDistance());\n\n // Evolve population for 100 generations\n pop = GA.evolvePopulation(pop);\n for (int i = 0; i < 100; i++) {\n pop = GA.evolvePopulation(pop);\n }\n\n // Print final results\n System.out.println(\"Finished\");\n System.out.println(\"Final distance: \" + pop.getFittest().getDistance());\n System.out.println(\"Solution:\");\n System.out.println(pop.getFittest());\n }", "void updatePartnerInfo(int[] partner_ids, int[] enjoyment_gained) {\n\t\tif(single_all_the_way) return;\n\t\tint new_couples = 0;\n\t\tfor(int i = 0; i < d; i++){\n\t\t\tif(enjoyment_gained[i] == 6){\n\t\t\t\tif(relation[i][partner_ids[i]] != 1) {\n\t\t\t\t\t//arrange destination for newly found couples\t\t\t\t\t\n\t\t\t\t\tPoint des1 = this.pits[this.pits.length - 1 - this.couples_found].pos;\n\t\t\t\t\tPoint des2 = this.pits[this.pits.length - 2 - this.couples_found].pos;\n\t\t\t\t\tdancers[i].des_pos = findNearestActualPoint(des1,des2);\n\t\t\t\t\tdancers[i].pit_id = this.pits.length - 1 - this.couples_found;\n\t\t\t\t\tdancers[partner_ids[i]].des_pos = findNearestActualPoint(des2,des1);\n\t\t\t\t\tdancers[partner_ids[i]].pit_id = this.pits.length - 2 - this.couples_found;\n\t\t\t\t\tthis.connected = false;\n\t\t\t\t\tthis.couples_found += 2;\n\t\t\t\t\tnew_couples += 2;\n\t\t\t\t}\n\t\t\t\trelation[i][partner_ids[i]] = 1;\n\t\t\t\trelation[partner_ids[i]][i] = 1;\n\t\t\t\tdancers[i].soulmate = partner_ids[i];\n\t\t\t}\n\t\t\telse if(enjoyment_gained[i] == 4){\n\t\t\t\trelation[i][partner_ids[i]] = 2;\n\t\t\t}\n\t\t\telse if(enjoyment_gained[i] == 3){\n\t\t\t\trelation[i][partner_ids[i]] = 3;\n\t\t\t}\n\t\t\tdanced[i][partner_ids[i]] += 6;\n\t\t}\n\t\t//if(new_couples != 0) System.out.println(\"new couples: \" + new_couples);\n\t}", "public static void main(String[] args) {\n\n\t\tDouble double1 = new Double();\n\n\t\tSt1 st1 = new St1();\n\t\tSt2 st2 = new St2();\n\n\t\tfor (int i = 0; i <= 4; i++) {\n\t\t\tst1.push(i);\n\t\t}\n\t\tfor (int i = 5; i <= 9; i++) {\n\t\t\tst2.push(i);\n\t\t}\n\n\t\tfor (int i : double1.n) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\n\t}", "public void calcularPesos(){\r\n StructursDecisors.weightsDecisors=new ArrayList();\r\n double [][] matrizEigenvectors=createMatriz();\r\n for(int i=0; i<Structurs.names.size();i++)\r\n for(int j=0; j<StructursDecisors.names.size(); j++)\r\n System.out.println(\"MatrizEigenvector[\"+i+\"][\"+j+\"]\"+\"=\"+matrizEigenvectors[i][j]);\r\n double eigenvectorCriterios[]=new double[Structurs.eigenvector.size()];\r\n for(int i=0; i<Structurs.eigenvector.size(); i++)\r\n eigenvectorCriterios[i]=(double) Structurs.eigenvector.get(i);\r\n double []vectorPesos=createArrayPesos(matrizEigenvectors, eigenvectorCriterios);\r\n \r\n }", "@Override\r\n\t\t\tpublic void populationUpdate(PopulationData<? extends Solution> data) {\n//\t\t\t\tbuffer.append(data.getPopulationSize());\r\n//\t\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t\tdouble fit = data.getBestCandidateFitness();\r\n//\t\t\t\tSystem.out.println(fit);\r\n\t\t\t\tbuffer.delete(0, buffer.length());\r\n\t\t\t\tbuffer.append(fit);\r\n//\t\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t\tif (Run10FastExternalizer.initialFitness.getDbl() == -1.0) {\r\n\t\t\t\t\tRun10FastExternalizer.initialFitness.setDbl(fit);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (fit == 0.0){\r\n\t\t\t\t\tArrayList<Student> studentsCopy = new ArrayList<>();\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (Student student: students){\r\n\t\t\t\t\t\tstudentsCopy.add(student.clone());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (Student student: studentsCopy){\r\n\t\t\t\t\t\tstudent.register(data.getBestCandidate().getBlocks());\r\n//\t\t\t\t\t\tSystem.out.println(student.getSchedule());\r\n//\t\t\t\t\t\tbuffer.append(student.getSchedule().toString());\r\n//\t\t\t\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t\t\t\tsb.append(student.getSchedule().toString());\r\n\t\t\t\t\t\tsb.append(\"\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tsuperValue = sb.toString();\r\n\t\t\t\t}\r\n\t\t\t}", "public int InitVessels() {\n int[] vesselCheck = CircleHood(true, VESSEL_SPACING_MIN);\n int[] circleIs = new int[vesselCheck.length / 2];\n int[] ret= GenIndicesArray(length);\n Shuffle(ret, length, length, rn);\n int[] indices = ret;\n int nVesselsRequested = (int) (length / VESSEL_SPACING_MEAN*VESSEL_SPACING_MEAN);\n int nVesselsPlaced = 0;\n for (int i : indices) {\n int x=ItoX(i);\n int y=ItoY(i);\n //make sure that we aren't putting a vessel too close to the edge\n if(x>=VESSEL_EDGE_MAX_DIST&&y>=VESSEL_EDGE_MAX_DIST&&xDim-x>VESSEL_EDGE_MAX_DIST&&yDim-y>VESSEL_EDGE_MAX_DIST) {\n int nNeigbhors = HoodToOccupiedIs(vesselCheck, circleIs, ItoX(i), ItoY(i));\n for (int j = 0; j < nNeigbhors + 1; j++) {\n if (j == nNeigbhors) {\n MarkCell_II newVessel = NewAgentSQ(i);\n newVessel.InitVessel();\n nVesselsPlaced++;\n if (nVesselsPlaced == nVesselsRequested) {\n return nVesselsPlaced;\n }\n } else if (GetAgent(circleIs[j]).type == VESSEL) {\n break;\n }\n }\n }\n }\n return nVesselsPlaced;\n }", "public static List<StudentInfo> searchStudentInfo(String firtname, String lastname) {\r\n \r\n List<StudentInfo> students = new ArrayList<>();\r\n \r\n // declare resultSet\r\n ResultSet rs = null;\r\n \r\n // declare prepared statement\r\n PreparedStatement preparedStatement = null;\r\n \r\n // declare connection\r\n Connection conn = null;\r\n try {\r\n // get connection\r\n conn = DBUtils.getConnection();\r\n\r\n // set prepared statement\r\n preparedStatement = conn\r\n .prepareStatement(\"SELECT instructor.FName, instructor.LName,\" +\r\n \" IF(EXISTS ( SELECT * FROM gra WHERE gra.StudentId = phdstudent.StudentId) , 'GRA', \" +\r\n \" IF(EXISTS ( SELECT * FROM gta WHERE gta.StudentId = phdstudent.StudentId) , 'GTA', \" +\r\n \" IF(EXISTS ( SELECT * FROM scholarshipsupport WHERE scholarshipsupport.StudentId = phdstudent.StudentId) , 'scholarship', \" +\r\n \" IF(EXISTS ( SELECT * FROM selfsupport WHERE selfsupport.StudentId = phdstudent.StudentId) , 'self', ''))\" +\r\n \" )) AS StudentType, \" +\r\n \" milestone.MName, milestonespassed.PassDate\" +\r\n \" FROM phdstudent left join instructor on instructor.InstructorId = phdstudent.Supervisor\"\r\n + \" left join milestonespassed on phdstudent.StudentId = milestonespassed.StudentId\"\r\n + \" left join milestone on milestonespassed.MID = milestone.MID\" +\r\n \" WHERE phdstudent.FName = ? AND phdstudent.LName = ?\");\r\n \r\n // execute query\r\n preparedStatement.setString(1, firtname);\r\n preparedStatement.setString(2, lastname); \r\n\r\n rs = preparedStatement.executeQuery();\r\n \r\n //iterate and create the StudentInfo objects\r\n while (rs.next()) {\r\n \r\n students.add(new StudentInfo(rs.getString(1)+ \" \" + rs.getString(2), rs.getString(3), rs.getString(4), \r\n utils.Utils.toDate(rs.getDate(5))));\r\n\r\n }\r\n }catch(Exception ex){\r\n ex.printStackTrace();\r\n }\r\n finally {\r\n DBUtils.closeResource(conn);\r\n DBUtils.closeResource(preparedStatement);\r\n DBUtils.closeResource(rs);\r\n } \r\n \r\n return students; \r\n }", "public abstract List<Double> updatePopulations();", "public void calculate()\n {\n \tVector<Instructor> instructors = instructorDB.getAllInstructors();\n \tSchedule schedule = AdminGenerating.getSchedule();\n \tsections = schedule.getAllSections();\n \n for (Instructor instructor : instructors) {\n calculateIndividual(instructor);\n }\n \n calculateOverall();\n }", "private void initTables(){\n\tfor (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n if (myID == i) {\n myNeighboursDistTable[i] = costs;\n } else {\n int[] tmp = new int[RouterSimulator.NUM_NODES];\n Arrays.fill(tmp, RouterSimulator.INFINITY);\n myNeighboursDistTable[i] = tmp;\n }\n if (costs[i] == RouterSimulator.INFINITY) {\n neighbours[i] = false;\n route[i] = -1;\n } else if (i != myID) {\n neighbours[i] = true;\n route[i] = i;\n }\n\t}\n }", "@TaDaMethod(variablesToTrack = {\"ssn\", \"weekWage\", \"workWeeks\", \"ssn2\",\n\t\t\t\"capitalGains\", \"capitalLosses\", \"stockDividends\"}, \n\t\t\tcorrespondingDatabaseAttribute = {\"job.ssn\", \"job.WEEKWAGE\", \"job.WORKWEEKS\", \"investment.ssn\",\n\t\t\t\"investment.CAPITALGAINS\", \"investment.CAPITALLOSSES\", \"investment.STOCKDIVIDENDS\"})\n\tprivate void calculateSlopesAndIntercepts(){\n\t\tHashMap<Integer, Integer> ssnWeekWage = new HashMap<Integer, Integer>();\n\t\tHashMap<Integer, Integer> ssnWorkWeeks = new HashMap<Integer, Integer>();\n\t\tHashMap<Integer, Integer> ssnInvestmentIncome = new HashMap<Integer, Integer>();\n\t\t\n\t\ttry {\n\t\t\tstatement = Factory.getConnection().createStatement();\n\t results = statement.executeQuery(\"SELECT SSN, WEEKWAGE, WORKWEEKS from job\"); \n\t while(results.next()){\n\t \tif(results.getString(\"SSN\") == null || results.getString(\"WEEKWAGE\") == null || results.getString(\"WORKWEEKS\") == null){\n\t \t\tcontinue;\n\t \t}\n\t \tint ssn = results.getInt(\"SSN\");\n\t \tint weekWage = results.getInt(\"WEEKWAGE\");\n\t \tint workWeeks = results.getInt(\"WORKWEEKS\");\n\t \t\n\t \tssnWeekWage.put(ssn, weekWage);\n\t \tssnWorkWeeks.put(ssn, workWeeks);\n\t }\n\t \n\t results = statement.executeQuery(\"SELECT SSN, CAPITALGAINS, CAPITALLOSSES, STOCKDIVIDENDS from investment\");\n\t while(results.next()){\n\t \tif(results.getString(\"SSN\") == null || results.getString(\"CAPITALGAINS\") == null || results.getString(\"CAPITALLOSSES\") == null || results.getString(\"STOCKDIVIDENDS\") == null){\n\t \t\tcontinue;\n\t \t}\n\t \tint ssn2 = results.getInt(\"SSN\");\n\t \tint capitalGains = results.getInt(\"CAPITALGAINS\");\n\t \tint capitalLosses = results.getInt(\"CAPITALLOSSES\");\n\t \tint stockDividends = results.getInt(\"STOCKDIVIDENDS\");\n\t \tint investmentIncome = capitalGains + stockDividends + capitalLosses;\n\t \t\n\t \tssnInvestmentIncome.put(ssn2, investmentIncome);\n\t }\n\t \n\t // Calculate Cofficients\n\t // Build an array list of Work Weeks and an array list of Income;\n\t ArrayList<Integer> workWeeksList = new ArrayList<Integer>();\n\t ArrayList<Integer> incomeList = new ArrayList<Integer>();\n\t ArrayList<Integer> weeklyWageList = new ArrayList<Integer>();\n\t ArrayList<Integer> investmentList = new ArrayList<Integer>();\n\t ArrayList<Integer> incomeListForInvestment = new ArrayList<Integer>();\n\t \n\t for (Iterator<Integer> i = ssnWorkWeeks.keySet().iterator(); i.hasNext();){\n\t \tint SSNkey = (Integer) i.next();\n\t \tif(ssnWorkWeeks.get(SSNkey) != null && ssnWeekWage.get(SSNkey) != null){\n\t\t \tint workWeeks = (Integer) ssnWorkWeeks.get(SSNkey);\n\t\t \tint weekWage = (Integer) ssnWeekWage.get(SSNkey);\n\t\t \tif(workWeeks > 0 && weekWage > 0){\n\t\t \t\tworkWeeksList.add(workWeeks);\n\t\t\t \tincomeList.add(workWeeks * weekWage);\n\t\t\t \tweeklyWageList.add(weekWage);\n\t\t\t \tif(ssnInvestmentIncome.get(SSNkey) != null && ssnInvestmentIncome.get(SSNkey) != null){\n\t\t\t \t\tint investmentIncome = (Integer) ssnInvestmentIncome.get(SSNkey);\n\t\t\t \t\tinvestmentList.add(investmentIncome);\n\t\t\t \t\tincomeListForInvestment.add(workWeeks * weekWage);\n\t\t\t \t}\n\t\t \t}\n\t \t}\n\t }\n\t \n\t // Set the member variable for the cofficients for given Work Weeks find Income\n\t workWeeksFindIncome = new CalculateRegression().calculateRegressionNumbers(workWeeksList,incomeList);\n\t \n\t // Set the member variable for the cofficients for given Weekly Wage find Income\n\t weeklyWageFindIncome = new CalculateRegression().calculateRegressionNumbers(weeklyWageList,incomeList);\n\t \n\t // Set the member variable for the cofficients for given InvestmentIncome find Income \n\t investmentIncomeFindIncome = new CalculateRegression().calculateRegressionNumbers(investmentList,incomeListForInvestment);\n\t \n\t\t} catch (SQLException e) {\n\t while (e != null)\n\t {\n\t System.err.println(\"\\n----- SQLException -----\");\n\t System.err.println(\" SQL State: \" + e.getSQLState());\n\t System.err.println(\" Error Code: \" + e.getErrorCode());\n\t System.err.println(\" Message: \" + e.getMessage());\n\t // for stack traces, refer to derby.log or uncomment this:\n\t //e.printStackTrace(System.err);\n\t e = e.getNextException();\n\t }\n\t\t}\t\n\t\t\n\t}", "public void setWeights() {\n for (Square[] square : squares) {\n for (Square square1 : square) {\n try {\n int i = Integer.parseInt(square1.getText());\n square1.setV(new Vertex(square1.getXcoor(), square1.getYcoor(), i));\n } catch (NumberFormatException e) {\n square1.setV(new Vertex(square1.getXcoor(), square1.getYcoor(), 1));\n }\n }\n }\n }", "private void fillInCurrentStudentInfo() {\n // Extract info from Student object\n String name = WordUtils.capitalizeFully(mCurrentStudent.getName());\n int sex = mCurrentStudent.getSex();\n mStudentBirthdate = mCurrentStudent.getBirthdate();\n int grade = mCurrentStudent.getGrade();\n mChosenClassesList = (ArrayList<String>) mCurrentStudent.getClasses();\n String classes = TextUtils.join(\", \", mChosenClassesList);\n String photoUrl = mCurrentStudent.getPhotoUrl();\n\n // Populate views with the current student's information\n mStudentNameEditText.setText(name);\n mStudentBirthdateTextView.setText(DateUtils.convertDateLongToString(mStudentBirthdate));\n mStudentGradeEditText.setText(String.valueOf(grade));\n mStudentClassesTextView.setText(classes);\n mStudentClassesTextView.setVisibility(View.VISIBLE);\n\n // Set student photo (if it exists)\n if (!TextUtils.isEmpty(photoUrl)) {\n Glide.with(mAddPhotoView.getContext())\n .load(photoUrl)\n .into(mAddPhotoView);\n studentHasPhoto = true;\n }\n\n // Set student sex spinner\n switch (sex) {\n case SEX_MALE_INT:\n mStudentSexSpinner.setSelection(SEX_MALE_INT);\n break;\n case SEX_FEMALE_INT:\n mStudentSexSpinner.setSelection(SEX_FEMALE_INT);\n break;\n default:\n throw new IllegalArgumentException(\"Invalid sex\");\n }\n }", "private static List<Gene> getGenePool() {\n List<Gene> list = new ArrayList<>();\n\n Item item1 = new Item();\n item1.setName(\"Swiss Army Knife\");\n item1.setWeight(0.08125);\n item1.setVal(15);\n Gene gene1 = new Gene(item1);\n\n Item item2 = new Item();\n item2.setName(\"Duct Tape\");\n item2.setWeight(1.3);\n item2.setVal(3);\n Gene gene2 = new Gene(item2);\n\n Item item3 = new Item();\n item3.setName(\"Rope (50 feet)\");\n item3.setWeight(7);\n item3.setVal(10);\n Gene gene3 = new Gene(item3);\n\n Item item4 = new Item();\n item4.setName(\"Satellite phone\");\n item4.setWeight(2);\n item4.setVal(8);\n Gene gene4 = new Gene(item4);\n\n Item item5 = new Item();\n item5.setName(\"Elmer's Glue\");\n item5.setWeight(0.25);\n item5.setVal(2);\n Gene gene5 = new Gene(item5);\n\n Item item6 = new Item();\n item6.setName(\"Toilet Paper Roll\");\n item6.setWeight(.5);\n item6.setVal(4);\n Gene gene6 = new Gene(item6);\n\n Item item7 = new Item();\n item7.setName(\"Binoculars\");\n item7.setWeight(3);\n item7.setVal(5);\n Gene gene7 = new Gene(item7);\n\n Item item8 = new Item();\n item8.setName(\"Compass\");\n item8.setWeight(0.0573202);\n item8.setVal(15);\n Gene gene8 = new Gene(item8);\n\n Item item9 = new Item();\n item9.setName(\"Jug (pre-filled with water)\");\n item9.setWeight(4);\n item9.setVal(6);\n Gene gene9 = new Gene(item9);\n\n Item item10 = new Item();\n item10.setName(\"Flashlight\");\n item10.setWeight(2);\n item10.setVal(4);\n Gene gene10 = new Gene(item10);\n\n Item item11 = new Item();\n item11.setName(\"Box of paper clips\");\n item11.setWeight(.9);\n item11.setVal(2);\n Gene gene11 = new Gene(item11);\n\n Item item12 = new Item();\n item12.setName(\"Gloves (1 pair)\");\n item12.setWeight(.8125);\n item12.setVal(3);\n Gene gene12 = new Gene(item12);\n\n Item item13 = new Item();\n item13.setName(\"Scissors\");\n item13.setWeight(0.2);\n item13.setVal(2);\n Gene gene13 = new Gene(item13);\n\n Item item14 = new Item();\n item14.setName(\"Signal Flair (4pk)\");\n item14.setWeight(4);\n item14.setVal(5);\n Gene gene14 = new Gene(item14);\n\n Item item15 = new Item();\n item15.setName(\"Water Purifying System\");\n item15.setWeight(0.5125);\n item15.setVal(4);\n Gene gene15 = new Gene(item15);\n\n Item item16 = new Item();\n item16.setName(\"Whistle\");\n item16.setWeight(0.075);\n item16.setVal(2);\n Gene gene16 = new Gene(item16);\n\n Item item17 = new Item();\n item17.setName(\"Sleeping Bag\");\n item17.setWeight(0.38125);\n item17.setVal(4);\n Gene gene17 = new Gene(item17);\n\n Item item18 = new Item();\n item18.setName(\"Insect Repellent\");\n item18.setWeight(1.15);\n item18.setVal(3);\n Gene gene18 = new Gene(item18);\n\n Item item19 = new Item();\n item19.setName(\"Trowel\");\n item19.setWeight(0.31875);\n item19.setVal(3);\n Gene gene19 = new Gene(item19);\n\n Item item20 = new Item();\n item20.setName(\"Lighter\");\n item20.setWeight(.2);\n item20.setVal(4);\n Gene gene20 = new Gene(item20);\n\n Item item21 = new Item();\n item21.setName(\"Safety Horn\");\n item21.setWeight(.21);\n item21.setVal(3);\n Gene gene21 = new Gene(item21);\n\n Item item22 = new Item();\n item22.setName(\"Headlamp\");\n item22.setWeight(.8);\n item22.setVal(4);\n Gene gene22 = new Gene(item22);\n\n Item item23 = new Item();\n item23.setName(\"Freeze Dried Food Kit\");\n item23.setWeight(2);\n item23.setVal(6);\n Gene gene23 = new Gene(item23);\n\n Item item24 = new Item();\n item24.setName(\"Sunscreen\");\n item24.setWeight(.5);\n item24.setVal(4);\n Gene gene24 = new Gene(item24);\n\n Item item25 = new Item();\n item25.setName(\"Trekking Pole (Adjustable)\");\n item25.setWeight(1.3);\n item25.setVal(4);\n Gene gene25 = new Gene(item25);\n\n Item item26 = new Item();\n item26.setName(\"Counter Assault Bear Spray\");\n item26.setWeight(.5);\n item26.setVal(4);\n Gene gene26 = new Gene(item26);\n\n Item item27 = new Item();\n item27.setName(\"Insect Spray\");\n item27.setWeight(.5);\n item27.setVal(3);\n Gene gene27 = new Gene(item27);\n\n Item item28 = new Item();\n item28.setName(\"Hand sanitizer\");\n item28.setWeight(.625);\n item28.setVal(3);\n Gene gene28 = new Gene(item28);\n\n Item item29 = new Item();\n item29.setName(\"Mirror\");\n item29.setWeight(.5);\n item29.setVal(3);\n Gene gene29 = new Gene(item29);\n\n Item item30 = new Item();\n item30.setName(\"First Aid Kit\");\n item30.setWeight(3);\n item30.setVal(6);\n Gene gene30 = new Gene(item30);\n\n list.add(gene1);\n list.add(gene2);\n list.add(gene3);\n list.add(gene4);\n list.add(gene5);\n list.add(gene6);\n list.add(gene7);\n list.add(gene8);\n list.add(gene9);\n list.add(gene10);\n list.add(gene11);\n list.add(gene12);\n list.add(gene13);\n list.add(gene14);\n list.add(gene15);\n list.add(gene16);\n list.add(gene17);\n list.add(gene18);\n list.add(gene19);\n list.add(gene20);\n list.add(gene21);\n list.add(gene22);\n list.add(gene23);\n list.add(gene24);\n list.add(gene25);\n list.add(gene26);\n list.add(gene27);\n list.add(gene28);\n list.add(gene29);\n list.add(gene30);\n\n return list;\n }", "public static void main(String[] args) {\n\t\tStudent s = new Student(\"Bora\", \"Boric\", 1989, 39998, 3, 7.59);\r\n\t\tStudent s1 = new Student(\"Mika\", \"Mikic\", 1998, 39322, 1, 8.59);\r\n\t\tStudent s2 = new Student(\"Kasa\", \"Kasic\", 1991, 39299, 2, 8.94);\r\n\t\tProfesor p = new Profesor(\"Stanko\", \"Stanic\", 1980, \"Predavac\");\r\n\t\tProfesor p1 = new Profesor(\"Sasa\", \"Sasic\", 1984, \"Asistent\");\r\n\t\tp.dodajPredmet(\"Statistika\");\r\n\t\tp.dodajPredmet(\"Matematika\");\r\n\t\tp1.dodajPredmet(\"Teorija cena\");\r\n\t\tp1.dodajPredmet(\"Makroekonomija\");\r\n\t\tSystem.out.println(s.ispis());\r\n\t\tSystem.out.println(s1.ispis());\r\n\t\tSystem.out.println(s2.ispis());\r\n\t\tSystem.out.println(p.ispisi());\r\n\t\tSystem.out.println(p1.ispisi());\r\n\r\n\t}", "public RegisteredStudent getStudentAndRegistration(int stID, String year) {\r\n RegisteredStudent reg = null;\r\n DBConnectionManager cm = new DBConnectionManager(this.dbMgr.getDBConnectionData(DBManager.MYSQL));\r\n ResultSet rs = cm.getResultsSQL(\"select * from TRegistration where STUDENT_ID = \" + stID + \" and YEAR = '\" + year + \"'\");\r\n reg = new RegisteredStudent();\r\n try {\r\n if (rs.next()) {\r\n reg.setRegistrationID(rs.getInt(\"REGISTRATION_ID\"));\r\n reg.setStudentID(rs.getInt(\"STUDENT_ID\"));\r\n reg.setYear(rs.getString(\"YEAR\"));\r\n reg.setLocationID(rs.getInt(\"LOCATION_ID\"));\r\n reg.setSessionID(rs.getInt(\"SESSION_ID\"));\r\n reg.setStatus(rs.getInt(\"STATUS\"));\r\n reg.setLevel(rs.getString(\"LEVEL\"));\r\n if ( reg.getLevel() != null && !reg.getLevel().trim().equals(\"\"))\r\n {\r\n reg.setLevelCode(Integer.parseInt(reg.getLevel()));\r\n }\r\n reg.setContactPhone1(rs.getString(\"CONTACT_PHONE1\"));\r\n reg.setContactPhone2(rs.getString(\"CONTACT_PHONE2\"));\r\n reg.setPaymentID(rs.getString(\"PP_PAYMENT_ID\"));\r\n reg.setPaymentAmount(rs.getDouble(\"PAYMENT_AMOUNT\"));\r\n reg.setTransactionID(rs.getString(\"PP_TRANSACTION_ID\"));\r\n reg.setTshirtSize(rs.getString(\"TSHIRT_SIZE\"));\r\n reg.setTshirtSizeCode(this.commonData.getTshirtCode(reg.getTshirtSize()));\r\n try {\r\n reg.setLastUpdated(\"\" + rs.getTimestamp(\"LAST_UPDATED\"));\r\n } catch (SQLException se) {\r\n reg.setLastUpdated(\"\");\r\n }\r\n reg.setAdCode(rs.getInt(\"AD_CODE\"));\r\n reg.setAdNote(rs.getString(\"AD_NOTE\"));\r\n reg.setStateOfResidency(rs.getString(\"RESIDENCY_STATE\"));\r\n reg.setDiscountCodeId(rs.getInt(\"DISCOUNT_CODE_ID\"));\r\n reg.setDiscountTypeId(rs.getInt(\"DISCOUNT_TYPE_ID\"));\r\n reg.setDiscountTypeName(rs.getString(\"DISCOUNT_TYPE_NAME\"));\r\n if (reg.getDiscountTypeName() == null) {\r\n reg.setDiscountTypeName(\"\");\r\n }\r\n try {\r\n reg.setDateTime(\"\" + rs.getTimestamp(\"REG_DATE\"));\r\n } catch (SQLException se) {\r\n reg.setDateTime(\"\");\r\n }\r\n String memo = rs.getString(\"MEMO\");\r\n if (memo == null) {\r\n memo = \"\";\r\n }\r\n reg.setParentNote(memo);\r\n String adminMemo = rs.getString(\"ADMIN_MEMO\");\r\n if (adminMemo == null) {\r\n adminMemo = \"\";\r\n }\r\n reg.setAdminNote(adminMemo);\r\n reg.setUpdatedBy(rs.getInt(\"UPDATED_BY\"));\r\n // get location and session info\r\n Location l = this.getLocationByID(reg.getLocationID());\r\n if ( l != null )\r\n {\r\n reg.setLocationCode(l.getLocationCode());\r\n LocationSession ls = l.getSession(reg.getSessionID());\r\n if ( ls != null )\r\n {\r\n reg.setSessionName(ls.getSessionInfo());\r\n }\r\n }\r\n \r\n }\r\n rs = cm.getResultsSQL(\"select * from TStudents where STUDENT_ID = \" + stID);\r\n if (rs.next()) {\r\n reg.setStudentID(rs.getInt(\"STUDENT_ID\"));\r\n reg.setStudentIdentificationCode(rs.getString(\"STUDENT_IDENTIFICATION_CD\"));\r\n reg.setAddress1(rs.getString(\"ADDRESS1\"));\r\n reg.setAddress2(rs.getString(\"ADDRESS2\"));\r\n reg.setCity(rs.getString(\"CITY\"));\r\n reg.setEthnicGroupCode(rs.getInt(\"ETHNIC_GROUP\"));\r\n reg.setEthnicGroupName(commonData.getEthnicGroupName(reg.getEthnicGroupCode()));\r\n reg.setFirstName(rs.getString(\"FIRST_NAME\"));\r\n reg.setGenderCode(rs.getInt(\"GENDER\"));\r\n reg.setGender(commonData.getGenderName(reg.getGenderCode()));\r\n reg.setLastName(rs.getString(\"LAST_NAME\"));\r\n reg.setMiddleName(rs.getString(\"MIDDLE_NAME\"));\r\n reg.setParentGuardianEmail(rs.getString(\"PARENT_GUARDIAN_EMAIL\"));\r\n reg.setSchoolName(rs.getString(\"SCHOOL_NAME\"));\r\n reg.setState(rs.getString(\"STATE\"));\r\n reg.setStudentEmail(rs.getString(\"STUDENT_EMAIL\"));\r\n reg.setTeacherEmail(rs.getString(\"TEACHER_EMAIL\"));\r\n reg.setTeacherFirstName(rs.getString(\"TEACHER_FIRST_NAME\"));\r\n reg.setTeacherLastName(rs.getString(\"TEACHER_LAST_NAME\"));\r\n reg.setZipcode(rs.getString(\"ZIPCODE\"));\r\n reg.setCountryOfOrigin(rs.getString(\"COUNTRY_OF_ORIGIN\"));\r\n }\r\n\r\n } catch (SQLException se) {\r\n System.out.println(\"Error in BusinessProcessControl [getStudentAndRegistration()]: \" + se);\r\n } finally {\r\n DBConnectionManager.dropConnObject(rs);\r\n cm.freeConnection();\r\n cm = null;\r\n }\r\n return reg;\r\n }", "public students(int id, String name, int grade){\n this.id = id;\n this.name = name;\n this.grade = grade;\n /// initializing fees attributes\n feesPaid = 0;\n feesTotal = 30000;\n }", "private void initializeStudentRegList() {\r\n try {\r\n String query = \"SELECT * FROM ongoingregistrations WHERE studentid=?\";\r\n PreparedStatement pstmt = conn.prepareStatement(query);\r\n pstmt.setInt(1, id);\r\n ResultSet rs = pstmt.executeQuery();\r\n studentRegList = new ArrayList<>();\r\n while (rs.next()) {\r\n studentRegList.add(new Registration(rs.getInt(\"studentid\"), rs.getInt(\"courseid\"), rs.getInt(\"secnum\"), rs.getString(\"grade\"), conn));\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void updatePool(Vector sold){\r\n\t\tfor(int i = 0; i < sold.size(); i++){\r\n\t\t\tthis.marketPool.addElement((Bird) sold.elementAt(i));\r\n\t\t}\r\n\t}", "private void evaluateNeighborhood(List<Sequence> neighbors) {\n Sequence current = sequence;\n\t\tfor (Sequence s : neighbors) {\n\t\t\tapplySequence(s);\n\t\t\tif (isValid()) {\n\t\t\t\tevaluate();\n\t\t\t\ts.setScore(this.getScore());\n\t\t\t}\n\t\t}\n // restore sequence\n applySequence(current); \n }", "public void setStudents(StudentDataBase students) {\n this.students = students;\n }", "public static void ITdistances()\n\t{\n\t\t//System.err.println(\"Position\");\n\n\t\tclade = clad[k];\n\n\t\tclade.tipDistance = 0;\n\t\tclade.intDistance = 0;\n\t\tclade.tipDisNested = 0;\n\t\tclade.intDisNested = 0;\n\t\tclade.indTipClades = 0;\n\t\tclade.indIntClades = 0;\n\n\n\t\tif(clade.check != (double) clade.numSubClades && clade.check != 0)\n\t\t{ \n\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t{\n\t\t\t\tif (clade.Position[i] == tip)\n\t\t\t\t\tclade.indTipClades += clade.rowTotal[i];\n\t\t\t\telse\n\t\t\t\t\tclade.indIntClades += clade.rowTotal[i];\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tfor(i = 0; i < clade.numSubClades; i++)\n\t\t\t{\n\t\t\t\t// weigthing within class\n\t\t\t\tclade.tipDistance += clade.Position[i] * clade.Dc[i] * (double) clade.rowTotal[i] / (double) clade.indTipClades;\n\t\t\t\tclade.tipDisNested += clade.Position[i] * clade.Dn[i] * (double) clade.rowTotal[i] / (double) clade.indTipClades;\n\t\t\t\tclade.intDistance += (1 - clade.Position[i]) * clade.Dc[i] * (double) clade.rowTotal[i] / (double) clade.indIntClades;\n\t\t\t\tclade.intDisNested += (1 - clade.Position[i]) * clade.Dn[i] * (double) clade.rowTotal[i] / (double) clade.indIntClades;\t\n\t\t\t\t\n\t\t\t\t// unweighted\n\t\t\t\t//clade.tipDistance += clade.Position[i] * clade.Dc[i] / (double) clade.check;\n\t\t\t\t//clade.tipDisNested += clade.Position[i] * clade.Dn[i] / (double) clade.check;\n\t\t\t\t//clade.intDistance += (1 - clade.Position[i]) * clade.Dc[i] / (double) (clade.numSubClades - clade.check);\n\t\t\t\t//clade.intDisNested += (1 - clade.Position[i]) * clade.Dn[i] / (double) (clade.numSubClades - clade.check);\t\n\t\t\t}\n\n\t\t clade.tipIntDistance = clade.intDistance - clade.tipDistance;\n\t\t clade.tipIntDisNested = clade.intDisNested - clade.tipDisNested;\n\t\t if(verbose){\n\t\t\tlogfile.println(\"\\nIT \" + clade.cladeName + \" indTipClades = \" + clade.indTipClades\n\t\t\t\t+ \" indIntClades + \" + clade.indIntClades);\n\t\t\tlogfile.println(\"\\nITc \" + clade.cladeName + \" meanInt = \" + clade.intDistance\n\t\t\t\t+ \" meanTip = \" + clade.tipDistance);\n\t\t\tlogfile.println(\"ITn \" + clade.cladeName + \" meanInt = \" + clade.intDisNested\n\t\t\t\t+ \" meanTip = \" + clade.tipDisNested);\n\t\t }\n\t\t}\n\n\t\t//System.err.println(\"IT clade \" + clade.cladeName + \" meanInt = \" + clade.intDistance + \" meanTip = \" + clade.tipDistance);\n\n\t}", "private void calculateFitness() {\n\t\tint day1=this.getNumberOfHours()*this.getNumberOfClasses();\n\t\tint day2=2*day1;\n\t\tint day3=3*day1;\n\t\tint day4=4*day1;\n\t\tint day5=5*day1;\n\t\tTeacher_lesson temp=null;\n\t\t//day 1//\n\t\tHashSet<Integer> closedSet=new HashSet<Integer>();\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<day1;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day1;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\n\t\t\n\t\t\n\t\t\n\t\t//day2//\n\t\tclosedSet.clear();;\n\t\t\n\t\tfor(int i=day1;i<day2;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day2;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\t//day3//\n\t\tclosedSet.clear();;\n\t\tfor(int i=day2;i<day3;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day3;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//day4//\n\t\tclosedSet.clear();;\n\t\tfor(int i=day3;i<day4;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day4;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\t\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t}\n\t\t\t\n\t\t}\n\t\t//day5//\n\t\tclosedSet.clear();;\n\t\tfor(int i=day4;i<day5;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp !=null){\n\t\t\t\tif(!(closedSet.contains(temp.get_tid()))){\n\t\t\t\n\t\t\t\t \t\n\t\t\t\tfor(int j=i+1;j<day5;j++){\n\t\t\t\n\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t}\n\t\t\tclosedSet.add(temp.get_tid());\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\t\t//-1 giati den aferesame thn prwti wra otan to vriskei ston pinaka//\n\t\t\t\ttemp.set_d_hour(temp.get_td_hour()-1);\n\t\t\t\tif(temp.get_td_hour()>0){++this.fitness;}\n\t\t\t\t\n\t\t}\n\t\t\t/*if(temp.get_td_hour()<0){this.fitness=this.fitness-100;}//adunato na ginei giati o ka8igitis exei parapanw wres apo oti mporei na kanei//\n\t\t\t\telse if (temp.get_td_hour()==0){this.fitness=this.fitness-2;}//meiwnoume giati o ka8igitis 8a epivarin8ei oles tou tis wres thn idia mera//\n\t\t\t\telse{++this.fitness;}//kalh prosegisi*/\n\t\t}\n\t\t//*********************END OF DAILY EVALUATION*****************************//\n\t\t\n\t\t//**********************START OF WEEKLY EVALUATION************************//\n\t\t\n\t\tclosedSet.clear();\n\t\t\n\t int \t_weeklyhours = 1;\n\t \n\t\tfor(int i=0;i<day5;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp!=null){\n\t\t\tif(!closedSet.contains(this.genes[i])){\n\t\t\t\t\n\t\t\t\n\t\t\tfor(int j=i+1;j<day5;j++){\n\t\t\t\tif(temp.get_tid()==this.genes[j]){\n\t\t\t\t\t++_weeklyhours; }\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t/*if(_weeklyhours>temp.get_tw_hour()){\n\t\t\t\tthis.fitness=this.fitness-100 ; //adunato na kanei parapanw wres ma8hma//\n\t\t\t}else\n\t\t\t\t{++this.fitness;}*/\n\t\t\tif(_weeklyhours<temp.get_tw_hour()){++this.fitness;}\n\t\t\tclosedSet.add(this.genes[i]);}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//*************END OF WEEKLY EVALUATION**********//\n\t\n\t\t//**START OF LESSON EVALUATION***//\n\t\tArraylistLesson set=new ArraylistLesson();\n\t\tclass_lid templ=null;\n\t\tTeacher_lesson tempj=null;\n\t\tint lid=0;\n\t\tString _class;\n\t\tint _classhours=1;\n\t\tfor(int i=0;i<day5;i++){\n\t\t\ttemp=getdata(this.genes[i]);\n\t\t\tif(temp!=null){\n\t\t\tlid=temp.get_lid();\n\t\t\t_class=temp.get_class();\n\t\t\ttempl=new class_lid(lid,_class);\n\t\t\tif(!set.contains(templ)){\n\t\t\t\t\n\t\t\t\tfor(int j=i+1;j<day5;j++){\n\t\t\t\t\ttempj=getdata(this.genes[j]);{\n\t\t\t\t\t\tif(tempj!=null){\n\t\t\t\t\t\t\tif(temp.get_tid()==tempj.get_tid()){\n\t\t\t\t\t\t\t\tif(temp.get_lid()==tempj.get_lid()&&temp.get_class().equalsIgnoreCase(tempj.get_class())){\n\t\t\t\t\t\t\t\t\t++_classhours;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tint hours;\n\t\t\t\thours=temp.get_lhours();\n\t\t\t\n\t\tif(_classhours==hours){\n\t\t\t++this.fitness;\n\t\t}\n\t\tset.add(templ);\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t}", "public StreetSearcher() {\n vertices = new HashMap<>();\n graph = new SparseGraph<>();\n //double smDistance = 0;\n //previous = new HashMap<>();\n }", "public void setStudents(Set<Student> students) {\n this.students = students;\n }", "void setAdjForFourthType() {\n matrixOfSquares[0][0].setCardinalSquare(null, matrixOfSquares[1][0] , null, matrixOfSquares[0][1]);\n matrixOfSquares[0][1].setCardinalSquare(null, matrixOfSquares[1][1] , matrixOfSquares[0][0], matrixOfSquares[0][2]);\n matrixOfSquares[0][2].setCardinalSquare(null,matrixOfSquares[1][2] , matrixOfSquares[0][1], null);\n matrixOfSquares[1][0].setCardinalSquare(matrixOfSquares[0][0], matrixOfSquares[2][0], null, null );\n matrixOfSquares[1][1].setCardinalSquare(matrixOfSquares[0][1], matrixOfSquares[2][1], null, matrixOfSquares[1][2] );\n matrixOfSquares[1][2].setCardinalSquare(matrixOfSquares[0][2] , null, matrixOfSquares[1][1], matrixOfSquares[1][3]);\n matrixOfSquares[1][3].setCardinalSquare(null, matrixOfSquares[2][3], matrixOfSquares[1][2], null);\n matrixOfSquares[2][0].setCardinalSquare(matrixOfSquares[1][0],null, null, matrixOfSquares[2][1] );\n matrixOfSquares[2][1].setCardinalSquare(matrixOfSquares[1][1], null, matrixOfSquares[2][0], matrixOfSquares[2][2] );\n matrixOfSquares[2][2].setCardinalSquare(null, null, matrixOfSquares[2][1], matrixOfSquares[2][3] );\n matrixOfSquares[2][3].setCardinalSquare(matrixOfSquares[1][3], null, matrixOfSquares[2][2], null);\n\n }", "public void setStudents() {\n\t}", "public void adaptProductVector() {\t\t\r\n\t\tHashMap<Integer, Integer> neighboursAdaption = new HashMap<Integer, Integer>();\r\n\t\t\r\n\t\tdouble threshold = Parameters.adaptationThreshold / 100.0;\r\n\t\tint neighbours = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < Parameters.vectorSpaceSize; i++) {\r\n\t\t\tneighboursAdaption.put(i, 0);\r\n\t\t}\r\n\t\t\r\n\t\tfor (Object o: network.getAdjacent(this)) {\t\t\r\n\t\t\tif (o instanceof Customer) {\r\n\t\t\t\tCustomer c = (Customer)o;\r\n\t\t\t\t\r\n\t\t\t\tfor (int i = 0; i < Parameters.vectorSpaceSize; i++) {\r\n\t\t\t\t\tint count = neighboursAdaption.get(i);\r\n\t\t\t\t\tif (c.getDemandVector()[i] == 1) {\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tneighboursAdaption.put(i, count);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tneighbours++;\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i = 0; i < Parameters.vectorSpaceSize; i++) {\r\n\t\t\tif ((double)neighboursAdaption.get(i) / neighbours >= threshold ) {\r\n\t\t\t\tdemandVector[i] = 1;\r\n\t\t\t}\r\n\t\t}\t\t \r\n\t}", "@BeforeAll\n static void beforeAll() {\n for (int i = 0; i < 11; i++) {\n Student k = new Student();\n for (String subject: k.subjectNames) {\n k.setSubjectGrade(subject, (double) i);\n }\n }\n\n // add a null element\n Student.students.set(7, null);\n }", "public void bsetCostElements() {\n\t\t\t\n\t\t\t\n\t\tfor (int obj = 0; obj < finalLocation.length; obj++) {\n\t\t for (int time = 0; time < finalLocation[obj].length; time++) {\n\t\t\t\n\t\t bfCost[obj][time].bstorageCost=totalCostCalculation.btotalResidentCost[time][obj][finalLocation[obj][time]].bstorageCost;\n\t\t\t bfCost[obj][time].breadCost=totalCostCalculation.btotalResidentCost[time][obj][finalLocation[obj][time]].breadCost;\n\t\t\t bfCost[obj][time].bwriteCost=totalCostCalculation.btotalResidentCost[time][obj][finalLocation[obj][time]].bwriteCost;\n\t\t\t bfCost[obj][time].btranCost=totalCostCalculation.btotalResidentCost[time][obj][finalLocation[obj][time]].btranCost;\n\t\t\t \n\t\t\t //1. we calculate latency cost for two cases separately: when the object is in the hot tier or cool tier.\n\t\t\t if (finalLocation[obj][time]==0){//Object is in the cool tier\n\t\t\t\t bfCost[obj][time].bdelayCost=totalCostCalculation.btotalResidentCost[time][obj][0].bdelayCost;\n\t\t\t\t \n\t\t\t }else{// object is in both tiers and, in consequence, the latency cost of writes is the maximum latency of writing in both tiers, and the read latency is the one in hot tier.\n\t\t\t\t bfCost[obj][time].bedelCost=fc.bdelayMaxWriteReadCost(workloadGenerator.objectListRegion[obj], 1, obj, time);\n\t\t\t }\n\t\t\t \n\t\t /* 2. Here we calculate storage cost and transaction cost to make consistent data. This requires just write transaction. Since in our cost \n calculation make a computation for both read and writes.\n\t\t */\n\t\t \n\t\t if(finalLocation[obj][time]==1){//NOTE: in above cost storage, we calculate the cost of object in either in hot or cold tier. \n\t\t \t //So here we calculate the storage cost in cold tier when the object is in hot tier.\n\t\t \t bfCost[obj][time].bstorageCost=bfCost[obj][time].bstorageCost.add(totalCostCalculation.btotalResidentCost[time][obj][0].bstorageCost);\n\t\t bfCost[obj][time].bconsisCost=totalCostCalculation.btotalResidentCost[time][obj][0].bconsisCost;\n\t\t }\n\t\t\t bfCost[obj][time].bnonMigrationCost=bfCost[obj][time].bstorageCost.add(bfCost[obj][time].breadCost).add( bfCost[obj][time].bwriteCost).\n\t\t\t\t\t add(bfCost[obj][time].btranCost).add( bfCost[obj][time].bconsisCost).\n\t\t\t\t\t add(bfCost[obj][time].bdelayCost);\n\t\t\t\t\t //totalCostCalculation.btotalResidentCost[time][obj][finalLocation[obj][time]].bnonMigrationCost.add(bfCost[obj][time].bconsisCost);\n\t\t\t \n\t\t\t //3. We need to calculate just transfer cost between cold to hot tier. From hot to cold tier does not make sense because we have a copy of data in cold tier.\n\t\t if(breakPoint==1){//If breakPoint is ONE then for serving every user, the object for each time slot is transfered from Cold to Hot tier.\n\t\t \t \n\t\t }\n\t\t else if(time>0 && finalLocation[obj][time-1]==0 && finalLocation[obj][time]==1){\n\t\t\t bfCost[obj][time].bmigrationCost=totalCostCalculation.btotalMigrationCost[time][obj][finalLocation[obj][time-1]][finalLocation[obj][time]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}", "private void graphInfo() {\n \n this.distances = new double[this.cities.size()][this.cities.size()];\n \n City c1, c2;\n \n // take the city\n for (int i = 0; i < this.cities.size(); i++) {\n // go through all the other cities\n c1 = this.cities.get(i);\n for (int j = 0; j < this.cities.size(); j++) {\n c2 = this.cities.get(j);\n this.distances[i][j] = c1.to(c2);\n }\n }\n \n }", "public static void process(Scanner s) {\n\t\tString[] first_name, last_name;\n\t\tString[] letter_grade;\n\t\tString[] output, first_initial;\n\t\tdouble[] assignments,aGrades;\n\t\tint[] letterGradeCount = new int[11];\n\t\tdouble aTotal,aGTotal;\n\t\tint studentCount=0;\n\t\tint aCount = 0;\n\t\tdouble[] assignment_grade, participation_grade, midterm, final_exam, weighted_average,normalizedMid, normalizedFin, curved_score_mid, curved_score_fin;\n\t\tdouble maxPPoint, rawPPoint;\n\t\tdouble totalMid, aveMid, totalFin, aveFin, stdMid, stdFin, sumstdm, sumstdf;\n\t\t\n\t\t\n\t\taTotal = aGTotal = totalMid = totalFin = sumstdm = sumstdf = 0;\n\t\t\n\t\ts = new Scanner(System.in);\n\t\t\n\t\taCount = s.nextInt();\n\n\t\tassignments = new double[aCount];\n\t\taGrades = new double[aCount];\n\t\t\n\t\tfor(int i = 0;i < aCount;i++)\n\t\t{\n\t\t\tassignments[i] = s.nextDouble();\n\t\t\taTotal= aTotal + assignments[i];\n\t\t}\n\t\t\n\t\tmaxPPoint = s.nextDouble();\n\t\tstudentCount=s.nextInt();\n\t\toutput = new String[studentCount];\n\t\tfirst_name = new String[studentCount];\n\t\tlast_name = new String[studentCount];\n\t\tfirst_initial = new String[studentCount];\n\t\tnormalizedMid = new double[studentCount];\n\t\tnormalizedFin = new double[studentCount];\n\t\tcurved_score_mid = new double[studentCount];\n\t\tcurved_score_fin = new double[studentCount];\n\t\tletter_grade = new String[studentCount];\n\t\tassignment_grade = new double[studentCount];\n\t\tparticipation_grade= new double[studentCount];\n\t\tmidterm = new double[studentCount];\n\t\tfinal_exam = new double[studentCount];\n\t\tweighted_average = new double[studentCount];\n\t\t//input all the information\n\t\tfor(int i = 0;i < studentCount;i++)\n\t\t{\n\t\t\tfirst_name[i]=s.next();\n\t\t\tfirst_initial[i]=Character.toString(first_name[i].charAt(0)) + \".\";\n\t\t\tlast_name[i]=s.next();\n\t\t\t\n\t\t\trawPPoint=s.nextDouble();\n\t\t\tparticipation_grade[i] = 100 * (rawPPoint / (maxPPoint * 0.8));\n\t\t\t\n\t\t\tparticipation_grade[i] = (participation_grade[i] > 100) ? 100 : participation_grade[i];\n\t\t\taGTotal=0;\n\t\t\tfor(int i1 = 0;i1 < aCount;i1++)\n\t\t\t{\n\t\t\t\taGrades[i1] = s.nextDouble();\n\t\t\t\taGTotal= aGTotal + aGrades[i1];\n\t\t\t}\n\t\t\t\n\t\t\tassignment_grade[i] =100*(aGTotal)/(aTotal);\n\t\n\t\t\tmidterm[i]=s.nextDouble();\n\t\t\tfinal_exam[i]=s.nextDouble();\n\t\t\t\n\t\t\ttotalMid = totalMid + midterm[i];\n\t\t\ttotalFin = totalFin + final_exam[i];\n\t\t}\n\t\t\n\t\taveMid = totalMid / studentCount;\n\t\taveFin = totalFin / studentCount;\n\t\tfor(int i = 0 ; i < studentCount ; i++)\n\t\t{\n\t\t\tsumstdm=sumstdm+Math.pow(midterm[i]-aveMid, 2);\n\t\t\tsumstdf=sumstdf+Math.pow(final_exam[i]-aveFin, 2);\n\t\t}\n\t\t\n\t\tstdMid = Math.sqrt( sumstdm / studentCount);\n\t\tstdFin = Math.sqrt( sumstdf / studentCount);\n\t\t\n\t\tfor(int i = 0 ; i < studentCount ; i++)\n\t\t{\n\t\t\tdouble nm, nf;\n\t\t\tnm = (midterm[i]-aveMid)/stdMid;\n\t\t\tnf = (final_exam[i]-aveFin)/stdFin;\n\t\t\tif(nm>1.0 && nm <2.0 && nm > -4.0)\n\t\t\t\tcurved_score_mid[i] = (nm - 1.0)/(2.0 - 1.0)*(100.0 - 94.0) + 94.0;\n\t\t\telse if(nm>0.0)\n\t\t\t\tcurved_score_mid[i] = (nm - 0.0)/(1.0 - 0.0)*(94.0 - 85.0) + 85.0;\n\t\t\telse if(nm>-1.0)\n\t\t\t\tcurved_score_mid[i] = (nm - (-1.0))/(0.0 - (-1.0))*(85.0 - 75.0) + 75.0;\n\t\t\telse if(nm>-1.5)\n\t\t\t\tcurved_score_mid[i] = (nm - (-1.5))/((-1.0) - (-1.5))*(75.0 - 65.0) + 65.0;\n\t\t\telse if(nm>-2.0)\n\t\t\t\tcurved_score_mid[i] = (nm - (-2.0))/((-1.5) - (-2.0))*(65.0 - 55.0) + 55.0;\n\t\t\telse if(nm>-3.0)\n\t\t\t\tcurved_score_mid[i] = (nm - (-3.0))/((-2.0) - (-3.0))*(55.0 - 30.0) + 30.0;\n\t\t\telse\n\t\t\t\tcurved_score_mid[i] = (nm - (-4.0))/((-3.0) - (-4.0))*(30.0 - 0) + 30.0;\n\n\t\t\tif(nf>1.0 && nf <2.0 && nf > -4.0)\n\t\t\t\tcurved_score_fin[i] = (nf - 1.0)/(2.0 - 1.0)*(100.0 - 94.0) + 94.0;\n\t\t\telse if(nf>0.0)\n\t\t\t\tcurved_score_fin[i] = (nf - 0.0)/(1.0 - 0.0)*(94.0 - 85.0) + 85.0;\n\t\t\telse if(nf>-1.0)\n\t\t\t\tcurved_score_fin[i] = (nf - (-1.0))/(0.0 - (-1.0))*(85.0 - 75.0) + 75.0;\n\t\t\telse if(nf>-1.5)\n\t\t\t\tcurved_score_fin[i] = (nf - (-1.5))/((-1.0) - (-1.5))*(75.0 - 65.0) + 65.0;\n\t\t\telse if(nf>-2.0)\n\t\t\t\tcurved_score_fin[i] = (nf - (-2.0))/((-1.5) - (-2.0))*(65.0 - 55.0) + 55.0;\n\t\t\telse if(nf>3.0)\n\t\t\t\tcurved_score_fin[i] = (nf - (-3.0))/((-2.0) - (-3.0))*(55.0 - 30.0) + 30.0;\n\t\t\telse\n\t\t\t\tcurved_score_fin[i] = (nf - (-4.0))/((-3.0) - (-4.0))*(30.0 - 0) + 0.0;\n\t\t\n\t\t} \n\t\tfor(int i = 0;i < studentCount;i++)\n\t\t{\n\t\t\tweighted_average[i] = assignment_grade[i]*0.4 + participation_grade[i]*0.15 +\n\t\t\t\t\tcurved_score_mid[i]*0.2 +curved_score_fin[i]*0.25;\n\t\t\tswitch((int)weighted_average[i])\n\t\t\t{\n\t\t\t\tcase 94:case 95:case 96:case 97:case 98:case 99:case 100:\n\t\t\t\t\tletter_grade[i] = \"A\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 90:case 91:case 92:case 93:\n\t\t\t\t\tletter_grade[i] = \"A-\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 86:case 87:case 88:case 89:\n\t\t\t\t\tletter_grade[i] = \"B+\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 83:case 84:case 85:\n\t\t\t\t\tletter_grade[i] = \"B\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 80:case 81:case 82:\n\t\t\t\t\tletter_grade[i] = \"B-\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 76:case 77:case 78:case 79:\n\t\t\t\t\tletter_grade[i] = \"C+\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 73:case 74:case 75:\n\t\t\t\t\tletter_grade[i] = \"C\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 70:case 71:case 72:\n\t\t\t\t\tletter_grade[i] = \"C-\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 65:case 66:case 67:case 68:case 69:\n\t\t\t\t\tletter_grade[i] = \"D+\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 60:case 61:case 62:case 63:case 64:\n\t\t\t\t\tletter_grade[i] = \"D\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(weighted_average[i] < 60)\n\t\t\t{\n\t\t\t\tletter_grade[i] = \"F\";\n\t\t\t}\n\n\t\t}\n\t\t \n\t\tfor(int i = 0;i < studentCount;i++)\n\t\t{\n\t\t\tswitch(letter_grade[i])\n\t\t\t{\n\t\t\tcase \"A\":\n\t\t\t\tletterGradeCount[0]++;\n\t\t\t\tbreak;\n\t\t\tcase \"A-\":\n\t\t\t\tletterGradeCount[1]++;\n\t\t\t\tbreak;\n\t\t\tcase \"B+\":\n\t\t\t\tletterGradeCount[2]++;\n\t\t\t\tbreak;\n\t\t\tcase \"B\":\n\t\t\t\tletterGradeCount[3]++;\n\t\t\t\tbreak;\n\t\t\tcase \"B-\":\n\t\t\t\tletterGradeCount[4]++;\n\t\t\t\tbreak;\n\t\t\tcase \"C+\":\n\t\t\t\tletterGradeCount[5]++;\n\t\t\t\tbreak;\n\t\t\tcase \"C\":\n\t\t\t\tletterGradeCount[6]++;\n\t\t\t\tbreak;\n\t\t\tcase \"C-\":\n\t\t\t\tletterGradeCount[7]++;\n\t\t\t\tbreak;\n\t\t\tcase \"D+\":\n\t\t\t\tletterGradeCount[8]++;\n\t\t\t\tbreak;\n\t\t\tcase \"D\":\n\t\t\t\tletterGradeCount[9]++;\n\t\t\t\tbreak;\n\t\t\tcase \"F\":\n\t\t\t\tletterGradeCount[10]++;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"A : \" + letterGradeCount[0]);\n\t\tSystem.out.println(\"A-: \" + letterGradeCount[1]);\n\t\tSystem.out.println(\"B+: \" + letterGradeCount[2]);\n\t\tSystem.out.println(\"B : \" + letterGradeCount[3]);\n\t\tSystem.out.println(\"B-: \" + letterGradeCount[4]);\n\t\tSystem.out.println(\"C+: \" + letterGradeCount[5]);\n\t\tSystem.out.println(\"C : \" + letterGradeCount[6]);\n\t\tSystem.out.println(\"C-: \" + letterGradeCount[7]);\n\t\tSystem.out.println(\"D+: \" + letterGradeCount[8]);\n\t\tSystem.out.println(\"D : \" + letterGradeCount[9]);\n\t\tSystem.out.println(\"F : \" + letterGradeCount[10]);\n\t\t\n\t\t\n\t}", "private void initialise() {\n \thashFamily = new Hash[this.r];\n for(int i= 0; i < this.r;i++)\n {\n \tthis.hashFamily[i] = new Hash(this.s * 2);\n }\n this.net = new OneSparseRec[this.r][this.s *2];\n for(int i = 0 ; i < this.r; i++)\n \tfor(int j =0 ; j< this.s * 2 ; j++)\n \t\tthis.net[i][j] = new OneSparseRec();\n \n }", "public static void main(String[] args) {\n\n //\tThis code is given to you. There is NO NEED TO CHANGE IT\n AltFinal altFinal = new AltFinal(\"College.csv\");\n\n //\tThis is some sample code to show all students in the Students List and how to iterate through the list\n //\tmany of your tasks will need to do something similar.\n //\t\tloop through the list, look for some value in each student record and\n // \t\teither count that value or compare to another value\n //\tNothing TODO here - just some sample code to list the students. You'll use this for loop often\n for (Student student : altFinal.students) {\n System.out.println(\"student = \" + student);\n }\n\n //\t----------------------------------------------------------------------------------------------\n //\tNow that we have all of the data loaded let's do some analysis on the information\n\n //\tBelow here is the code to use for the the Final\n\n //\tCommented out until you write the code for the highScholarshipStateStudent method.\n Student bigMoney;\n bigMoney = altFinal.highScholarshipStateStudent(\"Texas\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"California\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"Utah\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"Washington\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"Oregon\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"Nevada\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n //\tThe test is to create methods that will look at the student List and\n // \tcount different values or compare them to find what we are interested in\n\n //\tTODO At the top of this file there is a highestScholarship method.\n // \t\t\tYou have to add code to that method for this to work\n //\twhen you have created the method you can uncomment these two lines of code to see your results\n Student student = altFinal.highestScholarship();\n System.out.println(student.getName() + \" has the biggest Scholarship for: $\" + student.getScholarship());\n\n //\tTODO print how many students are from Texas\n int texans = altFinal.countHomeState(\"Texas\");\n System.out.println(\"Students in Texas: \" + texans);\n //\tTODO print how many students are from outside the US (Their homeState is Foreign)\n int foreign = altFinal.countHomeState(\"Foreign\");\n System.out.println(\"Students in Foreign: \" + foreign);\n //\tTODO print which of these two cities has the most students\n //\tYou must compare the counts for the two groups of students (Texans and Foreign)\n // \tthen print which has the most students. Your code must tell you. You must use an if-else statement\n if (texans > foreign) {\n System.out.println(\"Texans has the most students\" + texans);\n } else System.out.println(\"Foreign has the most students\"+ foreign);\n\n\n //\tTODO \thow many Freshman students appear in the list?\n //\tTODO \thow many Senior students appear in the list?\n //\tTODO \thow many Masters students appear in the list?\n //\t\t\tuse the countYearInSchool method to answer the above questions\n int yearInSchoolX = altFinal.getCountYearInSchoolAndMinor(\"Freshman\", \"Comp Sci\");\n System.out.println(\"There were \" + yearInSchoolX + \" Comp Sci Freshman students\");\n\n int yearInSchool = altFinal.getCountYearInSchoolAndMinor(\"Freshman\", \"Math\");\n System.out.println(\"There were \" + yearInSchool + \" Freshman students\");\n\n //\tTODO \thow many students have scholarships greater than $XX,000?\n //\t\t\tyou will have to create the scholarshipsGreaterThan method to get your answer\n //\t\t\tthen you can uncomment the lines below to print it out\n int bigScholarships = altFinal.getScholarshipsGreaterThan(5000);\n System.out.println(\"Scholarships greater than $5000: \" + bigScholarships);\n\n//\t\t//\tTODO \tprint how many students have scholarships greater than $8,000?\n int testScholarshipMethod = altFinal.getScholarshipsGreaterThan(8000);\n System.out.println(\"there are this many students \" + testScholarshipMethod + \" that have scholarships greater than 8000\");\n\n System.out.println(\"Scholarships for Texans studying anything $\" + altFinal.scholarshipTotal(\"Texas\", null));\n System.out.println(\"Scholarships for anyone studying Statistics $\" + altFinal.scholarshipTotal(null, \"Statistics\"));\n System.out.println(\"Scholarships for Texans studying Statistics $\" + altFinal.scholarshipTotal(\"Texas\", \"Statistics\"));\n System.out.println(\"Scholarships for anyone studying anything $\" + altFinal.scholarshipTotal(null, null));\n }", "protected void deepPopulate(int firstCellX, int firstCellY)\n\t{\n\t\tremoveAll();\n\t\tvalidate();\n\t\t\n\t\tmyGrid = new GridLayout(mySizeY, mySizeX);\n\t\tmyGrid.setHgap(1);\n\t\tmyGrid.setVgap(1);\n\t\t\n\t\tsetBorder(BorderFactory.createEmptyBorder(6,6,6,6));\n\t\tsetLayout(myGrid);\n\t\t\n\t\t//First we get all cells surrounding firstCell and add them to a set, protectedCells\n\t\tSet<Point> protectedCells = new HashSet<Point>();\n\t\t\n\t\t//Define constraints on a 3x3 square to iterate through.\n\t\t//Iterated cells will be added to the protectedCells set.\n\t\t//Declaring start and end points for traversal:\n\t\tint xStart;\n\t\tif(firstCellX - 1 >= 0) xStart = firstCellX - 1; //Make sure we don't go out of bounds\n\t\telse xStart = firstCellX;\n\t\t\n\t\tint xFinish;\n\t\tif(firstCellX + 1 < getSizeX()) xFinish = firstCellX + 1;\n\t\telse xFinish = firstCellX;\n\t\t\n\t\tint yStart = firstCellY - 1;\n\t\tif(firstCellY - 1 >= 0) yStart = firstCellY - 1;\n\t\telse yStart = firstCellY;\n\t\t\n\t\tint yFinish = firstCellY + 1;\n\t\tif(firstCellY + 1 < getSizeY()) yFinish = firstCellY + 1;\n\t\telse yFinish = firstCellY;\n\t\t\n\t\tfor(int x = xStart; x <= xFinish; x++) //Traverse 3x3 square from -1,-1 to +1,+1 (relative to cell clicked)\n\t\t{\n\t\t\tfor(int y = yStart; y <= yFinish; y++)\n\t\t\t{\n\t\t\t\tprotectedCells.add(new Point(x, y));\n\t\t\t\tSystem.out.println(\"Added to protected set: \" + x + \", \" + y);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSet<Point> emptyCellsSet = new HashSet<Point>(); \n\t\t\n\t\tfor(int y = 0; y < mySizeY; y++)\t\t //Fill emptyCells with a Point for each cell available in cells2D.\n\t\t\tfor(int x = 0; x < mySizeX; x++)\t\t\t\n\t\t\t\temptyCellsSet.add(new Point(x, y));\n\t\n\t\temptyCellsSet.removeAll(protectedCells); //Removes all of the protectedCells from the emptyCells set.\n\t\t\n\t\tList<Point> emptyCellsList = new ArrayList<Point>(emptyCellsSet); //Convert sets to lists so we can iterate through them.\n\t\tList<Point> protectedCellsList = new ArrayList<Point>(protectedCells);\n\t\t\t\t\t\n\t\tfor(int i = 0; i < protectedCellsList.size(); i++)\n\t\t\tmyCells2D[protectedCellsList.get(i).y][protectedCellsList.get(i).x] \n\t\t\t\t\t= new SafeCell(this, protectedCellsList.get(i).x, protectedCellsList.get(i).y); //Protected cells are designated as SafeCells\n\t\n\t\tint pointX;\n\t\tint pointY;\n\t\t\n\t\tSystem.out.println(\"Adding mines - number of mines: \" + myNumberMines + \" Empty cells list size: \" + emptyCellsList.size());\n\t\tfor(int y = 0; y < myNumberMines; y++)\n\t\t{\n\t\t\tRandom rn = new Random();\n\t\t\t\n\t\t\tint n = emptyCellsList.size();\n\t\t\tint i = rn.nextInt() % n; //Set i to a random number between 0 and the total number of emptyCells\t\n\t\t\tif(i < 0) i = i * -1; //Make sure the number is positive to prevent stack overflow\n\t\t\t\n\t\t\tpointY = emptyCellsList.get(i).y;\n\t\t\tpointX = emptyCellsList.get(i).x;\n\t\t\t\n\t\t\tmyCells2D[pointY][pointX] = new MineCell(this, pointX, pointY); //Put a MineCell at the random empty cell we chose\n\t\t\tSystem.out.println(\"added MineCell to \" + pointX + \", \" + pointY + \" Iterator: \" + y);\n\t\t\temptyCellsList.remove(i); //Remove the cell we chose from the list of emptyCells so we don't have overlap\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Filling empty cell list of size \" + emptyCellsList.size());\n\t\tfor(int i = 0; i < emptyCellsList.size(); i++)\t\t//Fill each remaining empty cell with a SafeCell\n\t\t{\n\t\t\tpointX = emptyCellsList.get(i).x;\n\t\t\tpointY = emptyCellsList.get(i).y;\n\t\t\tmyCells2D[pointY][pointX] = new SafeCell(this, pointX, pointY);\n\t\t\tSystem.out.println(\"added SafeCell to \" + pointX + \", \" + pointY + \". Iterator: \" + i);\n\t\t} \n\t\t\n\t\tSystem.out.println(\"Adding array objects to panel\");\n\t\tfor(int y = 0; y < mySizeY; y++) //Add the components to this panel.\n\t\t\tfor(int x = 0; x < mySizeX; x++)\n\t\t\t{\n\t\t\t\tadd(myCells2D[y][x]);\t\n\t\t\t\tSystem.out.println(\"Added array cell x: \" + x + \", y: \" + y + \" object: \" + myCells2D[y][x].getClass().toString());\n\t\t\t}\n\t\t\n\t\tvalidate();\n\t}", "public void init(){\n\t\tEmployee first = new Employee(\"Diego\", \"Gerente\", \"[email protected]\");\n\t\tHighSchool toAdd = new HighSchool(\"Santiago Apostol\", \"4656465\", \"cra 33a #44-56\", \"3145689879\", 30, 5000, \"Jose\", new Date(1, 3, 2001), 3, \"Servicios educativos\", \"451616\", 15, \"Piedrahita\", 45, 1200, 500);\n\t\ttoAdd.addEmployee(first);\n\t\tProduct pilot = new Product(\"jet\", \"A00358994\", 1.5, 5000);\n\t\tFood firstFood = new Food(\"Colombina\", \"454161\", \"cra 18\", \"454611313\", 565, 60000, \"Alberto\", new Date(1, 8, 2015), 6, \"Manufactura\", 4);\n\t\tfirstFood.addProduct(pilot);\n\t\ttheHolding = new Holding(\"Hertz\", \"15545\", \"cra 39a #30a-55\", \"3147886693\", 80, 500000, \"Daniel\", new Date(1, 2, 2015), 5);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\ttheHolding.addSubordinate(firstFood);\n\t}", "public Student(String name, String address, String facNumber) {\r\n super(name, address);\r\n this.facultyNumber = facNumber;\r\n courses = new HashMap<String, Double>();\r\n }", "public void evaluate() {\n for (Chromosome chromo : chromosomes) {\n double chromoGH = chromo.getTotalGH();\n if (chromo.isValid()) {\n this.validChromosomes++;\n if (chromoGH > this.getBestScore()) {\n this.bestScore = chromoGH;\n this.setBestChromo(chromo);\n }\n }\n //Log.debugMsg(chromo.getTotalGH().toString());\n// this.map.put(chromoGH, chromo);\n }\n }", "protected void initializeSubProblemsNeighborhood() {\n double[] x = new double[populationSize];\n int[] idx = new int[populationSize];\n\n\n for (int i = 0; i < populationSize; i++) {\n // calculate the distances based on weight vectors (P=2)\n for (int j = 0; j < populationSize; j++) {\n x[j] = MOEAUtils.distVector(lambda[i], lambda[j]);\n idx[j] = j;\n }\n\n // find nearest neighboring subproblems\n MOEAUtils.minFastSort(x, idx, populationSize, neighborSize);\n\n System.arraycopy(idx, 0, neighborhood[i], 0, neighborSize);\n }\n }", "public Student(String myname, int myid , double[] theGradeArray){ \r\n\r\n\t\tname = myname;\r\n\t\tid = myid;\r\n\t\tgrades = theGradeArray;\r\n\t\t\r\n\t// use the static variable from StudentArray Class to keep count of the number of student object\r\n\t\tnumberOfStudents++;\r\n\t}", "private void populateStations() throws Exception{\t\n\t\t\n\t\tTreeSet<String> set = new TreeSet<String>();\n\t\tif(quotList != null){\t\t\t\n\t\t\tfor(int i = 0; i < quotList.length; i++){\t\t\t\t\n\t\t\t\tset.add(quotList[i].getStationCode());\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\tIterator<String> itr = set.iterator();\n\t\t\twhile(itr.hasNext()){\n\t\t\t\tcbStation.add(itr.next());\n\t\t\t}\t\t\t\n\t\t}\t\t\n\t}", "public HotelsData (String Name, String distance, Double rating) {\n\n mName=Name;\n mDistance=distance;\n mRating=rating;\n\n\n\n }" ]
[ "0.5745682", "0.5665821", "0.5459925", "0.54176015", "0.52748555", "0.522736", "0.51906395", "0.5185387", "0.5136896", "0.51220906", "0.51051235", "0.5100706", "0.5094122", "0.50859857", "0.5073558", "0.5068635", "0.50337344", "0.50081277", "0.5004764", "0.49982783", "0.4990569", "0.4975818", "0.49712527", "0.49658453", "0.49616158", "0.49566805", "0.49479774", "0.49466226", "0.49437952", "0.493584", "0.49325857", "0.49320853", "0.4927398", "0.49261132", "0.4914161", "0.48904082", "0.48884904", "0.48798555", "0.48784772", "0.4875291", "0.48701426", "0.48694128", "0.48530388", "0.48493326", "0.4847352", "0.48415557", "0.48343492", "0.4832457", "0.48262048", "0.481948", "0.48180968", "0.48128712", "0.48016858", "0.4801454", "0.47969475", "0.47958368", "0.47954363", "0.47889656", "0.4786774", "0.47813323", "0.4766561", "0.47628766", "0.47592032", "0.47584015", "0.47574687", "0.47539005", "0.47493464", "0.47486228", "0.4748271", "0.47470722", "0.4729659", "0.4728585", "0.4728405", "0.4728372", "0.47281265", "0.47274852", "0.4726831", "0.47228172", "0.47186515", "0.47155914", "0.470877", "0.4707567", "0.47061142", "0.47032988", "0.4701392", "0.46958598", "0.4690472", "0.46901232", "0.46879888", "0.46865442", "0.46865407", "0.46848634", "0.467838", "0.46709833", "0.46698746", "0.4664911", "0.46595752", "0.46526405", "0.46515355", "0.464826" ]
0.5462554
2
used by Driver.java and sets students to reference an ArrayList of all Students
public void setAllNodesArray(ArrayList<Student> x) { students = x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setStudents(ArrayList value);", "public void setStudentList(DatabaseStudent student){\n this.studentSet.add(student);\n }", "public void setStudentList(ArrayList<Student> studentList) {\r\n this.studentList = studentList;\r\n }", "public void setStudentList (Students studentList)\n\n {\n\n // studentList is set equal to studentList.\n this.studentList.add (studentList);\n\n }", "private void CreateStudentList() {\r\n\t\tStudentList=new ArrayList<Student>();\t\r\n}", "static List<Student> getStudents() {\n return students;\n }", "public ArrayList getStudents();", "public void setStudents(StudentDataBase students) {\n this.students = students;\n }", "public ArrayList <Students> getStudentList ()\n\n {\n\n // Returns studentList when called.\n return studentList;\n\n }", "public void setStudentList(ArrayList<Student> studentList) {\n\t\tthis.studentList = studentList;\n\t}", "public void setStudentList(ArrayList<Student> studentList) {\n\t\tthis.studentList = studentList;\n\t}", "public ArrayList<Student> getStudents()\n {\n return students;\n }", "public void setStudents(Set<Student> students) {\n this.students = students;\n }", "private void initializeStudentRegList() {\r\n try {\r\n String query = \"SELECT * FROM ongoingregistrations WHERE studentid=?\";\r\n PreparedStatement pstmt = conn.prepareStatement(query);\r\n pstmt.setInt(1, id);\r\n ResultSet rs = pstmt.executeQuery();\r\n studentRegList = new ArrayList<>();\r\n while (rs.next()) {\r\n studentRegList.add(new Registration(rs.getInt(\"studentid\"), rs.getInt(\"courseid\"), rs.getInt(\"secnum\"), rs.getString(\"grade\"), conn));\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void setStudents() {\n\t}", "public ArrayList<Student> getStudentList()\r\n\t {\r\n\t\treturn studentList;\r\n\t\t\r\n\t }", "public College()\r\n {\r\n students = new ArrayList<Student>();\r\n }", "public ArrayList<Student> getStudents() {\r\n\t\treturn students;\r\n\t}", "public ArrayList<Student> getStudentList() {\r\n return studentList;\r\n }", "public static void main(String[] args) {\n Student s1 = new Student(\"Azat\");\n Student s2 = new Student(\"Saida\");\n Student s3 = new Student(\"Adil\");\n Student s4 = new Student(\"Sabira\");\n Student s5 = new Student(\"Saniya\");\n\n\n List<Student> cybertekStudents = new ArrayList<>(Arrays.asList(s1, s2, s3, s4, s5));\n\n School cybertek = new School(\"Cybertek\", cybertekStudents);\n\n cybertekStudents.add(new Student(\"Denis\"));\n cybertekStudents.add(new Student(\"Irina\"));\n\n System.out.println(cybertek);\n System.out.println(cybertek.schoolName);\n System.out.println(cybertek.allStudentsList);\n\n Student[] students = {new Student(\"Gulnaz\"),\n new Student(\"Sardar\")};\n cybertek.addNewStudent(students);\n System.out.println(cybertek.allStudentsList);\n\n for (Student each : cybertekStudents) {\n System.out.println(each.studentName);\n //347-785-9417 munavvar\n //donna fro Wic, how she is share info 718 616 4338\n\n\n }\n }", "private void createStudentList(Student... student) {\r\n this.students = new Student[student.length];\r\n System.arraycopy(student, 0, this.students, 0, student.length);\r\n this.studentList = new LinkedList<>(Arrays.asList(students));\r\n }", "public ArrayList<Student> getStudentList() {\n return studentList;\n }", "public ArrayList<Student> getStudents() {\r\n\t\treturn this.students;\r\n\t}", "List<Student> getStudent();", "public ArrayList<Student> getStudentList() {\n\t\treturn studentList;\n\t}", "@Override\r\n\tpublic void setStudents(Student[] students) {\n\t\tthis.students = students;\r\n\t}", "public StudentDataBase getStudents() {\n return students;\n }", "private static List<Student> getStudents() {\n \t\n List<Student> studentList = new ArrayList<>();\n Scanner readStudents=null;\n try {\n\t\t\treadStudents = new Scanner(new File(\"src/Student.csv\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Student file not found.\");\n\t\t}\n\t\twhile(readStudents.hasNextLine()) {\n\t\t\tString[] studentLine = readStudents.nextLine().split(\",\");\n\t\t\tlong studentId= Long.parseLong(studentLine[0]);\n\t\t\tint age = Integer.parseInt(studentLine[4]);\n\t\t\tlong recordId = Long.parseLong(studentLine[5]);\n \tStudent newStudent = new Student(studentId,age,studentLine[1],studentLine[2],studentLine[3],recordId);\n \tstudentList.add(newStudent);\n\t\t}\n \n readStudents.close();\n return studentList;\n }", "public static List<Student> getAllStudents(){\r\n Student student1 = new Student(\"Dowlath\",2,3.6,\"male\", Arrays.asList(\"Swim\",\"BasketBall\",\"VolleyBall\"),11);\r\n Student student2 = new Student(\"Bhavya\",2,3.8,\"female\",Arrays.asList(\"Swim\",\"Gymnastics\",\"soccer\"),12);\r\n\r\n\r\n /* 3rd Grade Students */\r\n Student student3 = new Student(\"Priya\",3,4.0,\"female\", Arrays.asList(\"Swim\",\"BasketBall\",\"Aerobics\"),10);\r\n Student student4 = new Student(\"Arsh\",3,3.9,\"male\",Arrays.asList(\"Swim\",\"Gymnastics\",\"soccer\"),9);\r\n\r\n\r\n /* 4th Grade Students */\r\n Student student5 = new Student(\"Sowmiya\",4,3.5,\"female\", Arrays.asList(\"Swim\",\"Dancing\",\"FootBall\"),15);\r\n Student student6 = new Student(\"Ariz\",4,3.9,\"male\",Arrays.asList(\"Swim\",\"BasketBall\",\"BaseBall\",\"FootBall\"),14);\r\n\r\n List<Student> students = Arrays.asList(student1,student2,student3,student4,student5,student6);\r\n return students;\r\n }", "List<Student> getAllStudents();", "@Override\r\n\tpublic Student[] getStudents() {\n\t\treturn this.students;\r\n\t}", "public Set<Student> getStudents() {\n return students;\n }", "public List <Student> getAllStudents();", "public void registerStudents(List<E> listStudents, int courseCode){}", "public ArrayList<Student> studentList()\n {\n ArrayList<Student> studentList = new ArrayList<>();\n try\n {\n DatabaseConnection databaseConnection = new DatabaseConnection();\n String query = \"select * from student\";\n ResultSet rs = databaseConnection.s.executeQuery(query);\n Student student;\n while(rs.next())\n {\n student = new Student(rs.getInt(\"student_id\"), rs.getString(\"student_name\"), rs.getString(\"batch\"), rs.getString(\"student_username\"), rs.getString(\"student_password\"));\n studentList.add(student);\n }\n }\n catch(Exception e)\n {\n JOptionPane.showMessageDialog(null, e);\n }\n return studentList;\n }", "Student[] getStudents(){\n\t\treturn enrolled.toArray(new Student[enrolled.size()]);\n\t}", "public ArrayList<Student> selectAllStudents() {\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n ArrayList<Student> studentList = new ArrayList<>();\n try {\n Class.forName(Tools.MYSQL_JDBC_DRIVER);\n\n connection = DriverManager.getConnection(Tools.DB_URL, Tools.USERNAME, Tools.PASSWORD);\n\n statement = connection.createStatement();\n\n String query = \"SELECT * FROM STUDENTS;\";\n\n resultSet = statement.executeQuery(query);\n\n while (resultSet.next()) {\n String id = resultSet.getString(\"STUDENT_ID\");\n String lastName = resultSet.getString(\"LAST_NAME\");\n String firstName = resultSet.getString(\"FIRST_NAME\");\n String dob = resultSet.getString(\"DATE_OF_BIRTH\");\n float fees = resultSet.getFloat(\"TUITION_FEES\");\n Student student = new Student(id, firstName, lastName, dob, fees);\n\n studentList.add(student);\n\n }\n\n } catch (ClassNotFoundException | SQLException e) {\n e.printStackTrace();\n } finally {\n if (resultSet != null) {\n try {\n resultSet.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n\n if (statement != null) {\n try {\n statement.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n if (connection != null) {\n try {\n connection.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n }\n return studentList;\n }", "public ArrayList<Student> getAllStudents()\n {\n Cursor cursor = sqlServices.getData(USER_TABLE, null, USER_IS_TEACHER + \" = ?\",\n new String[]{\"0\"});\n return getStudentFromCursor(cursor);\n }", "public java.util.List<com.demo.springprotobuff.Demoproto.Student> getStudentList() {\n\t\t\treturn student_;\n\t\t}", "public String[] getStudents() {\n\t\treturn students;\n\t}", "public ArrayList makeStudentList() {\r\n ArrayList<String> studenter = new ArrayList();\r\n Student student = new Student();\r\n \r\n \r\n \r\n return studenter;\r\n}", "@Override\r\n\tpublic List<Student> getAllStudent() {\n\t\treturn sdao.getAllStudent();\r\n\t}", "public List<Student> selectStudentAll() {\n\t\treturn this.studentMaper.selectStudentAll();\r\n\t}", "public static List<Student> getStudents() {\n\t\tList<Student> students = new ArrayList<>();\n\t\t\n\t\t// add sample data\n\t\tstudents.add(new Student(\"James\", \"Richt\", \"[email protected]\"));\n\t\tstudents.add(new Student(\"Kelly\", \"Lou\", \"[email protected]\"));\n\t\tstudents.add(new Student(\"Lin\", \"Howe\", \"[email protected]\"));\n\t\t\n\t\t// return the list\n\t\treturn students;\n\t}", "public ArrayList<Student> getStudents() {\n\n ArrayList<Student> students = new ArrayList<Student>();\n String query = \"SELECT * FROM student\";\n try{\n result = statement.executeQuery(query);\n while(result.next()) {\n\n String id = Integer.toString(result.getInt(\"student_id\"));\n String firstName = result.getString(\"student_first_name\");\n String lastName = result.getString(\"student_last_name\");\n String degree = result.getString(\"degree\");\n String yearOfStudy = result.getString(\"year_of_study\");\n String outcome = result.getString(\"outcome\");\n students.add(new Student(id, firstName, lastName, degree, yearOfStudy, outcome));\n\n }\n }\n catch (SQLException e){\n\n }\n\n return students;\n }", "public void setStudent(Student[] studentWaitList) {\n\t\tthis.student = studentWaitList;\n\t}", "public void addStudent(Student student) {\t\r\n\t\t//Adds student to list of students taking module\r\n\t\tStudentList.add(student);\r\n\t\t\r\n\t\t// adds module to students list of modules\r\n\t\tstudent.AddModuleList(ModuleName);\r\n}", "public Set<Student> getStudentList() {\n\t\treturn nameList;\r\n\t}", "public static void init() {\n\t\tList<Object> objects = FileManager.readObjectFromFile(\"student.dat\");\n\t\tfor (Object o : objects)\n\t\t\tStudentList.add((Student) o);\n\t}", "public Student getStudents() {\n\t\treturn this.student;\n\t}", "public void showstudents(){\n for (int i=0; i<slist.size(); i++){\n System.out.println(slist.get(i).getStudent());\n }\n }", "public ArrayList<Student> retrieveAllCurrent() {\r\n\t\tArrayList<Student> students = new ArrayList<Student>();\r\n\t\tHashMap<String, ArrayList<String>> map = MySQLConnector.executeMySQL(\"select\", \"SELECT * FROM `is480-matching`.users inner join `is480-matching`.students on users.id=students.id WHERE users.type LIKE 'Student';\");\r\n\t\tSet<String> keySet = map.keySet();\r\n\t\tIterator<String> iterator = keySet.iterator();\r\n\t\t\r\n\t\tDate date = new Date();\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tcal.setTime(date);\r\n\t\t\r\n\t\tint currYear = cal.get(cal.YEAR);\r\n\t\tint currMth = cal.get(cal.MONTH);\r\n\t\t\r\n\t\tint year = 0;\r\n\t\t\r\n\t\twhile (iterator.hasNext()){\r\n\t\t\tString key = iterator.next();\r\n\t\t\tArrayList<String> array = map.get(key);\t\r\n\t\t\tint id \t\t\t\t= Integer.parseInt(array.get(0));\r\n\t\t\tString username \t= array.get(1);\r\n\t\t\tString fullName \t= array.get(2);\r\n\t\t\tString contactNum \t= array.get(3);\r\n\t\t\tString email \t\t= array.get(4);\r\n\t\t\tString type\t\t\t= array.get(5);\r\n\t\t\tString secondMajor \t= array.get(7);\r\n\t\t\tint role \t\t\t= Integer.parseInt(array.get(8));\r\n\t\t\tint teamId \t\t\t= Integer.parseInt(array.get(9));\r\n\t\t\tint prefRole \t\t= Integer.parseInt(array.get(10));\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\tint matricYear = Integer.parseInt(username.substring(username.length() - 4, username.length()));\r\n\t\t\t\t\r\n\t\t\t\tyear = currYear - matricYear;\r\n\t\t\t\t\r\n\t\t\t\tStudent student = new Student(id, username, fullName, contactNum, email, type, secondMajor, role, teamId, prefRole);\r\n\t\t\t\t\r\n\t\t\t\tif(currMth > 8){\r\n\t\t\t\t\tyear++;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(year == 3 || year == 4){\r\n\t\t\t\t\tstudents.add(student);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}catch(Exception e){}\r\n\t\t}\r\n\t\t\r\n\t\treturn students;\r\n\t}", "public List<String> getStudents();", "public StudentList() {\r\n\t\t\r\n\t\tlist = new Student[GROW_SIZE];\r\n\t}", "@Override\n\tpublic List<Student> geStudents() {\n\t\treturn null;\n\t}", "public TeamInfo(ArrayList<Student> studentList) {\r\n this.studentList = studentList;\r\n }", "@Override\r\n\tpublic List<Student> getAllStudents() {\n\t\treturn studentRepository.findAll();\r\n\t}", "public ProxyList<Student> getStudents() {\n return students;\n }", "public void SetStudent(Student inStudent) {\n selStudent = inStudent;\n\n }", "public void setStudent(String students) {\n\t\tthis.students = students;\n\t}", "public void setSchools(ArrayList value);", "static void initializeStudentSystem() {\r\n\r\n Course math = new Course(\"1000\", \"Mathematics\", \"College of Science\");\r\n Course computing = new Course(\"1001\", \"Computing\", \"College of Engineering\");\r\n Course english = new Course(\"1002\", \"English\", \"College of Liberal Arts\");\r\n Course history = new Course(\"1003\", \"History\", \"College of Liberal Arts\");\r\n Course biology = new Course(\"1004\", \"Biology\", \"College of Science\");\r\n courses.put(math.getCRN(), math);\r\n courses.put(computing.getCRN(), computing);\r\n courses.put(english.getCRN(), english);\r\n courses.put(history.getCRN(), history);\r\n courses.put(biology.getCRN(), biology);\r\n //\r\n User admin = new User();\r\n admin.setUsername(\"admin\");\r\n admin.setPassword(\"admin\");\r\n admin.setAccountType(4);\r\n accounts.put(admin.getUsername(), admin);\r\n //\r\n Student defaultStudent = new Student();\r\n defaultStudent.setName(\"Jose Cabrera\");\r\n defaultStudent.setUsername(\"John1\");\r\n defaultStudent.setPassword(\"123\");\r\n defaultStudent.setId(\"80539934\");\r\n defaultStudent.setMajor(\"CS\");\r\n defaultStudent.setAccountType(1);\r\n defaultStudent.setGraduationStatus(21);\r\n accounts.put(\"John1\", defaultStudent);\r\n //\r\n Student defaultStudent2 = new Student();\r\n defaultStudent2.setName(\"Raul Hinostroza\");\r\n defaultStudent2.setUsername(\"John2\");\r\n defaultStudent2.setPassword(\"123\");\r\n defaultStudent2.setId(\"805393\");\r\n defaultStudent2.setMajor(\"CS\");\r\n defaultStudent2.setAccountType(1);\r\n accounts.put(\"John2\", defaultStudent2);\r\n //\r\n Student defaultStudent3 = new Student();\r\n defaultStudent3.setName(\"Max Morales\");\r\n defaultStudent3.setUsername(\"John3\");\r\n defaultStudent3.setPassword(\"123\");\r\n defaultStudent3.setId(\"8053923\");\r\n defaultStudent3.setMajor(\"CS\");\r\n defaultStudent3.setAccountType(1);\r\n accounts.put(\"John3\", defaultStudent3);\r\n defaultStudent.addCourses(\"1000\");\r\n defaultStudent2.addCourses(\"1000\");\r\n defaultStudent3.addCourses(\"1000\");\r\n //\r\n Faculty defaultFaculty = new Faculty();\r\n defaultFaculty.setAccountType(2);\r\n defaultFaculty.setName(\"Smith\");\r\n defaultFaculty.setUsername(\"Smith1\");\r\n defaultFaculty.setPassword(\"123\");\r\n accounts.put(defaultFaculty.getUsername(), defaultFaculty);\r\n //\r\n Staff defaultStaff = new Staff();\r\n defaultStaff.setAccountType(3);\r\n defaultStaff.setName(\"Smith\");\r\n defaultStaff.setUsername(\"Smith2\");\r\n defaultStaff.setPassword(\"123\");\r\n accounts.put(defaultStaff.getUsername(), defaultStaff);\r\n }", "public void setStudent(Student s) {\r\n student = s;\r\n }", "@Override\n\tpublic List<Student> retrieveAllStudents() {\n\t\tTypedQuery<Student> query = em.createQuery(\"select s from Student s\",\n\t\t\t\tStudent.class);\n\t\treturn query.getResultList();\n\t}", "private static Student[] makeStudents() {\n\t\treturn null;\n\t}", "private List<Student> getStudentList(StudentSearchResponse srchResponse) {\r\n\t\tList<Student> studentList = new ArrayList<Student>();\r\n\t\tif (srchResponse != null && srchResponse.size() > 0) {\r\n\t\t\tfor (StudentSearchResult srchRes : srchResponse) {\r\n\t\t\t\tStudent std = new Student(srchRes.getInquiryId(),\r\n\t\t\t\t\t\tsrchRes.getStudentNumber(), srchRes.getFirstName(),\r\n\t\t\t\t\t\tsrchRes.getLastName(), srchRes.getMaidenName(),\r\n\t\t\t\t\t\tsrchRes.getDateOfBirth(), srchRes.getCity(),\r\n\t\t\t\t\t\tsrchRes.getStateProvince(), srchRes.getSSN());\r\n\t\t\t\tstudentList.add(std);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn studentList;\r\n\t}", "@PostConstruct\r\n public void init() {\r\n students = new ArrayList<>();\r\n students.add(new Student(\"Marek\", \"Smorąg\", 3.0));\r\n students.add(new Student(\"Bartosz\", \"Rudecki\", 4.54));\r\n students.add(new Student(\"Jakub\", \"Dąbała\", 5.43));\r\n students.add(new Student(\"Jakub\", \"Rek\", 4.23));\r\n students.add(new Student(\"Julia\", \"Smorąg\", 3.56));\r\n students.add(new Student(\"Arkadiusz\", \"Abramowski\", 3.56));\r\n students.add(new Student(\"Marta\", \"Nowak\", 4.23));\r\n students.add(new Student(\"Rafał\", \"Zalewski\", 4.67));\r\n students.add(new Student(\"Adrian\", \"Zalewski\", 5.0));\r\n students.add(new Student(\"Mirosław\", \"Kulesza\", 4.12));\r\n students.add(new Student(\"Michał\", \"Kostro\", 3.67));\r\n students.add(new Student(\"Jan\", \"Nowak\", 3.38));\r\n }", "public static ArrayList<Student> getAllStudents() throws SQLException {\n\t\t\r\n\t\tArrayList<Student> students = new ArrayList<Student>();\r\n\t\t\t\t\r\n\t\t\t\tConnection connection = SQLUtil.getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);\r\n\t\t\t\t\r\n\t\t\t\tString sql = \"SELECT * FROM students\";\r\n\t\t\t\t\r\n\t\t\t\tResultSet resultSet = statement.executeQuery(sql);\r\n\t\t\t\t\r\n\t\t\t\tresultSet.first();\r\n\t\t\t\t\r\n\t\t\t\twhile (!resultSet.isAfterLast()) {\r\n\t\t\t\t\tStudent student = new Student(resultSet.getString(\"firstname\"), resultSet.getString(\"lastname\"), resultSet.getString(\"registration_number\"));\r\n\r\n\t\t\t\t\tstudents.add(student);\r\n\t\t\t\t\tresultSet.next();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\treturn students;\r\n\t\t\r\n\t}", "public String getStudents(){\n\t\treturn this.students;\n\t}", "java.util.List<com.demo.springprotobuff.Demoproto.Student> getStudentList();", "@Override\n\t//查询所有数据\n\tpublic List<Student> selectStudents() {\n\t\tConnection connection =null;\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tList<Student> sList = new ArrayList<Student>();\n\t\t\n\t\ttry {\n\t\t\tconnection = MySQLConnectUtil.getMySQLConnection();\n\t\t\tps = connection.prepareStatement(QUARYSQL);\n\t\t\trs = ps.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tStudent student = new Student();\n\t\t\t\tstudent.setId(rs.getString(\"ID\"));\n\t\t\t\tstudent.setName(rs.getString(\"NAME\"));\n\t\t\t\tstudent.setAge(rs.getInt(\"AGE\"));\n\t\t\t\tsList.add(student);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\tMySQLConnectUtil.closeResultset(rs);\n\t\t\tMySQLConnectUtil.closePreparestatement(ps);\n\t\t\tMySQLConnectUtil.closeConnection(connection);\n\t\t}\n\t\treturn sList;\n\t}", "@Override\n\tpublic List<Student> getStudents() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<Student> query = currentSession.createQuery(\"from Student order by lastName\", Student.class);\n\n\t\t// execute the query and get the results list\n\t\tList<Student> students = query.getResultList();\n\n\t\t// return the results\n\t\treturn students;\n\t}", "public HashMap<Integer, Student> getStudents() {\n return _students;\n }", "public List<Student> getAllStudents() throws IOException {\n\t\tstudentList = studentListGenerator.generateList(\"StudentList.txt\");\n\t\treturn studentList;\n\t}", "@SuppressWarnings(\"unchecked\")\n\t\t@Override\n\t\tpublic List<Student> listStudent() {\n\t\t\treturn sessionFactory.getCurrentSession().createQuery(\"from Student\").list();\n\t\t}", "@Override\r\n\tpublic Students findStudents() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic List<Student> getAllStudents() {\n\t\tList<Student> students = new ArrayList<Student>();\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\t//select CAST(gpa as DECIMAL(3,2)) AS gpa from student;\n\t\t\t//ResultSet rs = stmt.executeQuery(\"select * from student\");\n\t\t\tResultSet rs = stmt.executeQuery(\"select ID, Firstname, Lastname, Program, CAST(gpa as DECIMAL(3,2)) AS gpa from student\");\n\t\t\t\n\t\t\twhile(rs.next()) {\n\t\t\t\tStudent stu = new Student();\n\t\t\t\tstu.setStudentid(rs.getInt(\"ID\"));\n\t\t\t\tstu.setFirstname(rs.getString(\"Firstname\"));\n\t\t\t\tstu.setLastname(rs.getString(\"Lastname\"));\n\t\t\t\tstu.setProgram(rs.getString(\"Program\"));\n\t\t\t\tstu.setGpa(rs.getDouble(\"GPA\"));\n\n\t\t\t\tstudents.add(stu);\n\t\t\t}\n\t\t\t\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn students;\n\t}", "public java.util.List<com.demo.springprotobuff.Demoproto.Student> getStudentList() {\n\t\t\t\tif (studentBuilder_ == null) {\n\t\t\t\t\treturn java.util.Collections.unmodifiableList(student_);\n\t\t\t\t} else {\n\t\t\t\t\treturn studentBuilder_.getMessageList();\n\t\t\t\t}\n\t\t\t}", "public List<Student> stulist() throws Exception {\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql:///stuu\", \"root\", \"root\");\n\t\tPreparedStatement ps = conn.prepareStatement(\"select * from student\");\n\t\tResultSet rs = ps.executeQuery();\n\t\tList<Student> list = new ArrayList<Student>();\n\t\twhile(rs.next())\n\t\t{\n\t\t\tStudent s = new Student(rs.getInt(1),rs.getString(2),rs.getString(3),rs.getString(4),rs.getString(5),rs.getString(6));\n\t\t\tlist.add(s);\n\t\t}\n\t\trs.close();\n\t\tps.close();\n\t\tconn.close();\n\t\treturn list;\n\t}", "public ArrayList<Student> GetAllStudentData() {\n\t\tArrayList<Student> result = new ArrayList<>();\n\t\tcurr = head;\n\t\twhile (curr != null) {\n\t\t\tArrayList<Student> theData = curr.data.students.getStudentData();\n\t\t\tfor (int i = 0; i <= curr.data.students.getStudentDataCount() - 1; i++) {\n\t\t\t\tresult.add(theData.get(i));\n\t\t\t}\n\t\t\tcurr = curr.next;\n\t\t}\n\t\treturn result;\n\t}", "private static void init() {\n\n students = new HashMap<String, Student>(); //redundant but there for my reference\n\n //new Student objects, from the Student class, that are in our new HashMap called students\n Student annette = new Student(\"Annette\");\n annette.addGrade(90); // addGrade method from the Student class\n annette.addGrade(85);\n annette.addGrade(40);\n\n annette.recordAttendance( \"2019-10-01\", \"A\");\n annette.recordAttendance( \"2019-10-02\", \"P\");\n annette.recordAttendance( \"2019-10-03\", \"A\");\n annette.recordAttendance( \"2019-10-04\", \"P\");\n\n\n Student bridget = new Student(\"Bridget\");\n bridget.addGrade(90);\n bridget.addGrade(70);\n bridget.addGrade(60);\n\n bridget.recordAttendance( \"2019-10-01\", \"A\");\n bridget.recordAttendance( \"2019-10-02\", \"P\");\n bridget.recordAttendance( \"2019-10-03\", \"A\");\n bridget.recordAttendance( \"2019-10-04\", \"P\");\n\n\n Student bev = new Student(\"Bev\");\n bev.addGrade(97);\n bev.addGrade(96);\n bev.addGrade(95);\n\n bev.recordAttendance( \"2019-10-01\", \"A\");\n bev.recordAttendance( \"2019-10-02\", \"P\");\n bev.recordAttendance( \"2019-10-03\", \"A\");\n bev.recordAttendance( \"2019-10-04\", \"P\");\n\n\n Student glo = new Student(\"Glo\");\n glo.addGrade(94);\n glo.addGrade(93);\n glo.addGrade(92);\n\n glo.recordAttendance( \"2019-10-01\", \"A\");\n glo.recordAttendance( \"2019-10-02\", \"P\");\n glo.recordAttendance( \"2019-10-03\", \"A\");\n glo.recordAttendance( \"2019-10-04\", \"P\");\n\n\n // sets the usernames as keys\n // and values that are student objects\n students.put(\"bmills\", bridget);\n students.put(\"annette1\", annette);\n students.put(\"bevvybev\", bev);\n students.put(\"thegloUp\", glo);\n\n }", "public static ArrayList<Student> get_student_users() throws IOException {\n\t\tArrayList<Student> studentList = new ArrayList<Student>();\n\t\tReadCSV readStudentlist = new ReadCSV(\"students.csv\");\n\t\ttry {\n\t\t\t// auto-generated primary key for authors table\n\t\t\t\n\t\t\twhile (true) {\n\t\t\t\tList<String> tuple = readStudentlist.next();\n\t\t\t\tif (tuple == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//Reads each value in from our string list and inserts them into the appropriate attribute of our student object\n\t\t\t\tIterator<String> i = tuple.iterator();\n\t\t\t\tStudent students = new Student();\n\t\t\t\tstudents.setName(i.next());\n\t\t\t\tString password = MD5.getMd5(i.next());\n\t\t\t\tstudents.setPassword(password);\n\t\t\t\tstudents.setEmail(i.next());\n\t\t\t\tstudents.set_faculty_code(i.next());\n\t\t\t\tstudents.setType(Integer.parseInt(i.next()));\n\t\t\t\tstudentList.add(students);\n\t\t\t}\n\t\t\treturn studentList;\n\t\t} finally {\n\t\t\treadStudentlist.close();\n\t\t}\n\t}", "public void findallstudentservice() {\n\t\t dao.findallstudent();\r\n\t\t\r\n\t}", "public List getStudentList() throws GenericBusinessException {\n sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();\n try {\n\n String queryString = \"from \" + Student.class.getName() + \" e\";\n // Add a an order by on all primary keys to assure reproducable results.\n String orderByPart = \"\";\n orderByPart += \" order by e.studentId\";\n queryString += orderByPart;\n Query query = hibernateTemplate.createQuery(queryString);\n List list = hibernateTemplate.list(query);\n\n return list;\n } finally {\n log.debug(\"finished getStudentList\");\n }\n }", "public ArrayList<Student> getStudentsForCourse(Course course){\n ArrayList<Student> result = new ArrayList();\n \n String statement = GET_SUDENTS_FOR_COURSE;\n \n ResultSet rs = data.makePreparedStatement(statement,new Object[]{(Object)course.getId()});\n try {\n while(rs.next()){\n Student student = new Student(rs.getInt(\"id\"),rs.getString(\"first_name\"),rs.getString(\"last_name\"),\n rs.getDate(\"birthday\").toLocalDate(),rs.getDouble(\"tuition_fees\"));\n result.add(student);\n \n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getStudentsForCourse()\");\n }finally{\n data.closeConnections(rs,data.ps, data.conn);\n }\n \n return result;\n }", "private void loardSid() throws IOException{\n StudentController studentController = new StudentController();\n \n List<StudentDTO>list;\n \n try {\n list = studentController.getAllStudent();\n for (StudentDTO studentDTO : list) {\n cmbStudentID.addItem(studentDTO.getId());\n }\n } catch (Exception ex) {\n Logger.getLogger(Registation.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public List<Student> getAllStudentData() {\r\n\t\tList<Student> list = new ArrayList<Student>();\r\n\t\ttry {\r\n\t\t\tConnection con = DatabaseUtility.getCon(inputStream);\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"select * from student\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tStudent stud = new Student();\r\n\r\n\t\t\t\tstud.setRollno(rs.getInt(1));\r\n\t\t\t\tstud.setFname(rs.getString(2));\r\n\t\t\t\tstud.setLname(rs.getString(3));\r\n\t\t\t\tstud.setEmail(rs.getString(4));\r\n\t\t\t\tstud.setGender(rs.getString(5));\r\n\t\t\t\tstud.setDOB(rs.getString(6));\r\n\t\t\t\tstud.setAddress(rs.getString(7));\r\n\t\t\t\tstud.setContact(rs.getString(8));\r\n\r\n\t\t\t\tlist.add(stud);\r\n\t\t\t}\r\n\t\t\tcon.close();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tSystem.out.println(ex);\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}", "@Override\n\tpublic Iterator<Student> selectAll() {\n\t\tString sql=\"SELECT a.id,a.num,a.name,a.email,a.phone,a.degree,a.project,a.school,b.name,a.is_cap from tc_student as a,tc_school as b where a.school=b.id\";\n\t\tArrayList<Student> arr=new ArrayList<Student>();\n\t\tResultSet rs=mysql.query(sql);\n\t\ttry {\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tStudent stu=new Student();\n\t\t\t\tstu.setId(rs.getInt(1));\n\t\t\t\tstu.setNum(rs.getString(2));\n\t\t\t\tstu.setName(rs.getString(3));\n\t\t\t\tstu.setEmail(rs.getString(4));\n\t\t\t\tstu.setPhone(rs.getString(5));\n\t\t\t\tstu.setDegree(rs.getShort(6));\n\t\t\t\tstu.setProject(rs.getInt(7));\n\t\t\t\tstu.setSchool(rs.getInt(8));\n\t\t\t\tstu.setSchoolstring(rs.getString(9));\n\t\t\t\tstu.setIs_cap(rs.getInt(10));\n\t\t\t\tstu.setDegreestring(degreemap[stu.getDegree()]);\n\t\t\t\tarr.add(stu);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn arr.iterator();\n\t}", "public static ArrayList<Student> getAllStudenti() {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.parameters = new Object[] {};\n\t\t\trp.type = RequestType.GET_ALL_STUDENTS;\n\t\t\tReceiveContent rps = sendReceive(rp);\n\t\t\treturn (ArrayList<Student>) rps.parameters[0];\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"SendNewsLetter error\");\n\t\t}\n\t\treturn new ArrayList<Student>();\n\t}", "public String getStudentnames() {\r\n return studentnames;\r\n }", "public void addStudent(Student student) {\n students.add(student);\n }", "public void setList() \n\t\t{\n\t\t\tVector<Course> items = client.ProfessorCourseList(prof.getID());\n\t\t\tmodel.removeAllElements();\n\t\t\tif(items == null)return;\n\t\t\tString s;\n\t\t\tfor(int i = 0; i < items.size(); i++)\n\t\t\t{\n\t\t\t\ts = items.get(i).getName();\n\t\t\t\tmodel.addElement(items.get(i));\n\t\t\t}\n\t\t}", "public void add(Student s)\r\n {\r\n students.add(s);\r\n }", "public ArrayList getSchools();", "public void printStudents()\n {\n for(Student s : students)\n System.out.println(s);\n }", "public List<User> getStudents(Group currentGroup);", "public Student[] listStudents(long id) {\n\t\treturn new Tutor().listMyStudents(id);\n\t}", "public void add(Student student) {\n\t\tstudentList.add(student);\n\t}", "public static ArrayList<Student> fillStudentsArray(ArrayList<Student> studentArrayList){\n\n studentArrayList.add(PrepareData.student);\n studentArrayList.add(PrepareData.student1);\n studentArrayList.add(PrepareData.student2);\n studentArrayList.add(PrepareData.student3);\n studentArrayList.add(PrepareData.student4);\n studentArrayList.add(PrepareData.student5);\n studentArrayList.add(PrepareData.student6);\n studentArrayList.add(PrepareData.student7);\n\n return studentArrayList;\n\n\n\n }", "@Override\r\n\tpublic List<Student> getAll() {\n\t\treturn dao.getAll();\r\n\t}" ]
[ "0.75673896", "0.7549607", "0.75354326", "0.7517193", "0.7453842", "0.7366598", "0.7335242", "0.72492915", "0.71750295", "0.7157106", "0.7157106", "0.7136762", "0.7133666", "0.7091631", "0.70743144", "0.7061784", "0.7036023", "0.701898", "0.69904256", "0.6979086", "0.69784737", "0.69290024", "0.6899391", "0.6878094", "0.6854293", "0.68019867", "0.6798035", "0.6786742", "0.6763019", "0.6754682", "0.6751217", "0.6739424", "0.67352676", "0.6701963", "0.6670401", "0.666427", "0.6664068", "0.66610575", "0.6657837", "0.6656351", "0.6655289", "0.6650326", "0.66460407", "0.66458535", "0.66375077", "0.66347015", "0.66114455", "0.6572448", "0.65543807", "0.65523934", "0.6547344", "0.6541081", "0.652246", "0.65212816", "0.6519967", "0.65096116", "0.65042883", "0.6499478", "0.64911985", "0.6466932", "0.6425781", "0.642104", "0.64044535", "0.63742965", "0.6370348", "0.63651067", "0.6357125", "0.63372314", "0.6334897", "0.633486", "0.63306355", "0.632371", "0.6315848", "0.63073343", "0.63028944", "0.6279332", "0.6256633", "0.6252047", "0.6251475", "0.6246379", "0.6243287", "0.6223861", "0.6223503", "0.62194693", "0.6209682", "0.6188762", "0.6184047", "0.61762893", "0.61755073", "0.6175375", "0.6171895", "0.61688757", "0.6164402", "0.61621207", "0.6161301", "0.61528534", "0.61439043", "0.6139462", "0.6133114", "0.6130009" ]
0.6634153
46
Return the default name for this service.
public String getServiceName() { return serviceName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDefaultName()\r\n {\r\n System.out.println(\"returning default name: \" + m_default );\r\n return m_default;\r\n }", "public String getmDefaultName() {\n return mDefaultName;\n }", "public String getDescriptiveServiceName() {\n if (serviceAbbreviation != null) {\n return serviceAbbreviation;\n }\n return serviceFullName;\n }", "protected String getDefaultConfigName() {\r\n return DEFAULT_CONFIG_NAME;\r\n }", "public String defaultname()\n {\n String newname = \"Stamp\"+Integer.toString(id);\n return newname;\n }", "public String getDefaultName(VariableSummary initVariable, String prefix) {\r\n String name = initVariable.getName();\r\n if ((name.length() > 1) && (name.charAt(1) == '_')) {\r\n return name;\r\n }\r\n\r\n if (isAllCaps(name)) {\r\n return name;\r\n }\r\n\r\n StringBuffer buffer = new StringBuffer(prefix);\r\n String type = initVariable.getType();\r\n if (type.equals(\"String\")) {\r\n buffer.append(\"sz\");\r\n } else {\r\n useCapitalLettersFromType(type, buffer);\r\n }\r\n\r\n if (buffer.length() == 2) {\r\n buffer.append(type.charAt(0));\r\n } else if (buffer.length() == 3) {\r\n insureMinimumLettersInTypeCode(buffer, type);\r\n }\r\n\r\n int first = 0;\r\n if (name.charAt(0) == '_') {\r\n first++;\r\n }\r\n\r\n buffer.append(Character.toUpperCase(name.charAt(first)));\r\n if (name.length() > first + 1) {\r\n buffer.append(name.substring(first + 1));\r\n }\r\n\r\n return buffer.toString();\r\n }", "public static String getDefaultServletName() {\n return RefDataServlet.DEFAULT_REFERENCE_DATA_SERVLET_NAME;\n }", "protected String getDefaultCustomConfigName() {\r\n return DEFAULT_CUSTOM_CONFIG_NAME;\r\n }", "@Override\n public String getFullDefaultConfigName() {\n return getConfigPath() + defaultConfigFileName;\n }", "public static String getDefaultPlatformName() {\n\t\tPLATFORM_NAME = \"defaultGC\";\n\t\treturn PLATFORM_NAME;\n\t}", "public java.lang.String getDefaultTargetName() {\n return defaultTargetName;\n }", "@Override\n public String getDefaultConfigName() {\n return defaultConfigFileName;\n }", "public String getDefaultTargetName()\n {\n if (defaultTargetAttribute != null)\n {\n return defaultTargetAttribute.getValue();\n }\n else\n {\n return \"\";\n }\n }", "static public String getDefaultString () {\n return defaultString;\n }", "public final String getName() {\n if (name == null) {\n name = this.getClass().getSimpleName().substring(3);\n }\n return name;\n }", "public String getDefaultThemeName() {\n\treturn resources.getString(\"defaultTheme\", null);\n }", "public String getName(){\n\t\tif(name==null) return webserviceUrl;\n\t\treturn name;\n\t}", "public String getDefault();", "public String asName() {\n return this.name().toLowerCase(Locale.getDefault());\n }", "String getPreferredName();", "private String getServiceName(Descriptors.ServiceDescriptor descriptor ) {\r\n return descriptor.getFullName();\r\n }", "public java.lang.String getServiceName() {\n java.lang.Object ref = serviceName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n serviceName_ = s;\n }\n return s;\n }\n }", "public java.lang.String getServiceName() {\n java.lang.Object ref = serviceName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n serviceName_ = s;\n }\n return s;\n }\n }", "public java.lang.String getServiceName() {\n java.lang.Object ref = serviceName_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n serviceName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getName() {\n if (name == null && !nameExplicitlySet) {\n synchronized(this) {\n if (name == null && !nameExplicitlySet)\n name = constructComponentName();\n }\n }\n return name;\n }", "java.lang.String getServiceName();", "java.lang.String getServiceName();", "public static String getName(final Class< ? > taskClass, final String defaultName,\n final String suffix)\n {\n if (\"\".equals(defaultName))\n {\n return taskClass.getSimpleName() + suffix;\n }\n else\n {\n return defaultName;\n }\n }", "public String getName() {\n return (NAME_PREFIX + _applicationId + DELIM + _endpointId);\n }", "public String getDefault(){\n return _default;\n }", "public String getName() {\n if (MyName != null) {\n return new String(MyName);\n }\n return null;\n }", "@Override\n\tpublic String getName() {\n\t\tfinal String name = super.getName();\n\t\ttry {\n\t\t\treturn name.substring(namespace.length()+1);\n\t\t} catch (Exception e) {\n\t\t\treturn name;\n\t\t}\n\t}", "public String getName() {\r\n\t\treturn LocalizedTextManager.getDefault().getProperty(name());\r\n\t}", "public static String lookup(String uuid, String defaultName) {\n String name = attributes.get(uuid);\n return name == null ? defaultName : name;\n\t}", "protected String getDefaultFilename()\n {\n return DEFAULT_FILENAME;\n }", "public String getName() {\n\t\treturn null;\r\n\t}", "public String getName() {\n\t\treturn null;\r\n\t}", "public String getName() {\n\t\treturn null;\n\t}", "public String getName() {\n\t\treturn null;\n\t}", "public java.lang.String getServiceName() {\n java.lang.Object ref = serviceName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n serviceName_ = s;\n return s;\n }\n }", "public java.lang.String getServiceName() {\n java.lang.Object ref = serviceName_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n serviceName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getServiceName() {\n java.lang.Object ref = serviceName_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n serviceName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getName() {\n return \"\";\n }", "public String getName() {\n return \"\";\n }", "public String getDefaultFileName() {\n return \"output\" + mProcCount + extension;\n }", "public Resource getDefaultGraphName() {\n \t\treturn createResource(this.baseGraphName);\n \t}", "public Object getName() {\n\t\treturn null;\n\t}", "public String getNomService() {\r\n\t\treturn nomService;\r\n\t}", "public String getDefaultApp()\n {\n if (defaultApp == null)\n {\n return apps.get(0).getName();\n }\n\n return defaultApp;\n }", "public String name() {\n this.use();\n\n return name;\n }", "public static String getName()\n {\n read_if_needed_();\n \n return _get_name;\n }", "@Override\r\n\tpublic String getName() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getName() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getName() {\n\t\treturn null;\r\n\t}", "public String getName() {\n\t\t\n\t\tString name = \"\";\n\t\t\n\t\tif (securityContext != null) {\n\t\t\tname = securityContext.getIdToken().getPreferredUsername();\n\t\t}\n\t\t\n\t\treturn name;\n\t}", "public String getDefaultEnvironmentVariableName() {\n\t\t\tlogger.debug(\"### DescriptorImpl::getDefaultEnvironmentVariableName\");\n\t\t\treturn SemanticVersionBuildWrapper.DEFAULT_ENVIRONMENT_VARIABLE_NAME;\n\t\t}", "@Override\n\t\tpublic String getInstanceName() {\n\t\t\treturn null;\n\t\t}", "public String getName() {\n return DUMMY_NAME;\n }", "public String getDefaultResourceFileName() \n {\n return null; \n }", "default String getDisplayName() {\r\n\t\treturn getClass().getSimpleName();\r\n\t}", "protected String getDefaultFilename() {\n return getFilename(\n mDefaultFilenamePrefix\n + mFileNameDelimiter\n + sAndroidDeviceName\n + mFileNameDelimiter\n + sAndroidRuntimeVersion);\n }", "@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getName() {\n\t\treturn null;\n\t}", "public Name getName(String arg0) {\n\t\treturn null;\n\t}", "String getServiceName();", "String getServiceName();", "@Override\r\n\tpublic String getName()\r\n\t{\n\t\treturn null;\r\n\t}", "public String getDefaultTargetPropertyName() {\r\n return null;\r\n }", "@Override\n\tpublic String name() {\n\n\t\treturn NAME;\n\t}", "public static String getServiceName() {\n\t\treturn serviceName;\n\t}", "public static String getServiceName() {\n\t\treturn serviceName;\n\t}", "protected String defaultJNDIName() {\n return \"com/hps/july/trailcom/beans/OpticalHop\";\n }", "public String getDefaultNamespace() {\n return defaultNamespaceUri;\n }", "java.lang.String getInstanceName();", "public String getName() {\n if(name == null)\n return \"\"; \n return name;\n }", "@Override\r\n\tpublic String getName() {\r\n\t\treturn null;\r\n\t}", "protected String getDefaultUserName()\n {\n return \"admin\";\n }", "public QName getServiceName() {\n\t\treturn null;\n\t}", "public String getName() {\n // defaults to class name\n String className = getClass().getName();\n return className.substring(className.lastIndexOf(\".\")+1);\n }", "public java.lang.String getServicename() {\n\treturn servicename;\n}", "@Override\n public String getName() {\n if (tags.isEmpty()) {\n return name;\n }\n return getNameWithTags(tags.get(tags.size() - 1));\n }", "public static String getName() {\n return name;\n }", "public String getName() {\r\n\t\treturn name.get();\r\n\t}", "public String getDefaultValue() {\n return defaultValue;\n }", "public String getPreferredName() {\n return (String) getAttributeInternal(PREFERREDNAME);\n }", "@Override\n\tpublic String getName() {\n\n\t\treturn name;\n\t}", "public String getName()\n {\n return groupService.getName(this);\n }", "public String getName() {\n return name.get();\n }", "public java.lang.String getCurrentName() {\n java.lang.Object ref = currentName_;\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 currentName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getName ()\n {\n if (__name == null)\n {\n __name = getName (getClass ());\n }\n return __name;\n }", "@Override\n\tprotected String buildDefaultBeanName(BeanDefinition definition) {\n\t\tClass<?> clasz = null;\n\t\ttry {\n\t\t\tclasz = ClassUtils.forName(definition.getBeanClassName());\n\t\t} catch (ClassNotFoundException e) {\n\t\t\treturn super.buildDefaultBeanName(definition);\n\t\t}\n\t\tif (clasz == null) {\n\t\t\treturn super.buildDefaultBeanName(definition);\n\t\t}\n\t\tif (clasz.getAnnotation(Controller.class) != null) {\n\t\t\treturn super.buildDefaultBeanName(definition);\n\t\t}\n\t\tClass<?> interfaceClass = ClassUtils.getImplementSuitInterface(clasz);\n\t\tif (interfaceClass != null) {\n\t\t\tString shortClassName = ClassUtils.getShortClassName(interfaceClass);\n\t\t\treturn Introspector.decapitalize(shortClassName);\n\t\t} else {\n\t\t\treturn super.buildDefaultBeanName(definition);\n\t\t}\n\t}" ]
[ "0.77307487", "0.7441811", "0.6974456", "0.6860087", "0.6744179", "0.6720608", "0.6663222", "0.6596782", "0.65117306", "0.6494026", "0.6442617", "0.6407723", "0.6384892", "0.62712616", "0.6254155", "0.62540376", "0.62266225", "0.6207075", "0.6202764", "0.6140105", "0.61189044", "0.6107927", "0.6107927", "0.6100884", "0.60993534", "0.6077639", "0.6077639", "0.6074392", "0.6066666", "0.606295", "0.6062925", "0.6061944", "0.60600656", "0.60570973", "0.6049126", "0.60431993", "0.60431993", "0.6041586", "0.6041586", "0.60371", "0.602749", "0.602749", "0.6027039", "0.6027039", "0.6023671", "0.60185635", "0.6008851", "0.600731", "0.59986687", "0.59966457", "0.5980814", "0.5977584", "0.5977584", "0.5977584", "0.5975182", "0.5966396", "0.59403324", "0.59396666", "0.59369594", "0.5929736", "0.59287125", "0.5927329", "0.5927329", "0.5927329", "0.5927329", "0.5927329", "0.5927329", "0.5927329", "0.5927329", "0.5927329", "0.5927329", "0.5927329", "0.5927329", "0.591944", "0.5907981", "0.5907981", "0.5904775", "0.59028953", "0.58948123", "0.5892841", "0.5892841", "0.58661956", "0.5865047", "0.58611804", "0.5859581", "0.58532715", "0.58444977", "0.5844245", "0.58300465", "0.5826817", "0.5825321", "0.5824035", "0.58193874", "0.5800082", "0.5797708", "0.5795683", "0.57905287", "0.57858574", "0.5780633", "0.5767903", "0.5758667" ]
0.0
-1
Set up the default name for this service
public void setServiceName(String serviceName) { this.serviceName = serviceName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setName (String name) {\n this.name = name;\n NameRegistrar.register (\"server.\"+name, this);\n }", "@Override\n\tpublic void setName(String arg0) {\n\n\t}", "protected void setDefaultName() {\r\n this.name = evaluateName();\r\n if (this.getModelerScene().getModelerFile().isLoaded()) {\r\n updateName(null);\r\n }\r\n setLabel(name);\r\n }", "public void setName(String arg0) {\n\t\t\n\t}", "public void setServicename(java.lang.String newServicename) {\n\tservicename = newServicename;\n}", "public void setName(String name)\n {\n if (name == null || DefaultFileHandler.sanitizeFilename(name, getLogger()).isEmpty())\n {\n throw new NullPointerException(\"Custom deployable name cannot be null or empty\");\n }\n this.name = name;\n }", "@Override\n public void setName(String name) {\n \n }", "@Override\r\n public void setName(String name) {\n }", "public void setServiceName(java.lang.String param){\n localServiceNameTracker = true;\n \n this.localServiceName=param;\n \n\n }", "public InitService(String name) {\n super(\"InitService\");\n }", "@Override\n\tpublic void setName(String name) {\n\t\tsuper.setName(name);\n\t}", "@Override\n\tpublic void setName(String name) {\n\t\tsuper.setName(name);\n\t}", "@Override\n\tpublic void setName(String name) {\n\t\t\n\t}", "public void setName(String name0){\n\t\tname = name0;\n\t}", "@Override\n\tpublic void setName( final String name )\n\t{\n\t\tsuper.setName( name );\n\t}", "@Override\n public void setName(String name) {\n\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n public String getName() {\n return \"LibVirt Service Factory\";\n }", "public void setServiceGroupName(java.lang.String param){\n localServiceGroupNameTracker = true;\n \n this.localServiceGroupName=param;\n \n\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\r\n\tpublic void setName(String name) {\n\t\tthis.name = name;\r\n\t}", "void setName(java.lang.String name);", "void setName(java.lang.String name);", "void setName(java.lang.String name);", "public void setName(String name) {\n if (!name.isEmpty()) {\n this.name = name;\n }\n }", "public void setName(String s) {\n this.name = s;\n }", "public void setName(String v){\n\t\ttry{\n\t\tsetProperty(SCHEMA_ELEMENT_NAME + \"/name\",v);\n\t\t_Name=null;\n\t\t} catch (Exception e1) {logger.error(e1);}\n\t}", "@Override\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(java.lang.String value) {\n this.name = value;\n }", "public void setName(String value) {\n this.name = value;\n }", "public void setName(String name) { this.name = name; }", "public void setName(String name) { this.name = name; }", "public void setName(String name) { this.name = name; }", "public void setName(String name) { this.name = name; }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "void setName(String name_);", "public void setName(String name) {\n\t\tName = name;\n\t}", "public final void setName(String name) {_name = name;}", "public void setName() {\r\n\t\tapplianceName = \"Refrigerator\";\r\n\t}", "public void setName(final String name) {\n this.name = name;\n }", "public void setName(final String name) {\n this.name = name;\n }", "public void setName(String name)\n {\n if (name == null) {\n throw new IllegalArgumentException();\n }\n\n _name = truncateDefault(name);\n }", "public void setName(String n) {\r\n name = n;\r\n }", "@Override\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\n\t}", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\n this.name = name;\n }", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName (String n) {\n name = n;\n }", "public void setName(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(NAME_PROP.get(), value);\n }", "public void setName(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(NAME_PROP.get(), value);\n }", "public String defaultname()\n {\n String newname = \"Stamp\"+Integer.toString(id);\n return newname;\n }", "public void setName(String n) {\n this.name = n;\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName(String name) {\r\n this.name = name;\r\n }", "public void setName (String name) {\n this.name = name;\n }", "protected void setName(String name) {\n this.name = name;\n }", "public void setName (String name) {\r\n\t\tthis.name = name;\r\n\t}", "public abstract void setServiceName(String serviceName);", "protected void setName(String name) {\r\n this.name = name;\r\n }", "public void setName (String name) {\n this.name = name;\n }", "public void setName (String name) {\n this.name = name;\n }", "public void setName (String name) {\n this.name = name;\n }", "public void setName(final String name);", "public void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName( String name ) {\n this.name = name;\n }", "protected void setName(String name) {\n this._name = name;\n }", "public void setName(String name) {\r\n \t\tthis.name = name;\r\n \t}", "public void setName(String name){\n\t\tthis.name = name;\n\t}" ]
[ "0.68403727", "0.6682917", "0.65490085", "0.6494648", "0.64273137", "0.6400633", "0.6395936", "0.6376756", "0.6363466", "0.6298195", "0.6260389", "0.6260389", "0.62517446", "0.6244831", "0.62068874", "0.6202615", "0.6199254", "0.6199254", "0.61844677", "0.6182989", "0.6143621", "0.6143621", "0.6142717", "0.61388165", "0.61388165", "0.61388165", "0.61237943", "0.61161685", "0.6113759", "0.61008996", "0.6097803", "0.6084375", "0.6083282", "0.6083282", "0.6083282", "0.6083282", "0.60761076", "0.60761076", "0.60761076", "0.60647017", "0.6056027", "0.60532415", "0.60527015", "0.604779", "0.604779", "0.60414827", "0.60403776", "0.6039813", "0.6038274", "0.6038274", "0.6038274", "0.6038274", "0.6038274", "0.6038274", "0.6038274", "0.6038274", "0.6038274", "0.6038274", "0.6038274", "0.603553", "0.603553", "0.603553", "0.6032077", "0.6030769", "0.6025952", "0.6025374", "0.6020197", "0.6016026", "0.6016026", "0.6016026", "0.6016026", "0.6016026", "0.6016026", "0.6016026", "0.6016026", "0.6016026", "0.6016026", "0.6016026", "0.6016026", "0.6016026", "0.6016026", "0.6016026", "0.6016026", "0.6016026", "0.6016026", "0.6016026", "0.6014609", "0.6008578", "0.600713", "0.60044473", "0.60036176", "0.59985507", "0.59985507", "0.59985507", "0.59946793", "0.59927356", "0.59927356", "0.599258", "0.5991703", "0.5988245", "0.5986406" ]
0.0
-1
Return the string that appears in the REST API URL that identifies the owning service. Null means no REST APIs supported by this service.
public String getServiceURLMarker() { return serviceURLMarker; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getApiUrl();", "String getServiceUrl();", "public String getApiUrl();", "@Override\n\tpublic URL getServiceUrl()\n\t{\n\t\treturn null;\n\t}", "@Override\n\tpublic String toString() {\n\t\tif (m_URL != null) {\n\t\t\tString path = m_URL.getPath();\n\t\t\tString rt = null;\n\t\t\tif (path.endsWith(ServerConstants.CONSUMER_SERVICE_NAME)) {\n\t\t\t\trt = \"C\";\n\t\t\t} else if (path.endsWith(ServerConstants.PRIMARY_PRODUCER_SERVICE_NAME)) {\n\t\t\t\trt = \"PP\";\n\t\t\t} else if (path.endsWith(ServerConstants.SECONDARY_PRODUCER_SERVICE_NAME)) {\n\t\t\t\trt = \"SP\";\n\t\t\t} else if (path.endsWith(ServerConstants.ONDEMAND_PRODUCER_SERVICE_NAME)) {\n\t\t\t\trt = \"ODP\";\n\t\t\t}\n\t\t\treturn \"[\" + rt + \":\" + m_URL.getHost() + \"/\" + m_resourceID + \"]\";\n\t\t}\n\t\treturn \"[null/\" + m_resourceID + \"]\";\n\t}", "@RequestMapping(value = \"/info\", method = RequestMethod.GET)\n public String info() {\n return serviceName;\n }", "public java.lang.String getApiUrl() {\n java.lang.Object ref = apiUrl_;\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 apiUrl_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public URL getServiceUrl() {\n return url;\n }", "String getServiceRef();", "public String getName(){\n\t\tif(name==null) return webserviceUrl;\n\t\treturn name;\n\t}", "String serviceEndpoint();", "public abstract RestURL getURL();", "public java.lang.String getApiUrl() {\n java.lang.Object ref = apiUrl_;\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 apiUrl_ = s;\n }\n return s;\n }\n }", "protected String getIdentifier() {\n return getBaseUrl() + normalizePath(getRequest().getPath());\n }", "@Get\r\npublic String represent() {\r\n return \"Study Design REST Service, version \" + StudyDesignConstants.VERSION;\r\n }", "public String getServiceUrl() {\n return serviceUrl;\n }", "public String swaggerUri() {\n return this.swaggerUri;\n }", "@Override\n\tprotected String getWebServiceUri() {\n\t\treturn this.uri;\n\t}", "public java.lang.String getApiEndpoint() {\n java.lang.Object ref = apiEndpoint_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n apiEndpoint_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Deprecated // Use TrcApplicationContext\n URI getApiEndpoint();", "private String getRestUrl() {\n return restUrl;\n }", "public String getRestUrl() {\n return this.restUrl;\n }", "String getApiName();", "public String getServiceUrl() {\n return \"http://\" + this.serviceHost + \":\" + this.servicePort;\n }", "java.lang.String getService();", "java.lang.String getService();", "java.lang.String getService();", "@java.lang.Override\n public java.lang.String getApiEndpoint() {\n java.lang.Object ref = apiEndpoint_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n apiEndpoint_ = s;\n return s;\n }\n }", "public String getHandleServiceBaseUrl();", "@Nullable\n @Override\n public String getName() {\n return /*this.requestMethod + \" \" +*/ this.url;\n }", "protected static URI getAuthServiceUri() {\n if (authServiceUrl == null || authServiceUrl.toString().isEmpty() || authServiceUrl.toString()\n .equals(\"?\")) {\n Console console = System.console();\n if (console != null) {\n try {\n authServiceUrl = new URI(console.readLine(\"Anaplan Auth-Service URL:\"));\n } catch (URISyntaxException e) {\n throw new AnaplanAPIException(\"Unable to parse Auth-Service URI: \", e);\n }\n } else {\n throw new UnsupportedOperationException(\"Auth-Service URL must be specified!\");\n }\n }\n return authServiceUrl;\n }", "@Api(1.2)\n @NonNull\n public String url() {\n return mRequest.buildOkRequest().url().toString();\n }", "@Override\r\n public List<String> buildRequestUrl(String resource, Endpoint endpoint) {\r\n //log = LoggerFactory.getLogger(ScopusAuthorSearchProvider.class);\r\n namespaceDC = Namespace.getNamespace(\"dc\", \"http://purl.org/dc/elements/1.1/\");\r\n namespacePRISM = Namespace.getNamespace(\"prism\", \"http://prismstandard.org/namespaces/basic/2.0/\");\r\n namespaceATOM = Namespace.getNamespace(\"atom\", \"http://www.w3.org/2005/Atom\");\r\n String url = null;\r\n Matcher m = Pattern.compile(PATTERN).matcher(resource);\r\n if (m.find()) {\r\n url = resource;\r\n apiKeyParam = m.group(4);\r\n } else {\r\n Preconditions.checkState(StringUtils.isNotBlank(resource));\r\n String id = resource.substring(resource.lastIndexOf('/') + 1);\r\n url = String.format(API, id.replace('_', '+'));\r\n }\r\n return Collections.singletonList(url);\r\n }", "private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}", "public String getEndpoint() {\n\t\treturn null;\n\t}", "private static String apiUrl(String sessionID, boolean xmlOrJson) {\n\t\tString url;\n\t\ttry {\n\t\t\turl = pmaUrl(sessionID);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tif (PMA.logger != null) {\n\t\t\t\tStringWriter sw = new StringWriter();\n\t\t\t\te.printStackTrace(new PrintWriter(sw));\n\t\t\t\tPMA.logger.severe(sw.toString());\n\t\t\t}\n\t\t\turl = null;\n\t\t}\n\t\tif (url == null) {\n\t\t\t// sort of a hopeless situation; there is no URL to refer to\n\t\t\treturn null;\n\t\t}\n\t\t// remember, _pma_url is guaranteed to return a URL that ends with \"/\"\n\t\tif (xmlOrJson) {\n\t\t\treturn PMA.join(url, \"api/xml/\");\n\t\t} else {\n\t\t\treturn PMA.join(url, \"api/json/\");\n\t\t}\n\t}", "public String toString() {\n return getServiceId();\n }", "String endpoint();", "String getNodeServiceUrl()\n throws IOException, SoapException;", "java.lang.String getServiceId();", "public String getSearchEndpoint();", "public String endpointUrl() {\n return this.endpointUrl;\n }", "protected abstract String getBaseEndpoint();", "public String getDocumentEndpoint();", "public String getAPIName() {\r\n return apiName;\r\n }", "private String getUrlPlanet() {\n return this.url + this.resource;\n }", "@Override\n String getOAuthUrl() {\n return null;\n }", "public String getServiceWiki()\n {\n return serviceWiki;\n }", "@Nullable\n public abstract String url();", "public static String getApiUrl() {\n return API_URL;\n }", "public String apiId() {\n return this.innerProperties() == null ? null : this.innerProperties().apiId();\n }", "public java.lang.String getTargetServiceURL() {\r\n return targetServiceURL;\r\n }", "public String endpointUri() {\n return this.endpointUri;\n }", "java.lang.String getBookingURL();", "@Override\r\n public String getFriendlyURI() {\r\n return createURI(false, false);\r\n }", "public String getUrl()\n\t\t{\n\t\t\treturn \"https://developer.zohoapis.eu\";\n\t\t}", "public String getService() {\n return service;\n }", "public String getService() {\n return service;\n }", "public String getService() {\n return service;\n }", "public java.lang.String getReferenciado();", "public String endpoint() {\n return this.endpoint;\n }", "@SimpleProperty(description = \"iSENSE Project Account URL\", \n category = PropertyCategory.BEHAVIOR)\n public String ProjectOwnerURL() {\n if(this.project == null || this.fields == null) {\n Log.e(\"iSENSE\", \"Couldn't get project information!\");\n return \"DNE\";\n }\n return project.owner_url;\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"The URI for this resource, relative to /apiserver.\")\n\n public String getUri() {\n return uri;\n }", "protected abstract String getAtiempoServiceNameEnReversa();", "public String getViewServiceWiki()\n {\n return viewServiceWiki;\n }", "@DisplayName(\"The URL for the Marketcetera Exchange Server\")\n public String getURL();", "@Override\n public String getServletInfo() {\n return \"Simple service that wraps the SOLR API to enable searching of ROI information\";\n }", "@Nonnull\n\tprivate URI getPossiblyInsecureBaseUri() {\n\t\tUriInfo ui = getUriInfo();\n\t\tif (ui != null && ui.getBaseUri() != null)\n\t\t\treturn ui.getBaseUri();\n\t\t// See if JAX-WS *cannot* supply the info\n\t\tif (jaxws == null || jaxws.getMessageContext() == null)\n\t\t\t// Hack to make the test suite work\n\t\t\treturn URI.create(\"http://\" + DEFAULT_HOST\n\t\t\t\t\t+ \"/taverna-server/rest/\");\n\t\tString pathInfo = (String) jaxws.getMessageContext().get(PATH_INFO);\n\t\tpathInfo = pathInfo.replaceFirst(\"/soap$\", \"/rest/\");\n\t\tpathInfo = pathInfo.replaceFirst(\"/rest/.+$\", \"/rest/\");\n\t\treturn URI.create(\"http://\" + getHostLocation() + pathInfo);\n\t}", "@GetMapping(\"/service\")\n\tpublic String showService() {\n\t\treturn \"service\";\n\t}", "public String getViewServiceURLMarker()\n {\n return viewServiceURLMarker;\n }", "public String getServiceID();", "public String detailOriginOrReturn();", "public String getUserURI() {\n return host + userResource;\n }", "String getServiceId();", "public String getURL() {\n\t\treturn getName();\n\t}", "@ApiModelProperty(value = \"The TEC REST API link to fetch this event\")\n public String getRestUrl() {\n return restUrl;\n }", "@JsonIgnore\n public String getId() {\n return UriHelper.getLastUriPart(getUri());\n }", "@Override\n\t\tpublic StringBuffer getRequestURL() {\n\t\t\treturn null;\n\t\t}", "public String getApiBase() {\n\t\treturn apiBase;\n\t}", "public String getService() {\n\t\treturn service.get();\n\t}", "public String url() {\n return server.baseUri().toString();\n }", "public static URL getUrlForReg()\r\n {\r\n String strUrl = getBaseURL() + \"account_services/api/1.0/account\";\r\n return str2url( strUrl );\r\n }", "private String getBaseUri() {\n\t\treturn null;\n\t}", "@JsonProperty(\"service\")\n public String getService() {\n return service;\n }", "public java.lang.String getServiceId(){\r\n return localServiceId;\r\n }", "@Override\n\tpublic java.lang.String getOSGiServiceIdentifier() {\n\t\treturn _clipLocalService.getOSGiServiceIdentifier();\n\t}", "public String getServerUrl()\n {\n return null;\n }", "public static URL getUrlForGetAccInfo()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/account\";\r\n return str2url( strUrl );\r\n }", "@Override\n\tpublic String getURL() {\n\t\treturn null;\n\t}", "public URI getExplicitlyProvidedUri() {\n return wsRce.getUri();\n }", "private String getUrlPlanetSearch() {\n return this.url + this.resource + this.resourceSearch;\n }", "private String getEndPointUrl()\r\n\t{\r\n\t\t// TODO - Get the URL from WSRR\r\n\t\treturn \"http://localhost:8093/mockCustomerBinding\";\r\n\t}", "public abstract String getBaseURL();", "protected String getServiceEndpoint(String serviceName) {\n APIManagerConfiguration config = ServiceReferenceHolder.getInstance().\n getAPIManagerConfigurationService().getAPIManagerConfiguration();\n String url = config.getFirstProperty(APIConstants.API_GATEWAY_SERVER_URL);\n return url + serviceName;\n }", "public String getService() {\n return this.service;\n }", "public String getService() {\n return this.service;\n }", "public String getService() {\n return this.service;\n }", "@ApiModelProperty(value = \"The Software Statement terms of service RFC-3986-compliant URI\")\n\n@Size(max=256) \n public String getTermsOfServiceUri() {\n return termsOfServiceUri;\n }", "String getService_id();", "public String getDescriptiveServiceName() {\n if (serviceAbbreviation != null) {\n return serviceAbbreviation;\n }\n return serviceFullName;\n }" ]
[ "0.65213954", "0.625356", "0.6248328", "0.62225556", "0.61395323", "0.61010104", "0.6085421", "0.60623044", "0.6036817", "0.60343426", "0.60024554", "0.5991759", "0.5990458", "0.5961088", "0.5943067", "0.5940754", "0.59234697", "0.5880107", "0.58796895", "0.5875205", "0.5863299", "0.58621746", "0.5861121", "0.5808328", "0.5783961", "0.5783961", "0.5783961", "0.5765984", "0.5760236", "0.5724735", "0.57183725", "0.5710336", "0.57000065", "0.5693378", "0.5675037", "0.56662583", "0.5640784", "0.5608466", "0.5605618", "0.5601936", "0.5599921", "0.5597034", "0.55933934", "0.5584321", "0.55806786", "0.5575246", "0.5557741", "0.5543778", "0.5532349", "0.5528883", "0.5524361", "0.5521007", "0.5516821", "0.551465", "0.5513414", "0.5510305", "0.5496688", "0.5496688", "0.5496688", "0.5492372", "0.54900384", "0.54821414", "0.5480642", "0.54790956", "0.547557", "0.54721725", "0.54697967", "0.5465449", "0.5463408", "0.54474", "0.5446065", "0.5444609", "0.54384845", "0.54331994", "0.54232347", "0.5411253", "0.5404226", "0.5400226", "0.53980035", "0.5395607", "0.5395381", "0.5380208", "0.53727496", "0.5371376", "0.5365454", "0.5358164", "0.534871", "0.5346749", "0.5341827", "0.53112394", "0.5310734", "0.5305078", "0.53031856", "0.53029174", "0.5299998", "0.5299998", "0.5299998", "0.5299753", "0.52924705", "0.52832973" ]
0.5641381
36
Set up the string that appears in the REST API URL that identifies the owning service. Null means no REST APIs supported by this service.
public void setServiceURLMarker(String serviceURLMarker) { this.serviceURLMarker = serviceURLMarker; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String composeApiUrl(String string){\r\n\t\treturn API_BASE + API_VERSION + string;\r\n\t}", "java.lang.String getApiUrl();", "@Override\r\n public List<String> buildRequestUrl(String resource, Endpoint endpoint) {\r\n //log = LoggerFactory.getLogger(ScopusAuthorSearchProvider.class);\r\n namespaceDC = Namespace.getNamespace(\"dc\", \"http://purl.org/dc/elements/1.1/\");\r\n namespacePRISM = Namespace.getNamespace(\"prism\", \"http://prismstandard.org/namespaces/basic/2.0/\");\r\n namespaceATOM = Namespace.getNamespace(\"atom\", \"http://www.w3.org/2005/Atom\");\r\n String url = null;\r\n Matcher m = Pattern.compile(PATTERN).matcher(resource);\r\n if (m.find()) {\r\n url = resource;\r\n apiKeyParam = m.group(4);\r\n } else {\r\n Preconditions.checkState(StringUtils.isNotBlank(resource));\r\n String id = resource.substring(resource.lastIndexOf('/') + 1);\r\n url = String.format(API, id.replace('_', '+'));\r\n }\r\n return Collections.singletonList(url);\r\n }", "public abstract RestURL getURL();", "@Override\n\tpublic URL getServiceUrl()\n\t{\n\t\treturn null;\n\t}", "private String getRestUrl() {\n return restUrl;\n }", "public String getApiUrl();", "private String initUrlParameter() {\n StringBuffer url = new StringBuffer();\n url.append(URL).append(initPathParameter());\n return url.toString();\n }", "String getServiceUrl();", "@Override\n\tprotected String getWebServiceUri() {\n\t\treturn this.uri;\n\t}", "@Override\n\tpublic String buildURL(String string) {\n\t\treturn null;\n\t}", "public Builder setApiUrl(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n apiUrl_ = value;\n onChanged();\n return this;\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"The URI for this resource, relative to /apiserver.\")\n\n public String getUri() {\n return uri;\n }", "public void setRestUrl(String url) {\n this.restUrl = url;\n }", "private String getEndPointUrl()\r\n\t{\r\n\t\t// TODO - Get the URL from WSRR\r\n\t\treturn \"http://localhost:8093/mockCustomerBinding\";\r\n\t}", "public void setURL() {\n\t\tURL = Constant.HOST_KALTURA+\"/api_v3/?service=\"+Constant.SERVICE_KALTURA_LOGIN+\"&action=\"\n\t\t\t\t\t\t+Constant.ACTION_KALTURA_LOGIN+\"&loginId=\"+Constant.USER_KALTURA+\"&password=\"+Constant.PASSWORD_KALTURA+\"&format=\"+Constant.FORMAT_KALTURA;\n\t}", "public String getRestUrl() {\n return this.restUrl;\n }", "@Get\r\npublic String represent() {\r\n return \"Study Design REST Service, version \" + StudyDesignConstants.VERSION;\r\n }", "private static String apiUrl(String sessionID, boolean xmlOrJson) {\n\t\tString url;\n\t\ttry {\n\t\t\turl = pmaUrl(sessionID);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tif (PMA.logger != null) {\n\t\t\t\tStringWriter sw = new StringWriter();\n\t\t\t\te.printStackTrace(new PrintWriter(sw));\n\t\t\t\tPMA.logger.severe(sw.toString());\n\t\t\t}\n\t\t\turl = null;\n\t\t}\n\t\tif (url == null) {\n\t\t\t// sort of a hopeless situation; there is no URL to refer to\n\t\t\treturn null;\n\t\t}\n\t\t// remember, _pma_url is guaranteed to return a URL that ends with \"/\"\n\t\tif (xmlOrJson) {\n\t\t\treturn PMA.join(url, \"api/xml/\");\n\t\t} else {\n\t\t\treturn PMA.join(url, \"api/json/\");\n\t\t}\n\t}", "public java.lang.String getApiUrl() {\n java.lang.Object ref = apiUrl_;\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 apiUrl_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public Builder setApiEndpoint(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n apiEndpoint_ = value;\n bitField0_ |= 0x00080000;\n onChanged();\n return this;\n }", "protected String getIdentifier() {\n return getBaseUrl() + normalizePath(getRequest().getPath());\n }", "void setEndpoint(String endpoint);", "String serviceEndpoint();", "private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}", "public static String setURL(String endpoint) {\n String url = hostName + endpoint;\n\n log.info(\"Enpoint: \" + endpoint);\n\n return url;\n\n }", "protected static URI getAuthServiceUri() {\n if (authServiceUrl == null || authServiceUrl.toString().isEmpty() || authServiceUrl.toString()\n .equals(\"?\")) {\n Console console = System.console();\n if (console != null) {\n try {\n authServiceUrl = new URI(console.readLine(\"Anaplan Auth-Service URL:\"));\n } catch (URISyntaxException e) {\n throw new AnaplanAPIException(\"Unable to parse Auth-Service URI: \", e);\n }\n } else {\n throw new UnsupportedOperationException(\"Auth-Service URL must be specified!\");\n }\n }\n return authServiceUrl;\n }", "@Override\n String getOAuthUrl() {\n return null;\n }", "protected abstract String getBaseEndpoint();", "public java.lang.String getApiUrl() {\n java.lang.Object ref = apiUrl_;\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 apiUrl_ = s;\n }\n return s;\n }\n }", "public interface RestAPI {\n String API_PROTOCOL = \"https://\";\n\n String API_URL = \".fusion-universal.com\";\n\n String API_SEARCH_COMPANY = \"/api/v1/company.json\";\n\n\n Observable<CompanyEntity> companySearch(final String companyName);\n}", "public String getServiceUrl() {\n return \"http://\" + this.serviceHost + \":\" + this.servicePort;\n }", "public interface ManagerApiConstants {\n\n String USER_API_VERSION = \"/v1\";\n String USER_API_APPLICATION_NAME = \"SERVICE-MANAGER\";\n String USER_API_URL_PREFIX = \"http://\" + USER_API_APPLICATION_NAME + \"/\" + USER_API_VERSION;\n}", "@DisplayName(\"The URL for the Marketcetera Exchange Server\")\n public String getURL();", "public abstract String getBaseURL();", "public URL getServiceUrl() {\n return url;\n }", "public interface IServiceApi {\n public static final String VERSION = \"v1/\";\n public static final String BASE = \"/api/\"+VERSION;\n \n}", "@ApiModelProperty(value = \"The Software Statement terms of service RFC-3986-compliant URI\")\n\n@Size(max=256) \n public String getTermsOfServiceUri() {\n return termsOfServiceUri;\n }", "private String getUrlPlanet() {\n return this.url + this.resource;\n }", "void setDefaultEndpointUri(String endpointUri);", "@PostConstruct\n private void checkUrl() {\n if (weatherServiceUrl.endsWith(\"/\")) {\n weatherServiceUrl = weatherServiceUrl.substring(0, weatherServiceUrl.length() - 1);\n }\n }", "IParser setServerBaseUrl(String theUrl);", "public String getServiceUrl() {\n return serviceUrl;\n }", "public String getRestUrl(VariableSpace space) {\n StringBuilder url = new StringBuilder();\n\n if (useSSL) {\n url.append(\"https://\");\n } else {\n url.append(\"http://\");\n }\n\n url.append(space.environmentSubstitute(tenant)).append('.');\n url.append(space.environmentSubstitute(namespace)).append('.');\n url.append(space.environmentSubstitute(server));\n\n String realPort = space.environmentSubstitute(port);\n if (StringUtils.isNotEmpty(realPort)) {\n url.append(':').append(realPort);\n }\n\n url.append(\"/rest\");\n\n return url.toString();\n }", "public void setStepikApiUrl(String apiURL){\n this.STEPIK_API_URL = apiURL;\n setupAPI();\n }", "public void setServiceName(java.lang.String param){\n localServiceNameTracker = true;\n \n this.localServiceName=param;\n \n\n }", "public String getHandleServiceBaseUrl();", "public String swaggerUri() {\n return this.swaggerUri;\n }", "public static String getApiUrl() {\n return API_URL;\n }", "public void setServiceId(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localServiceIdTracker = true;\r\n } else {\r\n localServiceIdTracker = false;\r\n \r\n }\r\n \r\n this.localServiceId=param;\r\n \r\n\r\n }", "@Override\n\t\tpublic StringBuffer getRequestURL() {\n\t\t\treturn null;\n\t\t}", "@Deprecated // Use TrcApplicationContext\n URI getApiEndpoint();", "public OreAPI() {\n\t\tthis(DEFAULT_URL, null);\n\t}", "private void setKlarosUrl(final String value) {\n\n klarosUrl = value;\n }", "private static final URL getURL(String url) throws ResourceManagerServiceClientCreationException {\r\n ArgumentChecker.checkNullOrEmpty(url, \"WSDL URL\");\r\n\r\n try {\r\n return new URL(url);\r\n } catch (MalformedURLException e) {\r\n throw new ResourceManagerServiceClientCreationException(\"Error while creating URL.\", e);\r\n }\r\n }", "@java.lang.Override\n public java.lang.String getApiEndpoint() {\n java.lang.Object ref = apiEndpoint_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n apiEndpoint_ = s;\n return s;\n }\n }", "@Override\n\tpublic String getURL() {\n\t\treturn null;\n\t}", "java.lang.String getBookingURL();", "private String getBaseUri() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String toString() {\n\t\tif (m_URL != null) {\n\t\t\tString path = m_URL.getPath();\n\t\t\tString rt = null;\n\t\t\tif (path.endsWith(ServerConstants.CONSUMER_SERVICE_NAME)) {\n\t\t\t\trt = \"C\";\n\t\t\t} else if (path.endsWith(ServerConstants.PRIMARY_PRODUCER_SERVICE_NAME)) {\n\t\t\t\trt = \"PP\";\n\t\t\t} else if (path.endsWith(ServerConstants.SECONDARY_PRODUCER_SERVICE_NAME)) {\n\t\t\t\trt = \"SP\";\n\t\t\t} else if (path.endsWith(ServerConstants.ONDEMAND_PRODUCER_SERVICE_NAME)) {\n\t\t\t\trt = \"ODP\";\n\t\t\t}\n\t\t\treturn \"[\" + rt + \":\" + m_URL.getHost() + \"/\" + m_resourceID + \"]\";\n\t\t}\n\t\treturn \"[null/\" + m_resourceID + \"]\";\n\t}", "public interface Endpoint {\n public static final String REDDIT_BASE_URL = \"http://www.reddit.com\";\n\n //public Object call(String subreddit);\n\n}", "public static URL getUrlForAddCar()\r\n {\r\n String strUrl = getBaseURL() +\"account_services/api/1.0/vehicle\";\r\n return str2url( strUrl );\r\n }", "@Override\r\n public String getFriendlyURI() {\r\n return createURI(false, false);\r\n }", "String getServiceRef();", "@Override\n public String createEndpointUri() {\n \n Properties scProps = utils.obtainServerConfig();\n String baseUri = scProps.getProperty(TARGET_SERVER_PROPERTY_NAME);\n String accessToken = scProps.getProperty(AUTH_TOKEN_PROPERTY_NAME);\n String sourceName = scProps.getProperty(SOURCES_PROPERTY_NAME);\n String sendPings = scProps.getProperty(SEND_PING_PROPERTY_NAME);\n if (StringUtils.isEmpty(baseUri) || StringUtils.isEmpty(accessToken)) {\n throw new IllegalArgumentException(\"source.config file is missing or does not contain sufficient \" +\n \"information from which to construct an endpoint URI.\");\n }\n if (StringUtils.isEmpty(sourceName) || sourceName.contains(\",\")) {\n throw new IllegalArgumentException(\"Default vantiq: endpoints require a source.config file with a single\" +\n \" source name. Found: '\" + sourceName + \"'.\");\n }\n \n try {\n URI vantiqURI = new URI(baseUri);\n this.setEndpointUri(baseUri);\n String origScheme = vantiqURI.getScheme();\n \n StringBuilder epString = new StringBuilder(vantiqURI.toString());\n epString.append(\"?sourceName=\").append(sourceName);\n this.sourceName = sourceName;\n epString.append(\"&accessToken=\").append(accessToken);\n this.accessToken = accessToken;\n if (sendPings != null) {\n epString.append(\"&sendPings=\").append(sendPings);\n this.sendPings = Boolean.parseBoolean(sendPings);\n }\n if (origScheme.equals(\"http\") || origScheme.equals(\"ws\")) {\n epString.append(\"&noSsl=\").append(\"true\");\n noSsl = true;\n }\n epString.replace(0, origScheme.length(), \"vantiq\");\n URI endpointUri = URI.create(String.valueOf(epString));\n return endpointUri.toString();\n } catch (URISyntaxException mue) {\n throw new IllegalArgumentException(TARGET_SERVER_PROPERTY_NAME + \" from server config file is invalid\",\n mue);\n }\n }", "public String getName(){\n\t\tif(name==null) return webserviceUrl;\n\t\treturn name;\n\t}", "@Nonnull\n\tprivate URI getPossiblyInsecureBaseUri() {\n\t\tUriInfo ui = getUriInfo();\n\t\tif (ui != null && ui.getBaseUri() != null)\n\t\t\treturn ui.getBaseUri();\n\t\t// See if JAX-WS *cannot* supply the info\n\t\tif (jaxws == null || jaxws.getMessageContext() == null)\n\t\t\t// Hack to make the test suite work\n\t\t\treturn URI.create(\"http://\" + DEFAULT_HOST\n\t\t\t\t\t+ \"/taverna-server/rest/\");\n\t\tString pathInfo = (String) jaxws.getMessageContext().get(PATH_INFO);\n\t\tpathInfo = pathInfo.replaceFirst(\"/soap$\", \"/rest/\");\n\t\tpathInfo = pathInfo.replaceFirst(\"/rest/.+$\", \"/rest/\");\n\t\treturn URI.create(\"http://\" + getHostLocation() + pathInfo);\n\t}", "public EndPoint(String endpointId, String friendlyName) {\n this.endpointId = endpointId;\n this.manufacturerName = \"Manniu tech\";\n this.modelName = \"model23\";\n this.friendlyName = friendlyName;\n this.description = \"This is a manniu camera\";\n this.displayCategories = new String[]{\"CAMERA\"};\n }", "public String getServiceURLMarker()\n {\n return serviceURLMarker;\n }", "public Builder setService(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n service_ = value;\n onChanged();\n return this;\n }", "public Builder setService(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n service_ = value;\n onChanged();\n return this;\n }", "public Builder setService(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n service_ = value;\n onChanged();\n return this;\n }", "public interface HttpConstants {\n\n String BASE_URL = \"http://apis.tudou.com/\";\n String REQUEST_HTTP_URL = \"classification/v1/startPage\";\n}", "public interface RequestURLs {\n String DEFAULT_URL = \"http://aperturedev.co.kr:21002/petcommunity/\";\n\n /*\n 매칭 서비스 관련\n */\n String GET_PET_TYPES = DEFAULT_URL + \"services/get-pettypes.php\"; // 강아지 종을 가져온다.\n String REGIST_MATCH_PET = DEFAULT_URL + \"matching/regist-new-pet.php\"; // 팻 등록 실시\n String MATCHING_OTHER_PET = DEFAULT_URL + \"matching/matching.php\"; // 매칭할 팻을 하나 가져옵니다.\n\n /*\n 사용자 정보 관련\n */\n String GET_USER_INFO = DEFAULT_URL + \"users/get-info.php\"; // UUID -> 사용자 정보\n String REGIST_SERVICE = DEFAULT_URL + \"users/signup.php\"; // 회원가입을 실시한다.\n String IS_REGIST_SERVICE = DEFAULT_URL + \"/users/is-registed.php\"; // 회원가입 되어 있는지 확인한다.\n String LOGIN_SERVICE = DEFAULT_URL + \"users/signin.php\"; // 로그인 처리한다.\n\n\n\n\n}", "public java.lang.String getApiEndpoint() {\n java.lang.Object ref = apiEndpoint_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n apiEndpoint_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Nullable\n public abstract String url();", "@Override\r\n public String getUrl()\r\n {\n return null;\r\n }", "@ApiModelProperty(value = \"The TEC REST API link to fetch this event\")\n public String getRestUrl() {\n return restUrl;\n }", "java.lang.String getService();", "java.lang.String getService();", "java.lang.String getService();", "@Override\n public String getBaseUri() {\n return null;\n }", "public String getAPIName() {\r\n return apiName;\r\n }", "@DisplayName(\"The URL for the Marketcetera Exchange Server\")\n public void setURL(@DisplayName(\"The URL for the Marketcetera Exchange Server\")\n String inURL);", "public String endpointUrl() {\n return this.endpointUrl;\n }", "@Override\r\n\tprotected String getUrl() {\n\t\treturn urlWS + \"/actualizarCliente\";\r\n\t}", "private static String getBaseUrl() {\n StringBuilder url = new StringBuilder();\n url.append(getProtocol());\n url.append(getHost());\n url.append(getPort());\n url.append(getVersion());\n url.append(getService());\n Log.d(TAG, \"url_base: \" + url.toString());\n return url.toString();\n }", "private ApiUrlCreator() {\n }", "private GenericUrl generateAPIURL(Vital vitalToSync, OAuth oAuth) {\n GenericUrl url = null;\n switch (vitalToSync.getWearableType()) {\n case FITBIT:\n url = generateFitbitVitalConnectUrl(vitalToSync, oAuth);\n break;\n case WITHINGS:\n //TODO: Create withings URL\n url = new GenericUrl(withingsBaseURL);\n logger.warn(\"WITHINGS CONNECTION NOT IMPLEMENTED\");\n break;\n }\n return url;\n }", "String endpoint();", "public String setUrl() throws JSONException {\n url = baseUrl + searchName;\n for(int i = 0; i < typesCheckList.size(); i++) {\n if(typesObj.has(typesCheckList.get(i))){\n url += typesObj.getString(typesCheckList.get(i));\n }\n }\n if(V)System.out.println(url);\n return url;\n }", "public String getServerUrl()\n {\n return null;\n }", "@Override\n\tprotected String getHttpBaseUrl() {\n\t\treturn this.properties.getHttpUrlBase();\n\t}", "private String getUrlPlanetSearch() {\n return this.url + this.resource + this.resourceSearch;\n }", "@Override\r\n public String getURL() {\n return url;\r\n }", "public String getSearchEndpoint();", "protected String overwriteSwaggerDefaultUrl(String html) {\n\t\treturn html.replace(Constants.SWAGGER_UI_DEFAULT_URL, StringUtils.EMPTY);\n\t}", "private String makeServerUrl(){\n\t\tURL url = null;\n\t\t\n\t\t//Make sure we have a valid url\n\t\tString complete = this.preferences.getString(\"server\", \"\");\n\t\ttry {\n\t\t\turl = new URL( complete );\n\t\t} catch( Exception e ) {\n\t\t\tonCreateDialog(DIALOG_INVALID_URL).show();\n\t\t\treturn null;\n\t\t}\n\t\treturn url.toExternalForm();\n\t}", "@RequestMapping(value = \"/info\", method = RequestMethod.GET)\n public String info() {\n return serviceName;\n }", "String getApiName();", "UMOEndpointURI getEndpointURI();" ]
[ "0.6186155", "0.60657996", "0.6059727", "0.587393", "0.5809109", "0.57674885", "0.5731944", "0.5724507", "0.57030505", "0.56648946", "0.56229013", "0.5592958", "0.557011", "0.54871815", "0.54869884", "0.5486458", "0.5473773", "0.5445662", "0.5445133", "0.54209024", "0.5418932", "0.53907", "0.5384495", "0.53754646", "0.53696054", "0.53673446", "0.5350301", "0.5349407", "0.53425395", "0.5327828", "0.53190964", "0.5307084", "0.530326", "0.5288942", "0.5261798", "0.5252242", "0.5251479", "0.52471644", "0.52263886", "0.5211473", "0.5205764", "0.520387", "0.5203286", "0.52024126", "0.52022284", "0.5197991", "0.5190104", "0.5175974", "0.5170942", "0.51649195", "0.5150873", "0.51401335", "0.5133776", "0.51239604", "0.51041776", "0.51029474", "0.5101577", "0.50857824", "0.5082956", "0.5079804", "0.50752467", "0.507255", "0.50722325", "0.50650656", "0.50596386", "0.5052713", "0.5052245", "0.50519073", "0.5047232", "0.5041997", "0.5041997", "0.5041997", "0.5040677", "0.5039641", "0.50266397", "0.5022108", "0.5015279", "0.50108033", "0.500837", "0.500837", "0.500837", "0.5005774", "0.49959314", "0.49903435", "0.4977519", "0.49751827", "0.49717474", "0.4965889", "0.4963696", "0.49610534", "0.49570414", "0.49562776", "0.49546066", "0.4952699", "0.4952314", "0.49515045", "0.49497977", "0.49476892", "0.4938458", "0.49377444", "0.49376455" ]
0.0
-1
Return the default description for this service.
public String getServiceDescription() { return serviceDescription; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getServiceDescription()\n {\n String language = (lsData == null) ? null : lsData.language;\n return (data.serviceDescription == null) ? \"\" : data.serviceDescription.getValue(language);\n }", "public String describe() { return new String(\"No description.\"); }", "public String getDescription() {\n return desc;\n }", "public String getDescription(){\n return getString(KEY_DESCRIPTION);\n }", "public String getDescription() {\n return desc;\n }", "public String getDescription() {\n return (desc);\n }", "public String getDescription() {\n String description = null;\n if ( !descriptions.isEmpty() ) {\n description = (String)descriptions.get(0);\n }\n return description;\n }", "@Override\r\n\tpublic String getDescription() {\n\t\treturn description;\r\n\t}", "@Override\n\tpublic String getDescription() {\n\t\tfinal String desc = getLabel();\n\t\tif (desc.length() == 0) {\n\t\t\treturn Universe.curProfile.getEmptyString(); // I am a badass.\n\t\t}\n\t\treturn getLabel();\n\t}", "@Override\n\tpublic String getDescription() {\n\t\treturn description;\n\t}", "public String getDescription() {\n return sdesc;\n }", "@Override\n public String getDescription() {\n return description;\n }", "public String getDescription() {\n return DESCRIPTION;\n }", "@Override\r\n\tpublic String getDescription() {\n\t\treturn this.description;\r\n\t}", "public final String getDescription() {\n return description;\n }", "public String getDescription () {\n return impl.getDescription ();\n }", "public String getDescription() {\n return description;\n }", "@Override\n public String getDescription() {\n return this.description;\n }", "public java.lang.String getDescription() {\n return description;\n }", "public java.lang.String getDescription() {\n return description;\n }", "public java.lang.String getDescription() {\n return description;\n }", "public java.lang.String getDescription() {\n return description;\n }", "public java.lang.String getDescription() {\n return description;\n }", "public java.lang.String getDescription() {\n return description;\n }", "public java.lang.String getDescription() {\n return description;\n }", "public java.lang.String getDescription() {\n return description;\n }", "public java.lang.String getDescription() {\n return description;\n }", "public java.lang.String getDescription() {\n return description;\n }", "public String getDescription(){\n \n return\"\";\n }", "@Nullable\n public String getDescription() {\n return description;\n }", "@Nullable\n public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\n return description;\n }", "public String getDescription() {\r\n return DESCRIPTION;\r\n }", "public String getDescription()\n {\n return description;\n }", "public String getDescription() {\r\n return description;\r\n }", "public String getDescription() {\r\n return description;\r\n }", "public String getDescription() {\r\n return description;\r\n }", "public String getDescription() {\r\n return description;\r\n }", "public String getDescription() {\r\n return description;\r\n }", "public String getDescription() {\r\n return description;\r\n }", "public String getDescription() {\r\n return description;\r\n }" ]
[ "0.73949087", "0.7077861", "0.7018155", "0.7009512", "0.7000914", "0.6991436", "0.69844794", "0.6967772", "0.6962855", "0.6943339", "0.69346505", "0.69130236", "0.691167", "0.6899462", "0.6897329", "0.68884486", "0.6882229", "0.6881708", "0.68797106", "0.68787354", "0.68787354", "0.68787354", "0.68787354", "0.68787354", "0.68787354", "0.68787354", "0.68787354", "0.68787354", "0.68774736", "0.68766326", "0.68766326", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.68716884", "0.6870725", "0.6860099", "0.6859429", "0.6859429", "0.6859429", "0.6859429", "0.6859429", "0.6859429", "0.6859429" ]
0.7142249
1
Set up the default description for this service.
public void setServiceDescription(String serviceDescription) { this.serviceDescription = serviceDescription; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setDescription(java.lang.String description);", "public void setDescription(String desc);", "public void setDescription (String description);", "public void setDescription(String description) { this.description = description; }", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription (String Description);", "public void setDescription(String desc) {\n sdesc = desc;\n }", "public void setDescription(String desc) {\n this.desc = desc;\n }", "void setDescription(String description);", "public void setDescription(String description);", "public void setDescription(String description);", "public void setDescription(String description);", "public void setDescription(String description);", "public void setDescription(String description);", "public void setDescription(String desc) {\n description = desc;\n }", "void setDescription(final String description);", "public void setDescription(String descr);", "public void setDescription(String description) {\n\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String desc)\r\n {\r\n\tthis.desc = desc;\r\n }", "@Override\n public void setDescription(String arg0)\n {\n \n }", "public void setDescription(String description){\n this.description = description;\n }", "public void setDescription(String Description) {\n this.Description = Description;\n }", "public void setDescription(String sDescription);", "public void setDescription(final String description);", "public void setDescription(String description) {\n this.description = description;\n }", "protected void setDescription(String description) {\n this.description = description;\n }", "void setDesc(java.lang.String desc);", "public void setDescription(String value) {\r\n this.description = value;\r\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description)\n {\n this.description = description;\n }", "public void setDescription(java.lang.String value) {\n this.description = value;\n }", "public void setDescription(String value) {\n this.description = value;\n }", "public void setDescription(String description)\n {\n this.description = description;\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription( String description )\n {\n this.description = description;\n }", "public void setDescription( String description )\n {\n this.description = description;\n }", "public void setDescription( String description )\n {\n this.description = description;\n }", "public void setDescription(String description) {\n \tthis.description = description;\n }", "public void setDescription(String description)\n {\n this.description = description;\n }", "public void setDescription(String description)\n {\n this.description = description;\n }", "public void setDescription(String description)\n {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n\n this.description = description;\n }", "public void setDescription(String description){this.description=description;}", "public abstract void setDescription(String description);", "public abstract void setDescription(String description);", "public void setDescription(String description )\n {\n this.description = description;\n }", "public void setDescription(String description) {\n _description = description;\n }" ]
[ "0.7135632", "0.7101572", "0.7075155", "0.7065706", "0.70547396", "0.70547396", "0.70547396", "0.70547396", "0.70547396", "0.70547396", "0.7053701", "0.70524246", "0.70479417", "0.7022174", "0.7022174", "0.7022174", "0.7022174", "0.7022174", "0.7011841", "0.700957", "0.6976348", "0.6965626", "0.6963969", "0.6963969", "0.69537693", "0.6934662", "0.69164336", "0.69132626", "0.6909449", "0.6904544", "0.6900471", "0.6899253", "0.6892214", "0.6886403", "0.6881791", "0.6881791", "0.6881791", "0.6881791", "0.6881791", "0.6880095", "0.6880095", "0.6880095", "0.6880095", "0.6880095", "0.687355", "0.6865894", "0.6864037", "0.68633664", "0.6859485", "0.6850244", "0.6850244", "0.6850244", "0.6841361", "0.6833302", "0.6833302", "0.6833302", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.682468", "0.6796232", "0.6793776", "0.6784962", "0.6784962", "0.67808294", "0.6779432" ]
0.0
-1
Return the URL for the wiki page describing this service.
public String getServiceWiki() { return serviceWiki; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getViewServiceWiki()\n {\n return viewServiceWiki;\n }", "String getServiceUrl();", "public URL getServiceUrl() {\n return url;\n }", "public String getUrl()\n\t\t{\n\t\t\treturn \"https://www.zohoapis.eu\";\n\t\t}", "public String getServiceUrl() {\n return \"http://\" + this.serviceHost + \":\" + this.servicePort;\n }", "public String getHowToURLString() {\n return \"https://jdnc.dev.java.net/documentation/index.html\";\n }", "public String url() {\n return server.baseUri().toString();\n }", "private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}", "@DisplayName(\"The URL for the Marketcetera Exchange Server\")\n public String getURL();", "public String getUrl()\n\t\t{\n\t\t\treturn \"https://developer.zohoapis.eu\";\n\t\t}", "@Override\n\tpublic String getUrl()\n\t{\n\t\treturn url;\n\t}", "public String getURL() {\n\t\treturn getName();\n\t}", "public String getUrl(String service)\n {\n return myServerUrls.get(service);\n }", "public String getURL();", "public String getURL()\n {\n return getURL(\"http\");\n }", "public String getSiteUrl();", "@Override\n\tpublic java.lang.String getManualUrl() {\n\t\treturn _scienceApp.getManualUrl();\n\t}", "public final String getUrl() {\n return properties.get(URL_PROPERTY);\n }", "String getWiki();", "@java.lang.Override\n public java.lang.String getUrl() {\n return instance.getUrl();\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return instance.getUrl();\n }", "public String getUrl();", "public String getUrl();", "public String getUrl();", "public String getUrl();", "public String getServiceUrl() {\n return serviceUrl;\n }", "public String getPageUrl() {\n\t\treturn pageUrl;\n\t}", "@Nullable\n public abstract String url();", "@DefaultHandler\n public Resolution view() {\n\t\treturn UrlManager.getWordPressUrl();\n }", "public String getURL() {\n\t\treturn prop.getProperty(\"URL\");\n\t}", "String getLearnMoreHelpPageUrl();", "String getServerUrl();", "public java.lang.String getUrl () {\r\n\t\treturn url;\r\n\t}", "@Override\n\tpublic String getUrlName() {\n\t\treturn URL_NAME;\n\t}", "public String getUrl()\n\t\t{\n\t\t\treturn \"https://sandbox.zohoapis.eu\";\n\t\t}", "public String getPageUrl() {\n return pageUrl;\n }", "public static String getURL() {\n\t return getURL(BackOfficeGlobals.ENV.NIS_USE_HTTPS, BackOfficeGlobals.ENV.NIS_HOST, BackOfficeGlobals.ENV.NIS_PORT);\n\t}", "public String getUrl() {\r\n\t\treturn url;\r\n\t}", "public String getUrl() {\r\n\t\treturn url;\r\n\t}", "java.lang.String getApiUrl();", "public String getServerUrl() {\n return props.getProperty(\"url\");\n }", "public String getUrl() {\n\t\t\treturn url;\n\t\t}", "public String getApiUrl();", "public String getUrl() {\r\n\t\t\treturn url;\r\n\t\t}", "public java.lang.String getUrl() {\n return url;\n }", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "public String getUrl() {\n\t\treturn url;\n\t}", "@Override\r\n\tprotected String getUrl() {\n\t\treturn urlWS + \"/ConsultarIndiceEjecucionAnio\";\r\n\t}", "public String getUrl() {\n return _Web_search.getBaseUrl() + getQuery();\n }", "public java.lang.String getURL() {\n return URL;\n }", "@Override\n\tpublic URL getServiceUrl()\n\t{\n\t\treturn null;\n\t}", "public String url() {\n return this.url;\n }", "public String getURL() {\r\n\t\treturn dURL.toString();\r\n\t}", "@Override\n\tpublic java.lang.String getManualUrl(java.util.Locale locale) {\n\t\treturn _scienceApp.getManualUrl(locale);\n\t}", "@Override\r\n public String getURL() {\n return url;\r\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return url_;\n }", "@java.lang.Override\n public java.lang.String getUrl() {\n return url_;\n }", "public void setServiceWiki(String serviceWiki)\n {\n this.serviceWiki = serviceWiki;\n }", "public String getUrl()\n {\n return url;\n }", "public String getUrl() {\n\t\tif (prop.getProperty(\"url\") == null)\n\t\t\treturn \"\";\n\t\treturn prop.getProperty(\"url\");\n\t}", "@Schema(description = \"Link to get this item\")\n public String getUrl() {\n return url;\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\r\n return url;\r\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "public String getUrl() {\n return url;\n }", "@Override\r\n\tpublic String getUrl() {\n\t\treturn null;\r\n\t}", "public String getURL() {\r\n\t\treturn url;\r\n\t}", "public String getURL(Version version) {\n return getUrl() + version.getDocument().getDocumentURL();\n }" ]
[ "0.710923", "0.66218483", "0.6397003", "0.6382363", "0.6315733", "0.6277788", "0.6268143", "0.6235018", "0.62272805", "0.6223139", "0.6206693", "0.6144934", "0.6140043", "0.61226064", "0.6118108", "0.6098073", "0.6084214", "0.6082069", "0.6052032", "0.6051142", "0.6051142", "0.60353106", "0.60353106", "0.60353106", "0.60353106", "0.60338694", "0.6003857", "0.59826255", "0.5967713", "0.59620064", "0.59605926", "0.59502167", "0.59376585", "0.59363866", "0.58901745", "0.5887987", "0.58794564", "0.58704406", "0.58704406", "0.5866244", "0.58575255", "0.5855943", "0.58500683", "0.5848859", "0.5834775", "0.58333343", "0.58333343", "0.58333343", "0.58333343", "0.58333343", "0.58333343", "0.58333343", "0.58333343", "0.58333343", "0.58124197", "0.58039945", "0.57999074", "0.5793337", "0.57896197", "0.5787572", "0.5771591", "0.5758494", "0.5756728", "0.5756728", "0.57501864", "0.5742353", "0.5731922", "0.57226205", "0.5720751", "0.5720751", "0.5720751", "0.5720751", "0.5720751", "0.5720751", "0.5720751", "0.5716783", "0.5716783", "0.5716783", "0.5716783", "0.5716783", "0.5716783", "0.5716783", "0.5716783", "0.5716783", "0.5716783", "0.5716783", "0.5716783", "0.5716783", "0.5716783", "0.5716783", "0.5716783", "0.5716783", "0.5716783", "0.5716783", "0.5716783", "0.5716783", "0.5716783", "0.5712509", "0.5705625", "0.5704881" ]
0.7367416
0
Set up the URL for the wiki page describing this service.
public void setServiceWiki(String serviceWiki) { this.serviceWiki = serviceWiki; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setURL() {\n\t\tURL = Constant.HOST_KALTURA+\"/api_v3/?service=\"+Constant.SERVICE_KALTURA_LOGIN+\"&action=\"\n\t\t\t\t\t\t+Constant.ACTION_KALTURA_LOGIN+\"&loginId=\"+Constant.USER_KALTURA+\"&password=\"+Constant.PASSWORD_KALTURA+\"&format=\"+Constant.FORMAT_KALTURA;\n\t}", "public void setURL(String url);", "public void setUrl(String url);", "public void setUrl(String url);", "public void setViewServiceWiki(String viewServiceWiki)\n {\n this.viewServiceWiki = viewServiceWiki;\n }", "public void setURL(java.lang.String URL) {\n this.URL = URL;\n }", "@DisplayName(\"The URL for the Marketcetera Exchange Server\")\n public void setURL(@DisplayName(\"The URL for the Marketcetera Exchange Server\")\n String inURL);", "IParser setServerBaseUrl(String theUrl);", "public void setUrl(URL url)\n {\n this.url = url;\n }", "public String getServiceWiki()\n {\n return serviceWiki;\n }", "@Override\n\tpublic void setManualUrl(java.lang.String manualUrl) {\n\t\t_scienceApp.setManualUrl(manualUrl);\n\t}", "PagesAddress(String url) {\n applicationUrl = url;\n }", "@Override\n\tpublic void setManualUrl(java.lang.String manualUrl, java.util.Locale locale) {\n\t\t_scienceApp.setManualUrl(manualUrl, locale);\n\t}", "public void setURL(String _url) { url = _url; }", "public void setServer(URL url) {\n\n\t}", "CartogramWizardShowURL (String url)\n\t{\n\t\tmUrl = url;\n\t\n\t}", "public void setHTTP_URL(String url) {\r\n\t\ttry {\r\n\t\t\tURL u = new URL(url);\r\n\t\t\tu.toURI();\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t} catch (URISyntaxException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t\tthis.settings.setProperty(\"HTTP_URL\", url);\r\n\t\tthis.saveChanges();\r\n\t}", "@Override\n\tpublic java.lang.String getManualUrl() {\n\t\treturn _scienceApp.getManualUrl();\n\t}", "String getServiceUrl();", "public String getViewServiceWiki()\n {\n return viewServiceWiki;\n }", "public void setUrl(String url) {\n\t\tthis.url = url;\n\t\tthis.handleConfig(\"url\", url);\n\t}", "public void setUrl(String url) {\n this.url = url;\n }", "@DisplayName(\"The URL for the Marketcetera Exchange Server\")\n public String getURL();", "public void setUrl(String url) {\r\n hc.setUrl(url);\r\n }", "public void setUrl( String url )\n {\n this.url = url;\n }", "public void setUrl( String url )\n {\n this.url = url;\n }", "public void setUrl(String Url) {\n this.Url = Url;\n }", "@Override\n\tpublic String getUrl()\n\t{\n\t\treturn url;\n\t}", "private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}", "public void setUrl(java.lang.String url) {\n this.url = url;\n }", "public void setUrl(String url) {\r\n this.url = url;\r\n }", "public void setUrl(String url) {\r\n this.url = url;\r\n }", "public void setUrl(String url) {\r\n this.url = url;\r\n }", "public void changeUrl() {\n url();\n }", "public DefaultHref(String baseUrl)\r\n {\r\n this.parameters = new HashMap();\r\n setFullUrl(baseUrl);\r\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setURL(String inputSchema, String outputSchema) {\n String port = getPortValueForJS();\n browser.setUrl(\"http://localhost:\" + port + \"/dataMapper?port=\" + port + \"&inputtype=\" + inputSchema\n + \"&outputtype=\" + outputSchema + NO_CACHE);\n }", "public DocumentController() {\n\t\tthis.content = this.getstartpage();\n\t\tthis.url = \"https://\";\n\t}", "@Override\r\n\tpublic void getUrl() {\n\r\n\t}", "@Override\n\tpublic String getUrlName() {\n\t\treturn URL_NAME;\n\t}", "@Override\n public void setUrl(String url) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"Directory manager \" + directoryManager);\n }\n try {\n super.setUrl(directoryManager.replacePath(url));\n } catch (Exception e) {\n LOGGER.error(\"Exception thrown when setting URL \", e);\n throw new IllegalStateException(e);\n }\n }", "public void setUrl (java.lang.String url) {\r\n\t\tthis.url = url;\r\n\t}", "public WikipediaPage() {\n wikiModel = new WikiModel(\"\", \"\");\n textConverter = new PlainTextConverter();\n }", "public void setURL(String URL) {\n mURL = URL;\n }", "@Override\r\n public String getURL() {\n return url;\r\n }", "public void setURL(String url) {\n\t\tthis.url = url;\n\t}", "public interface WikiAPIService {\n\n // Set a constant of links limits.\n int titleLimits = 200;\n\n /**\n * GET HTTP function to return Wiki extracts from url. Query parameter for the title of\n * the article is added to the function via the @Query annotation. The rest of query\n * parameters are hard-coded since they are always needed.\n *\n * The query parameter 'titles' are added in a {Title1}|{Title2}|...etc. format.\n */\n @GET(\"w/api.php?action=query\" +\n // Retrieve extracts and thumbnail image associated with article\n \"&prop=extracts|pageimages\" +\n \"&redirects\" +\n // Return extract in plain text (Boolean)\n \"&explaintext=1\" +\n // Return only the intro section (Boolean)\n \"&exintro=1\" +\n // Return the page ids as a list\n \"&indexpageids\" +\n // The max width of the thumbnail.\n \"&pithumbsize=1080\" +\n // Return in a JSON format.\n \"&format=json\" +\n // Return new json format with proper page array.\n \"&formatversion=2\")\n Call<WikiExtractsJSONResponse> requestExtracts(@Query(\"titles\") String titles);\n\n /**\n * GET HTTP function to return a number of featured Wikipedia link titles. These\n * link titles will be chosen at random to then be inserted into the requestExtracts()\n * function that will bring the extracts of these titles.\n */\n @GET(\"w/api.php?action=query\" +\n // Retrieve title links\n \"&prop=links\" +\n // Retrieve links in the main page\n \"&titles=メインページ\" +\n // Only return articles (Not users or meta pages)\n \"&plnamespace=0\" +\n // Return a limit number defined in companion object\n \"&pllimit=\" + titleLimits +\n // Return in json format\n \"&format=json\" +\n // Return new json format\n \"&formatversion=2\")\n Call<WikiTitlesJSONResponse> requestDailyTitles();\n}", "public void setUrl(String url) {\r\n\t\tthis.url = url;\r\n\t}", "public void setUrl(String url) {\r\n\t\tthis.url = url;\r\n\t}", "public void setUrl(String url) {\n if(url != null && !url.endsWith(\"/\")){\n url += \"/\";\n }\n this.url = url;\n }", "public void setUrl(String url) {\n this.url = url;\n }", "public void setDefaultUrl(String url) {\n\t\tthis.defaultUrl = url;\n\t}", "public void setUrl(String url){\n\t\t_url=url;\n\t}", "@Before\n\tpublic static void setup() {\n\t\trenderArgs.put(\"base\", request.getBase());\n\t\tString location = request.getBase() + \"/services/MonitoringService\";\n\t\trenderArgs.put(\"location\", location);\n\t}", "public static String setURL(String endpoint) {\n String url = hostName + endpoint;\n\n log.info(\"Enpoint: \" + endpoint);\n\n return url;\n\n }", "public String getURL();", "public String getServiceUrl() {\n return \"http://\" + this.serviceHost + \":\" + this.servicePort;\n }", "void setUrl(String url) {\n this.url = Uri.parse(url);\n }", "String getServerUrl();", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n event = service.getevent(indiceSite);\n\n libelle.setText(event.getNom_evenement());\n\n lieu.setText(event.getDescription());\n // TODO\n }", "public String getHowToURLString() {\n return \"https://jdnc.dev.java.net/documentation/index.html\";\n }", "public void setUrl(String url) {\n\t\tthis.url = url;\n\t}", "public void setUrl(String url) {\n\t\tthis.url = url;\n\t}", "public void setUrl(String url) {\n\t\tthis.url = url;\n\t}", "public void setUrl(String url) {\n\t\tthis.url = url;\n\t}", "public void setUrl(String url)\n {\n this.url = url;\n }", "@DefaultHandler\n public Resolution view() {\n\t\treturn UrlManager.getWordPressUrl();\n }", "@Override\n\tpublic void setManualUrl(java.lang.String manualUrl,\n\t\tjava.util.Locale locale, java.util.Locale defaultLocale) {\n\t\t_scienceApp.setManualUrl(manualUrl, locale, defaultLocale);\n\t}", "public URL getServiceUrl() {\n return url;\n }", "@Override\n\tpublic java.lang.String getManualUrl(java.util.Locale locale) {\n\t\treturn _scienceApp.getManualUrl(locale);\n\t}", "public RTLinkPlugin(WikiServiceAsync wikiService)\n {\n this.wikiService = wikiService;\n }", "String getLearnMoreHelpPageUrl();", "public String getSiteUrl();", "public final GetHTTP setUrl(final String url) {\n properties.put(URL_PROPERTY, url);\n return this;\n }", "public NewPageWizard(IXWikiSpace sapce)\n {\n super();\n setWindowTitle(\"Add New Page...\");\n setNeedsProgressMonitor(false);\n this.space = sapce;\n }", "@Override\n\tpublic void initialize(URL url, ResourceBundle rsb) {\n\t\twelcomeAdmin.setText(\"Welcome!\");\n\t\twelcomeAdmin.setFont(Font.font(40));\n\t}", "@Override\r\n public void initialize(URL url, ResourceBundle rb) \r\n {\r\n // TODO\r\n System.out.println(\" Home Controller working.....\");\r\n \r\n System.out.println(Name.getText() );\r\n \r\n Name.setText(START.USERNAME);\r\n \r\n }", "WebURL createURL()\n {\n String url = getDir().getURL().getString() + \"!/\" + _cmt._rev.getId().getName();\n return WebURL.getURL(url);\n }", "public abstract String getURL();", "public String getUrl()\n\t\t{\n\t\t\treturn \"https://developer.zohoapis.eu\";\n\t\t}", "public HomeSection enterUrl(){\r\n\t\tGlobal.driver.get(CONSTANT.proUrl);\r\n\t\treturn new HomeSection();\r\n\t}", "@Override\n public void setWeb(String web) {\n this.web = web;\n }", "public String getUrl()\n\t\t{\n\t\t\treturn \"https://www.zohoapis.eu\";\n\t\t}", "public void setUrl(String url) {\n\t\tthis.url = utf8URLencode(url);\n\t}", "void setOssHomepage(String ossHomepage);", "public ArticleListWeb(Context context, String url) {\n\t\tsuper(context);\n\t\tmURL = url;\n\t\t\n\t\t\n\t}", "@Given(\"^the url of the application under test$\")\r\n\tpublic void getUrl() throws Exception {\n\t\tdriver.get(url);\r\n\t}", "public void setStepikApiUrl(String apiURL){\n this.STEPIK_API_URL = apiURL;\n setupAPI();\n }", "public void setProviderURL (URL url) {\n impl.setProviderURL (url);\n }", "public static void setOfficialArtistWebpage(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Resource value) {\r\n\t\tBase.set(model, instanceResource, OFFICIALARTISTWEBPAGE, value);\r\n\t}", "public String getURL() { return url; }", "@RequestMapping(value = \"/setup\", method = RequestMethod.GET)\n\tString setup() {\n\t\thueUseCase.addIp();\n\n\t\treturn \"setup\";\n\t}", "public String getUrl() { return url; }" ]
[ "0.61165684", "0.6092677", "0.59303594", "0.59303594", "0.5889715", "0.58253396", "0.5817563", "0.57876444", "0.57236576", "0.57214874", "0.5717393", "0.5715276", "0.5689588", "0.56895703", "0.564206", "0.5641462", "0.56226385", "0.56120074", "0.56114393", "0.5609042", "0.5608459", "0.5602947", "0.55874074", "0.5539505", "0.55175257", "0.55175257", "0.5514167", "0.54866123", "0.54792094", "0.5460068", "0.54557955", "0.54557955", "0.54557955", "0.5451103", "0.5445066", "0.5437131", "0.5437131", "0.5437131", "0.5437131", "0.5437131", "0.5437131", "0.5437131", "0.5437131", "0.54358447", "0.5407", "0.5395953", "0.5393648", "0.5392899", "0.5391481", "0.53834856", "0.5377708", "0.5349399", "0.5338248", "0.53329706", "0.5329007", "0.5329007", "0.5326427", "0.5323044", "0.5316852", "0.53099966", "0.52982", "0.52878606", "0.5274689", "0.5274067", "0.5272801", "0.5267249", "0.52608186", "0.5257109", "0.5251712", "0.5251712", "0.5251712", "0.5251712", "0.5247472", "0.52397907", "0.5220101", "0.5200999", "0.5198969", "0.51967466", "0.5188593", "0.5188118", "0.5181998", "0.5180724", "0.5175507", "0.51745254", "0.5171726", "0.51701653", "0.51635295", "0.5161054", "0.5161046", "0.51605386", "0.5149285", "0.5147291", "0.5125035", "0.5105838", "0.51038766", "0.50961715", "0.50924474", "0.5089732", "0.5087579", "0.50869536" ]
0.61344767
0
Return comparison result based on the content of the properties.
@Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (objectToCompare == null || getClass() != objectToCompare.getClass()) { return false; } RegisteredOMAGService that = (RegisteredOMAGService) objectToCompare; return Objects.equals(getServiceName(), that.getServiceName()) && Objects.equals(getServiceURLMarker(), that.getServiceURLMarker()) && Objects.equals(getServiceDescription(), that.getServiceDescription()) && Objects.equals(getServiceWiki(), that.getServiceWiki()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean compareProperties (Properties props1 , Properties props2){\n boolean propertiesAreEqual = true;\n Properties props2Clone = (Properties)props2.clone();\n Iterator<Object> itProps1Name = props1.keySet().iterator();\n while (propertiesAreEqual && itProps1Name.hasNext()){\n String propertyName = (String)itProps1Name.next();\n if (props2Clone.containsKey(propertyName)){\n propertiesAreEqual = props1.getProperty(propertyName).trim()\n .equals(props2Clone.getProperty(propertyName).trim());\n // Remove checked property from props2Clone properties\n props2Clone.remove(propertyName);\n }\n else{\n propertiesAreEqual = false;\n }\n }\n // If there are left properties in CSS file then files are not equal\n if (props2Clone.size() > 0){\n propertiesAreEqual = false;\n }\n \n return propertiesAreEqual;\n \n }", "@Override\r\n\t\t\t\tpublic int compare(Property o1, Property o2) {\n\t\t\t\t\treturn Integer.compare(o1.getRealty().getRealtyID(),o2.getRealty().getRealtyID());\r\n\t\t\t\t}", "public double matchData() {\n\t\tArrayList<OWLDataProperty> labels1 = getDataProperties(ontology1);\n\t\tArrayList<OWLDataProperty> labels2 = getDataProperties(ontology2);\n\t\tfor (OWLDataProperty lit1 : labels1) {\n\t\t\tfor (OWLDataProperty lit2 : labels2) {\n\t\t\t\tif (LevenshteinDistance.computeLevenshteinDistance(TestAlign.mofidyURI(lit1.toString())\n\t\t\t\t\t\t, TestAlign.mofidyURI(lit2.toString()))>0.8){\n\t\t\t\t\treturn 1.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0.;\n\n\n\t}", "private Comparison compareValues(SimpleNode first, SimpleNode second) {\n return Objects.equals(first.jjtGetValue(), second.jjtGetValue()) ? Comparison.IS_EQUAL\n : Comparison.notEqual(\"Node values differ: \" + first.jjtGetValue() + \" vs \" + second.jjtGetValue());\n }", "private List<Comparison> doCompare(VM vm, Row row, String vmType) {\r\n List<Comparison> results = new ArrayList<Comparison>();\r\n\r\n for (String param : ReadFile.parametersToCompare.stringPropertyNames()) {\r\n\r\n if (paramIndexes.get(param) != null) {\r\n String resValue = getCellValue(row.getCell(paramIndexes.get(param)));\r\n\r\n if (resValue != null && datastoreUsageValues.get(param) != null) {\r\n resValue = datastoreUsageValues.get(param);\r\n if (\"Backuptool\".equals(param) && \"vm5\".equals(vm.getVm_name())) {\r\n resValue = datastoreUsageValues.get(\"NFSBackup\");\r\n }\r\n }\r\n\r\n if (resValue == null) {\r\n continue;\r\n }\r\n String vConfValue = getVConfValue(param, vm, ReadFile.parametersToCompare.getProperty(param));\r\n Comparison comparison = new Comparison();\r\n comparison.setAttribute(param);\r\n if (\"Datastore\".equals(param)) {\r\n matchStringValues(vConfValue, resValue, comparison);\r\n comparison.setComment(\"vConf value: \" + vConfValue + \", Resource sheet value: \" + resValue);\r\n } else if (\"Ext rep\".equals(param) && !openStack && !is3XL) {\r\n if (vmType.contains(\"Small\") || vmType.contains(\"Mainstream\")) {\r\n resValue = Double.toString(Double.parseDouble(resValue) / 2);\r\n } else {\r\n resValue = Double.toString(Double.parseDouble(resValue) / 4);\r\n }\r\n matchValues(vConfValue, resValue, comparison, param);\r\n comparison.setComment(\"vConf value: \" + vConfValue + \" MB, Resource sheet value: \" + resValue + \" GB\");\r\n } else if (\"vCPU\".equals(param)) {\r\n matchValues(vConfValue, resValue, comparison, param);\r\n comparison.setComment(\"vConf value: \" + vConfValue + \" GB, Resource sheet value: \" + resValue + \" GB\");\r\n } else {\r\n matchValues(vConfValue, resValue, comparison, param);\r\n comparison.setComment(\"vConf value: \" + vConfValue + \" MB, Resource sheet value: \" + resValue + \" GB\");\r\n }\r\n results.add(comparison);\r\n }\r\n }\r\n\r\n return results;\r\n }", "public int compare (Object object1,Object object2)\r\n {\r\n Map map1 = (Map)object1;\r\n Map map2 = (Map)object2;\r\n\r\n /*Get sort info keys*/\r\n Map sortKeys = getSortKeys();\r\n\r\n String keyName = (String) sortKeys.get(\"name\");\r\n String keyDir = (String) sortKeys.get(\"dir\");\r\n\r\n String stringValue1 = (String) map1.get(keyName); \r\n String stringValue2 = (String) map2.get(keyName);\r\n\r\n boolean str1Empty = isEmpty(stringValue1);\r\n boolean str2Empty = isEmpty(stringValue2);\r\n \r\n /* \r\n * If both values are null or empty diff = 0\r\n * If first string is null or empty diff = -1\r\n * If second string is null or empty diff = 1\r\n * If both the strings are not empty then compare the strings\r\n */ \r\n int diff = str1Empty && str2Empty ? 0 : \r\n str1Empty ? -1 : \r\n str2Empty ? 1 : \r\n compareAnchorDataPart(stringValue1, stringValue2); \r\n \r\n /* If the direction is not ascending, then invert the sign of 'diff' value\r\n * */\r\n return \"ascending\".equals(keyDir)? diff : -diff ;\r\n }", "@Override\r\n\t\t\tpublic int compare(T o1, T o2) {\n\t\t\t\tString s1 = ((OWLProperty)o1).getIRI().getShortForm();\r\n\t\t\t\tString s2 = ((OWLProperty)o2).getIRI().getShortForm();\r\n\t\t\t\tif (s1.startsWith(\"'\")) {\r\n\t\t\t\t\ts1 = s1.substring(1, s1.length() - 1);\r\n\t\t\t\t}\r\n\t\t\t\tif (s2.startsWith(\"'\")) {\r\n\t\t\t\t\ts2 = s2.substring(1, s2.length() - 1);\r\n\t\t\t\t}\r\n\t\t\t\treturn s1.compareTo(s2);\r\n\t\t\t}", "@Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }", "@Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }", "public abstract boolean isMatching(Properties p);", "public final com.raizlabs.android.dbflow.sql.language.property.Property getProperty(java.lang.String r2) {\n /*\n r1 = this;\n r2 = com.raizlabs.android.dbflow.sql.QueryBuilder.quoteIfNeeded(r2);\n r0 = r2.hashCode();\n switch(r0) {\n case -2119176604: goto L_0x0052;\n case -1436943838: goto L_0x0048;\n case -1332609558: goto L_0x003e;\n case -1194979166: goto L_0x0034;\n case -423721887: goto L_0x002a;\n case 2964037: goto L_0x0020;\n case 138244702: goto L_0x0016;\n case 1181221320: goto L_0x000c;\n default: goto L_0x000b;\n };\n L_0x000b:\n goto L_0x005c;\n L_0x000c:\n r0 = \"`adDistance`\";\n r2 = r2.equals(r0);\n if (r2 == 0) goto L_0x005c;\n L_0x0014:\n r2 = 5;\n goto L_0x005d;\n L_0x0016:\n r0 = \"`sortTimeFrame`\";\n r2 = r2.equals(r0);\n if (r2 == 0) goto L_0x005c;\n L_0x001e:\n r2 = 2;\n goto L_0x005d;\n L_0x0020:\n r0 = \"`id`\";\n r2 = r2.equals(r0);\n if (r2 == 0) goto L_0x005c;\n L_0x0028:\n r2 = 0;\n goto L_0x005d;\n L_0x002a:\n r0 = \"`before`\";\n r2 = r2.equals(r0);\n if (r2 == 0) goto L_0x005c;\n L_0x0032:\n r2 = 3;\n goto L_0x005d;\n L_0x0034:\n r0 = \"`listingType`\";\n r2 = r2.equals(r0);\n if (r2 == 0) goto L_0x005c;\n L_0x003c:\n r2 = 7;\n goto L_0x005d;\n L_0x003e:\n r0 = \"`username`\";\n r2 = r2.equals(r0);\n if (r2 == 0) goto L_0x005c;\n L_0x0046:\n r2 = 6;\n goto L_0x005d;\n L_0x0048:\n r0 = \"`sort`\";\n r2 = r2.equals(r0);\n if (r2 == 0) goto L_0x005c;\n L_0x0050:\n r2 = 1;\n goto L_0x005d;\n L_0x0052:\n r0 = \"`after`\";\n r2 = r2.equals(r0);\n if (r2 == 0) goto L_0x005c;\n L_0x005a:\n r2 = 4;\n goto L_0x005d;\n L_0x005c:\n r2 = -1;\n L_0x005d:\n switch(r2) {\n case 0: goto L_0x007d;\n case 1: goto L_0x007a;\n case 2: goto L_0x0077;\n case 3: goto L_0x0074;\n case 4: goto L_0x0071;\n case 5: goto L_0x006e;\n case 6: goto L_0x006b;\n case 7: goto L_0x0068;\n default: goto L_0x0060;\n };\n L_0x0060:\n r2 = new java.lang.IllegalArgumentException;\n r0 = \"Invalid column name passed. Ensure you are calling the correct table's column\";\n r2.<init>(r0);\n throw r2;\n L_0x0068:\n r2 = listingType;\n return r2;\n L_0x006b:\n r2 = username;\n return r2;\n L_0x006e:\n r2 = adDistance;\n return r2;\n L_0x0071:\n r2 = after;\n return r2;\n L_0x0074:\n r2 = before;\n return r2;\n L_0x0077:\n r2 = sortTimeFrame;\n return r2;\n L_0x007a:\n r2 = sort;\n return r2;\n L_0x007d:\n r2 = id;\n return r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.reddit.datalibrary.frontpage.data.model.ListingDataModel_Table.getProperty(java.lang.String):com.raizlabs.android.dbflow.sql.language.property.Property\");\n }", "Comparison createComparison();", "Comparison createComparison();", "@Test\n void getByPropertyEqualSuccess() {\n List<Order> orders = dao.getByPropertyEqual(\"description\", \"February Large Long-Sleeve\");\n assertEquals(1, orders.size());\n assertEquals(2, orders.get(0).getId());\n }", "@Test\r\n\tpublic void testCompareCase1() throws IOException {\r\n\t\tPerson p1 = DataUtil.readDataFromFile(\"test/data/case1/case1-person1.json\", Person.class);\r\n\t\tPerson p2 = DataUtil.readDataFromFile(\"test/data/case1/case1-person2.json\", Person.class);\r\n\r\n\t\tIContext ctx = ObjectCompare.compare(p1, p2);\r\n\t\tdebug(ctx.getDifferences());\r\n\t\tAssert.assertTrue(ctx.hasDifferences());\r\n\t\tAssert.assertEquals(4, ctx.getDifferences().size());\r\n\t}", "@Test\n public void propertyTest() throws Exception {\n String unMatchedTriples = \"\";\n StmtIterator msIter = propertyMeasuringStick.listStatements();\n while (msIter.hasNext()) {\n Statement msStmt = msIter.nextStatement();\n // TODO: find a more formal way to filter out properties we don't need to test\n if (!msStmt.getPredicate().toString().equals(\"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\") &&\n !msStmt.getPredicate().toString().equals(\"http://www.w3.org/2000/01/rdf-schema#subPropertyOf\")) {\n StmtIterator poIter = propertyOutput.listStatements();\n boolean match = false;\n while (poIter.hasNext()) {\n Statement outputStmt = poIter.nextStatement();\n if (outputStmt.equals(msStmt)) {\n match = true;\n }\n }\n // If a match is not found then set this statement.\n if (!match) {\n unMatchedTriples += msStmt.getSubject() + \" \" + msStmt.getPredicate().toString() + \" \" + msStmt.getObject().toString() + \" .\\n\";\n }\n }\n }\n // Output assertion with message of results\n if (!unMatchedTriples.equals(\"\"))\n assertTrue(\"\\nThe following triples ARE in \" + propertyOutputFileName + \" but NOT in propertyMeasuringStick.n3:\\n\" + unMatchedTriples\n , false);\n else\n assertTrue(true);\n\n }", "private double estimateCategoricalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Map<PropertyValue, Double>> map1 =\n stats1.getCategoricalSelectivityEstimation();\n Map<String, Map<PropertyValue, Double>> map2 =\n stats2.getCategoricalSelectivityEstimation();\n Map<PropertyValue, Double> propStats1 = map1.getOrDefault(property1, null);\n Map<PropertyValue, Double> propStats2 = map2.getOrDefault(property2, null);\n // property not sampled or not considered\n if (propStats1 == null || propStats2 == null) {\n // property not considered => return 0.5\n if (!isPropertyRelevant(property1) && !isPropertyRelevant(property2)) {\n return 0.5;\n } else {\n // property not sampled => very rare => return very small value\n return 0.0001;\n }\n }\n if (comp == EQ || comp == NEQ) {\n double sum = 0.;\n for (Map.Entry<PropertyValue, Double> entry1 : propStats1.entrySet()) {\n double val1Selectivity = entry1.getValue();\n for (Map.Entry<PropertyValue, Double> entry2 : propStats2.entrySet()) {\n if (entry1.getKey().equals(entry2.getKey())) {\n double val2Selectivity = entry2.getValue();\n sum += val1Selectivity * val2Selectivity;\n }\n }\n }\n return comp == EQ ? sum : 1. - sum;\n } else {\n // shouldn't happen, categorical variables can only be compared with EQ or NEQ\n return 0.;\n }\n }", "public java.lang.String getIsComparation()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ISCOMPARATION$2);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public void testCompare2() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(0.6D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions below the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "private int Compare(ResultsClass lhs, ResultsClass rhs) {\n if (lhs.bodyPart > rhs.bodyPart) {\n return 1;\n } else if (lhs.bodyPart > rhs.bodyPart) {\n return -1;\n } else {\n return 0;\n }\n }", "public void testObjCompare()\n {\n assertEquals( Comparator.EQUAL, Util.objCompare(null,null) );\n assertEquals( Comparator.LESS, Util.objCompare(new Integer(10), new Integer(20)) );\n assertEquals( Comparator.GREATER, Util.objCompare(new Integer(25), new Integer(20)) );\n assertEquals( Comparator.UNDECIDABLE,Util.objCompare(null,new Integer(1)) );\n assertEquals( Comparator.UNDECIDABLE,Util.objCompare(new Integer(1),null) );\n }", "boolean equalProps(InstanceProperties props) {\n String propsName = props.getString(PROPERTY_NAME, null);\n return propsName != null\n ? propsName.equals(name)\n : name == null;\n }", "private boolean haveTwoObjsSameFields(Class classObjects, Object obj1, Object obj2, ArrayList<String> fieldsToExcludeFromCompare) {\n log.info(\"TEST: comparing two objects of class \"+classObjects.getName());\n if (obj1.getClass() != obj2.getClass()) {\n log.error(\"TEST: The two objects are instances of different classes, thus different\");\n return false;\n }\n\n try {\n PropertyDescriptor[] pds= Introspector.getBeanInfo(classObjects).getPropertyDescriptors();\n for(PropertyDescriptor pd: pds) {\n log.info(pd.getDisplayName());\n String methodName=pd.getReadMethod().getName();\n String fieldName = methodName.substring(3, methodName.length());\n\n if(fieldsToExcludeFromCompare.contains(fieldName)==true) {\n continue;\n }\n\n boolean areEqual=false;\n try {\n Object objReturned1 = pd.getReadMethod().invoke(obj1);\n Object objReturned2 =pd.getReadMethod().invoke(obj2);\n if(objReturned1!=null && objReturned2!=null) {\n areEqual=objReturned1.equals(objReturned2);\n if(objReturned1 instanceof List<?> && ((List) objReturned1).size()>0 && ((List) objReturned1).size()>0 && ((List) objReturned1).get(0) instanceof String) {\n String str1=String.valueOf(objReturned1);\n String str2=String.valueOf(objReturned2);\n areEqual=str1.equals(str2);\n\n }\n }\n else if(objReturned1==null && objReturned2==null) {\n log.info(\"TEST: Field with name \"+fieldName+\" null in both objects.\");\n areEqual=true;\n }\n else {\n //log.info(\"One of two objects is null\");\n //log.info(\"{}\",objReturned1);\n //log.info(\"{}\",objReturned2);\n }\n if(areEqual==false) {\n log.info(\"TEST: field with name \"+fieldName+\" has different values in objects. \");\n return false;\n }\n else{\n log.info(\"TEST: field with name \"+fieldName+\" has same value in both objects. \");\n }\n } catch (IllegalAccessException e) {\n\n e.printStackTrace();\n return false;\n } catch (IllegalArgumentException e) {\n e.printStackTrace();\n return false;\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n return false;\n }\n }\n } catch (IntrospectionException e) {\n e.printStackTrace();\n }\n return true;\n }", "public void testCompare1() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.5D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions in range < predictions above the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "boolean compare(Object targetOne, Object targetTwo);", "public void testCompare6() throws Exception {\r\n ComponentCompetitionSituation situation1 = new ComponentCompetitionSituation();\r\n situation1.setPostingDate(new Date());\r\n situation1.setEndDate(new Date(situation1.getPostingDate().getTime() + 100000));\r\n situation1.setPrize(200D);\r\n\r\n ComponentCompetitionSituation situation2 = new ComponentCompetitionSituation();\r\n situation2.setPostingDate(new Date());\r\n situation2.setEndDate(new Date(situation2.getPostingDate().getTime() + 100000));\r\n situation2.setPrize(200D);\r\n\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation1, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation2, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be == 0\r\n assertTrue(\"result of compare\", result == 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "@Test public void testCompareTo() {\r\n new LinkedHashMap<Entry<String, ComparisonResult>, Entry<Word, Word>>() {\r\n private static final long serialVersionUID = -114525477689441361L; {\r\n put(new SimpleEntry<>(\"test(Test)\", ComparisonResult.LESS_THAN), new SimpleEntry<>(w1, w2));\r\n put(new SimpleEntry<>(\"Test(test)\", ComparisonResult.GREATER_THAN), new SimpleEntry<>(w2, w1));\r\n put(new SimpleEntry<>(\"Test(Te/t)\", ComparisonResult.LESS_THAN), new SimpleEntry<>(w2, w5));\r\n put(new SimpleEntry<>(\"Te/t(Test)\", ComparisonResult.GREATER_THAN), new SimpleEntry<>(w5, w2));\r\n put(new SimpleEntry<>(\"Text(Te/t)\", ComparisonResult.GREATER_THAN), new SimpleEntry<>(w7, w5));\r\n put(new SimpleEntry<>(\"Te/t(Text)\", ComparisonResult.LESS_THAN), new SimpleEntry<>(w5, w7));\r\n put(new SimpleEntry<>(\"testing(test'ing)\", ComparisonResult.LESS_THAN), new SimpleEntry<>(w3, w4));\r\n put(new SimpleEntry<>(\"test'ing(testing)\", ComparisonResult.GREATER_THAN), new SimpleEntry<>(w4, w3));\r\n put(new SimpleEntry<>(\"test(testing)\", ComparisonResult.LESS_THAN), new SimpleEntry<>(w1, w3));\r\n put(new SimpleEntry<>(\"testing(test)\", ComparisonResult.GREATER_THAN), new SimpleEntry<>(w3, w1));\r\n put(new SimpleEntry<>(\"test(test)\", ComparisonResult.EQUAL_TO), new SimpleEntry<>(w1, w6));\r\n }}.forEach((k, v) -> {\r\n assertTrue(String.format(\"%1$s should be %2$s\", k.getKey(), k.getValue().toString()),\r\n v.getKey().compareTo(v.getValue()) == k.getValue());\r\n });\r\n }", "private double estimateNumericalPropertyProb(TemporalElementStats stats1, String property1,\n Comparator comp,\n TemporalElementStats stats2, String property2) {\n Map<String, Double[]> map1 = stats1.getNumericalPropertyStatsEstimation();\n Map<String, Double[]> map2 = stats2.getNumericalPropertyStatsEstimation();\n Double[] propStats1 = map1.getOrDefault(property1, null);\n Double[] propStats2 = map2.getOrDefault(property2, null);\n if (propStats1 == null || propStats2 == null) {\n return 0.0001;\n }\n double occurrence = stats1.getNumericalOccurrenceEstimation()\n .getOrDefault(property1, 0.) *\n stats2.getNumericalOccurrenceEstimation().getOrDefault(property2, 0.);\n // assuming both properties are normally distributed,\n // their difference is also normally distributed\n NormalDistribution differenceDist = new NormalDistribution(\n propStats1[0] - propStats2[0],\n Math.max(Math.sqrt(propStats1[1] + propStats2[1]), VERY_LOW_PROB));\n\n if (comp == EQ) {\n return occurrence * differenceDist.density(0.);\n } else if (comp == NEQ) {\n return occurrence * (1. - differenceDist.density(0.));\n } else if (comp == LTE) {\n return occurrence * (differenceDist.cumulativeProbability(0.));\n } else if (comp == LT) {\n return occurrence * (differenceDist.cumulativeProbability(0.) -\n differenceDist.density(0.));\n } else if (comp == GTE) {\n return occurrence * (1. - differenceDist.cumulativeProbability(0.) +\n differenceDist.density(0.));\n } else {\n //GT\n return occurrence * (1. - differenceDist.cumulativeProbability(0.));\n }\n }", "public String getProductToCompare() {\n return mProductToCompare;\n }", "public void sortProperties (ArrayList<Property> properties, String branchName) {\r\n\t\tsoldProperties.clear();\r\n\t\tnotSoldProperties.clear();\r\n\t\totherProperties.clear();\r\n \tint size = properties.size();\r\n \tfor (int i = 0; i < size; i++) {\r\n \t\tif (properties.get(i).getBranchName().equals(branchName)) {\r\n \t\t\tif (!properties.get(i).getSoldPrice().equals(\"\")) {\r\n \t\t\t\tsoldProperties.add(properties.get(i));\r\n \t\t\t}\r\n \t\t\telse {\r\n \t\t\t\tnotSoldProperties.add(properties.get(i));\r\n \t\t\t}\r\n \t\t}\r\n \t\telse {\r\n\t\t\t\totherProperties.add(properties.get(i));\r\n\t\t\t}\r\n \t}\r\n\t}", "Quantity getComparisonValue();", "public String diffRule() {\n return this.innerProperties() == null ? null : this.innerProperties().diffRule();\n }", "public abstract void compare();", "public void testCompare() throws Exception {\n\n Object testData[][] = {\n { \"aaa\", \"bbb\", -1 },\n { \"aaa\", \"aaa\", 0 },\n { \"bbb\", \"aaa\", 1 },\n { \"aaa\", \"aaa_L1_bbb.lsm\", -1 },\n { \"aaa_L1_bbb.lsm\", \"aaa_L1_bbb.lsm\", 0 },\n { \"aaa_L1_bbb.lsm\", \"aaa\", 1 },\n { \"aaa_L1_bbb.lsm\", \"aaa_L10_bbb.lsm\", -1 },\n { \"aaa_L10_bbb.lsm\", \"aaa_L1_bbb.lsm\", 1 },\n { \"aaa_La_bbb.lsm\", \"aaa_L1_bbb.lsm\", 1 },\n { \"aaa_L2_bbb.lsm\", \"aaa_L10_bbb.lsm\", -1 }\n };\n\n LNumberComparator comparator = new LNumberComparator();\n\n for (Object[] testRow : testData) {\n String name1 = (String) testRow[0];\n String name2 = (String) testRow[1];\n File file1 = new File(name1);\n File file2 = new File(name2);\n int expectedResult = (Integer) testRow[2];\n int actualResult = comparator.compare(new FileTarget(file1),\n new FileTarget(file2));\n\n boolean isValid = ((expectedResult > 0) && (actualResult > 0)) ||\n ((expectedResult < 0) && (actualResult < 0)) ||\n ((expectedResult == 0) && (actualResult == 0));\n\n assertTrue(name1 + \" compared to \" + name2 +\n \" returned invalid result of \" + actualResult +\n \" (should have same sign as \" + expectedResult + \")\",\n isValid);\n }\n\n }", "public void testCompare4() throws Exception {\r\n // timelines shorter than or equal to the target\r\n ComponentCompetitionSituation situation1 = new ComponentCompetitionSituation();\r\n situation1.setPostingDate(new Date());\r\n situation1.setEndDate(new Date(situation1.getPostingDate().getTime() + 1000));\r\n\r\n // timelines longer than the target\r\n ComponentCompetitionSituation situation2 = new ComponentCompetitionSituation();\r\n situation2.setPostingDate(new Date());\r\n situation2.setEndDate(new Date(situation2.getPostingDate().getTime() + 100000));\r\n\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation1, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation2, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // timelines shorter than or equal to the target < timelines longer than the target\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "@Override\n\tpublic ComparisonResult computeDifference() throws Exception {\n\t\t\n\t\tList<Token> tokens1 = file1.getTokens();\n\t\tList<Token> tokens2 = file2.getTokens();\n\t\t\n\t\t\n\t\tif (tokens1.size() == 0 || tokens2.size() == 0)\n\t\t\treturn new ComparisonResult(null, 0);\n\t\t\n\t\tQGramToken qGram1 = (QGramToken) new QGramTokenContainer(tokens1, tokens1.size()).get(0);\n\t\tQGramToken qGram2 = (QGramToken) new QGramTokenContainer(tokens2, tokens2.size()).get(0);\n\t\t\n\t\t// peut être négatif si les deux fichiers ont un taux d'alignement des tokens supérieur au nombre total de token.\n\t\tdouble val = qGram1.needlemanWunschAlignment(qGram2, -1) / (double) Math.max(qGram1.size(), qGram2.size());\n\t\t\n\t\treturn new ComparisonResult((val > heuristicPlagiatThreshold) ? (Boolean)true : val <= 0 ? false : null, val < 0 ? 0 : val);\n\t}", "private int handleIncomparablePrimitives(Object x, Object y) {\n int xCost = getPrimitiveValueCost(x);\n int yCost = getPrimitiveValueCost(y);\n int res = Integer.compare(xCost, yCost);\n return ascending ? res : -res;\n }", "private static int preComparison(Object actualObject, Object compareObject) {\n\t\tint status = 0;\n\t\t//if primitive and not equal\n\t\tif ((status = compareIfPrimitive(actualObject, compareObject)) != 0) {\n\t\t\treturn status;\n\t\t}\n\t\t//if String\n\t\tif ((status = compareIfString(actualObject, compareObject)) != 0) {\n\t\t\treturn status;\n\t\t}\n\t\t//if list\n\t\tif ((status = compareIfList(actualObject, compareObject)) != 0) {\n\t\t\treturn status;\n\t\t}\n\t\t//if array\n\t\tif ((status = compareIfArray(actualObject, compareObject)) != 0) {\n\t\t\treturn status;\n\t\t}\n\t\t//if set\n\t\tif ((status = compareIfSet(actualObject, compareObject)) != 0) {\n\t\t\treturn status;\n\t\t}\n\t\t//if map\n\t\tif ((status = compareIfMap(actualObject, compareObject)) != 0) {\n\t\t\treturn status;\n\t\t}\n\n\t\treturn status;\n\t}", "@Test\r\n\tpublic void testCompareCase5() throws IOException {\r\n\t\tPerson p1 = DataUtil.readDataFromFile(\"test/data/case5/case5-person1.json\", Person.class);\r\n\t\tPerson p2 = DataUtil.readDataFromFile(\"test/data/case5/case5-person2.json\", Person.class);\r\n\r\n\t\t// Custom context\r\n\t\tIContext ctx = ObjectCompare.compare(p1, p2);\r\n\t\tdebug(ctx.getDifferences());\r\n\t\tAssert.assertTrue(ctx.hasDifferences());\r\n\t}", "@Test\r\n\tpublic void testCompareCase4() throws IOException {\r\n\t\tPerson p1 = DataUtil.readDataFromFile(\"test/data/case4/case4-person1.json\", Person.class);\r\n\t\tPerson p2 = DataUtil.readDataFromFile(\"test/data/case4/case4-person2.json\", Person.class);\r\n\r\n\t\t// Custom context\r\n\t\tIContext ctx = ObjectCompare.compare(p1, p2);\r\n\t\tdebug(ctx.getDifferences());\r\n\t\tAssert.assertTrue(ctx.hasDifferences());\r\n\t}", "public int compare(Object obj1, Object obj2){\n\t\t\n\t\tString s1 = obj1.toString(); // sudha\n\t\tString s2 = obj2.toString(); // rani\n\t\t\n\t\tif(s1.length()>s2.length()){\n\t\t\treturn 100;\n\t\t}else if(s1.length()<s2.length()){\n\t\t\treturn -10;\n\t\t} else{\n\t\t\treturn s1.compareTo(s2);\n\t\t}\n\t\t\n\t}", "public void testCompare5() throws Exception {\r\n // smaller prizes\r\n ComponentCompetitionSituation situation1 = new ComponentCompetitionSituation();\r\n situation1.setPostingDate(new Date());\r\n situation1.setEndDate(new Date(situation1.getPostingDate().getTime() + 100000));\r\n situation1.setPrize(100D);\r\n\r\n // longer prizes\r\n ComponentCompetitionSituation situation2 = new ComponentCompetitionSituation();\r\n situation2.setPostingDate(new Date());\r\n situation2.setEndDate(new Date(situation2.getPostingDate().getTime() + 100000));\r\n situation2.setPrize(200D);\r\n\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation1, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(1.0D,\r\n situation2, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // smaller prizes < longer prizes\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "@Test\n public void testCompare() {\n AantalGastenComparator instance = new AantalGastenComparator();\n int expResult;\n int result;\n \n //test 1\n Accommodatie a1 = new Accommodatie(\"je moeder\", 30.00, 2, 1);\n Accommodatie a2 = new Accommodatie(\"je vader\", 40.00, 3, 1);\n expResult = -1;\n result = instance.compare(a1, a2);\n assertEquals(expResult, result);\n \n \n //test 2\n Accommodatie a3 = new Accommodatie(\"je moeder2\", 30.00, 2, 1);\n Accommodatie a4 = new Accommodatie(\"je vader2\", 40.00, 2, 1);\n expResult = 0;\n result = instance.compare(a3, a4);\n assertEquals(expResult, result);\n \n \n //test 3\n Accommodatie a5 = new Accommodatie(\"je moeder3\", 30.00, 3, 1);\n Accommodatie a6 = new Accommodatie(\"je vader3\", 40.00, 2, 1);\n expResult = 1;\n result = instance.compare(a5, a6);\n assertEquals(expResult, result);\n }", "@Override\n\tpublic Scores compare(File f1, File f2) {\n\t\treturn new Scores(1.0, \"AlwaysTrueComparisonStrategy:1\");\n\t}", "@Test\r\n\tpublic void testCompareCase2() throws IOException {\r\n\t\tPerson p1 = DataUtil.readDataFromFile(\"test/data/case2/case2-person1.json\", Person.class);\r\n\t\tPerson p2 = DataUtil.readDataFromFile(\"test/data/case2/case2-person2.json\", Person.class);\r\n\r\n\t\t// Custom context\r\n\t\tString ageFieldName = FieldUtil.makeFieldName(Person.class, \"age\");\r\n\t\tIContext ctx = ObjectCompare.buildContext().register(FieldFeature.IGNORE_FIELD, ageFieldName);\r\n\t\tObjectCompare.compare(p1, p2, ctx);\r\n\t\tdebug(ctx.getDifferences());\r\n\t\tAssert.assertFalse(ctx.hasDifferences());\r\n\t}", "@Test\r\n\tpublic void testCompareEqualsCase0() throws IOException {\r\n\t\tPerson p1 = DataUtil.readDataFromFile(\"test/data/case0/case0-person.json\", Person.class);\r\n\t\tPerson p2 = DataUtil.readDataFromFile(\"test/data/case0/case0-person.json\", Person.class);\r\n\r\n\t\tIContext ctx = ObjectCompare.compare(p1, p2);\r\n\t\tdebug(ctx.getDifferences());\r\n\t\tAssert.assertFalse(ctx.hasDifferences());\r\n\t}", "public static int compare(Object obj1, Object obj2) throws UnsupportedException{\n\t\tint result = EQUAL;\n\t\tboolean isResultSet = false;\n\t\tif(obj1 == null && obj2!= null){\n\t\t\tif(obj2 instanceof String){\n\t\t\t\tobj1 = EMPTY;\n\t\t\t} else {\n\t\t\t\tisResultSet = true;\n\t\t\t\tresult = LESS;\n\t\t\t}\n\t\t} else if(obj1!=null && obj2== null){\n\t\t\tif(obj1 instanceof String){\n\t\t\t\tobj2 = EMPTY;\n\t\t\t} else {\n\t\t\t\tisResultSet = true;\n\t\t\t\tresult = GREATER;\n\t\t\t}\n\t\t}\n\t\tif(isResultSet){\n\t\t\treturn result;\n\t\t}\n\t\t\n\t\t//Check that 2 objects are the same class\n\t\tif(obj1.getClass() != obj2.getClass()){\n\t\t\tthrow new ClassCastException(\"Objects to compare are not the same class\");\n\t\t}\n\t\t\n\t\tif(obj1 instanceof String){\n\t\t\tresult = ((String)obj1).compareTo((String)obj2);\n\t\t} else if(obj1 instanceof DateUtil){\n\t\t\tthrow new UnsupportedException(\"Comparison method is not implemeted for this class\" + obj1.getClass().getName());\n\t\t}else if(obj1 instanceof BigDecimal){\n\t\t\tthrow new UnsupportedException(\"Comparison method is not implemeted for this class\" + obj1.getClass().getName());\n\t\t}else{\n\t\t\tthrow new UnsupportedException(\"Comparison method is not implemeted for this class\" + obj1.getClass().getName());\n\t\t}\n\t\treturn result;\n\t}", "public default Apple compare(Apple a1,Apple a2){\n\n if (a1.getSize()>a2.getSize()) {\n return a1;\n }else {\n return a2;\n }\n\n\n\n\n\n\n }", "@Override\n public int compare(final Triangle t1, final Triangle t2) {\n final Vec4 min1 = t1.getMin();\n final Vec4 min2 = t2.getMin();\n return Double.compare(min1.get(splitType), min2.get(splitType));\n }", "public compare(){\r\n }", "@Override\n\t\tpublic int compare(PathfindingNode object1, PathfindingNode object2) \n\t\t{\n\t\t\treturn _totalCosts.get(object1) - _totalCosts.get(object2);\n\t\t}", "@Override\n\t\tpublic String getValueDescription() {\n\t\t\treturn \"propertytoCheck=\" + expectpedValueOfPropertyToCheck + \"; propertytoChange=\"\n\t\t\t\t\t+ newValueOfPropertyToChange;\n\t\t}", "public int compareStringObjectsForLexRange(Object obj1, Object obj2) {\n\t\t /* This makes sure that we handle inf,inf and\n -inf,-inf ASAP. One special case less. */\n\t\tif (obj1 == obj2) {\n\t\t\treturn 0;\n\t\t}\n\t\t//if (obj1 == shared.minstring || obj2 == shared.maxstring) return -1;\n\t\t//if (obj1 == shared.maxstring || obj2 == shared.minstring) return 1;\n\t\treturn compareStringObjects(obj1, obj2);\n\t}", "@Override\n\tpublic double compare(Company c1P, Company c2P) {\n\t\tCompany c1 = c1P.getName() != null ? c1P : c2P; //c1 is full company\n\t\tCompany c2 = c1P.getName() == null ? c1P : c2P; //c2 is only location data\n\t\t\n\t\tString[] c1s = c1.getCountries().split(\";;\");\n\t\tString country2 = c2.getLocations().get(0).getCountry();\n\t\t\n\t\tdouble result = 0;\n\t\tfor (String country1 : c1s) {\n\t\t\tdouble calc = sim.calculate(country1, country2);\n\t\t\tif (result <= calc) result = calc;\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "private double estimateCategoricalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp,\n List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateCategoricalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "@Override\n\t\tpublic int compare(S o1, S o2) {\n\t\t\tif (getProb(o1) > getProb(o2))\n\t\t\t\treturn -1;\n\t\t\tif (getProb(o1) < getProb(o2))\n\t\t\t\treturn 1;\n\t\t\treturn Double.compare(o1.hashCode(), o2.hashCode());\n\t\t}", "private boolean isValuesEqual(BinaryMessage tocmp, BinaryMessage original) {\n\t\tif(tocmp.getValue().equals(original.getValue())) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public void testCompare3() throws Exception {\r\n ComponentCompetitionSituation situation = new ComponentCompetitionSituation();\r\n ComponentCompetitionPredictor predictor = new ComponentCompetitionPredictor();\r\n ComponentCompetitionFulfillmentPrediction prediction1 = new ComponentCompetitionFulfillmentPrediction(1.5D,\r\n situation, predictor);\r\n ComponentCompetitionFulfillmentPrediction prediction2 = new ComponentCompetitionFulfillmentPrediction(0.6D,\r\n situation, predictor);\r\n\r\n begin();\r\n\r\n for (int i = 0; i < TIMES; i++) {\r\n // predictions above the range < predictions below the range\r\n int result = comparator.compare(prediction1, prediction2);\r\n // result should be < 0\r\n assertTrue(\"result of compare\", result < 0);\r\n }\r\n\r\n print(\"ComponentCompetitionFulfillmentPredictionPrizeComparator#compare\");\r\n }", "@Test\r\n\tpublic void testCompareCase3() throws IOException {\r\n\t\tPerson p1 = DataUtil.readDataFromFile(\"test/data/case3/case3-person1.json\", Person.class);\r\n\t\tPerson p2 = DataUtil.readDataFromFile(\"test/data/case3/case3-person2.json\", Person.class);\r\n\r\n\t\t// Custom context\r\n\t\tIContext ctx = ObjectCompare.compare(p1, p2);\r\n\t\tdebug(ctx.getDifferences());\r\n\t\tAssert.assertFalse(ctx.hasDifferences());\r\n\t}", "public static int compare (RelayConfig config1, RelayConfig config2) {\n\n\t\t// Compare first by earliest timestamp, second by lower mode, third by higher configured primary\n\t\n\t\tint result = Long.compare (config1.mode_timestamp, config2.mode_timestamp);\n\t\tif (result == 0) {\n\t\t\tresult = Integer.compare (config1.relay_mode, config2.relay_mode);\n\t\t\tif (result == 0) {\n\t\t\t\tresult = Integer.compare (config2.configured_primary, config1.configured_primary);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "public int compareTo(PropertyGroup o2) {\n \tCollator collator = Collator.getInstance();\n if (o2 == null) {\n log.error(\"object NULL in DisplayComparator()\");\n return 0;\n }\n int diff = (this.getDisplayRank() - o2.getDisplayRank());\n if (diff == 0 ) {\n return collator.compare(this.getName(),o2.getName());\n }\n return diff;\n }", "@Test\r\n public void testCompareTo() {\r\n Articulo art = new Articulo();\r\n art.setCantidadVendidos(3);\r\n articuloPrueba.setCantidadVendidos(3);\r\n int expResult = 0;\r\n int result = art.compareTo(articuloPrueba);\r\n assertEquals(expResult, result);\r\n }", "static void compare()\n {\n \tif(a < c)\n\t\t {\n\t\t\t comp_one = 1; //store this value , else zero default \n\t\t }\n\t\t if(c < b)\n\t\t {\n\t\t\t comp_two = 2; //store this value , else zero default\n\t\t }\n\t\t if(b < a)\n\t\t {\n\t\t\t comp_thr = 5; //store this value , else zero default\n\t\t }\n\t\t \n\t\t comp_val = comp_one + comp_two + comp_thr; //create a unique value by addition\n }", "public boolean sortByName()\n\t{\n\t\tlistings = driver.findElements(By.xpath(listingsXpath));\n\t\tlistingsIterator = listings.iterator();\n\t\tpropertyNames = new ArrayList<String>();\n\t\tlistsEqual = false;\n\t\tWebElement propertyNameElement;\n\t\tString propertyName;\n\t\t\n\t\twhile(listingsIterator.hasNext())\n\t\t{\n\t\t\tlistingElement = listingsIterator.next();\n\t\t\tpropertyNameElement = listingElement.findElement(By.cssSelector(\"h2\"));\n\t\t\tpropertyName = propertyNameElement.getText();\n\t\t\tpropertyNames.add(propertyName);\n\t\t}\n\t\t\n\t\tsortedPropertyNames = propertyNames;\n\t\tCollections.sort(sortedPropertyNames);\n\t\t\n\t if(propertyNames.equals(sortedPropertyNames))\n\t {\n\t \tlistsEqual = true;\n\t }\n\t\t\n\t\treturn listsEqual;\n\t}", "int getComparisons();", "Object getPropertytrue();", "protected abstract int doCompare(Object o1, Object o2);", "public int compareTo(Object coffee1, Object coffee2){\r\n\r\n System.out.println(\"compareTo being called on \" + coffee1 + \" and \" + coffee2);\r\n\r\n if (coffee1.price - coffee2.price < 0){\r\n return -1;\r\n }\r\n else if (coffee1.price == coffee2.price){\r\n if (length(coffee1.company) < length(coffee2.company)){\r\n return -1\r\n }\r\n else if (coffee1.company == coffee2.company){\r\n if (length(coffee1.color)) < length(coffee2.color){\r\n return -1\r\n }\r\n else if (coffee1.color == coffee2.color){\r\n return 0\r\n }\r\n else{\r\n return 1\r\n }\r\n }\r\n else{\r\n return 1\r\n }\r\n }\r\n else{\r\n return 1;\r\n }\r\n}", "public Comparator<Integer> comparator() {\n return new Comparator<Integer>() {\n @Override\n public int compare(Integer o1, Integer o2) {\n Http2PriorityNode n1 = nodesByID.get(o1);\n Http2PriorityNode n2 = nodesByID.get(o2);\n if(n1 == null && n2 == null) {\n return 0;\n }\n if(n1 == null) {\n return -1;\n }\n if(n2 == null) {\n return 1;\n }\n //do the comparison\n //this is kinda crap, but I can't really think of any better way to handle this\n\n double d1 = createWeightingProportion(n1);\n double d2 = createWeightingProportion(n2);\n return Double.compare(d1, d2);\n }\n };\n }", "@Override\n\t public int compare(Player p1, Player p2) {\n\t boolean desc = sortField.startsWith(\"-\");\n\t String fieldToUse = desc ? sortField.substring(1): sortField; \n\n\t try {\n\t String field1 = BeanUtils.getProperty(p1, fieldToUse);\n\t String field2 = BeanUtils.getProperty(p2, fieldToUse);\n\t return (desc) ? field2.compareTo(field1) : field1.compareTo(field2);\n\t } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t// Again just for test purposes. Since we are in the service layer \n\t\t\t\t\t\t// and beyond the API. We will throw a Business Logic Exception.\n\t\t\t\t\t\tthrow new BusinessLogicException(e.getMessage(), \n\t\t\t\t\t\t\t\tBusinessErrorCodeEnum.INTERNAL_PROCESSING_ERROR);\n\t\t\t\t\t}\n\t\t\t\t}", "private double estimateNumericalPropertyProb(List<TemporalElementStats> relevantStats1, String property1,\n Comparator comp, List<TemporalElementStats> relevantStats2,\n String property2) {\n long count1 = relevantStats1.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long count2 = relevantStats2.stream()\n .map(TemporalElementStats::getElementCount)\n .reduce(0L, Long::sum);\n long totalCount = count1 * count2;\n\n double outerSum = 0.;\n for (TemporalElementStats s1 : relevantStats1) {\n double innerSum = 0.;\n for (TemporalElementStats s2 : relevantStats2) {\n double prob = estimateNumericalPropertyProb(s1, property1, comp, s2, property2);\n double weight = ((double) s1.getElementCount() * s2.getElementCount()) /\n totalCount;\n innerSum += prob * weight;\n }\n outerSum += innerSum;\n }\n return outerSum;\n }", "@Override\n\t\tpublic int compare(MapEntity o1, MapEntity o2) {\n\t\t\tfloat o1RenderY = o1.getCutOffY();\n\t\t\tfloat o2RenderY = o2.getCutOffY();\n\n\t\t\tfloat comparisonVal = o2RenderY - o1RenderY;\n\t\t\tif (comparisonVal < 0) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif (comparisonVal > 0) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\treturn 0;\n\t\t}", "@Override\n public int compare(Map.Entry<String, Integer> o1,\n Map.Entry<String, Integer> o2) {\n return o1.getValue()-o2.getValue();\n }", "@Override\n\t\t\tpublic int compare(ListNode o1, ListNode o2) {\n\t\t\t\treturn o1.val - o2.val;\n\t\t\t}", "private boolean readCompareResult()\t{\n\t\tFile resultFile = new File(this.dbDirectory + \"\\\\\"+ this.fileName.split(\".txt\")[0] + \"resultFile.txt\");\n\t\t\tif (resultFile.exists())\t{\n\t\t\t\tFileReader resultReader;\n\t\t\t\ttry {\n\t\t\t\t\tresultReader = new FileReader(this.dbDirectory + \"\\\\\"+ this.fileName.split(\".txt\")[0] + \"resultFile.txt\");\n\t\t\t\t\t// Save it to compareResult.\n\t\t\t\t\tthis.compareResult = resultReader.read();\n\t\t\t\t\tresultReader.close();\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t// Do nothing but get error code.\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t// Do nothing but get error code.\n\t\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "@Test\n public void testCompareTo_1() {\n LOGGER.info(\"testCompareTo_1\");\n final AtomString atomString1 = new AtomString();\n final AtomString atomString2 = new AtomString();\n final int actual = atomString1.compareTo(atomString2);\n final int expected = 0;\n assertEquals(expected, actual);\n }", "public int compare(Photograph a, Photograph b) {\n int returnVal = a.getCaption().compareTo(b.getCaption());\n if (returnVal != 0) {\n return returnVal;\n }\n returnVal = b.getRating() - a.getRating();\n return returnVal; \n }", "@Override\n public int compare(PublisherInfo lhs, PublisherInfo rhs) {\n if (lhs.lastName != rhs.lastName) {\n return lhs.lastName.compareToIgnoreCase(rhs.lastName);\n\n } else {\n if (lhs.firstName != rhs.firstName) {\n return lhs.firstName.compareToIgnoreCase(rhs.firstName);\n } else {\n return lhs.middleName.compareToIgnoreCase(rhs.middleName);\n }\n }\n\n }", "public int compare(Viewer view, Object e1, Object e2) {\n\t\t\t// Config and Build results are sorted in reverse order\n\t\t\tif (e1 instanceof BuildResultsElement) {\n\t\t\t\tResultsElement element = (ResultsElement) e2;\n\t\t\t\treturn element.compareTo(e1);\n\t\t\t}\n\t\t\tif (e1 instanceof ResultsElement) {\n\t\t\t\tResultsElement element = (ResultsElement) e1;\n\t\t\t\treturn element.compareTo(e2);\n\t\t\t}\n\t\t\treturn super.compare(view, e1, e2);\n\t\t}", "@Test\n public void compareFunctionalSmaller() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p2, p1);\n \n assertEquals(1, a);\n }", "@Test \n public void compareFunctionalEquals() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p1, p1);\n \n assertEquals(0, a);\n }", "public boolean Mayor(Object obj1, Object obj2){\n return (Double.parseDouble(obj1.toString()) > Double.parseDouble(obj2.toString()));\n }", "private boolean compare(ValueType first, ValueType second) {\r\n // TODO\r\n return false;\r\n }", "CommonProperties getProperties();", "@Override\r\n\tpublic int compare(TeamPO o1, TeamPO o2) {\n\t\tif(str.equals(\"total\")){ \r\n\t\t\treturn compareTeamData(o1.getTotalTeamData(season), o2.getTotalTeamData(season));\r\n\t\t}\r\n\t\t//Sort by average team data.\r\n\t\telse if(str.equals(\"avg\")) {\r\n\t\t\treturn compareTeamData(o1.getAverageTeamData(season), o2.getAverageTeamData(season));\r\n\t\t}\r\n\t\t//sort by the full name of the team\r\n\t\telse if(str.equals(\"name\")){\r\n\t\t\tString name1=o1.getFullName();\r\n\t\t\tString name2=o2.getFullName();\r\n\t\t\tif(name1.compareTo(name2)>0)\r\n\t\t\t\treturn 1;\r\n\t\t\telse if(name1.equals(name2))\r\n\t\t\t\treturn 0;\r\n\t\t\telse\r\n\t\t\t\treturn -1;\r\n\t\t}\r\n\t\t//Sort by number of matches\r\n\t\telse if(str.equals(\"matches\")){\r\n\t\t\tint matches1=o1.getSeasonInfo(season).getNumberOfMatches();\r\n\t\t\tint matches2=o2.getSeasonInfo(season).getNumberOfMatches();\r\n\t\t\tif(matches1>matches2)\r\n\t\t\t\treturn -1;\r\n\t\t\telse if(matches1==matches2)\r\n\t\t\t\treturn 0;\r\n\t\t\telse \r\n\t\t\t\treturn 1;\r\n\t\t}\r\n\t\t//Sort by percentage of winning\r\n\t\telse if(str.equals(\"perOfWin\")){ \r\n\t\t\tdouble win1=o1.getSeasonInfo(season).getPercentageOfWinning();\r\n\t\t\tdouble win2=o2.getSeasonInfo(season).getPercentageOfWinning();\r\n\t\t\tif(win1>win2)\r\n\t\t\t\treturn -1;\r\n\t\t\telse if(win1==win2)\r\n\t\t\t\treturn 0;\r\n\t\t\telse\r\n\t\t\t\treturn 1;\r\n\t\t}\r\n\t\t//Invalid\r\n\t\telse\r\n\t\t\treturn 0;\r\n\t}", "public int compare(Object obj1, Object obj2) {\n\t\treturn obj1.toString().compareTo(obj2.toString());\r\n\t}", "@Override\n public int compare(Query e1, Query e2) {\n if (e1.getFreq() < e2.getFreq() ||\n (e1.getFreq() == e2.getFreq() && e1.getText().compareTo(e2.getText()) > 0))\n return this.LESS;\n else if (e1.getFreq() > e2.getFreq() ||\n (e1.getFreq() == e2.getFreq() && e1.getText().compareTo(e2.getText()) < 0))\n return this.GREATER;\n return this.EQUAL;\n }", "@Test\n void getByPropertyEqualSuccess() {\n List<User> users = dao.findByPropertyEqual(\"firstName\", \"Mark\");\n assertEquals(1, users.size());\n assertEquals(2, users.get(0).getId());\n }", "@Test\n public void mainTests(){\n assertTrue(property1.getPropertyId() == id1);\n if(property1.getPropertyId() != id1) {\n property2.setPropertyId(id1);\n }\n else {\n assertTrue(property2.getPropertyId() == id2);\n }\n //Getter works Correct for ID\n }", "public static Map<String, Map<Object, Object>> getDiffirentComparisionVal(Device d1, Device d2) throws IllegalArgumentException, IllegalAccessException {\n\t\t\n\t\t//Node root = ObjectDifferBuilder.buildDefault().compare(d1, d2);\n\t\t\t\t\n\t\t//To get Device one property\n\t\tMap <Object, Object> device1Fields = getFields(d1);\n\t\t\n\t\t//To get Device one property\n\t\tMap <Object, Object> device2Fields = getFields(d2);\n\t\t\n\t\t//Map to get Device difference property value\n\t\tMap <Object, Object> DeviceResult1 = new HashMap<>();\n\t\tMap <Object, Object> DeviceResult2 = new HashMap<>();\n\t\t\n Map <String, Map<Object, Object>> deviceComparisonMap = new HashMap<>();\n\t\t device1Fields.forEach((k,v)->{\n\t\t \t \tif(null != v && !device2Fields.get(k).equals(v)){\n\t\t \t\t DeviceResult1.put(k, v);\n\t\t \t DeviceResult2.put(k, device2Fields.get(k));\n\t\t \t}\n\t\t });\n\t\t deviceComparisonMap.put(d1.getCmMacAddress(), DeviceResult1);\n\t\t deviceComparisonMap.put(d2.getCmMacAddress(), DeviceResult2);\n\t\treturn deviceComparisonMap;\n\t\t\n\t}", "public int compare(Dataset object1, Dataset object2){\n if(object1.getAttributeCount() != candidate.getAttributeCount() ||\n object2.getAttributeCount() != candidate.getAttributeCount()){\n return 0;\n }\n\n double dist1 = 0.0, dist2 = 0.0;\n double tmp1 = 0.0, tmp2 = 0.0;\n\n for(int i = 0; i < candidate.getAttributeCount(); i++){\n if(candidate.getOutputColumnCount() == (i+1)){\n continue;\n }\n\n Attribute ac = candidate.getAttribute(i);\n Attribute a1 = object1.getAttribute(i);\n Attribute a2 = object2.getAttribute(i);\n\n if(ac.getType() == AttributeTypes.TEXT){\n dist1 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a1.getValue());\n dist2 += DatasetEuklidianComparator.unlimitedCompare((String)ac.getValue(), (String)a2.getValue());\n }else{\n /*\n double acDouble = 0.0;\n double a1Double = 0.0;\n double a2Double = 0.0;\n switch(ac.getType()){\n case INTEGER: acDouble = (double)((Integer)ac.getValue()).intValue(); break;\n case DECIMAL: acDouble = (double)ac.getValue();\n }\n switch(a1.getType()){\n case INTEGER: a1Double = (double)((Integer)a1.getValue()).intValue(); break;\n case DECIMAL: a1Double = (double)a1.getValue();\n }\n switch(a2.getType()){\n case INTEGER: a2Double = (double)((Integer)a2.getValue()).intValue(); break;\n case DECIMAL: a2Double = (double)a2.getValue();\n }*/\n double acDouble = (double)ac.getValue();\n double a1Double = (double)a1.getValue();\n double a2Double = (double)a2.getValue();\n\n tmp1 += Math.pow(a1Double-acDouble, 2);\n tmp2 += Math.pow(a2Double-acDouble, 2);\n }\n }\n\n dist1 += Math.sqrt(tmp1);\n dist2 += Math.sqrt(tmp2);\n\n if (dist1 > dist2) {\n return 1;\n }\n if (dist1 < dist2) {\n return -1;\n }\n return 0;\n }", "private Comparison checkEquality(SimpleNode node1, SimpleNode node2) {\n // Compare the classes.\n Comparison comparison = compareClasses(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the values.\n comparison = compareValues(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the images.\n comparison = compareImages(node1, node2);\n if (!comparison.isEqual()) {\n return comparison;\n }\n\n // Compare the children.\n return compareChildren(node1, node2);\n }", "@Override\n public final JSONCompareResult compareJSON(final JSONObject expected, final JSONObject actual)\n throws JSONException\n {\n final JSONCompareResult result = createResult();\n compareJSON(\"\", expected, actual, result);\n return result;\n }", "@Override\n public int compare(final E obj1, final E obj2) {\n return comparator.compare(obj2, obj1);\n }", "private Expr comparison() {\n Expr expr = addition();\n\n while(match(GREATER, GREATER_EQUAL, LESS, LESS_EQUAL)) { // These variable length arguments are real convenient\n Token operator = previous();\n Expr right = addition();\n expr = new Expr.Binary(expr, operator, right);\n }\n\n return expr;\n }", "@Override\n\t\t\tpublic int compare(Object o1, Object o2) {\n\t\t\t\tint result = ((Student)o2).getAge() - ((Student)o1).getAge();\n\t\t\t\tif (result == 0 ) result = 1;\n\t\t\t\treturn result;\n\t\t\t}", "public int compareWith(GameResult other){\n\t\tif(score > other.getScore())\n\t\t\treturn 1;\n\t\telse if(score < other.getScore())\n\t\t\treturn -1;\n\t\telse if(level > other.getLevel())\n\t\t\treturn 1;\n\t\telse if(level < other.getLevel())\n\t\t\treturn -1;\n\t\telse if(duration > other.getDuration())\n\t\t\treturn 1;\n\t\telse if(duration < other.getDuration())\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn 0;\n\t}", "public static int compare(Object input1, Object input2) {\n\t\tif (input1.getClass().equals(Integer.class) && input2.getClass().equals(Integer.class)) {\n\t\t\treturn compareInt((Integer) input1, (Integer) input2);\n\n\t\t\t// if object is string\n\t\t} else if (input1.getClass().equals(String.class) && input2.getClass().equals(String.class)) {\n\t\t\treturn compareString((String) input1, (String) input2);\n\n\t\t\t// if object is date\n\t\t} else if (input1.getClass().equals(Date.class) && input2.getClass().equals(Date.class)) {\n\t\t\treturn compareDate((Date) input1, (Date) input2);\n\n\t\t\t// if object is big decimal\n\t\t} else if (input1.getClass().equals(BigDecimal.class) && input2.getClass().equals(BigDecimal.class)) {\n\t\t\treturn compareBigDecimal((BigDecimal) input1, (BigDecimal) input2);\n\t\t\t\n\t\t} else {\n\t\t\tSystem.err.println(\"no object match\");\n\t\t\treturn 0;\n\t\t}\n\n\t}", "private static int textCompare(final Resource r1, final Resource r2) throws IOException {\n try (BufferedReader in1 =\n new BufferedReader(new InputStreamReader(r1.getInputStream()));\n BufferedReader in2 = new BufferedReader(\n new InputStreamReader(r2.getInputStream()))) {\n\n String expected = in1.readLine();\n while (expected != null) {\n final String actual = in2.readLine();\n if (!expected.equals(actual)) {\n if (actual == null) {\n return 1;\n }\n return expected.compareTo(actual);\n }\n expected = in1.readLine();\n }\n return in2.readLine() == null ? 0 : -1; //NOSONAR\n }\n }", "@Override\n\tpublic int compare(final ProductConfigMessageData m1, final ProductConfigMessageData m2)\n\t{\n\t\tint returnValue = compareStandardMessagesConsideringSeverity(m1, m2);\n\t\tif (returnValue != -2)\n\t\t{\n\t\t\treturn returnValue;\n\t\t}\n\n\t\t// Handle discount messages considering promo-type\n\t\treturnValue = compareDiscountMessagesConsideringPromoType(m1, m2);\n\t\tif (returnValue != -2)\n\t\t{\n\t\t\treturn returnValue;\n\t\t}\n\n\t\t// Handle standard message vs. discount message\n\t\tif (m1.getPromoType() == null && m2.getPromoType() != null)\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t}", "String getEqual();" ]
[ "0.62968934", "0.5794415", "0.54571056", "0.5453145", "0.5433484", "0.5421319", "0.5376203", "0.5368611", "0.5368611", "0.53295326", "0.53195286", "0.53114283", "0.53114283", "0.5299662", "0.52950263", "0.5282043", "0.52732354", "0.52551544", "0.52544034", "0.5245023", "0.5234159", "0.52330506", "0.5230018", "0.52186275", "0.5175806", "0.51656276", "0.51509154", "0.5146178", "0.512901", "0.51149666", "0.5109873", "0.5106021", "0.50934577", "0.509151", "0.507809", "0.50751567", "0.50647736", "0.5056795", "0.50427866", "0.5013337", "0.5003892", "0.50028384", "0.5002544", "0.49822283", "0.4962858", "0.49627817", "0.49600816", "0.49509513", "0.494837", "0.49329793", "0.49313655", "0.4920219", "0.49088266", "0.49071598", "0.4906997", "0.49064884", "0.4903835", "0.490124", "0.48993757", "0.48983437", "0.48876846", "0.48870355", "0.48868155", "0.48823193", "0.48813424", "0.48730862", "0.4872088", "0.48523125", "0.48498762", "0.48467052", "0.48393887", "0.4836628", "0.48328942", "0.48286968", "0.48239082", "0.48160252", "0.48132658", "0.48125184", "0.4807888", "0.48008996", "0.47990963", "0.47988868", "0.47961837", "0.47941464", "0.47907656", "0.47868", "0.47831875", "0.47825792", "0.47801036", "0.47788864", "0.47783214", "0.47768208", "0.47760928", "0.47748843", "0.47673696", "0.47622806", "0.47502565", "0.4748762", "0.47474873", "0.47455823", "0.47391343" ]
0.0
-1
Return hash code for this object
@Override public int hashCode() { return Objects.hash(getServiceName(), getServiceURLMarker(), getServiceDescription(), getServiceWiki()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int hashcode();", "public int getHash() {\n return hash_;\n }", "public int getHash() {\n return hash_;\n }", "public int hashCode()\n {\n return hash;\n }", "public String getHashCode();", "public int hashCode() {\n int hash = 104473;\n if (token_ != null) {\n // Obtain unencrypted form as common base for comparison\n byte[] tkn = getToken();\n for (int i=0; i<tkn.length; i++)\n hash ^= (int)tkn[i];\n }\n hash ^= (type_ ^ 14401);\n hash ^= (timeoutInterval_ ^ 21327);\n hash ^= (isPrivate() ? 15501 : 12003);\n if (getPrincipal() != null)\n hash ^= getPrincipal().hashCode();\n if (getSystem() != null)\n hash ^= getSystem().getSystemName().hashCode();\n return hash;\n }", "public int hashCode();", "public int hashCode();", "public int hashCode();", "public int hashCode();", "public int hashCode() {\n return hash.hashCode();\n }", "public int getHashCode(){\n return hashCode();\n }", "@Override\n public int hashCode() {\n int hash = 7;\n hash = 29 * hash + Objects.hashCode(this.id);\n hash = 29 * hash + Objects.hashCode(this.name);\n return hash;\n }", "public int hashCode() {\n return Objects.hashCode(this);\n }", "int getHash();", "public int hashCode() {\n if (myhash == -1) {\n myhash = timestamp.hashCode() + signerCertPath.hashCode();\n }\n return myhash;\n }", "public int hashCode() {\n return (name.ordinal() + 5) * 51;\n }", "public int hashcode(){\r\n\t\t\r\n\t\treturn last_Name.hashcode();\r\n\t}", "public int hashCode() {\n\t\treturn BeanTools.createHashcode(id, consultContent, consultTime);\r\n\t}", "int hashCode();", "int hashCode();", "public int hashCode() {\n final int HASH_MULTIPLIER = 29;\n int h = HASH_MULTIPLIER * FName.hashCode() + LName.hashCode();\n h = HASH_MULTIPLIER * h + ((Integer)ID).hashCode();\n return h;\n }", "public abstract int getHash();", "public int hashCode() {\n if (hashCode != 0){\n return hashCode;\n }\n return hashCode = computeHash();\n }", "@Override\n public int hashCode() {\n if (hash == 0)\n hash = MD5.getHash(owner.getLogin() + description).hashCode();\n return hash;\n }", "@Override\n\tpublic int hashCode() {\n\t\t\n\t\treturn (int)id * name.hashCode() * email.hashCode();\n\t\t//int hash = new HashCodeBuilder(17,37).append(id).append(name); //can be added from Apache Commons Lang's HashCodeBuilder class\n\t}", "@Override\r\n\tpublic int hashCode() {\n\t\tint result = 17;\r\n\t\tresult = 37*result+(int) (id ^ (id>>>32));\r\n\t\t//result = 37*result+(name==null?0:name.hashCode());\r\n\t\t//result = 37*result+displayOrder;\r\n\t\t//result = 37*result+(this.url==null?0:url.hashCode());\r\n\t\treturn result;\r\n\t}", "public int hashCode() {\n\t\treturn toString().hashCode();\n\t}", "public int hashCode() {\n int hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + (userId != null ? userId.hashCode() : 0);\n hash = hash * UtilConstants.HASH_PRIME + (role != null ? role.hashCode() : 0);\n return hash;\n }", "public int hashCode() {\n // For speed, this hash code relies only on the hash codes of its select\n // and criteria clauses, not on the from, order by, or option clauses\n int myHash = 0;\n myHash = HashCodeUtil.hashCode(myHash, this.operation);\n myHash = HashCodeUtil.hashCode(myHash, getProjectedQuery());\n return myHash;\n }", "@Override\n public int hashCode()\n {\n return new HashCodeBuilder(17, 31).\n append(_name).\n toHashCode();\n }", "public int hashCode()\n {\n int hash = 7;\n hash = 83 * hash + (counter != null ? counter.hashCode() : 0);\n return hash;\n }", "public abstract int hashCode();", "public int hashCode()\r\n/* */ {\r\n/* 89 */ int hash = 3;\r\n/* 90 */ hash = 19 * hash + Objects.hashCode(this.id);\r\n/* 91 */ return hash;\r\n/* */ }", "public int hashCode() {\n\t\treturn hash(objects); //return the hash code of the objects\n\t}", "public int hashCode() {\n return _ordinal;\n }", "public int hashCode() {\n long hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getProjectName());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getDataProvider());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getPrimaryInvestigator());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getCreatedBy());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getCreatedTime());\n return (int)(hash % Integer.MAX_VALUE);\n }", "@Override\n public int hashCode() {\n return new HashCodeBuilder(17, 37)\n .append(getName())\n .append(getType())\n .toHashCode();\n }", "int\thashCode();", "public int hashCode() {\n return 37 * 17;\n }", "public int hashCode() {\n if (hash == -1) {\n hash = 0;\n byte b[] = packet.getData();\n int len = b.length;\n for (int ix = 0; ix < len; ix++) {\n\thash = 31 * hash + b[ix];\n }\n hash ^= (packet.getAddress().hashCode() ^\n\t (packet.getPort() << 15) ^\n\t (packet.getLength() << 3) ^\n\t (packet.getOffset() << 8));\n }\n return hash;\n }", "public int hashCode()\n {\n int hash = this.getClass().hashCode();\n\n hash = ( hash << 1 | hash >>> 31 ) ^ Arrays.hashCode(genome);\n\n return hash;\n }", "public String getHash()\n {\n return hash;\n }", "public int hashCode() {\r\n\t\treturn this.iD;\r\n\t}", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "@Override\r\n public int hashCode() {\r\n return this.number;\r\n }", "public int hashCode() {\n int result = 1;\n Object $pageSize = this.getPageSize();\n result = result * 59 + ($pageSize == null ? 43 : $pageSize.hashCode());\n Object $pageNo = this.getPageNo();\n result = result * 59 + ($pageNo == null ? 43 : $pageNo.hashCode());\n Object $sort = this.getSort();\n result = result * 59 + ($sort == null ? 43 : $sort.hashCode());\n Object $orderByField = this.getOrderByField();\n result = result * 59 + ($orderByField == null ? 43 : $orderByField.hashCode());\n return result;\n }", "public int hashCode() {\r\n\t\treturn this.value().hashCode();\r\n\t}", "public int hashCode() {\n\t\treturn new HashCodeBuilder().append(obox).append(wordOffsets).append(occlusions).toHashCode();\n\t}", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "@Override\n public int hashCode() {\n \n final int code = 24;\n int result = 1;\n result = code * result + ((id == null) ? 0 : id.hashCode());\n return result;\n }", "public String getHash() {\n return hash;\n }", "@Override\n public int hashCode() {\n int hash = 3;\n hash = 97 * hash + this.x;\n hash = 97 * hash + this.y;\n return hash;\n }", "public int hashCode(){\n int hash = HashCodeUtil.SEED;\n\n hash = HashCodeUtil.hash(hash,getEventTimeMillis());\n hash = HashCodeUtil.hash(hash,getEventId());\n hash = HashCodeUtil.hash(hash,getAuthenticationType());\n hash = HashCodeUtil.hash(hash,getServiceHost());\n hash = HashCodeUtil.hash(hash,getRequesterIp());\n hash = HashCodeUtil.hash(hash,getSessionId());\n hash = HashCodeUtil.hash(hash,getResourceHost());\n hash = HashCodeUtil.hash(hash,getPrincipalName());\n hash = HashCodeUtil.hash(hash,getEventType());\n hash = HashCodeUtil.hash(hash,getServiceId());\n hash = HashCodeUtil.hash(hash,getResourceId());\n\n\n return hash;\n\n }", "@Override // com.google.common.base.Equivalence\n public int doHash(Object o) {\n return System.identityHashCode(o);\n }", "@Override\n public int hashCode() {\n return System.identityHashCode(this);\n }", "public int hashCode() {\n return HashFunction.hashCode(new int[] { statusUuid.hashCode(), pathUuid.hashCode(), (int) time });\n }", "@Override\n public int hashCode() {\n return System.identityHashCode(this);\n }", "public int hashCode() {\n return getId();\n }", "@Override\n public int hashCode() {\n int hash = 7;\n hash = 71 * hash + this.id;\n hash = 71 * hash + Objects.hashCode(this.name);\n hash = 71 * hash + Objects.hashCode(this.cash);\n hash = 71 * hash + Objects.hashCode(this.skills);\n hash = 71 * hash + Objects.hashCode(this.potions);\n return hash;\n }", "public int hashCode() {\n return getId();\n }", "@Override // com.google.common.base.Equivalence\n public int doHash(Object o) {\n return o.hashCode();\n }", "int computeHashCode(byte val);", "public String getHash() {\n\t\treturn hash;\n\t}", "public int hashCode() {\r\n int result = 17;\r\n result = xCH(result, getTableDbName());\r\n result = xCH(result, getMemberAddressId());\r\n return result;\r\n }", "public synchronized int hashCode() {\n\t\treturn super.hashCode();\n\t}", "public int hashCode() {\n return c;\n }", "public int hashCode()\n {\n if (this.hashValue == 0)\n {\n int result = 17;\n int wsidValue = this.getWsid() == null ? 0 : this.getWsid().hashCode();\n result = result * 37 + wsidValue;\n this.hashValue = result;\n }\n return this.hashValue;\n }", "@Override\n public int hashCode() {\n // Declare hash and assign value\n int hash = 7;\n // Generate hash integer\n hash = 31 * hash + (int) this.getCrossingTime();\n hash = 31 * hash + (this.getName() == null ? 0 : this.getName().hashCode());\n return hash;\n }", "@Override\r\n public int hashCode() {\r\n int hash = 0;\r\n hash += (this.id != null ? this.id.hashCode() : 0);\r\n return hash;\r\n }", "public int hashCode() {\n\t\treturn this.eid + 25;\n\t}", "public int hashCode()\n\t{\n\t\treturn System.identityHashCode(userObject);\n\t}", "public int hashCode()\r\n {\r\n int hash = super.hashCode();\r\n hash ^= hashValue( m_name );\r\n hash ^= hashValue( m_classname );\r\n if( m_implicit )\r\n {\r\n hash ^= 35;\r\n }\r\n hash ^= hashValue( m_production );\r\n hash ^= hashArray( m_dependencies );\r\n hash ^= hashArray( m_inputs );\r\n hash ^= hashArray( m_validators );\r\n hash ^= hashValue( m_data );\r\n return hash;\r\n }", "@Override\n public int hashCode() {\n return Objects.hash(name, type, id);\n }", "public String identityHash() {\n return Integer.toHexString(System.identityHashCode(this));\n }", "public int hashCode() {\n long hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getProject());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getUser());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getStatus());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getLastActivityDate());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasPiSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasDpSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasAdminSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasRequestorSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getEmailStatus());\n return (int)(hash % Integer.MAX_VALUE);\n }", "public int hashCode()\n {\n int i = 0;\n if ( hasHashKey() )\n i ^= getHashKey().hashCode();\n return i;\n }", "@Override\n\t public int hashCode();", "public int hashCode() {\n try {\n int res = 0;\n byte[] array = getEncoded();\n for (int i=0; i<array.length; i++) {\n res += array[i] & 0xFF;\n }\n return res;\n } catch (CRLException e) {\n return 0;\n }\n }", "public int hashCode()\n {\n int i = 0;\n if ( hasCode() )\n i ^= getCode().hashCode();\n return i;\n }", "@Override\n public int hashCode() {\n return Objects.hash(this.getValue());\n }", "public String getHash() {\n\t\treturn _hash;\n\t}", "public int hashCode() {\n return name.hashCode();\n }", "public int hashCode(){\n\t\treturn toString().hashCode();\n\t}", "public int hashCode() {\n int hash = 0;\n hash = width;\n hash <<= 8;\n hash ^= height;\n hash <<= 8;\n hash ^= numBands;\n hash <<= 8;\n hash ^= dataType;\n hash <<= 8;\n for (int i = 0; i < bandOffsets.length; i++) {\n hash ^= bandOffsets[i];\n hash <<= 8;\n }\n for (int i = 0; i < bankIndices.length; i++) {\n hash ^= bankIndices[i];\n hash <<= 8;\n }\n hash ^= numBands;\n hash <<= 8;\n hash ^= numBanks;\n hash <<= 8;\n hash ^= scanlineStride;\n hash <<= 8;\n hash ^= pixelStride;\n return hash;\n }", "@Override\n public int hashCode() {\n int hash = 7;\n hash = 43 * hash + this.id;\n hash = 43 * hash + this.size;\n hash = 43 * hash + Objects.hashCode(this.orientation);\n hash = 43 * hash + Objects.hashCode(this.currentPosition);\n return hash;\n }", "public int hashCode() {\n int result;\n result = (this.time != null ? this.time.hashCode() : 0);\n result = 29 * result + (this.value != null ? this.value.hashCode() : 0);\n return result;\n }", "public int hashCode() {\n return new HashCodeBuilder(7, 29)\n .append(meaning)\n .append(type)\n .append(target)\n .toHashCode(); \n }", "public int hashCode() {\n\t\treturn hashString.hashCode();\n\t}", "public int hashCode() {\n\t\t// simple recipe for generating hashCode given by\n\t\t// Effective Java (Addison-Wesley, 2001)\n\t\tint result = 17;\n\t\tresult = 37 * result + methodName.hashCode();\n\t\treturn result;\n\t}", "@Override\n public int hashCode() {\n int hash = 0;\n hash += (id != null ? id.hashCode() : 0);\n return hash;\n }", "public int hashCode()\n {\n int code = 0;\n int i;\n int shift = 0;\n \n \t\tint byteLength = getLengthInBytes();\n for( i = 0; i < byteLength; i++)\n {\n code ^= (value[i] & 0xff)<<shift;\n shift += 8;\n if( 32 <= shift)\n shift = 0;\n }\n return code;\n }", "@Override\r\n\tpublic int hashCode() {\n\t\treturn this.id;\r\n\t}", "@Override\n public int hashCode() {\n int hash = 0;\n hash += (id != null ? id.hashCode() : 0);\n return hash;\n }", "@Override\n public int hashCode()\n {\n if ( h == 0 )\n {\n rehash();\n }\n\n return h;\n }", "public int hashCode() {\n return (int) position;\n }", "public int hashCode() {\n\t\treturn 14356 + historyIndex * 373 + dimension; \n\t\t// return some arbitrary number related to historyIndex and dimension\n\t}", "@Override\n public int hashCode() {\n return hashcode;\n }" ]
[ "0.8163053", "0.7876331", "0.78577626", "0.77790266", "0.7728009", "0.7707088", "0.76278096", "0.76278096", "0.76278096", "0.76278096", "0.7613506", "0.7613146", "0.75927037", "0.7591354", "0.7585797", "0.7537072", "0.7527028", "0.75175804", "0.75124013", "0.7509327", "0.7509327", "0.7492435", "0.7488034", "0.7468118", "0.74605465", "0.7421198", "0.737765", "0.73721045", "0.737189", "0.736678", "0.73604757", "0.7355284", "0.73474485", "0.7344861", "0.7339981", "0.7337539", "0.7334277", "0.732507", "0.73194057", "0.7301934", "0.73013824", "0.7295408", "0.72858226", "0.7282456", "0.72823626", "0.72823626", "0.72823626", "0.7279224", "0.72765046", "0.72747946", "0.7271873", "0.72642297", "0.72642297", "0.72599655", "0.7256404", "0.72505444", "0.7249287", "0.7241182", "0.7239623", "0.7239124", "0.72343147", "0.723343", "0.7230326", "0.7226209", "0.72205216", "0.72188985", "0.72131646", "0.7212298", "0.72112876", "0.7209472", "0.7208753", "0.7208657", "0.72069156", "0.72045296", "0.7200317", "0.71963793", "0.7193046", "0.71851814", "0.7184762", "0.7182811", "0.71810085", "0.71805686", "0.71805125", "0.71775633", "0.7177265", "0.71756095", "0.717301", "0.71720517", "0.71718866", "0.71641874", "0.7162817", "0.715248", "0.71524066", "0.7150071", "0.7148563", "0.71427643", "0.71410716", "0.71403694", "0.71366084", "0.71314573", "0.7129969" ]
0.0
-1
Returns maximum value in collection throws exception if empty
public static <E extends Comparable<E>> E max(Collection<E> c){ if(c.isEmpty()){ throw new IllegalArgumentException("Empty Collection"); } E result = null; for(E e : c){ if(result == null || e.compareTo(result) > 0){ result = Objects.requireNonNull(e); } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private <T extends Number> T computeMax(final Collection<T> inputCollection) {\n\r\n\t\tT res = null;\r\n\r\n\t\tif (!inputCollection.isEmpty())\r\n\t\t\tfor (final T t : inputCollection)\r\n\t\t\t\tif (res == null || res.longValue() < t.longValue())\r\n\t\t\t\t\tres = t;\r\n\r\n\t\treturn res;\r\n\t}", "public static java.lang.Object max(java.util.Collection arg0)\n { return null; }", "@Override\n public T findMax() throws EmptyCollectionException {\n if (count == 0) {\n throw new EmptyCollectionException(\"Heap\");\n }\n return heap[0];\n\n }", "E maxVal();", "public AnyType findMax() {\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new UnderflowException();\r\n\t\treturn findMax(root).element;\r\n\t}", "Object getMaximumValue(Object elementID) throws Exception;", "public T max() {return max(comparator);}", "public AnyType findMax( ) throws Exception\r\n\t{\r\n\t\tif( isEmpty( ) )\r\n\t\t\tthrow new Exception( );\r\n\t\treturn findMax( root ).element;\r\n\t}", "public static <E extends Comparable<E>> Optional<E> max3(Collection<E> c){\n return c.stream().max(Comparator.naturalOrder());\n }", "public double max() {\n/* 323 */ Preconditions.checkState((this.count != 0L));\n/* 324 */ return this.max;\n/* */ }", "@In Integer max();", "@In Integer max();", "public static long GetMax(Collection<Long> collection) {\n return Collections.max(collection);\n }", "public static <T extends Comparable<T>> T max(Collection<? extends T> values) {\r\n\t\treturn values.stream().filter(Objects::nonNull).max(Comparable::compareTo).orElse(null);\r\n\t}", "public E findMax(){\n if(!isEmpty()){\n AvlNode<E> node = findMax(root);\n return (E)node.value;\n } else {\n return null;\n }\n }", "public static <E extends Comparable<E>> Optional<E>\n max2(Collection<E> c){\n if(c.isEmpty()){\n return Optional.empty();\n }\n E result = null;\n for(E e : c){\n if(result == null || e.compareTo(result) > 0){\n result = Objects.requireNonNull(e);\n }\n }\n return Optional.of(result);\n }", "public AnyType findMax() {\n\t\treturn elementAt(findMax(root));\n\t}", "public E findMax() {\r\n\t\treturn heap.get(0);\r\n\t}", "public T max();", "public long max() {\n\t\tif (!this.isEmpty()) {\n\t\t\tlong result = theElements[0];\n\t\t\tfor (int i=1; i<numElements; i++) {\n\t\t\t\tif (theElements[i] > result) {\n\t\t\t\t\tresult = theElements[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\telse {\n\t\t\tthrow new RuntimeException(\"Attempted to find max of empty array\");\n\t\t}\n\t}", "Expression getMax();", "private double getMax() {\n return Collections.max(values.values());\n }", "@Override\r\n\tpublic T max() {\n\t\treturn null;\r\n\t}", "public static java.lang.Object max(java.util.Collection arg0, java.util.Comparator arg1)\n { return null; }", "public int findMax() {\n\t\tint max = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ( (int)data.get(count) > max)\n\t\t\t\tmax = (int)data.get(count);\n\t\treturn max;\n\t}", "public T getMax()\n\t{\n\t\tif(size == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\telse if(size == 1)\n\t\t{\n\t\t\treturn array[0];\n\t\t}\n\t\telse if(size == 2)\n\t\t{\n\t\t\treturn array[1];\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\tif(object.compare(array[1], array[2]) < 0)\n\t\t\t{\n\t\t\t\treturn array[2];\n\t\t\t}\n\t\t\telse if(object.compare(array[1], array[2]) > 0)\n\t\t\t{\n\t\t\t\treturn array[1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn array[1];\n\t\t\t}\n\n\t\t}\n\t}", "@Override\n public Integer max() {\n return findSpecialValue(Integer.MIN_VALUE, new MaxComparator());\n }", "public int GetMaxVal();", "@SafeVarargs\n\tpublic static <E extends Comparable<E>> E findMaximum(E ...items) {\n\t\tE maximum = items[0];\n\t\tfor (E iter : items) {\n\t\t\tif (maximum.compareTo(iter) < 0)\n\t\t\t\tmaximum = iter;\n\t\t}\n\t\tprintMax(maximum, items);\n\t\treturn maximum;\n\t}", "int getMax();", "public int getMaxIntValue();", "public abstract int getMaximumValue();", "public synchronized E max() \r\n {\r\n \tif (maxStack.isEmpty())\r\n \t{\r\n \t\tthrow new EmptyStackException();\r\n \t}\r\n \t\r\n return maxStack2.lastElement(); //Dummy return to satisfy compiler. Remove once coded.\r\n }", "int getMaximum();", "@Test\n public void test_max_Integer_Collection1() {\n populate_i1();\n int actual = Selector.max(i1, new CompareIntegerAscending());\n int expected = 8;\n Assert.assertEquals(\"Maximum not found\", expected, actual);\n }", "public int findMaxValue() {\n\t\treturn findMaxValue( this );\n\t}", "public float max(Collection<Float> data){\r\n return Collections.max(data);\r\n }", "public Object getMaxValue() {\n\t\treturn null;\n\t}", "Integer getMaximumResults();", "public static <T> T findMax(Collection<T> collection, Comparator<T> comparator) {\n return collection.stream().max(comparator).get();\n }", "@Override\n\tpublic T max() {\n\t\treturn val;\n\t}", "@Test\n public void test_max_Integer_Collection3() {\n populate_i3();\n int actual = Selector.max(i3, new CompareIntegerAscending());\n int expected = 8;\n Assert.assertEquals(\"Maximum not found\", expected, actual);\n }", "int max();", "public double max() {\n\t\tif (count() > 0) {\n\t\t\treturn _max.get();\n\t\t}\n\t\treturn 0.0;\n\t}", "Double getMaximumValue();", "public abstract T getMaxValue();", "@Override\n\tpublic T findMax(T[] ob) {\n\t\treturn null;\n\t}", "public static <E extends Comparable<? super E>> Optional<E> max(Set<? extends E> s1) {\r\n\t\tE res = null;\r\n\t\tfor(E val : s1) {\r\n\t\t\tif(res == null || val.compareTo(res) > 0) {\r\n\t\t\t\tres = val;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn Optional.ofNullable(res);\r\n\t}", "public Optional<DataModel> max(){\n return stream.max(Comparator.comparing(DataModel::getAge));\n }", "public int extractMaximum() {\n \n int max = maximum();\n\n if (max == -1) {\n assert(xft.size() == 0);\n return -1;\n }\n \n remove(max);\n \n return max;\n }", "public T findHighest(){\n T highest = array[0];\n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()>highest.doubleValue())\n {\n highest = array[i];\n } \n }\n return highest;\n }", "public E max() {\n\n }", "public Number getMaximum() {\n return ((ADocument) getDocument()).max;\n }", "ComparableExpression<T> max();", "@Override\n public Long findMAX() {\n\n StringBuffer sql = new StringBuffer(\"select max(magoithau) from goithau\");\n Query query = entityManager.createNativeQuery(sql.toString());\n return Long.parseLong(query.getSingleResult().toString()) ;\n }", "public double getMaximumValue() { return this.maximumValue; }", "public String max()\r\n\t {\r\n\t\t if(this.max != null)\r\n\t\t {\r\n\t\t\t return this.max.getValue(); \r\n\t\t }\r\n\t\t return null;\r\n\t }", "public int getMax()\n {\n return 0;\n }", "<T> Collection<T> getMostRecent(Class<T> t, int max);", "double getMax();", "double getMax();", "java.math.BigDecimal getMaximum();", "public K max() throws EmptyTreeException {\n\t\tTree<K, V> t = this;\n\t\treturn max(t, key);\n\t}", "public Number getMaximumNumber() {\n/* 221 */ if (this.maxObject == null) {\n/* 222 */ this.maxObject = new Long(this.max);\n/* */ }\n/* 224 */ return this.maxObject;\n/* */ }", "public T last() throws EmptyCollectionException;", "public Integer max() {\n return this.max;\n }", "private double getMaxNumber(ArrayList<Double> provinceValues)\n {\n Double max = 0.0;\n\n for (Double type : provinceValues)\n {\n if (type > max)\n {\n max = type;\n }\n }\n return max;\n }", "protected IExpressionValue max()throws TableFunctionMalformedException,\r\n\t\t\t\t\t\t\t\t\t\t InvalidProbabilityRangeException,\r\n\t\t\t\t\t\t\t\t\t\t SomeStateUndeclaredException{\r\n\t\t// Debug.println(\"ANALISING MAX FUNCTION\");\r\n\t\t\r\n\t\tIExpressionValue ret1 = null;\r\n\t\tIExpressionValue ret2 = null;\r\n\t\tmatch('(');\r\n\t\tret1 = this.expression();\r\n//\t\tmatch(';');\r\n\t\tif (look != ';' && look != ',') {\r\n\t\t\texpected(\";\");\r\n\t\t}\r\n\t\tnextChar();\r\n\t\tskipWhite();\r\n\t\tret2 = this.expression();\r\n\t\tmatch(')');\r\n\t\t/*\r\n\t\t// old code: tests which ret1/ret2 to return and test consistency. ComparisionProbabilityValue replaces it.\r\n\t\tif (!Float.isNaN(ret1)) {\r\n\t\t\tif (!Float.isNaN(ret2)) {\r\n\t\t\t\tret1 = ((ret2>ret1)?ret2:ret1);\r\n\t\t\t}\r\n\t\t} else if (!Float.isNaN(ret2)) {\r\n\t\t\treturn ret2;\r\n\t\t}\r\n\t\t*/\r\n\t\treturn new ComparisionProbabilityValue(ret1,ret2,true);\r\n\t\t\r\n\t}", "public Item max() {\n return heap[0];\n }", "int getMax( int max );", "private static final EvaluationAccessor max(EvaluationAccessor operand, EvaluationAccessor[] arguments) {\r\n EvaluationAccessor result = null;\r\n Value oVal = operand.getValue();\r\n if (oVal instanceof ContainerValue) {\r\n ContainerValue cont = (ContainerValue) oVal;\r\n IDatatype contType = ((Container) cont.getType()).getContainedType();\r\n int contSize = cont.getElementSize();\r\n \r\n if (contSize > 0) {\r\n Value rValue = null;\r\n \r\n // Determine max for number containers \r\n if (contType.isAssignableFrom(RealType.TYPE)) {\r\n // Handle max for Reals\r\n double max = (Double) cont.getElement(0).getValue();\r\n for (int i = 1; i < contSize; i++) {\r\n double tmp = (Double) cont.getElement(i).getValue();\r\n if (tmp > max) {\r\n max = tmp;\r\n }\r\n }\r\n \r\n try {\r\n rValue = ValueFactory.createValue(contType, max);\r\n } catch (ValueDoesNotMatchTypeException e) {\r\n EASyLoggerFactory.INSTANCE.getLogger(GenericNumberOperations.class, Bundle.ID)\r\n .debug(e.getMessage());\r\n }\r\n } else if (contType.isAssignableFrom(IntegerType.TYPE)) {\r\n // Handle max for Reals\r\n int max = (Integer) cont.getElement(0).getValue();\r\n for (int i = 1; i < contSize; i++) {\r\n int tmp = (Integer) cont.getElement(i).getValue();\r\n if (tmp > max) {\r\n max = tmp;\r\n }\r\n }\r\n \r\n // Create max value\r\n try {\r\n rValue = ValueFactory.createValue(contType, max);\r\n } catch (ValueDoesNotMatchTypeException e) {\r\n EASyLoggerFactory.INSTANCE.getLogger(GenericNumberOperations.class, Bundle.ID)\r\n .debug(e.getMessage());\r\n }\r\n }\r\n \r\n if (null != rValue) {\r\n result = ConstantAccessor.POOL.getInstance().bind(rValue, operand.getContext());\r\n }\r\n }\r\n }\r\n return result;\r\n }", "int maxNoteValue();", "private Double getMax(Double[] values) {\n Double ret = null;\n for (Double d: values) {\n if (d != null) ret = (ret == null) ? d : Math.max(d, ret);\n }\n return ret;\n }", "public double max(){\r\n\t\t//variable for max val\r\n\t\tdouble max = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the maximum is less than the current index, change max to that value\r\n\t\t\tif (max < this.data[i]){\r\n\t\t\t\tmax = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the maximum val\r\n\t\treturn max;\r\n\t}", "@Test\n public void test_kmax_Integer_Collection1() {\n populate_i1();\n int actual = Selector.kmax(i1, 1, new CompareIntegerAscending());\n int expected = 8;\n Assert.assertEquals(\"1st maximum not found\", expected, actual);\n }", "public int pollMax() {\n if (isEmpty()) throw new IllegalStateException(\"heap is empty\");\n int maxValue = a[0];\n a[0] = a[size - 1];\n size--;\n maxHeapify(0);\n return maxValue;\n }", "public int getMax(){ //find the max Score\n\t\tint max = Integer.MIN_VALUE;\n\t for(int i=0; i<scoreList.size(); i++){\n\t if(scoreList.get(i) > max){\n\t max = scoreList.get(i);\n\t }\n\t }\n\t return max;\n\t}", "@JsonIgnore\r\n public String getMax() {\r\n return OptionalNullable.getFrom(max);\r\n }", "public Long getMaximum() {\r\n\t\treturn maximum;\r\n\t}", "private static Key max(Key... ks) {\n\t\tif (ks == null || ks.length == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tKey max = ks[0];\n\t\tfor (int i = 1; i < ks.length; i++) {\n\t\t\tif (ks[i].compareTo(max) > 0) {\n\t\t\t\tmax = ks[i];\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}", "protected final Comparable getMax()\r\n {\r\n return myMax;\r\n }", "public String extractMax(){\n\t\tString maxValue = queueArray[1][1];\n\t\t\n\t\tremove();\n\t\tmove();\n\t\t\n\t\treturn maxValue;\n\t}", "public static <T> T max(Collection<T> c, Comparator<T> comp) {\n // Check input for null.\n if (c == null || comp == null) {\n throw new IllegalArgumentException();\n }\n // Check input for empty.\n if (c.isEmpty()) {\n throw new NoSuchElementException();\n }\n\n Iterator<T> itr = c.iterator();\n T max = itr.next();\n while (itr.hasNext()) {\n T hold = itr.next();\n if (comp.compare(hold, max) > 0) {\n max = hold;\n }\n }\n return max;\n }", "org.apache.xmlbeans.XmlDecimal xgetMaximum();", "public StringDt getMaxElement() { \n\t\tif (myMax == null) {\n\t\t\tmyMax = new StringDt();\n\t\t}\n\t\treturn myMax;\n\t}", "@Override\n public Score getBest() {\n Session session = FACTORY.openSession();\n\n try {\n List<Score> bestScores = session.createQuery(\"FROM Score s WHERE s.value = (SELECT max(s.value) FROM Score s)\", Score.class)\n .list();\n\n session.close();\n\n return bestScores.isEmpty() ? new Score(0L) : bestScores.get(0);\n } catch (ClassCastException e) {\n LOG.error(\"Error happened during casting query results.\");\n return null;\n }\n }", "public T max(Comparator<T> c) {\n if (isEmpty()) {\n return null;\n }\n\n T biggest = this.get(0);\n for (T item: this) {\n if (c.compare(item, biggest) > 0) {\n biggest = item;\n }\n }\n return biggest;\n }", "public String getMax() { \n\t\treturn getMaxElement().getValue();\n\t}", "public E calculateMaximum() {\n return FindMaximum.calculateMaximum(x , y , z);\n }", "public String findMax(String[] vals)\r\n\t{\r\n\t\treturn \"nothing yet\";\r\n\t}", "public Long getMaxValue() {\n return maxValue;\n }", "public int getMax()\n {\n int max = data.get(0).getX();\n\n for(int i = 0; i < data.size(); i++)\n {\n if (data.get(i).getX() > max)\n {\n max = data.get(i).getX();\n }\n }\n\n\n return max;\n }", "public int getMaximum() {\r\n return max;\r\n }", "long getMaxItemFindings();", "public int getMaxValue() {\n return maxValue;\n }", "public double getMaxValue() {\n\t\tdouble max = Double.NEGATIVE_INFINITY;\n\t\tfor (int i = 0; i < dataSheet.getDesignCount(); i++) {\n\t\t\tdouble value = dataSheet.getDesign(i).getDoubleValue(this);\n\t\t\tif (value > max)\n\t\t\t\tmax = value;\n\t\t}\n\t\treturn max;\n\t}", "public void testFindMax() {\r\n assertNull(tree.findMax());\r\n tree.insert(\"apple\");\r\n tree.insert(\"bagel\");\r\n assertEquals(\"bagel\", tree.findMax());\r\n tree.remove(\"bagel\");\r\n assertEquals(\"apple\", tree.findMax());\r\n }", "@Test\n public void test_max_Integer_Collection2() {\n populate_i2();\n int actual = Selector.max(i2, new CompareIntegerDescending());\n int expected = 1;\n Assert.assertEquals(\"Maximum not found in descending comparator\", expected, actual);\n }", "@Test\n public void test_max_String_Collection1() {\n populate_s1();\n String actual = Selector.max(s1, new CompareStringAscending());\n String expected = \"E\";\n Assert.assertEquals(\"Maximum not found\", expected, actual);\n }", "public Double getMaximum() {\n\t\treturn maximum;\n\t}" ]
[ "0.7703949", "0.7557073", "0.75331044", "0.745821", "0.7363825", "0.7259734", "0.71919864", "0.71748525", "0.713751", "0.7052984", "0.70525014", "0.70525014", "0.70216566", "0.70016235", "0.6938973", "0.6917808", "0.69062895", "0.69053495", "0.6904108", "0.689958", "0.68981725", "0.6886483", "0.6871953", "0.68630815", "0.67952156", "0.67807233", "0.67579377", "0.67451304", "0.6723087", "0.6637863", "0.66323805", "0.66156226", "0.6611931", "0.66051036", "0.659969", "0.65959847", "0.6590703", "0.6589166", "0.65862787", "0.6583795", "0.6562351", "0.65590173", "0.65329695", "0.6520676", "0.6493835", "0.6461274", "0.6452896", "0.6444781", "0.643992", "0.64156604", "0.64068717", "0.64014196", "0.6399913", "0.63722557", "0.6365396", "0.6361283", "0.63342094", "0.6332801", "0.63298744", "0.6324555", "0.6324555", "0.6320712", "0.63065195", "0.6305444", "0.62997085", "0.6284257", "0.6280511", "0.6277849", "0.6275092", "0.6274947", "0.6259967", "0.62428486", "0.62255645", "0.62139654", "0.6213735", "0.61926943", "0.6189766", "0.61835235", "0.61822623", "0.6163532", "0.61630774", "0.61581683", "0.61520946", "0.6148269", "0.6138869", "0.61387837", "0.61319315", "0.612873", "0.612304", "0.6117113", "0.610562", "0.6105382", "0.6093755", "0.60915047", "0.6090542", "0.60594547", "0.6054126", "0.6049327", "0.6048984", "0.60445446" ]
0.7612405
1
Returns maximum value in collection as an Optional
public static <E extends Comparable<E>> Optional<E> max2(Collection<E> c){ if(c.isEmpty()){ return Optional.empty(); } E result = null; for(E e : c){ if(result == null || e.compareTo(result) > 0){ result = Objects.requireNonNull(e); } } return Optional.of(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static java.lang.Object max(java.util.Collection arg0)\n { return null; }", "public static <E extends Comparable<E>> Optional<E> max3(Collection<E> c){\n return c.stream().max(Comparator.naturalOrder());\n }", "public Optional<DataModel> max(){\n return stream.max(Comparator.comparing(DataModel::getAge));\n }", "private <T extends Number> T computeMax(final Collection<T> inputCollection) {\n\r\n\t\tT res = null;\r\n\r\n\t\tif (!inputCollection.isEmpty())\r\n\t\t\tfor (final T t : inputCollection)\r\n\t\t\t\tif (res == null || res.longValue() < t.longValue())\r\n\t\t\t\t\tres = t;\r\n\r\n\t\treturn res;\r\n\t}", "public T max() {return max(comparator);}", "public static java.lang.Object max(java.util.Collection arg0, java.util.Comparator arg1)\n { return null; }", "public AnyType findMax() {\n\t\treturn elementAt(findMax(root));\n\t}", "public static <E extends Comparable<E>> E max(Collection<E> c){\n if(c.isEmpty()){\n throw new IllegalArgumentException(\"Empty Collection\");\n }\n E result = null;\n for(E e : c){\n if(result == null || e.compareTo(result) > 0){\n result = Objects.requireNonNull(e);\n }\n }\n return result;\n }", "public E findMax(){\n if(!isEmpty()){\n AvlNode<E> node = findMax(root);\n return (E)node.value;\n } else {\n return null;\n }\n }", "@In Integer max();", "@In Integer max();", "@Override\r\n\tpublic T max() {\n\t\treturn null;\r\n\t}", "public static long GetMax(Collection<Long> collection) {\n return Collections.max(collection);\n }", "public static <T extends Comparable<T>> T max(Collection<? extends T> values) {\r\n\t\treturn values.stream().filter(Objects::nonNull).max(Comparable::compareTo).orElse(null);\r\n\t}", "public AnyType findMax() {\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new UnderflowException();\r\n\t\treturn findMax(root).element;\r\n\t}", "E maxVal();", "public T getMax()\n\t{\n\t\tif(size == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\telse if(size == 1)\n\t\t{\n\t\t\treturn array[0];\n\t\t}\n\t\telse if(size == 2)\n\t\t{\n\t\t\treturn array[1];\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\tif(object.compare(array[1], array[2]) < 0)\n\t\t\t{\n\t\t\t\treturn array[2];\n\t\t\t}\n\t\t\telse if(object.compare(array[1], array[2]) > 0)\n\t\t\t{\n\t\t\t\treturn array[1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn array[1];\n\t\t\t}\n\n\t\t}\n\t}", "public T max();", "Expression getMax();", "public static <E extends Comparable<? super E>> Optional<E> max(Set<? extends E> s1) {\r\n\t\tE res = null;\r\n\t\tfor(E val : s1) {\r\n\t\t\tif(res == null || val.compareTo(res) > 0) {\r\n\t\t\t\tres = val;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn Optional.ofNullable(res);\r\n\t}", "@JsonIgnore\r\n public String getMax() {\r\n return OptionalNullable.getFrom(max);\r\n }", "private double getMax() {\n return Collections.max(values.values());\n }", "public double max() {\n/* 323 */ Preconditions.checkState((this.count != 0L));\n/* 324 */ return this.max;\n/* */ }", "public static <T> T findMax(Collection<T> collection, Comparator<T> comparator) {\n return collection.stream().max(comparator).get();\n }", "public Object getMaxValue() {\n\t\treturn null;\n\t}", "@JsonGetter(\"max\")\r\n @JsonInclude(JsonInclude.Include.NON_NULL)\r\n @JsonSerialize(using = OptionalNullable.Serializer.class)\r\n protected OptionalNullable<String> internalGetMax() {\r\n return this.max;\r\n }", "@Override\n\tpublic T findMax(T[] ob) {\n\t\treturn null;\n\t}", "public long max() {\n\t\tif (!this.isEmpty()) {\n\t\t\tlong result = theElements[0];\n\t\t\tfor (int i=1; i<numElements; i++) {\n\t\t\t\tif (theElements[i] > result) {\n\t\t\t\t\tresult = theElements[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\telse {\n\t\t\tthrow new RuntimeException(\"Attempted to find max of empty array\");\n\t\t}\n\t}", "@Override\n public T findMax() throws EmptyCollectionException {\n if (count == 0) {\n throw new EmptyCollectionException(\"Heap\");\n }\n return heap[0];\n\n }", "Object getMaximumValue(Object elementID) throws Exception;", "public E findMax() {\r\n\t\treturn heap.get(0);\r\n\t}", "@Override\n\tpublic T max() {\n\t\treturn val;\n\t}", "public String max()\r\n\t {\r\n\t\t if(this.max != null)\r\n\t\t {\r\n\t\t\t return this.max.getValue(); \r\n\t\t }\r\n\t\t return null;\r\n\t }", "@Override\n public Integer max() {\n return findSpecialValue(Integer.MIN_VALUE, new MaxComparator());\n }", "public AnyType findMax( ) throws Exception\r\n\t{\r\n\t\tif( isEmpty( ) )\r\n\t\t\tthrow new Exception( );\r\n\t\treturn findMax( root ).element;\r\n\t}", "public double max() {\n\t\tif (count() > 0) {\n\t\t\treturn _max.get();\n\t\t}\n\t\treturn 0.0;\n\t}", "public int findMax() {\n\t\tint max = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ( (int)data.get(count) > max)\n\t\t\t\tmax = (int)data.get(count);\n\t\treturn max;\n\t}", "public float max(Collection<Float> data){\r\n return Collections.max(data);\r\n }", "public Number getMaximum() {\n return ((ADocument) getDocument()).max;\n }", "public int GetMaxVal();", "public T max(Comparator<T> c) {\n if (isEmpty()) {\n return null;\n }\n\n T biggest = this.get(0);\n for (T item: this) {\n if (c.compare(item, biggest) > 0) {\n biggest = item;\n }\n }\n return biggest;\n }", "@Override\n public Long findMAX() {\n\n StringBuffer sql = new StringBuffer(\"select max(magoithau) from goithau\");\n Query query = entityManager.createNativeQuery(sql.toString());\n return Long.parseLong(query.getSingleResult().toString()) ;\n }", "int getMax();", "public int getMaxIntValue();", "public int extractMaximum() {\n \n int max = maximum();\n\n if (max == -1) {\n assert(xft.size() == 0);\n return -1;\n }\n \n remove(max);\n \n return max;\n }", "<T> Collection<T> getMostRecent(Class<T> t, int max);", "public Integer max() {\n return this.max;\n }", "int getMaximum();", "int max();", "java.math.BigDecimal getMaximum();", "int maxNoteValue();", "ComparableExpression<T> max();", "public int findMaxValue() {\n\t\treturn findMaxValue( this );\n\t}", "Double getMaximumValue();", "public T findHighest(){\n T highest = array[0];\n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()>highest.doubleValue())\n {\n highest = array[i];\n } \n }\n return highest;\n }", "public O getMaxCachedMax(AutoSortedList<O> other) {\n if (!this.maxCached || !other.maxCached)\n return null;\n return elementOrdering.max(cachedMax, other.cachedMax);\n }", "public Number getMaximumNumber() {\n/* 221 */ if (this.maxObject == null) {\n/* 222 */ this.maxObject = new Long(this.max);\n/* */ }\n/* 224 */ return this.maxObject;\n/* */ }", "public abstract int getMaximumValue();", "public double getMaximumValue() { return this.maximumValue; }", "public String extractMax(){\n\t\tString maxValue = queueArray[1][1];\n\t\t\n\t\tremove();\n\t\tmove();\n\t\t\n\t\treturn maxValue;\n\t}", "private static final EvaluationAccessor max(EvaluationAccessor operand, EvaluationAccessor[] arguments) {\r\n EvaluationAccessor result = null;\r\n Value oVal = operand.getValue();\r\n if (oVal instanceof ContainerValue) {\r\n ContainerValue cont = (ContainerValue) oVal;\r\n IDatatype contType = ((Container) cont.getType()).getContainedType();\r\n int contSize = cont.getElementSize();\r\n \r\n if (contSize > 0) {\r\n Value rValue = null;\r\n \r\n // Determine max for number containers \r\n if (contType.isAssignableFrom(RealType.TYPE)) {\r\n // Handle max for Reals\r\n double max = (Double) cont.getElement(0).getValue();\r\n for (int i = 1; i < contSize; i++) {\r\n double tmp = (Double) cont.getElement(i).getValue();\r\n if (tmp > max) {\r\n max = tmp;\r\n }\r\n }\r\n \r\n try {\r\n rValue = ValueFactory.createValue(contType, max);\r\n } catch (ValueDoesNotMatchTypeException e) {\r\n EASyLoggerFactory.INSTANCE.getLogger(GenericNumberOperations.class, Bundle.ID)\r\n .debug(e.getMessage());\r\n }\r\n } else if (contType.isAssignableFrom(IntegerType.TYPE)) {\r\n // Handle max for Reals\r\n int max = (Integer) cont.getElement(0).getValue();\r\n for (int i = 1; i < contSize; i++) {\r\n int tmp = (Integer) cont.getElement(i).getValue();\r\n if (tmp > max) {\r\n max = tmp;\r\n }\r\n }\r\n \r\n // Create max value\r\n try {\r\n rValue = ValueFactory.createValue(contType, max);\r\n } catch (ValueDoesNotMatchTypeException e) {\r\n EASyLoggerFactory.INSTANCE.getLogger(GenericNumberOperations.class, Bundle.ID)\r\n .debug(e.getMessage());\r\n }\r\n }\r\n \r\n if (null != rValue) {\r\n result = ConstantAccessor.POOL.getInstance().bind(rValue, operand.getContext());\r\n }\r\n }\r\n }\r\n return result;\r\n }", "double getMax();", "double getMax();", "public Quantity<Q> getMax() {\n return max;\n }", "@SafeVarargs\n\tpublic static <E extends Comparable<E>> E findMaximum(E ...items) {\n\t\tE maximum = items[0];\n\t\tfor (E iter : items) {\n\t\t\tif (maximum.compareTo(iter) < 0)\n\t\t\t\tmaximum = iter;\n\t\t}\n\t\tprintMax(maximum, items);\n\t\treturn maximum;\n\t}", "public Long getMaximum() {\r\n\t\treturn maximum;\r\n\t}", "private Double getMax(Double[] values) {\n Double ret = null;\n for (Double d: values) {\n if (d != null) ret = (ret == null) ? d : Math.max(d, ret);\n }\n return ret;\n }", "public abstract T getMaxValue();", "public int getMax()\n {\n return 0;\n }", "public static Optional<Student> getStudentWithHighestGpa() {\n\t\treturn StudentDb.getAllStudents().stream()\n\t\t\t\t.collect(maxBy(Comparator.comparing(Student::getGpa)));\n\t}", "@JSProperty(\"max\")\n double getMax();", "private double getMaxNumber(ArrayList<Double> provinceValues)\n {\n Double max = 0.0;\n\n for (Double type : provinceValues)\n {\n if (type > max)\n {\n max = type;\n }\n }\n return max;\n }", "@Override\n public Score getBest() {\n Session session = FACTORY.openSession();\n\n try {\n List<Score> bestScores = session.createQuery(\"FROM Score s WHERE s.value = (SELECT max(s.value) FROM Score s)\", Score.class)\n .list();\n\n session.close();\n\n return bestScores.isEmpty() ? new Score(0L) : bestScores.get(0);\n } catch (ClassCastException e) {\n LOG.error(\"Error happened during casting query results.\");\n return null;\n }\n }", "Integer getMaximumResults();", "public int getMax(){ //find the max Score\n\t\tint max = Integer.MIN_VALUE;\n\t for(int i=0; i<scoreList.size(); i++){\n\t if(scoreList.get(i) > max){\n\t max = scoreList.get(i);\n\t }\n\t }\n\t return max;\n\t}", "public String getMax() { \n\t\treturn getMaxElement().getValue();\n\t}", "int getMax( int max );", "public double getMaximum() {\n return (max);\n }", "public StringDt getMaxElement() { \n\t\tif (myMax == null) {\n\t\t\tmyMax = new StringDt();\n\t\t}\n\t\treturn myMax;\n\t}", "public OptionalDouble getBestScore()\n {\n if (scores.size() > 0)\n {\n return OptionalDouble.of(scores.lastKey());\n }\n else\n {\n return OptionalDouble.empty();\n }\n }", "protected final Comparable getMax()\r\n {\r\n return myMax;\r\n }", "public Item max() {\n return heap[0];\n }", "public synchronized E max() \r\n {\r\n \tif (maxStack.isEmpty())\r\n \t{\r\n \t\tthrow new EmptyStackException();\r\n \t}\r\n \t\r\n return maxStack2.lastElement(); //Dummy return to satisfy compiler. Remove once coded.\r\n }", "public int getMax() {\n\t\treturn getMax(0.0f);\n\t}", "@Test\n public void test_max_Integer_Collection3() {\n populate_i3();\n int actual = Selector.max(i3, new CompareIntegerAscending());\n int expected = 8;\n Assert.assertEquals(\"Maximum not found\", expected, actual);\n }", "public int getMaximum() {\r\n return max;\r\n }", "public Double getMaximum() {\n\t\treturn maximum;\n\t}", "public static <E> Optional<E> max(Set<? extends E> s1, Comparator<? super E> comparator) {\r\n\t\tE res = null;\r\n\t\tfor(E val : s1) {\r\n\t\t\tif(res == null || comparator.compare(val, res) > 0) {\r\n\t\t\t\tres = val;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Optional.ofNullable(res);\r\n\t}", "@Override\r\n\tpublic T maximum() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(this.root == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tBSTNode<T> node = maximum(this.root);\r\n\t\tif(node != null) {\r\n\t\t\treturn node.data;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "Double maxOfDisplacements(ArrayList<Double> dispA){\r\n\t\tObject minvalobj = Collections.min(dispA);\r\n\t\tObject maxvalobj = Collections.max(dispA);\r\n\t\tIJ.log(\"Max displacement\" + maxvalobj);\r\n\t\tIJ.log(\"Min displacement\" + minvalobj);\r\n\t\tdouble minval = (Double) minvalobj;\r\n\t\tdouble maxval = (Double) maxvalobj;\t\t\r\n\t\tdouble maxdisp = maxval;\r\n\t\tif (Math.abs(maxval) < Math.abs(minval)) \r\n\t\t\tmaxdisp = minval;\r\n\t\telse\r\n\t\t\tmaxdisp = maxval;\t\t\r\n\t\treturn maxdisp;\r\n\t}", "private static Key max(Key... ks) {\n\t\tif (ks == null || ks.length == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tKey max = ks[0];\n\t\tfor (int i = 1; i < ks.length; i++) {\n\t\t\tif (ks[i].compareTo(max) > 0) {\n\t\t\t\tmax = ks[i];\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}", "public E max() {\n\n }", "public Long getMaxValue() {\n return maxValue;\n }", "org.apache.xmlbeans.XmlDecimal xgetMaximum();", "@Test\n public void test_max_Integer_Collection1() {\n populate_i1();\n int actual = Selector.max(i1, new CompareIntegerAscending());\n int expected = 8;\n Assert.assertEquals(\"Maximum not found\", expected, actual);\n }", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "public int getMax() {\n return max;\n }", "public long getMaximum() {\n\t\treturn this._max;\n\t}", "public double max(){\r\n\t\t//variable for max val\r\n\t\tdouble max = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the maximum is less than the current index, change max to that value\r\n\t\t\tif (max < this.data[i]){\r\n\t\t\t\tmax = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the maximum val\r\n\t\treturn max;\r\n\t}" ]
[ "0.768925", "0.759556", "0.7422645", "0.742019", "0.7354657", "0.7157218", "0.71093935", "0.71075255", "0.70889527", "0.7088281", "0.7088281", "0.70641696", "0.70432264", "0.7034603", "0.7032812", "0.70212406", "0.6938156", "0.6911419", "0.69113964", "0.6870459", "0.6846687", "0.6804486", "0.6789922", "0.67543715", "0.66977525", "0.6696771", "0.66772175", "0.6671095", "0.66635567", "0.6650343", "0.66503084", "0.6609374", "0.657816", "0.65780514", "0.65723944", "0.65721", "0.65480524", "0.64833856", "0.6445588", "0.6426659", "0.6425771", "0.64229274", "0.64212006", "0.6387834", "0.63840693", "0.636069", "0.63521403", "0.63343567", "0.63260263", "0.63252103", "0.63160276", "0.6310311", "0.6309866", "0.63044757", "0.62949336", "0.62722176", "0.62661064", "0.62574583", "0.62544596", "0.62456745", "0.62448794", "0.62342936", "0.62342936", "0.62317747", "0.62214303", "0.62199974", "0.62133723", "0.62059236", "0.61943215", "0.61882734", "0.6141807", "0.61416256", "0.61346185", "0.6134411", "0.6129508", "0.6120552", "0.6118834", "0.6118118", "0.6106148", "0.6104971", "0.6086173", "0.60582775", "0.60547227", "0.60522145", "0.605062", "0.6048008", "0.6045152", "0.60428965", "0.60296816", "0.60261583", "0.60203093", "0.6017854", "0.601638", "0.60059226", "0.600279", "0.5967544", "0.5967544", "0.5967544", "0.5964371", "0.5962766" ]
0.74496835
2
Returns max val in collection as Optional uses stream
public static <E extends Comparable<E>> Optional<E> max3(Collection<E> c){ return c.stream().max(Comparator.naturalOrder()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <E extends Comparable<E>> Optional<E>\n max2(Collection<E> c){\n if(c.isEmpty()){\n return Optional.empty();\n }\n E result = null;\n for(E e : c){\n if(result == null || e.compareTo(result) > 0){\n result = Objects.requireNonNull(e);\n }\n }\n return Optional.of(result);\n }", "public Optional<DataModel> max(){\n return stream.max(Comparator.comparing(DataModel::getAge));\n }", "public static java.lang.Object max(java.util.Collection arg0)\n { return null; }", "public static java.lang.Object max(java.util.Collection arg0, java.util.Comparator arg1)\n { return null; }", "public static <T extends Comparable<T>> T max(Collection<? extends T> values) {\r\n\t\treturn values.stream().filter(Objects::nonNull).max(Comparable::compareTo).orElse(null);\r\n\t}", "@Test\n public void testStringList(){\n Stream<String> stringStream = Stream.of(\"Aasd\",\"ssd\",\"as\");\n Optional<String> max = stringStream\n .peek(System.out::println)\n .max(Comparator.comparing(name -> getCount(name)));\n System.out.println(max.get());\n }", "private <T extends Number> T computeMax(final Collection<T> inputCollection) {\n\r\n\t\tT res = null;\r\n\r\n\t\tif (!inputCollection.isEmpty())\r\n\t\t\tfor (final T t : inputCollection)\r\n\t\t\t\tif (res == null || res.longValue() < t.longValue())\r\n\t\t\t\t\tres = t;\r\n\r\n\t\treturn res;\r\n\t}", "public T max() {return max(comparator);}", "public static <E extends Comparable<? super E>> Optional<E> max(Set<? extends E> s1) {\r\n\t\tE res = null;\r\n\t\tfor(E val : s1) {\r\n\t\t\tif(res == null || val.compareTo(res) > 0) {\r\n\t\t\t\tres = val;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn Optional.ofNullable(res);\r\n\t}", "public static <E extends Comparable<E>> E max(Collection<E> c){\n if(c.isEmpty()){\n throw new IllegalArgumentException(\"Empty Collection\");\n }\n E result = null;\n for(E e : c){\n if(result == null || e.compareTo(result) > 0){\n result = Objects.requireNonNull(e);\n }\n }\n return result;\n }", "public static void maxWithSort(List<Integer> list){\n Optional<Integer> max = list.stream().sorted().reduce((x, y)->y);\n System.out.println(max);\n }", "public static long GetMax(Collection<Long> collection) {\n return Collections.max(collection);\n }", "@Override\n\tpublic T findMax(T[] ob) {\n\t\treturn null;\n\t}", "public static <T> T findMax(Collection<T> collection, Comparator<T> comparator) {\n return collection.stream().max(comparator).get();\n }", "@In Integer max();", "@In Integer max();", "@Override\r\n\tpublic T max() {\n\t\treturn null;\r\n\t}", "E maxVal();", "public AnyType findMax() {\n\t\treturn elementAt(findMax(root));\n\t}", "public AnyType findMax() {\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new UnderflowException();\r\n\t\treturn findMax(root).element;\r\n\t}", "<T> Collection<T> getMostRecent(Class<T> t, int max);", "public T max();", "@JsonIgnore\r\n public String getMax() {\r\n return OptionalNullable.getFrom(max);\r\n }", "Expression getMax();", "private static @Nullable Integer commonMax(List<ArgumentCount> counts) {\n // max=5, max=3, max=0 -> max=5\n // max=5, max=3, max=0, max=null -> max=null\n int commonMax = Integer.MIN_VALUE;\n for (ArgumentCount count : counts) {\n final Optional<Integer> max = count.getMaxCount();\n if (!max.isPresent()) {\n return null;\n }\n commonMax = Math.max(commonMax, max.get());\n }\n if (commonMax == Integer.MIN_VALUE) {\n return null;\n }\n return commonMax;\n }", "@JsonGetter(\"max\")\r\n @JsonInclude(JsonInclude.Include.NON_NULL)\r\n @JsonSerialize(using = OptionalNullable.Serializer.class)\r\n protected OptionalNullable<String> internalGetMax() {\r\n return this.max;\r\n }", "public E findMax(){\n if(!isEmpty()){\n AvlNode<E> node = findMax(root);\n return (E)node.value;\n } else {\n return null;\n }\n }", "public T max(Comparator<T> c) {\n if (isEmpty()) {\n return null;\n }\n\n T biggest = this.get(0);\n for (T item: this) {\n if (c.compare(item, biggest) > 0) {\n biggest = item;\n }\n }\n return biggest;\n }", "private double getMax() {\n return Collections.max(values.values());\n }", "public double max() {\n/* 323 */ Preconditions.checkState((this.count != 0L));\n/* 324 */ return this.max;\n/* */ }", "public static void maxEl2(List<Integer> list){\n int max = list.\n stream().\n reduce(Integer.MIN_VALUE,(x,y)->x>y ? x : y);\n System.out.println(max);\n }", "public T getMax()\n\t{\n\t\tif(size == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\telse if(size == 1)\n\t\t{\n\t\t\treturn array[0];\n\t\t}\n\t\telse if(size == 2)\n\t\t{\n\t\t\treturn array[1];\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\tif(object.compare(array[1], array[2]) < 0)\n\t\t\t{\n\t\t\t\treturn array[2];\n\t\t\t}\n\t\t\telse if(object.compare(array[1], array[2]) > 0)\n\t\t\t{\n\t\t\t\treturn array[1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn array[1];\n\t\t\t}\n\n\t\t}\n\t}", "@Override\n\tpublic T max() {\n\t\treturn val;\n\t}", "public static <E> Optional<E> max(Set<? extends E> s1, Comparator<? super E> comparator) {\r\n\t\tE res = null;\r\n\t\tfor(E val : s1) {\r\n\t\t\tif(res == null || comparator.compare(val, res) > 0) {\r\n\t\t\t\tres = val;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Optional.ofNullable(res);\r\n\t}", "private Double getMax(Double[] values) {\n Double ret = null;\n for (Double d: values) {\n if (d != null) ret = (ret == null) ? d : Math.max(d, ret);\n }\n return ret;\n }", "@Override\n public T findMax() throws EmptyCollectionException {\n if (count == 0) {\n throw new EmptyCollectionException(\"Heap\");\n }\n return heap[0];\n\n }", "@Override\n public Integer max() {\n return findSpecialValue(Integer.MIN_VALUE, new MaxComparator());\n }", "public int findMax() {\n\t\tint max = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ( (int)data.get(count) > max)\n\t\t\t\tmax = (int)data.get(count);\n\t\treturn max;\n\t}", "public long max() {\n\t\tif (!this.isEmpty()) {\n\t\t\tlong result = theElements[0];\n\t\t\tfor (int i=1; i<numElements; i++) {\n\t\t\t\tif (theElements[i] > result) {\n\t\t\t\t\tresult = theElements[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\telse {\n\t\t\tthrow new RuntimeException(\"Attempted to find max of empty array\");\n\t\t}\n\t}", "public float max(Collection<Float> data){\r\n return Collections.max(data);\r\n }", "private static Key max(Key... ks) {\n\t\tif (ks == null || ks.length == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tKey max = ks[0];\n\t\tfor (int i = 1; i < ks.length; i++) {\n\t\t\tif (ks[i].compareTo(max) > 0) {\n\t\t\t\tmax = ks[i];\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}", "private static Optional<Student> getHighestGPA(List<Student> studentList) {\n return studentList.stream()\n .reduce((student1, student2) -> {\n if (student1.getGpa() >= student2.getGpa()) return student1;\n else return student2;\n });\n }", "public static Optional<Student> getStudentWithHighestGpa() {\n\t\treturn StudentDb.getAllStudents().stream()\n\t\t\t\t.collect(maxBy(Comparator.comparing(Student::getGpa)));\n\t}", "Object getMaximumValue(Object elementID) throws Exception;", "@SafeVarargs\n\tpublic static <E extends Comparable<E>> E findMaximum(E ...items) {\n\t\tE maximum = items[0];\n\t\tfor (E iter : items) {\n\t\t\tif (maximum.compareTo(iter) < 0)\n\t\t\t\tmaximum = iter;\n\t\t}\n\t\tprintMax(maximum, items);\n\t\treturn maximum;\n\t}", "public Object getMaxValue() {\n\t\treturn null;\n\t}", "public double max() {\n\t\tif (count() > 0) {\n\t\t\treturn _max.get();\n\t\t}\n\t\treturn 0.0;\n\t}", "public static void main(String[] args) {\n\n\n List<Stock> listOfStock = Arrays.asList(new Stock(\"ICICI\", 10), new Stock(\"ICICI\", 30), new Stock(\"SBI\", 60), new Stock(\"SBI\", 30));\n\n ///Map<String, Integer> collect = listOfStock.stream().collect(Collectors.toMap(Stock::getName , stock -> stock.getValue(), Stock::getValue ));\n //System.out.println(collect);\n\n\n List<Integer> integerList = Arrays.asList(1, 2, 35, 32, 34);\n\n Integer integer = integerList.stream().filter(i -> i <\n integerList.stream().mapToInt(j -> j).max().getAsInt()).max(Comparator.naturalOrder()).get();\n System.out.println(integer);\n\n\n // Output : {ICICI=40, SBI=90}\n }", "public AnyType findMax( ) throws Exception\r\n\t{\r\n\t\tif( isEmpty( ) )\r\n\t\t\tthrow new Exception( );\r\n\t\treturn findMax( root ).element;\r\n\t}", "public static <T> T max(Collection<T> c, Comparator<T> comp) {\n // Check input for null.\n if (c == null || comp == null) {\n throw new IllegalArgumentException();\n }\n // Check input for empty.\n if (c.isEmpty()) {\n throw new NoSuchElementException();\n }\n\n Iterator<T> itr = c.iterator();\n T max = itr.next();\n while (itr.hasNext()) {\n T hold = itr.next();\n if (comp.compare(hold, max) > 0) {\n max = hold;\n }\n }\n return max;\n }", "private static final EvaluationAccessor max(EvaluationAccessor operand, EvaluationAccessor[] arguments) {\r\n EvaluationAccessor result = null;\r\n Value oVal = operand.getValue();\r\n if (oVal instanceof ContainerValue) {\r\n ContainerValue cont = (ContainerValue) oVal;\r\n IDatatype contType = ((Container) cont.getType()).getContainedType();\r\n int contSize = cont.getElementSize();\r\n \r\n if (contSize > 0) {\r\n Value rValue = null;\r\n \r\n // Determine max for number containers \r\n if (contType.isAssignableFrom(RealType.TYPE)) {\r\n // Handle max for Reals\r\n double max = (Double) cont.getElement(0).getValue();\r\n for (int i = 1; i < contSize; i++) {\r\n double tmp = (Double) cont.getElement(i).getValue();\r\n if (tmp > max) {\r\n max = tmp;\r\n }\r\n }\r\n \r\n try {\r\n rValue = ValueFactory.createValue(contType, max);\r\n } catch (ValueDoesNotMatchTypeException e) {\r\n EASyLoggerFactory.INSTANCE.getLogger(GenericNumberOperations.class, Bundle.ID)\r\n .debug(e.getMessage());\r\n }\r\n } else if (contType.isAssignableFrom(IntegerType.TYPE)) {\r\n // Handle max for Reals\r\n int max = (Integer) cont.getElement(0).getValue();\r\n for (int i = 1; i < contSize; i++) {\r\n int tmp = (Integer) cont.getElement(i).getValue();\r\n if (tmp > max) {\r\n max = tmp;\r\n }\r\n }\r\n \r\n // Create max value\r\n try {\r\n rValue = ValueFactory.createValue(contType, max);\r\n } catch (ValueDoesNotMatchTypeException e) {\r\n EASyLoggerFactory.INSTANCE.getLogger(GenericNumberOperations.class, Bundle.ID)\r\n .debug(e.getMessage());\r\n }\r\n }\r\n \r\n if (null != rValue) {\r\n result = ConstantAccessor.POOL.getInstance().bind(rValue, operand.getContext());\r\n }\r\n }\r\n }\r\n return result;\r\n }", "ComparableExpression<T> max();", "public String findMax(String[] vals)\r\n\t{\r\n\t\treturn \"nothing yet\";\r\n\t}", "public String max()\r\n\t {\r\n\t\t if(this.max != null)\r\n\t\t {\r\n\t\t\t return this.max.getValue(); \r\n\t\t }\r\n\t\t return null;\r\n\t }", "public O getMaxCachedMax(AutoSortedList<O> other) {\n if (!this.maxCached || !other.maxCached)\n return null;\n return elementOrdering.max(cachedMax, other.cachedMax);\n }", "public int GetMaxVal();", "public E findMax() {\r\n\t\treturn heap.get(0);\r\n\t}", "int max();", "@Test\n public void test_max_Integer_Collection3() {\n populate_i3();\n int actual = Selector.max(i3, new CompareIntegerAscending());\n int expected = 8;\n Assert.assertEquals(\"Maximum not found\", expected, actual);\n }", "@Test\n public void findLargest_passListIntegers_returnLargestInteger() {\n Integer output = Java8Streams.findLargest(Arrays.asList(1, 2, 3, 4, 5, 10, 50, 2, 3, 6, 7));\n\n assertThat(output).isEqualTo(50);\n }", "private double getMaxNumber(ArrayList<Double> provinceValues)\n {\n Double max = 0.0;\n\n for (Double type : provinceValues)\n {\n if (type > max)\n {\n max = type;\n }\n }\n return max;\n }", "int getMax();", "int maxNoteValue();", "public int extractMaximum() {\n \n int max = maximum();\n\n if (max == -1) {\n assert(xft.size() == 0);\n return -1;\n }\n \n remove(max);\n \n return max;\n }", "private int max(List<Integer> list) {\n int max = list.get(0);\n for (Integer item : list) {\n if (item > max) {\n max = item;\n }\n }\n return max;\n }", "@Nonnull\r\n\tpublic static <T extends Comparable<? super T>> Observable<T> max(\r\n\t\t\t@Nonnull final Observable<? extends T> source) {\r\n\t\treturn aggregate(source, Functions.<T>max(), Functions.<T, Integer>identityFirst());\r\n\t}", "@Test\n public void test_max_Integer_Collection1() {\n populate_i1();\n int actual = Selector.max(i1, new CompareIntegerAscending());\n int expected = 8;\n Assert.assertEquals(\"Maximum not found\", expected, actual);\n }", "private static int getMax(List<StudentRecord> records, IFieldValueGetter getter) {\n\t\tint max = 0;\n\t\tfor (StudentRecord record : records) {\n\t\t\tmax = Math.max(max, getter.get(record).length());\n\t\t}\n\t\treturn max;\n\t}", "Double maxOfDisplacements(ArrayList<Double> dispA){\r\n\t\tObject minvalobj = Collections.min(dispA);\r\n\t\tObject maxvalobj = Collections.max(dispA);\r\n\t\tIJ.log(\"Max displacement\" + maxvalobj);\r\n\t\tIJ.log(\"Min displacement\" + minvalobj);\r\n\t\tdouble minval = (Double) minvalobj;\r\n\t\tdouble maxval = (Double) maxvalobj;\t\t\r\n\t\tdouble maxdisp = maxval;\r\n\t\tif (Math.abs(maxval) < Math.abs(minval)) \r\n\t\t\tmaxdisp = minval;\r\n\t\telse\r\n\t\t\tmaxdisp = maxval;\t\t\r\n\t\treturn maxdisp;\r\n\t}", "int getMax( int max );", "public int findMaxValue() {\n\t\treturn findMaxValue( this );\n\t}", "public int getMaxIntValue();", "public abstract T getMaxValue();", "public Integer max() {\n return this.max;\n }", "Integer getMaximumResults();", "public int getMax(){ //find the max Score\n\t\tint max = Integer.MIN_VALUE;\n\t for(int i=0; i<scoreList.size(); i++){\n\t if(scoreList.get(i) > max){\n\t max = scoreList.get(i);\n\t }\n\t }\n\t return max;\n\t}", "public OptionalDouble getBestScore()\n {\n if (scores.size() > 0)\n {\n return OptionalDouble.of(scores.lastKey());\n }\n else\n {\n return OptionalDouble.empty();\n }\n }", "@Override\n public Long findMAX() {\n\n StringBuffer sql = new StringBuffer(\"select max(magoithau) from goithau\");\n Query query = entityManager.createNativeQuery(sql.toString());\n return Long.parseLong(query.getSingleResult().toString()) ;\n }", "public int findMaxValue(List<Integer> list) {\n int max = list.get(0);\n for (int i = 0; i < list.size(); i++) {\n if (list.get(i) > max) {\n max = list.get(i);\n }\n }\n return max;\n }", "public double getAchievedMarksMax(){\n return achievedMarks\n .stream()\n .mapToDouble(AchievedMark::getMark)\n .max()\n .orElse(0);\n }", "@SuppressWarnings(\"boxing\")\n public double max(final double alternative) {\n double value = reduce(new F2ReduceObjects<Number>() {\n @Override\n public Number f(Number left, Number right) {\n return Math.max(left.doubleValue(), right.doubleValue());\n }\n }).get(Double.valueOf(alternative)).doubleValue();\n\n return Double.isNaN(value) ? alternative : value;\n }", "public static void minWithSort(List<Integer> list){\n Optional<Integer> max = list.stream().sorted().reduce((x, y)->x);\n System.out.println(max);\n }", "double getMax();", "double getMax();", "int getMaximum();", "public String extractMax(){\n\t\tString maxValue = queueArray[1][1];\n\t\t\n\t\tremove();\n\t\tmove();\n\t\t\n\t\treturn maxValue;\n\t}", "public T findHighest(){\n T highest = array[0];\n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()>highest.doubleValue())\n {\n highest = array[i];\n } \n }\n return highest;\n }", "Double getMaximumValue();", "private StreamEvent findIfActualMax(AttributeDetails latestEvent) {\n int indexCurrentMax = valueStack.indexOf(currentMax);\n int postBound = valueStack.indexOf(latestEvent) - indexCurrentMax;\n // If latest event is at a distance greater than maxPostBound from max, max is not eligible to be sent as output\n if (postBound > maxPostBound) {\n currentMax.notEligibleForRealMax();\n return null;\n }\n // If maxPreBound is 0, no need to check preBoundChange. Send output with postBound value\n if (maxPreBound == 0) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMax);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"max\", 0, postBound });\n currentMax.sentOutputAsRealMax();\n return outputEvent;\n }\n int preBound = 1;\n double dThreshold = currentMax.getValue() - currentMax.getValue() * preBoundChange / 100;\n while (preBound <= maxPreBound && indexCurrentMax - preBound >= 0) {\n if (valueStack.get(indexCurrentMax - preBound).getValue() <= dThreshold) {\n StreamEvent outputEvent = eventStack.get(indexCurrentMax);\n complexEventPopulater.populateComplexEvent(outputEvent, new Object[] { \"max\", preBound, postBound });\n currentMax.sentOutputAsRealMax();\n return outputEvent;\n }\n ++preBound;\n }\n // Completed iterating through maxPreBound older events. No events which satisfy preBoundChange condition found.\n // Therefore max is not eligible to be sent as output.\n currentMax.notEligibleForRealMax();\n return null;\n }", "public final void max() {\n\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tif (secondTopMostValue > topMostValue) {\n\t\t\t\tpush(secondTopMostValue);\n\t\t\t} else {\n\t\t\t\tpush(topMostValue);\n\t\t\t}\n\t\t}\n\t}", "java.math.BigDecimal getMaximum();", "public Number getMaximumNumber() {\n/* 221 */ if (this.maxObject == null) {\n/* 222 */ this.maxObject = new Long(this.max);\n/* */ }\n/* 224 */ return this.maxObject;\n/* */ }", "public static Object max(Object[] object) {\n // Find max of array object\n Object maxOfA = object[0];\n for(int i = 1; i < object.length; i++) {\n if ((((Comparable) maxOfA).compareTo(object[i])) == -1) {\n maxOfA = object[i];\n }\n }\n\n // Return results.\n return maxOfA;\n }", "@Test\n public void test_max_Integer_Collection2() {\n populate_i2();\n int actual = Selector.max(i2, new CompareIntegerDescending());\n int expected = 1;\n Assert.assertEquals(\"Maximum not found in descending comparator\", expected, actual);\n }", "protected String getMaxValue(HashSet<String> set) {\n\t\tLong max = Long.MIN_VALUE;\n\t\tint count = 0;\n\n\t\tfor (String bound : set) \n\t\t\tif (bound.equals(\"+Inf\"))\n\t\t\t\treturn \"+Inf\";\n\t\t\telse if (bound.equals(\"-Inf\")) \n\t\t\t\tcount++;\n\t\t\telse if (Long.parseLong(bound) > max)\n\t\t\t\tmax = Long.parseLong(bound);\n\n\t\treturn count == 4 ? \"-Inf\" : String.valueOf(max);\n\t}", "public double getMaxValue(double defaultMax, Date start, Date end)\n\t{\n\t\tdouble max = Double.NEGATIVE_INFINITY;\n\t\tfor(TimedVariable tv : vars)\n\t\t{\n\t\t\tDate t = tv.getTime();\n\t\t\tif (start != null && start.compareTo(t) > 0)\n\t\t\t\tcontinue;\n\t\t\tif (end != null && end.compareTo(t) < 0)\n\t\t\t\tcontinue;\n\t\t\tint fl = tv.getFlags();\n\t\t\tif ((fl & IFlags.IS_MISSING) == 0)\n\t\t\t{\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tdouble d = tv.getDoubleValue();\n\t\t\t\t\tif (d > max)\n\t\t\t\t\t\tmax = d;\n\t\t\t\t}\n\t\t\t\tcatch(NoConversionException ex) {}\n\t\t\t}\n\t\t}\n\t\treturn max == Double.NEGATIVE_INFINITY ? defaultMax : max;\n\t}", "public abstract int getMaximumValue();", "public static Measurable largest (Measurable[] objects)\n {\n if (objects.length == 0)\n {\n return null;\n }\n\n Measurable largest = objects[0];\n\n for (Measurable current : objects) {\n if (current.getMeasure() > largest.getMeasure()) {\n largest = current;\n }\n }\n\n return largest;\n }", "public double getMaximumValue() { return this.maximumValue; }", "public Number getMaximum() {\n return ((ADocument) getDocument()).max;\n }" ]
[ "0.726467", "0.7246807", "0.7115731", "0.68022805", "0.678209", "0.67204046", "0.6661738", "0.66408455", "0.65891176", "0.64786714", "0.64748603", "0.6403785", "0.6305608", "0.62985474", "0.6276365", "0.6276365", "0.6158821", "0.6157672", "0.6138725", "0.61203337", "0.6095823", "0.60872906", "0.60830444", "0.6054809", "0.60515445", "0.6043888", "0.6031037", "0.6014887", "0.5994139", "0.59912205", "0.5983472", "0.5964513", "0.5879668", "0.5860891", "0.5815746", "0.5811012", "0.5784695", "0.5769252", "0.5768092", "0.5763891", "0.5759031", "0.5749351", "0.5725309", "0.57000923", "0.5694775", "0.5689935", "0.5681792", "0.5675572", "0.56144446", "0.560548", "0.55891603", "0.5584509", "0.55718946", "0.5549197", "0.5537431", "0.5528648", "0.55198175", "0.5507051", "0.55054533", "0.550299", "0.5486727", "0.54580015", "0.54280424", "0.54256386", "0.5419249", "0.5404941", "0.53984946", "0.535304", "0.53326494", "0.5329428", "0.53060126", "0.5295309", "0.5293487", "0.528593", "0.5277319", "0.5275957", "0.5272093", "0.52664983", "0.5266147", "0.5265775", "0.52643484", "0.5256943", "0.5253905", "0.5253905", "0.52529925", "0.5250576", "0.5247331", "0.5246358", "0.524417", "0.52438444", "0.52395296", "0.5228473", "0.5220379", "0.5216077", "0.5197446", "0.51901037", "0.51891696", "0.5187486", "0.5180292", "0.5177051" ]
0.7360722
0
Creates a new instance of MovementDAO
public MovementDAO() { this(CoreDAO.DRIVER_NAME, CoreDAO.URL, CoreDAO.USER, CoreDAO.PASSWORD); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PisoDAO createPisoDAO() {\n\n if (pisoDAO == null) {\n pisoDAO = new PisoDAO();\n }\n return pisoDAO;\n }", "@Override\n\tpublic StudentDao createDao() {\n\t\treturn new SqliteStudentDaoImpl();\n\t}", "public OnibusDAO() {}", "public PacienteDAO(){ \n }", "public AutorDao criarAutorDao(){\n\t\treturn new AutorDaoImpl();\n\t}", "private PurchaseDAO(){\n }", "public DepartmentsDAO() {\r\n\t\tconn = DBConnector.getConnection();\r\n\t}", "public ModeOfPurchaseDAOImpl() {\r\n\r\n }", "public static synchronized Dao getDao() {\r\n if (dao == null) {\r\n dao = new Dao();\r\n }\r\n return dao;\r\n }", "private OrderFacade(){\n\t\tAbstractDAOFactory f = new MySQLDAOFactory();\n \tthis.odao = f.getOrderDAO();\n\t}", "public static IDAO DAO()\n {\n Log.d(TAG, \"DAO: Attempting get instance. Instance: \" + (DAO != null));\n if (DAO == null)\n {\n DAO = new DAOFactory().getDAO();\n Log.d(TAG, \"DAO: New DAO instance.\");\n }\n Log.d(TAG, \"DAO: Returning instance.\");\n return DAO;\n }", "public synchronized RoomDAO getRoomDAO() {\n\t\treturn new RoomDAO(this);\n\t}", "public ProductDAO() {\n }", "public EtiquetaDao() {\n //subiendola en modo Embedded\n this.sql2o = new Sql2o(\"jdbc:h2:~/demojdbc\", \"sa\", \"\");\n createTable();\n //cargaDemo();\n }", "public MovementDAO(String drivername,\n\t\t\t\t\t\tString url,\n\t\t\t\t\t\tString user,\n\t\t\t\t\t\tString password)\t{\n\t\tsuper(drivername, url, user, password);\n\t}", "public static TwitterDAOInterface CreateObject() {\n\t\treturn new TwitterDAO();\r\n\t}", "public MenuDAO() {\n\t\t\n\t\tconnection = ConnectDatabase.connectDatabase();\n\t\t\n\t}", "public AdminDAO()\n {\n con = DataBase.getConnection();//crear una conexión al crear un objeto AdminDAO\n }", "public empresaDAO(){\r\n \r\n }", "public static guitarDao createguitarDao() {\n\t\tguitarDao result = null;\n\t\ttry {\n\t\t\tObject o = Class.forName(daoName + \".\" + \"guitarImpl\").newInstance();\n\t\t\tresult = (guitarDao)o;\n\t\t} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "public RouteDAO() {\n\t\tconn = DBConnection.getConnection();\n\t}", "public Dao<Place, Integer> getPlaceDAO() throws java.sql.SQLException {\n if(placeDAO == null) placeDAO = getDao(Place.class);\n return placeDAO;\n }", "public static FlightDAOImp getFlightDAO(){\n if(flightDataObject == null){\n flightDataObject = new FlightDAOImp();\n }\n return flightDataObject;\n }", "public DaoFactory()\n\t{\n\n\t}", "public DepartmentsDaoImpl() {\n\t\tsuper();\n\t}", "@Override\n\tpublic DAOProducto crearDAOProductoAlmacen() {\n\t\treturn new DAOProducto();\n\t}", "public DescritoresDAO() {\n\t\t\n\t}", "D getDao();", "public RentMovementDAO getRentMovementDAO() {\n\t\treturn this.rentMovementDAO;\n\t}", "public static ShoppingCartDAO createShoppingcartDAO() {\n\t\treturn null;\r\n\t}", "private SummonerSpellsDao() {\n\t\tconnectionManager = new ConnectionManager();\n\t}", "public static LessonDAO getLessonDAO() {\n return new LessonDAO(entityManager, Lesson.class);\n }", "public AlManageOnAirDAOImpl() {\r\n super();\r\n }", "public ProtocoloDAO() {\n }", "@Override\n public OrdersDAO getOrdersDAO() {\n\n if (instanceOrdersDAO == null) {\n return new MySQLOrdersDAO(connection);\n } else {\n return instanceOrdersDAO;\n }\n }", "public MultaDAO() {\r\n super(MultaDAO.class);\r\n }", "public UserDAO() {\n }", "public static synchronized DAO getInstance(){\n\t if (instance == null)\n\t instance = new DAOImpl();\n\t return instance; \n\t }", "public TermDAOImpl(){\n connexion= new Connexion();\n }", "public synchronized OrderDAO getOrderDAO() {\n\t\treturn new OrderDAO(this);\n\t}", "public PlayerDAO(){\n\t\tplayerList = new ArrayList<Player>();\n\t}", "public static UserDAO getDAO() throws UserDAOSysException\r\n {\r\n UserDAO dao = null;\r\n try\r\n {\r\n dao = new UserDAOImpl();\r\n }\r\n catch (Exception se)\r\n {\r\n throw new UserDAOSysException(\"UserDAOFactory.getDAO: Exception while getting DAO type : \\n\" + se.getMessage());\r\n }\r\n\r\n return dao;\r\n }", "public GastoDAO(Context context){\n dbHelper = new MyDatabaseHelper(context);\n database = dbHelper.getWritableDatabase();\n }", "private static AnnualLeaseDAO getDAO() throws DAOSysException {\n\t\tif (dao == null)\t{\n\t\t\tdao = (AnnualLeaseDAO) DAOFactory.getDAO(\"marina.AnnualLease\");\n\t\t}\n\n\t\treturn dao;\n\t}", "@Override\n\tpublic BaseDAO getBaseDao() {\n\t\treturn spaceDao;\n\t}", "public AdministratorDAO() {\n super();\n DAOClassType = Administrator.class;\n }", "public static DDBUserPointDAO getInstance() {\r\n\t\tif (instance == null) {\r\n\t\t\tconfig = new GeoDataManagerConfiguration(client, DynamoDBConfiguration.USER_POINT_TABLE_NAME);\r\n\t\t\tgeoDataManager = new GeoDataManager(config);\r\n\t\t\t\r\n\t\t\tmapper = new ObjectMapper();\r\n\t\t\tfactory = mapper.getJsonFactory();\r\n\t\t\tinstance = new DDBUserPointDAO();\r\n\t\t}\r\n\r\n\t\treturn instance;\r\n\t}", "private DaoManager() {\n }", "public ReservaCuartoDAO createReservaCuartoDAO() {\n\t\treturn new ReservaCuartoDAOSQL();\n\t}", "@Override\n\tpublic void dbInsert(MovementModel model)\tthrows DAOSysException {\n\t\tdbInsert(model, MovementDAO.INSERT_STM);\n\t}", "public MySqlDaoFactory() {\n creators = new HashMap<>();\n creators.put(Bank.class, new DaoCreator<Connection>() {\n @Override\n public GenericDAO create(Connection connection) {\n return new MySqlBankDao(connection);\n }\n });\n\n creators.put(Deposit.class, new DaoCreator<Connection>() {\n @Override\n public GenericDAO create(Connection connection) {\n return new MySqlDepositDao(connection);\n }\n });\n\n }", "public UserDAO()\n {\n \n }", "public interface DAOFactory {\n\n BalanceDAO createBalanceDAO();\n}", "public DBMonster() {\n\n }", "public interface OrderDao {\n\n void createOrder(Order order);\n\n}", "public TelefoneDao() {\n\t\tconnection = SingleConnection.getConnection();\n\t}", "public static ChoiceDAO getDAO() throws ChoiceDAOSysException\r\n {\r\n ChoiceDAO dao = null;\r\n\r\n try\r\n {\r\n dao = new ChoiceDAOImpl();\r\n }\r\n catch (Exception se)\r\n {\r\n throw new ChoiceDAOSysException(\r\n \"ChoiceDAOFactory.getDAO: Exception while getting DAO type : \\n\" +\r\n se.getMessage());\r\n }\r\n\r\n return dao;\r\n }", "public static HibernateToListDAO getInstance()\r\n\t{\r\n\t\tif(_instanceDAO == null) {\r\n\t\t\t_instanceDAO = new HibernateToListDAO();\r\n\t }\r\n\t\treturn _instanceDAO;\r\n\t}", "public abstract ToDoDao toDoDao();", "public RouteDao() {\n super(Route.ROUTE, com.dator.jqtest.dao.model.tables.pojos.Route.class);\n }", "@Override\r\n\tpublic DAOInterface getDAO() {\n\t\treturn new TimeSeriesDAO(context);\r\n\t}", "public ISegOpcionDAO getSegOpcionDAO() {\r\n return new SegOpcionDAO();\r\n }", "public ISegUsuarioDAO getSegUsuarioDAO() {\r\n return new SegUsuarioDAO();\r\n }", "public ProfesorDAOImpl() {\n super();\n }", "public RideDao() {\n super(Ride.RIDE, models.garaDB.tables.pojos.Ride.class);\n }", "public NationalityDAO() {\n //sessionFactory = HibernateUtil.getSessionFactory();\n session=HibernateUtil.openSession();\n }", "public StateDAOImpl() {\n super();\n }", "public AddressDaoImpl()\n {\n \t//Initialise the related Object stores\n \n }", "public ISegPermisoDAO getSegPermisoDAO() {\r\n return new SegPermisoDAO();\r\n }", "public static DataAccessObject createDAO(final Element element) {\n\t\tif (element instanceof Artifact)\n\t\t\treturn new ArtifactDAO((Artifact) element);\n\t\telse if (element instanceof Container)\n\t\t\treturn new ContainerDAO((Container) element);\n\t\telse if (element instanceof StageState)\n\t\t\treturn new StageStateDAO((StageState) element);\n\t\telse if (element instanceof State)\n\t\t\treturn new StateDAO((State) element);\n\t\telse if (element instanceof LogicalUnit)\n\t\t\treturn new LogicalUnitDAO((LogicalUnit) element);\n\t\telse if (element instanceof Stage)\n\t\t\treturn new StageDAO((Stage) element);\n\t\telse\n\t\t\treturn null;\n\t}", "Movement() {\n record=0;\n ID =0 ;\n filedate = \"\";\n lat= new ArrayList<Float>();\n lon = new ArrayList<Float>();\n alt=new ArrayList<Float>();\n day1899=new ArrayList<Float>();\n date=new ArrayList<String>();\n time=new ArrayList<String>();\n stay = new ArrayList<Location>();\n record = 0;\n }", "public VRpHrStpDAOImpl() {\r\n super();\r\n }", "public void testCtor1() {\r\n assertNotNull(\"Failed to create DbTimeEntryDAO instance.\", instance);\r\n }", "public interface DotaMaxDAO {\n\n\n /**\n * 将hero实例存储到数据库。\n */\n void insertHeroes(List<Heroes> heroList);\n\n /**\n * 将Item实例存储到数据库。\n */\n void insertItems(List<Items> itemsList);\n\n\n /**\n * 加载英雄列表\n * @return\n */\n Heroes getHeroes(int id);\n\n\n\n\n\n\n void insertMatch(MatchDetails match);\n\n /**\n * 加载数据库里已有的数据\n * @param id\n * @return\n */\n MatchDetails getMatch(long id);\n\n /**\n * 加载用户的数据\n * @param account_id\n * @return\n */\n List<MatchDetails> getMatchByAccountId(long account_id);\n\n\n String getItemsNameById(String item_id);\n\n\n\n /**\n * 添加到User表\n */\n boolean insertUser(User user);\n\n /**\n * 从User表读取所有的用户\n */\n List<Long> getUser();\n\n\n\n}", "public ISegParametroDAO getSegParametroDAO() {\r\n return new SegParametroDAO();\r\n }", "public PostDao() {\n\t}", "private void useMemoryDAO() {\n\t\tDaoFactory factory = new AnimalDaoFactory();\n\t\tAnimalDAO dao = null;\n\t\ttry {\n\t\t\tdao = factory.getDao(\"memory\");\n\t\t} catch (DataStoreNotFoundException e) {\n\t\t\tSystem.out.println(e);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Create a list of animals to use with the dao:\n\t\tList<Animal> lionPride = (List<Animal>) new RandomAnimalBuilder(Lion.class).build(7);\n\t\tfor (Animal lion : lionPride) {\n\t\t\tdao.create(lion);\n\t\t}\n\t\tSystem.out.println(\"--------------------------\\n\");\n\t\t\n\t\t//Retrieve the lions from the dao:\n\t\tfor (Animal lion : dao.findAll()) {\n\t\t\tSystem.out.println(lion);\n\t\t}\n\t}", "static public NewMovement create(AnimatableModelInstance originObject, AnimatableModelInstance targetObject, int duration) {\n\t\t\n\t\tVector3 posT = targetObject.transState.position.cpy();\t\n\t\t\t\n\t\treturn create(originObject.transState, posT.x, posT.y,posT.z, duration);\n\t}", "protected MedicoDao() {\n super(Medico.class);\n }", "public VRpDyHlrforbeDAOImpl() {\r\n super();\r\n }", "public AppointmentDAOImpl() {\n this.conn = DBConnector.getConnection();\n }", "public UserDAO() {\n\t\tthis.emf = Persistence.createEntityManagerFactory(\"feedr_v3\");\n\t\tthis.em = this.emf.createEntityManager();\n\t\tthis.et = this.em.getTransaction();\n\t}", "protected AbstractDao()\n {\n\n }", "public Dao<PlaceType, Integer> getPlaceTypeDAO() throws java.sql.SQLException {\n if(placeTypeDAO == null) placeTypeDAO = getDao(PlaceType.class);\n return placeTypeDAO;\n }", "@Override\n\tpublic DaoEmpleados crearDAOEmpleados() {\n\t\treturn null;\n\t}", "public abstract DbDAO AccessToDAO();", "public ProductosPuntoVentaDaoImpl() {\r\n }", "public ISegRolDAO getSegRolDAO() {\r\n return new SegRolDAO();\r\n }", "public interface EventDAO {\n\t\n\t/**\n\t * Insert the event into the schema.\n\t * @param eventsList\n\t */\n\tpublic void insert(List<Event> eventsList);\n\t\n\tpublic void setDataSource(DataSource ds);\n\t\n\t/**\n\t * A factory class to get the Implementation.\n\t *\n\t */\n\tpublic static class Factory {\n\t\t/**\n\t\t * Create a {@link EventDAO} object.\n\t\t * @return a {@link EventDAO} object.\n\t\t */\n\t\tpublic EventDAO create() {\n\t\t\treturn new EventDAOImpl();\n\t\t}\n\t}\n\n}", "public ActorDtoDAOImpl() {\n super();\n }", "public StorePointsUsersDAO(){\n\t\t\n\t}", "public static RoomDTO newDTO() {\n\n RoomDTO roomDTO = new RoomDTO();\n return roomDTO;\n }", "public OrderDaoImpl() {\n\t\tsuper.setDaoType(Order.class);\n\t}", "public HRouterDAOImpl() {\r\n super();\r\n }", "public static BookingDAOImp getBookingDAO(){\n if(bookingDataObject == null){\n bookingDataObject = new BookingDAOImp();\n }\n return bookingDataObject;\n }", "public static synchronized EquipmentInformationDao getInstance() {\r\n\t\tif (instance == null) {\r\n\t\t\tinstance = new EquipmentInformationDao();\r\n\t\t}\r\n\t\treturn instance;\r\n\t}", "public LPMapdataDaoImpl() {\r\n\t\t\r\n\t}", "public ISegSistemaDAO getSegSistemaDAO() {\r\n return new SegSistemaDAO();\r\n }", "public static SummonerSpellsDao getInstance() {\n\t\tif(instance == null) {\n\t\t\tinstance = new SummonerSpellsDao();\n\t\t}\n\t\treturn instance;\n\t}", "public TbAdminMenuDAOImpl() {\n super();\n }" ]
[ "0.66436076", "0.63158154", "0.6230174", "0.60366064", "0.6007335", "0.5994031", "0.5983167", "0.59830713", "0.5978215", "0.59699625", "0.593926", "0.5896849", "0.58866125", "0.5867188", "0.5866699", "0.58269006", "0.58015484", "0.5781372", "0.57784086", "0.5764344", "0.5757503", "0.5749787", "0.5735792", "0.5730406", "0.5729596", "0.57271904", "0.5720363", "0.5699738", "0.56901425", "0.56679034", "0.5650268", "0.5641943", "0.5633716", "0.5627562", "0.5616203", "0.561215", "0.5609643", "0.5608076", "0.56029004", "0.55981565", "0.5597128", "0.5587709", "0.5583914", "0.55552375", "0.5552046", "0.5540242", "0.5526439", "0.5526159", "0.5512828", "0.5507156", "0.5504894", "0.55047375", "0.55045944", "0.5486635", "0.54815674", "0.54649496", "0.5462001", "0.5453823", "0.5437748", "0.54306704", "0.54298127", "0.54232126", "0.5412804", "0.54024327", "0.54009086", "0.5400123", "0.5393896", "0.53917235", "0.5390509", "0.538741", "0.53859407", "0.5363157", "0.53627175", "0.5349408", "0.5347939", "0.53454787", "0.53338397", "0.53265953", "0.53201926", "0.53172547", "0.5313765", "0.53090376", "0.53078103", "0.53076625", "0.53053784", "0.5302129", "0.5301854", "0.5301711", "0.52957505", "0.52902937", "0.5287814", "0.5279789", "0.5275349", "0.52723825", "0.5267171", "0.52634937", "0.5254184", "0.52530456", "0.52442884", "0.52203107" ]
0.7558383
0