query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
listlengths 3
101
| negative_scores
listlengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
TODO Autogenerated method stub | @Override
public void onItemClick(View itemView, ServResrouce info, int position)
{
SelectFlightDialog dialog =
new SelectFlightDialog(ConfirmOrderActivity.this, mSelectFlightListener, itemView, position);
dialog.show();
WindowManager.LayoutParams lp = dialog.getWindow().getAttributes();
lp.height = (int)(screenHeight - statusBarHeight - 120);
dialog.getWindow().setAttributes(lp);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onDelectChoise(ServResrouce info)
{
DelectChoiseTrafficDialog dialog =
new DelectChoiseTrafficDialog(ConfirmOrderActivity.this, new OperationListener()
{
@Override
public void onDelectFlightInfo(ServResrouce info)
{
// TODO Auto-generated method stub
info.setChecked(false);
mAirListViewAdapter.notifyDataSetChanged();
}
@Override
public void onDelectComfireInfo(ServResrouce info)
{
// TODO Auto-generated method stub
}
});
dialog.setFlightInfo(info);
dialog.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onDelectFlightInfo(ServResrouce info)
{
info.setChecked(false);
mAirListViewAdapter.notifyDataSetChanged();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onDelectComfireInfo(ServResrouce info)
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onItemClick(final View itemView, final ServResrouce info, int position)
{
TrafficToolsPickedDialog dialog =
new TrafficToolsPickedDialog(ConfirmOrderActivity.this, info, new ChoseTimeListener()
{
@Override
public void onResult(String startTime, String endTime)
{
// TODO Auto-generated method stub
TextView useTime = (TextView)itemView.findViewById(R.id.comfire_item_time);
useTime.setText("预订时间:" + startTime + "-" + endTime);
addResourceIdPrice(info.getServId());
mNoAirAdapter.notifyDataSetChanged();
}
});
dialog.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onResult(String startTime, String endTime)
{
TextView useTime = (TextView)itemView.findViewById(R.id.comfire_item_time);
useTime.setText("预订时间:" + startTime + "-" + endTime);
addResourceIdPrice(info.getServId());
mNoAirAdapter.notifyDataSetChanged();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onDelectChoise(ServResrouce info)
{
DelectChoiseTrafficDialog dialog =
new DelectChoiseTrafficDialog(ConfirmOrderActivity.this, new OperationListener()
{
@Override
public void onDelectComfireInfo(ServResrouce info)
{
// TODO Auto-generated method stub
info.setChecked(false);
removeResourceIdPrice(info.getServId());
mNoAirAdapter.notifyDataSetChanged();
}
@Override
public void onDelectFlightInfo(ServResrouce info)
{
// TODO Auto-generated method stub
}
});
dialog.setComfireInfo(info);
dialog.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onDelectComfireInfo(ServResrouce info)
{
info.setChecked(false);
removeResourceIdPrice(info.getServId());
mNoAirAdapter.notifyDataSetChanged();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onDelectFlightInfo(ServResrouce info)
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onItemClick(final View itemView, final ServResrouce info, int position)
{
TrafficToolsPickedDialog dialog =
new TrafficToolsPickedDialog(ConfirmOrderActivity.this, info, new ChoseTimeListener()
{
@Override
public void onResult(String startTime, String endTime)
{
// TODO Auto-generated method stub
TextView useTime = (TextView)itemView.findViewById(R.id.comfire_item_time);
useTime.setText("预订时间:" + startTime + "-" + endTime);
addResourceIdPrice(info.getServId());
mHotelAdapter.notifyDataSetChanged();
}
});
dialog.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onResult(String startTime, String endTime)
{
TextView useTime = (TextView)itemView.findViewById(R.id.comfire_item_time);
useTime.setText("预订时间:" + startTime + "-" + endTime);
addResourceIdPrice(info.getServId());
mHotelAdapter.notifyDataSetChanged();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onDelectChoise(ServResrouce info)
{
DelectChoiseTrafficDialog dialog =
new DelectChoiseTrafficDialog(ConfirmOrderActivity.this, new OperationListener()
{
@Override
public void onDelectComfireInfo(ServResrouce info)
{
// TODO Auto-generated method stub
info.setChecked(false);
removeResourceIdPrice(info.getServId());
mHotelAdapter.notifyDataSetChanged();
}
@Override
public void onDelectFlightInfo(ServResrouce info)
{
// TODO Auto-generated method stub
}
});
dialog.setComfireInfo(info);
dialog.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onDelectComfireInfo(ServResrouce info)
{
info.setChecked(false);
removeResourceIdPrice(info.getServId());
mHotelAdapter.notifyDataSetChanged();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onDelectFlightInfo(ServResrouce info)
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable)
{
super.onFailure(statusCode, headers, responseString, throwable);
LogUtil.i(TAG, "getApplyPrice", "statusCode=" + statusCode);
LogUtil.i(TAG, "getApplyPrice", "responseString=" + responseString);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onSuccess(int statusCode, Header[] headers, JSONObject response)
{
super.onSuccess(statusCode, headers, response);
// LogUtil.i(TAG, "getApplyPrice", "responseString=" + response.toString());
System.out.println("预订价格接口=" + response);
JSONObject dataJson;
try
{
dataJson = response.getJSONObject("data");
if (dataJson != null && !dataJson.equals(""))
{
String toatlPrice = dataJson.optString("totalPrice");
String price = dataJson.optString("price");
JSONArray serviceArray = dataJson.optJSONArray("service");
List<ServiceInfo> serviceInfos = new ArrayList<ServiceInfo>();
if (serviceArray != null && serviceArray.length() > 0)
{
for (int i = 0; i < serviceArray.length(); i++)
{
ServiceInfo serviceInfo = new ServiceInfo();
JSONObject serviceJson = serviceArray.optJSONObject(i);
serviceInfo.setCode(serviceJson.optString("code"));
serviceInfo.setName(serviceJson.optString("name"));
serviceInfo.setPrice(serviceJson.optString("price"));
}
}
initPriceInfoData(price, toatlPrice, serviceInfos);
}
}
catch (JSONException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onSuccess(int statusCode, Header[] headers, JSONObject response)
{
super.onSuccess(statusCode, headers, response);
LogUtil.i(TAG, "getservBookResource", response.toString());
if (response.opt("code").equals("00000"))
{
JSONObject dataJsonObject = response.optJSONObject("data");
JSONArray trafficJSONList = dataJsonObject.optJSONArray("traffic");
if (trafficJSONList != null && trafficJSONList.length() > 0)
{
for (int j = 0; j < trafficJSONList.length(); j++)
{
JSONObject serviceJSON = trafficJSONList.optJSONObject(j);
ServResrouce service = new ServResrouce();
service.setServId(serviceJSON.optString("servId"));
service.setServName(serviceJSON.optString("servName"));
service.setServAlias(serviceJSON.optString("servAlias"));
service.setServType(serviceJSON.optString("servType"));
service.setRank(serviceJSON.optString("rank"));
service.setTitleImage(serviceJSON.optString("titleImg"));
service.setServDesc(serviceJSON.optString("servDesc"));
if (service.getServType().equals("airplane") || service.getServType().equals("Iairplane"))
{
airPlaneList.add(service);
}
else
{
carOrBoaticList.add(service);
}
}
}
JSONArray stayJSONList = dataJsonObject.optJSONArray("stay");
if (stayJSONList != null && stayJSONList.length() > 0)
{
for (int j = 0; j < stayJSONList.length(); j++)
{
JSONObject serviceJSON = stayJSONList.optJSONObject(j);
ServResrouce service = new ServResrouce();
service.setServId(serviceJSON.optString("servId"));
service.setServName(serviceJSON.optString("servName"));
service.setServAlias(serviceJSON.optString("servAlias"));
service.setServType(serviceJSON.optString("servType"));
service.setRank(serviceJSON.optString("rank"));
service.setTitleImage(serviceJSON.optString("titleImg"));
service.setServDesc(serviceJSON.optString("servDesc"));
stayList.add(service);
}
}
mAirListViewAdapter.notifyDataSetChanged();
mNoAirAdapter.notifyDataSetChanged();
mHotelAdapter.notifyDataSetChanged();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable)
{
super.onFailure(statusCode, headers, responseString, throwable);
LogUtil.i(TAG, "getservBookResource", "statusCode=" + statusCode);
LogUtil.i(TAG, "getservBookResource", "responseString=" + responseString);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable)
{
super.onFailure(statusCode, headers, responseString, throwable);
System.out.println("applyBook-->onFailure" + statusCode);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onSuccess(int statusCode, Header[] headers, JSONObject response)
{
super.onSuccess(statusCode, headers, response);
System.out.println("申请预订接口=" + response);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public int queryCount() {
return (int) tBasUnitClassRepository.count();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<TBasUnitClass> findByPage(Pageable pageable) {
Page<TBasUnitClass> page = tBasUnitClassRepository.findAll(pageable);
return page.getContent();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void save(TBasUnitClass tem) {
tBasUnitClassRepository.save(tem);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void del(String id) {
tBasUnitClassRepository.delete(id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public TBasUnitClass findOne(String id) {
return tBasUnitClassRepository.findOne(id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<TBasUnitClass> findAll() {
return tBasUnitClassRepository.findAll();
} | {
"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 JobPreferences save(JobPreferences educaiton) {
return jobPreferenceDao.save(educaiton);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public List<JobPreferences> findAll() {
return jobPreferenceDao.findAll();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void delete(int id) {
} | {
"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 JobPreferences findOne(String username) {
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 JobPreferences findById(int id) {
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 JobPreferences update(JobPreferences educaiton) {
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}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
initView();
} | {
"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 |
Instantiates a new game. | public Game() {
bPlayer = new Player(false);
wPlayer = new Player(true);
// TODO Auto-generated constructor stub
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Game() {}",
"public Game()\n {\n createRooms();\n parser= new Parser();\n }",
"public Game createGame();",
"public Game() {\n\n\t}",
"void startGame(int gameId) {\n game = new Game(gameId);\n }",
"public Game() {\n }",
"public void initGame() {\n this.game = new Game();\n }",
"void newGame() {\n logger.log(\"New game starting.\");\n logger.log(divider);\n\n\n // Create the deck.\n createDeck();\n logger.log(\"Deck loaded: \" + deck.toString());\n\t logger.log(divider);\n\n\n // Shuffle the deck.\n shuffleDeck();\n logger.log(\"Deck shuffled: \" + deck.toString());\n logger.log(divider);\n\n // Create the players.\n createPlayers();\n setGameState(GameState.PLAYERS_SPAWNED);\n\n // Deal cards to players' decks.\n deal();\n for (Player player : players) {\n logger.log(\"Hand: \" + player);\n }\n \n\n // Randomly select the active player for the first round.\n selectRandomPlayer();\n\n setGameState(GameState.NEW_GAME_INITIALISED);\n }",
"public Game() \n {\n createRooms();\n parser = new Parser();\n }",
"public Game() \n {\n createRooms();\n parser = new Parser();\n }",
"public Game() {\n\n GameBoard gameBoard = new GameBoard();\n Renderer renderer = new Renderer(gameBoard);\n }",
"public Game() \n {\n parser = new Parser();\n name = new String();\n player = new Player();\n ai = new AI();\n createRooms();\n rand = -1;\n enemyPresent = false;\n wantToQuit = false;\n alive = true;\n createItems();\n createWeapons();\n createEnemy();\n setEnemy();\n setItems();\n setWeapons();\n setExits();\n }",
"public Game(){\n\n }",
"public Game() {\n parser = new Parser();\n }",
"public Game() \n {\n Logger.setLogger(null);\n createInstances();\n parser = new Parser();\n player = new Player();\n userInputs = new ArrayList<String>();\n }",
"public PlayableGame() {\r\n\r\n }",
"public void createGame();",
"public void newGame()\n\t{\n\t\tmap = new World(3, viewSize, playerFactions);\n\t\tview = new WorldView(map, viewSize, this);\n\t\tbar = new Sidebar(map, barSize);\n\t}",
"void newGame() {\n\t\tstate = new model.State () ; \n\t\tif(host != null ) host.show(state) ; \n\t}",
"private Game() {}",
"public Game(){\n player = new Player(createRooms());\n parser = new Parser(); \n }",
"void createNewGame() {\n _gameList.add(new GameObject());\n Log.i(\"createGame\", \"Created New Game\");\n }",
"public void newGame() {\n init();\n updateScoreBoard();\n Toast.makeText(getContext(), \"New Game started\", Toast.LENGTH_LONG).show();\n }",
"public void InitGame(){\n System.out.format(\"New game initiated ...\");\n Game game = new Game(client_List);\n SetGame(game);\n }",
"public void newGame(){\n\t\tsoundMan.BackgroundMusic1();\n\n\t\tstatus.setGameStarting(true);\n\n\t\t// init game variables\n\t\tbullets = new ArrayList<Bullet>();\n\n\t\tstatus.setShipsLeft(8);\n\t\tstatus.setGameOver(false);\n\n\t\tif (!status.getNewLevel()) {\n\t\t\tstatus.setAsteroidsDestroyed(0);\n\t\t}\n\n\t\tstatus.setNewAsteroid(false);\n\n\t\t// init the ship and the asteroid\n\t\tnewShip(gameScreen);\n\t\tnewAsteroid(gameScreen);\n\n\t\t// prepare game screen\n\t\tgameScreen.doNewGame();\n\t\tsoundMan.StopMusic2();\n\t\tsoundMan.StopMusic3();\n\t\tsoundMan.StopMusic4();\n\t\tsoundMan.StopMusic5();\n\t\tsoundMan.StopMusic6();\n\t\t// delay to display \"Get Ready\" message for 1.5 seconds\n\t\tTimer timer = new Timer(1500, new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstatus.setGameStarting(false);\n\t\t\t\tstatus.setGameStarted(true);\t\n\n\t\t\t\tstatus.setLevel(1);\n\t\t\t\tstatus.setNumLevel(1);\n\t\t\t\tstatus.setScore(0);\n\t\t\t\tstatus.setYouWin(false);\n\t\t\t\tstatus.setBossLife(0);\n\t\t\t}\n\t\t});\n\t\ttimer.setRepeats(false);\n\t\ttimer.start();\n\t}",
"public void newGame() {\r\n\r\n gameObjects.newGame();\r\n\r\n // Reset the mScore\r\n playState.mScore = 0;\r\n\r\n // Setup mNextFrameTime so an update can triggered\r\n mNextFrameTime = System.currentTimeMillis();\r\n }",
"public OrchardGame() {\n\t\t\n\t}",
"public Game() { \n // Create the new environment. Must be done in the same\n // method as the game loop\n env = new Env();\n \n // Sets up the camera\n env.setCameraXYZ(25, 50, 55);\n env.setCameraPitch(pitch);\n\n // Turn off the default controls\n env.setDefaultControl(false);\n\n // Make the room 50 x 50.\n env.setRoom(new Room());\n creatures = new ArrayList<Creature>();\n }",
"public MiniGame() {\n\n\t}",
"public void createGame()\n {\n //call Client Controller's setState method with\n //a parameter of new ClientLobbyState()\n clientController.startMultiPlayerGame(\"GameLobby\");\n }",
"private void startGame() {\n\t\tmain.next_module = new Game(main, inputs, gameSelectionData);\n\t}",
"public GameOfLifeTest()\n {\n }",
"public GameScreen newGame() {\n gameScreen = new GameScreen(this);\n return gameScreen;\n }",
"public void newGame();",
"public void newGame();",
"public void newGame();",
"public Game() {\n generatePort();\n status = Status.ATTENTE;\n generateGameID();\n name = \"GameG4B\";\n players = new ArrayList<>();\n maxRealPlayer = 0;\n maxVirtualPlayer = 0;\n realPlayerNb = 0;\n virtualPlayerNb = 0;\n rounds = new ArrayList<>();\n currentRound = 0;\n }",
"public Game() \n {\n parser = new Parser();\n }",
"public void startNewGame()\n {\n // Display the Banner Page.\n \n System.out.println(\"\\nWelcome to the city of Aaron.\");\n \n // Prompt for and get the user’s name.\n String name;\n System.out.println(\"\\nPlease type in your first name: \");\n name = keyboard.next();\n\n // Call the createNewGame() method in the GameControl class\n \n GameControl.createNewGame(name);\n\n // Display a welcome message\n System.out.println(\"Welcome \" + name + \" have fun!!!\");\n \n //Call the GameMenuView\n GameMenuView gmv = new GameMenuView();\n gmv.displayMenu();\n }",
"public Game getNewInstance() {\n try {\n return classObj.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(\"Error generating \" + this + \" game\");\n }\n }",
"private void newGame() {\n\t\t// Firstly, we spawn the player.\n\t\tplayer = new AsteroidsPlayer(GameObject.ROOT, this);\n\t\tspawnPlayer();\n\n\t\t// Make sure that no other objects exist.\n\t\tasteroids.clear();\n\t\tlaserShots.clear();\n\t\totherObjects.clear();\n\n\t\t// Then we create the score text using two strings.\n\t\tAsteroidsString scoreText = new AsteroidsString(GameObject.ROOT, \"SCORE\", true, false);\n\t\tscoreText.translate(new Vector3(-cameraZoom, cameraZoom - 1));\n\t\totherObjects.add(scoreText);\n\t\tscoreString = new AsteroidsString(GameObject.ROOT, Integer.toString(score), true, false);\n\t\tscoreString.translate(new Vector3(-cameraZoom, cameraZoom - 3));\n\t\totherObjects.add(scoreString);\n\n\t\t// We set our starting lives to 3.\n\t\tlives = 3;\n\n\t\t//And we also create the lives text.\n\t\tAsteroidsString livesText = new AsteroidsString(GameObject.ROOT, \"LIVES\", false, true);\n\t\tlivesText.translate(new Vector3(cameraZoom, cameraZoom - 1));\n\t\totherObjects.add(livesText);\n\t\tlivesString = new AsteroidsString(GameObject.ROOT, Integer.toString(lives), false, true);\n\t\tlivesString.translate(new Vector3(cameraZoom, cameraZoom - 3));\n\t\totherObjects.add(livesString);\n\n\t\t// Then we just set the delay to the first asteroid.\n\t\ttimeToNextAsteroid = asteroidDelay;\n\t}",
"public GameLuncher(GameGUI gameGUI) {\n this.gameGUI = gameGUI;\n createGame();\n }",
"public Game() {\n initializeBoard();\n }",
"public Game createGame(int numberOfPlayers) {\n return new Game(numberOfPlayers);\n }",
"public void newGame()\n\t{\n\t\tplanet.setLevel(0);\n\t\tship.resetScore();\n\t\tstopThreads();\n\t\tplanet = new Planet(750,600);\n\t\tship = new Ship(20.0,750,600,planet);\n\t\tbuttonPanel.update(ship,planet);\n\t\tgamePanel.update(ship,planet);\n\n\t\trestartThreads();\n\t}",
"public GdGame()\n\t{\n\t\tthis(100);\t\t\n\t}",
"public Game(int choose) {\n\t\tthis.board = new Grid();\n\t\tthis.sp = 200;\n\t\tthis.spawnZombie(choose);\n\t}",
"public BeanGame () {\n\t}",
"public void newGame() {\n\n //reset game board before initializing newgame\n clearGame();\n \n whiteplayer = new Player(\"white\", chessboard, this);\n blackplayer = new Player(\"black\", chessboard, this);\n colorsTurn = \"white\";\n gamelog.logCurrentTurn(colorsTurn);\n\n }",
"public Game() {\n\t\tsuper();\n\t\tgameModel = new GameModel();\n\t\tview = new GamePane(gameModel);\n\t\t\n\t\tadd(view);\n\t\tpack();\n\t\tsetLocationRelativeTo(null);\n\t}",
"public GameState() {}",
"public static GameState createInstance() {\n\t\treturn new GameState();\n\t}",
"public void newGame() {\n // this.dungeonGenerator = new TowerDungeonGenerator();\n this.dungeonGenerator = cfg.getGenerator();\n\n Dungeon d = dungeonGenerator.generateDungeon(cfg.getDepth());\n Room[] rooms = d.getRooms();\n\n String playername = JOptionPane.showInputDialog(null, \"What's your name ?\");\n if (playername == null) playername = \"anon\";\n System.out.println(playername);\n\n this.player = new Player(playername, rooms[0], 0, 0);\n player.getCurrentCell().setVisible(true);\n rooms[0].getCell(0, 0).setEntity(player);\n\n frame.showGame();\n frame.refresh(player.getCurrentRoom().toString());\n frame.setHUD(player.getGold(), player.getStrength(), player.getCurrentRoom().getLevel());\n }",
"public Game() {\r\n\t\tcards = new ArrayList<Card>();\r\n\t\tfor (int i = 0; i < NBCARDS; i++) {\r\n\t\t\tcards.add(new Card());\r\n\t\t}\r\n\t\tplayers = new ArrayList<Player>();\r\n\t\tfor (int i = 0; i < NBPLAYER; i++) {\r\n\t\t\tplayers.add(new Player(i + 1));\r\n\t\t}\r\n\t}",
"public Game() {\n this.date = LocalDateTime.now();\n }",
"public Game() {\n String configPath= String.valueOf(getClass().getResource(\"/config/conf.xml\"));\n\n listeners= new ArrayList<>();\n assembler= new Assembler(configPath);\n levelApple= (ILevel) assembler.newInstance(\"levelApple\");\n levelRarity= (ILevel) assembler.newInstance(\"levelRarity\");\n levelRainbow= (ILevel) assembler.newInstance(\"levelRainbow\");\n levelRunning= levelApple;\n levelApple.selected();\n levelFlutter= null;\n levelPinky= null;\n jukebox = (Jukebox) assembler.newInstance(\"jukebox\");\n jukebox.switchTo(\"apple\");\n event = new LevelChangeEvent();\n event.setNumberOfLevel(6);\n setEventSelected(true, false, false);\n setEventRunning(true, true, true);\n }",
"public Game() {\n\t\tusers = new ArrayList<>();\n\t\ttmpTeam = new UserTeam();\n\t\tcore = new Core();\n\t\tmarket = new Market(core);\n\t}",
"public playGame()\n {\n // initialise instance variables\n //no constructor\n }",
"@Override\n public void newGame() {\n //TODO Implement this method\n }",
"private GameManager() \n\t{\n\t\t\n\t}",
"@Override\n public LocalGame createLocalGame() {\n return new LocalGameActual();\n }",
"public void create () \n\t{ \n\t\t// Set Libgdx log level to DEBUG\n\t\tGdx.app.setLogLevel(Application.LOG_DEBUG);\n\t\t// Load assets\n\t\tAssets.instance.init(new AssetManager());\n\t\tpaused = false;\n\t\t// Load preferences for audio settings and start playing music\n\t\tGamePreferences.instance.load();\n\t\tAudioManager.instance.play(Assets.instance.music.song01);\n\t\t// Start game at menu screen\n\t\tsetScreen(new MenuScreen(this));\n\t\t\n\t}",
"public void newGameJBJ() {\n newGame();\n min = 0; max = 1000;\n myctr.setMinMaxLabel();\n myctr.setLabels();\n }",
"public Game() {\n board = new FourBoard();\n }",
"void createNewGame(Player player);",
"public Game() \n {\n gameLoaded = false;\n }",
"public static void main(String[] args) {\n Game game = new Game();\n }",
"public GamePlayer() {}",
"static Game newGame(Player player1, Player player2) {\n return new GameImpl(player1, player2);\n }",
"public Game()//Method was given\n {\n parser = new Parser();\n player = new Player();\n }",
"@Override\n\tpublic void create() {\n\t\tthis.playScreen = new PlayScreen<EntityUnknownGame>(this);\n\t\tsetScreen(this.playScreen);\n\t\t\n\t\t//this.shadowMapTest = new ShadowMappingTest<EntityUnknownGame>(this);\n\t\t//setScreen(this.shadowMapTest);\n\t\t\n\t\t//this.StillModelTest = new StillModelTest<EntityUnknownGame>(this);\n\t\t//setScreen(this.StillModelTest);\n\t\t\n//\t\tthis.keyframedModelTest = new KeyframedModelTest<EntityUnknownGame>(this);\n//\t\tsetScreen(this.keyframedModelTest);\n\t}",
"public Game(){\n\t\tDimension dimension = new Dimension(Game.WIDTH, Game.HEIGHT); //Create dimensions for window size\n\t\tsetPreferredSize(dimension); //Set the start size\n\t\tsetMinimumSize(dimension); //Set the min size\n\t\tsetMaximumSize(dimension); //Set the max size, this locks the window size.\n\t\taddKeyListener(this); //Add the key listener to the game object\n\t\tlevel1(); //Load level 1\n\t\twinScreen = new WinScreen(); //Create win object\n\t\tdeadScreen = new DeadScreen(); //Create dead object\n\t\tstartScreen = new StartScreen(); //Create startScreen object\n\t\tpauseScreen = new PauseScreen(); //Create pauseScreen object\n\t\tspriteSheet = new SpriteSheet(\"img/sprites.png\"); //Create SpriteSheet object\n\t\tnew Texture(); //Initialize texture object\n\t}",
"public Game() {\n initComponents();\n }",
"public Game() {\n super(\"Project 6 Game\");\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n gamePanel = new GamePanel();\n setContentPane(gamePanel);\n pack();\n setLocationRelativeTo(null);\n setVisible(true);\n }",
"public Game startGame(Game game);",
"public Game() {\t\t\t\t\t\n\t\t\n\t\tmDeck = new Deck();\t\t\t\t\t\t\t\t\t\t\t\n\t\tmDealer = new Dealer(mDeck.getCard(), mDeck.getCard());\t//dealer gets a random value card twice to initialise the dealers hand with 2 cards\n\t\tmUser = new User();\t\t\t\t\t\t\t\t\t\t\t\n\t\tgiveCard();\t\t\t\t\t\n\t}",
"public Game(){\n\t\tDimension size = new Dimension(width * scale, height * scale);\n\t\tsetPreferredSize(size);\n\t\t\n\t\tscreen = new Screen(width, height);//instantiated the new screen\n\t\t\n\t\tframe = new JFrame();\n\t\t\n\t}",
"public Game() {\r\n\r\n\t\tmakeFrame();\r\n\t\tisClicked = false;\r\n\t\tisPlaying = false;\r\n\t\tlevelEasy = true;\r\n\t\tlevelIntermediate = false;\r\n\t\tlevelHard = false;\r\n\t\tplayerScore = 0;\r\n\r\n\t}",
"@Override\n public void create()\n {\n Gdx.app.setLogLevel(Application.LOG_DEBUG);\n \n // Load assets\n Assets.instance.init(new AssetManager());\n \n // Load preferences for audio settings, and start playing music\n GamePreferences.instance.load();\n AudioManager.instance.play(Assets.instance.music.song01);\n \n // Start game at menu screen\n setScreen(new MenuScreen(this));\n }",
"public Game()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1, false); \n Greenfoot.start(); //Autostart the game\n Greenfoot.setSpeed(50); // Set the speed to 30%\n setBackground(bgImage);// Set the background image\n \n //Create instance\n \n Airplane gameplayer = new Airplane ();\n addObject (gameplayer, 100, getHeight()/2);\n \n }",
"private void newGame ()\n {\n this.game.abort ();\n try\n {\n Thread.sleep(50);\n }catch (InterruptedException e)\n { \n Logger.getLogger(AsteroidsFrame.class.getName()).log(Level.SEVERE, \"Could not sleep before initialing a new game.\");\n }\n this.game.initGameData ();\n }",
"public GameOfLifeGameActivity() {\n\t\tsuper(new GameOfLifeModel(), new GameOfLifeController(), new GameOfLifeView());\n\t\tsetKeyResources(R.layout.game, R.id.game_surface);\n\t}",
"public GameView() {\n initComponents();\n gameView(30, 30);\n }",
"public GameManager(){\r\n init = new Initialisation();\r\n tower=init.getTower();\r\n courtyard=init.getCourtyard();\r\n kitchen=init.getKitchen();\r\n banquetHall=init.getBanquetHall();\r\n stock=init.getStock();\r\n throneHall=init.getThroneHall();\r\n vestibule=init.getVestibule();\r\n stables=init.getStables();\r\n\r\n this.player = new Player(tower);\r\n\r\n push(new IntroductionState());\r\n\t}",
"public Game(){\n new Window(800, 800, \"Survival Game\", this);\n handler = new Handler();\n camera = new Camera(0,0);\n this.addKeyListener(new KeyInput(handler));\n\n //create the map\n map = new Map(handler);\n map.generateMap();\n map.drawWorld();\n\n player = new Player(100, 100, ID.Player, handler);\n handler.addObject(player);\n handler.addObject(new Bear(600, 600, ID.Bear, player));\n handler.addObject(new Deer(400, 400, ID.Deer, player));\n\n start();\n }",
"public Game()\r\n { \r\n // Create a new world with 800x600 cells with a cell size of 1x1 pixels.\r\n super(800, 600, 1);\r\n \r\n // add grill obj on left\r\n grill = new Grill();\r\n addObject(grill, 200, 400);\r\n \r\n // add table on right\r\n prepTable = new PrepTable();\r\n addObject(prepTable, 600, 400);\r\n \r\n // add all the table buttons\r\n addTableButtons();\r\n \r\n // add timer text\r\n timerText = new Text(\"2:00\");\r\n addObject(timerText, 60, 30);\r\n \r\n // setup the timer\r\n frameRate = 60;\r\n timeLeft = frameRate * 2;\r\n \r\n // setup the points\r\n score = 0;\r\n scoreText = new Text(\"$0\");\r\n addObject(scoreText, 50, 80);\r\n \r\n // setup orders\r\n orders = new ArrayList<Order>();\r\n orderTimer = frameRate * 4; // start with a 4 sec delay before the first order\r\n \r\n // the game is still updating\r\n stillRunning = true;\r\n \r\n // fix layering order\r\n setPaintOrder(Text.class, Topping.class, Button.class, Patty.class, Order.class);\r\n \r\n // set order variance\r\n orderVariance = 2 * frameRate;\r\n \r\n // init seconds counter\r\n totalSecondsElapsed = 0;\r\n }",
"public WarGame() {\r\n\t\tsetGame();\r\n\t}",
"public Game() {\n Random rand = new Random();\n for (int i = 0; i < NB_ELEMENTS_PLATEAU; i++) {\n Case current_case;\n int entity = rand.nextInt(10);\n switch (entity) {\n case 0:\n current_case = new Dragon();\n break;\n case 1:\n current_case = new Gobelin();\n break;\n case 2:\n current_case = new Sorcier();\n break;\n case 3:\n current_case = new Eclair();\n break;\n case 4:\n current_case = new Epee();\n break;\n case 5:\n current_case = new GrandePotion();\n break;\n case 6:\n current_case = new Massue();\n break;\n case 7:\n current_case = new StandardPotion();\n break;\n case 8:\n current_case = new BouleDeFeu();\n break;\n default:\n current_case = null;\n }\n\n plateau.add(current_case);\n }\n\n System.out.println(\"\\u001B[35mPlateau géréné aléatoirement:\");\n for (int i = 0; i < NB_ELEMENTS_PLATEAU; i++) {\n System.out.println(\"| \" + (i + 1) + \" | \" + plateau.get(i) + \" |\");\n }\n }",
"public void loadGame() {\n game.loadGame();\n }",
"public Game()\r\n\t{\r\n\t\tthis.players = new Player[Config.PlayerLimit];\r\n\t\tthis.resetGame();\r\n\t}",
"public RunningGame() {\n initComponents();\n }",
"public void startNewGame();",
"@Override\n protected void initGame() {\n getGameWorld().setEntityFactory(new PlatformerFactory());\n getGameWorld().setLevelFromMap(\"Platformergame1.json\");\n\n // Sets spawnloction of the player\n player = getGameWorld().spawn(\"player\", 50, 50);\n }",
"public GameStart() {\n\t\tsuper(\"First 2D Game\");\n\t}",
"public PigLocalGame() {\n pgs = new PigGameState();\n }",
"public Game() { \n super(1000, 640, 1);\n updateScore(0);\n }",
"public static void startGame()\r\n\t{\r\n\t\tnew ModeFrame();\r\n\t}",
"public GameInstance(int gameID, World world) {\r\n this.gameID = gameID;\r\n this.world = world;\r\n }",
"Games game();",
"void startNewGame(String playerName, String gameType) throws GameServiceException;"
]
| [
"0.7655035",
"0.76301175",
"0.7623157",
"0.7558916",
"0.7553091",
"0.7497927",
"0.7461369",
"0.7454112",
"0.74504143",
"0.74504143",
"0.74497193",
"0.7399121",
"0.73981005",
"0.73417234",
"0.7286171",
"0.72574437",
"0.724559",
"0.7229373",
"0.7181854",
"0.7176158",
"0.71372044",
"0.7087986",
"0.708577",
"0.7067997",
"0.705721",
"0.7019868",
"0.6999194",
"0.69788605",
"0.6948533",
"0.6945165",
"0.69198006",
"0.69073427",
"0.6905651",
"0.68847764",
"0.68847764",
"0.68847764",
"0.6883278",
"0.68731624",
"0.68606114",
"0.6859886",
"0.6841396",
"0.68351513",
"0.6807014",
"0.6803356",
"0.6789223",
"0.6767899",
"0.67663985",
"0.6750766",
"0.67439723",
"0.6727753",
"0.672379",
"0.6709716",
"0.6702185",
"0.6692271",
"0.6688722",
"0.6673841",
"0.6649771",
"0.66490924",
"0.66414046",
"0.66389096",
"0.66250974",
"0.6617511",
"0.6598804",
"0.6597728",
"0.65909916",
"0.65835226",
"0.6583429",
"0.65776646",
"0.6573732",
"0.65638566",
"0.65568864",
"0.6556285",
"0.6555263",
"0.6550284",
"0.65259284",
"0.6521414",
"0.65131885",
"0.65081555",
"0.650777",
"0.6506154",
"0.65026855",
"0.64860255",
"0.6484204",
"0.6478663",
"0.64657056",
"0.64638335",
"0.64570814",
"0.64546293",
"0.643944",
"0.6434981",
"0.6431448",
"0.6423118",
"0.64184994",
"0.6417187",
"0.6416668",
"0.64139545",
"0.6411785",
"0.64107794",
"0.6410522",
"0.64091885"
]
| 0.66871834 | 55 |
TODO Autogenerated method stub | public static void main(String[] args) {
int arr[] = {9,3,9,3,9,7,9};
Solution(arr);
} | {
"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 |
private Queue log = new LinkedList(); | protected SlidingWindowLog(int maxReqPerUnitTime) {
super(maxReqPerUnitTime);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public LQT_Message_Queue() {\n\ta_list = new LinkedList<LQT_Message>();\n }",
"public MyStack() {\n queue = new LinkedList<>();\n }",
"public LinkedQueue(){\n this.firstNode = null;\n this.lastNode = null;\n }",
"public LinkedQueue(){\n length = 0;\n front = rear = null;\n }",
"public QueueExplorator() {\n\t\tqueue = new LinkedQueue<Square>();\t\n\t}",
"public MyStack() {\n queue = new LinkedList<>();\n }",
"public StackWithOneQueue() {\n this.queue = new LinkedList<>();\n }",
"public DVDQueue() { \n\t\tqueue = new LinkedList<DVDPackage>(); \n\t}",
"private Queue(){\r\n\t\tgenerateQueue();\r\n\t}",
"myQueue(){\n }",
"public LinkQueue(){\n }",
"public Queue(){\n first = null;\n last = null;\n N = 0;\n }",
"public MyQueue() {\n\n }",
"public EventQueue() {\n\t\tqueue = new LinkedList<Event>();\n\t}",
"public Queue()\n\t{\n\t\thead = null;\n\t}",
"public ListQueue() {\n \n }",
"public MyStack() {\n this.queue=new LinkedList<Integer>();\n }",
"public MyQueue() {\n \n }",
"public void linkedListQueue(){\r\n\t\tfirst = null;\r\n\t\tlast = null;\r\n\t\tN = 0;\r\n\t}",
"public MyStack() {\n queueA = new LinkedList<>();\n queueB = new LinkedList<>();\n }",
"public Queue(){ }",
"public QueueLinkedList()\r\n {\r\n first = null; //assigning variables to null\r\n last = null;\r\n \r\n }",
"public MyQueue() {\n stack = new Stack<>();\n }",
"public MyQueue() {\n stack = new LinkedList<Integer>();\n cache = new LinkedList<Integer>();\n }",
"public MyStack2() {\n queue = new LinkedList<Integer>();\n }",
"public MyQueue() {\n\n }",
"public MyQueue() {\n\n }",
"public Queue() {}",
"Queue() {\n head = null;\n tail = null;\n }",
"public MyQueue() {\n storeStack = new Stack<>();\n }",
"@Override\n\tpublic void addToQueue() {\n\t}",
"public MyStack() {\n queue1=new LinkedList();\n queue2=new LinkedList();\n }",
"public MyStack() {\n this.q = new LinkedList<>();\n }",
"public MyQueue() {\n queue = new PriorityQueue<>();\n }",
"public void printQueue();",
"public MyQueue1() {\n storeStack = new Stack<>();\n }",
"public MyQueue() {\n front = null;\n rear = null;\n size = 0;\n }",
"public QueueAdapter() {\n list = new ArrayList<>();\n }",
"public Queue()\n\t{\n\t\tsuper();\n\t}",
"public void queueUsage() {\n\t\t//use LinkedList as a queue\n\t\tQueue<String> q = new LinkedList<String>();\n\t\tq.add(\"1\");\n\t\tq.add(\"2\");\n\t\tq.add(\"3\");\n\t\tq.add(\"10\");\n\t\tq.add(\"11\");\n\t\tint[] a;\n\n\t\tLinkedBlockingQueue<String> bq = new LinkedBlockingQueue<String>();\n\t\t\n\t\t//ArrayBlockingQueue needs to set the size when created.\n\t\tArrayBlockingQueue<String> aq = new ArrayBlockingQueue<String>(100);\n\t\t\n\t\tPriorityBlockingQueue<String> pq = new PriorityBlockingQueue<String>();\n\t\t\n//\t\tDelayQueue<String> dq = new DelayQueue<String>(); \n\t\t\n\t}",
"public SQueue(){\n\n\t}",
"@Test\n public void queue() {\n\n Queue<String> q = new LinkedList<>();\n q.offer(\"1\");\n q.offer(\"2\");\n q.offer(\"3\");\n System.out.println(q.offer(\"4\"));\n System.out.println(q.add(\"2\"));\n System.out.println(q.toString());\n System.out.println(\"peek \" + q.peek()); // 1, peek() means get the first element in the queue\n System.out.println(\"size \" + q.size()); // 4\n System.out.println(\"poll \" + q.poll()); // 1\n System.out.println(\"size \" + q.size()); // 3\n\n\n }",
"public MyQueue2() {\n storeStack = new Stack<>();\n }",
"public LinkedQueue() \r\n\t{\r\n\t\tthis.size = 0;\r\n\t\tthis.head = null;\r\n\t\tthis.tail = null;\r\n\t}",
"public Queue() {\n\t\tfirst = null;\n\t\tlast = null;\n\t\tN = 0;\n\t}",
"public BlaqDeque(){super();}",
"public MyQueue() {\n left = new Stack<>();\n right = new Stack<>();\n }",
"public LinkedListQueue(T data) \n { \n this.data = data; \n this.next = null; \n }",
"public QueueNode() {\n first = null;\n last = null;\n n = 0;\n }",
"public MyQueue() {\n push=new Stack<>();\n pull=new Stack<>();\n }",
"public void setQueue ( Queue queue )\r\n {\r\n setDestination ( queue );\r\n }",
"public MyQueue() {\n rearStack = new Stack();\n frontStack = new Stack();\n }",
"public void onQueue();",
"public static void main(String[] args) {\n Queue<Integer> queue = new LinkedListQueue<>();\n\n for (int i = 0; i < 21; i++) {\n queue.enqueue(i);\n System.out.println(queue);\n }\n\n for (int i = 0; i < 16; i++) {\n queue.dequeue();\n System.out.println(queue);\n }\n System.out.println(queue);\n }",
"public MyQueue() {\n s1 = new Stack<>();\n s2 = new Stack<>();\n }",
"public LinkedList(){\n count = 0;\n front = rear = null;\n }",
"public LinkedList<ElevatorQueueObject> getQueue() {\n return queue;\n }",
"public MyQueue() {\n stk1 = new Stack<>();\n stk2 = new Stack<>();\n }",
"public static void main(String[] args) {\n// System.out.println(testQueue.getQueueElement());\n// System.out.println(testQueue.getQueueElement());\n }",
"public QueueLi() {\n\t\theader = back = new Node<AnyType>(null, null);\n\n\t}",
"public RandomizedQueue(){\n// this.head = new Node<Item>();\n// this.tail = head;\n// queueData = (Item[])new Object[0];\n }",
"public MyStack() {\n queue = new ArrayDeque<>();\n }",
"public Deque() {\n\n }",
"public Deque() {\n\n }",
"public MyQueue() {\n pushStack = new Stack<>();\n popStack = new Stack<>();\n }",
"String addReceiveQueue();",
"public AliasInQueue() {\n\t\tsuper();\n\t}",
"private void workOnQueue() {\n }",
"public static void showNodeQueue(AYQueue<Node> q)\n {\n for (int i = 0; i < q.size(); i++)\n {\n Node node = q.dequeue();\n System.out.format(\"Element #%d = [%s]%n\", i, node.getNodeID());\n q.enqueue(node);\n } //for\n\n }",
"public Deque() {}",
"public interface LogNode {\n\n // Instructs first LogNode in the list to print the log data provided\n\n public void println(int priority, String tag, String msg, Throwable tr);\n}",
"public MyStack() {\n queue = new LinkedList<>();\n forReverse = new LinkedList<>();\n }",
"public static void main(String[] args) {\n Queue<QueueData> q1 = new LinkedList<>();\n List<String> testArList = new ArrayList<>();\n testArList.add(0, \"1\");\n for (int i = 0; i < 10; i++){\n // ArrayList의 add와 같은 기능을 가졌다.\n // 하지만, 자료구조의 특성상, 특정 인덱스에 add하는 메소드는 없다.\n q1.add(new QueueData(i, (int) (Math.random() * 1000)));\n }\n System.out.println(q1);\n // peek() : 0번째 인덱스 즉 head에 해당하는 데이터를 살펴본다. 해당 데이터가 없을 경우\n // null이 출력된다. 검색된 데이터는 삭제되지 않고 그대로 남는다.\n System.out.println(q1.peek());\n System.out.println(\"peek\");\n System.out.println(q1);\n\n // element() : peek과 동일한 기능을 가졌지만, 차이점은 해당 데이터가 없을때,\n // 예외처리를 해준다.\n System.out.println(q1.element());\n System.out.println(\"element\");\n System.out.println(q1);\n\n // Enqueue : 추가\n q1.offer(new QueueData(q1.size(), (int) (Math.random() * 1000))); // 실패시 예외발생\n System.out.println(\"offer\");\n System.out.println(q1);\n q1.add(new QueueData(q1.size(), (int) (Math.random() * 1000))); // 실패시 false 리턴\n System.out.println(\"add\");\n System.out.println(q1);\n\n // Dequeue : 삭제\n q1.remove(); // 삭제 실패시, 예외 발생\n System.out.println(\"remove\");\n System.out.println(q1);\n System.out.println(\"poll\");\n q1.poll(); // 실패시 false 리턴\n System.out.println(q1);\n \n // 조건부 삭제\n System.out.println(\"remove if idx % 10 == 0\");\n q1.removeIf(queueData -> queueData.idx % 10 == 0);\n System.out.println(q1);\n\n // priority Queue(우선순위 큐)\n // 가장 가중치가 낮은 순서로 poll, peek()을 할 수 있는 자료구조다.\n // Min Heap로 데이터를 sort 시켜놓고 출력하는 자료구조.\n // 데이터의 크기를 뒤죽박죽 아무렇게 넣어도 의도에 따라 오름차순 혹은 내림차순으로\n // poll(), peek() 할 수 있다.\n Queue<QueueData> pQueue = new PriorityQueue<>();\n pQueue.add(new QueueData(0, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(9, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(2, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(5, (int) (Math.random() * 1000)));\n pQueue.add(new QueueData(4, (int) (Math.random() * 1000)));\n\n System.out.println(pQueue.poll());\n System.out.println(pQueue.poll());\n System.out.println(pQueue.poll());\n System.out.println(pQueue.poll());\n System.out.println(pQueue.remove()); // 더이상 삭제할 수 없을 때, 예외처리(프로그램 종료)\n System.out.println(pQueue.poll()); // 더이상 삭제할 수 없을 때, null 출력\n System.out.println(pQueue.size());\n }",
"myQueue(int size){\n }",
"public Stack()\n {\n ll = new LinkedList<>();\n }",
"public Deque() {\n first = null;\n last = null;\n }",
"public ArrayPriorityQueue()\n { \n\tqueue = new ArrayList();\n }",
"public DesignMyStack225LeetCode() {\n queue = new LinkedList();\n }",
"public I0304MyQueue() {\n nums = new Stack<>();\n temp = new Stack<>();\n }",
"public Deque() {\n }",
"public RandomizedQueue() { }",
"public MyStack() {\n q1= new LinkedList();\n q2= new LinkedList();\n }",
"public Queue() {\n\t\tthis.front = null;\n\t\tthis.end = null;\n\t\tthis.current = null;\n\t}",
"static void dump(Queue queue) {\n String temp = \" queue = \";\n System.out.print(temp);\n while (queue.isEmpty()) {\n System.out.println(((TreeNode) queue.remove()).data + \" \");\n }\n }",
"Queue<IMotion> addToQueue(Queue<IMotion> motionQueue);",
"public MyQueue() {\n s1 = new Stack<Integer>();\n s2 = new Stack<Integer>();\n }",
"private IOHandler(){\n download_queue = new ArrayList<>(); \n initialize();\n }",
"public 用栈实现队列() {\n stack1 = new LinkedList<>();\n stack2 = new LinkedList<>();\n }",
"ValueQueue() { super(); }",
"void enqueue(T data) \n { \n \n // Create a new LL node \n LinkedListQueue temp = new LinkedListQueue(data); \n \n // If queue is empty, then new node is front and rear both \n if (this.rear == null) { \n this.front = this.rear = temp; \n return; \n } \n \n // Add the new node at the end of queue and change rear \n this.rear.next = temp; \n this.rear = temp; \n }",
"public MyQueue() { //使用两个栈\n temp1 = new Stack<>();\n temp2 = new Stack<>();\n }",
"public void initQueue() {\n ListEntry defaultEntry = new ListEntry(0, 0);\n accumulate.add(defaultEntry);\n\n }",
"public LinkedList(){\n size=0;\n }",
"public Deque() {\n size = 0;\n\n }",
"public Deque() {\n first = null;\n last = null;\n N = 0;\n }",
"public static void main(String[] args)throws Exception {\n\t\t IQueue queue=new Queue_using_LL();\n\t\t queue.enqueue(10);\n\t\t queue.enqueue(20);\n\t\t queue.enqueue(30);\n\t\t queue.display();\n\t\t queue.dequeue();\n\t\t queue.display();\n\tSystem.out.println( queue.size());\n\t\t\n\t}",
"@Override\n\tpublic void queue(T element) {\n\t\tLinkElement<T> linkElement = new LinkElement<T>(element);\n\n\t\tif ( last != null )\n\t\t\tlast.setPrevLinkElement(linkElement);\t// ensure previous last element refers to new last element.\n\t\t\n\t\tlast = linkElement;\n\t\t\n\t\tif (head == null)\n\t\t\thead = linkElement;\t// the first element on the queue, so becomes the head.\n\t}",
"public MyStack() {\n q1 = new LinkedList();\n q2 = new LinkedList();\n }",
"public static void main(String[] args) {\n Queue<Integer> q = new LinkedList<Integer>();\n q.add(10);\n q.add(5);\n q.add(15);\n System.out.println(q.peek());\n System.out.println(q.poll());\n System.out.println(q.peek());\n System.out.println(q.size());\n }",
"private void putOneQueue(BlockingQueue q, List buffer) throws InterruptedException {\n q.put(buffer);\n// System.err.println(Thread.currentThread().getName() + \"[MC] puts \" + buffer.size() + \" on \" + q.hashCode() + \" done\");\n// System.err.println(Thread.currentThread().getName() + \"[MC] puts \" + buffer.size() + \" on \" + q.hashCode() + \" first record \" + buffer.get(0));\n }",
"public MyStack() {\n\t q=new LinkedList<Integer>();\n\t }"
]
| [
"0.7229233",
"0.7215364",
"0.7041703",
"0.70143104",
"0.6972934",
"0.69627136",
"0.69344205",
"0.6908984",
"0.68795365",
"0.6876949",
"0.68736434",
"0.6851742",
"0.6842753",
"0.68362063",
"0.68010795",
"0.6779987",
"0.6772353",
"0.67689157",
"0.6756113",
"0.67386335",
"0.6725966",
"0.6725124",
"0.6702565",
"0.66409266",
"0.66390014",
"0.6633804",
"0.6633804",
"0.6625471",
"0.6625102",
"0.6622157",
"0.6621968",
"0.6575631",
"0.655935",
"0.6552819",
"0.65419745",
"0.65325373",
"0.65136445",
"0.6496158",
"0.64778656",
"0.6471374",
"0.64576226",
"0.6427151",
"0.64164776",
"0.6404647",
"0.63882303",
"0.6366271",
"0.6356199",
"0.6298849",
"0.62835014",
"0.6269432",
"0.62628406",
"0.62443554",
"0.62405765",
"0.62390023",
"0.62287825",
"0.6227036",
"0.6219818",
"0.6219462",
"0.62080073",
"0.61989456",
"0.6185922",
"0.61787397",
"0.61747724",
"0.61747724",
"0.61745787",
"0.6167598",
"0.6152019",
"0.61439306",
"0.61381567",
"0.6137125",
"0.61365294",
"0.6128401",
"0.6121186",
"0.6078232",
"0.6060112",
"0.6060104",
"0.60450786",
"0.6044386",
"0.6035772",
"0.6025482",
"0.60202664",
"0.60060304",
"0.6002733",
"0.6001687",
"0.5987556",
"0.59803164",
"0.5970729",
"0.59699",
"0.5957182",
"0.59538376",
"0.59494275",
"0.5938882",
"0.5934182",
"0.59276944",
"0.5926457",
"0.5926172",
"0.59239703",
"0.59079",
"0.589988",
"0.58923954",
"0.5892037"
]
| 0.0 | -1 |
1. Remove old ones before the lower boundary 2. Add / log the new time 3. get the boundary size 4. check if size is less than the max allowed 5. Allow if inside the upper bound | @Override
boolean allow() {
long curTime = System.currentTimeMillis()/1000 * 1000;
long boundary = curTime - 1000;
synchronized (log) {
//1. Remove old ones before the lower boundary
while (!log.isEmpty() && log.element() <= boundary) {
log.poll();
}
//2. Add / log the new time
log.add(curTime);
boolean allow = log.size() <= maxReqPerUnitTime;
System.out.println(curTime + ", log size = " + log.size()+", allow="+allow);
return allow;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void removeOverTime(){\r\n\t\tlong latest = timeQueue.getLast();\r\n\t\twhile( !timeQueue.isEmpty() && overlapRatioQueue.isEmpty() ){\r\n\t\t\tlong temp = timeQueue.getFirst();\r\n\t\t\tif( latest - temp > SMOOTING_INTERVAL ){\r\n\t\t\t\ttimeQueue.removeFirst();\r\n\t\t\t\toverlapRatioQueue.removeFirst();\r\n\t\t\t}else{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"protected void checkSize()\n {\n // check if pruning is required\n if (m_cCurUnits > m_cMaxUnits)\n {\n synchronized (this)\n {\n // recheck so that only one thread prunes\n if (m_cCurUnits > m_cMaxUnits)\n {\n prune();\n }\n }\n }\n }",
"public void cleanupOldBlocks (long threshTime) ;",
"void checkAndUpdateBoundary(Integer requiredChange);",
"@Override\n public long estimateSize(){\n return ((long)upTo)-from+last;\n }",
"@Override\n public long getTimeBucket(long time)\n {\n if (time < start) {\n return -1;\n }\n long diffFromStart = time - fixedStart;\n long key = diffFromStart / bucketSpanMillis;\n if (time >= end) {\n long diffInBuckets = (time - end) / bucketSpanMillis;\n long move = (diffInBuckets + 1) * bucketSpanMillis;\n start += move;\n end += move;\n // trigger purge when lower bound changes\n triggerPurge = (move > 0);\n if (triggerPurge) {\n lowestPurgeableTimeBucket = ((start - fixedStart) / bucketSpanMillis) - 2;\n }\n }\n return key;\n\n }",
"private int calculateResizeThreshold() {\n\t\treturn (buffer.length >> 2) * 3;\n\t}",
"protected abstract boolean reachedContractLimit(int size);",
"@Test\n public void testMaybeScheduleStartAlarmLocked_SmallRollingQuota_UpdatedBufferSize() {\n setDeviceConfigLong(QcConstants.KEY_IN_QUOTA_BUFFER_MS,\n mQcConstants.IN_QUOTA_BUFFER_MS * 2);\n\n runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_AllowedTimeCheck();\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE).clear();\n runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_MaxTimeCheck();\n }",
"private void d() {\n Queue<c> queue;\n Queue<c> queue2 = queue = i;\n synchronized (queue2) {\n long l2 = System.currentTimeMillis();\n Iterator iterator = i.iterator();\n while (iterator.hasNext()) {\n if (l2 - ((c)iterator.next()).a < 60000L) continue;\n iterator.remove();\n }\n if (i.size() >= 15) {\n for (int i2 = 0; i2 < 5; ++i2) {\n i.remove();\n }\n }\n return;\n }\n }",
"private void updateQueueSize() {\n\t\tsims.minQS = state.queueSize < sims.minQS ? state.queueSize : sims.minQS;\n\t\tsims.maxQS = state.queueSize > sims.maxQS ? state.queueSize : sims.maxQS;\n\t}",
"private void checkAndModifySize() {\r\n if (size == data.length * LOAD_FACTOR) {\r\n resizeAndTransfer();\r\n }\r\n }",
"private void setMaxThreshold() {\n maxThreshold = value - value * postBoundChange / 100;\n }",
"private void grow() {\n final int new_size = Math.min(size * 2, Const.MAX_TIMESPAN);\n if (new_size == size) {\n throw new AssertionError(\"Can't grow \" + this + \" larger than \" + size);\n }\n values = Arrays.copyOf(values, new_size);\n qualifiers = Arrays.copyOf(qualifiers, new_size);\n }",
"@Override\n public void synchronizeMinMaxNFreshs() {\n\t\n }",
"@Test\n public void testMaybeScheduleStartAlarmLocked_SmallRollingQuota_UpdatedMaxTime() {\n setDeviceConfigLong(QcConstants.KEY_MAX_EXECUTION_TIME_MS,\n mQcConstants.MAX_EXECUTION_TIME_MS / 2);\n\n runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_AllowedTimeCheck();\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE).clear();\n runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_MaxTimeCheck();\n }",
"void TruncPopulationAvgSize(double scale){\n\t\t\tint i,j;\n\t\t\tnode[] _nm;\n\t\t \tdouble sumSize,sizeThreshold; \t\n\t\t \t\n//\t\t \tdouble fitnessBefore;\n//\t\t \tdouble fitnessAfter;\n\t\t \t\n//\t\t\tdouble TheBestPrune, TheBestNotPrune;\n//\t\t \tdouble sumNotPrune, sumBeforePrune, sumAfterPrune;\n\t\t \t\n//\t\t \tlong starttime = System.currentTimeMillis();\n\t\t \t\n\t\t \tg_numberTrunc=0;\t\t \n\t\t \tg_TimePartTrunc=0.0;\n\t\t \tg_numTruncFalse=0;\n\t\t \t\n\t\t \t \t\t \n\t\t \tsumSize = oldpop[0].size;\n\t\t\t\n\t\t\tfor(i = 1; i < poplen; i++) {\t\t\t\t\n\t\t\t\tsumSize += oldpop[i].size;//\t\t\t\t\n\t\t\t}\n\t\t\t\n//\t\t\tSystem.out.println(\"Tong:\"+sumSize);\n\t\t\tsumSize=sumSize /poplen;\n//\t\t\tSystem.out.println(\"Avg:\"+sumSize);\n\t\t\tsizeThreshold=sumSize+scale*sumSize;\n//\t\t\tSystem.out.println(\"Nguong:\"+sizeThreshold);\n\t\t \t\n//\t\t \tSystem.out.println(numIndiviadual);\n//\t\t\tTheBestPrune=HUGE_VAL;\n//\t\t \tTheBestNotPrune=HUGE_VAL;\n//\t\t \tsumNotPrune=0.0;\n//\t\t \tsumBeforePrune=0.0;\n//\t\t \tsumAfterPrune=0.0;\n\t\t \t\n\t\t\tfor(i = 0; i < poplen; i++){\n\t\t\t\t\n\t\t\t\tif(oldpop[i].size>sizeThreshold){\n//\t\t\t\t\tSystem.out.println(\"Vi tri:\"+i);\n\t\t\t\t\tindividual[] m_individual=new individual[1];\n\t\t\t\t\tint[] _mt=new int[1];\n\t\t\t\t\t_nm=new node[1];\n\t\t\t\t\t\n\t\t\t\t\t//=====\n//\t\t\t\t\tif(oldpop[i].evaluated==FALSE){\n//\t\t\t\t\t\tfitnessBefore=ComputeRF(oldpop[i]);\n//\t\t\t\t\t}\n//\t\t\t\t\telse\n//\t\t\t\t\t{\n//\t\t\t\t\t\tfitnessBefore=oldpop[i].oldfitness;\n//\t\t\t\t\t}\n\t\t\t\t\t//====\n\t\t\t\t\t\n\t//\t\t\t\tSystem.out.println(\"Trước+\"+oldpop[i].size);\n\t\t\t\t\tif(this.TruncateTreeGrow(oldpop[i], m_individual,_mt,_nm)==TRUE){\t\n\t\t\t\t\t\t\n\t\t\t\t\t\toldpop[i]=new individual();\n\t\t\t\t\t\toldpop[i].CopyIndividual(m_individual[0], TRUE);\t\t\t\n\t\t\t\t\t\toldpop[i].evaluated=FALSE;\n\t\t//\t\t\t\tSystem.out.println(\"Sau+\"+oldpop[i].size);\n//\t\t\t\t\t\tfitnessAfter=ComputeRF(oldpop[i]);\n//\t\t\t\t\t\toldpop[i].oldfitness=fitnessAfter;\n//\t\t\t\t\t\toldpop[i].fitness=fitnessAfter;\n//\t\t\t\t\t\toldpop[i].evaluated=TRUE;\n\t\t\t\t\t\t\n\t\t\t\t\t\tg_numTrunc++;\n\t\t\t\t\t\t//=====================\n//\t\t\t\t\t\tsumBeforePrune=sumBeforePrune+fitnessBefore;\n//\t\t\t\t\t\tsumAfterPrune=sumAfterPrune+fitnessAfter;\t\t\t\t\t\n//\t\t\t\t\t\tif(TheBestPrune>fitnessAfter){\n//\t\t\t\t\t\t\tTheBestPrune=fitnessAfter;\n//\t\t\t\t\t\t}\n\t\t\t\t\t\t//================================\n\t\t\t\t\t\t\n//\t\t\t\t\t\tDecreaseAllFitness=DecreaseAllFitness+(fitnessBefore-fitnessAfter);\n//\t\t\t\t\t\tif(fitnessAfter<=fitnessBefore){\n//\t\t\t\t\t\t\tg_numOfBetter++;\t\t\t\t\t\t\n//\t\t\t\t\t\t\tDecreaseFitness=DecreaseFitness+(fitnessBefore-fitnessAfter);\n//\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n//\t\t\t\t\telse{\n//\t\t\t\t\t\tsumNotPrune=sumNotPrune+fitnessBefore;\n//\t\t\t\t\t\tif(TheBestNotPrune>fitnessBefore){\n//\t\t\t\t\t\t\tTheBestNotPrune=fitnessBefore;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\n//\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n//\t\t\t\telse\n//\t\t\t\t{\n//\t\t\t\t\tif(oldpop[i].evaluated==FALSE){\n//\t\t\t\t\t\tfitnessBefore=ComputeRF(oldpop[i]);\n//\t\t\t\t\t}\n//\t\t\t\t\telse\n//\t\t\t\t\t{\n//\t\t\t\t\t\tfitnessBefore=oldpop[i].oldfitness;\n//\t\t\t\t\t}\n//\t\t\t\t\t\n//\t\t\t\t\tsumNotPrune=sumNotPrune+fitnessBefore;\n//\t\t\t\t\tif(TheBestNotPrune>fitnessBefore){\n//\t\t\t\t\t\tTheBestNotPrune=fitnessBefore;\n//\t\t\t\t\t}\t\t\n//\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//new\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tnumberTrunc[gen]=g_numberTrunc;\t\t\t\n\t\t\tTimePartTrunc[gen]=g_TimePartTrunc;\n\t\t\t\n\t\t\t\n\t\t\t\n//\t\t\t// Gan cac gia tri \n//\t\t\tavgFitnessNotPrune[gen]=sumNotPrune/(1.0*(poplen-g_numTrunc));\n//\t\t\t\t\t\t\n//\t\t\tavgFitnessBeforePrune[gen]=sumBeforePrune/(1.0*g_numTrunc);\t\t\t\n//\t\t\tavgFitnessAfterPrune[gen]=sumAfterPrune/(1.0*g_numTrunc);\n//\t\t\t\t\t\t\n//\t\t\tTheBestFitnessNotPrune[gen]=TheBestNotPrune;\n//\t\t\tTheBestFitnessPrune[gen]=TheBestPrune;\n//\t\t\t\t\n//\t\t\tif(TheBestNotPrune<TheBestPrune){\n//\t\t\t\tTheBestInNotPrune[gen]=1;\n//\t\t\t}\n//\t\t\telse{\n//\t\t\t\tTheBestInNotPrune[gen]=0;\n//\t\t\t}\n//\t\t\t\t\t\t\t\t\t\n//\t\t\tavgFitnessAllPopBefore[gen]=(sumNotPrune+sumBeforePrune)/(1.0*poplen);\t\t\t\n//\t\t\tavgFitnessAllPopAfter[gen]=(sumNotPrune+sumAfterPrune)/(1.0*poplen);\n//\t\t\t\t\t\t\n//\t\t\t\t\t\t\n//\t\t\t\t\t\tif(sumBeforePrune<sumAfterPrune)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tTheBestAvgInAllPopBefore[gen]=1;\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\tTheBestAvgInAllPopBefore[gen]=0;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\n//\t\t\t\t\t\t\n//\t\t\t\t\t\tif(avgFitnessNotPrune[gen]<avgFitnessAfterPrune[gen])\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tTheBestAvgInNotPrune[gen]=1;\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\tTheBestAvgInNotPrune[gen]=0;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//===========================\n\t\t}",
"private int cleanupSegmentsToMaintainSize(Log log) {\n if (log.config.retentionSize < 0 || log.size() < log.config.retentionSize)\n return 0;\n\n final AtomicLong diff = new AtomicLong(log.size() - log.config.retentionSize);\n\n return log.deleteOldSegments(new Predicate<LogSegment>() {\n @Override\n public boolean apply(LogSegment segment) {\n if (diff.get() - segment.size() >= 0) {\n diff.addAndGet(-segment.size());\n return true;\n } else {\n return false;\n }\n }\n });\n }",
"@Test\n public void testGetTimeUntilQuotaConsumedLocked_QuotaBump() {\n setDeviceConfigLong(QcConstants.KEY_QUOTA_BUMP_ADDITIONAL_DURATION_MS, MINUTE_IN_MILLIS);\n setDeviceConfigLong(QcConstants.KEY_QUOTA_BUMP_WINDOW_SIZE_MS, 8 * HOUR_IN_MILLIS);\n\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n // Close to RARE boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (24 * HOUR_IN_MILLIS - 30 * SECOND_IN_MILLIS),\n 30 * SECOND_IN_MILLIS, 5), false);\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE)\n .add(new QuotaBump(now - 16 * HOUR_IN_MILLIS));\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE)\n .add(new QuotaBump(now - 12 * HOUR_IN_MILLIS));\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE)\n .add(new QuotaBump(now - 8 * HOUR_IN_MILLIS));\n // Far away from FREQUENT boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (7 * HOUR_IN_MILLIS), 3 * MINUTE_IN_MILLIS, 5), false);\n // Overlap WORKING_SET boundary.\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE)\n .add(new QuotaBump(now - 2 * HOUR_IN_MILLIS));\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (2 * HOUR_IN_MILLIS + MINUTE_IN_MILLIS),\n 3 * MINUTE_IN_MILLIS, 5), false);\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE)\n .add(new QuotaBump(now - 15 * MINUTE_IN_MILLIS));\n // Close to ACTIVE boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (9 * MINUTE_IN_MILLIS), 3 * MINUTE_IN_MILLIS, 5), false);\n\n setStandbyBucket(RARE_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(3 * MINUTE_IN_MILLIS + 30 * SECOND_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(4 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n setStandbyBucket(FREQUENT_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(4 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(4 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n setStandbyBucket(WORKING_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(8 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(10 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n // ACTIVE window = allowed time, so jobs can essentially run non-stop until they reach the\n // max execution time.\n setStandbyBucket(ACTIVE_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(10 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(mQcConstants.MAX_EXECUTION_TIME_MS - 9 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n }",
"@Override\n public void addEvictionGuard(RangeSet<Long> ranges) {\n\n }",
"private boolean outOfBounds(long n) {\n return n < 0 || n >= getSize();\n }",
"public void addFreezeFrame()\n{\n int index = Collections.binarySearch(_freezeFrames, getTime());\n if(index<0)\n _freezeFrames.add(-index - 1, getTime());\n}",
"private static void loopWithCheck(int upperLimit, QuitObject q) {\r\n\t\t\tint i;\r\n\t\t\tdouble temp;\r\n\t\t\t\r\n\t\t\tfor (i=0; i<upperLimit; i++) {\r\n\t\t\t\tif(q.getGreaterThan()==q.getLessThan()){\r\n\t\t\t\t\tq.setFinalCount(i+10000);\r\n\t\t\t\t\tq.setStatus(1);\r\n\t\t\t\t\tquitProgram(q);\r\n\t\t\t\t}\r\n\t\t\t\ttemp = Math.random();\r\n\t\t\t\tif (temp > 0.5) {\r\n\t\t\t\t\tq.addOneGreaterThan();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tq.addOneLessThan();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tq.setFinalCount(i+10000);\r\n\t\t\tq.setStatus(2);\r\n\t\t\tquitProgram(q);\r\n\t\t\t\r\n\t\t}",
"Limits limits();",
"public void honourMaxCount() {\n // Get free and total counts\n int freeCount = getFreeLaunchers().size();\n int totalCount = getTotalLaunchers().size();\n\n // Scale down if max is exceeded, irrespective of free buffer count\n if (totalCount > maxCount) {\n log.info(\"Scaling down until [freeBufferCount] \" + freeBufferCount + \" is met since [Max Count] \"\n + maxCount + \" has been exceeded.\");\n\n while (freeCount <= freeBufferCount){\n log.info(\"Scaling DOWN: REASON -> [Total Count] \" + totalCount + \" > [Max Count] \" + maxCount);\n scaleDown();\n freeCount = getFreeLaunchers().size();\n }\n\n totalCount = getTotalLaunchers().size();\n freeCount = getFreeLaunchers().size();\n\n log.info(\"Stats after scale down operation: [Total Count] \" + totalCount + \", [Free Count] \" + freeCount);\n\n return;\n }\n\n // Don't scale down if there are not enough free launchers\n if (freeCount <= freeBufferCount) {\n log.info(\"Not scaling down since [Free Count] \" + freeCount + \" <= [Free Buffer Size] \" +\n freeBufferCount + \"...\");\n return;\n }\n\n // Don't scale down if the desired count is not exceeded\n if (totalCount <= desiredCount) {\n log.info(\"Not scaling down since [Total Count] \" + totalCount + \" <= [Desired Count] \" +\n desiredCount + \"...\");\n return;\n }\n\n // Scale down if desired count is exceeded, but with more free launchers than buffer count by stepDown count\n // TODO: to test scale down\n if ((freeCount - stepDown) >= freeBufferCount) {\n log.info(\"Scaling DOWN: REASON -> [Total Count] \" + totalCount + \" > [Desired Count] \" + desiredCount +\n \" AND [Free Count] - [Step Down] \" + freeCount + \" - \" + stepDown +\n \" >= [Free Buffer Count] \" + freeBufferCount);\n\n scaleDown();\n return;\n }\n\n // If after scaling down there wouldn't be enough free launchers, don't scale down\n log.info(\"Not scaling down since [Free Count] + [Step Down] \" + freeCount + \" + \" + stepDown +\n \" < [Free Buffer Count] \" + freeBufferCount);\n }",
"protected boolean checkLoad() {\n\t\treturn size <= maxThreshold;\n\t\t//return (size >= minThreshold || size <= minCapacity) && size <= maxThreshold;\n\t}",
"@Test\n public void testGetTimeUntilQuotaConsumedLocked_MaxExecution() {\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n // Overlap boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(\n now - (24 * HOUR_IN_MILLIS + 8 * MINUTE_IN_MILLIS), 4 * HOUR_IN_MILLIS, 5),\n false);\n\n setStandbyBucket(WORKING_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(8 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n // Max time will phase out, so should use bucket limit.\n assertEquals(10 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE).clear();\n // Close to boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (24 * HOUR_IN_MILLIS - MINUTE_IN_MILLIS),\n 4 * HOUR_IN_MILLIS - 5 * MINUTE_IN_MILLIS, 5), false);\n\n setStandbyBucket(WORKING_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(5 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(10 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE).clear();\n // Far from boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(\n now - (20 * HOUR_IN_MILLIS), 4 * HOUR_IN_MILLIS - 3 * MINUTE_IN_MILLIS, 5),\n false);\n\n setStandbyBucket(WORKING_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(3 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(3 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n }",
"@Test\n public void testMaybeScheduleStartAlarmLocked_SmallRollingQuota_UpdatedAllowedTime() {\n setDeviceConfigLong(QcConstants.KEY_ALLOWED_TIME_PER_PERIOD_WORKING_MS,\n mQcConstants.ALLOWED_TIME_PER_PERIOD_WORKING_MS / 2);\n\n runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_AllowedTimeCheck();\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE).clear();\n runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_MaxTimeCheck();\n }",
"private void arrayIncreaaseSize(MyArrayList myArrayList, Results results) {\r\n int old_size = myArrayList.length();\r\n int value;\r\n Random rand = new Random();\r\n \r\n for(int i=0; i<50; i++) {\r\n value = rand.nextInt(10000);\r\n if(value < 0) {\r\n value = value * -1;\r\n }\r\n myArrayList.insertSorted(value);\r\n }\r\n if(myArrayList.length() == old_size + 25) {\r\n results.storeNewResult(\"ArrayIncrease test case: PASSED\");\r\n }\r\n else {\r\n results.storeNewResult(\"ArrayIncrease test case: FAILED\");\r\n }\r\n }",
"public synchronized int getLowerSizeLimit() {\n \t\treturn lower;\n \t}",
"public long writeTimeToWait(long size, long limitTraffic, long maxTime, long now)\r\n/* 320: */ {\r\n/* 321:574 */ bytesWriteFlowControl(size);\r\n/* 322:575 */ if ((size == 0L) || (limitTraffic == 0L)) {\r\n/* 323:576 */ return 0L;\r\n/* 324: */ }\r\n/* 325:578 */ long lastTimeCheck = this.lastTime.get();\r\n/* 326:579 */ long sum = this.currentWrittenBytes.get();\r\n/* 327:580 */ long lastWB = this.lastWrittenBytes;\r\n/* 328:581 */ long localWritingTime = this.writingTime;\r\n/* 329:582 */ long pastDelay = Math.max(this.lastWritingTime - lastTimeCheck, 0L);\r\n/* 330:583 */ long interval = now - lastTimeCheck;\r\n/* 331:584 */ if (interval > 10L)\r\n/* 332: */ {\r\n/* 333:586 */ long time = sum * 1000L / limitTraffic - interval + pastDelay;\r\n/* 334:587 */ if (time > 10L)\r\n/* 335: */ {\r\n/* 336:588 */ if (logger.isDebugEnabled()) {\r\n/* 337:589 */ logger.debug(\"Time: \" + time + ':' + sum + ':' + interval + ':' + pastDelay);\r\n/* 338: */ }\r\n/* 339:591 */ if ((time > maxTime) && (now + time - localWritingTime > maxTime)) {\r\n/* 340:592 */ time = maxTime;\r\n/* 341: */ }\r\n/* 342:594 */ this.writingTime = Math.max(localWritingTime, now + time);\r\n/* 343:595 */ return time;\r\n/* 344: */ }\r\n/* 345:597 */ this.writingTime = Math.max(localWritingTime, now);\r\n/* 346:598 */ return 0L;\r\n/* 347: */ }\r\n/* 348:601 */ long lastsum = sum + lastWB;\r\n/* 349:602 */ long lastinterval = interval + this.checkInterval.get();\r\n/* 350:603 */ long time = lastsum * 1000L / limitTraffic - lastinterval + pastDelay;\r\n/* 351:604 */ if (time > 10L)\r\n/* 352: */ {\r\n/* 353:605 */ if (logger.isDebugEnabled()) {\r\n/* 354:606 */ logger.debug(\"Time: \" + time + ':' + lastsum + ':' + lastinterval + ':' + pastDelay);\r\n/* 355: */ }\r\n/* 356:608 */ if ((time > maxTime) && (now + time - localWritingTime > maxTime)) {\r\n/* 357:609 */ time = maxTime;\r\n/* 358: */ }\r\n/* 359:611 */ this.writingTime = Math.max(localWritingTime, now + time);\r\n/* 360:612 */ return time;\r\n/* 361: */ }\r\n/* 362:614 */ this.writingTime = Math.max(localWritingTime, now);\r\n/* 363:615 */ return 0L;\r\n/* 364: */ }",
"public void add(int value) {\n expiryTime++;\n arrivalTime++;\n\n Bucket lastBucket = null;\n\n if (!buckets.isEmpty()) {\n // Check if timestamp of the last bucket indicates expiry\n lastBucket = buckets.get(buckets.size() - 1);\n if (lastBucket.isExpired(expiryTime)) {\n buckets.remove(lastBucket);\n // Update the counter LAST - containing size of the last bucket\n last = buckets.isEmpty() ? 0 : buckets.get(buckets.size() - 1).getSize();\n // Update TOTAL - size of all buckets\n total -= lastBucket.getSize();\n }\n }\n\n // 2\n // new element is 0 then ignore it\n if (value == 0) return;\n\n // if element is 1, create new bucket with size 1 and the current timestamp, increment TOTAL\n buckets.add(0, new Bucket(arrivalTime - 1));\n total++;\n\n // 3\n // traverse the list of buckets in order of increasing sizes\n int onesLimit = (int) k + 2;\n\n if (buckets.stream().filter(p -> p.getSize() == 1).count() >= onesLimit) {\n int otherLimit = (int) (k / 2) + 2;\n\n int limit = onesLimit;\n\n int mergeExponent = 0;\n int mergerBucketSize = (int) Math.pow(2, mergeExponent);\n\n ArrayList<Bucket> bucketsToMerge = new ArrayList<Bucket>();\n\n while (true) {\n\n for (Bucket bucket : buckets) {\n if (bucket.getSize() < mergerBucketSize) continue;\n\n if (bucket.getSize() > mergerBucketSize) break;\n\n if (bucket.getSize() == mergerBucketSize) {\n bucketsToMerge.add(bucket);\n } else {\n break;\n }\n }\n\n if (bucketsToMerge.size() != limit) {\n break;\n }\n\n // MERGE\n mergeExponent++;\n mergerBucketSize = (int) Math.pow(2, mergeExponent);\n limit = otherLimit;\n\n // Take two oldest buckets\n // we iterate from recent to oldest so take last 2 buckets from bucketsToMerge\n Bucket lastBucketToMerge = bucketsToMerge.get(bucketsToMerge.size() - 1);\n Bucket oneBeforeLastBucketToMerge = bucketsToMerge.get(bucketsToMerge.size() - 2);\n\n // If last bucket is being merged, update LAST counter\n if (oneBeforeLastBucketToMerge.getSize() == lastBucket.getSize()) {\n last = oneBeforeLastBucketToMerge.getSize() * 2;\n }\n\n // Update size of the most recent bucket with double size\n oneBeforeLastBucketToMerge.setSize(oneBeforeLastBucketToMerge.getSize() * 2);\n // remove last bucket\n buckets.remove(lastBucketToMerge);\n\n // Clear temp buckets\n bucketsToMerge = new ArrayList<Bucket>();\n }\n\n }\n }",
"protected void checkThreshold(int count) throws IOException\n {\n if (!thresholdExceeded && (written + count > threshold))\n {\n thresholdReached();\n thresholdExceeded = true;\n }\n }",
"private void runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_MaxTimeCheck() {\n spyOn(mQuotaController);\n doNothing().when(mQuotaController).maybeScheduleCleanupAlarmLocked();\n\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStartTrackingJobLocked(\n createJobStatus(\"testMaybeScheduleStartAlarmLocked\", 1), null);\n }\n\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n // Working set window size is 2 hours.\n final int standbyBucket = WORKING_INDEX;\n final long contributionMs = mQcConstants.IN_QUOTA_BUFFER_MS / 2;\n final long remainingTimeMs = mQcConstants.MAX_EXECUTION_TIME_MS - contributionMs;\n\n // Session straddles edge of 24 hour window. Only the contribution should be counted towards\n // the quota.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (24 * HOUR_IN_MILLIS + 3 * MINUTE_IN_MILLIS),\n 3 * MINUTE_IN_MILLIS + contributionMs, 3), false);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - 20 * HOUR_IN_MILLIS, remainingTimeMs, 300), false);\n // Expected alarm time should be when the app will have QUOTA_BUFFER_MS time of quota, which\n // is 24 hours + (QUOTA_BUFFER_MS - contributionMs) after the start of the second session.\n final long expectedAlarmTime = now - 20 * HOUR_IN_MILLIS\n + 24 * HOUR_IN_MILLIS\n + (mQcConstants.IN_QUOTA_BUFFER_MS - contributionMs);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, standbyBucket);\n }\n verify(mAlarmManager, timeout(1000).times(1)).setWindow(\n anyInt(), eq(expectedAlarmTime), anyLong(), eq(TAG_QUOTA_CHECK), any(), any());\n }",
"private static int getApproximateMaxSize(int maxSizeFromConfig) {\n // because not to exceed the max size much we start eviction early.\n // so decrease the max size with ratio .95 below\n return maxSizeFromConfig * EVICTION_START_THRESHOLD_PERCENTAGE / ONE_HUNDRED_PERCENT;\n }",
"@Override\n public void prune(long boundaryValue)\n {\n Iterator<MemorySegment> iterator = segments.iterator();\n while(iterator.hasNext())\n {\n MemorySegment segment = iterator.next();\n if(segment.lastVal() < boundaryValue)\n {\n iterator.remove();\n }\n }\n\n //Note: This maintains a currentSegment even if all segments have\n // been pruned.\n if(segments.size() == 0)\n {\n addSegment();\n }\n }",
"private void runTestMaybeScheduleStartAlarmLocked_SmallRollingQuota_AllowedTimeCheck() {\n spyOn(mQuotaController);\n doNothing().when(mQuotaController).maybeScheduleCleanupAlarmLocked();\n\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeStartTrackingJobLocked(\n createJobStatus(\"testMaybeScheduleStartAlarmLocked\", 1), null);\n }\n\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n // Working set window size is 2 hours.\n final int standbyBucket = WORKING_INDEX;\n final long contributionMs = mQcConstants.IN_QUOTA_BUFFER_MS / 2;\n final long remainingTimeMs =\n mQcConstants.ALLOWED_TIME_PER_PERIOD_WORKING_MS - contributionMs;\n\n // Session straddles edge of bucket window. Only the contribution should be counted towards\n // the quota.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (2 * HOUR_IN_MILLIS + 3 * MINUTE_IN_MILLIS),\n 3 * MINUTE_IN_MILLIS + contributionMs, 3), false);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - HOUR_IN_MILLIS, remainingTimeMs, 2), false);\n // Expected alarm time should be when the app will have QUOTA_BUFFER_MS time of quota, which\n // is 2 hours + (QUOTA_BUFFER_MS - contributionMs) after the start of the second session.\n final long expectedAlarmTime = now - HOUR_IN_MILLIS + 2 * HOUR_IN_MILLIS\n + (mQcConstants.IN_QUOTA_BUFFER_MS - contributionMs);\n synchronized (mQuotaController.mLock) {\n mQuotaController.maybeScheduleStartAlarmLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE, standbyBucket);\n }\n verify(mAlarmManager, timeout(1000).times(1)).setWindow(\n anyInt(), eq(expectedAlarmTime), anyLong(), eq(TAG_QUOTA_CHECK), any(), any());\n }",
"private void removeInvalidFromPool()\r\n\t{\r\n\t\tint i;\r\n\t\tint size_mature_pool;\r\n\t\tint idx_1st_oldest;//index of the oldest individual\r\n\t\tint idx_2nd_oldest;//index of the 2nd oldest individual\r\n\t\tint idx_to_remove;//index of an chromosome which has to be removed\r\n\t\tint idx_current;//index of currently checked genotype\r\n\t\tint num_errors;//number of errors of the current chromosome\r\n\t\tint max_num_errors;//maximum numbers of stored errors among checked chromosomes\r\n\t\tdouble error_1st_oldest;//average error of the oldest individual\r\n\t\tdouble error_2nd_oldest;//average error of the 2nd oldest individual\r\n\t\tdouble max_error;//largest error among the oldest individuals\r\n\t\tVector<Integer> idx_oldest;//indices of all chromosomes with a life span larger than a predefined threshold\r\n\t\t\r\n\t\tsize_mature_pool = _pool_of_bests.size();\r\n\t\t\r\n\t\t//if the maturity pool is full and none of the genotypes could be removed above because of module outputs\r\n\t\t//then remove one of the oldest individuals according to the errors\r\n\t\tif(_pool_of_bests.size()==_size_pool_of_bests)\r\n\t\t{\r\n\t\t\tidx_oldest = new Vector<Integer>(0, 1);\r\n\t\t\t\r\n\t\t\t//find all oldest genotypes\r\n\t\t\tfor(i=0; i<size_mature_pool; i++)\r\n\t\t\t{\r\n\t\t\t\tnum_errors = _pool_of_bests.get(i)._error.all_single_squares.size();\r\n\t\t\t\tif(num_errors>=_min_life_span)\r\n\t\t\t\t{\r\n\t\t\t\t\tidx_oldest.add(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//1) find the worst oldest gentypes with a span above a threshold\r\n\t\t\t//2) do not remove a single genotype without comparison;\r\n\t\t\t// it could have very high performance\r\n\t\t\tif(idx_oldest.size() > 1)\r\n\t\t\t{\r\n\t\t\t\tidx_to_remove = idx_oldest.get(0);\r\n\t\t\t\tmax_error = _pool_of_bests.get(idx_to_remove)._error.getAverageError();\r\n\t\t\t\tfor(i=idx_to_remove+1; i<idx_oldest.size(); i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tidx_current = idx_oldest.get(i);\r\n\t\t\t\t\tif(max_error < _pool_of_bests.get(idx_current)._error.getAverageError())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tidx_to_remove = idx_current;\r\n\t\t\t\t\t\tmax_error = _pool_of_bests.get(idx_to_remove)._error.getAverageError();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse//remove the worst of two oldest genotypes if none of genotypes had span above the threshold\r\n\t\t\t{\r\n\t\t\t\t//find the oldest and 2nd oldest individuals\r\n\t\t\t\tidx_1st_oldest = -1;\r\n\t\t\t\tmax_num_errors = 0;\r\n\t\t\t\tfor(i=0; i<size_mature_pool; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t//\"[0]\" because the number of errors is equal for all sub-individuals of the same individual\r\n\t\t\t\t\tnum_errors = _pool_of_bests.get(i)._error.all_single_squares.size();\r\n\t\t\t\t\tif(max_num_errors < num_errors)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmax_num_errors = num_errors;\r\n\t\t\t\t\t\tidx_1st_oldest = i;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//find the 2nd oldest individuals\r\n\t\t\t\tidx_2nd_oldest = -1;\r\n\t\t\t\tif(size_mature_pool > 1)//the 2nd oldest individual exists if there are 2 or more individuals\r\n\t\t\t\t{\r\n\t\t\t\t\tmax_num_errors = 0;\r\n\t\t\t\t\tfor(i=0; i<size_mature_pool; i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(i!=idx_1st_oldest)//the oldest individual should be ignored\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t//\"[0]\" because the number of errors is equal for all sub-individuals of the same individual\r\n\t\t\t\t\t\t\tnum_errors = _pool_of_bests.get(i)._error.all_single_squares.size();\r\n\t\t\t\t\t\t\tif(max_num_errors < num_errors)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tmax_num_errors = num_errors;\r\n\t\t\t\t\t\t\t\tidx_2nd_oldest = i;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//compare performances of both oldest genotypes using their average errors;\r\n\t\t\t\terror_1st_oldest = _pool_of_bests.get(idx_1st_oldest)._error.getAverageError();\r\n\t\t\t\tif(idx_2nd_oldest!=-1)\r\n\t\t\t\t{\r\n\t\t\t\t\terror_2nd_oldest = _pool_of_bests.get(idx_2nd_oldest)._error.getAverageError();\r\n\r\n\t\t\t\t\tif(error_1st_oldest < error_2nd_oldest)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tidx_to_remove = idx_2nd_oldest;\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\tidx_to_remove = idx_1st_oldest;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse//a single individual must always be replaced\r\n\t\t\t\t{\r\n\t\t\t\t\tidx_to_remove = idx_1st_oldest;\r\n\t\t\t\t}\r\n\t\t\t}//are there genotypes with life span above a threshold?\r\n\t\t\t\r\n\t\t\t_pool_of_bests.remove(idx_to_remove);\r\n\t\t}//is maturity pool full?\r\n\t}",
"private boolean reachableGap(int a_xmin, int a_xmax, int pos)\n {\n boolean reachableGap = false;\n int destinationY = GEBT_MarioAgent.MARIO_Y;\n if(pos-1 > m_cellsRun)\n {\n destinationY = GEBT_MarioAgent.MARIO_Y + (pos - 1 - m_cellsRun);\n reachableGap = !isObstacle(GEBT_MarioAgent.MARIO_X-1, GEBT_MarioAgent.MARIO_X,GEBT_MarioAgent.MARIO_Y, destinationY);\n }\n else if(pos-1 < m_cellsRun)\n {\n destinationY = GEBT_MarioAgent.MARIO_Y + (pos - 1 - m_cellsRun);\n reachableGap = !isObstacle(GEBT_MarioAgent.MARIO_X-1, GEBT_MarioAgent.MARIO_X, destinationY, GEBT_MarioAgent.MARIO_Y);\n }\n else reachableGap = true;\n\n //2nd check, there must be space for me over the gap\n if(reachableGap)\n {\n boolean obsInTop = isObstacle(a_xmin, a_xmin, destinationY+1, destinationY+1); //Identify where the obstacle is.\n boolean obsInDown = isObstacle(a_xmax, a_xmax, destinationY+1, destinationY+1);\n int hMin = a_xmin, hMax = a_xmax;\n if(obsInTop && !obsInDown)\n {\n//hMin = a_xmax;//THIS IS BAD\n//hMax = a_xmax + 1;//THIS IS BAD\n\n hMin = a_xmin-2; //THIS IS GOOD\n hMax = a_xmax-2; //THIS IS GOOD\n }else if(obsInDown)\n {\n//hMin = a_xmin + 2;//THIS IS BAD\n//hMax = a_xmax + 2;//THIS IS BAD\n hMin = a_xmin-1;//THIS IS GOOD\n hMax = a_xmax-1;//THIS IS GOOD\n }\n\n boolean marioSmall = marioMode == 0;\n if(marioSmall) hMax = hMin;\n reachableGap = !isObstacle(hMin, hMax, destinationY+1, destinationY+1); //Check if there is space enough for Mario to jump.\n }\n\n return reachableGap;\n }",
"public static ArrayList<Integer>[] checkthresholdBiggest(int numberlocations, ArrayList<Integer>[] allocPolys, ArrayList<Double>[] polys, ArrayList<String>[] polysGeometry,List<Integer> neighbourPolyIds, ArrayList<Integer>[] neighbourNeighbours) throws SQLException{\n\t\tboolean satisfied=false;\n\t\tList<Integer> tempbufferlist = new ArrayList<Integer>();\n\t\t\n\t\tint lastPolyID=-1;\n\t\tint lastArea=-1;\n\t\tList<Integer> changedIds = new ArrayList<Integer>();\n\t\t\n\t\t//rearrange while no balance is achieved\n\t\twhile (!satisfied){\n\t\t\tint threshold = 30;\n\t\t\tint[] compCriterias = new int[numberlocations];\n\t\t\tfor (int i=0; i<numberlocations; i++) compCriterias[i]=0;\n\t\t\t\n\t\t\t//check balance\n\t\t\tfor (int i=0; i<numberlocations;i++){\n\t\t\t\tfor (int j=0;j<numberlocations;j++){\n\t\t\t\t\tif (j!=i){\n\t\t\t\t\t\tif (criteriaf[i]<criteriaf[j]){\n\t\t\t\t\t\t\tif (100-(criteriaf[j]*100/criteriaf[i])>-threshold)\n\t\t\t\t\t\t\t\tcompCriterias[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tif ((criteriaf[j]*100/criteriaf[i])-100< threshold)\n\t\t\t\t\t\t\t\tcompCriterias[i]++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tint no=0;\n\t\t\t\n\t\t\t//rearrange if balance is not reached, check every territory centre\n\t\t\tfor (int i=0; i<numberlocations;i++){\t\t\t\n\t\t\t\tif (compCriterias[i]!=(numberlocations-1)){\n\t\t\t\t\tdouble[] criteriaBuffer = new double[numberlocations];\n\t\t\t\t\t\n\t\t\t\t\tfor (int j=0; j<criteriaBuffer.length;j++){\n\t\t\t\t\t\tcriteriaBuffer[j]=criteriaf[j];\n\t\t\t\t\t}\n\n\t\t\t\t\t\n\t\t\t\t\t//sort activity measures from highest to smallest\n\t\t\t\t\t//criteriaBuffer[0] territory with highest activity measure\n\t\t\t\t\tfor (int j = 0; j < criteriaBuffer.length - 1; j++)\n\t\t\t {\n\t\t\t int index = j;\n\t\t\t for (int k = j + 1; k < criteriaBuffer.length; k++)\n\t\t\t if (criteriaBuffer[k] > criteriaBuffer[index])\n\t\t\t index = k;\n\t\t\t double greaterNumber = criteriaBuffer[index]; \n\t\t\t criteriaBuffer[index] = criteriaBuffer[j];\n\t\t\t criteriaBuffer[j] = greaterNumber;\n\t\t\t }\n\t\t\t\t\t\n\t\t\t\t\tint locBiggest=-1;\n\t\t\t\t\t\n\t\t\t\t\tfor (int j=0;j<numberlocations;j++){\n\t\t\t\t\t\tif (criteriaf[j]==criteriaBuffer[0]){\n\t\t\t\t\t\t\tlocBiggest=j;\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//determine neighbours of territory with highest activity measure\n\t\t\t\t\tList<Integer> actNeighbours = new ArrayList<Integer>();\n\t\t\t\t\t\n\t\t\t\t\tfor (int j=0;j<numberlocations;j++){\n\t\t\t\t\t\tif (j!=locBiggest){\n\t\t\t\t\t\t\tboolean neighbour=false;\n\t\t\t\t\t\t\tint pos=0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twhile (pos<allocPolys[locBiggest].size() && neighbour==false){\n\t\t\t\t\t\t\t\t//check every allocated basic area whether it is a neighbour of one of the basic areas of another territory\n\t\t\t\t\t\t\t\t//take basic area of locBiggest and check to every basic area of centre\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tint actPoly = allocPolys[locBiggest].get(pos);\n\t\t\t\t\t\t\t\tint posActPoly = neighbourPolyIds.indexOf(actPoly);\n\t\t\t\t\t\t\t\tboolean neighbourfound=false;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor(int k=0;k<allocPolys[j].size();k++){\n\t\t\t\t\t\t\t\t\tint comparePoly = allocPolys[j].get(k);\n\t\t\t\t\t\t\t\t\tfor (int l=0;l<neighbourNeighbours[posActPoly].size();l++){\n\t\t\t\t\t\t\t\t\t\tif (neighbourNeighbours[posActPoly].get(l).equals(comparePoly) && !neighbourfound){\n\t\t\t\t\t\t\t\t\t\t\tneighbour=true;\n\t\t\t\t\t\t\t\t\t\t\tactNeighbours.add(j);\n\t\t\t\t\t\t\t\t\t\t\tneighbourfound=true;\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}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tpos++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//determine that territory of neighboured territories with smallest activity measure\n\t\t\t\t\tdouble minsum=-1;\n\t\t\t\t\tboolean first=true;\n\t\t\t\t\tint locMinsum=-1;\n\t\t\t\t\t\n\t\t\t\t\tfor(int j=0;j<numberlocations;j++){\n\t\t\t\t\t\tboolean found=false;\n\t\t\t\t\t\tint posLoc=0;\n\t\t\t\t\t\twhile (!found){\n\t\t\t\t\t\t\tif (actNeighbours.get(posLoc)==j){\n\t\t\t\t\t\t\t\tif (first){\n\t\t\t\t\t\t\t\t\tfirst=false;\n\t\t\t\t\t\t\t\t\tminsum=criteriaf[j];\n\t\t\t\t\t\t\t\t\tlocMinsum=j;\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\tif (criteriaf[j]<minsum){\n\t\t\t\t\t\t\t\t\t\tlocMinsum=j;\n\t\t\t\t\t\t\t\t\t\tminsum=criteriaf[j];\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\t\t\t\t\t\t\tfound=true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ((posLoc+1)<actNeighbours.size()){\n\t\t\t\t\t\t\t\tposLoc++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tfound=true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//give locMinSum 1 basic area of locbiggest\n\t\t\t\t\tint polyID = allocPolys[locBiggest].get(0).intValue();\n\t\t\t\t\tSystem.out.println(polyID);\n\t\t\t\t\tdouble minDist = polys[locMinsum+1].get(polys[0].indexOf(Double.valueOf(polyID)));\n\t\t\t\t\t\n\t\t\t\t\tfor (int l=1;l<allocPolys[locBiggest].size();l++){\n\t\t\t\t\t\tdouble actDist = polys[locMinsum+1].get(polys[0].indexOf(Double.valueOf(allocPolys[locBiggest].get(l))));\n\t\t\t\t\t\tif (locBiggest==2){\n\t\t\t\t\t\t\tSystem.out.println(\"here\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (actDist<minDist && !changedIds.contains(allocPolys[locBiggest].get(l).intValue())){\n\t\t\t\t\t\t\tminDist=actDist;\n\t\t\t\t\t\t\tpolyID=allocPolys[locBiggest].get(l).intValue();\n\t\t\t\t\t\t\tchangedIds.add(polyID);\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//add polyID of basic area to locMinsum and remove from locbiggest\n\t\t\t\t\tSystem.out.println(\"Set to \"+(locMinsum+1)+\" remove \"+polyID+\" from \"+(locBiggest+1));\n\t\t\t\t\tallocPolys[locBiggest].remove(Integer.valueOf(polyID));\n\t\t\t\t\tallocPolys[locMinsum].add(polyID);\n\t\t\t\t\tcriteriaf=addToCriteria(polyID, locMinsum+1, locBiggest+1, criteriaf, true,polysGeometry);\n\t\t\t\t}\n\t\t\t\telse no++;\n\t\t\t}\n\t\t\t\n\t\t\tif (no==numberlocations){\n\t\t\t\tsatisfied=true;\n\t\t\t}\n\t\t}\n\t\treturn allocPolys;\n\t\n}",
"private static void task4(int nUMS, BinarySearchTree<Integer> t) {\n\t\t\n\t\tdouble search_start = 0, search_end = 0;\n\n\t System.out.println(\"SPLAY DELETION Started...\");\n\t search_start = System.nanoTime();\n\t int count = 0;\n\t \t\n\t for (int z = 0; z < nUMS; z++) {\n\t \tint checker= GenerateInt.generateNumber();\n//\t \tSystem.out.println(GenerateStrings.getAlphaNumericString(limit));\n\t if (t.contains(checker)) {\n\t t.remove(checker);\n//\t System.out.println(\"INT Removed\");\n\t count++;\n\t }\n\t }\n\t search_end = System.nanoTime();\n\t System.out.println(\"Average time for each deletion: \" + (search_end - search_start) / nUMS + \" nanoseconds\");\n\t \n\t System.out.println(\"TOTAL REMOVES\" + count);\n\n\t\t\n\t\t\n\t}",
"private void checkForReHash(int a){\r\n if(!this.hashing) {\r\n float ratio = (float )this.size() / (float)this.capacity();\r\n if (ratio > this.upperLoadFactor && a == 1) {\r\n this.hashing = true;\r\n this.reHash(1);\r\n } else if (ratio < this.lowerLoadFactor && a == -1) {\r\n this.hashing = true;\r\n this.reHash(-1);\r\n }\r\n }\r\n }",
"void TruncPopulationAvgSizeGen(double scale){\n\t\t\tint i;\n\t\t\tnode[] _nm;\n\t\t \tdouble sumSize,sizeThreshold; \t\n\t\t \t \t\t \n\t\t \tsumSize = oldpop[0].size;\n\t\t\t\n\t\t\tfor(i = 1; i < poplen; i++) {\t\t\t\t\n\t\t\t\tsumSize += oldpop[i].size;//\t\t\t\t\n\t\t\t}\n\t\t\t\n//\t\t\tSystem.out.println(\"Tong:\"+sumSize);\n\t\t\tsumSize=sumSize /poplen;\n//\t\t\tSystem.out.println(\"Avg:\"+sumSize);\n\t\t\t\n\t\t\tsizeThreshold=sumSize+(1.0-(double)gen/NUMGEN)*sumSize*scale;\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(((1.0-(double)gen/NUMGEN)*sumSize*scale) +\"-\"+((1.0-gen/NUMGEN)*sumSize*scale));\n\t\t \t\n//\t\t \tSystem.out.println(numIndiviadual);\n\t\t \t\n\t\t\tfor(i = 0; i < poplen; i++){\n\t\t\t\tif(oldpop[i].size>sizeThreshold){\n//\t\t\t\t\tSystem.out.println(\"Vi tri:\"+i);\n\t\t\t\t\tindividual[] m_individual=new individual[1];\n\t\t\t\t\tint[] _mt=new int[1];\n\t\t\t\t\t_nm=new node[1];\n\t//\t\t\t\tSystem.out.println(\"Trước+\"+oldpop[i].size);\n\t\t\t\t\tif(this.TruncateTreeGrow(oldpop[i], m_individual,_mt,_nm)==TRUE){\t\n\t\t\t\t\t\t\n\t\t\t\t\toldpop[i]=new individual();\n\t\t\t\t\toldpop[i].CopyIndividual(m_individual[0], TRUE);\t\t\t\n\t\t\t\t\toldpop[i].evaluated=FALSE;\n\t//\t\t\t\tSystem.out.println(\"Sau+\"+oldpop[i].size);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}",
"private void calculateBPRange() {\n\t\tbroadPhaseLength = 0.0f;\n\t\tfor (Vector2f p : points) {\n\t\t\tbroadPhaseLength = Math.max(broadPhaseLength, Math.abs(p.length()));\n\t\t}\n\t}",
"public static void balanceHeaps()\n {\n // add your code here\n if(Math.abs(s.size()-g.size()) > 1){\n if(s.size() > g.size()){\n g.add(s.poll());\n }\n else {\n s.add(g.poll());\n }\n }\n }",
"protected void testLessThanMaxLots () throws OutsideMaxLotsException\n {\n if (lots.size() >= MAX_LOTS)\n throw new OutsideMaxLotsException();\n }",
"public boolean timeInBufferRange(long time) {\n \tif (!storage.isEmpty()) {\n if(time > storage.firstKey() && time < storage.lastKey())\n \treturn true;\n }\n \treturn false;\n }",
"@Test\n public void lastSize() throws Exception{\n rf.insert(maxBlocks-1, testBlock);\n Assert.assertEquals(1, rf.size());\n }",
"private void ensureCapacity() {\n if(size() >= (0.75 * data.length)) // size() == curSize\n resize(2 * size());\n }",
"public static void verifyInterval(double lower, double upper)\r\n/* 145: */ {\r\n/* 146:336 */ if (lower >= upper) {\r\n/* 147:337 */ throw new NumberIsTooLargeException(LocalizedFormats.ENDPOINTS_NOT_AN_INTERVAL, Double.valueOf(lower), Double.valueOf(upper), false);\r\n/* 148: */ }\r\n/* 149: */ }",
"@Override\n public long generateNewContractDuration(long size) {\n return new Random().nextInt(5) + 1 + (size / 1000000);\n }",
"private void checkCapacity() {\n\t\tif (size.get() >= region.getCapacity()) {\n\t\t\tsynchronized (cleanUpThread) {\n\t\t\t\tcleanUpThread.notify();\n\t\t\t}\n\t\t}\n\t}",
"private void setMinThreshold() {\n minThreshold = value + value * postBoundChange / 100;\n }",
"void timeCheck() throws Exception{\n\t\tif(arrival<time_check)\n\t\tthrow new Exception(\"Arrival time should be non-descending\");\n\t}",
"double bucketSize(long bucket, Rounding.DateTimeUnit unit);",
"private boolean addBufferToTimeRange(double extraTime, int i){\n if(timeRanges[i][0] - extraTime/2 < 0) { // Checking if the annotation is at the start of the file\n if(timeRanges[i][1] + extraTime < endTimeOfFileInSeconds){ // Seeing if the recording is long enough to add the time buffer to the end time\n timeRanges[i][1] += extraTime;\n } else{ //Failure\n System.out.println(\"Failed to extend annotation \" + i + \" to 1.1s\");\n return false;\n }\n } else if(timeRanges[i][1] + extraTime/2 > endTimeOfFileInSeconds){ // Checking if the annotation is at the end of the file\n if(timeRanges[i][0] - extraTime > 0){ // Seeing if we can add the buffer to the LHS.\n timeRanges[i][0] -= extraTime;\n } else{ //Failure\n System.out.println(\"Failed to extend annotation \" + i + \" to 1.1s\");\n return false;\n }\n } else{\n // Adding buffer to either side\n timeRanges[i][0] -= extraTime/2;\n timeRanges[i][1] += extraTime/2;\n }\n return true;\n }",
"private boolean validationPhase(Secret secretA, Secret secretB, int smallestSize, double[] optimalBox) {\n\n\t\t// number of all possible subsets with a size of smallestSize\n\t\tint numberSubsets; \n\t\tif((secretA.getTimes().size() / smallestSize) <= (secretB.getTimes().size() / smallestSize)) {\n\t\t\tnumberSubsets = (secretA.getTimes().size() / smallestSize);\n\t\t} else {\n\t\t\tnumberSubsets = (secretB.getTimes().size() / smallestSize);\n\t\t}\n\n\t\t// rest of the size modulo all subsets\n\t\tint restA = secretA.getTimes().size() % (numberSubsets * smallestSize);\n\t\tint restB = secretB.getTimes().size() % (numberSubsets * smallestSize);\n\n\t\tArrayList<Time> subsetA; \n\t\tArrayList<Time> subsetB;\n\n\t\tint countWrongResults = 0;\n\n\t\tArrayList<String> validateSubsetSignificantDifferent = new ArrayList<String>();\n\t\tArrayList<String> validateSubsetOverlapA = new ArrayList<String>();\n\t\tArrayList<String> validateSubsetOverlapB = new ArrayList<String>();\n\t\tArrayList<Time> prevSubsetA = new ArrayList<Time>();\n\t\tArrayList<Time> prevSubsetB = new ArrayList<Time>();\n\n\n\t\tfor (int i = 0; i < numberSubsets; ++i) {\n\n\t\t\tint countInvalid = 0;\n\t\t\t// the rest will be deducted at the beginning\n\t\t\tsubsetA = secretA.getBisectedTimes(restA + (smallestSize * i), smallestSize);\n\t\t\tsubsetB = secretB.getBisectedTimes(restB + (smallestSize * i), smallestSize);\n\n\t\t\tCollections.sort(subsetA);\n\t\t\tCollections.sort(subsetB);\n\n\t\t\tif (BoxTest.boxTestSmaller(subsetA, subsetB, optimalBox)) {\n\t\t\t\tvalidateSubsetSignificantDifferent.add(\"o\");\n\n\t\t\t} else {\n\t\t\t\tvalidateSubsetSignificantDifferent.add(\"x\");\n\t\t\t\t//logger.info(\"subset \" + i + \": wrong result\");\n\t\t\t\t++countInvalid;\n\t\t\t}\n\t\t\t\n\t\t\tif(i != 0) {\n\t\t\t\tif (BoxTest.boxTestOverlap(prevSubsetA, subsetA, optimalBox)) {\n\t\t\t\t\tvalidateSubsetOverlapA.add(\"o\");\n\n\t\t\t\t} else {\n\t\t\t\t\tvalidateSubsetOverlapA.add(\"x\");\n\t\t\t\t\t//logger.info(\"subset \" + i + \": only significant different\");\n\t\t\t\t\t++countInvalid;\n\t\t\t\t} \n\n\t\t\t\tif (BoxTest.boxTestOverlap(prevSubsetB, subsetB, optimalBox)) {\n\t\t\t\t\tvalidateSubsetOverlapB.add(\"o\");\n\t\t\t\t\t//logger.info(\"subset \" + i + \": right result\");\n\n\t\t\t\t} else {\n\t\t\t\t\tvalidateSubsetOverlapB.add(\"x\");\n\t\t\t\t\t//logger.info(\"subset \" + i + \": only significant different, subset A overlaps\");\n\t\t\t\t\t++countInvalid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(countInvalid > 0) {\n\t\t\t\t++countWrongResults;\n\t\t\t}\n\n\t\t\tprevSubsetA = new ArrayList<Time>();\n\t\t\tprevSubsetB = new ArrayList<Time>();\n\n\t\t\tprevSubsetA = subsetA;\n\t\t\tprevSubsetB = subsetB;\n\t\t}\n\n\t\tdouble confidenceInterval = 100 - (countWrongResults * 100 / numberSubsets);\n\n\t\tthis.boxTestResults.get(this.boxTestResults.size() - 1).saveValidation(smallestSize, confidenceInterval, validateSubsetOverlapA, validateSubsetOverlapB, validateSubsetSignificantDifferent);\n\t\tlogger.finest(\"\\n\\\"o\\\" = successful box test \\n\\\"x\\\" = unsuccesful box test\\n\");\n\t\tlogger.finest(secretA.getName() + \" overlaps: \" + Folder.convertArrayListToString(validateSubsetOverlapA));\n\t\tlogger.finest(secretB.getName() + \" overlaps: \" + Folder.convertArrayListToString(validateSubsetOverlapB));\n\t\tlogger.finest(secretA.getName() + \" < \" + secretB.getName() + \": \" + Folder.convertArrayListToString(validateSubsetSignificantDifferent));\n\n\t\tlogger.info(secretA.getName() + \" < \" + secretB.getName() + \": validate smallest size \" + smallestSize + \": \" + countWrongResults + \" out of \" + numberSubsets + \" comparisons returned wrong results.\");\n\n\t\tif(countWrongResults != 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"private void check_range(int offset, int byte_count) throws BadRangeException {\n int end_block = get_end_block(offset, byte_count);\n if (offset < 0 ||\n byte_count < 0 ||\n (final_block != -1 && final_block == end_block &&\n (offset+byte_count) % Constants.FILE_BLOCK_SIZE > content.get(end_block).length()) ||\n (final_block != -1 && end_block > final_block))\n {\n throw new BadRangeException();\n }\n }",
"int getMaxTicksLimit();",
"double bucketSize(Rounding.DateTimeUnit unit);",
"private boolean checkGap() { //Checks if any gap due to previously deleted resv\n\t\tif (numOfReservation == 0)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn !(rList.get(rList.size()-1).getResvNo() == numOfReservation);\n\t}",
"private int calculateConsecutiveDuplicateMutationsThreshold(){\n \tint combinedSiteLength = region.getCombinedSitesLength();\n \tif(combinedSiteLength <= 10){\n \t\treturn 100; // around the order of magnitude of 1,000,000 if we assume each of the 10 positions could have any of the 4 nucleotides\n \t}else{\n \t\tint consecFactor = 400000 / (combinedSiteLength * combinedSiteLength * combinedSiteLength * iContext.strategy.nucleotides.length);\n \t\treturn Math.max(2, consecFactor);\n \t}\n }",
"Integer backlogCapacity();",
"private void checkBound(int lowerBound, int upperBound) {\n\t\tSet setKeys = Utility.vocabHM.keySet();\n\t\tIterator i = setKeys.iterator();\n\n\t\twhile (i.hasNext()) {\n\t\t\tString s = (String) i.next();\n\t\t\tInteger df = (Integer) Utility.vocabHM.get(s);\n\n\t\t\tif ((df.intValue() <= lowerBound) || (df.intValue() >= upperBound))\n\t\t\t\ti.remove();\n\t\t}\n\t}",
"@Test\n public void periodicCkpointTrimTest() throws Exception {\n final int tableSize = PARAMETERS.NUM_ITERATIONS_LOW;\n CorfuRuntime rt = getNewRuntime();\n\n try {\n PersistentCorfuTable<String, Long> tableA = openTable(rt, streamNameA);\n PersistentCorfuTable<String, Long> tableB = openTable(rt, streamNameB);\n\n // thread 1: populates the maps with mapSize items\n scheduleConcurrently(1, ignored_task_num -> {\n populateMaps(tableSize, tableA, tableB);\n });\n\n // thread 2: periodic checkpoint of the maps, repeating ITERATIONS_VERY_LOW times,\n // and immediate prefix-trim of the log up to the checkpoint position\n scheduleConcurrently(1, ignored_task_num -> {\n mapCkpointAndTrim(rt, tableA, tableB);\n });\n\n // thread 3: repeated ITERATION_LOW times starting a fresh runtime, and instantiating the maps.\n // they should rebuild from the latest checkpoint (if available).\n // performs some sanity checks on the map state\n scheduleConcurrently(PARAMETERS.NUM_ITERATIONS_LOW, ignored_task_num -> {\n validateMapRebuild(tableSize, false, true);\n });\n\n executeScheduled(PARAMETERS.CONCURRENCY_SOME, PARAMETERS.TIMEOUT_LONG);\n\n // Verify that last trim cycle completed (async task) before validating map rebuild\n Token currentTrimMark = Token.UNINITIALIZED;\n while(currentTrimMark.getSequence() != lastValidCheckpoint.getSequence() + 1L) {\n currentTrimMark = getRuntime().getAddressSpaceView().getTrimMark();\n }\n\n // finally, after all three threads finish, again we start a fresh runtime and instantiate the maps.\n // This time we check that the new map instances contain all values\n validateMapRebuild(tableSize, true, false);\n } finally {\n rt.shutdown();\n }\n }",
"protected void removeOldData() {\n if (!storage.isEmpty()) {\n long timeLowerbound = storage.lastKey() - maxStorageTime;\n while (!storage.isEmpty() && storage.firstKey() < timeLowerbound) {\n storage.pollFirstEntry();\n } \n }\n }",
"private static void checkFromToBounds(int paramInt1, int paramInt2, int paramInt3) {\n/* 386 */ if (paramInt2 > paramInt3) {\n/* 387 */ throw new ArrayIndexOutOfBoundsException(\"origin(\" + paramInt2 + \") > fence(\" + paramInt3 + \")\");\n/* */ }\n/* */ \n/* 390 */ if (paramInt2 < 0) {\n/* 391 */ throw new ArrayIndexOutOfBoundsException(paramInt2);\n/* */ }\n/* 393 */ if (paramInt3 > paramInt1) {\n/* 394 */ throw new ArrayIndexOutOfBoundsException(paramInt3);\n/* */ }\n/* */ }",
"public boolean outOfBounds()\n {\n if((lastpowerUp.equals(\"BLUE\") || lastpowerUp.equals(\"RAINBOW\")) && powerupTimer > 0)\n {\n return false;\n }\n \n if(head.getA() < 150 || head.getA() >= 1260)\n return true;\n else if(head.getB() <150 || head.getB() >=630)\n return true;\n else \n return false;\n \n \n }",
"protected static void adaptivaeThresholdCalc() {\n\t\tif (triggerCount > 3) {\n\t\t\tthreshold /= 0.9;\n\t\t\t// Log.d(\"visualizer\", \"threshold up to \" + threshold);\n\t\t}\n\t\tif (triggerCount < 2) {\n\t\t\tthreshold *= 0.9;\n\t\t\t// Log.d(\"visualizer\", \"threshold down to \" + threshold);\n\t\t}\n\n\t\tif (threshold < 1.5f)\n\t\t\tthreshold = 1.5f;\n\t}",
"public void AutoCheck(int arraySize) {\n\t\tlong startTime;\n\t\tlong endTime;\n\t\t\n\t\tlong startTime2 = 0;\n\t\tlong endTime2 = 0;\n\t\t\n\t\tint [] A = new int[arraySize];\n\t\t\n\t\tint max = 100000;\n\t\tint min = 0;\n\t\tRandom rand = new Random();\n\t\t\n\t\tfor (int z = 0; z < A.length; z++) {\n\t\t\tA[z] = rand.nextInt(max + 1 - min) - min;\n\t\t}\n\t\t\n\t\tstartTime = System.nanoTime();\n\t\tSystem.out.println(\"Brute Force Test \" + testnum + \": \" + BruteForceMedian(A));\n\t\tendTime = System.nanoTime();\n\t\t\n\t\tstartTime2 = System.nanoTime();\n\t\tSystem.out.println(\"Parition Test \" + testnum + \": \" + Median(A));\n\t\tendTime2 = System.nanoTime();\n\t\t\n\t\tSystem.out.println(\"BF Basic Opteration: \" + boCount);\n\t\tSystem.out.println(\"P Basic Operation: \" + boCount2);\n\t\tSystem.out.println(\"BF Execution Time: \" + (endTime - startTime));\n\t\tSystem.out.println(\"P Execution Time: \" + (endTime2 - startTime2) + \"\\n\");\n\t\t\n\t\ttry {\n\t\t\tAppend(arraySize, startTime, endTime, startTime2, endTime2);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tboCount = 0;\n\t\tboCount2 = 0;\n\t\ttestnum++;\n\t}",
"private static void cutSticks(ArrayList<Integer> numbers, int min) {\n\t\tint length = numbers.size();\n\t\t\n\t\twhile(min < Integer.MAX_VALUE){\n\t\t\tSystem.out.println(numbers.size());\n\t\t\tint newMin = Integer.MAX_VALUE;\n\t\t\tfor(int i = 0; i < numbers.size(); i++){\n\t\t\t\tint newno = numbers.get(i) - min;\n\t\t\t\tif(newno > 0){\n\t\t\t\t\tnumbers.set(i, numbers.get(i) - min);\n\t\t\t\t\tif(newno < newMin){\n\t\t\t\t\t\tnewMin = newno;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tnumbers.remove(i);\n\t\t\t\t\ti--;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tmin = newMin;\n\t\t}\n\t\t\n\t}",
"protected void checkSize(){\n if (size == data.length){\n resize( 2 * data.length);\n }\n }",
"@Override\n\tpublic void CheckBounds() {\n\t\t\n\t}",
"public void setMaxTime(int aMaxTime)\n{\n // Set max time\n _maxTime = aMaxTime;\n \n // If time is greater than max-time, reset time to max time\n if(getTime()>_maxTime)\n setTime(_maxTime);\n}",
"@Test\n public void testGetTimeUntilQuotaConsumedLocked_EqualTimeRemaining() {\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n setStandbyBucket(FREQUENT_INDEX);\n\n // Overlap boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(\n now - (24 * HOUR_IN_MILLIS + 11 * MINUTE_IN_MILLIS),\n 4 * HOUR_IN_MILLIS,\n 5), false);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(\n now - (8 * HOUR_IN_MILLIS + MINUTE_IN_MILLIS), 3 * MINUTE_IN_MILLIS, 5),\n false);\n\n synchronized (mQuotaController.mLock) {\n // Both max and bucket time have 8 minutes left.\n assertEquals(8 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n // Max time essentially free. Bucket time has 2 min phase out plus original 8 minute\n // window time.\n assertEquals(10 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE).clear();\n // Overlap boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(\n now - (24 * HOUR_IN_MILLIS + MINUTE_IN_MILLIS), 2 * MINUTE_IN_MILLIS, 5),\n false);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(\n now - (20 * HOUR_IN_MILLIS),\n 3 * HOUR_IN_MILLIS + 48 * MINUTE_IN_MILLIS,\n 5), false);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(\n now - (8 * HOUR_IN_MILLIS + MINUTE_IN_MILLIS), 3 * MINUTE_IN_MILLIS, 5),\n false);\n\n synchronized (mQuotaController.mLock) {\n // Both max and bucket time have 8 minutes left.\n assertEquals(8 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n // Max time only has one minute phase out. Bucket time has 2 minute phase out.\n assertEquals(9 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n }",
"@Test\n\tpublic void testLimits() throws DeviceException {\n\t\tsetUpIncrement();\n\t\tdouble lastPos = INITIAL_POSITION;\n\t\tfor (int i = 0; i < 100; i++) {\n\t\t\tfinal double currentPos = (double) monitor.getPosition();\n\t\t\tassertTrue(Math.abs(currentPos - lastPos) > 0.001);\n\t\t\tassertTrue(currentPos - UPPER_LIMIT < 0.001);\n\t\t\tassertTrue(currentPos - LOWER_LIMIT > 0.001);\n\t\t\tlastPos = currentPos;\n\t\t}\n\t}",
"public abstract int getMaxIntermediateSize();",
"private void conditionalExtendFile() {\n\n // maximum allowed size of an Azure page blob (1 terabyte)\n final long MAX_PAGE_BLOB_SIZE = 1024L * 1024L * 1024L * 1024L;\n\n // If blob is already at the maximum size, then don't try to extend it.\n if (currentBlobSize == MAX_PAGE_BLOB_SIZE) {\n return;\n }\n\n // If we are within the maximum write size of the end of the file,\n if (currentBlobSize - currentBlobOffset <= MAX_RAW_BYTES_PER_REQUEST) {\n\n // Extend the file. Retry up to 3 times with back-off.\n CloudPageBlob cloudPageBlob = (CloudPageBlob) blob.getBlob();\n long newSize = currentBlobSize + configuredPageBlobExtensionSize;\n\n // Make sure we don't exceed maximum blob size.\n if (newSize > MAX_PAGE_BLOB_SIZE) {\n newSize = MAX_PAGE_BLOB_SIZE;\n }\n final int MAX_RETRIES = 3;\n int retries = 1;\n boolean resizeDone = false;\n while(!resizeDone && retries <= MAX_RETRIES) {\n try {\n cloudPageBlob.resize(newSize);\n resizeDone = true;\n currentBlobSize = newSize;\n } catch (StorageException e) {\n LOG.warn(\"Failed to extend size of \" + cloudPageBlob.getUri());\n try {\n\n // sleep 2, 8, 18 seconds for up to 3 retries\n Thread.sleep(2000 * retries * retries);\n } catch (InterruptedException e1) {\n\n // Restore the interrupted status\n Thread.currentThread().interrupt();\n }\n } finally {\n retries++;\n }\n }\n }\n }",
"boolean splitAndInsert(T t, Pair<String,LeafNode> ln){\n\n int splitTimes=0;\n\n Interval[] intervals = ln.second().getIntervals();\n assert intervals.length==leafNodeCapacity;\n Interval[] leftIntervals = new Interval[leafNodeCapacity];\n Interval[] rightIntervals = new Interval[leafNodeCapacity];\n Interval[] tempIntervals = null;\n\n int leftIntervalNumber=0;\n int rightIntervalNumber=0;\n TriangleShape lnTriangle = ln.second().triangle;\n String lnString=ln.first();\n TriangleShape leftTriangle=null;\n TriangleShape rightTriangle=null;\n String leftString=null;\n String rightString =null;\n\n while(leftIntervalNumber==0 || rightIntervalNumber==0){\n\n if(splitTimes==10000) {\n System.out.println(\"splitTimes=\"+splitTimes);\n System.out.println(\"you should increase the parameter leafNodeCapaity value!!!\");\n assert false;\n }\n else\n splitTimes++;\n\n leftTriangle=lnTriangle.leftTriangle();\n leftIntervalNumber=0;\n rightIntervalNumber=0;\n\n for(Interval i: intervals){\n if(Geom2DSuits.contains(leftTriangle,i.getLowerBound(),i.getUpperBound())){\n leftIntervals[leftIntervalNumber]=i;\n leftIntervalNumber++;\n }\n else{\n rightIntervals[rightIntervalNumber]=i;\n rightIntervalNumber++;\n }\n }\n\n if(leftIntervalNumber==0){//all located at left side\n rightTriangle = lnTriangle.rightTriangle();\n rightString = lnString+\"1\";\n leftString=lnString+\"0\";\n emptyNodes.add(leftString);\n lnTriangle = rightTriangle;\n lnString=rightString;\n\n tempIntervals=intervals;\n intervals=rightIntervals;\n rightIntervals=tempIntervals;\n }\n else if(rightIntervalNumber==0){//all located at right side\n rightString = lnString+\"1\";\n leftString=lnString+\"0\";\n emptyNodes.add(rightString);\n lnTriangle = leftTriangle;\n lnString=leftString;\n\n tempIntervals=intervals;\n intervals=leftIntervals;\n leftIntervals=tempIntervals;\n }\n else { //spit successfully\n\n leftString=lnString+\"0\";\n LeafNode leftNode = new LeafNode();\n leftNode.intervals=leftIntervals;\n leftNode.size=leftIntervalNumber;\n leftNode.triangle=leftTriangle;\n\n rightString = lnString+\"1\";\n LeafNode rightNode = new LeafNode();\n rightTriangle = lnTriangle.rightTriangle();\n rightNode.triangle=rightTriangle;\n rightNode.size=rightIntervalNumber;\n rightNode.intervals=rightIntervals;\n\n if(leftNode.insert(t)!=1){\n rightNode.insert(t);\n }\n\n Identifier lnPage =leafInfos.remove(ln.first());\n writeNode(leftNode,lnPage);\n Identifier rightPage = CommonSuits.createIdentifier(-1L);\n writeNode(rightNode,rightPage);\n\n leafInfos.put(leftString,lnPage);\n leafInfos.put(rightString,rightPage);\n return true;\n }\n }\n return false;\n }",
"public double isFull(double size){;\n\t\tif (unitSpaceAvailable > 0 && unitSpaceAvailable <= MAX_QUEUE){\n\t\t\tif(size < unitSpaceAvailable){\n\t\t\treturn unitSpaceAvailable - size;\n\t\t\t}\n\t\t}\n\t\treturn 0.0;\n\t}",
"private void growQueue() {\n Runnable[] oldQ = queue;\n int oldSize = oldQ.length;\n int newSize = oldSize << 1;\n if (newSize > MAXIMUM_QUEUE_CAPACITY)\n throw new RejectedExecutionException(\"Queue capacity exceeded\");\n Runnable[] newQ = queue = new Runnable[newSize];\n\n int b = base;\n int bf = b + oldSize;\n int oldMask = oldSize - 1;\n int newMask = newSize - 1;\n do {\n int oldIndex = b & oldMask;\n Runnable t = oldQ[oldIndex];\n if (t != null && !casSlotNull(oldQ, oldIndex, t))\n t = null;\n setSlot(newQ, b & newMask, t);\n } while (++b != bf);\n pool.signalWork();\n }",
"void removeBefore(double when,DystoreField fld)\n{\n if (fld == time_field && next_time >= when || tuple_data.size() == 0) return;\n\n if (tuple_data.size() > 1000000) {\n System.err.println(\"TUPLE SET SIZE = \" + tuple_data.size() + \" \" + when + \" \" + next_time +\n\t\t\t \" \" + last_check);\n for (DystoreTuple dt : tuple_data) {\n\t System.err.println(\"\\t\" + dt);\n }\n }\n\n time_field = fld;\n next_time = -1;\n for (Iterator<DystoreTuple> it = tuple_data.iterator(); it.hasNext(); ) {\n DystoreTuple dt = it.next();\n double t0 = dt.getTimeValue(fld);\n if (t0 < when) {\n\t // System.err.println(\"DYSTORE: REMOVE \" + t0 + \" \" + when + \" \" + dt);\n\t it.remove();\n }\n else if (next_time < 0 || t0 < next_time) next_time = t0;\n }\n\n last_check = when;\n}",
"@Test(timeout = 4000)\n public void test35() throws Throwable {\n Range range0 = Range.of((-1264L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1264L));\n range1.getEnd();\n range1.getEnd();\n List<Range> list0 = range1.split(255L);\n range0.complementFrom(list0);\n Range range2 = Range.of(range_CoordinateSystem0, (-1264L), 0L);\n range2.endsBefore(range0);\n Long.max((-1264L), (-3100L));\n range1.equals(range0);\n Range.Comparators.values();\n range1.getEnd();\n long long0 = new Long(0L);\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = new Range.Builder(range_CoordinateSystem0, 255L, 259L);\n Range range3 = Range.of(1L);\n Range range4 = Range.of((-32768L), 0L);\n range4.equals(range2);\n range0.complement(range3);\n Range range5 = range_Builder1.build();\n assertFalse(range5.equals((Object)range4));\n }",
"public void updateOptimalCollisionArea();",
"private void checkForNewAppliancesAndUpdateConstants()\n\t{\n\t\t// This could be more sophisticated, but for now all this needs to do is\n\t\t// make sure that\n\t\t// the wattbox assigns load only according to the rated heat pump and\n\t\t// immersion capacity\n\t\t// of its owner\n\t\tthis.maxHeatPumpElecDemandPerTick = (this.owner.ratedPowerHeatPump * 24 / this.ticksPerDay);\n\t\tthis.maxImmersionHeatPerTick = Consts.MAX_DOMESTIC_IMMERSION_POWER * 24 / this.ticksPerDay;\n\t}",
"boolean signalMinStep(int minStep) {\n if (nextStepLength + lastPenaltyLength \n + borderBefore + borderAfter + paddingBefore + paddingAfter <= minStep) {\n includedLength = nextStepLength;\n computeRemainingLength();\n return false;\n } else {\n return previousRowsLength + borderBefore \n + borderAfter + paddingBefore + paddingAfter > minStep;\n }\n }",
"void decNetSize(){\r\n\t\t\t\tif (size>50)size-=50;\r\n\t\t\t\telse System.out.println(\"Minimum net size reached!\");\r\n\t\t\t}",
"public synchronized int getUpperSizeLimit() {\n \t\treturn upper;\n \t}",
"private void pruneIfNeeded(int neededSpace) {\n\t\tif ((mTotalSize + neededSpace) < mMaxCacheSizeInBytes) {\n\t\t\treturn;\n\t\t}\n\t\tif (VolleyLog.DEBUG) {\n\t\t\tVolleyLog.v(\"Pruning old cache entries.\");\n\t\t}\n\n\t\tlong before = mTotalSize;\n\t\tint prunedFiles = 0;\n\t\tlong startTime = SystemClock.elapsedRealtime();\n\n\t\tIterator<Map.Entry<String, CacheHeader>> iterator = mEntries.entrySet()\n\t\t\t\t.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tMap.Entry<String, CacheHeader> entry = iterator.next();\n\t\t\tCacheHeader e = entry.getValue();\n\t\t\tboolean deleted = getFileForKey(e.key).delete();\n\t\t\tif (deleted) {\n\t\t\t\tmTotalSize -= e.size;\n\t\t\t} else {\n\t\t\t\tVolleyLog.d(\n\t\t\t\t\t\t\"Could not delete cache entry for key=%s, filename=%s\",\n\t\t\t\t\t\te.key, getFilenameForKey(e.key));\n\t\t\t}\n\t\t\titerator.remove();\n\t\t\tprunedFiles++;\n\n\t\t\tif ((mTotalSize + neededSpace) < mMaxCacheSizeInBytes\n\t\t\t\t\t* HYSTERESIS_FACTOR) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (VolleyLog.DEBUG) {\n\t\t\tVolleyLog.v(\"pruned %d files, %d bytes, %d ms\", prunedFiles,\n\t\t\t\t\t(mTotalSize - before), SystemClock.elapsedRealtime()\n\t\t\t\t\t\t\t- startTime);\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test28() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-2147483648L), 1146L);\n long long0 = range0.getBegin();\n assertEquals((-2147483648L), long0);\n \n boolean boolean0 = range0.equals(\"number of entries must be <= Integer.MAX_VALUE\");\n assertFalse(boolean0);\n \n Range range1 = Range.of((-2147483648L));\n List<Range> list0 = range1.complement(range0);\n assertEquals(0, list0.size());\n }",
"public ArrayList<Rect> useAllWidth(ArrayList<Rect> arrangedRectList) {\n\n if (arrangedRectList.size() == 1 ) {\n arrangedRectList.get(0).right = getWidth();\n return arrangedRectList;\n }\n\n ArrayList<Rect> modifiedRectList = arrangedRectList;\n ArrayList<Rect> currentRectList = arrangedRectList;\n\n int totalLeftMargin = mHourWidth + mEventMarginLeft;\n\n for(int i = 0; i < currentRectList.size(); i++) {\n int maxExtension = 0;\n int collisionCount = 0;\n for (int j = 0; j < modifiedRectList.size(); j++)\n {\n //check if it is compared to the same rect\n if (currentRectList.get(i).contains(modifiedRectList.get(j))) {\n Log.d(\"SAMERECT\", \"same rect\");\n continue;\n }\n\n //breaks loop when rect is not supposed to be extended\n if (currentRectList.get(i).left == totalLeftMargin && currentRectList.get(i).right == modifiedRectList.get(j).left\n// ||\n// currentRectList.get(i).top <= modifiedRectList.get(j).bottom && modifiedRectList.get(j).top <= currentRectList.get(i).bottom && currentRectList.get(i).right == modifiedRectList.get(i).left\n ||\n currentRectList.get(i).right + eventWidth > getWidth()\n ) {\n Log.d(\"SAMERECT\", \"break within condition\");\n maxExtension = currentRectList.get(i).right;\n// break;\n }\n\n\n if (currentRectList.get(i).right >= modifiedRectList.get(j).left) {\n if (currentRectList.get(i).top <= modifiedRectList.get(j).bottom && modifiedRectList.get(j).top <= currentRectList.get(i).bottom) {\n if (currentRectList.get(i).right == modifiedRectList.get(j).left) {\n maxExtension = currentRectList.get(i).right;\n break;\n } else {\n maxExtension = getWidth();\n }\n } else {\n maxExtension = getWidth();\n }\n } else {\n if (currentRectList.get(i).top <= modifiedRectList.get(j).bottom && modifiedRectList.get(j).top <= currentRectList.get(i).bottom) {\n maxExtension = modifiedRectList.get(j).left;\n } else {\n maxExtension = getWidth();\n break;\n }\n\n }\n\n }\n// if (maxExtension > 0 && collisionCount == 0) {\n// if (maxExtension == getWidth()) {\n// currentRectList.get(i).right = getWidth();\n// } else {\n currentRectList.get(i).right = maxExtension;\n// }\n// }\n\n\n }\n\n return currentRectList;\n }",
"public void increaseTimescale() {\n\t\ttimeScaler = timeScaler>=5 ? 5 : timeScaler + TIMESCLALER_FACTOR;\n\t}",
"private void grow(int par1)\n {\n IntHashMapEntry[] ainthashmapentry = this.slots;\n int j = ainthashmapentry.length;\n\n if (j == 1073741824)\n {\n this.threshold = Integer.MAX_VALUE;\n }\n else\n {\n IntHashMapEntry[] ainthashmapentry1 = new IntHashMapEntry[par1];\n this.copyTo(ainthashmapentry1);\n this.slots = ainthashmapentry1;\n this.threshold = (int)((float)par1 * this.growFactor);\n }\n }",
"final void minEvent() {\n minTime = Double.MAX_VALUE;\n if (timeOut.size() > 0) {\n for (int i = 0; i < timeOut.size(); i++) {\n if (timeOut.get(i) < minTime) {\n minTime = timeOut.get(i);\n num = i;\n }\n }\n }\n\n }",
"public void updateLaps() {\n\t\tint totSegs = (segments.size()-1)/2;\n\t\tif (oldSeg == totSegs && curSeg == 0) {\n\t\t\tif (!cheatedLap) {\n\t\t\t\tlaps++;\n\t\t\t} else cheatedLap = false;\n\t\t} else if (oldSeg == 0 && curSeg == totSegs){\n\t\t\tcheatedLap = true;\n\t\t}\n\t}",
"public void findHighestPowerUnitAnySize() {\r\n\t\ttimer.startAlgorithm(\"ChronalCharger.findHighestPowerUnitAnySize()\");\r\n\t\tfor (int i=1; i<=300; i++) {\r\n//\t\t\tcurrentGrid = new ShrinkingPowerGrid(i, 300);\r\n\t\t\tfindHighestPowerUnit(i);\r\n//\t\t\tpreviousGrids.add(currentGrid);\r\n\t\t}\r\n\t\ttimer.stopAlgorithm();\r\n\t}",
"protected void calcMinMax() {\n }",
"void max_speed (double min_lift, double max_drag, boolean update_info) {\n velocity = kts_to_speed(20);\n find_aoa_of_min_drag();\n double pitch_of_min_drag = craft_pitch;\n trace(\"pitch_of_min_drag: \" + pitch_of_min_drag);\n\n // step 2. with current (lowest drag) pitch, iterate speed up\n // until drag exceeds max_drag.\n double speed = (total_drag() > max_drag) || foil_lift() > min_lift\n ? kts_to_speed(5) // pretty arbitrary...\n : velocity;\n\n for (; speed < v_max; speed += 1) { \n velocity = speed;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n if (total_drag() > max_drag) \n break;\n }\n\n trace(\"velocity after step2: \" + velocity);\n\n // // at min drag angle can not produce enough lift? unsolvable.\n // if (foil_lift() < min_lift) {\n // trace(\"can not solve 'fild max speed' task for given inputs.\\nincrease drag input or decrease lift input\");\n // return;\n // }\n\n // step 3. pitch_of_min_drag correction for too much lift...\n if (foil_lift() > min_lift) {\n // unsustainable, needs less pitch & speed...\n // reduce min_pitch until lift is OK\n while(pitch_of_min_drag > aoa_min) {\n pitch_of_min_drag -= 0.05;\n craft_pitch = pitch_of_min_drag;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n if (foil_lift() <= min_lift)\n break;\n }\n trace(\"corrected pitch_of_min_drag: \" + pitch_of_min_drag);\n }\n\n // step 4. from this speed, iterate speed down\n for (speed = velocity; speed >= 0; speed -= 1) {\n trace(\"speed: \" + speed);\n double lift = 0;\n double drag = 0;\n double pitch = pitch_of_min_drag;\n velocity = speed;\n set_mast_aoa_for_given_drag(max_drag);\n for (; pitch < aoa_max; pitch += 0.1) {\n craft_pitch = pitch;\n //computeFlowAndRegenPlotAndAdjust();\n recomp_all_parts();\n lift = foil_lift();\n drag = total_drag();\n if (drag >= max_drag) {\n // stop increasing pitch, won't work. \n //likely need less speed\n trace(\"too much drag, break. speed: \" + speed + \" pitch: \" + pitch);\n break;\n }\n if (lift >= min_lift) {\n trace(\"done \");\n if (update_info) {\n make_max_speed_info(min_lift, max_drag, velocity);\n System.out.println(\"\\nDone!\\n----------------\\n\" + max_speed_info);\n }\n return;\n } \n }\n // here pitch is at max. what about lift?\n if (pitch >= aoa_max && lift < min_lift) {\n trace(\"oops, can not be solved.\\nincrease drag limit or decrease lift threshold!\");\n return;\n }\n }\n }",
"@Override\n\tprotected void setUpperBound() {\n\t\t\n\t}",
"public abstract void adjustSize(long size);"
]
| [
"0.5840802",
"0.5652753",
"0.56501216",
"0.5589907",
"0.55585283",
"0.5543162",
"0.5525736",
"0.5498629",
"0.5449783",
"0.54297405",
"0.5401792",
"0.53997093",
"0.5333139",
"0.5309456",
"0.53019166",
"0.5299692",
"0.52957517",
"0.52798784",
"0.52553344",
"0.5214326",
"0.52074933",
"0.5189791",
"0.51853573",
"0.5181742",
"0.517034",
"0.5159875",
"0.51568735",
"0.5151388",
"0.51399964",
"0.5136483",
"0.5133613",
"0.5125679",
"0.5120706",
"0.5116014",
"0.5115158",
"0.5114629",
"0.51044077",
"0.50925195",
"0.5078684",
"0.5072455",
"0.50591326",
"0.5058732",
"0.50502646",
"0.5043526",
"0.5043163",
"0.50405365",
"0.5040167",
"0.5018861",
"0.501581",
"0.50039446",
"0.49915868",
"0.49793902",
"0.49548966",
"0.49548334",
"0.49413756",
"0.49376532",
"0.4925488",
"0.49242803",
"0.4918079",
"0.49180612",
"0.49172992",
"0.49160495",
"0.49145642",
"0.49083474",
"0.49025217",
"0.49021494",
"0.4899394",
"0.48967993",
"0.48939168",
"0.48922333",
"0.48908588",
"0.48873565",
"0.48794755",
"0.48784834",
"0.48777828",
"0.4868169",
"0.48671642",
"0.4866099",
"0.48636392",
"0.48619786",
"0.48603752",
"0.48602113",
"0.48542243",
"0.4849648",
"0.48472846",
"0.48344693",
"0.4826662",
"0.48235342",
"0.48202726",
"0.48167387",
"0.48151064",
"0.48145762",
"0.48112234",
"0.48003438",
"0.47959524",
"0.47949222",
"0.47940096",
"0.47928512",
"0.47906107",
"0.478869"
]
| 0.6691516 | 0 |
Created by nan on 2016/4/22. | public interface AddNoticeViewInterface {
/**
* 上传附件完成
*/
void uploadAttachmentOnComplete(Data data);
/**
* 显示文件上传的百分比
*
* @param value
*/
void onProgress(int value);
/**
* 发布公告
*/
void publishNoticeOnComplete(Notice notice);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void func_104112_b() {\n \n }",
"public final void mo51373a() {\n }",
"protected boolean func_70814_o() { return true; }",
"private void m50366E() {\n }",
"public void mo38117a() {\n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"public void mo12628c() {\n }",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"private void kk12() {\n\n\t}",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"public void mo12930a() {\n }",
"public void mo4359a() {\n }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n public int value() {\n return 0;\n }",
"private stendhal() {\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic int operar() {\n\t\treturn 0;\r\n\t}",
"public void mo21877s() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n public int describeContents() { return 0; }",
"public void mo6081a() {\n }",
"public void mo1531a() {\n }",
"public final void mo91715d() {\n }",
"public void mo21779D() {\n }",
"public abstract void mo70713b();",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"public void mo21878t() {\n }",
"public void method_4270() {}",
"public abstract long mo9229aD();",
"public void m23075a() {\n }",
"private void m50367F() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public void skystonePos4() {\n }",
"public abstract Object mo1771a();",
"public abstract void mo56925d();",
"public void mo55254a() {\n }",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"private zza.zza()\n\t\t{\n\t\t}",
"public void mo21794S() {\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public void mo9848a() {\n }",
"public boolean func_145773_az() { return true; }",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"public void mo21787L() {\n }",
"public void skystonePos6() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void mo21825b() {\n }",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"public void mo115190b() {\n }",
"public void mo21795T() {\n }",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void initValue() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public void mo3376r() {\n }",
"public void mo21793R() {\n }",
"@Override\n\tpublic int sount() {\n\t\treturn 0;\n\t}",
"public void mo21785J() {\n }",
"@Override\r\n\tpublic double alapterulet() {\n\t\treturn 0;\r\n\t}",
"public void mo21782G() {\n }",
"private Zeroes() {\n // This space intentionally left blank.\n }",
"@Override\n protected Integer compute() {\n\n\n return null;\n }",
"protected boolean func_70041_e_() { return false; }",
"public void mo3749d() {\n }",
"public void mo21783H() {\n }",
"public void mo23813b() {\n }",
"public void mo21792Q() {\n }",
"public void mo21791P() {\n }",
"public abstract String mo13682d();",
"public abstract void mo6549b();",
"@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}",
"public Pitonyak_09_02() {\r\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"protected void mo6255a() {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tpublic int sequence() {\n\t\treturn 0;\n\t}",
"public void mo21789N() {\n }",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"protected abstract Set method_1559();",
"@Override\n\tpublic Value apprise() {\n\t\treturn null;\n\t}"
]
| [
"0.5889669",
"0.56677085",
"0.55275464",
"0.5510044",
"0.55020976",
"0.54187673",
"0.5411794",
"0.5409001",
"0.5384897",
"0.53790313",
"0.537665",
"0.5362001",
"0.5349483",
"0.53101575",
"0.5309329",
"0.5309322",
"0.52942985",
"0.52942985",
"0.52942985",
"0.52942985",
"0.52942985",
"0.52942985",
"0.52942985",
"0.5290812",
"0.5287404",
"0.52835864",
"0.52835864",
"0.5283529",
"0.5253624",
"0.5244466",
"0.5226095",
"0.52227503",
"0.52214676",
"0.5189704",
"0.5181596",
"0.5181153",
"0.51748043",
"0.5167111",
"0.51604486",
"0.5158265",
"0.515451",
"0.514977",
"0.5146264",
"0.5145608",
"0.5145381",
"0.514534",
"0.51434183",
"0.5141426",
"0.51375604",
"0.51362276",
"0.5136179",
"0.5136072",
"0.5132579",
"0.5131046",
"0.51286525",
"0.5123397",
"0.5117144",
"0.5117091",
"0.51125354",
"0.5104878",
"0.5103758",
"0.5090574",
"0.5086377",
"0.50806826",
"0.50803846",
"0.507496",
"0.50748134",
"0.50679374",
"0.50666845",
"0.50650203",
"0.50633895",
"0.5059618",
"0.5057782",
"0.5052491",
"0.50508916",
"0.5045692",
"0.504126",
"0.503808",
"0.5037932",
"0.50346226",
"0.50268745",
"0.50216",
"0.50199765",
"0.5015569",
"0.50129825",
"0.5004576",
"0.50038636",
"0.50014776",
"0.49996507",
"0.49978212",
"0.49953017",
"0.49920666",
"0.49881658",
"0.49852046",
"0.49850383",
"0.49832296",
"0.497762",
"0.49773803",
"0.49754402",
"0.49725226",
"0.49724132"
]
| 0.0 | -1 |
/ Need to clean the project's bin folder between runs | @SuppressWarnings("unused")
public void testBigFile() {
URL resource = getResource("/junit-stats.xml"); // a big file
String folder = "\\\\dev1\\c$\\tcs_build\\archive";
long originalLastModified = getOrginalFileLastModified(resource);
HistoricalTestStatisticsFileManager manager = new HistoricalTestStatisticsFileManager(folder, resource.getFile(), Long.MAX_VALUE);
verifyRevisionsLoaded(manager, 65);
verifyRevisionListSize(manager, 65);
List<String> orginalRevisionList = manager.getRevisionList();
manager.run();
assertEquals("you didn't clone the list correctly", 65, orginalRevisionList.size());
List<String> updatedRevisionList = manager.getRevisionList();
File updatedFile = new File(resource.getFile());
assertTrue("failed to update the file", updatedFile.lastModified() != originalLastModified);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void cleanup() {\n // if the java runtime is holding onto any files in the build dir, we\n // won't be able to delete them, so we need to force a gc here\n System.gc();\n\n if (deleteFilesOnNextBuild) {\n // delete the entire directory and all contents\n // when we know something changed and all objects\n // need to be recompiled, or if the board does not\n // use setting build.dependency\n //Base.removeDir(tempBuildFolder);\n \n // note that we can't remove the builddir itself, otherwise\n // the next time we start up, internal runs using Runner won't\n // work because the build dir won't exist at startup, so the classloader\n // will ignore the fact that that dir is in the CLASSPATH in run.sh\n Base.removeDescendants(tempBuildFolder);\n \n deleteFilesOnNextBuild = false;\n } else {\n // delete only stale source files, from the previously\n // compiled sketch. This allows multiple windows to be\n // used. Keep everything else, which might be reusable\n if (tempBuildFolder.exists()) {\n String files[] = tempBuildFolder.list();\n for (String file : files) {\n if (file.endsWith(\".c\") || file.endsWith(\".cpp\") || file.endsWith(\".s\")) {\n File deleteMe = new File(tempBuildFolder, file);\n if (!deleteMe.delete()) {\n System.err.println(\"Could not delete \" + deleteMe);\n }\n }\n }\n }\n }\n \n // Create a fresh applet folder (needed before preproc is run below)\n //tempBuildFolder.mkdirs();\n }",
"protected static void cleanUpWorkingDir() {\n final Path testControllerPath =\n Paths.get(SystemPersistence.manager.getConfigurationPath().toString(), TEST_CONTROLLER_FILE);\n try {\n Files.deleteIfExists(testControllerPath);\n } catch (final Exception e) {\n logger.info(\"Problem cleaning {}\", testControllerPath, e);\n }\n\n final Path testControllerBakPath =\n Paths.get(SystemPersistence.manager.getConfigurationPath().toString(), TEST_CONTROLLER_FILE_BAK);\n try {\n Files.deleteIfExists(testControllerBakPath);\n } catch (final Exception e) {\n logger.info(\"Problem cleaning {}\", testControllerBakPath, e);\n }\n }",
"public void clean(IProgressMonitor mon) throws CoreException{\r\n \t\tif (project!=null){\r\n \t\t\t/**\r\n \t\t\t * closes processes so they don't have locks on resources we'd like to delete\r\n \t\t\t * and they can then be restarted with the newly generated files\r\n \t\t\t */\r\n \t\t\tcloseAllProcesses();\r\n \t\t\tclean(true);\r\n \t\t\tproject.refreshLocal(IResource.DEPTH_ONE, mon);\r\n \t\t\tdeleteCabalProblems();\r\n \t\t\tBuildWrapperPlugin.deleteAllProblems(project);\r\n \t\t\tcabalFileChanged();\r\n \t\t\toutlines.clear();\r\n \t\t\tif (SandboxHelper.isSandboxed(this)){\r\n \t\t\t\ttry {\r\n \t\t\t\t\tSandboxHelper.installDeps(this);\r\n \t\t\t\t} catch (CoreException ce){\r\n \t\t\t\t\tBuildWrapperPlugin.logError(BWText.error_sandbox,ce);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tsynchronize(false);\r\n \t\t}\r\n \t}",
"@After\n\tpublic void setupClean() {\n\n\t\tString server = serverRequirement.getConfig().getName();\n\t\tif (FuseServerManipulator.isServerStarted(server)) {\n\t\t\tFuseServerManipulator.stopServer(server);\n\t\t}\n\t\tnew ProjectExplorer().deleteAllProjects();\n\t}",
"private static void cleanUpGlobalStateAndFileStore() {\n FileUtils.deleteDirectory(Paths.get(GLOBAL_STATE_DIR));\n }",
"private void cleanupLocal() throws IOException {\n FileSystem lfs = FileSystem.getLocal(new Configuration());\n lfs.delete(new Path(\"build\"), true);\n System.setProperty(\"hadoop.log.dir\", \"logs\");\n }",
"public void clean(){\n preprocessorActionsPerFile.clear();\n }",
"@AfterClass\n public static void cleanup() throws Exception {\n fs.delete(new Path(baseDir), true);\n }",
"private void cleanupStagingDir() {\n if (getApplicationId() != null) {\n dagUtils.cleanMr3Dir(getStagingDir(), sessionConf);\n }\n sessionScratchDir = null;\n }",
"@AfterClass\n public static void deleteOutputDir() throws OfficeException {\n\n // Delete the output directory\n FileUtils.deleteQuietly(new File(OUTPUT_DIR));\n }",
"void cleanScript();",
"public static void clearApplicationData(Context context) {\r\n File cache = context.getCacheDir();\r\n File appDir = new File(cache.getParent());\r\n if (appDir.exists()) {\r\n String[] children = appDir.list();\r\n for (String s : children) {\r\n if (!s.equals(\"lib\")) {\r\n deleteDir(new File(appDir, s));\r\n }\r\n }\r\n }\r\n }",
"public void cleanUp() {\n if (penv != null) {\n penv.cleanup();\n }\n List<ONDEXGraph> indexed = new LinkedList<ONDEXGraph>();\n Set<String> graphFolders = new HashSet<String>();\n for (Entry<ONDEXGraph, String> ent : indexedGraphs.entrySet()) {\n if (!indeciesToRetain.contains(ent.getValue())) graphFolders.add(new File(ent.getValue()).getParent());\n indexed.add(ent.getKey());\n }\n for (ONDEXGraph graph : indexed) removeIndex(graph, null);\n for (String graphDir : graphFolders) {\n try {\n DirUtils.deleteTree(graphDir);\n } catch (IOException e) {\n }\n }\n }",
"@After\n public void cleanUp() {\n mApConfigFile.delete();\n }",
"@AfterClass\n\tpublic static void cleanup() {\n\t\ttestDir.delete();\n\t\tfile.delete();\n\t}",
"public Runner() {\n this.config = ConfigUtils.getDefaultConfig();\n this.noSuchBaseDir = Files.createTempDir();\n this.noSuchBaseDir.deleteOnExit();\n }",
"private void tearDown() {\n if (tempDir != null) {\n OS.deleteDirectory(tempDir);\n tempFiles.clear();\n tempDir = null;\n }\n }",
"public void shutdown() {\n\t\tInput.cleanUp();\n\t\tVAO.cleanUp();\n\t\tTexture2D.cleanUp();\n\t\tResourceLoader.cleanUp();\n\t}",
"public void cleanShutDown () {\n shutdown = true;\n }",
"public void deleteGeneratedFiles();",
"public void clean()\r\n {\r\n // DO NOT TOUCH\r\n // System.out.println(unzipedFilePath);\r\n\r\n // only clean if there was a successful unzipping\r\n if (success)\r\n {\r\n // only clean if the file path to remove matches the zipped file.\r\n if (unzippedFilePath.equals(zippedFilePath.substring(0,\r\n zippedFilePath.length() - 4)))\r\n {\r\n // System.out.println(\"to be implmented\");\r\n for (File c : outputDir.listFiles())\r\n {\r\n // System.out.println(c.toString());\r\n if (!c.delete())\r\n {\r\n System.out.println(\"failed to delete\" + c.toString());\r\n }\r\n }\r\n outputDir.delete();\r\n outputDir = null;\r\n }\r\n }\r\n }",
"public static void cleanUp() {\n\t\tHashDecay.stopAll();\n\t\tSystem.gc();\n\t}",
"public void clearScriptPath() {\r\n loader = null;\r\n }",
"protected void cleaningUp() {\n\t}",
"@After\n\tpublic void tearDown() throws Exception {\n\t\tFileUtils.cleanDirectory(new File(this.tempFolderPath));\n\t}",
"private static void cleanAutomationResults() {\n \tLOG.info(\"Deleting unneccessary automation results.\");\n \t\n \t// Stop the graph database because it gets deleted\n \tDBUtil.closeGraph();\n \t\n \t// Remove clustering results\n \tFileUtil.deleteFileOrDirectory(clArgs.clusteringOutDir);\n \t\n \t// Remove graph database\n \tFileUtil.deleteFileOrDirectory(DBUtil.getNeo4jPath());\n }",
"@AfterClass (alwaysRun = true)\r\n\tpublic void cleanApp() throws Exception{\r\n\r\n\t\ttry {\r\n\t\t\tUtility.destroyUsers(xlTestDataWorkBook);\r\n\t\t\tUtility.destroyTestVault();\r\n\r\n\t\t}//End try\r\n\r\n\t\tcatch(Exception e){\r\n\t\t\tthrow e;\r\n\t\t}//End Catch\r\n\t}",
"public static void removeEmptyPathsOnClient() {\r\n\t\tfinal File libRoot = JSurePreferencesUtility.getJSureXMLDirectory();\r\n\t\tif (libRoot != null) {\r\n\t\t\tFileUtility.deleteEmptySubDirectories(libRoot);\r\n\t\t}\r\n\t}",
"@AfterClass (alwaysRun = true)\r\n\tpublic void cleanApp() throws Exception{\r\n\r\n\t\ttry {\r\n\t\t\tUtility.destroyTestVault();\r\n\t\t\tUtility.destroyTestVault(\"My Vault\");\r\n\t\t\tUtility.destroyUsers(xlTestDataWorkBook, \"DestroyUsers\");\r\n\r\n\t\t}//End try\r\n\r\n\t\tcatch(Exception e){\r\n\t\t\tthrow e;\r\n\t\t}//End Catch\r\n\t}",
"protected void tearDown() throws Exception {\n\t\tdeployer.deleteDir(unitTestDir);\n\t\tassertFalse(new File(unitTestDir, \"composition.groovy\").exists());\n\t}",
"public void cleanAppForHiddenSpace() {\n this.mService.mHwAMSEx.cleanAppForHiddenSpace();\n }",
"void cleanUp();",
"void cleanUp();",
"void cleanUp();",
"void clean();",
"void clean();",
"void clean();",
"static void clean(Configuration conf) throws IOException {\n if (!debug(conf)) {\n int iteration = getCurrentIteration(conf);\n for (int i = 0; i <= iteration; i++) {\n deleteIfExists(conf, OUTPUT_BASE + i);\n deleteIfExists(conf, OUTPUT_BASE + i + TEMP_SUFFIX);\n deleteIfExists(conf, SCHEMA_BASE + i);\n }\n deleteIfExists(conf, \"input\");\n }\n }",
"public void cleanUp();",
"public void cleanUp();",
"void deleteStoryDirectory() {\n\n try {\n\n Log.i(\"Deleting StoryDirectory\", story_directory.toString());\n FileUtils.deleteDirectory(story_directory);\n } catch (IOException e) {\n\n }\n\n }",
"void deleteCoverDirectory() {\n\n try {\n\n Log.i(\"Deleting Covr Directory\", cover_directory.toString());\n FileUtils.deleteDirectory(cover_directory);\n } catch (IOException e) {\n\n }\n\n }",
"@AfterClass\n\tpublic static void cleanUp() throws IOException {\n\t\tLpeFileUtils.removeDir(tempDir.getAbsolutePath());\n\t}",
"private void exitConfiguration() {\n checkSave();\n System.exit(0);\n }",
"private void m50956b() {\n if (!C8626b.m50749b() && !C8626b.m50748a()) {\n try {\n File file = new File(this.f36887b.getExternalFilesDir(null) + \"/.logcache\");\n if (file.exists() && file.isDirectory()) {\n for (File file2 : file.listFiles()) {\n file2.delete();\n }\n }\n } catch (NullPointerException unused) {\n }\n }\n }",
"public void cleanUp() {\r\n\t\tsuper.cleanUp() ;\r\n\t}",
"private void cleanup() {\n File tmpdir = new File(System.getProperty(\"java.io.tmpdir\"));\n File[] backupDirs = tmpdir.listFiles(file -> file.getName().contains(BACKUP_TEMP_DIR_PREFIX));\n if (backupDirs != null) {\n for (File file : backupDirs) {\n try {\n FileUtils.deleteDirectory(file);\n log.info(\"removed temporary backup directory {}\", file.getAbsolutePath());\n } catch (IOException e) {\n log.error(\"failed to delete the temporary backup directory {}\", file.getAbsolutePath());\n }\n }\n }\n }",
"private void cleanFile(IFile file) {\n \t\tlog(\" Cleaning build directory for \" + file.getName());\n \t\t\n \t\tString buildDir = getBuildDirectory(file);\n \t\t// Check the build directory and try to create it\n \t\tFile buildDirFile = new File(buildDir);\n \t\tif (buildDirFile.exists()) {\n \t\t\tFile[] files = buildDirFile.listFiles();\n \t\t\tfor (File f : files) {\n \t\t\t\ttry {\n \t\t\t\t\tf.delete();\n \t\t\t\t\tlog(\" - \" + f.getName());\n \t\t\t\t} catch (Exception _) {\n \t\t\t\t\tlog(\" > Failed: \" + f.getName());\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}",
"@AfterClass\n public void cleanUp() {\n }",
"private void cleanUpRunningProcessInstances() {\n List<ProcessInstance> runningInstances = processEngine.getRuntimeService().createProcessInstanceQuery().processDefinitionKey(PROCESS_DEFINITION_KEY).list();\n runningInstances.addAll(processEngine.getRuntimeService().createProcessInstanceQuery().processDefinitionKey(INCIDENT_PROCESS_DEFINITION).list());\n for (ProcessInstance processInstance : runningInstances) {\n processEngine.getRuntimeService().deleteProcessInstance(processInstance.getId(), \"deleted to have a clean environment for Arquillian\");\n }\n }",
"public void exit(Context context) {\n // clear cache\n deleteFile(context.getCacheDir());\n deleteFile(context.getFilesDir());\n }",
"public void deleteTemporaryProject() throws CoreException{\n\t\tString versionName = DataManager.getProjectVersion();\n\t\tajdtHandler.deleteProject(versionName);\n\t\t\n\t\tif(versionName.contains(\"_Old\")){\n\t\t\tversionName = versionName.replace(\"_Old\", \"\");\n\t\t\tajdtHandler.deleteProject(versionName);\n\t\t}\n\t\t\n\t}",
"@Override\n\tpublic void deconfigure() throws CoreException {\n\t\tPTJavaFileBuilder.removeBuilderFromProject(fProject);\n\t\t// TO DO: delete markers here\n\t}",
"public void clearEnvironment()\r\n\t{\r\n\t\tEnvironment.e = null;\r\n\t}",
"public void clearMainClass();",
"public void clean();",
"public void clean();",
"public void clean();",
"public void clean();",
"private void clearFiles() {\r\n File file = new File(\"test_files/upload\");\r\n File[] files = file.listFiles();\r\n for (File delFile : files) {\r\n delFile.delete();\r\n }\r\n file = new File(\"test_files/stress.jar\");\r\n file.delete();\r\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tFile dir = new File(\"src/reports\");\n\t\t\t\tfor (File file : dir.listFiles())\n\t\t\t\tif (!file.isDirectory())\n\t\t\t\tfile.delete();\n\t\t\t\t}",
"public void clean() {\n coffeeMachine.setDefaultCupsBeforeClean();\n }",
"public static void clearRegistry() {\n \t\tLIBRARIES.clear();\n \t}",
"public void remFile(){\n ((MvwDefinitionDMO) core).remFile();\n }",
"static void releaseConfigFiles() throws Exception {\r\n ConfigManager configManager = ConfigManager.getInstance();\r\n for (Iterator iterator = configManager.getAllNamespaces(); iterator.hasNext();) {\r\n configManager.removeNamespace((String) iterator.next());\r\n }\r\n }",
"private static void exit(){\n\t\t\n\t\tMain.run=false;\n\t\t\n\t}",
"public synchronized void purgeApplication(String appName) {\n File appDir = new File(appsDir, appName);\n if (!FilePathValidator.validateFile(appDir, appsDir)) {\n throw new ApplicationException(\"Application attempting to create files outside the apps directory\");\n }\n try {\n Tools.removeDirectory(appDir);\n } catch (IOException e) {\n throw new ApplicationException(\"Unable to purge application \" + appName, e);\n }\n if (appDir.exists()) {\n throw new ApplicationException(\"Unable to purge application \" + appName);\n }\n }",
"private void removeLocalDockerImageFiles(PluginPackages pluginPackage) {\n String versionPath = SystemUtils.getTempFolderPath() + pluginPackage.getName() + \"-\"\n + pluginPackage.getVersion() + \"/\";\n File versionDirectory = new File(versionPath);\n try {\n log.info(\"Delete directory: {}\", versionPath);\n FileUtils.deleteDirectory(versionDirectory);\n } catch (IOException e) {\n log.error(\"Remove plugin package file failed: {}\", e);\n throw new WecubeCoreException(\"3107\", \"Remove plugin package file failed.\");\n }\n }",
"@Override\n\t \tpublic void run() {\n\t \t\tsuper.run();\n\t \t\t FileUtil.DeleteFile(new File(Environment.getExternalStorageDirectory() + \"/\"+\"jikedownload\"));\n\t \t}",
"public static void main(final String... args) {\n if (new Mode(args).verbose()) {\n org.apache.log4j.Logger.getRootLogger().setLevel(Level.DEBUG);\n }\n Logger.info(Clean.class, Res.resource(\"/ot-clean/help.txt\"));\n new Clean(args).clean(Paths.get(System.getProperty(\"user.dir\")));\n }",
"@After\n\tpublic void cleanUp() {\n\t\tsuper.unload();\n\n\t\t// shutdown the database\n\t\tif (db != null) {\n\t\t\tdb.shutDownDb();\n\t\t}\n\t\tassertTrue(Files.deleteDir(tmpDir));\n\t}",
"public void clean() throws IOException {\n simpleCommand(\"CLN\\0\");\n }",
"private void cleanOutputFolder(String output) {\n \t\tFile[] files = new File[1];\n \t\tfiles[0] = new File(output);\n \t\tcleanFolder(files);\n \t}",
"public static void docClean(String commandpath, String[] argv) throws IOException, InterruptedException {\n String exe = \"python\";\n String[] cmdArr = new String[]{exe, commandpath, argv[1],argv[2], argv[3], argv[4]};\n Process process = Runtime.getRuntime().exec(cmdArr);\n System.out.println(process.waitFor());\n }",
"@BeforeClass\n\tpublic static void setUp() throws Exception {\n\t\tFile projectFile = new File(\"src/test/resources/test.eap\");\n\n\t\tif (projectFile.exists()) {\n\t\t\tprojectFile.delete();\n\t\t}\n\n\t}",
"public void clean();",
"public void cleanup() {\r\n\t\tsuper.cleanup();\r\n\t\tfor (int i = 0; i < _composites.size(); i++) {\r\n\t\t\t_composites.get(i).cleanup();\t\r\n\t\t}\r\n\t}",
"private void clearClipsDirectory(){\n /* Citation : http://helpdesk.objects.com.au/java/how-to-delete-all-files-in-a-directory#:~:text=Use%20the%20listFiles()%20method,used%20to%20delete%20each%20file. */\n File directory = new File(Main.CREATED_CLIPS_DIRECTORY_PATH);\n File[] files = directory.listFiles();\n if(files != null){\n for(File file : files){\n if(!file.delete()) System.out.println(\"Failed to remove file \" + file.getName() + \" from \" + Main.CREATED_CLIPS_DIRECTORY_PATH);\n }\n }\n }",
"private void exitApplication()\r\n {\r\n System.exit(0);\r\n }",
"private void unloadProject()\n {\n if (projectBuilder != null) {\n projectBuilder.database.close();\n projectBuilder = null;\n }\n\n if (projectSettingsPanel != null) {\n Container container = projectSettingsPanel.getParent();\n if (container != null)\n container.remove(projectSettingsPanel);\n projectSettingsPanel = null;\n }\n\n projectSettingsContainer.removeAll();\n generateButton.setEnabled(false);\n\n project = null;\n }",
"public void clearFramework() {\r\n\t\tList<Configuration> tests = testCache.getAllTests();\r\n\t\tlog.info(\"Clearing all tests.\\n\");\r\n\t\tfor (Configuration test : tests) {\r\n\t\t\tkillTest(test.getUniqueId());\r\n\t\t}\r\n\t\tworkQueue.clear();\r\n\t\ttestCache.clear();\r\n\t}",
"public static void DrivingNavi_clean(){\n navInitManager = null;\n\n }",
"public static void shutdown ()\n\t{\n\t\tif (m_interpreter != null)\n\t\t{\n\t\t\tm_console.dispose ();\n\t\t\tm_interpreter.cleanup ();\n\t\t}\n\t}",
"public void testCleanFile() {\n shouldCleanFile(\"jasmine1/jasmineTestBefore.js\");\n\n // Given a jasmine file with a fdescribe() and an fit().\n shouldCleanFile(\"jasmine2/jasmineTestBefore.js\");\n }",
"private void doCleanup() {\n Log.INFO(\"Final cleanup\");\n try { // return to full-cluster-running state\n restartNode(); \n } catch (HoneycombTestException e) {\n Log.ERROR(\"Final cleanup failed: \" + e);\n }\n }",
"public void doMyCleanUpStuff() {\r\n\t\tSystem.out.println(\"TrackCoach: inside method doMyCleanUpStuff\");\r\n\t}",
"public void cleanUp(){\n for(ShaderProgram sp : shaderlist){\n sp.cleanup();\n }\n }",
"static void exit()\r\n\t {\n\t\t System.exit(0);\r\n\t }",
"public static void exitAll() {\r\n\t\tSystem.exit(0);\r\n\t}",
"public void run() {\n\t\tnew UsageCheckAdapter(EventSourceID.CD_PLUGIN_UNINSTALL);\n\t\t\n\t\tInstallationView view = CodeGeneratorActivator.getDefault().getInstallationView();\n\t\tview.uninstallPlugin();\n\t}",
"public void deleteDir() throws Exception\n{\n if(_repo!=null) _repo.close(); _repo = null;\n _gdir.delete();\n _gdir.setProp(GitDir.class.getName(), null);\n}",
"public void cleanUp(){\n //Clean up the parent class, i.e. close pipes.\n super.cleanUp();\n }",
"public void Clean()\n\t{\n\t\tstorage.clear();\n\t}",
"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 }",
"private void emptyTestDirectory() {\n // Delete the files in the /tmp/QVCSTestFiles directory.\n File tempDirectory = new File(TestHelper.buildTestDirectoryName(TEST_SUBDIRECTORY));\n File[] files = tempDirectory.listFiles();\n if (files != null) {\n for (File file : files) {\n if (file.isDirectory()) {\n File[] subFiles = file.listFiles();\n for (File subFile : subFiles) {\n if (subFile.isDirectory()) {\n File[] subSubFiles = subFile.listFiles();\n for (File subSubFile : subSubFiles) {\n subSubFile.delete();\n }\n }\n subFile.delete();\n }\n }\n file.delete();\n }\n }\n }",
"private void cleanTempFolder() {\n File tmpFolder = new File(getTmpPath());\n if (tmpFolder.isDirectory()) {\n String[] children = tmpFolder.list();\n for (int i = 0; i < children.length; i++) {\n if (children[i].startsWith(TMP_IMAGE_PREFIX)) {\n new File(tmpFolder, children[i]).delete();\n }\n }\n }\n }",
"public void cleanup() {\n try {\n resManager.stopVirtualNodes();\n } catch (Exception e) {\n logger.error(ITConstants.TS + \": \" + DEL_VM_ERR, e);\n }\n logger.info(\"Cleanup done\");\n }",
"public void run() {\n\t\t\t\t// Do shutdown work ...\n\t\t\t\tsavePreferences();\n\t\t\t\tUtils.deleteTempDirectories(lstTempDirectories);\n\t\t\t}",
"static void clearCache() {\n CONFIG_VALUES = null;\n RUN_MODE = null;\n }",
"public void shutdown() {\r\n System.exit(0);\r\n }",
"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 }"
]
| [
"0.7017301",
"0.6844714",
"0.6409456",
"0.6388605",
"0.63016206",
"0.6191039",
"0.61140907",
"0.61104554",
"0.60592294",
"0.60352707",
"0.5998111",
"0.5906125",
"0.5903679",
"0.5890685",
"0.586614",
"0.5778823",
"0.576092",
"0.57523537",
"0.57468706",
"0.57417595",
"0.57319385",
"0.5725955",
"0.5712746",
"0.56997955",
"0.5697804",
"0.56898713",
"0.5687529",
"0.56855273",
"0.5685",
"0.5678905",
"0.56616926",
"0.56565684",
"0.56565684",
"0.56565684",
"0.5655289",
"0.5655289",
"0.5655289",
"0.564552",
"0.5627824",
"0.5627824",
"0.56154346",
"0.56078905",
"0.5605066",
"0.56021744",
"0.5599882",
"0.5598096",
"0.55949026",
"0.5591898",
"0.5585731",
"0.5582998",
"0.55766946",
"0.55742073",
"0.5564112",
"0.55634874",
"0.55620253",
"0.5561776",
"0.5561776",
"0.5561776",
"0.5561776",
"0.55456996",
"0.5544676",
"0.55345803",
"0.553077",
"0.5527975",
"0.55270773",
"0.5511698",
"0.55106825",
"0.55047315",
"0.5490959",
"0.5467547",
"0.54670715",
"0.54654574",
"0.5455615",
"0.54491967",
"0.54375494",
"0.54349506",
"0.5431749",
"0.54289204",
"0.54260135",
"0.5419746",
"0.54183716",
"0.54132384",
"0.54129577",
"0.5403575",
"0.5401288",
"0.5399972",
"0.5397211",
"0.53854775",
"0.5380537",
"0.5369624",
"0.53680205",
"0.53622997",
"0.5350514",
"0.5348274",
"0.5347849",
"0.5343916",
"0.53407913",
"0.5340046",
"0.53383845",
"0.533713",
"0.53370696"
]
| 0.0 | -1 |
Creates the default factory implementation. | public static CDOServerDefsFactory init() {
try {
CDOServerDefsFactory theCDOServerDefsFactory = (CDOServerDefsFactory) EPackage.Registry.INSTANCE
.getEFactory("http://www.eclipse.org/emf/CDO/server/defs/1.0.0");
if (theCDOServerDefsFactory != null) {
return theCDOServerDefsFactory;
}
} catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new CDOServerDefsFactoryImpl();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Factory() {\n\t\tsuper();\n\t}",
"public BuiltinFactoryImpl() {\n\t\tsuper();\n\t}",
"public ObjectifyFactory factory() {\n return ofy().factory();\n }",
"private ConcreteFactory() {}",
"public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }",
"public static Factory factory() {\n return ext_h::new;\n }",
"public EsoFactoryImpl()\r\n {\r\n super();\r\n }",
"public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }",
"public CommonsFactoryImpl() {\n\t\tsuper();\n\t}",
"public Factory() {\n this(getInternalClient());\n }",
"public EcoreFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"public PiviFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"public EcoreFactoryImpl() {\n super();\n }",
"public ServiceFactoryImpl() {\n\t\tsuper();\n\t}",
"public static StaticFactoryInsteadOfConstructors newInstance() {\n return new StaticFactoryInsteadOfConstructors();\n }",
"public interface Factory {\r\n}",
"public EcoreFactoryImpl()\n {\n super();\n }",
"public ProyectoFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"public PedidoFactoryImpl() {\n\t\tsuper();\n\t}",
"default Factory<T> toFactory() {\n throw new UnsupportedOperationException();\n }",
"private ServiceFactory() {}",
"protected abstract S createDefault();",
"public ObjectFactory() {}",
"public ObjectFactory() {}",
"public ObjectFactory() {}",
"public CoreFactoryImpl() {\n\t\tsuper();\n\t}",
"public LanterneFactoryImpl() {\n\t\tsuper();\n\t}",
"public static BuiltinFactory init() {\n\t\ttry {\n\t\t\tBuiltinFactory theBuiltinFactory = (BuiltinFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://www.soluvas.com/schema/story.builtin/1.0\"); \n\t\t\tif (theBuiltinFactory != null) {\n\t\t\t\treturn theBuiltinFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new BuiltinFactoryImpl();\n\t}",
"public FvFactoryImpl() {\n\t\tsuper();\n\t}",
"public GpflFactoryImpl()\n {\n super();\n }",
"public Testing2FactoryImpl() {\n\t\tsuper();\n\t}",
"public static Factory factory() {\n return ext_dbf::new;\n }",
"public PascalFactoryImpl()\n {\n super();\n }",
"public ObjectFactory() {\r\n\t}",
"public ObjectFactory() {\n\t}",
"public MystFactoryImpl()\r\n {\r\n super();\r\n }",
"public borFactoryImpl() {\n\t\tsuper();\n\t}",
"public Factory() {\n\t\tclassMap = new TreeMap<String,Class<T> >();\n\t}",
"public interface AbstractFactory {\n /**\n * Create cpu cpu.\n *\n * @return the cpu\n */\n Cpu createCpu();\n\n /**\n * Create main board main board.\n *\n * @return the main board\n */\n MainBoard createMainBoard();\n}",
"public BasicSafetyCaseFactoryImpl() {\n\t\tsuper();\n\t}",
"public interface Factory<T> {\n T create();\n}",
"public static Factory factory() {\n return Document_print::new;\n }",
"public ParameterizedInstantiateFactory() {\r\n super();\r\n }",
"public interface Factory {\n LeiFeng createLeiFeng();\n}",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public ObjectFactory() {\r\n }",
"public static PedidoFactory init() {\n\t\ttry {\n\t\t\tPedidoFactory thePedidoFactory = (PedidoFactory) EPackage.Registry.INSTANCE\n\t\t\t\t\t.getEFactory(PedidoPackage.eNS_URI);\n\t\t\tif (thePedidoFactory != null) {\n\t\t\t\treturn thePedidoFactory;\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new PedidoFactoryImpl();\n\t}",
"public WdlFactoryImpl() {\n\t\tsuper();\n\t}",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }"
]
| [
"0.7772179",
"0.76468444",
"0.74667054",
"0.74295115",
"0.74254334",
"0.73646814",
"0.7238647",
"0.72380936",
"0.71705085",
"0.7159591",
"0.71583474",
"0.7149343",
"0.7100073",
"0.7098844",
"0.7089862",
"0.7085499",
"0.70833546",
"0.7055521",
"0.7046437",
"0.70464075",
"0.7031641",
"0.70270944",
"0.701941",
"0.701941",
"0.701941",
"0.70043325",
"0.69851726",
"0.69783366",
"0.69765425",
"0.69720924",
"0.6970474",
"0.694125",
"0.6883459",
"0.6876981",
"0.6871118",
"0.68350035",
"0.6810233",
"0.68087864",
"0.68064463",
"0.6801932",
"0.6799481",
"0.67855364",
"0.67606264",
"0.67481834",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738745",
"0.6738509",
"0.6735572",
"0.6730986",
"0.6730986",
"0.6730986",
"0.6730986",
"0.6730986",
"0.6730986",
"0.6730986"
]
| 0.0 | -1 |
Creates an instance of the factory. | public CDOServerDefsFactoryImpl() {
super();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Factory() {\n\t\tsuper();\n\t}",
"public Factory() {\n this(getInternalClient());\n }",
"public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }",
"Instance createInstance();",
"public ObjectifyFactory factory() {\n return ofy().factory();\n }",
"public static StaticFactoryInsteadOfConstructors newInstance() {\n return new StaticFactoryInsteadOfConstructors();\n }",
"private ConcreteFactory() {}",
"public ObjectFactory() {}",
"public ObjectFactory() {}",
"public ObjectFactory() {}",
"public static Factory factory() {\n return ext_h::new;\n }",
"public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }",
"public PedidoFactoryImpl() {\n\t\tsuper();\n\t}",
"private EntityFactory() {}",
"public static Factory factory() {\n return ext_dbf::new;\n }",
"public void create(){}",
"private ServiceFactory() {}",
"public static BookFactory getInstance()\r\n {\r\n \r\n if(bookFactoryInstance == null)\r\n {\r\n bookFactoryInstance = new BookFactory();\r\n }\r\n \r\n return bookFactoryInstance;\r\n }",
"private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}",
"public EsoFactoryImpl()\r\n {\r\n super();\r\n }",
"public ParameterizedInstantiateFactory() {\r\n super();\r\n }",
"public ProyectoFactoryImpl() {\r\n\t\tsuper();\r\n\t}",
"public ObjectFactory() {\r\n\t}",
"public ObjectFactory() {\n\t}",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }",
"public ObjectFactory() {\n }"
]
| [
"0.7391547",
"0.7210337",
"0.7200319",
"0.6975922",
"0.6973979",
"0.6835566",
"0.6710199",
"0.66718537",
"0.66718537",
"0.66718537",
"0.6663897",
"0.6615755",
"0.6614345",
"0.6614332",
"0.65878785",
"0.65698475",
"0.6533896",
"0.65313435",
"0.6527652",
"0.6515727",
"0.64746064",
"0.6474002",
"0.6471869",
"0.64716333",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475",
"0.64601475"
]
| 0.0 | -1 |
Servlet to process the send email request | protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException{
try{
String code = request.getParameter("code");
Properties properties = new Properties();
properties.setProperty("mail.host", ConfiguracionCorreo.smtp);
properties.setProperty("mail.smtp.port", ConfiguracionCorreo.port);
properties.setProperty("mail.smtp.auth", ConfiguracionCorreo.isAuth);
properties.setProperty("mail.smtp.socketFactory.class", ConfiguracionCorreo.socketFactory);
properties.setProperty("mail.smtp.socketFactory.port", ConfiguracionCorreo.port);
Session session = Session.getDefaultInstance(properties, new Authenticator(){
protected PasswordAuthentication getPasswordAuthentication(){
return new PasswordAuthentication(DatosCorreo.correo, DatosCorreo.password);
}
});
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress(DatosCorreo.correo));
message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(DatosCorreo.correo));
message.setSubject(DatosCorreo.subject);
StringBuilder emailBuilder = new StringBuilder();
emailBuilder.append(DatosCorreo.builder1);
emailBuilder.append(code);
emailBuilder.append(DatosCorreo.builder2);
Multipart multipart = new MimeMultipart();
BodyPart bodyPart = new MimeBodyPart();
bodyPart.setContent(emailBuilder.toString(), "text/html; charset=UTF-8");
multipart.addBodyPart(bodyPart);
message.setContent(multipart);
Transport.send(message);
}catch(Exception e){
log.warning(e.getMessage() + ": " + e.getLocalizedMessage());
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n try {\n final String username = \"[email protected]\";\n\t\tfinal String password = \"goldroof806\";\n \n\t\tProperties props = new Properties();\n\t\tprops.put(\"mail.smtp.auth\", \"true\");\n\t\tprops.put(\"mail.smtp.starttls.enable\", \"true\");\n\t\tprops.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n\t\tprops.put(\"mail.smtp.port\", \"587\");\n \n\t\tSession session = Session.getInstance(props,\n\t\t new javax.mail.Authenticator() {\n\t\t\tprotected PasswordAuthentication getPasswordAuthentication() {\n\t\t\t\treturn new PasswordAuthentication(username, password);\n\t\t\t}\n\t\t });\n \n\t\ttry {\n \n\t\t\tMessage message = new MimeMessage(session);\n\t\t\tmessage.setFrom(new InternetAddress(\"[email protected]\"));\n\t\t\tmessage.setRecipients(Message.RecipientType.TO,\n\t\t\t\tInternetAddress.parse(\"[email protected]\"));\n\t\t\tmessage.setSubject(\"Wooden Soft Customer Request - \" + request.getParameter(\"choice\"));\n \n\t\t\tmessage.setText(\"To The CEO of The WSD,\"\n\t\t\t\t+ \"\\n\\n \" + request.getParameter(\"email\") +\" requests: \\n\\n\" + request.getParameter(\"message\"));\n \n\t\t\tTransport.send(message);\n \n\t\t\tSystem.out.println(\"Done\");\n out.println(\"Success Email Sent Successfully!\");\n\t\t} catch (MessagingException e) {\n\t\t\tout.println(\"There was an error with your request a paramter was missing: \"+e.getMessage());\n\t\t}\n \n } finally { \n out.close();\n }\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String url = \"/Welcome.jsp\";\n String emailMessage = request.getParameter(\"emailMessage\");\n \n ArrayList<String> emailList = UserDB.getEmailList();\n if (emailList != null){\n for (String email:emailList){\n sendEmail(email, emailMessage);\n }\n }\n \n this.getServletContext().getRequestDispatcher(url).forward(request, response);\n }",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\r\n\t\tString[] emails = req.getParameterValues(\"checkboxs\");\r\n\r\n\t\tString toMails = \"\";\r\n\t\tfor (int i = 0; i < emails.length; i++) {\r\n\t\t\ttoMails = toMails + emails[i] + \",\";\r\n\t\t}\r\n\r\n\t\tPrintWriter out = resp.getWriter();\r\n\r\n\t\tString message = \"<p>Dear Member,</p><br>\";\r\n\t\tmessage += \"<p>Thank you for the request.</p>\";\r\n\t\tmessage += \"<p>Your request has been reviewed. Please expect a call from our staff soon.</p><br>\";\r\n\t\tmessage += \"<p>Best regards,</p>\";\r\n\t\tmessage += \"<p>UCM Health Division.</p>\";\r\n\t\tmessage += \"<img src=\\\"WebContent\\\\img\\\\UCM.png\\\"/>\";\r\n\r\n\t\ttry {\r\n\t\t\tint success = MailSendingConfigurations.sendEmail(host, port, user, pass, toMails,\r\n\t\t\t\t\t\"UCM Plasma Donation for Covid-19\", message);\r\n\r\n\t\t\tif (success == 1) {\r\n\t\t\t\tout.println(\r\n\t\t\t\t\t\t\"<script src=' https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.11.4/sweetalert2.all.js'></script>\");\r\n\r\n\t\t\t\tout.println(\"<script src='https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>\");\r\n\r\n\t\t\t\tout.println(\"<script>\");\r\n\r\n\t\t\t\tout.println(\"$(document).ready(function(){\");\r\n\r\n\t\t\t\tout.println(\"swal('Mails Send Successfully','','success');\");\r\n\r\n\t\t\t\tout.println(\"});\");\r\n\r\n\t\t\t\tout.println(\"</script>\");\r\n\r\n\t\t\t\tRequestDispatcher requestDispatcher = req.getRequestDispatcher(\"ContactUser.jsp\");\r\n\t\t\t\trequestDispatcher.include(req, resp);\r\n\t\t\t} else {\r\n\t\t\t\tout.println(\r\n\t\t\t\t\t\t\"<script src=' https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.11.4/sweetalert2.all.js'></script>\");\r\n\r\n\t\t\t\tout.println(\"<script src='https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>\");\r\n\r\n\t\t\t\tout.println(\"<script>\");\r\n\r\n\t\t\t\tout.println(\"$(document).ready(function(){\");\r\n\r\n\t\t\t\tout.println(\"swal('Mails Send Failed','Something went wrong','error');\");\r\n\r\n\t\t\t\tout.println(\"});\");\r\n\r\n\t\t\t\tout.println(\"</script>\");\r\n\r\n\t\t\t\tRequestDispatcher requestDispatcher = req.getRequestDispatcher(\"ContactUser.jsp\");\r\n\t\t\t\trequestDispatcher.include(req, resp);\r\n\t\t\t}\r\n\r\n\t\t} catch (MessagingException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n \n Properties props = new Properties();\n Session session = Session.getDefaultInstance(props, null);\n\n String msgBody = \"This is a test message!\";\n String sendTo = FormUtil.getParamOrEmpty(request, \"email\");\n logger.info(\"SendTo: \" + sendTo);\n String from = \"[email protected]\";\n try {\n Message message = new MimeMessage(session);\n message.setFrom(new InternetAddress(from, \"The QAF Team\"));\n message.addRecipient(Message.RecipientType.TO, new InternetAddress(sendTo));\n message.setSubject(\"Thank you for your request to join the QAF mailing list!\");\n message.setText(msgBody);\n Transport.send(message);\n\n } catch (AddressException ex) {\n logger.warning(\"Address Exception: \" + ex.getMessage());\n\n } catch (MessagingException ex) {\n logger.warning(\"Messagings Exception: \" + ex.getMessage());\n }\n String returnPage = request.getParameter(\"return-page\");\n RequestDispatcher view = request.getRequestDispatcher(returnPage);\n view.forward(request, response);\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\n String action = request.getServletPath();\n\n switch(action) {\n case \"/sendmailuserregister\":\n try {\n sendmailuserregister(request, response);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n break;\n case \"/sendmailcartid\":\n try {\n sendmailcartid(request, response);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n break;\n default:\n break;\n }\n\n\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\n\t\t/*\n\t\t * We parse a JSON object (using GSON API) with structure like so:\n\t\t * {\n\t\t * \"message\" : \"message body\",\n\t\t * \"subject\" : \"subject\",\n\t\t * \"to\" : [\"[email protected]\", \"[email protected]\"]\n\t\t * }\n\t\t * these are held in:\n\t\t * - String message\n\t\t * - String subject\n\t\t * - ArrayList<String> to\n\t\t */\n\t\tJsonObject data = new JsonParser().parse(request.getReader()).getAsJsonObject();\n\t\t\n\t\tString message = data.get(\"message\").getAsString();\n\t\tString subject = data.get(\"subject\").getAsString();\n\t\t\n\t\tJsonArray json_to = data.get(\"to\").getAsJsonArray();\n\t\tArrayList<String> recipients = new ArrayList<String>();\n\t\tfor (JsonElement i : json_to)\n\t\t\trecipients.add(i.getAsString());\n\t\t\n\t\tSMTP smtp = checkAuth(request, response);\n\t\tif (smtp == null)\n\t\t\treturn;\n\t\t\n\t\ttry {\n\t\t\tsmtp.send(recipients.get(0), \"\", \"\", subject, \"\", message);\n\t\t} catch (MessagingException e) {\n\t\t\tsend(response, 500, \"Error sending message; try again\");\t\n\t\t}\n\t\t//If we made it this far, the message has been sent\n\t\tsend(response, 202, \"\");\n\t}",
"public void doPost(HttpServletRequest req,HttpServletResponse res) throws IOException\n\t{\n\t\t PrintWriter out=res.getWriter();\n\n\t \t\tString to[]=req.getParameterValues(\"to\");\n\t \t\tString msg=req.getParameter(\"msg\");\n\t\t\tString emailusr=req.getParameter(\"emailuser\");\n\t \t\tString subject=req.getParameter(\"subject\");\n\t\t\tSystem.out.println(\"to:->\"+to);\n\t\t\tint i = 0;\n\t\t\t\n\t\t\tProperties properties = System.getProperties();\n\t\t\tproperties.put(\"mail.smtp.starttls.enable\", \"true\"); \n\t\t\tproperties.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n\t \n\t \n\t\t\tproperties.put(\"mail.smtp.port\", \"587\");\n\t\t\tproperties.put(\"mail.smtp.auth\", \"true\");\n\t \n\t \n\t \n\t\t\tSession session = Session.getInstance(properties, new javax.mail.Authenticator()\n\t\t\t{\n\t\t\tprotected PasswordAuthentication getPasswordAuthentication()\n\t\t\t{\n\t\t\treturn new PasswordAuthentication(from, password);\n\t\t\t} \n\t\t\t}\n\t\t\t);\n \n\t \n\t try\n\t {\n final MimeMessage message = new MimeMessage(session);\n message.setFrom(new InternetAddress(from));\n InternetAddress[] addressTo = new InternetAddress[to.length];\n for (int j = 0; j < to.length; j++)\n {\n addressTo[j] = new InternetAddress(to[j]);\n }\n message.setRecipients(Message.RecipientType.BCC, \"[email protected]\"); \n\t\t\tmessage.setSubject(subject); //set subject\n\n\t\t\tmessage.setText(emailusr+\":::\"+msg); //set message\n\t\t\n \n\t\t\tnew Thread(new Runnable()\n\t\t\t{\n\t\t\tpublic void run() \n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tTransport.send(message);\n\t\t\t\t}\n\t\t\t\tcatch (Exception e){e.printStackTrace();}\n\t\t\t}\n\t\t\t}).start();\n\t\t\n\t\t\n\t\t\t//out.println(\" message sent successfully ....will reach in 10 or 15 seconds\");\n\t\t\tres.sendRedirect(\"../user/CommonToAll.jsp?emailSent\");\n\t\t\tsession = null;\n\t\t\ti = 1;\n\t\t\t\n\t\t\t\n }\n\t\t catch (MessagingException mex) \n\t\t {\n\t mex.printStackTrace();\n\t\t\t// return i;\n\t }\n\t\t //return i;\n }",
"protected void contactBuyer(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tif(request.getParameter(\"buyer_id\") != null){\n\t\t\tlong buyer_id = Long.parseLong(request.getParameter(\"buyer_id\"));\n\t\t\tlong seller_id = Long.parseLong(request.getParameter(\"seller_id\"));\n\t\t\tString subject = request.getParameter(\"subject\"),\n\t\t\t\t message = request.getParameter(\"message\");\n\t\t\tif(subject == null) subject = \"\";\n\t\t\tif(message == null) message = \"\";\n\t\t\t\n\t\t\tString buyer_username = \"\",\n\t\t\t\t TO=\"\",\n\t\t\t\t seller_username=\"\",\n\t\t\t\t seller_firstname=\"\",\n\t\t\t\t seller_lastname=\"\",\n\t\t\t\t seller_email=\"\";\n\t\t\t\n\t\t\tIterator<BuyerVO> buyer_itr = BuyerDAO.getBuyerById(buyer_id).iterator();\n\t\t\twhile(buyer_itr.hasNext()){\n\t\t\t\tBuyerVO bvo = buyer_itr.next();\n\t\t\t\tbuyer_username = bvo.getUsername();\n\t\t\t\tTO = bvo.getEmail();\n\t\t\t}\n\t\t\t\n\t\t\tIterator<SellerVO> seller_itr = SellerDAO.getSellerById(seller_id).iterator();\n\t\t\twhile(seller_itr.hasNext()){\n\t\t\t\tSellerVO svo = seller_itr.next();\n\t\t\t\tseller_firstname = svo.getFirstname();\n\t\t\t\tseller_lastname = svo.getLastname();\n\t\t\t\tseller_email = svo.getEmail();\n\t\t\t}\n\t\t\t\n\t\t\tfinal String FROM = \"[email protected]\";\t// Basic details of my account\n\t\t String USERNAME = \"[email protected]\";\n\t\t String PASSWORD = \"samarthshah\";\n\t\t final String HOST = \"smtp.gmail.com\";\n\n\t\t // Get system properties\n\t Properties props = new Properties();\n\t props.put(\"mail.smtp.auth\", \"true\");\n\t props.put(\"mail.smtp.starttls.enable\", \"true\");\n\t props.put(\"mail.smtp.host\", HOST);\n\t props.put(\"mail.smtp.port\", \"587\");\n\t\t \n\t // Get the default Session object.\n\t Session msg_session = Session.getInstance(props,\n\t \t\tnew javax.mail.Authenticator() {\n\t \t\t protected PasswordAuthentication getPasswordAuthentication() {\n\t \t\t return new PasswordAuthentication(USERNAME, PASSWORD);\n\t \t\t }\n\t\t });\n\n\t\t try{\n\t\t \t// Create a default MimeMessage object.\n\t\t MimeMessage msg2buyer = new MimeMessage(msg_session);\n\n\t\t // Set From: header field of the header.\n\t\t\t\tmsg2buyer.setFrom(new InternetAddress(FROM, seller_username));\t// Shows that it is sent by sellers username\n\n\t\t // Set To: header field of the header.\n\t\t msg2buyer.setRecipient(Message.RecipientType.TO, new InternetAddress(TO));\n\t\t\t \n\t \t// Set Subject: header field\n\t\t msg2buyer.setSubject(subject);\t// Subject set by the seller.\n\t\t msg2buyer.setContent(\"<h1>Dear \"+buyer_username+\",</h1>\"\n \t\t\t\t\t\t\t\t+ \"<p>The following message is sent to you by \"+seller_firstname+\" \"+seller_lastname+\".</p><hr/>\"\n \t\t\t\t\t\t\t\t+ \"<p><strong>\"+ message +\"</strong></p><hr/>\"\n \t\t\t\t\t\t\t\t+ \"<p>Please contact him back on \"+seller_email+\"</p>\"\n \t\t\t\t\t\t\t\t+ \"<br/><p>Happy Gaming.<br/>\"\n \t\t\t\t\t\t\t\t+ \"<strong>Game-Zone Team</strong></p>\", \"text/html\");\t// The message written by seller.\n\t\t msg2buyer.saveChanges();\n\t\t Transport.send(msg2buyer); // Send message\n\t\t }\n\t\t \n\t\t catch (MessagingException mex) {\n\t\t mex.printStackTrace();\n\t\t }\n\t\t \n\t\t\tHttpSession session = request.getSession();\n\t\t\tsession.setAttribute(\"msg\", \"The message has been sent successfully.\");\n\t\t}\n\t\telse{\n\t\t\tHttpSession session = request.getSession();\n\t\t\tsession.setAttribute(\"msg\", \"Please select a buyer first!\");\n\t\t}\n\t\tresponse.sendRedirect(request.getContextPath()+\"/Seller_Buyer/seller_messageBuyer.jsp\");\n\t}",
"private void sendmailuserregister(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, ClassNotFoundException {\n String email = request.getParameter(\"email\");\n\n String to = \"yevhen@yevhen-Lenovo-ideapad-320-15ISK\";\n String from = \"wwwwnewbob@localhost\";\n String host = \"localhost\";\n\n Properties properties = System.getProperties();\n properties.setProperty(\"yevhen-Lenovo-ideapad-320-15ISK\", host);\n\n Session session = Session.getDefaultInstance(properties);\n response.setContentType(\"text/html\");\n PrintWriter out = response.getWriter();\n\n try{\n MimeMessage message = new MimeMessage(session);\n message.setFrom(new InternetAddress(from));\n message.addRecipients(Message.RecipientType.TO, String.valueOf(new InternetAddress(to)));\n message.setSubject(\"This is the Subject Line!\");\n message.setText(\"This is actual message from \" + email);\n\n logger.info(\" user.getEmail() \" + email);\n\n Transport.send(message);\n String title = \"Send Email\";\n String res = \"Sent message successfully....<a href='/bookstore/shop'>Back</a>\";\n String docType = \"<!doctype html public \\\"-//w3c//dtd html 4.0 \" + \"transitional//en\\\">\\n\";\n\n out.println(docType +\n \"<html>\\n\" +\n \"<head><title>\" + title + \"</title><head>\\n\" +\n \"<body bgcolor = \\\"#f0f0f0\\\">\\n\" +\n \"<h1 align = \\\"center\\\">\" + title + \"</h1>\\n\" +\n \"<p align = \\\"center\\\">\" + res + \"</p>\\n\" +\n \"</body>\\n\" +\n \"</html>\"\n );\n\n } catch (MessagingException mex){\n mex.printStackTrace();\n }\n\n\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n LOG.info(\"SendToFriendServlet service() started\");\n\n response.setContentType(\"text/xml;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n\n String fName = request.getParameter(\"fName\");\n String fEmail = request.getParameter(\"fEmail\");\n LOG.info(\"== Friends Name ==\"+fName);\n LOG.info(\"== Friends Mail Address : ==\"+fEmail);\n\n boolean res = false;\n\n StringBuffer sb = new StringBuffer(\"<response>\");\n\n\n try {\n SendMail sm = new SendMail();\n String sub = \"Hi, \" + fName + \" I think you are looking for this\";\n String msg = \" <html><body>\" +\n \"\\n\\n Hello \" + fName + \" Welcome to Bharatbuysell.com \\n\\n\" +\n \"\\n\\n your friend suggested this ad to you \\n\\n \" +\n \"\\n\\n To see more ads click http://localhost:8080/Buysell </body</html>\";\n\n res = sm.send(fEmail, sub, msg);\n LOG.info(\"== Message sent ==\" + res);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n if (res) {\n sb.append(\"<send value=\\\"\").append(\"YES\").append(\"\\\" />\");\n } else {\n sb.append(\"<send value=\\\"\").append(\"NO\").append(\"\\\" />\");\n }\n sb.append(\"</response>\");\n out.print(sb);\n out.flush();\n out.close();\n\n LOG.info(\"\\n\\nXml format ::\" + sb + \"\\n\\n\");\n\n\n\n }",
"SendEmail() {\t\n\t}",
"@RequestMapping(value =\"/sendEmail\",method = RequestMethod.GET)\n\tpublic String doSendEmail(HttpServletRequest request) {\n\t\tString recipientAddress = \"[email protected]\";\n\t\tString subject = \"sujet\";\n\t\tString message = \"salut\";\n\t\t\n\n\t\t\n\t\t// creates a simple e-mail object\n\t\tSimpleMailMessage email = new SimpleMailMessage();\n\t\temail.setTo(recipientAddress);\n\t\temail.setSubject(subject);\n\t\temail.setText(message);\n\t\t\n\t\t// sends the e-mail\n\t\tmailSender.send(email);\n\t\t\n\t\t// forwards to the view named \"Result\"\n\t\treturn \"Result\";\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/plain;charset=UTF-8\");\n Date date = new Date();\n String email = request.getParameter(\"email\");\n boolean valido = false;\n UtenteQueries uq = new UtenteQueries(manager);\n try {\n valido = uq.emailValida(email);\n } catch (SQLException ex) {\n \n }\n if(valido){\n Timestamp time = new Timestamp(date.getTime());\n String timestamp = time.toString();\n MessageDigest md = null;\n try {\n md = MessageDigest.getInstance(\"MD5\");\n } catch (NoSuchAlgorithmException ex) {\n //\n }\n md.update((email + timestamp).getBytes());\n byte[] md5 = md.digest();\n StringBuffer sb = new StringBuffer();\n for (byte b : md5) {\n sb.append(String.format(\"%02x\", b & 0xff));\n }\n String md5Str = sb.toString();\n PasswordRecoveryQueries prq = new PasswordRecoveryQueries(manager);\n try {\n PasswordRecovery pr = new PasswordRecovery();\n pr.setHash(md5Str);\n pr.setEmail(email);\n pr.setTime(time);\n prq.insertRecuperaPassword(pr);\n MailSender instance = new MailSender();\n try {\n instance.changePassword(email, \"http://localhost:8084/Multisala/password-recovery.html?key=\" + md5Str);\n response.getWriter().println(\"success\");\n } catch (MessagingException ex) {\n response.getWriter().println(\"fail\");\n }\n } catch (SQLException ex) {\n response.getWriter().println(\"fail\");\n }\n }else\n response.getWriter().println(\"noemail\"); \n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n try {\n String apiKey = \"apikey=\" + \"HQHNTZ7VahM-XsONRtzGYqGbsOCU011RlAxJnlQ7Vs\";\n Random rand =new Random();\n otp=rand.nextInt(999999);\n \n\t\t\tString message = \"&message=\" + \"Your otp is \"+otp;\n\t\t\tString sender = \"&sender=\" + \"No Response\";\n String con=request.getParameter(\"contact\");\n\t\t\tString numbers = \"&numbers=\" + con;\n\t\t\t\n\t\t\t// Send data\n\t\t\tHttpURLConnection conn = (HttpURLConnection) new URL(\"https://api.textlocal.in/send/?\").openConnection();\n\t\t\tString data = apiKey + numbers + message + sender;\n\t\t\tconn.setDoOutput(true);\n\t\t\tconn.setRequestMethod(\"POST\");\n\t\t\tconn.setRequestProperty(\"Content-Length\", Integer.toString(data.length()));\n\t\t\tconn.getOutputStream().write(data.getBytes(\"UTF-8\"));\n\t\t\tfinal BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n\t\t\tfinal StringBuffer stringBuffer = new StringBuffer();\n\t\t\tString line;\n\t\t\twhile ((line = rd.readLine()) != null) {\n\t\t\t\tstringBuffer.append(line);\n\t\t\t}\n\t\t\trd.close();\n\t\t\t//response.sendRedirect(\"otpverify.jsp\");\n\t\t\t//return stringBuffer.toString();\n }\n catch(Exception e)\n {\n System.out.println(\"Error SMS \"+e);\n\t\t\t\n }\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException, NamingException, SQLException {\n\t\tresponse.setContentType(\"text/html;charset=UTF-8\");\n\t\tPrintWriter out = response.getWriter();\n\n\t\tPreparedStatement ps = null;\n\t\tPreparedStatement ps1 = null, ps2 = null;\n\t\tConnection con = null, con2 = null, con3 = null;\n\t\tResultSet rs = null, rs2 = null;\n\n\t\tString Sgrno = \"\", Semail = \"\", Rgrno = \"\", Remail = \"\", Message = \"\";\n\t\tString temp_receivers = \"\";\n\t\tboolean flag = false;\n\n\t\tHttpSession s1 = request.getSession();\n\t\tString grno = (String) s1.getAttribute(\"grno\");\n\n\t\tif (grno != \"\") {\n\t\t\ttry {\n\t\t\t\tString str = request.getParameter(\"Send\");\n\t\t\t\tif (str != null && str.equals(\"Send\")) {\n\t\t\t\t\ttemp_receivers = request.getParameter(\"Destination\");\n\t\t\t\t\tMessage = request.getParameter(\"Message\");\n\t\t\t\t\tSgrno = grno;\n\n\t\t\t\t\tStringTokenizer data = new StringTokenizer(temp_receivers, \",\");\n\n\t\t\t\t\tcon2 = DBUtils.getConnectionObj();\n\t\t\t\t\tps2 = con2.prepareStatement(DBUtils.GET_EMAILADDRESS_FROM_GRNO, ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);\n\t\t\t\t\tps2.setString(1, Sgrno);\n\t\t\t\t\t\n\t\t\t\t\trs2 = ps2.executeQuery();\n\t\t\t\t\tif (rs2.next()) {\n\t\t\t\t\t\tSemail = rs2.getString(\"EMAILADDRESS\");\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (data.hasMoreTokens()) {\n\t\t\t\t\t\tRemail = data.nextToken();\n\t\t\t\t\t\tcon = DBUtils.getConnectionObj();\n\t\t\t\t\t\tps1 = con.prepareStatement(DBUtils.GET_PROFILE_BY_EMAILADDRESS ,ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);\n\t\t\t\t\t\tps1.setString(1, Remail);\n\t\t\t\t\t\trs = ps1.executeQuery();\n\t\t\t\t\t\tif (rs.next()) {\n\t\t\t\t\t\t\tRgrno = rs.getString(\"GRNO\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcon3 = DBUtils.getConnectionObj();\n\t\t\t\t\t\tps = con3.prepareStatement(DBUtils.INSERT_SCRAP);\n\t\t\t\t\t\tps.setString(1, Semail);\n\t\t\t\t\t\tps.setString(2, Sgrno);\n\t\t\t\t\t\tps.setString(3, Remail);\n\t\t\t\t\t\tps.setString(4, Rgrno);\n\t\t\t\t\t\tps.setString(5, Message);\n\t\t\t\t\t\tint rs3 = ps.executeUpdate();\n\n\t\t\t\t\t\tif (rs3 == 1) {\n\t\t\t\t\t\t\tflag = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tout.write(\"<center> <h2> WE TRIED HARD TO SEND YOUR MESSAGE TO \" + Remail);\n\t\t\t\t\t\t\tout.write(\"</h2></center>\");\n\t\t\t\t\t\t\tout.write(\" <center> <h3>But Due To Incorect Id Its Not Possible </h3></center>\");\n\t\t\t\t\t\t\tout.write(\" <center><h1>PLEASE CHECK THE EMAIL ID!!</h1></center>\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (!rs.isClosed())\n\t\t\t\t\t\t\t\trs.close();\n\t\t\t\t\t\t\tif (!rs2.isClosed())\n\t\t\t\t\t\t\t\trs2.close();\n\n\t\t\t\t\t\t\tif (!ps1.isClosed())\n\t\t\t\t\t\t\t\tps1.close();\n\t\t\t\t\t\t\tif (!ps2.isClosed())\n\t\t\t\t\t\t\t\tps2.close();\n\t\t\t\t\t\t\tif (!ps.isClosed())\n\t\t\t\t\t\t\t\tps.close();\n\n\t\t\t\t\t\t\tif (!con.isClosed())\n\t\t\t\t\t\t\t\tcon.close();\n\t\t\t\t\t\t\tif (!con2.isClosed())\n\t\t\t\t\t\t\t\tcon2.close();\n\t\t\t\t\t\t\tif (!con3.isClosed())\n\t\t\t\t\t\t\t\tcon3.close();\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tlog(e.getMessage());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (flag == true) {\n\t\t\t\t\t\tout.write(\"<center> <h2> YOUR MESSAGE IS SUCCESSFULLY SEND TO ALL YOUR FRIENDS</h2></center>\");\n\t\t\t\t\t\tout.write(\" <center> <h3>Wait For The Reply </h3></center>\");\n\t\t\t\t\t\tout.write(\" <center><h1>THANKS!!</h1></center>\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (!rs.isClosed())\n\t\t\t\t\t\trs.close();\n\t\t\t\t\tif (!rs2.isClosed())\n\t\t\t\t\t\trs2.close();\n\t\t\t\t\tif (!ps1.isClosed())\n\t\t\t\t\t\tps1.close();\n\t\t\t\t\tif (!ps2.isClosed())\n\t\t\t\t\t\tps2.close();\n\t\t\t\t\tif (!ps.isClosed())\n\t\t\t\t\t\tps.close();\n\t\t\t\t\tif (!con.isClosed())\n\t\t\t\t\t\tcon.close();\n\t\t\t\t\tif (!con2.isClosed())\n\t\t\t\t\t\tcon2.close();\n\t\t\t\t\tif (!con3.isClosed())\n\t\t\t\t\t\tcon3.close();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog(e.getMessage());\n\t\t\t\t}\n\t\t\t\tout.close();\n\t\t\t}\n\t\t} else {\n\t\t\tout.write(\"<center> <h2> WE TRIED HARD TO SEND YOUR MESSAGE</h2></center>\");\n\t\t\tout.write(\" <center> <h3>But Due To Incorect Id Its Not Possible </h3></center>\");\n\t\t\tout.write(\" <center><h1>PLEASE CHECK THE EMAIL ID!!</h1></center>\");\n\t\t}\n\n\t}",
"@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\r\n\t\tString email=req.getParameter(\"email\");\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\t//Mention DataBas url,username and passsword\r\n\t\t\tConnection con=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/demo\",\"root\",\"root\");\r\n\t\t\tPreparedStatement ps=con.prepareStatement(\"select * from users where email=?\");\r\n\t\t\tps.setString(1, email);\r\n\t\t\tResultSet rs=ps.executeQuery();\r\n\t\t\t\r\n\t\t\tPrintWriter out=resp.getWriter();\r\n\t\t\tif(rs.next())\r\n\t\t\t{\r\n\t\t\t\tRandom r=new Random();\r\n\t\t\t\tint randomnumber=r.nextInt(8888)+1000;\r\n\t\t\t\t\r\n\t\t\t\tHttpSession hs=req.getSession();\r\n\t\t\t\ths.setAttribute(\"randomnumber\", randomnumber);\r\n\t\t\t\ths.setAttribute(\"email\", email);\r\n\t\t\t\t\r\n\t\t\t\tEmail em=new Email(email,\"Password Reset?\",\"OTP is:\"+randomnumber);\r\n\t\t\t\tem.sendEmail();\r\n\t\t\t\tout.println(\"\"\r\n\t\t\t\t\t\t+ \"<script>\" \r\n\t\t\t\t\t\t+ \"alert('Otp have been send to your email.Please check');\" \r\n\t\t\t\t\t\t+ \"window.location='collectotp.jsp';\" \r\n\t\t\t\t\t\t+ \"</script>\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tout.println(\"\"\r\n\t\t\t\t\t\t+ \"<script>\" \r\n\t\t\t\t\t\t+ \"alert('Email is incorrect');\" \r\n\t\t\t\t\t\t+ \"window.location='collectemail.jsp';\" \r\n\t\t\t\t\t\t+ \"</script>\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n \n String to=\"[email protected]\";\n \n String from=request.getParameter(\"email\"); \n String msg=request.getParameter(\"message\");\n HttpSession sec=request.getSession(); \n sec.setAttribute(\"to\",from);\n \n\t\t \n\t\t //Get the session object \n\t\t Properties props = new Properties(); \n\t\t props.put(\"mail.smtp.host\", \"smtp.gmail.com\"); \n\t\t props.put(\"mail.smtp.socketFactory.port\", \"465\"); \n\t\t props.put(\"mail.smtp.socketFactory.class\", \n\t\t \"javax.net.ssl.SSLSocketFactory\"); \n\t\t props.put(\"mail.smtp.auth\", \"true\"); \n\t\t props.put(\"mail.smtp.port\", \"465\"); \n\t\t \n\t\t Session session = Session.getDefaultInstance(props, \n\t\t new javax.mail.Authenticator() { \n\t\t protected PasswordAuthentication getPasswordAuthentication() { \n\t\t return new PasswordAuthentication(\"[email protected]\",\"sampada1914\");//change accordingly \n\t\t } \n\t\t }); \n\t\t \n\t\t //compose message \n\t\t try { \n\t\t MimeMessage message = new MimeMessage(session); \n\t\t message.setFrom(new InternetAddress(from));//change accordingly \n\t\t message.addRecipient(Message.RecipientType.TO,new InternetAddress(to)); \n\t\t message.setSubject(msg); \n\t\t message.setText(msg); \n\t\t \n\t\t //send message \n\t\t Transport.send(message); \n\t\t \n\t\t System.out.println(\"message sent successfully\"); \n\t\t \n\t\t } catch (MessagingException e) {throw new RuntimeException(e);} \n\t\t \n \n RequestDispatcher rd=request.getRequestDispatcher(\"reply\");\n\t\t\trd.forward(request, response);\n \n \n \n try {\n /* TODO output your page here. You may use following sample code. */\n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title>Servlet feedbackmail</title>\"); \n out.println(\"</head>\");\n out.println(\"<body>\");\n out.println(\"<h1>Servlet feedbackmail at \" + request.getContextPath() + \"</h1>\");\n out.println(\"</body>\");\n out.println(\"</html>\");\n } finally { \n out.close();\n }\n }",
"void send(Email email);",
"private void sendEmail() {\n\n\n Log.i(TAG, \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\n\n Log.i(TAG, \"sendEmail: \"+currentEmail);\n\n Log.i(TAG, \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\n\n String email = currentEmail.trim();\n String subject = \"Garbage Report Handeled\";\n\n String message = textViewStreet.getText().toString() + \" \" + \"request has been handeled\" +\" \"+textViewDescription.getText().toString();\n\n// String message = textViewStreet.getText().toString() + \" \" + \"request has been handeled\" + \" \" +time+\" \"+textViewDescription.getText().toString();\n //Creating SendMail object\n SendMail sm = new SendMail(this, email, subject, message);\n\n //Executing sendmail to send email\n sm.execute();\n }",
"public void sendEmail(){\r\n EmailService emailSvc = new EmailService(email, username, password, firstName, lastName);\r\n Thread th = new Thread(emailSvc);\r\n LOG.info(\"Starting a new thread to send the email..\");\r\n th.start();\r\n LOG.info(\"The email was sent successfully\");\r\n }",
"public void sendEmail(\n ActionRequest actionRequest, ActionResponse actionResponse)\n throws IOException, PortletException {\n }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tresponse.setContentType(\"text/html\");\n\t\tPrintWriter out = response.getWriter();\n\t\ttry {\n\t\t\t\n\t\t\tdbUsername=request.getParameter(\"email\");\n\t\t\tConnection con=DbConnect.getSqlConnection();\n\t\t\tStatement stmt=con.createStatement();\n\t\t\tstmt.executeQuery(\"SELECT userMail,userPwd FROM `usertable` WHERE userMail='\"+dbUsername+\"'\");\n\t\t\tResultSet rs=stmt.getResultSet();\n\t\t\tSystem.out.println(dbUsername);\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tMail=rs.getString(\"userMail\");\n\t\t\t\tPassword=rs.getString(\"userPwd\");\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tif(count>0)\n\t\t\t{\n\t\t\t\tMailer mail=new Mailer();\n\t\t\t\tmail.send(\"[email protected]\", \"deepika23\", Mail, \"Forgot Password?\", Password);\n\t\t\t\tout.println(\"<script type=\\\"text/javascript\\\">\");\n\t\t\t\tout.println(\"alert('Password sucessfully sent to your email');\");\n\t\t\t\tout.println(\"</script>\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\t out.println(\"<script type=\\\"text/javascript\\\">\");\n\t\t\t\t out.println(\"alert('Email id doesnot exist');\");\n\t\t\t\t out.println(\"</script>\");\n\t\t\t}\n\t\t\tcon.close();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.err.println(e);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString fullname=request.getParameter(\"fullname\");\r\n\t\trequest.setAttribute(\"fullname\",fullname );\r\n\t\t\r\n\t\tString line1=request.getParameter(\"line1\");\r\n\t\trequest.setAttribute(\"line1\",line1 );\r\n\t\t\r\n\t\tString line2=request.getParameter(\"line2\");\r\n\t\trequest.setAttribute(\"line2\", line2);\r\n\t\t\r\n\t\tString city=request.getParameter(\"city\");\r\n\t\trequest.setAttribute(\"city\", city);\r\n\t\t\r\n\t\tString state=request.getParameter(\"state\");\r\n\t\trequest.setAttribute(\"state\", state);\r\n\t\t\r\n\t\tString zipcode=request.getParameter(\"zipcode\");\r\n\t\trequest.setAttribute(\"zipcode\", zipcode);\r\n\t\t\r\n\t\tString country=request.getParameter(\"country\");\r\n\t\trequest.setAttribute(\"country\", country);\r\n\t\t\r\n\t\tString noofpeople=request.getParameter(\"noofpeople\");\r\n\t\trequest.setAttribute(\"noofpeople\", noofpeople);\r\n\t\t\r\n\t\t//write to database with all the information provided\r\n\t\tloginDetails.addAddress(fullname, line1, line2,city,state, zipcode, country, noofpeople);\r\n\t\t\r\n\t\tHttpSession session=request.getSession(); \r\n String name=(String) session.getAttribute(\"name\"); \r\n\t\t\r\n //email confirmation for food donation\r\n\t\tString emailBody=\"Thanks for your donation at Plateful INC. Your food will be donated to the children who are in need.\";\r\n\t\t\r\n\t\tString emailSubject=\"Donation Confirmation- Plateful INC.\";\r\n\t\t\r\n\t\tString toEmailAddress=name;\r\n\t\t\r\n\t\t//all the emails will be sent from [email protected]\r\n\t\tMailUtilLocal.send(\"[email protected]\",\"XXXXXX\",toEmailAddress,emailSubject,emailBody); \r\n\t\t\r\n\t\trequest.getRequestDispatcher(\"/WEB-INF/Views/thanks.jsp\").forward(request, response);\r\n\t\t\r\n\t\t\r\n\t}",
"private void sendmailcartid(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, ClassNotFoundException {\n String cardid = request.getParameter(\"cartid\");\n\n String to = \"yevhen@yevhen-Lenovo-ideapad-320-15ISK\";\n String from = \"wwwwnewbob@localhost\";\n String host = \"localhost\";\n\n Properties properties = System.getProperties();\n properties.setProperty(\"yevhen-Lenovo-ideapad-320-15ISK\", host);\n\n Session session = Session.getDefaultInstance(properties);\n response.setContentType(\"text/html\");\n PrintWriter out = response.getWriter();\n\n try{\n MimeMessage message = new MimeMessage(session);\n message.setFrom(new InternetAddress(from));\n message.addRecipients(Message.RecipientType.TO, String.valueOf(new InternetAddress(to)));\n message.setSubject(\"This is the Subject Line!\");\n message.setText(\"This is actual message from <a href=\\\"http://localhost:8080/bookstore/createpdfdoc?cartid=\" + cardid + \"\\\">Your payment</a>\");\n\n logger.info(\" user.getEmail() \" + cardid);\n\n Transport.send(message);\n String title = \"Send Email\";\n String res = \"Sent message successfully....<a href='/bookstore/shop'>Back</a>\";\n String docType = \"<!doctype html public \\\"-//w3c//dtd html 4.0 \" + \"transitional//en\\\">\\n\";\n\n out.println(docType +\n \"<html>\\n\" +\n \"<head><title>\" + title + \"</title><head>\\n\" +\n \"<body bgcolor = \\\"#f0f0f0\\\">\\n\" +\n \"<h1 align = \\\"center\\\">\" + title + \"</h1>\\n\" +\n \"<p align = \\\"center\\\">\" + res + \"</p>\\n\" +\n \"</body>\\n\" +\n \"</html>\"\n );\n\n } catch (MessagingException mex){\n mex.printStackTrace();\n }\n\n\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException, MessagingException {\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n try (PrintWriter out = response.getWriter()) {\r\n /* TODO output your page here. You may use following sample code. */\r\n out.println(\"<!DOCTYPE html>\");\r\n out.println(\"<html>\");\r\n out.println(\"<head>\");\r\n out.println(\"<title>Servlet reservation</title>\");\r\n out.println(\"</head>\");\r\n out.println(\"<body>\");\r\n HttpSession session = request.getSession();\r\n //String n = (String) session.getAttribute(\"username\");\r\n// out.println(n + \" \" + email);\r\n //String ValidatorEmailMSG = request.getSession().getAttribute(\"ValidatorEmailMSG\").toString();\r\n \r\n if (session.getAttribute(\"username\") == null) {\r\n\r\n String error = \"e\";\r\n HttpSession mailsession = request.getSession();\r\n mailsession.setAttribute(\"error\", error);\r\n response.sendRedirect(\"reservation.jsp\");\r\n } else {\r\n //out.println(\"in\");\r\n int hotelid;\r\n int roomNumber;\r\n Date checkIn;\r\n Date checkOut;\r\n int nights;\r\n double ppn;\r\n double tax;\r\n double total;\r\n int user_id;\r\n String firstName = request.getParameter(\"fName\");\r\n String lastName = request.getParameter(\"lName\");\r\n //String email = request.getParameter(\"email\");\r\n String email = request.getParameter(\"email\");\r\n\r\n String address = request.getParameter(\"address\");\r\n String phone = request.getParameter(\"phone\");\r\n\r\n String city = request.getParameter(\"city\");\r\n String country = request.getParameter(\"country\");\r\n String postalCode = request.getParameter(\"postalCode\");\r\n \r\n user_id = Integer.parseInt((String) request.getParameter((\"user_id\")));\r\n \r\n hotelid = Integer.parseInt((String) request.getParameter((\"hotelid\")));\r\n roomNumber = Integer.parseInt((String) request.getParameter((\"roomNumberSelected\")));\r\n\r\n checkIn = Date.valueOf(request.getParameter(\"checkInForRoom\"));\r\n checkOut = Date.valueOf(request.getParameter(\"checkOutForRoom\"));\r\n\r\n nights = Integer.parseInt(String.valueOf(request.getParameter(\"nights\")));\r\n ppn = Double.parseDouble(String.valueOf(request.getParameter(\"ppn\")));\r\n tax = Double.parseDouble(String.valueOf(request.getParameter(\"tax\")));\r\n total = Double.parseDouble(String.valueOf(request.getParameter(\"total\")));\r\n\r\n String cvv = request.getParameter(\"cvv\");\r\n String ccNumber = request.getParameter(\"ccNumber\");\r\n \r\n //out.println(email + \" \" + firstName + \" \" +lastName );\r\n try {\r\n\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n String url = \"jdbc:mysql://localhost:3306/hrsystem\";\r\n String user = \"root\";\r\n String password = \"root\";\r\n Connection Con = null;\r\n Statement Stmt = null;\r\n\r\n Con = DriverManager.getConnection(url, user, password);\r\n Stmt = Con.createStatement();\r\n\r\n Email mail = new Email(\"[email protected]\", \"qwe123@thelover\");\r\n mail.setFrom(\"[email protected]\", \"Hotel Team Work\");\r\n mail.setSubject(\"reservation confirm\");\r\n mail.setContent(\"Confirm Your reservation\\n<a href=https://www.google.com >Click To Confirm Reservation Please</a>\", \"text/html\");\r\n //out.println(\"1\");\r\n mail.addRecipient(email);\r\n mail.send();\r\n int cancel_res = 1;\r\n String line = \"INSERT INTO reservation(user_first_name, user_last_name, user_email, user_address, user_phone, user_city, user_country, postel_code, hotel_hotelid, room_room_id, res_checkIn, res_checkout, res_nights, res_ppn, res_tax, res_total , cancel_res,user_id) VALUES(\"\r\n + \"'\" + firstName + \"',\"\r\n + \"'\" + lastName + \"',\"\r\n + \"'\" + email + \"',\"\r\n + \"'\" + address + \"',\"\r\n + \"'\" + phone + \"',\"\r\n + \"'\" + country + \"',\"\r\n + \"'\" + city + \"',\"\r\n + \"'\" + postalCode + \"',\"\r\n + \"'\" + hotelid + \"',\"\r\n + \"'\" + roomNumber + \"',\"\r\n + \"'\" + checkIn + \"',\"\r\n + \"'\" + checkOut + \"',\"\r\n + \"'\" + nights + \"',\"\r\n + \"'\" + ppn + \"',\"\r\n + \"'\" + tax + \"',\"\r\n + \"'\" + total + \"',\"\r\n + \"'\" + cancel_res + \"',\"\r\n + \"'\" + user_id + \"')\";\r\n int Rows = Stmt.executeUpdate(line);\r\n // out.println(\"2\");\r\n out.println(\"<script>\");\r\n out.println(\"alert('Thank You Please Confirm Your email');\");\r\n out.println(\"location='Index.jsp';\");\r\n out.println(\"</script>\");\r\n // response.sendRedirect(\"index.html\");\r\n\r\n Stmt.close();\r\n Con.close();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n out.println(\"</body>\");\r\n out.println(\"</html>\");\r\n }\r\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n try (PrintWriter out = response.getWriter()) {\n /* TODO output your page here. You may use following sample code. */\n out.println(\"<!DOCTYPE html>\");\n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title>Servlet MailDispatcherServlet</title>\"); \n out.println(\"</head>\");\n out.println(\"<body>\");\n out.println(\"<h1>Servlet MailDispatcherServlet at \" + request.getContextPath() + \"</h1>\");\n out.println(\"</body>\");\n out.println(\"</html>\");\n }\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n String msg = \"\";\n\n String student_id = request.getParameter(\"student_id\");\n String password = request.getParameter(\"password\");\n String fname = request.getParameter(\"fname\");\n String lname = request.getParameter(\"lname\");\n String faculty_id = request.getParameter(\"faculty\");\n String brach_id = request.getParameter(\"branch\");\n String mail = request.getParameter(\"email\");\n String submail = request.getParameter(\"submail\");\n String checkForm = request.getParameter(\"FROM_REGISTER\");\n String path = \"/WEB-INF/Register.jsp\";\n\n if (student_id.trim().isEmpty() || password.trim().isEmpty() || fname.trim().isEmpty() || lname.trim().isEmpty()\n || faculty_id.trim().isEmpty() || brach_id.trim().isEmpty() || mail.trim().isEmpty() || submail.trim().isEmpty()) {\n msg = \"You must to input all information\";\n request.setAttribute(\"msg\", msg);\n request.getRequestDispatcher(path).forward(request, response);\n return;\n }\n\n if (checkForm == null || !checkForm.equals(\"REGISTER_STUDENT\")) {\n msg = \"Something wrong. Plase try again later!\";\n request.setAttribute(\"msg\", msg);\n request.getRequestDispatcher(path).forward(request, response);\n return;\n }\n \n if(!submail.equals(\"@mail.kmutt.ac.th\")){\n msg = \"Plz , select mail address.\";\n request.setAttribute(\"msg\", msg);\n request.getRequestDispatcher(path).forward(request, response);\n }\n \n String bidFromPara = null;\n if (brach_id.length() > 0) {\n for (int i = 0; i < brach_id.length(); i++) {\n char j = brach_id.charAt(i);\n if (j == '-') {\n bidFromPara = brach_id.substring(i + 1);\n }\n }\n }\n\n if (student_id.length() < 10) {\n msg = \"Wrong format of Student ID.\";\n request.setAttribute(\"msg\", msg);\n request.getRequestDispatcher(path).forward(request, response);\n return;\n }\n\n for (char c : student_id.toCharArray()) {\n if (!Character.isDigit(c)) {\n msg = \"Student ID cannot be text.\";\n request.setAttribute(\"msg\", msg);\n request.getRequestDispatcher(path).forward(request, response);\n return;\n }\n }\n \n String email = mail.trim() + submail;\n\n long sid = Long.valueOf(student_id);\n int fid = Integer.valueOf(faculty_id);\n int bid = Integer.valueOf(bidFromPara);\n\n if (fid <= 0) {\n msg = \"Please select your faculty.\";\n request.setAttribute(\"msg\", msg);\n request.getRequestDispatcher(path).forward(request, response);\n return;\n }\n\n Studentdao sdao = new Studentdao();\n Student s = sdao.getStudentById(sid);\n Student regStudent = new Student(sid, fname, lname, password, fid, bid, email);\n\n if (s != null) {\n msg = \"You student id has Registered.\";\n request.setAttribute(\"msg\", msg);\n request.getRequestDispatcher(path).forward(request, response);\n return;\n\n } else {\n Teacherdao tdao = new Teacherdao();\n Teacher t = tdao.getTeacherById(sid);\n if(t != null){\n msg = \"You must to use your Student ID.\";\n request.setAttribute(\"msg\", msg);\n request.getRequestDispatcher(path).forward(request, response);\n return;\n }\n \n Student smail = sdao.getStudentByMail(email);\n if(smail!= null){\n msg = \"this email has Registered.\";\n request.setAttribute(\"msg\", msg);\n request.getRequestDispatcher(path).forward(request, response);\n return;\n }else{\n sdao.addStudent(regStudent);\n msg = \"Register successful.\";\n request.setAttribute(\"msg\", msg);\n request.getRequestDispatcher(path).forward(request, response);\n }\n }\n\n //request.getRequestDispatcher(\"/Register.jsp\").forward(request, response);\n //request.getRequestDispatcher(\"/Register.jsp\").forward(request, response);\n }",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString uri = req.getRequestURI();\n\t\tif (uri.contains(\"forgotpassword\")) {\n\t\t\ttry {\n\t\t\t\tProperties props = new Properties();\n\t\t\t\tprops.setProperty(\"mail.smtp.auth\", \"true\");\n\t\t\t\tprops.setProperty(\"mail.smtp.starttls.enable\", \"true\");\n\t\t\t\tprops.setProperty(\"mail.smtp.host\", \"smtp.gmail.com\");\n\t\t\t\tprops.setProperty(\"mail.smtp.port\", \"587\");\n\n\t\t\t\tSession session = Session.getInstance(props, new Authenticator() {\n\t\t\t\t\tprotected PasswordAuthentication getPasswordAuthentication() {\n\t\t\t\t\t\tString username = \"[email protected]\";\n\t\t\t\t\t\tString password = \"huy972001\";\n\t\t\t\t\t\treturn new PasswordAuthentication(username, password);\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t\tif(req.getParameter(\"username\").isEmpty()) {\n\t\t\t\t\treq.setAttribute(\"message\", \"Nhập tên đăng nhập muốn lấy lại mật khẩu!\");\n\t\t\t\t\treq.getRequestDispatcher(\"/views/form.jsp\").forward(req, resp);\n\t\t\t\t\tSystem.out.println(\"dô\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tString id = req.getParameter(\"username\");\n\n\t\t\t\tUserDAO dao = new UserDAO();\n\t\t\t\tUser user = dao.findByUserName(id);\n\t\t\t\tString fromEmail = \"[email protected]\";\n\t\t\t\tString toEmail = user.getEmail();\n\t\t\t\tString titleEmail = \"Thông báo lấy lại mật khẩu\";\n\t\t\t\tString contentEmail = \"<p>Chào bạn</p>\"+user.getFullName()+\"<p> Chúng tôi nhận được yêu cầu lấy lại mật khẩu cho tài khoản của bạn</p>\" +\"Mật khẩu của bạn là: \"+user.getPassWord() + \"<p>Trân trọng</p>\"\n\t\t\t\t\t\t+ \"Đội ngũ TECHSTORE\";\n\n\t\t\t\tMimeMessage message = new MimeMessage(session);\n\t\t\t\tmessage.setFrom(new InternetAddress(fromEmail));\n\t\t\t\tmessage.setRecipients(Message.RecipientType.TO, toEmail);\n\t\t\t\tmessage.setSubject(titleEmail, \"utf-8\");\n\t\t\t\tmessage.setText(contentEmail, \"utf-8\", \"html\");\n\t\t\t\tmessage.setReplyTo(message.getFrom());\n\t\t\t\tTransport.send(message);\n\t\t\t\tSystem.out.println(\"send Thành công!\");\n\t\t\t} catch (MessagingException e) {\n\t\t\t\treq.setAttribute(\"message\", \"Nhập tên đăng nhập muốn lấy lại mật khẩu!\");\n\n\t\t\t}\n\t\t\treq.getRequestDispatcher(\"/views/form.jsp\").forward(req, resp);\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tString id = req.getParameter(\"username\");\n\t\t\t\tString pw = req.getParameter(\"password\");\n\t\t\t\tUserDAO dao = new UserDAO();\n\t\t\t\tUser user = dao.findByUserName(id);\n\n\t\t\t\tif (!user.getPassWord().equals(pw)) {\n\t\t\t\t\treq.setAttribute(\"message\", \"Sai mật khẩu!\");\n\t\t\t\t\treq.getRequestDispatcher(\"/views/form.jsp\").forward(req, resp);\n\t\t\t\t} else {\n\t\t\t\t\tAuth.user = user;\n\t\t\t\t\tif (user.getRole() == true) {\n\t\t\t\t\t\treq.setAttribute(\"message\", \"Đăng nhập thành công!\");\n\t\t\t\t\t\treq.getSession().setAttribute(\"user\", user.getFullName());\n\t\t\t\t\t\tresp.sendRedirect(\"/SOF301_JAVA4_VoDucHuy/user/index\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\treq.getSession().setAttribute(\"user\", user.getFullName());\n\t\t\t\t\t\tresp.sendRedirect(\"/SOF301_JAVA4_VoDucHuy/index\");\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} catch (Exception e) {\n\t\t\t\treq.setAttribute(\"message\", \"Sai tên đăng nhập!\");\n\t\t\t\treq.getRequestDispatcher(\"/views/form.jsp\").forward(req, resp);\n\t\t\t}\n\t\t}\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n ip = request.getLocalAddr();\n try {\n Timestamp dataNow = GetNow();\n Timestamp dataPrec = GetDate(request.getParameter(\"email\"),response.getWriter());\n long differenza = (dataNow.getTime()-dataPrec.getTime())/1000;\n \n response.getWriter().println(differenza+\"<br>\");\n \n \n if(differenza>90){\n response.sendRedirect(\"LinkScaduto.html\");\n }\n else{\n \n char[] p = generatePswd(8, 12, 1, 1, 1); \n String password = String.valueOf(p, 0, p.length) ;\n \n String email = request.getParameter(\"email\");\n String ip = request.getLocalAddr();\n \n UpdatePassword(email,password); \n \n\n String ogget = \"Confirm change password\";\n\n String testo = \"Dear \" + email\n + \"\\n This is your new password:\"\n + \"\\n\\n \"+password;\n\n Email send = new Email();\n send.Send(email,ogget,testo);\n \n response.sendRedirect(\"LinkValido.html\");\n }\n \n } catch(IOException e) {}\n }",
"@Override\n\tpublic String ajaxRequestPro(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t\tHashMap<String, String> resultMap = new HashMap<String, String>();\n\n\t\tSystem.out.println(\"이메일체크 진입\");\n\t\t\n\t\t// 랜덤함수 생성 & 변수 설정\n\t\tRandom random = new Random();\n\t\tint radomString = random.nextInt(1000000);\n\t\tString authNum = String.valueOf(radomString); // 인증번호\n\t\tString msg = \"인증번호 [\" + authNum + \"]\"; // 인증번호 포함한 메세지\n\n\t\tfinal String username = \"uzini_\"; //네이버 아이디를 입력해주세요. @naver.com은 입력하지 마시구요.\n\t\tfinal String password = \"wodnr825\"; //네이버 이메일 비밀번호를 입력해주세요.\n\t\tfinal String sendEmail = \"[email protected]\";\n\n\t\t// 메일 내용\n\t\tString recipient = request.getParameter(\"input_email\"); //받는 사람의 메일주소를 입력해주세요.\n\t\tSystem.out.println(recipient);\n\t\tString subject = \"초대해U 이메일 인증번호\"; \t\t\t\t\t //메일 제목 입력해주세요.\n\t\tString body = \"초대해U 이메일 인증번호 입니다. \\n\" + msg; //메일 내용 입력해주세요.\n\t\t \n\n\t\t// SMTP 서버 정보 설정\n\t Properties props = new Properties(); \n props.put(\"mail.smtp.user\",username); \n props.put(\"mail.smtp.password\", password);\n props.put(\"mail.smtp.host\", \"smtp.naver.com\"); \n props.put(\"mail.smtp.port\", \"25\"); \n props.put(\"mail.debug\", \"true\"); \n props.put(\"mail.smtp.auth\", \"true\"); \n props.put(\"mail.smtp.starttls.enable\",\"true\"); \n props.put(\"mail.smtp.EnableSSL.enable\",\"true\");\n props.setProperty(\"mail.smtp.socketFactory.class\", \"javax.net.ssl.SSLSocketFactory\"); \n props.setProperty(\"mail.smtp.socketFactory.fallback\", \"false\"); \n props.setProperty(\"mail.smtp.port\", \"465\"); \n props.setProperty(\"mail.smtp.socketFactory.port\", \"465\"); \n\n Session session = Session.getInstance(props, \n new javax.mail.Authenticator() { \n protected PasswordAuthentication getPasswordAuthentication() { \n return new PasswordAuthentication(username, password); \n }});\n try{\n Message message = new MimeMessage(session); \n message.setFrom(new InternetAddress(sendEmail)); // 보내는 사람 email\n message.setRecipients(Message.RecipientType.TO,\n \t\t \t\t\t\t\tInternetAddress.parse(recipient)); // 받는 사람 email\n message.setSubject(subject); // 제목\n message.setText(body); //내용 \n //message.setContent(\"내용\",\"text/html; charset=utf-8\");//글내용을 html타입 charset설정\n Transport.send(message); \n System.out.println(\"send 완료\");\n \n // DB 작업\n UserCertify userCertify = new UserCertify();\n userCertify.setUserCertifyEmail(recipient);\n userCertify.setUserCertifyNum(authNum);\n // userCertify status default 0\n UserCertifyDBBean userCertifyProcess = UserCertifyDBBean.getInstance();\n String id = userCertifyProcess.insert(userCertify) + \"\";\n System.out.println(\"userCertify db 입력 완료\");\n \n\t \t\tresultMap.put(\"status\", \"success\");\n\t \t\tif(id != null) {\n\t \t\t\tresultMap.put(\"certify_id\", id);\n\t \t\t}\n\t \t\tString gson = new Gson().toJson(resultMap);\n\t \t\treturn gson;\n\n } catch(Exception e){\n e.printStackTrace();\n }\n resultMap.put(\"status\", \"fail\");\n String gson = new Gson().toJson(resultMap);\n \t\treturn gson;\n\t}",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tSMTP auth = checkAuth(request, response);\n\t\tif (auth == null)\n\t\t\treturn;\n\t\t// Appropriate invalid headers are already sent. Reaching here means we're OK.\n\t\tsend(response, 200, \"\");\n\t}",
"@Override\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\ttry {\n\t\t\tprocessRequest(request, response);\n\t\t} catch (NamingException ex) {\n\t\t\tLogger.getLogger(u_SendMessage.class.getName()).log(Level.SEVERE, null, ex);\n\t\t} catch (SQLException ex) {\n\t\t\tLogger.getLogger(u_SendMessage.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\t}",
"@SuppressWarnings(\"deprecation\")\n\t@Override\n\tprotected void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t\tSession session = null;\n\t\tPrintWriter out = response.getWriter();\n\t\t\n\t\tString templatename = \"\";\n\t\tString from =\"\";\n\t\tString to = \"\";\n\t\tString subject=\"\";\n\t\tString body=\"\";\n\t\tString email=\"\";\n\t\tString Metadata=\"\";\n\t\tString description=\"\";\n\t\tString ExternalParam=\"\";\n\t\tString SelectedRule=\"\";\n\t\tString Ruledata=\"\";\n\t\tString SelectedWorkflow=\"\";\n\t\tString Selectedcontroller=\"\";\n\t\tString advanced= \"\";\n\t\ttry {\n\t\t\tsession = repo.login(new SimpleCredentials(\"admin\", \"admin\".toCharArray()));\n\t\t\tNode dtaNode=null;\n\t\t\tNode mailtemplateNode= null;\n\t\t\tNode templatenode = null;\n\t\t\tNode communicationNode=null;\n\t\t\tJSONObject emailerror= new JSONObject();\n\n\t\t\tBufferedInputStream bis = new BufferedInputStream(request.getInputStream());\n\t\t\tByteArrayOutputStream buf = new ByteArrayOutputStream();\n\t\t\tint result = bis.read();\n\t\t\twhile (result != -1) {\n\t\t\t\tbuf.write((byte) result);\n\t\t\t\tresult = bis.read();\n\t\t\t}\n\t\t\tString res = buf.toString(\"UTF-8\");\n\t\t\tJSONObject obj = new JSONObject(res);\n\t\t//\tout.print(obj);\n\t\t\t\n\t\t\tString group = obj.getString(\"group\");\n\n\n\t\t\tif (obj.getString(\"email\").length() == 0) {\n\t\t\t\temailerror.put(\"status\", \"error\");\n\t\t\t\temailerror.put(\"message\", \"Please Provide email\");\n\t\t\t\tout.println(emailerror);\n\t\t\t} else {\n\t\t\t\temail = obj.getString(\"email\");\n\t\t\t\n\t\t\t\t//out.print(email);\n\n\t\t\t//email= obj.getString(\"Email\").replace(\"@\", \"_\");\n\t\t\t\t\n\t\t\t\tif(obj.getString(\"mailtemplatename\").length() == 0) {\n\t\t\t\t\temailerror=new JSONObject();\n\t\t\t\t\temailerror.put(\"status\", \"error\");\n\t\t\t\t\temailerror.put(\"message\", \"Please Provide MailTemplate Name\");\n\t\t\t\t\tout.println(emailerror);\n\t\t\t\t}else {\n\t\t\t\n\t\t\t\t\tFreeTrialandCart cart= new FreeTrialandCart();\n\t\t\t\t\tString freetrialstatus=cart.checkfreetrial(email);\n\t\t\t\t\t\n\t\t\t\t\tdtaNode =\tparseSlingData.getDocTigerAdvNode( freetrialstatus, email,group, session, response );\n\t\t\t\t\tif(dtaNode!=null) {\n\n\t\t\t\n\t\t\tif(dtaNode.hasNode(\"Communication\")){\n\t\t\t\tcommunicationNode= dtaNode.getNode(\"Communication\");\n\t\t\t}else {\n\t\t\t\tcommunicationNode= dtaNode.addNode(\"Communication\");\n\t\t\t}\n\t\t\t\n\t\t\tif (request.getRequestPathInfo().getExtension().equals(\"basic\")) {\n\t\t\t\tJSONObject basicObj= new JSONObject();\n\t\t\t\tif(communicationNode.hasNode(\"MailTemplate\")){\n\t\t\t\t\tmailtemplateNode= communicationNode.getNode(\"MailTemplate\");\n\t\t\t\t}else {\n\t\t\t\t\tmailtemplateNode= communicationNode.addNode(\"MailTemplate\");\n\t\t\t\t}\n\t\t\t\ttemplatename= obj.getString(\"mailtemplatename\");\n\t\t\t\t\n\t\t\t\tString saveType = obj.getString(\"saveType\");\n\t\t\t\tif (saveType.equals(\"new\") || saveType.equals(\"edit\")) {\n\n\t\t\t\t\tif (saveType.equals(\"new\")) {\n\t\t\t\t\t\tbasicObj= new JSONObject();\n\t\t\t\t\t\tif (mailtemplateNode.hasNode(templatename)) {\n\n\t\t\t\t\t\t\tbasicObj.put(\"status\", \"error\");\n\t\t\t\t\t\t\tbasicObj.put(\"message\", \"Same Mailtemplate exist. Please try with new Template Name\");\n\t\t\t\t\t\t\tout.println(basicObj);\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttemplatenode = mailtemplateNode.addNode(templatename);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n//\t\t\t\t\t\tif(mailtemplateNode.hasNode(templatename)){\n//\t\t\t\t\t\ttemplatenode= mailtemplateNode.getNode(templatename);\n//\t\t\t\t\t}else {\n//\t\t\t\t\t\ttemplatenode= mailtemplateNode.addNode(templatename);\n//\t\t\t\t\t}\n\t\t\t\t\tMetadata= obj.getString(\"Metadata\");\n\t\t\t\t\tdescription= obj.getString(\"Description\");\n\t\t\t\t\tExternalParam= obj.getString(\"ExternalParam\");\n\t\t\t\t\t\n\t\t\t\t\ttemplatenode.setProperty(\"Metadata\", Metadata);\n\t\t\t\t\ttemplatenode.setProperty(\"ExternalParameter\", ExternalParam);\n\t\t\t\t\ttemplatenode.setProperty(\"Description\", description);\n\t\t\t\t\tDate creationDate= new Date();\n\t\t\t\t\ttemplatenode.setProperty(\"Flag\", 1);\n\t\t\t\t\ttemplatenode.setProperty(\"Version\", 1.0);\n\t\t\t\t\ttemplatenode.setProperty(\"Creation Date\", creationDate.toString());\n\t\t\t\t\t//session.save();\n\t\t\t\t\tbasicObj.put(\"status\", \"success\");\n\t\t\t\t\tbasicObj.put(\"mailtemplatename\", templatename);\n\t\t\t\t\t\n\t\t\t\t\tsession.save();\n\t\t\t\t\tout.println(basicObj);\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\n\t\t\t\t\t}else if (saveType.equals(\"edit\")) {\n\t\t\t\t\t\tif (mailtemplateNode.hasNode(templatename)) {\n\t\t\t\t\t\t\ttemplatenode = mailtemplateNode.getNode(templatename);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tMetadata= obj.getString(\"Metadata\");\n\t\t\t\t\t\t\tdescription= obj.getString(\"Description\");\n\t\t\t\t\t\t\tExternalParam= obj.getString(\"ExternalParam\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttemplatenode.setProperty(\"Metadata\", Metadata);\n\t\t\t\t\t\t\ttemplatenode.setProperty(\"ExternalParameter\", ExternalParam);\n\t\t\t\t\t\t\ttemplatenode.setProperty(\"Description\", description);\n\t\t\t\t\t\t\tDate creationDate= new Date();\n\t\t\t\t\t\t\ttemplatenode.setProperty(\"Flag\", 1);\n\t\t\t\t\t\t\ttemplatenode.setProperty(\"Version\", 1.0);\n\t\t\t\t\t\t\ttemplatenode.setProperty(\"Creation Date\", creationDate.toString());\n\t\t\t\t\t\t\t//session.save();\n\t\t\t\t\t\t\tbasicObj.put(\"status\", \"success\");\n\t\t\t\t\t\t\tbasicObj.put(\"mailtemplatename\", templatename);\n\t\t\t\t\t\t\tsession.save();\n\t\t\t\t\t\t\tout.println(basicObj);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbasicObj.put(\"status\", \"error\");\n\t\t\t\t\t\t\tbasicObj.put(\"message\", \"No template present to edit\");\n\t\t\t\t\t\t\tout.println(basicObj);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t} else {\n\t\t\t\t\tbasicObj.put(\"status\", \"error\");\n\t\t\t\t\tbasicObj.put(\"message\", \"Please enter save Type\");\n\t\t\t\t\tout.println(basicObj);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else if (request.getRequestPathInfo().getExtension().equals(\"sfobj\")) {\n\t\t\t\tJSONObject sfObjRet= new JSONObject();\n\t\t\t\tif(obj.has(\"saveType\")) {\n\t\t\t\tString saveType = obj.getString(\"saveType\");\n\t\t\t\tsfObjRet.put(\"saveType\", saveType);\n\t\t\t\t}\n\t\t\t\tsfObjRet.put(\"email\", email);\n\t\t\t\tif(communicationNode.hasNode(\"MailTemplate\")){\n\t\t\t\t\tmailtemplateNode= communicationNode.getNode(\"MailTemplate\");\n\t\t\t\t\ttemplatename= obj.getString(\"mailtemplatename\");\n\t\t\t\t\n\t\t\t\t\tif(mailtemplateNode.hasNode(templatename)){\n\t\t\t\t\t\ttemplatenode= mailtemplateNode.getNode(templatename);\n\t\t\t\t\t\tNode SFobjNode= null;\n\t\t\t\t\t\tNode sfNode= null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(templatenode.hasNode(\"SF Object\")){\n\t\t\t\t\t \t\tSFobjNode= templatenode.getNode(\"SF Object\");\t\t\t\t\t\t \t\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tSFobjNode= templatenode.addNode(\"SF Object\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tJSONObject sfobj= obj.getJSONObject(\"SFObject\");\n\n\t\t\t\t\t\tJSONObject pkobj = obj.getJSONObject(\"Primery key\");\n\t\t\t\t\t\tString pkobject = pkobj.getString(\"Object\");\n\t\t\t\t\t\tString pkkey = pkobj.getString(\"key\");\n\t\t\t\t\t\tSFobjNode.setProperty(\"Primary key Object\", pkobject);\n\t\t\t\t\t\tSFobjNode.setProperty(\"Primary Key\", pkkey);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tJSONArray keys = sfobj.names();\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int i = 0; i < keys.length (); ++i) {\n\t\t\t\t\t\t\t String key = keys.getString (i); // Here's your key\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tJSONArray keysArr= sfobj.getJSONArray(key);\n\t\t\t\t\t\t\tsfobj.getString (key);\n\t\t\t\t\t\t\tString [] keystrarr= new String[keysArr.length()];\n\t\t\t\t\t\t\tfor(int j=0; j<keystrarr.length; j++){\n\t\t\t\t\t\t\t\tkeystrarr[j]= keysArr.getString(j);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t \tString [] allobjArr= new String[keys.length()];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int k=0; k<allobjArr.length; k++){\n\t\t\t\t\t\t\t\tallobjArr[k]= keys.getString(k);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t \tSFobjNode.setProperty(\"All Objects\", allobjArr);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t \t\n\t\t\t\t\t\t \tif(SFobjNode.hasNode(key)){\n\t\t\t\t\t\t \t\tsfNode= SFobjNode.getNode(key);\n\t\t\t\t\t\t \t}else {\n\t\t\t\t\t\t\t\tsfNode= SFobjNode.addNode(key);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t \tsfNode.setProperty(\"Fields\", keystrarr);\n\t\t\t\t\t\t \t\n\t\t\t\t\t\t \tsfObjRet.put(\"status\", \"success\");\n\t\t\t\t\t\t \tsfObjRet.put(\"mailtemplatename\", templatename);\n\t\t\t\t\t\t \tsfObjRet.put(\"SFObject\", sfobj);\n\t\t\t\t\t\t \tsfObjRet.put(\"Primery key\", pkobj);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsession.save();\n\t\t\t\t\t\tout.println(sfObjRet);\n\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t \tsfObjRet=new JSONObject();\n\t\t\t\t \tsfObjRet.put(\"error\", \"MailTemplate not found\");\n\t\t\t\t\tout.println(sfObjRet.toString());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\tif (request.getRequestPathInfo().getExtension().equals(\"exparam\")) {\n\n\t\t\t\tJSONObject js = new JSONObject();\n\t\t\t\t\n\t\t\t\tif(communicationNode.hasNode(\"MailTemplate\")){\n\t\t\t\t\tmailtemplateNode= communicationNode.getNode(\"MailTemplate\");\n\t\t\t\t\n\t\t\t\t\ttemplatename= obj.getString(\"mailtemplatename\");\n\t\t\t\t\t\n\t\t\t\t\tif(mailtemplateNode.hasNode(templatename)){\n\t\t\t\t\t\ttemplatenode= mailtemplateNode.getNode(templatename);\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tString saveType= obj.getString(\"saveType\");\n\t\t\t\tNode extparam = null;\n\t\t\t\tJSONArray exprar = new JSONArray();\n\t\t\t\tString exparamProp= templatenode.getProperty(\"ExternalParameter\").getString();\n\t\t\t\t\n\t\t\t\tif(exparamProp.equalsIgnoreCase(\"true\")){\n\t\t\t\t\n\t\t\t\tif (obj.has(\"externalparamobject\")) {\n\t\t\t\t\tJSONArray externalparamobject = obj.getJSONArray(\"externalparamobject\");\n\t\t\t\t\tnew JSONArray();\n\t\t\t\t\tJSONObject extprm = null;\n\t\t\t\t\tString type = \"\";\n\n\t\t\t\t\tif (!templatenode.hasNode(\"externalparamobject\")) {\n\t\t\t\t\t\textparam = templatenode.addNode(\"externalparamobject\");\n\t\t\t\t\t\textparam.setProperty(\"last_count\", 0);\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\textparam = templatenode.getNode(\"externalparamobject\");\n\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n//\t\t\t\t\t exprmob = new JSONObject();\n\t\t\t\t\tfor (int i = 0; i < externalparamobject.length(); i++) {\n\t\t\t\t\t\tJSONObject exprmob = new JSONObject();\n\n\t\t\t\t\t\textprm = externalparamobject.getJSONObject(i);\n\t\t\t\t\t\t// JSONArray exprar = new JSONArray();\n\t\t\t\t\t\tNode extctnode = null;\n\n\t\t\t\t\t\tif (extprm.has(\"type\")) {\n\t\t\t\t\t\t\ttype = extprm.getString(\"type\");\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tNode wsnode = null;\n\t\t\t\t\t\t// extctnode.setProperty(\"type\", type);\n\t\t\t\t\t\tif (type.equals(\"ws\")) {\n\n\t\t\t\t\t\t\tif (!extparam.hasNode(\"ws\")) {\n\t\t\t\t\t\t\t\twsnode = extparam.addNode(\"ws\");\n\t\t\t\t\t\t\t\twsnode.setProperty(\"last_count\", 0);\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twsnode = extparam.getNode(\"ws\");\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlong lsct = wsnode.getProperty(\"last_count\").getLong();\n\t\t\t\t\t\t\tif (!wsnode.hasNode(Long.toString(lsct))) {\n\t\t\t\t\t\t\t\textctnode = wsnode.addNode(Long.toString(lsct));\n\n\t\t\t\t\t\t\t\twsnode.setProperty(\"last_count\", lsct + 1);\n\t\t\t\t\t\t\t\tsession.save();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\textctnode = wsnode.getNode(Long.toString(lsct));\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\texprmob.put(\"type\", type);\n\n\t\t\t\t\t\t\tif (extprm.has(\"primerykey\")) {\n\t\t\t\t\t\t\t\tString primerykey = extprm.getString(\"primerykey\");\n\t\t\t\t\t\t\t\textctnode.setProperty(\"primerykey\", primerykey);\n\t\t\t\t\t\t\t\texprmob.put(\"primerykey\", primerykey);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (extprm.has(\"url\")) {\n\t\t\t\t\t\t\t\tString url = extprm.getString(\"url\");\n\t\t\t\t\t\t\t\textctnode.setProperty(\"url\", url);\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (extprm.has(\"token\")) {\n\t\t\t\t\t\t\t\tString token = extprm.getString(\"token\");\n\t\t\t\t\t\t\t\textctnode.setProperty(\"token\", token);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (extprm.has(\"username\")) {\n\t\t\t\t\t\t\t\tString username1 = extprm.getString(\"username\");\n\t\t\t\t\t\t\t\textctnode.setProperty(\"username\", username1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (extprm.has(\"password\")) {\n\t\t\t\t\t\t\t\tString password = extprm.getString(\"password\");\n\t\t\t\t\t\t\t\textctnode.setProperty(\"password\", password);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (extprm.has(\"input\")) {\n\t\t\t\t\t\t\t\tJSONArray inp = extprm.getJSONArray(\"input\");\n\t\t\t\t\t\t\t\tJSONObject inpob = null;\n\n\t\t\t\t\t\t\t\tNode inpnode = null;\n\t\t\t\t\t\t\t\tif (!extctnode.hasNode(\"input\")) {\n\t\t\t\t\t\t\t\t\tinpnode = extctnode.addNode(\"input\");\n\t\t\t\t\t\t\t\t\tinpnode.setProperty(\"last_count\", 0);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tinpnode = extctnode.getNode(\"input\");\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tJSONArray inar = new JSONArray();\n\t\t\t\t\t\t\t\tfor (int in = 0; in < inp.length(); in++) {\n\t\t\t\t\t\t\t\t\tlong inpct = inpnode.getProperty(\"last_count\").getLong();\n\t\t\t\t\t\t\t\t\tNode inpctnode = null;\n\t\t\t\t\t\t\t\t\tif (!inpnode.hasNode(Long.toString(inpct))) {\n\t\t\t\t\t\t\t\t\t\tinpctnode = inpnode.addNode(Long.toString(inpct));\n\t\t\t\t\t\t\t\t\t\tinpnode.setProperty(\"last_count\", inpct + 1);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tinpctnode = extparam.getNode(Long.toString(inpct));\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tinpob = inp.getJSONObject(in);\n\n\t\t\t\t\t\t\t\t\tString fieldname = inpob.getString(\"fieldname\");\n\t\t\t\t\t\t\t\t\tinar.put(fieldname);\n\t\t\t\t\t\t\t\t\tString fieldtype = inpob.getString(\"fieldtype\");\n\t\t\t\t\t\t\t\t\tString fieldlength = inpob.getString(\"fieldlength\");\n\n\t\t\t\t\t\t\t\t\tinpctnode.setProperty(\"fieldname\", fieldname);\n\t\t\t\t\t\t\t\t\tinpctnode.setProperty(\"fieldtype\", fieldtype);\n\t\t\t\t\t\t\t\t\tinpctnode.setProperty(\"fieldlength\", fieldlength);\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\texprmob.put(\"input\", inar);\n\t\t\t\t\t\t\t\t// exprar.put(exprmob);\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (extprm.has(\"output\")) {\n\t\t\t\t\t\t\t\tJSONArray outp = extprm.getJSONArray(\"output\");\n\t\t\t\t\t\t\t\tJSONObject outpob = null;\n\n\t\t\t\t\t\t\t\tNode opnode = null;\n\t\t\t\t\t\t\t\tif (!extctnode.hasNode(\"output\")) {\n\t\t\t\t\t\t\t\t\topnode = extctnode.addNode(\"output\");\n\t\t\t\t\t\t\t\t\topnode.setProperty(\"last_count\", 0);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\topnode = extctnode.getNode(\"output\");\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tJSONArray opar = new JSONArray();\n\t\t\t\t\t\t\t\tfor (int op = 0; op < outp.length(); op++) {\n\t\t\t\t\t\t\t\t\tlong opct = opnode.getProperty(\"last_count\").getLong();\n\n\t\t\t\t\t\t\t\t\tNode opctnode = null;\n\t\t\t\t\t\t\t\t\tif (!opnode.hasNode(Long.toString(opct))) {\n\t\t\t\t\t\t\t\t\t\topctnode = opnode.addNode(Long.toString(opct));\n\t\t\t\t\t\t\t\t\t\topnode.setProperty(\"last_count\", opct + 1);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\topctnode = extparam.getNode(Long.toString(opct));\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\toutpob = outp.getJSONObject(op);\n\n\t\t\t\t\t\t\t\t\tString fieldname = outpob.getString(\"fieldname\");\n\t\t\t\t\t\t\t\t\topar.put(fieldname);\n\n\t\t\t\t\t\t\t\t\tString fieldtype = outpob.getString(\"fieldtype\");\n\t\t\t\t\t\t\t\t\tString fieldlength = outpob.getString(\"fieldlength\");\n\n\t\t\t\t\t\t\t\t\topctnode.setProperty(\"fieldname\", fieldname);\n\t\t\t\t\t\t\t\t\topctnode.setProperty(\"fieldtype\", fieldtype);\n\t\t\t\t\t\t\t\t\topctnode.setProperty(\"fieldlength\", fieldlength);\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\texprmob.put(\"output\", opar);\n\t\t\t\t\t\t\t\t// js.put(\"externalparamobject\", exprar);\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\texprar.put(exprmob);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tNode sfretNode = null;\n\t\t\t\tNode sfgetNode = null;\n\t\t\t\tString sfpriKey=\"\";\n\t\t\t\tString sfName = \"\";\n\n\t\t\t\tJSONObject sfret = new JSONObject();\n\n\t\t\t\tif (templatenode.hasNode(\"SF Object\")) {\n\t\t\t\t\tsfretNode = templatenode.getNode(\"SF Object\");\n\t\t\t\t\tNodeIterator iteratorSF = sfretNode.getNodes();\n\t\t\t\t\tValue[] data = null;\n\n\t\t\t\t\twhile (iteratorSF.hasNext()) {\n\t\t\t\t\t\tsfgetNode = iteratorSF.nextNode();\n\t\t\t\t\t\tsfName = sfgetNode.getName().toString();\n\t\t\t\t\t\tdata = sfgetNode.getProperty(\"Fields\").getValues();\n\t\t\t\t\t\tJSONArray fieldArr = new JSONArray();\n\n\t\t\t\t\t\tfor (int i1 = 0; i1 < data.length; i1++) {\n\t\t\t\t\t\t\tString values = data[i1].getString();\n\t\t\t\t\t\t\tfieldArr.put(values);\n\t\t\t\t\t\t\tsfret.put(sfName, fieldArr);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t sfpriKey = sfretNode.getProperty(\"Primary Key\").getString();\n\t\t\t\t\tString obj_prikey = sfretNode.getProperty(\"Primary key Object\").getString();\n\n\t\t\t\t\tJSONObject prikeyobj = new JSONObject();\n\n\t\t\t\t\tprikeyobj.put(\"Object\", obj_prikey);\n\t\t\t\t\tprikeyobj.put(\"key\", sfpriKey);\n\n\t\t\t\t\tsfret.put(\"Primary Key\", prikeyobj);\n\n\t\t\t\t}\n//\t\t\t\telse {\n//\t\t\t\t\tjs.put(\"status\", \"error\");\n//\t\t\t\t\tjs.put(\"message\", \"SFobject Not found\");\n//\t\t\t\t\tout.println(js);\n//\t\t\t\t}\n\n\t\t\t\tNode filenode = null;\n\t\t if (extparam.hasNode(\"file\")) {\n\t\t filenode = extparam.getNode(\"file\");\n\n\t\t NodeIterator iteratorfile = filenode.getNodes();\n\t\t new JSONObject();\n\n\t\t new JSONArray();\n\n\t\t //JSONObject jsonfile = new JSONObject(\"{\\\"type\\\":\\\"excel\\\",\\\"primerykey\\\":\\\"Accno\\\",\\\"output\\\":[\\\"amount\\\",\\\"invoiceno\\\"]}\") ;\n\n\t\t Node flnode = null;\n\t\t while (iteratorfile.hasNext()) {\n\t\t flnode = iteratorfile.nextNode();\n\t\t JSONArray hedarr = new JSONArray();\n\t\t new JSONObject();\n\t\t String filect = flnode.getName().toString();\n\t\t Node fct = null;\n\t\t if (filenode.hasNode(filect)) {\n\t\t fct = filenode.getNode(filect);\n\n\t\t String flname = fct.getProperty(\"filename\").getString();\n\t\t String filepath = fct.getProperty(\"filepath\").getString();\n\t\t ReadHeaderExcel rm = new ReadHeaderExcel();\ntry {\n\t\t String resp = rm.callget(filepath);\n\t\t JSONObject jshed = new JSONObject(resp);\n\t\t hedarr = jshed.getJSONArray(\"Headers\");\n\t\t \n}catch(Exception e) {\n\t\nJSONObject obj12=new JSONObject();\nobj12.put(\"error\", e.getMessage());\n//out.print(obj12);\n}\nJSONObject excelretObj= new JSONObject();\n \n\t\t excelretObj.put(\"type\", \"excel\");\n\t\t excelretObj.put(\"filename\", flname);\n\t\t excelretObj.put(\"primerykey\", sfpriKey);\n\t\t excelretObj.put(\"output\", hedarr);\n\t\t \n\t\t exprar.put(excelretObj);\n\t\t \n\t\t }\n\t\t }\n\n\t\t \n\t\t }\n\n\n\t\t\t\t// SFobject\n\t\t\t\t// jssf.put(\"Primery key\", pkjs);\n\t\t\t\tjs.put(\"status\", \"success\");\n\t\t\t\tjs.put(\"mailtemplatename\", templatename);\n\t\t\t\tjs.put(\"email\", email);\n\t\t\t\tjs.put(\"saveType\", saveType);\n\n\t\t\t\tjs.put(\"externalparamobject\", exprar);\n\t\t\t\tjs.put(\"SFobject\", sfret);\n\n\t\t\t \n\t\t\t\t\n\t\t\t\t//session.save();\n\t\t\t\tout.println(js);\n\t\t\t\t\t}else{\n\t\t\t\t\t \tjs=new JSONObject();\n\t\t\t\t\t \tjs.put(\"ststus\", \"error\");\n\t\t\t\t\t \tjs.put(\"message\", \"MailTemplate not found\");\n\t\t\t\t\t\tout.println(js);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t \tjs=new JSONObject();\n\t\t\t\t \tjs.put(\"ststus\", \"error\");\n\t\t\t\t \tjs.put(\"message\", \"MailTemplate not found\");\n\t\t\t\t \tout.println(js);\n\t\t\t\t}\n\t\t\t\tsession.save();\n }else if(request.getRequestPathInfo().getExtension().equals(\"compose\")){\n \t JSONObject composeobj = new JSONObject();\n\t\t\t\t\tif(obj.has(\"saveType\")) {\n\t\t\t\t\t\t obj.getString(\"saveType\");\n\t\t\t\t\t\t}\n\t\t\t\t\tif(!(obj.getString(\"mailtemplatename\").length()==0)) {\n\t\t\t\t\ttemplatename= obj.getString(\"mailtemplatename\");\n\t\t\t\t\t\n\t\t\t\t\tfrom= obj.getString(\"from\");\n\t\t\t\t\tto= obj.getString(\"to\");\n\t\t\t\t\tsubject= obj.getString(\"subject\");\n\t\t\t\t\tbody= obj.getString(\"body\");\n\t\t\t\t\t\n\t\t\t\t\tNode advancedNode= null;\n\t\t\t\t\tif(communicationNode.hasNode(\"MailTemplate\")){\n\t\t\t\t\t\tmailtemplateNode= communicationNode.getNode(\"MailTemplate\");\t\t\t\t\t\n\t\t\t\t\t\tif(mailtemplateNode.hasNode(templatename)){\n\t\t\t\t\t\t\ttemplatenode= mailtemplateNode.getNode(templatename);\n\t\t\t\t\t\t\ttemplatenode.setProperty(\"From\", from);\n\t\t\t\t\t\t\ttemplatenode.setProperty(\"To\", to);\n\t\t\t\t\t\t\ttemplatenode.setProperty(\"Subject\", subject);\n\t\t\t\t\t\t\ttemplatenode.setProperty(\"Body\", body);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tadvanced= obj.getString(\"advanced\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(advanced.equalsIgnoreCase(\"true\")){\n\t\t\t\t\t\t\t\tif(templatenode.hasNode(\"Advanced\")){\n\t\t\t\t\t\t\t\t\tadvancedNode= templatenode.getNode(\"Advanced\");\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\tadvancedNode= templatenode.addNode(\"Advanced\");\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\tif(obj.has(\"selectedrule\")) {\n\t\t\t\t\t\t\t\t\tSelectedRule= obj.getString(\"selectedrule\");\n\t\t\t\t\t\t\t\t\tadvancedNode.setProperty(\"Selected Rule\", SelectedRule);\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\tif(obj.has(\"Ruledata\")) {\n\t\t\t\t\t\t\t\t\tRuledata= obj.getString(\"Ruledata\");\n\t\t\t\t\t\t\t\t\tadvancedNode.setProperty(\"Ruledata\", Ruledata);\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\tJSONObject ruledataobj = new JSONObject(Ruledata);\n\t\t\t\t\t\t\t\t\tif(ruledataobj.has(\"URL\")) {\n\t\t\t\t\t\t\t\t\tString URL = ruledataobj.getString(\"URL\");\n\n\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\tString projectName =URL.substring(URL.indexOf(\"_\")+1, URL.indexOf(SelectedRule)-1) ;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tadvancedNode.setProperty(\"RuleProjectName\", projectName);\t\t\n\t\t\t\t\t\t\t\t\t//out.println(\"ParentClauseNode \"+advancenode);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}catch(Exception e) {}\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\t\t\t\t\t\t\tif(obj.has(\"SelectedWorkflow\")) {\n\t\t\t\t\t\t\t\t\tSelectedWorkflow= obj.getString(\"selectedworkflow\");\n\t\t\t\t\t\t\t\t\tadvancedNode.setProperty(\"Selected Workflow\", SelectedWorkflow);\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\tif(obj.has(\"Selectedcontroller\")) {\n\t\t\t\t\t\t\t\t\tSelectedcontroller= obj.getString(\"selectedcontroller\");\n\t\t\t\t\t\t\t\t\tadvancedNode.setProperty(\"Selected Controller\", Selectedcontroller);\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}\n\t\t\t\t\t\t\t\tsession.save();\n\t\t\t\t\t\t\tNode attachmentNode= null;\n\t\t\t\t\t\t\tif(templatenode.hasNode(\"Attachment\")){\n\t\t\t\t\t\t\t\tattachmentNode= templatenode.getNode(\"Attachment\");\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tattachmentNode= templatenode.addNode(\"Attachment\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString fileName=\"\";\n\t\t\t\t\t\t\tString fileData=\"\";\n\t\t\t\t\t\t\tif(obj.has(\"filename\") && !obj.getString(\"filename\").equals(\"\")) {\n\t\t\t\t\t\t\tfileName= obj.getString(\"filename\");\n\t\t\t\t\t\t\tfileData= obj.getString(\"filedata\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbyte[] decoded = Base64.decode(fileData);\n\t\t\t\t\t\t\tInputStream is = null;\n\t\t\t\t\t\t\tis = new ByteArrayInputStream(decoded);\n\t\t\t\t\t\t\tNode fileNode=null;\n\t\t\t\t\t\t\t\tif(attachmentNode.hasNodes()) {\n\t\t\t\t\t\t\t\t\tNodeIterator fitr= attachmentNode.getNodes();\n\t\t\t\t\t\t\t\t\twhile(fitr.hasNext()) {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tfileNode=fitr.nextNode();\n\t\t\t\t\t\t\t\t\tfileNode.removeShare();\n\t\t\t\t\t\t\t\t\tfileNode=attachmentNode.addNode(fileName,\"nt:file\");\n\t\t\t\t\t\t\t\t\tNode jcrNode= null;\n\t\t\t\t\t\t\t\t\tjcrNode = fileNode.addNode(\"jcr:content\",\"nt:resource\");\n\t\t\t\t\t\t\t\t\tjcrNode.setProperty(\"jcr:data\",is);\n\t\t\t\t\t\t\t\t\tjcrNode.setProperty(\"jcr:mimeType\",\"attach\");\n\t\t\t\t\t\t\t\t\tattachmentNode.setProperty(\"filepath\", request.getScheme()+\"://\"+request.getServerName()+\":\"+ request.getServerPort()+request.getContextPath()\n\t\t\t\t\t\t\t\t\t+ \"/content/user/\"+email.replaceAll(\"@\", \"_\")+\"/DocTigerAdvanced/Communication/MailTemplate/\"+templatename+ \"/Attachment/\" + fileName);\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}else {\n\t\t\t\t\t\t\t\t\tfileNode = attachmentNode.addNode(fileName,\"nt:file\");\n\t\t\t\t\t\t\t\t\tNode jcrNode= null;\n\t\t\t\t\t\t\t\t\tjcrNode = fileNode.addNode(\"jcr:content\",\"nt:resource\");\n\t\t\t\t\t\t\t\t\tjcrNode.setProperty(\"jcr:data\",is);\n\t\t\t\t\t\t\t\t\tjcrNode.setProperty(\"jcr:mimeType\",\"attach\");\n\t\t\t\t\t\t\t\t\tattachmentNode.setProperty(\"filepath\", request.getScheme()+\"://\"+request.getServerName()+\":\"+ request.getServerPort()+request.getContextPath()\n\t\t\t\t\t\t\t\t\t+ \"/content/user/\"+email.replaceAll(\"@\", \"_\")+\"/DocTigerAdvanced/Communication/MailTemplate/\"+templatename+ \"/Attachment/\" + fileName);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t \t\t\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t}}\n\t\t\t\t\tcomposeobj=new JSONObject();\n\t\t\t\t\tcomposeobj.put(\"status\", \"success\");\n\t\t\t\t\tcomposeobj.put(\"message\",\"MailTemplate Saved Succesfully\");\n\t\t\t\t\tout.println(composeobj);\n\t\t\t\t}else{\n\t\t\t\t\tcomposeobj=new JSONObject();\n\t\t\t\t\tcomposeobj.put(\"status\", \"error\");\n\t\t\t\t\tcomposeobj.put(\"message\",\"MailTemplate not found\");\n\n\t\t\t\t\tout.println(composeobj);\n\t\t\t\t}\n\t\t\t\n\t\t\tsession.save();\n\t\t\t\t\n\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tJSONObject err =new JSONObject();\n\t\t\t\t\terr.put(\"status\", \"error\");\n\t\t\t\t\terr.put(\"message\", \"Invalid user\");\n\t\t\t\t\tout.print(err);\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tJSONObject err =new JSONObject();\n\t\t\ttry {\n\t\t\t\terr.put(\"status\", \"error\");\n\t\t\t\terr.put(\"message\", e.getMessage());\n\t\t\t} catch (JSONException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tout.print(err);\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\t\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n processRequest(request, response);\r\n } catch (MessagingException ex) {\r\n Logger.getLogger(reservation.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"void send(String emailName);",
"public void sendEmail(SendEmailRequestDocument parameters) {\r\n\t\t// Add the business logic here\r\n\t\treturn;\r\n\t}",
"public ResponseUpdDao sendSimpleEmail(String tsSubject, \n String tsMessage,\n String tsProcess,\n List<EmailDestinationAddress> toEmailDestinationAddress\n ) {\n ResponseUpdDao loResponse = new ResponseUpdDao();\n try{\n String lsHtml =\n \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Strict//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-\" +\n \"strict.dtd\\\">\\n\" + \n \" <html xmlns=\\\"http://www.w3.org/1999/xhtml\\\" dir=\\\"ltr\\\" lang=\\\"es-ES\\\">\\n\" + \n \" <head>\\n\" + \n \" <title>\"+tsProcess+\"</title>\\n\" + \n \" <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=ISO-8859-1\\\" />\\n\" + \n \" <meta name=\\\"language\\\" content=\\\"es\\\" />\\n\" + \n \" </head>\\n\" + \n \" <body>\\n\" + \n \" <div style='background-color:#0F2F62; height:25px;background:linear-gradient(#040545, \" +\n \"#0172AE);background:-webkit-linear-gradient(#040545, #0172AE);background: -ms-linear-background(\" +\n \"#040545, #0172AE);filter:progid:DXImageTransform.Microsoft.gradient(startColorStr='#040545', \" +\n \"EndColorStr='#0172AE');'></div>\\n\" + \n \" <div style='background-color:#fff'> \\n\" + \n \" <br/>\\n\" + \n \" <label style='font-family:Arial, Helvetica, sans-serif; font-size:16px; font-weight:\" +\n \"bold '>El Proceso de Integración para \"+tsProcess+\" ha Finalizado</label><p/>\\n\" + \n \" <label style='font-family:Arial, Helvetica, sans-serif; font-size:12px; \" +\n \"font-weight:bold '>\"+tsMessage+\"</label><p/>\\n\" + \n /*\" <table cellpadding='0' cellspacing='0' style='border-bottom-color:#F79646;border-\" +\n \"bottom-width:3px;border-bottom-style:solid;border-top-color:#F79646;border-top-style:solid;border-\" +\n \"top-width:3px; '> \\n\" + \n \" <tr>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Bcsttim</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Channelid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Date</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Orderid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Spotid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Buyuntid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Breakid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Hour</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Duration</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Spotformatid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Mediaid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Productid</th>\\n\" + \n \" <th height='10px' style='font-size:12px; background:#276A7C; \" +\n \"font-family:Arial, Helvetica, sans-serif;color:#FFFFFF;padding:3px;'>Spotprice</th>\\n\" + \" </tr>\\n\";\n \n lsHtml += \" </table> \\n\" + \n */\" <br/> \\n\" + \n \" <br/>\\n\" + \n \" <label style='font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:\" +\n \"bold '>Integración Paradigm-Landmark, 2019 Televisa S.A. de C.V</label> \\n\" + \n \" <br/>\\n\" + \n \" </div>\\n\" + \n \" <div style='float:left; background-color:#F58220;width:7%;height:25px;background:-moz-\" +\n \"linear-gradient(#F1A345, #E17521); background:-webkit-linear-gradient(#F1A345, #E17521);\" +\n \"background: -ms-linear-background(#F1A345, #E17521);filter:progid:DXImageTransform.Microsoft.gradient(\" +\n \"startColorStr='#F1A345', EndColorStr='#E17521');'>\\n\" + \n \" </div> \\n\" + \n \" <div style='float:left; ;width:86%;height:25px;background:linear-gradient(#040545, \" +\n \"#0172AE);background:-webkit-linear-gradient(#040545, #0172AE);background: -ms-linear-\" +\n \"background(#040545, #0172AE);filter:progid:DXImageTransform.Microsoft.gradient(startColorStr=\" +\n \"'#040545', EndColorStr='#0172AE');'>\\n\" + \n \" </div>\\n\" + \n \" <div style='float:left; background-color:#F58220;width:7%;height:25px;background:-\" +\n \"moz-linear-gradient(#F1A345, #E17521);background:-webkit-linear-gradient(#F1A345, #E17521);\" +\n \"background: -ms-linear-background(#F1A345, #E17521);filter:progid:DXImageTransform.Microsoft.gradient(\" +\n \"startColorStr='#F1A345', EndColorStr='#E17521');'></div> \\n\" + \n \" </body>\\n\" + \n \" </html>\"; \n System.out.println(\"Html generado para el correo ================>\");\n System.out.println(lsHtml);\n //writeFile(lsHtml);\n SecmanDasEnviarCorreo loSecmanDasSendMail = getDynaWebServiceURLEmail();\n if(loSecmanDasSendMail != null){\n try{\n Map<String, Object> loRequestContext =\n ((BindingProvider)loSecmanDasSendMail).getRequestContext(); \n setPortCredentialProviderList(loRequestContext); \n Mail loEmail = new Mail(); \n MailHeader loEmailHeader = new MailHeader();\n MailAddress loEmailAddresFrom = new MailAddress(); \n loEmailAddresFrom.setUserNameAdress(\"Landmark Integration\");\n loEmailAddresFrom.setAddress(\"[email protected]\");\n loEmailHeader.setAddressFrom(loEmailAddresFrom);\n MailAddressCollection loMailAddressCollection =\n new MailAddressCollection();\n for(EmailDestinationAddress loDest: toEmailDestinationAddress){ \n MailAddress loEmailAdd = new MailAddress();\n //System.out.println(\"AddressTO username[\"+loDest.getLsNameTo()+\"] address[\"+loDest.getLsAddressTo()+\"]\");\n loEmailAdd.setUserNameAdress(loDest.getLsNameTo());\n loEmailAdd.setAddress(loDest.getLsAddressTo()); \n loMailAddressCollection.getMailAddress().add(loEmailAdd);\n }\n loEmailHeader.setTo(loMailAddressCollection);\n loEmailHeader.setSubject(tsSubject);\n loEmail.setMailHeader(loEmailHeader);\n MailBody loMailBody = new MailBody();\n loMailBody.setBodyType(\"HTML\");\n loMailBody.setMessage(lsHtml);\n loEmail.setMailBody(loMailBody);\n loSecmanDasSendMail.enviarCorreo(loEmail);\n loResponse.setLsResponse(\"OK\");\n loResponse.setLiAffected(0);\n loResponse.setLsMessage(\"Correo enviado satisfactoriamente\");\n System.out.println(\"Fin enviar correo - ok\");\n } catch (Exception loException) {\n System.out.println(\"Error al enviar correo: \"+loException.getMessage());\n loResponse.setLsResponse(\"ERROR\");\n loResponse.setLiAffected(0);\n loResponse.setLsMessage(loException.getMessage());\n }\n }\n } catch (Exception loException) {\n System.out.println(\"Error crear instancia del servicio de correo de secman: \"+loException.getMessage());\n loResponse.setLsResponse(\"ERROR\");\n loResponse.setLiAffected(0);\n loResponse.setLsMessage(loException.getMessage()); \n }\n return loResponse;\n }",
"public void run() {\r\n\t\t\t\ttry {\r\n//\t\t\t\t\tPostMethod post = new PostMethod(Config.get(\"reportpage\"));\r\n//\t\t\t\t\tpost.addParameter(\"user\", Main.USER);\r\n//\t\t\t\t\tpost.addParameter(\"email\", email);\r\n//\t\t\t\t\tpost.addParameter(\"notes\", notes);\r\n//\t\t\t\t\tpost.addParameter(\"info\", info);\r\n\t\t\t\t String product = Config.get(\"product\", \"JMARS\");\r\n\t\t\t\t product = product.toUpperCase();\r\n\t\t\t\t \r\n\t\t\t\t\tJmarsHttpRequest request = new JmarsHttpRequest(Config.get(\"reportpage\"), HttpRequestType.POST);\r\n\t\t\t\t\trequest.addRequestParameter(\"user\", Main.USER);\r\n\t\t\t\t\trequest.addRequestParameter(\"email\", email);\r\n\t\t\t\t\trequest.addRequestParameter(\"notes\", notes);\r\n\t\t\t\t\trequest.addRequestParameter(\"info\", info);\r\n\t\t\t\t\trequest.addRequestParameter(\"product\",product);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n//\t\t\t\t\tHttpClient http = new HttpClient();\r\n//\t\t\t\t\thttp.getHttpConnectionManager().getParams().setConnectionTimeout(timeout);\r\n\t request.setConnectionTimeout(timeout);\r\n\t request.setLaxRedirect();\r\n\t boolean successful = request.send();\r\n//\t\t\t\t\tint code = Util.postWithRedirect(http, post, 3);\r\n int code = request.getStatus();\r\n\t if (code != HttpStatus.SC_OK) {\r\n\t\t\t\t\t\terror = \"Server returned unexpected code \" + code;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tString response = new BufferedReader(\r\n\t\t\t\t\t\t\tnew InputStreamReader(\r\n\t\t\t\t\t\t\t\trequest.getResponseAsStream())).readLine();\r\n\t\t\t\t\t\tif (response.equals(\"OKAY\")) {\r\n\t\t\t\t\t\t\t// mail sent properly\r\n\t\t\t\t\t\t} else if (response.equals(\"FAILURE\")) {\r\n\t\t\t\t\t\t\terror = \"Server was unable to deliver the message: \" + response;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n//\t\t\t\t} catch (HttpException e) {\r\n//\t\t\t\t\terror = \"Error communicating with server\";\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\terror = \"Unable to establish a connection, are you connected?\";\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\terror = \"Unexpected exception occurred: \" + e.getMessage();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// get back on the AWT thread to handle the result\r\n\t\t\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\ttimer.stop();\r\n\t\t\t\t\t\tdlg.dispose();\r\n\t\t\t\t\t\tif (error != null) {\r\n\t\t\t\t\t\t\t// failure sending report, suggest e-mail\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\tMain.mainFrame,\r\n\t\t\t\t\t\t\t\t\"Unable to deliver message: \" + error + \"\\n\\nEmail \" + Config.get(\"email\"),\r\n\t\t\t\t\t\t\t\t\"Unable to deliver message\", JOptionPane.ERROR_MESSAGE);\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\t\tsendingThread = null;\r\n\t\t\t}",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n processRequest(request, response);\r\n } catch (MessagingException ex) {\r\n Logger.getLogger(Controlador.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"@Override\n\tpublic String requestedProcess(HttpServletRequest request, HttpServletResponse response) throws Throwable {\n\t\trequest.setCharacterEncoding(\"utf-8\");\n\t\tresponse.setCharacterEncoding(\"utf-8\");\n\t\t\n\t\tString email = request.getParameter(\"email\");\n\t\tSystem.out.println(\"idCheckAction>>> email : \"+email);\n\t\t\n\t\tuserDAO dataMgr = new userDAO();\n\t\tboolean emailChecker = dataMgr.proc_emailChecker(email);\n\t\trequest.setAttribute(\"emailChecker\", emailChecker);\n\t\t\n\t\treturn \"/mgr_account/idCheck.jsp\";\n\t}",
"public EmailAddNoSendServlet() {\r\n\t\tsuper();\r\n\t}",
"@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n resp.setContentType(\"text/html\");\n\n\n messageSender.sendMessage(\"message from servlet at \"+(new Date()));\n\n Writer writer = resp.getWriter();\n\n writer.write(\"<html lang=\\\"en\\\">\"\n + \"<head><title>Sin's servlet</title></head>\");\n\n writer.write(\"Hello world! >> now is\"+(new Date()));\n\n writer.write(\" <br><B> HistoryService is \"+(historyService==null?\" is NULL \":historyService.checkEM() )+\" </B><br>\");\n writer.write(\" <br><B> MesageSender is \"+(messageSender==null?\" is NULL \":messageSender.checkBean() )+\" </B><br>\");\n writer.write(\" <br>Messages</B><br>\");\n\n for(String message : messageList){\n writer.write(\" <br>\"+message);\n }\n writer.write(\" <br>end</B><br>\");\n\n\n writer.write(\"End of properties \"+(new Date()));\n writer.write(\"</body></html>\");\n writer.close();\n }",
"@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\ttry {\n\t\t\tprocessRequest(request, response);\n\t\t} catch (NamingException ex) {\n\t\t\tLogger.getLogger(u_SendMessage.class.getName()).log(Level.SEVERE, null, ex);\n\t\t} catch (SQLException ex) {\n\t\t\tLogger.getLogger(u_SendMessage.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String lid = request.getParameter(\"lid\");\n String nic = request.getParameter(\"nic\");\n String onic = request.getParameter(\"onic\");\n String pname = request.getParameter(\"pname\");\n \n Connection conn;\n Statement stat;\n ResultSet rs,rs2;\n String sql,sql2,sql3;\n \n Connections reg = new Connections();\n reg.Connect();\n conn = reg.con;\n stat = reg.qry;\n \n sql = \"UPDATE lost set FNIC='\"+nic+\"', isFound = 1 WHERE LID = '\"+lid+\"'\";\n try {\n stat.executeUpdate(sql);\n } catch (SQLException ex) {\n Logger.getLogger(found.class.getName()).log(Level.SEVERE, null, ex);\n }\n sql3 = \"SELECT Name, Email, City from users where NIC = '\"+nic+\"' \";\n String FName = \"\", FEmail = \"\" , FCity = \"\";\n String OName = \"\", OEmail = \"\" , OCity = \"\";\n try {\n rs = stat.executeQuery(sql3);\n if(rs.next()){\n FName = rs.getString(\"Name\");\n FEmail = rs.getString(\"Email\");\n FCity = rs.getString(\"City\");\n }\n } catch (Exception ex) {\n \n Logger.getLogger(found.class.getName()).log(Level.SEVERE, null, ex);\n }\n sql2 = \"SELECT Name, Email, City from users where NIC = '\"+onic+\"' \";\n \n try {\n rs2 = stat.executeQuery(sql2);\n if(rs2.next()){\n OName = rs2.getString(\"Name\");\n OEmail = rs2.getString(\"Email\");\n } \n \n String msg = \"Dear \" + OName + \",your lost pet \" +pname+ \" was found by our member \" + FName + \" from\" + FCity + \".\\nYou can connect via Email \" + FEmail + \" !\";\n \n SimpleMail mail = new SimpleMail();\n mail.sendmail(OEmail, msg);\n response.sendRedirect(request.getContextPath() + \"/userEvents.jsp\");\n \n } catch (SQLException ex) {\n Logger.getLogger(found.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n Utente passLessUser;\r\n String email = request.getParameter(\"email\");\r\n\r\n try {\r\n if (CheckUtils.checkEmail(email)\r\n && (passLessUser = userDao.findById(Utente.class, email)) != null) {\r\n\r\n EmailManager eManager =\r\n new EmailManager(SMTP_SERVER, SMTP_PORT, EMAIL_NOREPLY, NAME_NOREPLY);\r\n eManager.setAccessEmail(ACCESS_EMAIL);\r\n eManager.setAccessPassword(ACCESS_PASSWORD);\r\n Authenticator auth = eManager.getAuthenticator();\r\n Properties props = eManager.setUpProperties(true);\r\n MimeMessage message =\r\n eManager.setUpMessage(props, auth, email, \"Piattaforma Libra - Recupero Password\",\r\n MSG_HEADER + \"<br><p>La password del tuo account è <b>\"\r\n + StringEscapeUtils.escapeHtml(passLessUser.getPassword()) + \"</b></p><br><br>\"\r\n + MSG_FOOTER);\r\n eManager.sendEmail(message);\r\n\r\n response.setStatus(HttpServletResponse.SC_OK);\r\n response.getWriter().write(\"ok\");\r\n response.getWriter().flush();\r\n } else {\r\n response.getWriter().write(\"L'email inserita non e' valida.\");\r\n }\r\n } catch (Exception ex) {\r\n response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\r\n response.getWriter().write(\"Impossibile inviare l'email per il recupero della password\");\r\n response.getWriter().flush();\r\n }\r\n }",
"@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n Long multicastId = new Long(req.getParameter(\"multicastKey\"));\n boolean success = mSender.sendMessage(multicastId);\n if (success) {\n taskDone(resp, multicastId);\n } else {\n retryTask(resp);\n }\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\r\n\t\trequest.setCharacterEncoding(\"utf-8\");//处理乱码\r\n\t\t\r\n\t\tString addressee = request.getParameter(\"addressee\");\r\n\t\tString addresser = request.getParameter(\"addresser\");\r\n\t\tString emailContent = request.getParameter(\"emailContent\");\r\n\t\tString emailTime = request.getParameter(\"emailTime\");\r\n\t\tString emailTheme = request.getParameter(\"emailTheme\");\r\n\t\t\r\n\t\tEmailInfo email = new EmailInfo();\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\temail.setCustomerId(Integer.parseInt(addressee));\r\n\t\t\temail.setUserId(Integer.parseInt(addresser));\r\n\t\t\temail.setEmailContent(emailContent);\r\n\t\t\temail.setEmailState(0);\r\n\t\t\temail.setEmailTheme(emailTheme);\r\n\t\t\temail.setEmailTime(emailTime);\r\n\t\t\t\r\n\t\t\t//业务逻辑\r\n\t\t\tEmailService service = new EmailServiceImpl();\r\n\t\t\tboolean mark = service.add(email);\r\n\t\t\tif(mark){\r\n\t\t\t\trequest.setAttribute(\"info\",\"存放成功\");\r\n\t\t\t}else{\r\n\t\t\t\trequest.setAttribute(\"info\", \"存放失败\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//转发\r\n\t\t\trequest.getRequestDispatcher(\"/view/email/email_save_no_send.jsp\").forward(request, response);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}",
"public void doPost (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\trequest.setCharacterEncoding(\"UTF-8\");\n\t\n\t\tString insurerID = request.getParameter(\"userID\");\n\t\tString insurerFirstName = request.getParameter(\"userName\");\n\t\tString insurerLastName = request.getParameter(\"userFamily\");\n\t\tString insurerEmail = request.getParameter(\"userEmail\");\n\t\tString insurerPass1 = request.getParameter(\"password1\");\n\t\tString insurerPass2 = request.getParameter(\"password2\");\n\t\t\n\t\tSendMail sendMail = new SendMail();\n\t\t\n\t\tMessageDigest m;\n\t\tBigInteger passEncrypt = null;\n\t\ttry {\n\t\t\tm = MessageDigest.getInstance(\"MD5\");\n\t\t\tm.update(insurerPass1.getBytes(), 0, insurerPass1.length());\n\t\t\tpassEncrypt = new BigInteger(1,m.digest());\n\t\t System.out.println(String.format(\"%1$032x\", passEncrypt)); \n\t\t} catch (NoSuchAlgorithmException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\tif(insurerPass1.equals(insurerPass2)) {\n\t\t\tInsurerDAO insUpdate = new InsurerDAOImpl();\n\t\t\ttry {\n\t\t\t\tif(!(insUpdate.searchUserName(insurerID).getInsurerId() == null)) {\n\t\t\t\t\tinsUpdate.update(new Insurer(insurerID, insurerFirstName, insurerLastName, insurerEmail, String.format(\"%1$032x\", passEncrypt)));\n\t\t\t\t\t\n\t\t\t\t\tsendMail.sendMail(insurerID, insurerPass1, insurerEmail);\n\t\t\t\t\t\n\t\t\t\t\tList<Insurer> result = new ArrayList<Insurer>();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tresult.add(insUpdate.searchUserName(insurerID));\n\t\t\t\t\t} catch (InsCorpErrorException e) {\n\t\t\t\t\t\trequest.setAttribute(\"errmsg\", e.toString());\n\t\t\t\t\t\tRequestDispatcher view = request.getRequestDispatcher(\"/AdminPanelErrors.jsp\");\n\t\t\t\t\t\tview.forward(request,response);\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\trequest.setAttribute(\"result\", result);\n\t\t\t\t\tRequestDispatcher rd = getServletContext().getRequestDispatcher(\"/adminPanelViewUser.jsp\");\n\t\t\t\t\trd.forward(request, response);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString errmsg = \"Неуспешна промяна!\";\n\t\t\t\t\trequest.setAttribute(\"errmsg\", errmsg);\n\t\t\t\t\tRequestDispatcher view = request.getRequestDispatcher(\"AdminPanelErrors.jsp\");\n\t\t\t\t\tview.forward(request,response);\n\t\t\t\t}\n\t\t\t} catch (InsCorpErrorException e) {\n\t\t\t\trequest.setAttribute(\"errmsg\", e.toString());\n\t\t\t\tRequestDispatcher view = request.getRequestDispatcher(\"AdminPanelErrors.jsp\");\n\t\t\t\tview.forward(request,response);\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tString errmsg = \"Въведените пароли не са еднакви!\";\n\t\t\trequest.setAttribute(\"errmsg\", errmsg);\n\t\t\tRequestDispatcher view = request.getRequestDispatcher(\"AdminPanelErrors.jsp\");\n\t\t\tview.forward(request,response);\n\t\t}\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n PrintWriter out = response.getWriter();\r\n ServletContext context = request.getServletContext();\r\n Properties siteMap = (Properties) context.getAttribute(\"SITE_MAP\");\r\n String url = (String) siteMap.get(INVALID_PAGE);\r\n\r\n //Get request parameters\r\n String email = request.getParameter(\"email\");\r\n String name = request.getParameter(\"name\");\r\n String password = request.getParameter(\"password\");\r\n try {\r\n AccountDAO dao = new AccountDAO();\r\n boolean isDuplicate = dao.isDuplicate(email);\r\n if (!isDuplicate) {\r\n String sha256Password = SHA256Converter.toSHA256HexString(password);\r\n String authenCode = RandomId.generateId();\r\n AccountDTO dto = new AccountDTO();\r\n dto.setEmail(email);\r\n dto.setPassword(sha256Password);\r\n dto.setName(new String(name.getBytes(\"iso-8859-1\"), \"utf-8\"));\r\n dto.setAuthenCode(authenCode);\r\n boolean register = dao.registerAccount(dto);\r\n if (register) {\r\n SendEmail.sendMail(email, authenCode);\r\n url = (String) siteMap.get(CONFIRM_PAGE);\r\n } else {\r\n request.setAttribute(\"INVALID\", \"Register failed\");\r\n }\r\n } else {\r\n request.setAttribute(\"INVALID\", \"The input email already exists in the system.\");\r\n }\r\n } catch (UnsupportedEncodingException e) {\r\n log(\"Error UnsupportedEncodingException at \" + this.getClass().getName() + \": \" + e.getMessage());\r\n } catch (NoSuchAlgorithmException e) {\r\n log(\"Error NoSuchAlgorithmException at \" + this.getClass().getName() + \": \" + e.getMessage());\r\n } catch (SQLException e) {\r\n log(\"Error SQLException at \" + this.getClass().getName() + \": \" + e.getMessage());\r\n } catch (NamingException e) {\r\n log(\"Error NamingException at \" + this.getClass().getName() + \": \" + e.getMessage());\r\n } catch (RuntimeException e) {\r\n log(\"Error RuntimeException at \" + this.getClass().getName() + \": \" + e.getMessage());\r\n } catch (MessagingException e) {\r\n log(\"Error MessagingException at \" + this.getClass().getName() + \": \" + e.getMessage());\r\n } finally {\r\n RequestDispatcher rd = request.getRequestDispatcher(url);\r\n rd.forward(request, response);\r\n out.close();\r\n }\r\n }",
"public void sendMail() {\n String email = emailID.getText().toString();\n String subject = \"BlueBucket One-Time OTP\";\n otp=generateOTP();\n String message = \"\"+otp;\n\n //Creating SendMail object\n SendMail sm = new SendMail(this, email, subject, message);\n\n //Executing sendmail to send email\n sm.execute();\n }",
"void send(String emailName, Map model);",
"public String sendEmail() {\n String to = theModel.getEmail();\n\n // Sender's email ID needs to be mentioned\n String from = \"[email protected]\";\n\n // Assuming you are sending email from this host\n String host = \"smtp.gmail.com\";\n\n // Get system properties\n Properties properties = System.getProperties();\n\n // Setup mail server\n properties.setProperty(\"mail.smtp.host\", host);\n properties.setProperty(\"mail.smtp.starttls.enable\", \"true\");\n properties.setProperty(\"mail.smtp.auth\", \"true\");\n properties.setProperty(\"mail.smtp.port\", \"587\");\n // Get the default Session object.\n Session session = Session.getInstance(properties, new javax.mail.Authenticator() {\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(\"[email protected]\", \"itkstuadmin\");\n }\n });\n\n try {\n // Create a default MimeMessage object.\n MimeMessage message = new MimeMessage(session);\n\n // Set From: header field of the header.\n message.setFrom(new InternetAddress(from));\n\n // Set To: header field of the header.\n message.addRecipient(Message.RecipientType.TO,\n new InternetAddress(to));\n\n // Set Subject: header field\n message.setSubject( subject, \"text/html\");\n\n // Send the actual HTML message, as big as you like\n message.setContent( text , \"text/html\");\n\n // Send message\n Transport.send(message);\n System.out.println(\"Sent message successfully....\");\n } catch (MessagingException mex) {\n mex.printStackTrace();\n }\n return \"UniLog.xhtml\";\n }",
"void send(String emailName, Map model, EmailPreparator emailPreparator);",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n response.setContentType(\"text/html; charset=UTF-8\");\r\n MensajeDAO m = new MensajeDAO();\r\n String name = request.getParameter(\"name\");\r\n String message = request.getParameter(\"message\");\r\n String message1 = request.getParameter(\"message\");\r\n DateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\r\n \r\n Date date = new Date();\r\n int id_user;\r\n id_user = Integer.parseInt(name);\r\n Mensaje mensaje = new Mensaje(id_user, message, message1, dateFormat.format(date));\r\n System.out.print(\"emojiiiiiiiiiiiiiiiiiiiiiiii\"+mensaje.getEmi_mess());\r\n m.create(mensaje);\r\n \r\n DateFormat dateFormat2 = new SimpleDateFormat(\"HH:mm:ss\");\r\n\r\n mensaje.setTime_mess(dateFormat2.format(date));\r\n\r\n Pusher pusher = new Pusher(\"1188258\", \"814af04f4e0ebcbfa6e4\", \"859c005916df08aa32eb\");\r\n pusher.setCluster(\"us2\");\r\n pusher.setEncrypted(true);\r\n\r\n pusher.trigger(\"chat\", \"new-message\", mensaje.getJsonObject());\r\n\r\n }",
"private void processEmails(ConnectionVO cvo, ActionRequest req) throws ActionException {\n\t\tCampaignMessageSender emailer = new CampaignMessageSender(getAttributes());\n\t\tSiteVO site = (SiteVO) req.getAttribute(Constants.SITE_DATA);\n\t\tRezDoxNotifier notifyUtil = new RezDoxNotifier(site, getDBConnection(), getCustomSchema());\n\n\t\t//not yet approved and we have either a sending member or sending business.\n\t\tif (cvo.getApprovedFlag() == 0 && (!StringUtil.isEmpty(cvo.getSenderMemberId()) || !StringUtil.isEmpty(cvo.getSenderBusinessId()))) {\n\t\t\tsendRequestEmail(cvo, emailer, notifyUtil);\n\n\t\t} else if (cvo.getApprovedFlag() == 1) {\n\t\t\tsendApprovedEmail(cvo, emailer, notifyUtil);\n\n\t\t\t//award 25 points to the members involved in this transaction - we do not award points to businesses.\n\t\t\tRewardsAction ra = new RewardsAction(getDBConnection(), getAttributes());\n\t\t\tif (!StringUtil.isEmpty(cvo.getSenderMemberId()))\n\t\t\t\tra.applyReward(Reward.CONNECT.name(), cvo.getSenderMemberId(), req);\n\t\t\tif (!StringUtil.isEmpty(cvo.getRecipientMemberId()))\n\t\t\t\tra.applyReward(Reward.CONNECT.name(), cvo.getRecipientMemberId(), req);\n\t\t}\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 (MessagingException ex) {\r\n Logger.getLogger(reservation.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"@Override\r\n\tpublic void sendEmails() {\n\t\tSystem.out.println(\"All e-mails sent from e-mail service!\");\r\n\t}",
"public void sendMail(RegistrationData d) {}",
"@RequestMapping(\"/mail\")\n\tpublic String mail() throws MessagingException {\n\t\tmailsender.send(\"[email protected]\", \"A test mail\", \"body of the test mail\");\n\t\t\n\t\treturn \"mail sent by Nawaki to the localhost...........\";//result\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 (MessagingException ex) {\r\n Logger.getLogger(Controlador.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException\n {\n if(URL == null)\n {\n URL = req.getScheme() + \"://\" + req.getServerName() + \":\" + req.getServerPort() + \"/\";\n com.oculussoftware.service.mail.MailService.setURL(URL);\n }//end if\n // Setup the output stream\n res.setContentType(\"text/html\");\n // Set cacheability of the servlet\n if (!cacheable)\n\t res.setHeader(\"Expires\", \"Tues, 01 Jan 1980 00:00:00 GMT\");\n PrintWriter out = res.getWriter();\n SessionSrvc thisSession = SessionSrvc.getSessionSrvc(req);\n boolean lIsExternal = false;\n BrowserKind bk = BrowserKind.ALL;\n if(thisSession != null)\n {\n // Determine if this is an external request\n lIsExternal = thisSession.getGlobalValue(\"EXTRANET_REQUEST\") != null;\n\t IObjectContext context = (IObjectContext) thisSession.getGlobalValue(\"Context\");\n\t // Make sure the user is logged in properly\n\t if (context != null)\n\t {\n\t try\n\t {\n if(!context.getCRM().isLoggedIn(context))\n redirectToLogin(req,res);\n else\n {\n\t\t String strBrowser = (String)thisSession.getGlobalValue(\"Browser\");\n\t\t if (strBrowser != null && strBrowser.equals(\"NETSCAPE\"))\n\t\t\t bk = BrowserKind.NETSCAPE;\n\t\t\t else if(strBrowser != null && strBrowser.equals(\"IE\"))\n\t\t bk = BrowserKind.IE;\n\t\t IHTML thisPage = new HTML(bk);\n\t\t storeParameters(thisSession, req);\n\n\t\t // Only give the servlet implementation the ability to handle information\n\t\t // in the session, create HTML using an IHTML object, and let them know\n\t\t // who is making the request\n\n\t\t thisPage = buildPage(thisSession, thisPage, context, req.getParameter(\"Page\"));\n\n\t\t // Display the IHTML page generated by this servlet.\n\t\t out.println(thisPage);\n }//end else\n\t }\n\t catch(ObjectLockedException e)\n\t {\n\t\t IHTML htm = new HTML(bk);\n\t\t htm.addBody().setOnLoad(\"window.alert('The object you requested has been checked out for edit. \\\\n Please try again later.');parent.location='/system/OculusHtml/Selection.htm';\");\n\t\t out.println(htm); \n\t }\n\t catch(Throwable exp)\n\t {\n\t\t exp.printStackTrace(out);\n com.oculussoftware.service.log.LogService.getInstance().write(exp); \n\t }\n\t }//end if\n\t else\n {\n\t sessionExpired(out,bk, lIsExternal);\n }//end else\n }//end if\n else\n {\n\t sessionExpired(out,bk, lIsExternal);\n }//end else\n out.flush();\n out.close();\n }",
"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 }",
"protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n \tif(\"Submit Request\".equalsIgnoreCase(request.getParameter(\"action\"))){\t\t\t\r\n \t\tSite site = getLoggedOnSite(request);\r\n \t\tUser user = getLoggedOnUser(request);\r\n\r\n\t \tint itemId = Integer.parseInt(request.getParameter(\"itemId\"));\r\n\t \tint numRequested = Integer.parseInt(request.getParameter(\"numberUnits\"));\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tmakeFoodBankRequestDAO.makeFoodBankRequest(itemId, site.getId(), user.getEmail(), numRequested);\r\n\t\t\t\t\r\n\t\t\t\tresponse.getWriter().write((\"Success\"));\t\t\t\r\n\t\t\t\t\r\n\t\t\t} catch (SQLException e) {\t\t\t\t\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tresponse.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.toString());\r\n\t\t\t}\r\n\t\t}\r\n }",
"private void sendEmail(String emailAddress, String subject, String body) {\n\t\t\n\t}",
"public void generateAndSendEmail(EmailSendingParameters emailParameters) throws AddressException, MessagingException {\r\n \r\n\t\t//Step1\t\t\r\n\t\tSystem.out.println(\"Setup Mail Server Properties..\");\r\n\t\tmailServerProperties = System.getProperties();\r\n\t\tmailServerProperties.put(\"mail.smtp.port\", \"587\");\r\n\t\tmailServerProperties.put(\"mail.smtp.auth\", \"true\");\r\n\t\tmailServerProperties.put(\"mail.smtp.starttls.enable\", \"true\");\r\n\t\tSystem.out.println(\"Mail Server Properties have been setup successfully..\");\r\n \r\n\t\t//Step2\r\n\t\tSystem.out.println(\"Get Mail Session..\");\r\n\t\tgetMailSession = Session.getDefaultInstance(mailServerProperties, null);\r\n\t\tgenerateMailMessage = new MimeMessage(getMailSession);\r\n\t\tgenerateMailMessage.addRecipient(Message.RecipientType.TO, new InternetAddress(emailParameters.getEmailReceiverAdress()));\r\n\t\tgenerateMailMessage.setSubject(\"Greetings from Crunchify..\");\r\n\t\tString emailBody = \"EMAIL CONTENT (with html tags)\";\r\n\t\tgenerateMailMessage.setContent(emailBody, \"text/html\");\r\n\t\tSystem.out.println(\"Mail Session has been created successfully..\");\r\n \r\n\t\t//Step3\t\t\r\n\t\tSystem.out.println(\"Get Session\tand Send mail\");\r\n\t\tTransport transport = getMailSession.getTransport(\"smtp\");\r\n\r\n\t\tSystem.out.println(\"Sending message\");\r\n\t\ttransport.connect(/*smtp.gmail.com\", emailReceiverAdress* emailReceiverPassword*/); \r\n\t\ttransport.sendMessage(generateMailMessage, generateMailMessage.getAllRecipients());\r\n\t\tSystem.out.println(\"Message sended properly\");\r\n\t\ttransport.close();\r\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n try (PrintWriter out = response.getWriter()) {\r\n /* TODO output your page here. You may use following sample code. */\r\n out.println(\"<!DOCTYPE html>\");\r\n out.println(\"<html>\");\r\n out.println(\"<head>\");\r\n out.println(\"<title>Servlet AddTaskServlet</title>\"); \r\n out.println(\"</head>\");\r\n out.println(\"<body>\");\r\n out.println(\"<h1>Servlet AddTaskServlet at \" + request.getContextPath() + \"</h1>\");\r\n out.println(\"</body>\");\r\n out.println(\"</html>\");\r\n }\r\n }",
"public static void sendSuccessMail(FormStackInfo info, ServletContext context) throws JSONException, IOException {\n\t\tString title = \"\";\n\t\t\n\t\tif(info.getCourseTitle() != null)\n\t\t\ttitle = \" de <b>\" + info.getCourseTitle() + \"</b>\";\n\t\t\n\t\tSendGrid sendGrid = new SendGrid(\"user\", \"password\");\n\t\tEmail email = new Email();\n\t\t\n\t\tString fileEmails = \"/WEB-INF/emails.txt\";\n\t\tInputStream resourceEmail = context.getResourceAsStream(fileEmails);\n\t\tif(resourceEmail != null)\n\t\t\taddToCompanyEmails(email, resourceEmail);\n\t\temail.addTo(info.getEmail());\n\t\temail.setFrom(\"[email protected]\");\n\t\temail.setFromName(\"Your_Name\");\n\t\temail.setReplyTo(\"[email protected]\");\n\t\temail.setSubject(\"[email protected]\");\n\t\t\n\t\tString fileText = \"/WEB-INF/textemail.txt\";\n\t\tInputStream resourceText = context.getResourceAsStream(fileText);\n\t\tif(resourceText != null){\n\t\t\tString fulltext = extractTextFromFile(resourceText, info, info.getPassword(), title);\n\t\t\temail.setHtml(fulltext);\n\t\t} else {\n\t\t\temail.setHtml(\"<h1>My Message</h1>\");\n\t\t}\n\t\ttry{\n\t\t\tsendGrid.send(email);\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n request.setCharacterEncoding(\"UTF-8\");\n \n HttpSession session = request.getSession();\n \n String totalApartments = request.getParameter(\"apartment_count\");\n String boxPosition = request.getParameter(\"box_position\");\n String energyPoint = request.getParameter(\"point_energy\");\n String note = request.getParameter(\"note\"); \n String exit = request.getParameter(\"exit\");\n String save = request.getParameter(\"save\");\n String status = request.getParameter(\"status\");\n \n if (save != null) { \n rDAO = new ReportDAOImpl();\n tDAO = new TaskDAOImpl();\n long taskId = Long.parseLong(save);\n task = tDAO.getTask(taskId);\n report = new Report();\n report.setReportAddress(task.getAddress());\n report.setTotalApartments(Integer.parseInt(totalApartments));\n report.setBoxPosition(boxPosition);\n report.setPointEnergy(energyPoint);\n report.setNote(note);\n rDAO.insertReport(taskId, report);\n if (\"exec\".equals(status)) {\n task.setTaskStatus(TaskStatusEnum.COMPLETED);\n tDAO.updateStatus(task);\n }\n if (\"cancel\".equals(status)) {\n task.setTaskStatus(TaskStatusEnum.CANCELED);\n tDAO.updateStatus(task);\n } \n session.setAttribute(\"tasks\", tDAO.getAllToExecutor(task.getExecutor()));\n request.setAttribute(\"tasks\", session.getAttribute(\"tasks\")); \n request.getRequestDispatcher(\"/fitter_page/fitter_page.jsp\").forward(request, response); \n } \n if (exit != null) { \n request.setAttribute(\"tasks\", session.getAttribute(\"tasks\")); \n request.getRequestDispatcher(\"/fitter_page/fitter_page.jsp\").forward(request, response); \n }\n }",
"protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tresponse.setContentType(\"text/html\");\n\t\t\n\t\t// Get a reference to the Print Writer\n\t\tPrintWriter out = response.getWriter();\n\t\t\n\t\t// Generate our content\n\t\tout.println(\"<!DOCTYPE html>\");\n\t\tout.println(\"<html lang=\\\"en\\\">\");\n\t\tout.println(\"<head>\");\n\t\tout.println(\" <meta charset=\\\"UTF-8\\\">\");\n\t\tout.println(\" <title>Subscribe</title>\");\n\t\tout.println(\" <link rel=\\\"stylesheet\\\" href=\\\"https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css\\\" integrity=\\\"sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO\\\" crossorigin=\\\"anonymous\\\">\");\n\t\tout.println(\"</head>\");\n\t\tout.println(\"<body>\");\n\t\tout.println(\"<div class=\\\"container\\\">\");\n\t\t\n\t\tout.println(\"<h1>Sign-Up for our Newsletter!</h1>\");\n\t\t\n\t\tif (request.getAttribute(\"subscribed\") == null) {\t\t\t\n\t\t\tout.println(\"<form action=\\\"email\\\" method=\\\"post\\\">\");\n\t\t\tout.println(\" Enter your e-mail: <input type=\\\"text\\\" name=\\\"email\\\"> <br>\");\n\t\t\tout.println(\" <input type=\\\"submit\\\" name=\\\"subitBtn\\\" value=\\\"Sign-Up!\\\">\");\n\t\t\tout.println(\"</form>\");\n\t\t}\n\t\telse {\n\t\t\tout.println(\"<p class=\\\"lead\\\"><code>\" + request.getParameter(\"email\") + \"</code> has been successfully added to our mailing list.</p>\");\n\t\t}\n\t\t\n\t\t\n\t\tout.println(\"</div>\");\n\t\tout.println(\"</body>\");\n\t\tout.println(\"</html>\");\t\n\t}",
"void sendEmail(Job job, String email);",
"@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\n\t\tPrintWriter out = resp.getWriter();\n\t\tresp.setContentType(\"text/html\");\n\t\tEnumeration<String> parametrNames = req.getParameterNames();\n\n\t\twhile (parametrNames.hasMoreElements()) {\n\t\t\tString parameterName = parametrNames.nextElement();\n\n\t\t\tif (\"subjects\".equals(parameterName)) {\n\t\t\t\tString paramValueArr[] = req.getParameterValues(parameterName);\n\n\t\t\t\tString vals = String.join(\",\", paramValueArr);\n\n\t\t\t\tout.println(\"<b>\" + parameterName + \"</b>--\" + vals + \"<br/>\");\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tString paramValue = req.getParameter(parameterName);\n\n\t\t\tout.println(\"<b>\" + parameterName + \"</b>--\" + paramValue + \"<br/>\");\n\t\t}\n\t\t\n\t\tSimpleDateFormat ft = \n\t\t\t new SimpleDateFormat (\"E yyyy.MM.dd 'at' hh:mm:ss.S a zzz\");\n\t\t\n\t\tout.println(\"<b>Form submitted at: </b>\"+ft.format(new Date()));\n\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n StringBuilder errorMesage = new StringBuilder();\r\n //response.setContentType(\"text/html; charset=Windows-1251\");\r\n /* создаем диспетчер перенаправления*/\r\n RequestDispatcher dispatcherLogin = request.getRequestDispatcher(\"/LoginPage.jsp\");\r\n RequestDispatcher dispatcherError = request.getRequestDispatcher(\"/applicationError.jsp\");\r\n String requedUrl;\r\n requedUrl = WebEngine.TASKS_PATH;\r\n try{ \r\n if(request.getParameter(\"action\")!= null){\r\n if (request.getParameter(\"action\").equalsIgnoreCase(\"logout\")){\r\n //нажата кнопка \"выход\"\r\n WebEngine.logout(request);\r\n throw new UserAutentificationException(\"до скорых встреч!\");\r\n } \r\n }\r\n \r\n // попытка авторизации\r\n if (!(request.getMethod().equalsIgnoreCase(\"POST\"))\r\n |(request.getParameter(\"name\") == null)\r\n |(request.getParameter(\"password\") == null)){\r\n throw new UserAutentificationException();\r\n }\r\n WebEngine.autorizzare(request, response);\r\n \r\n //авторизация прошла успешно.загаловок аштмл переадрисация\r\n response.sendRedirect(requedUrl);\r\n \r\n }catch(UserAutentificationException error){\r\n if (dispatcherLogin != null){\r\n request.setAttribute(\"Exception\", error);\r\n dispatcherLogin.forward(request, response);\r\n }\r\n }catch(Exception error){ \r\n if (dispatcherError != null){\r\n request.setAttribute(\"Exception\", error);\r\n dispatcherError.forward(request, response);\r\n }\r\n }\r\n \r\n \r\n \r\n }",
"protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString email = request.getParameter(\"email\");\n\t\tString rawHTML = \"\";\n\t\t\n\t\t//Begin database access\n\t\tConnection conn = null;\n\t\tPreparedStatement ps = null;\n\t\tPreparedStatement ps2 = null;\n\t\tPreparedStatement ps3 = null;\n\t\tResultSet rs = null;\n\t\tResultSet rs2 = null;\n\t\tResultSet rs3 = null;\n\t\tresponse.setContentType(\"text/html\");\n\t\tPrintWriter out = response.getWriter();\n\t\t\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost/db?user=root&password=password&useSSL=false&useLegacyDatetimeCode=false&serverTimezone=UTC&allowPublicKeyRetrieval=true\");\n\t\t\t\n\t\t\t//Check if email already exists in our database\n\t\t\tps = conn.prepareStatement(\"SELECT * FROM Users WHERE email=?\");\n\t\t\tps.setString(1, email);\n\t\t\trs = ps.executeQuery();\n\t\t\trs.next();\n\t\t\tint uID = rs.getInt(\"userID\");\n\t\t\t\n\t\t\t//now we have uID and email\n\t\t\t//need to retrieve notes and make a table for the sidebar (1 column)\n\t\t\t\n\t\t\t//First, retrieve fileIDS for user from Access table\n\t\t\tps2 = conn.prepareStatement(\"SELECT * FROM Access WHERE userID=?\");\n\t\t\tps2.setString(1, Integer.toString(uID));\n\t\t\trs2 = ps2.executeQuery();\n\t\t\t\n\t\t\t//Declare list to hold fileIDS\n\t\t\tArrayList<Integer> fileID = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> aFileID = new ArrayList<Integer>();\n\t\t\tArrayList<String> fileName = new ArrayList<String>();\n\t\t\t\t\n\t\t\twhile (rs2.next()) {\n\t\t\t\tfileID.add(rs2.getInt(\"fileID\"));\n\t\t\t}\n\t\t\t \n\t\t\t\n\t\t\t//Next, retrieve files from DB that match fileIDs\n\t\t\tString statement3 = \"SELECT * FROM Files WHERE fileID in \";\n\t\t\tstatement3 +=\"(\";\n\t\t\tint i = 0;\n\t\t\t\n\t\t\t//HANDLE IF NO FILES IN THE DATABASE!!!!!\n\t\t\tif (fileID.size() == 0) {\n\t\t\t\trawHTML+=(\"<table class=\\\"table table-bordered table-dark table-hover\\\">\");\n\t\t\t\trawHTML+=(\"<tbody></tbody></table>\");\n\t\t\t\tout.print(rawHTML);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (fileID.size() > 1) {\n\t\t\t\t\twhile (i < fileID.size()) {\n\t\t\t\t\t\tstatement3+=fileID.get(i) + \",\";\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstatement3+=fileID.get(0) + \")\";\n\t\t\t\t}\n\t\t\t\tif (fileID.size() > 0) {\n\t\t\t\t\tif (fileID.size() > 1) {\n\t\t\t\t\t\tstatement3 += fileID.get(i-i) + \");\";\n\t\t\t\t\t}\n\t\t\t\t\tps3 = conn.prepareStatement(statement3);\n\t\t\t\t\trs3 = ps3.executeQuery();\n\t\t\t\t\twhile (rs3.next()) {\n\t\t\t\t\t\taFileID.add(rs3.getInt(\"fileID\"));\n\t\t\t\t\t\tfileName.add(rs3.getString(\"fileName\"));\n\t\t\t\t\t}\n\t\t\t\t\trawHTML+=(\"<table class=\\\"table table-bordered table-dark table-hover\\\">\");\n\t\t \trawHTML+=(\"<tbody>\");\n\t\t \t\n\t\t \t// populate files found in database\n\t\t\t\t\tfor (int j = 0; j < fileName.size(); j++) {\n\t\t\t\t\t\t// truncate the displayed filename if it's too long\n\t\t\t\t\t\tString truncFile = fileName.get((j));\n\t\t\t \tint cutOff = 15;\n\t\t\t \tif (truncFile.length() > cutOff) {\n\t\t\t \t\ttruncFile = truncFile.substring(0, cutOff) + \"...\";\n\t\t\t \t}\n\t\t \t\t//names\n\t\t\t \trawHTML+=(\"<tr>\");\n\t\t\t \tString trashButton = \"<div class=\\\"ml-auto mr-3\\\"><button type=\\\"button\\\" class=\\\"delete-button d-none btn btn-outline-danger ml-auto\\\" onclick=\\\"handleDeletePopover(this, \" + aFileID.get(j) + \" )\\\" ><i class=\\\"fas fa-trash-alt\\\"></i></button></div>\";\n\t\t\t \tString fileNameTag = \"<div class=\\\"\\\"><span class=\\\"mr-auto\\\">\" + truncFile + \"</span></div>\";\n\t\t\t \trawHTML+=(\"<td onclick=\\\"loadFile('\" + aFileID.get(j) + \"')\\\" style=\\\"cursor: pointer;\\\" class=\\\"file-table-row row\\\">\" + fileNameTag + trashButton + \"</td>\");\n\t\t\t \trawHTML+=(\"</tr>\");\n\t\t\t\t\t}\n\t\t\t\t\trawHTML+=(\"</tbody></table>\");\n\t\t\t\t\tout.print(rawHTML);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch(SQLException sqle) {\n\t\t\tSystem.out.println(\"sqle IN GETFILES: \" + sqle.getMessage());\n\t\t} catch(ClassNotFoundException cnfe) {\n\t\t\tSystem.out.println(\"cnfe: \" + cnfe.getMessage());\n\t\t} finally {\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\tif(ps!=null) {\n\t\t\t\t\tps.close();\n\t\t\t\t}\n\t\t\t\tif(ps2!=null) {\n\t\t\t\t\tps2.close();\n\t\t\t\t}\n\t\t\t\tif(ps3!=null) {\n\t\t\t\t\tps3.close();\n\t\t\t\t}\n\t\t\t\tif(rs!=null) {\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t\tif(rs2!=null) {\n\t\t\t\t\trs2.close();\n\t\t\t\t}\n\t\t\t\tif(rs3!=null) {\n\t\t\t\t\trs3.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException sqle) {\n\t\t\t\tSystem.out.println(\"sqle closing stream:-\" + sqle.getMessage());\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException \r\n\t{\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tString userType = request.getParameter(\"type\");\r\n\t\t\t\r\n\t\t\tUser_Factory userFactory = new User_Factory();\r\n\t\t\tLogin_Access_User user = userFactory.getUserObject(userType);\r\n\t\t\tString sFName = request.getParameter(\"fname\");\r\n\t\t\tString sLName = request.getParameter(\"lname\");\r\n\t\t\tuser.setsFName(sFName);\r\n\t\t\tuser.setsLName(sLName);\r\n\t\t\tString sUserEmail = request.getParameter(\"email\");\r\n\t\t\tuser.setsEmail(sUserEmail);\r\n\t\t\tuser.setsMobile(request.getParameter(\"mobile\"));\r\n\t\t\tuser.setsUserType(userType);\r\n\t\r\n\t\t\tString sItuId = request.getParameter(\"ituId\");\r\n\t\t\tuser.setITUid(sItuId);\r\n\t\t\tString[]courseArr = request.getParameterValues(\"course\");\r\n\t\t\t\r\n\t\t\tif(courseArr!=null && courseArr.length > 0)\r\n\t\t\t{\r\n\t\t\t\tArrayList<String> courseList = new ArrayList<>(Arrays.asList(courseArr));\r\n\t\t\t\tuser.setCourseList(courseList);\r\n\t\t\t}\r\n\t\t\t//Add the new user to the database & Send Email Notification to the newly created user.\r\n\t\t\tif(Constants.Status.SUCCESS == admin.addUsers(user))\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tString sSubject =\"Your ITU E-Appointment Account has been created\";\r\n\t\t\t\tString sContent = \"Hello \"+ sFName+\" \"+sLName +\",<br><br>\" +\r\n\t\t\t\t\t\" Your E-Appointment Login has been created. Following are your credentials.<br>\"\r\n\t\t\t\t\t+ \"<b>UserName: </b>\"+sUserEmail+\"<br>\"\r\n\t\t\t\t\t+ \"<b>Temporary Password: </b>\"+ user.getsPassword() +\"<br>\"\r\n\t\t\t\t\t+\"<br>\"\r\n\t\t\t\t\t+\"<b>Note:</b> Please change your password once you login to E-Appointment System.\"\r\n\t\t\t\t\t+\"<br><br><br> Regards,<br>ITU Appointment Team\";\r\n\t\t\t\t\r\n\t\t\t\tJavaEmailSender email = new JavaEmailSender();\r\n\t\t\t\t//Sending an Email Notification.\r\n\t\t\t\temail.createAndSendEmail(sUserEmail, sSubject, sContent);\r\n\t\t\t\t\r\n\t\t\t\tArrayList<Login_Access_User> arr = new ArrayList<>();\r\n\t\t\t\tarr.add(user);\r\n\t\t\t\t//Send it to the client in the json format.\r\n\t\t\t\tString json = new Gson().toJson(arr);\r\n\r\n\t\t\t\tresponse.setContentType(\"application/json\");\r\n\t\t\t\tresponse.setCharacterEncoding(\"UTF-8\");\r\n\t\t\t\tresponse.getWriter().write(json);\r\n\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (SQLException ex) \r\n\t\t{\r\n\t\t\tLogger.getLogger(AddUser.class.getName()).log(Level.SEVERE, null, ex);\r\n\t\t}\r\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n response.setContentType(\"text/plain;charset=UTF-8\");\r\n PrintWriter out = response.getWriter();\r\n try {\r\n log(\"caller=\"+request.getParameter(\"id\"));\r\n /* TODO output your page here. You may use following sample code. */\r\n out.println(\"id=\"+request.getParameter(\"id\"));\r\n out.println(\"block=\"+request.getParameter(\"block\"));\r\n out.println(\"sendTime=\"+request.getParameter(\"sendTime\"));\r\n out.println(\"receivedTime=\"+Calendar.getInstance().getTimeInMillis());\r\n// out.println(\"Received Time:\"+SimpleDateFormat.getTimeInstance(DateFormat.LONG).format(Calendar.getInstance().getTime()));\r\n out.println(\"Received Time:\"+String.format(\"%1$tH:%1$tM:%1$tS,%1$tL\", Calendar.getInstance().getTime()));\r\n \r\n if (request.getParameter(\"sendTime\") != null && NumberUtils.isNumber(request.getParameter(\"sendTime\"))) {\r\n// out.println(\"Send Time:\"+SimpleDateFormat.getTimeInstance(DateFormat.LONG).format(new Date(Long.valueOf(request.getParameter(\"sendTime\")))));\r\n out.println(\"Send Time:\"+String.format(\"%1$tH:%1$tM:%1$tS,%1$tL\", new Date(Long.valueOf(request.getParameter(\"sendTime\")))));\r\n }\r\n long pause = 0;\r\n if (request.getParameter(\"block\") != null && NumberUtils.isNumber(request.getParameter(\"block\"))) {\r\n pause = Long.valueOf(request.getParameter(\"block\"));\r\n }\r\n \r\n if (pause == 0) {\r\n pause = 2500;\r\n }\r\n try {\r\n Thread.currentThread().sleep(pause);\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(test.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n// out.println(\"Response Time:\"+SimpleDateFormat.getTimeInstance(DateFormat.LONG).format(Calendar.getInstance().getTime()));\r\n out.println(\"Response Time:\"+String.format(\"%1$tH:%1$tM:%1$tS,%1$tL\", Calendar.getInstance().getTime()));\r\n out.println(\"responseTime=\"+Calendar.getInstance().getTimeInMillis());\r\n out.println(\"responseTime=\"+Calendar.getInstance().getTimeInMillis());\r\n out.println(\"thread=\"+Thread.currentThread().getName());\r\n \r\n } finally { \r\n out.close();\r\n }\r\n }",
"public void enviarCorreo() {\n try {\n\n // propuestaConvenio = propuestaConvenioService.getByIDPropuestaWithPersona(propuestaConvenio.getIdPropuesta());\n propuestaConvenio = propuestaConvenioService.getByIDPropuestaWithPersona(propuestaConvenio.getIdPropuesta());\n\n // Create data for template\n Map<String, Object> templateData = new HashMap<String, Object>();\n templateData.put(\"subJect\", \"Cambio Vigencia de Convenio\");\n\n //templateData.put(\"nameTemplate\", \"propuesta_convenio_mailTemplat.txt\");\n templateData.put(\"nameTemplate\", \"vigencia_convenio_mailTemplat.xhtml\");\n templateData.put(\"propuestaConvenio\", propuestaConvenio);\n templateData.put(\"propuestaConvenioTemp\", propuestaConvenioTemp);\n\n for (PersonaPropuesta p : propuestaConvenio.getPersonaPropuestaList()) {\n templateData.put(\"setToMail\", p.getPersona().getEmailPersona());\n mailService.sendEmailMap(templateData);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void submitRequest()\n\t{\n\t\ttry\n\t\t{\n\t\t\tchangeControlState(false);\n\t\t\tlblStatus.setText(\"Sending Request...\");\n\t\t\tnew Thread(new Runnable()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tMPSWebRequest mpswr = new MPSWebRequest(mWSURL);\n\t\t\t\t\t\tmpswr.addParameter(\"tran\", taDSIXML.getText()); //Set WebServices 'tran' parameter to the XML transaction request\n\t\t\t\t\t\tmpswr.addParameter(\"pw\", \"XYZ\"); //Set merchant's WebServices password\n\t\t\t\t\t\tmpswr.setWebMethodName((String)cmbWebMethod.getSelectedItem()); //Set WebServices webmethod to selected type\n\t\t\t\t\t\tmpswr.setTimeout(10); //Set request timeout to 10 seconds\n\t\t\t\t\t\t\n\t\t\t\t\t\tString mpsResponse = mpswr.sendRequest();\n\t\t\t\t\t\tlblStatus.setText(\"\");\n\t\t\t\t\t\tshowPopup(\"Response XML String\",mpsResponse.replace(\">\\t\", \">\\n\\t\"));\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e)\n\t\t\t\t\t{\n\t\t\t\t\t\tshowPopup(\"Exception\", e.toString());\n\t\t\t\t\t}\n\t\t\t\t\tfinally\n\t\t\t\t\t{\n\t\t\t\t\t\tlblStatus.setText(\"\");\n\t\t\t\t\t\tchangeControlState(true);\n\t\t\t\t\t\t@SuppressWarnings(\"unused\") // Properly disposing of current thread\n\t\t\t\t\t\tThread curthread = Thread.currentThread();\n\t\t\t\t\t\tcurthread = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}).start();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tshowPopup(\"Exception\", e.toString());\n\t\t}\n\t}",
"@Override\n\tprotected void send(ServletWebRequest request, ValidateCode validateCode) throws Exception {\n\t\tString mobile= ServletRequestUtils.getRequiredStringParameter(request.getRequest(),\"mobile\");\n\t\tsmsCodeSender.send(mobile, validateCode.getCode());\n\t}",
"private void sendEmailToSubscriberForHealthTips() {\n\n\n\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n HttpTransport HTTP_TRANSPORT = new NetHttpTransport();\r\n JsonFactory JSON_FACTORY = new JacksonFactory();\r\n HttpRequestFactory requestFactory\r\n = HTTP_TRANSPORT.createRequestFactory(new HttpRequestInitializer() {\r\n @Override\r\n public void initialize(HttpRequest request) {\r\n request.setParser(new JsonObjectParser(JSON_FACTORY));\r\n }\r\n });\r\n\r\n GenericUrl url = new GenericUrl(\"https://openbus.emtmadrid.es:9443/emt-proxy-server/last/geo/GetArriveStop.php\");\r\n\r\n GenericData data = new GenericData();\r\n data.put(\"idClient\",\"[email protected]\");\r\n data.put(\"passKey\", \"3C162353-56FE-4572-9FB4-ED7D2D79E58E\");\r\n data.put(\"idStop\", \"3727\");\r\n\r\n HttpRequest requestGoogle = requestFactory.buildPostRequest(url, new UrlEncodedContent(data));\r\n\r\n\r\n GenericJson json = requestGoogle.execute().parseAs(GenericJson.class);\r\n\r\n \r\n ArrayList arrives = (ArrayList) json.get(\"arrives\");\r\n request.setAttribute(\"llegadas\", arrives);\r\n //para jsp\r\n //request.getRequestDispatcher(\"pintaremt.jsp\").forward(request, response);\r\n //para freemarker\r\n try {\r\n HashMap root = new HashMap();\r\n \r\n //root.put(\"content\",\"hola\");\r\n root.put(\"llegadas\",arrives);\r\n Template temp = Configuration.getInstance().getFreeMarker().getTemplate(\"Freebus.ftl\");\r\n temp.process(root, response.getWriter());\r\n } catch (TemplateException ex) {\r\n Logger.getLogger(GoogleHttpConsumingApi.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n\r\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException, NoSuchAlgorithmException, NoSuchProviderException, InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException\r\n {\r\n String message = request.getParameter(DATA_NAME);\r\n message = getPlainText(message);\r\n PrintWriter out = response.getWriter();\r\n out.print(prepareEnrcyptedJSONMessage(message)); \r\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n \r\n String nombre = request.getParameter(\"nombre\");\r\n String correo = request.getParameter(\"correo\");\r\n String asunto = request.getParameter(\"asunto\");\r\n String mensaje = request.getParameter(\"mensaje\");\r\n String fecha = request.getParameter(\"fecha\");\r\n \r\n Contacto contacto = new Contacto();\r\n contacto.setNombre(nombre);\r\n contacto.setCorreo(correo);\r\n contacto.setAsunto(asunto);\r\n contacto.setMensaje(mensaje);\r\n contacto.setFecha(fecha);\r\n\r\n boolean isActualizado = ServicioContacto.getInstancia().CrearMensaje(contacto);\r\n\r\n if (isActualizado) {\r\n response.sendRedirect(\"index.jsp\");\r\n } else {\r\n response.sendRedirect(\"front-end/contacto.jsp\");\r\n }\r\n \r\n }",
"@Override\r\n public void run() {\r\n Properties smtpProperties = System.getProperties();\r\n smtpProperties.put(\"mail.smtp.port\", \"587\");\r\n smtpProperties.put(\"mail.smtp.auth\", \"true\");\r\n smtpProperties.put(\"mail.smtp.starttls.enable\", \"true\");\r\n try {\r\n Session smtpSession = Session.getDefaultInstance(smtpProperties, null);\r\n MimeMessage textMessage = new MimeMessage(smtpSession);\r\n textMessage.addRecipient(Message.RecipientType.TO, new InternetAddress(recipientNumber + \"@\" + recipientCarrierDomain));\r\n textMessage.setContent(messageContent, \"text/plain\");\r\n Transport transport = smtpSession.getTransport(\"smtp\");\r\n transport.connect(\"smtp.gmail.com\", \"[email protected]\", \"csd@VT-1872\");\r\n transport.sendMessage(textMessage, textMessage.getAllRecipients());\r\n transport.close();\r\n } catch (AddressException ae) {\r\n System.out.println(\"Email Address Exception Occurred! See: \" + ae.getMessage());\r\n } catch (MessagingException me) {\r\n System.out.println(\"Email Messaging Exception Occurred! Internet Connection Required! See: \" + me.getMessage());\r\n }\r\n }",
"@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException,\n IOException {\n String mail = req.getParameter(\"mail\");\n UserDAO ud = new UserDAO();\n if (mail.matches(\n \"^[a-zA-Z][\\\\w\\\\.!#$%&'*+/=?^_`{|}~-]+@([a-zA-Z]\\\\w+\\\\.)+[a-z]{2,5}$\")\n && ud.doRetrieveByMail(mail) == null) {\n resp.getWriter().println(\"<ok/>\");\n } else {\n resp.getWriter().println(\"<notOk/>\");\n }\n resp.flushBuffer();\n }",
"public void sendMail() {\n String sub;\n String message;\n\n sub = \"Welcome\";\n message = \"Thank you for choosing us as your healthcare partners. Here we strive hard to ensure that\\n\"\n + \"you remain in good health. Not only we boast of an exellent team of doctors but also world class operational \\n\"\n + \"infrastructure in place. For any other information or details contact our reg desk. You can access\\n\"\n + \"your account with the Username:\" + txtUserName.getText()+ \"and your password:\" + txtPassword.getPassword().toString()+ \".\\n\\t\\t\\t -Team MVP\";\n\n SendEmail SE = new SendEmail(txtEmail.getText(), sub, message);\n }",
"public void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n EmailMessage msg = new EmailMessage();\n msg.sendPageAccesser(request.getRemoteAddr());\n getServletContext().getRequestDispatcher(\"/lander.jsp\").forward(request, response);\n\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n try {\n \n String id = request.getParameter(\"id\");\n String name = request.getParameter(\"name\");\n String username = request.getParameter(\"username\");\n String mailbox = request.getParameter(\"mailbox\");\n String context = request.getParameter(\"context\");\n String type = request.getParameter(\"type\");\n String host = request.getParameter(\"host\");\n \n //VoipLigneDAO.insert(id, name, host, type, context,\"rfc2833\",\"en\", mailbox, host, username);\n \n out.println(\"enregistrement effectué!<br/>\");\n out.println(\"<a href=\\\"./userManagement.jsp\\\"></a>\");\n\n } finally { \n out.close();\n }\n }",
"public void testProcessReturnedMail() throws Exception {\n \n logln(\"\\n==== Process Returned Mail ====\\n\");\n \n //login\n loginAFSCME();\n \n //go to the 'Process Returned Mail' page.\n selectLink(\"Process Returned Mail\");\n \n //fill in the parameters\n setParameter(\"addressIds\", \"120\\n221\" );\n \n submit(\"submit\");\n //logout\n selectLink(\"LOGOUT\");\n }",
"@Override\n public void sendEmail() {\n return;\n }",
"public void send() {\n\t\tfinal String username = \"[email protected]\";\n\t\tfinal String password = \"Oneplanner2017*\";\n\n\t\tProperties props = new Properties();\n\t\tprops.put(\"mail.smtp.auth\", \"true\");\n\t\tprops.put(\"mail.smtp.starttls.enable\", \"true\");\n\t\tprops.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n\t\tprops.put(\"mail.smtp.port\", \"587\");\n\n\t\ttry {\n\t\t\tSession session = Session.getInstance(props,\n\t\t\t\t\t new javax.mail.Authenticator() {\n\t\t\t\t\t\tprotected PasswordAuthentication getPasswordAuthentication() {\n\t\t\t\t\t\t\treturn new PasswordAuthentication(username, password);\n\t\t\t\t\t\t}\n\t\t\t\t\t });\n\n\t\t\t\t\tMessage message = new MimeMessage(session);\n\t\t\t\t\tmessage.setFrom(new InternetAddress(\"[email protected]\"));\n\t\t\t\t\tmessage.setRecipients(Message.RecipientType.TO,\n\t\t\t\t\t\tInternetAddress.parse(\"[email protected]\"));\n\t\t\tmessage.setSubject(\"test\");\n\t\t\tmessage.setText(\"test\");\n\t\t\t\n\t\t\tTransport.send(message);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n }",
"private void sendEmail() {\n String to = \"[email protected]\";\n\n // Sender's email ID needs to be mentioned\n String from = \"[email protected]\";\n\n // Assuming you are sending email from localhost\n String host = \"localhost\";\n\n // Get system properties\n Properties properties = System.getProperties();\n\n // Setup mail server\n properties.setProperty(\"mail.smtp.host\", host);\n\n // Get the default Session object.\n Session session = Session.getDefaultInstance(properties);\n\n try {\n // Create a default MimeMessage object.\n MimeMessage message = new MimeMessage(session);\n\n // Set From: header field of the header.\n message.setFrom(new InternetAddress(from));\n\n // Set To: header field of the header.\n message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));\n\n // Set Subject: header field\n message.setSubject(\"This is the Subject Line!\");\n\n // Now set the actual message\n message.setText(\"This is actual message\");\n\n // Send message\n Transport.send(message);\n System.out.println(\"Sent message successfully....\");\n } catch (MessagingException mex) {\n mex.printStackTrace();\n }\n }",
"@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n // processRequest(request, response);\n final OutPass p=new OutPass();\n p.setRollno(request.getParameter(\"rollno\"));\n p.setReason(request.getParameter(\"reason\"));\n p.setFrom(request.getParameter(\"from\"));\n p.setTill(request.getParameter(\"till\"));\n p.setStatus(request.getParameter(\"status\")); \n boolean res=p.insert();\n //System.err.println(p.getStatus().equals(\"Accepted\"));\n \n // System.err.println(res);\n if(p.getStatus().equals(\"Accepted\")&&res){\n final General.OutPass op = new General.OutPass(p.getRollno());\n new Thread(new Runnable(){\n \n @Override\n public void run(){\n if(op.insert(p.getRequestid())){\n if(Student.getById(p.getRollno()).getAccomodation().equalsIgnoreCase(\"hostel\"))\n SMSTemplate.send(Parent.getNumber(p.getRollno()),p.getSMSContent());\n }\n }\n }).start();\n }\n \n if(res)\n response.sendRedirect(\"hostel/requests.jsp?msg=done\");\n }",
"public void execute() {\n //this.$context.$Request.initialize();\n this.$context.$Request.extractAllVars();\n\n this.$context.$Response.writeHeader(\"Content-type\", \"text/html; charset=UTF-8\");\n\n // Check security code\n if (!this.$context.$Request.contains(\"code\")) {\n this.$context.$Response.end(\"Code is required!\");\n return;\n }\n String $code = this.$context.$Request.get(\"code\");\n if (!EQ($code, Config.SECURITY_CODE)) {\n this.$context.$Response.end(\"Incorrect code!\");\n return;\n }\n\n // Check package\n if (!this.$context.$Request.contains(\"package\")) {\n this.$context.$Response.end(\"Package is required!\");\n return;\n }\n String $package = this.$context.$Request.get(\"package\");\n if (BLANK($package)) {\n this.$context.$Response.end(\"Empty package!\");\n return;\n }\n String[] $packageChunks = Strings.split(\"-\", $package);\n for (int $n = 0; $n < SIZE($packageChunks); $n++)\n $packageChunks[$n] = Strings.firstCharToUpper($packageChunks[$n]);\n $package = Strings.join(\"/\", $packageChunks);\n\n // Check class\n if (!this.$context.$Request.contains(\"class\")) {\n this.$context.$Response.end(\"Class is required!\");\n return;\n }\n String $className = this.$context.$Request.get(\"class\");\n if (BLANK($className)) {\n this.$context.$Response.end(\"Empty class!\");\n return;\n }\n\n // Check method\n if (!this.$context.$Request.contains(\"method\")) {\n this.$context.$Response.end(\"Method is required!\");\n return;\n }\n String $method = this.$context.$Request.get(\"method\");\n if (BLANK($method)) {\n this.$context.$Response.end(\"Empty method!\");\n return;\n }\n\n // Fill array with parameters\n int $count = 0;\n TArrayList $pars = new TArrayList();\n for (int $n = 1; $n <= 6; $n++) {\n String $parName = CAT(\"par\", $n);\n if (!this.$context.$Request.contains($parName))\n break;\n String $parValue = this.$context.$Request.get($parName);\n if (EQ($parValue, \"_\"))\n $parValue = \"\";\n //$parsArray[] = $parValue;\n $pars.add($parValue);\n $count++;\n }\n\n String $buffer = null;\n Object $result = null;\n\n String $fullClass = CAT($package, \"/\", $className);\n\n $fullClass = Strings.replace(\"/\", \".\", $fullClass);\n TArrayList $pars0 = new TArrayList(new Object[] { this.$context.$Connection });\n $result = Bula.Internal.callMethod($fullClass, $pars0, $method, $pars);\n\n if ($result == null)\n $buffer = \"NULL\";\n else if ($result instanceof DataSet)\n $buffer = ((DataSet)$result).toXml(EOL);\n else\n $buffer = STR($result);\n this.$context.$Response.write($buffer);\n this.$context.$Response.end();\n }",
"public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException\n {\n hubObj = new HubReceivingTables(db);\n out = response.getWriter();\n response.setContentType(\"text/html\");\n HttpSession session = request.getSession();\n\n PersonnelBean personnelBean = (PersonnelBean) session.getAttribute(\"personnelBean\");\n Collection menuItemOvBeanCollection = personnelBean.getMenuItemOvBeanCollection();\n intcmIsApplication = false;\n if (menuItemOvBeanCollection !=null && menuItemOvBeanCollection.size() > 0)\n {\n intcmIsApplication = true;\n }\n\n String branch_plant= session.getAttribute( \"BRANCH_PLANT\" ) == null ? \"\" : session.getAttribute( \"BRANCH_PLANT\" ).toString();\n String personnelid= session.getAttribute( \"PERSONNELID\" ) == null ? \"\" : session.getAttribute( \"PERSONNELID\" ).toString();\n String CompanyID = session.getAttribute( \"COMPANYID\" ) == null ? \"\" : session.getAttribute( \"COMPANYID\" ).toString();\n Receiving_Servlet = bundle.getString(\"HUBRECV_SERVLET_QC\");\n Label_Servlet = bundle.getString(\"LABEL_SERVLET\");\n\n String User_Search = null;\n String User_Action = null;\n String SubUser_Action = null;\n String User_Session = \"\";\n String User_Sort = \"\";\n String generate_labels = \"\";\n String remove_receipt_id = \"\";\n String remove_action = \"\";\n\n generate_labels = request.getParameter(\"generate_labels\");\n if (generate_labels == null)\n generate_labels = \"No\";\n paper_size = request.getParameter(\"paperSize\");\n if (paper_size == null)\n paper_size = \"31\";\n User_Session = request.getParameter(\"session\");\n if (User_Session == null)\n User_Session = \"New\";\n User_Action = request.getParameter(\"UserAction\");\n if (User_Action == null)\n User_Action = \"New\";\n User_Search = request.getParameter(\"SearchField\");\n\t\tif ( User_Search == null )\n\t\t User_Search=\"\";\n\t\tUser_Search=User_Search.trim();\n User_Sort = request.getParameter(\"SortBy\");\n if (User_Sort == null)\n User_Sort = \"1\";\n String SortresultsBy = request.getParameter(\"SortresultsBy\");\n if (SortresultsBy == null)\n SortresultsBy = \"BIN\";\n\n String invengrp=request.getParameter( \"invengrp\" );\n if ( invengrp == null )\n invengrp=\"\";\n invengrp=invengrp.trim();\n\n remove_receipt_id = BothHelpObjs.makeSpaceFromNull(request.getParameter(\"remove_receipt_id\"));\n remove_action = BothHelpObjs.makeSpaceFromNull(request.getParameter(\"removeaction\"));\n\n\t\tthedecidingRandomNumber=request.getParameter( \"thedecidingRandomNumber\" );\n\t\tif ( thedecidingRandomNumber == null )\n\t\t thedecidingRandomNumber=\"\";\n\t\tthedecidingRandomNumber=thedecidingRandomNumber.trim();\n\n\t\tSubUser_Action=request.getParameter( \"SubUserAction\" );\n\t\tif ( SubUser_Action == null )\n\t\t SubUser_Action=\"JSError2\";\n\n\t\tString searchlike=request.getParameter( \"searchlike\" );\n\t\tif ( searchlike == null )\n\t\t{\n\t\t searchlike=\"\";\n\t\t}\n\t\tsearchlike=searchlike.trim();\n\n\t\tString searchfor=request.getParameter( \"searchfor\" );\n\t\tif ( searchfor == null )\n\t\t{\n\t\t searchfor=\"\";\n\t\t}\n\t\tsearchfor=searchfor.trim();\n\t\tif (searchlike.length() == 0 ) {searchlike = \"a.RADIAN_PO\";}\n\n\t\tString printKitLabels=request.getParameter( \"printKitLabels\" );\n\t\tif ( printKitLabels == null )\n\t\t printKitLabels=\"\";\n\n try\n {\n\t\t Random rand=new Random();\n\t\t int tmpReq=rand.nextInt();\n\t\t Integer tmpReqNum=new Integer( tmpReq );\n\n\t Hashtable hub_list_set=new Hashtable();\n\t\t hub_list_set= ( Hashtable ) session.getAttribute( \"HUB_PREF_LIST\" );\n\n\n\t\t if ( ! ( SubUser_Action.equalsIgnoreCase( \"removereceipt\" ) || User_Action.equalsIgnoreCase( \"showterminalstatus\" ) || User_Action.equalsIgnoreCase( \"Unreceive\" ) ) )\n\t\t {\n\t\t\tif ( thedecidingRandomNumber.length() > 0 )\n\t\t\t{\n\t\t\t String randomnumberfromsesion=session.getAttribute( \"RECQCRNDCOOKIE\" ) == null ? \"\" : session.getAttribute( \"RECQCRNDCOOKIE\" ).toString();\n\t\t\t if ( randomnumberfromsesion.equalsIgnoreCase( thedecidingRandomNumber ) )\n\t\t\t {\n\t\t\t\tthedecidingRandomNumber=tmpReqNum.toString();\n\t\t\t\tsession.setAttribute( \"RECQCRNDCOOKIE\",thedecidingRandomNumber );\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\tthedecidingRandomNumber=tmpReqNum.toString();\n\t\t\t\tsession.setAttribute( \"RECQCRNDCOOKIE\",thedecidingRandomNumber );\n\t\t\t\tsession.setAttribute( \"DATA\",new Vector() );\n\t\t\t\t//Hashtable hub_list_set= ( Hashtable ) session.getAttribute( \"HUB_SET\" );\n\t\t\t\tHashtable iniinvendata= ( Hashtable ) session.getAttribute( \"INVENGRP_DATA\" );\n\t\t\t\tVector lot_status_set= ( Vector ) session.getAttribute( \"STATUS_SET\" );\n\t\t\t\tVector expdate_invengrps= ( Vector ) session.getAttribute( \"EXP_ALLOWED_INVENGRP\" );\n\t\t\t\tVector lotstatus_invengrps= ( Vector ) session.getAttribute( \"STATUS_SET_ALLOWED_INVENGRP\" );\n\t\t\t\tVector recqc_invengrps= ( Vector ) session.getAttribute( \"RECQC_ALLOWED_INVENGRP\" );\n\t\t\t\tVector nonpickable_invengrps= ( Vector ) session.getAttribute( \"NON_PICKABLE_INVENGRP\" );\n\n\t\t\t\tbuildHeader( null,hub_list_set,branch_plant,User_Sort,\"\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n\t\t\t\tout.println( \"<BR><BR><CENTER><FONT SIZE=\\\"4\\\" FACE=\\\"Arial\\\" COLOR=\\\"#fc0303\\\"><B>Please Do Not Use The Back Button of The Browser</B><BR> Thanks.</FONT>\" );\n\t\t\t\treturn;\n\t\t\t }\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t thedecidingRandomNumber=tmpReqNum.toString();\n\t\t\t session.setAttribute( \"RECQCRNDCOOKIE\",thedecidingRandomNumber );\n\t\t\t}\n\t }\n\n if ( User_Session.equalsIgnoreCase( \"New\" ) )\n {\n Vector lot_status_set11=radian.web.HTMLHelpObj.createStatusSet( db );\n session.setAttribute( \"STATUS_SET\",lot_status_set11 );\n session.setAttribute( \"HUB_COMPANY_IDS\",radian.web.HTMLHelpObj.createCompanylist( db ) );\n\n //Hashtable hub_list_set=new Hashtable();\n\t\t\tVector expdate_invengrps = new Vector();\n\t\t\tVector lotstatus_invengrps = new Vector();\n\t\t\tVector recqc_invengrps = new Vector();\n\t\t\tVector nonpickable_invengrps = new Vector();\n\t\t\t/*if ( this.getupdateStatus() )\n\t\t\t{\n\t\t\t hub_list_set=radian.web.HTMLHelpObj.createHubList( db,personnelid,CompanyID );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t hub_list_set=radian.web.HTMLHelpObj.createAllHubList( db,CompanyID );\n\t\t\t}*/\n\n\t\t Hashtable initialinvData = new Hashtable ();\n\t\t Hashtable hub_list1= ( Hashtable ) ( hub_list_set.get( \"HUB_LIST\" ) );\n\t\t if (hub_list1.size() > 0)\n\t\t {\n\t\t\t initialinvData=radian.web.poHelpObj.getinvgrpInitialData( db,hub_list_set );\n\t\t\t session.setAttribute( \"INVENGRP_DATA\",initialinvData );\n\t\t }\n\n\t\t\texpdate_invengrps = radian.web.HTMLHelpObj.createvgrpmemlist(db,personnelid,\"ExpUpdate\");\n\t\t\tlotstatus_invengrps = radian.web.HTMLHelpObj.createvgrpmemlist(db,personnelid,\"PickStatusUpd\");\n\t\t\tsession.setAttribute( \"EXP_ALLOWED_INVENGRP\",expdate_invengrps );\n\t\t\tsession.setAttribute( \"STATUS_SET_ALLOWED_INVENGRP\",lotstatus_invengrps );\n\t\t\trecqc_invengrps = radian.web.HTMLHelpObj.createvgrpmemlist(db,personnelid,\"ReceivingQC\");\n\t\t\tsession.setAttribute( \"RECQC_ALLOWED_INVENGRP\",recqc_invengrps );\n\t\t\tnonpickable_invengrps = radian.web.HTMLHelpObj.createvgrpmemlist(db,personnelid,\"onlynonPickableStatus\");\n\t\t\tsession.setAttribute( \"NON_PICKABLE_INVENGRP\",nonpickable_invengrps );\n\n if ( hub_list1.size() < 1 )\n {\n buildHeader( null,hub_list_set,\"\",User_Sort,\"\",SortresultsBy,initialinvData,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n out.println( radian.web.HTMLHelpObj.printHTMLNoFacilities() );\n out.close();\n hub_list_set=null;\n }\n else\n {\n //session.setAttribute( \"HUB_SET\",hub_list_set );\n buildHeader( null,hub_list_set,\"\",User_Sort,\"\",SortresultsBy,initialinvData,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n out.println( radian.web.HTMLHelpObj.printHTMLSelect() );\n out.close();\n hub_list_set=null;\n }\n }\n else if ( ( User_Session.equalsIgnoreCase( \"Active\" ) ) && ( User_Action.equalsIgnoreCase( \"showterminalstatus\" ) ) )\n {\n Vector temp2= ( Vector ) session.getAttribute( \"HUB_COMPANY_IDS\" );\n\n String terminallotstatus =request.getParameter( \"termlotstatus\" );\n if ( terminallotstatus == null )\n terminallotstatus=\"\";\n\n String terlinenumber=request.getParameter( \"terlinenumber\" );\n if ( terlinenumber == null )\n terlinenumber=\"31\";\n\n buildtermiallot(temp2,terminallotstatus,terlinenumber);\n out.close();\n temp2 = null;\n }\n else if ( ( User_Session.equalsIgnoreCase( \"Active\" ) ) && ( User_Action.equalsIgnoreCase( \"Unreceive\" ) ) )\n {\n previousReceiving obj3=new previousReceiving( bundle,db );\n //StringBuffer MsgUn=new StringBuffer();\n\n if ( remove_receipt_id.length() > 0 )\n {\n out.println( \"<HTML><HEAD>\\n\" );\n out.println( \"<META HTTP-EQUIV=\\\"Content-Type\\\" CONTENT=\\\"text/html; charset=iso-8859-1\\\">\\n\" );\n out.println( \"<META HTTP-EQUIV=\\\"Pragma\\\" CONTENT=\\\"no-cache\\\">\\n\" );\n out.println( \"<META HTTP-EQUIV=\\\"Expires\\\" CONTENT=\\\"-1\\\">\\n\" );\n out.println( \"<title>Hub Receiving QC</title>\\n\" );\n out.println( \"<LINK REL=\\\"stylesheet\\\" TYPE=\\\"text/css\\\" HREF=\\\"/stylesheets/global.css\\\"></LINK>\\n\" );\n out.println( \"<SCRIPT LANGUAGE=\\\"JavaScript\\\" TYPE=\\\"text/javascript\\\">\\n\" );\n out.println( \"<!-- \\n\" );\n out.println( \"function Unreceive()\\n\" );\n out.println( \"{\\n\" );\n out.println( \"opener.document.receiving.UserAction.value = \\\"UPDATE\\\";\\n\" );\n out.println( \"opener.document.receiving.SubUserAction.value = \\\"removereceipt\\\" ;\\n\" );\n out.println( \"opener.document.receiving.remove_receipt_id.value = \\\"\"+remove_receipt_id+\"\\\";\\n\" );\n out.println( \"opener.document.receiving.submit();\" );\n out.println( \"window.close();\\n\" );\n out.println( \"}\\n\" );\n out.println( \"function Search()\\n\" );\n out.println( \"{\\n\" );\n out.println( \" opener.document.receiving.UserAction.value = \\\"NEW\\\";\\n\" );\n out.println( \" opener.document.receiving.SubUserAction.value = \\\"NA\\\";\\n\" );\n out.println( \" opener.document.receiving.DuplLineNumber.value = \\\"NA\\\" ;\\n\" );\n out.println( \" opener.document.receiving.AddBin_Item_Id.value = \\\"NA\\\" ;\\n\" );\n out.println( \" opener.document.receiving.AddBin_Bin_Id.value = \\\"NA\\\" ;\\n\" );\n out.println( \" opener.document.receiving.submit();\\n\" );\n out.println( \"window.close();\\n\" );\n out.println( \"}\\n\" );\n out.println( \"function cancel()\\n\" );\n out.println( \"{\\n\" );\n out.println( \"window.close();\\n\" );\n out.println( \"}\\n\" );\n out.println( \"//--> \\n\" );\n out.println( \"</SCRIPT></HEAD><BODY> \\n\" );\n\n if ( !remove_action.equalsIgnoreCase( \"Yes\" ) )\n {\n out.println( \"<FORM METHOD=\\\"POST\\\" name=\\\"MfgidLike\\\" ACTION=\\\"\" + Receiving_Servlet +\n \"&UserAction=Unreceive&removeaction=Yes&SubUserAction=Unreceive&remove_receipt_id=\" + remove_receipt_id + \"\\\">\\n\" );\n out.println( \"<BR><FONT SIZE=\\\"2\\\" FACE=\\\"Arial\\\">Do you want to reverse Receipt Id: <B>\" + remove_receipt_id + \"</B><BR>\\n\" );\n out.println( \"</FONT><BR><BR>\\n\" );\n out.println( \"<CENTER><INPUT TYPE=\\\"submit\\\" CLASS=\\\"SUBMITDET\\\" onmouseover=\\\"className='SUBMITHOVERDET'\\\" onMouseout=\\\"className='SUBMITDET'\\\" VALUE=\\\"Yes\\\" NAME=\\\"SubmitButton\\\"> \\n\" );\n out.println( \"<INPUT TYPE=\\\"reset\\\" CLASS=\\\"SUBMITDET\\\" onmouseover=\\\"className='SUBMITHOVERDET'\\\" onMouseout=\\\"className='SUBMITDET'\\\" VALUE=\\\"Cancel\\\" OnClick=\\\"cancel()\\\" NAME=\\\"CloseButton\\\"></CENTER>\\n\" );\n out.println( \"</FORM>\\n\" );\n out.println( \"</BODY></HTML>\\n\" );\n //out.println( MsgUn );\n out.close();\n }\n else\n {\n if ( obj3.unreceiveReceipt( remove_receipt_id ) )\n {\n out.println( \"<FORM METHOD=\\\"POST\\\" name=\\\"MfgidLike\\\" action=\\\"javascript:cancelUnreceive()\\\">\\n\" );\n out.println( \"<BR><FONT SIZE=\\\"2\\\" FACE=\\\"Arial\\\">Success.<BR>\\n\" );\n out.println( \"Receipt Id: <B>\" + remove_receipt_id + \"</B> reversed Successfully.\\n\" );\n out.println( \"<BR><BR>\\n\" );\n out.println( \"<CENTER><INPUT TYPE=\\\"submit\\\" CLASS=\\\"SUBMITDET\\\" onmouseover=\\\"className='SUBMITHOVERDET'\\\" onMouseout=\\\"className='SUBMITDET'\\\" VALUE=\\\"Ok\\\" OnClick=\\\"Unreceive()\\\" NAME=\\\"CloseButton\\\"></CENTER>\\n\" );\n out.println( \"</FORM>\\n\" );\n out.println( \"</BODY></HTML>\\n\" );\n //out.println( MsgUn );\n out.close();\n }\n else\n {\n radian.web.emailHelpObj.senddeveloperemail(\"Receiving QC -receipt reverse error\",\"Error occured while deleting receipt Id \" + remove_receipt_id + \"\" );\n\n out.println( \"<FORM METHOD=\\\"POST\\\" name=\\\"MfgidLike\\\" action=\\\"javascript:cancelSearch()\\\">\\n\" );\n out.println( \"<BR><FONT SIZE=\\\"3\\\" FACE=\\\"Arial\\\"><B>Error occured.</B><BR></FONT><FONT SIZE=\\\"2\\\" FACE=\\\"Arial\\\">\\n\" );\n out.println( \"Receipt Id: <B>\" + remove_receipt_id + \" not reversed.</B><BR>Contact tech support for more information.</FONT><BR><BR>\\n\" );\n out.println( \"<CENTER><INPUT TYPE=\\\"submit\\\" CLASS=\\\"SUBMITDET\\\" onmouseover=\\\"className='SUBMITHOVERDET'\\\" onMouseout=\\\"className='SUBMITDET'\\\" VALUE=\\\"Close\\\" OnClick=\\\"cancel()\\\" NAME=\\\"CloseButton\\\"></CENTER>\\n\" );\n out.println( \"</FORM>\\n\" );\n out.println( \"</BODY></HTML>\\n\" );\n //out.println( MsgUn );\n out.close();\n }\n }\n }\n else\n {\n out.println( \"<FORM METHOD=\\\"POST\\\" name=\\\"MfgidLike\\\" action=\\\"javascript:cancel()\\\">\\n\" );\n out.println( \"<BR><FONT SIZE=\\\"2\\\" FACE=\\\"Arial\\\">Error.<BR>\\n\" );\n out.println( \"Receipt Not reversed. \\\\n Contact tech support for more information.<BR><BR>\\n\" );\n out.println( \"<CENTER><INPUT TYPE=\\\"submit\\\" CLASS=\\\"SUBMITDET\\\" onmouseover=\\\"className='SUBMITHOVERDET'\\\" onMouseout=\\\"className='SUBMITDET'\\\" VALUE=\\\"Close\\\" OnClick=\\\"cancel()\\\" NAME=\\\"CloseButton\\\"></CENTER>\\n\" );\n out.println( \"</FORM>\\n\" );\n out.println( \"</BODY></HTML>\\n\" );\n //out.println( MsgUn );\n out.close();\n }\n }\n else if ( ( User_Session.equalsIgnoreCase( \"Active\" ) ) && ( User_Action.equalsIgnoreCase( \"New\" ) ) )\n {\n //Hashtable hub_list_set= ( Hashtable ) session.getAttribute( \"HUB_SET\" );\n Hashtable iniinvendata= ( Hashtable ) session.getAttribute( \"INVENGRP_DATA\" );\n Vector lot_status_set= ( Vector ) session.getAttribute( \"STATUS_SET\" );\n\t\t\tVector expdate_invengrps= ( Vector ) session.getAttribute( \"EXP_ALLOWED_INVENGRP\" );\n\t\t\tVector lotstatus_invengrps= ( Vector ) session.getAttribute( \"STATUS_SET_ALLOWED_INVENGRP\" );\n\t\t\tVector recqc_invengrps= ( Vector ) session.getAttribute( \"RECQC_ALLOWED_INVENGRP\" );\n\t\t\tVector nonpickable_invengrps= ( Vector ) session.getAttribute( \"NON_PICKABLE_INVENGRP\" );\n Vector openorder_data=hubObj.getAllopenreceiptQC( branch_plant,User_Sort,SortresultsBy,invengrp,User_Search,searchlike,searchfor );\n\n Hashtable sum= ( Hashtable ) ( openorder_data.elementAt( 0 ) );\n int count= ( ( Integer ) sum.get( \"TOTAL_NUMBER\" ) ).intValue();\n\n if ( 0 == count )\n {\n buildHeader( null,hub_list_set,branch_plant,User_Sort,\"\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n out.println( radian.web.HTMLHelpObj.printHTMLNoData( \"No Items Found\" ) );\n out.close();\n //clean up\n openorder_data=null;\n hub_list_set=null;\n }\n else\n {\n session.setAttribute( \"DATA\",openorder_data );\n buildHeader( openorder_data,hub_list_set,branch_plant,User_Sort,\"\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n buildDetails( openorder_data,User_Sort,branch_plant,lot_status_set,\"\",lotstatus_invengrps,recqc_invengrps,nonpickable_invengrps );\n out.close();\n //clean up\n openorder_data=null;\n hub_list_set=null;\n } //when there are open orders for hub\n }\n else if ( ( User_Session.equalsIgnoreCase( \"Active\" ) ) && ( User_Action.equalsIgnoreCase( \"Update\" ) ) )\n {\n Vector retrn_data= ( Vector ) session.getAttribute( \"DATA\" );\n Vector synch_data=new Vector();\n\n SubUser_Action=request.getParameter( \"SubUserAction\" );\n if ( SubUser_Action == null )\n SubUser_Action=\"JSError2\";\n\n\t\t\tVector all_status_set_e= ( Vector ) session.getAttribute( \"STATUS_SET\" );\n\t\t\tVector recqc_invengrps= ( Vector ) session.getAttribute( \"RECQC_ALLOWED_INVENGRP\" );\n\n if ( \"1\".equalsIgnoreCase( User_Sort ) )\n {\n synch_data=SynchServerData( request,retrn_data,all_status_set_e,recqc_invengrps );\n }\n else\n {\n synch_data=SynchServerNonChemData( request,retrn_data );\n }\n\n retrn_data=null;\n\n if ( SubUser_Action.equalsIgnoreCase( \"JSError2\" ) )\n {\n Hashtable all_bin_set_e= ( Hashtable ) session.getAttribute( \"BIN_SET\" );\n //Hashtable hub_list_set= ( Hashtable ) session.getAttribute( \"HUB_SET\" );\n Hashtable iniinvendata= ( Hashtable ) session.getAttribute( \"INVENGRP_DATA\" );\n\t\t\t Vector expdate_invengrps= ( Vector ) session.getAttribute( \"EXP_ALLOWED_INVENGRP\" );\n\t\t\t Vector lotstatus_invengrps= ( Vector ) session.getAttribute( \"STATUS_SET_ALLOWED_INVENGRP\" );\n\t\t\t Vector nonpickable_invengrps= ( Vector ) session.getAttribute( \"NON_PICKABLE_INVENGRP\" );\n\n session.setAttribute( \"DATA\",synch_data );\n buildHeader( synch_data,hub_list_set,branch_plant,User_Sort,\"\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n out.println( radian.web.HTMLHelpObj.printJavaScriptError() );\n buildDetails( synch_data,User_Sort,branch_plant,all_status_set_e,\"\",lotstatus_invengrps,recqc_invengrps,nonpickable_invengrps );\n out.close();\n //clean up\n synch_data=null;\n all_bin_set_e=null;\n }\n else if ( SubUser_Action.equalsIgnoreCase( \"removereceipt\" ) )\n {\n Vector new_data=removereceipt( remove_receipt_id,synch_data );\n session.setAttribute( \"DATA\",new_data );\n\n Hashtable all_bin_set_d= ( Hashtable ) session.getAttribute( \"BIN_SET\" );\n //Hashtable hub_list_set= ( Hashtable ) session.getAttribute( \"HUB_SET\" );\n Hashtable iniinvendata= ( Hashtable ) session.getAttribute( \"INVENGRP_DATA\" );\n\t\t\t Vector expdate_invengrps= ( Vector ) session.getAttribute( \"EXP_ALLOWED_INVENGRP\" );\n\t\t\t Vector lotstatus_invengrps= ( Vector ) session.getAttribute( \"STATUS_SET_ALLOWED_INVENGRP\" );\n\t\t\t //Vector recqc_invengrps= ( Vector ) session.getAttribute( \"RECQC_ALLOWED_INVENGRP\" );\n\t\t\t Vector nonpickable_invengrps= ( Vector ) session.getAttribute( \"NON_PICKABLE_INVENGRP\" );\n\n buildHeader( new_data,hub_list_set,branch_plant,User_Sort,\"\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n buildDetails( new_data,User_Sort,branch_plant,all_status_set_e,\"\",lotstatus_invengrps,recqc_invengrps,nonpickable_invengrps );\n\n out.close();\n //clean up\n synch_data=null;\n new_data=null;\n all_bin_set_d=null;\n all_status_set_e=null;\n }\n else if ( SubUser_Action.equalsIgnoreCase( \"UpdPage\" ) || SubUser_Action.equalsIgnoreCase( \"generatelabels\" ) || SubUser_Action.equalsIgnoreCase( \"generatelargelabels\" ) )\n {\n Hashtable temp1= ( Hashtable ) session.getAttribute( \"BIN_SET\" );\n Vector temp2= ( Vector ) session.getAttribute( \"STATUS_SET\" );\n //Hashtable hub_list_set= ( Hashtable ) session.getAttribute( \"HUB_SET\" );\n Hashtable iniinvendata= ( Hashtable ) session.getAttribute( \"INVENGRP_DATA\" );\n\t\t\t Vector expdate_invengrps= ( Vector ) session.getAttribute( \"EXP_ALLOWED_INVENGRP\" );\n\t\t\t Vector lotstatus_invengrps= ( Vector ) session.getAttribute( \"STATUS_SET_ALLOWED_INVENGRP\" );\n\t\t\t //Vector recqc_invengrps= ( Vector ) session.getAttribute( \"RECQC_ALLOWED_INVENGRP\" );\n\t\t\t Vector nonpickable_invengrps= ( Vector ) session.getAttribute( \"NON_PICKABLE_INVENGRP\" );\n\n session.setAttribute( \"DATA\",synch_data );\n Hashtable updateresults=UpdateDetails( synch_data,branch_plant,personnelid,User_Sort,CompanyID,SubUser_Action,recqc_invengrps );\n\n Boolean resultfromup= ( Boolean ) updateresults.get( \"RESULT\" );\n Vector errordata= ( Vector ) updateresults.get( \"ERRORDATA\" );\n Vector errMsgs=hubObj.getErrMsgs();\n\n session.setAttribute( \"DATA\",errordata );\n\t\t\t if (\"generatelargelabels\".equalsIgnoreCase(SubUser_Action))\n\t\t\t {\n\t\t\t\tsession.setAttribute( \"LARGE_LABEL_DATA\",errordata );\n \t\t }\n boolean result=resultfromup.booleanValue();\n session.setAttribute( \"LABEL_SEQUENCE_NUMBERS\",receiptIdstoLabel );\n session.setAttribute( \"LABEL_QUANTITYS\",numbersoflabels );\n\n if ( false == result )\n {\n if ( \"1\".equalsIgnoreCase( User_Sort ) && receiptIdstoLabel.size() > 0 && (SubUser_Action.equalsIgnoreCase( \"generatelabels\" ) || \"generatelargelabels\".equalsIgnoreCase(SubUser_Action) ) )\n {\n\t\t\t\t if (\"generatelargelabels\".equalsIgnoreCase(SubUser_Action))\n\t\t\t\t {\n\t\t\t\t\tbuildHeader( errordata,hub_list_set,branch_plant,User_Sort,\"GENERATE_LARGE_LABELS\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n\t\t\t }\n else\n\t\t\t\t {\n\t\t\t\t\tbuildHeader( errordata,hub_list_set,branch_plant,User_Sort,\"GENERATE_LABELS\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n\t\t\t\t }\n }\n else\n {\n buildHeader( errordata,hub_list_set,branch_plant,User_Sort,\"\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n }\n\n if ( true == noneToUpd )\n {\n out.println( radian.web.HTMLHelpObj.printMessageinTable( \"No Item was Choosen for Receiving QC\" ) );\n buildDetails( errordata,User_Sort,branch_plant,temp2,SubUser_Action,lotstatus_invengrps,recqc_invengrps,nonpickable_invengrps );\n }\n else\n {\n //out.println( radian.web.HTMLHelpObj.printMessageinTable( \"An Error Occurred.<BR>Please Check Data and try Again.\" ) );\n\t\t\t\t out.println( radian.web.HTMLHelpObj.printHTMLPartialSuccess( errMsgs ) );\n buildDetails( errordata,User_Sort,branch_plant,temp2,SubUser_Action,lotstatus_invengrps,recqc_invengrps,nonpickable_invengrps );\n }\n\n out.close();\n }\n else\n {\n //contains a list of a list of lot seq that were added to receiving table\n Vector vList=hubObj.getLotSeqList();\n session.setAttribute( \"LABEL_SEQUENCE_NUMBERS\",vList );\n\n if ( true == completeSuccess )\n {\n if ( \"1\".equalsIgnoreCase( User_Sort ) && (SubUser_Action.equalsIgnoreCase( \"generatelabels\" ) || \"generatelargelabels\".equalsIgnoreCase(SubUser_Action) ))\n {\n\t\t\t\t\tif (\"generatelargelabels\".equalsIgnoreCase(SubUser_Action))\n\t\t\t\t\t{\n\t\t\t\t\t buildHeader( errordata,hub_list_set,branch_plant,User_Sort,\"GENERATE_LARGE_LABELS\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t buildHeader( errordata,hub_list_set,branch_plant,User_Sort,\"GENERATE_LABELS\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n\t\t\t\t\t}\n\t\t\t\t }\n else\n {\n buildHeader( errordata,hub_list_set,branch_plant,User_Sort,\"\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n }\n out.println( radian.web.HTMLHelpObj.printMessageinTable( \"All Your Selections Were Successfully Updated\" ) );\n buildDetails( errordata,User_Sort,branch_plant,temp2,SubUser_Action,lotstatus_invengrps,recqc_invengrps,nonpickable_invengrps );\n out.close();\n }\n else\n {\n if ( \"1\".equalsIgnoreCase( User_Sort ) && (SubUser_Action.equalsIgnoreCase( \"generatelabels\" ) || \"generatelargelabels\".equalsIgnoreCase(SubUser_Action)) )\n {\n\t\t\t\t\tif (\"generatelargelabels\".equalsIgnoreCase(SubUser_Action))\n\t\t\t\t\t{\n\t\t\t\t\t buildHeader( errordata,hub_list_set,branch_plant,User_Sort,\"GENERATE_LARGE_LABELS\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t buildHeader( errordata,hub_list_set,branch_plant,User_Sort,\"GENERATE_LABELS\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels);\n\t\t\t\t\t}\n\t\t\t\t }\n else\n {\n buildHeader( errordata,hub_list_set,branch_plant,User_Sort,\"\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n }\n out.println( radian.web.HTMLHelpObj.printHTMLPartialSuccess( errMsgs ) );\n buildDetails( errordata,User_Sort,branch_plant,temp2,SubUser_Action,lotstatus_invengrps,recqc_invengrps,nonpickable_invengrps );\n out.close();\n }\n }\n //clean up\n synch_data=null;\n temp1=null;\n temp2=null;\n //\n }\n else\n {\n out.println( radian.web.HTMLHelpObj.printError( \"tcmIS Hub Receiving\",intcmIsApplication ) );\n }\n\n }\n else if ( ( User_Session.equalsIgnoreCase( \"Active\" ) ) && ( User_Action.equalsIgnoreCase( \"JSError1\" ) ) )\n {\n Vector retrn_data= ( Vector ) session.getAttribute( \"DATA\" );\n\t\t\tVector all_status_set_e= ( Vector ) session.getAttribute( \"STATUS_SET\" );\n\t\t\tVector recqc_invengrps= ( Vector ) session.getAttribute( \"RECQC_ALLOWED_INVENGRP\" );\n Vector synch_data=SynchServerData( request,retrn_data,all_status_set_e,recqc_invengrps );\n Hashtable iniinvendata= ( Hashtable ) session.getAttribute( \"INVENGRP_DATA\" );\n retrn_data=null;\n\n Hashtable all_bin_set_e= ( Hashtable ) session.getAttribute( \"BIN_SET\" );\n\n //Hashtable hub_list_set= ( Hashtable ) session.getAttribute( \"HUB_SET\" );\n\t\t\tVector expdate_invengrps= ( Vector ) session.getAttribute( \"EXP_ALLOWED_INVENGRP\" );\n\t\t\tVector lotstatus_invengrps= ( Vector ) session.getAttribute( \"STATUS_SET_ALLOWED_INVENGRP\" );\n\t\t\tVector nonpickable_invengrps= ( Vector ) session.getAttribute( \"NON_PICKABLE_INVENGRP\" );\n\n session.setAttribute( \"DATA\",synch_data );\n buildHeader( synch_data,hub_list_set,branch_plant,User_Sort,\"\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n out.println( radian.web.HTMLHelpObj.printJavaScriptError() );\n buildDetails( synch_data,User_Sort,branch_plant,all_status_set_e,\"\",lotstatus_invengrps,recqc_invengrps,nonpickable_invengrps);\n out.close();\n //clean up\n synch_data=null;\n all_bin_set_e=null;\n all_status_set_e=null;\n\n }\n else\n {\n out.println( radian.web.HTMLHelpObj.printError( \"tcmIS Hub Receiving\",intcmIsApplication ) );\n }\n }\n catch ( Exception e )\n {\n e.printStackTrace();\n out.println( radian.web.HTMLHelpObj.printError( \"tcmIS Hub Receiving QC\",intcmIsApplication ) );\n }\n //clean up\n hubObj=null;\n\n return;\n }",
"private DemoProcessStartEmailForWebservice() {\n\n }",
"@Override\n public void doPost(HttpServletRequest req, HttpServletResponse resp)\n throws IOException {\n\n log.log(Level.WARNING, \"## doPost PayGateNotificationServlet receiving ...\");\n printRequestParameters(req);\n TransactionResponseDTO r = new TransactionResponseDTO();\n r.setMessage(\"PayGateNotificationServlet: server notification responding with OK!\");\n r.setStatusCode(0);\n resp.setContentType(\"application/json\");\n PayGateResponseDTO payGateResponse = new PayGateResponseDTO();\n try {\n PayGateNotifyResponseDTO m = processNotification(req);\n payGateResponse.setPayGateNotifyResponse(m);\n payGateResponse.setMessage(\"PayGate notification response OK\");\n } catch (Exception e) {\n payGateResponse.setStatusCode(9);\n payGateResponse.setMessage(\"Unable to process PayGate notofication\");\n }\n resp.getWriter().println(GSON.toJson(\"OK\"));\n log.log(Level.WARNING, \"################### PayGateNotificationServlet ended: sent OK ...\");\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException \r\n {\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n try (PrintWriter out = response.getWriter()) \r\n {\r\n out.println(\"<!DOCTYPE html>\");\r\n out.println(\"<html>\");\r\n out.println(\"<head>\");\r\n out.println(\"<title>Servlet JoinGroupServlet</title>\"); \r\n out.println(\"</head>\");\r\n out.println(\"<body>\");\r\n out.println(\"<h1>Servlet JoinGroupServlet at \" + request.getContextPath() + \"</h1>\");\r\n out.println(\"</body>\");\r\n out.println(\"</html>\");\r\n }\r\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n Date date = new Date();\n String url = \"error\";\n BasicConfigurator.configure();\n try {\n /* TODO output your page here. You may use following sample code. */\n String content = request.getParameter(\"content\");\n String[] answerContent = request.getParameterValues(\"answer\");\n String answerCorr = request.getParameter(\"cboAnswerCorrect\");\n String subjectID = request.getParameter(\"subjectID\");\n boolean type = false;\n if (!content.trim().isEmpty() && answerContent != null && !answerCorr.trim().isEmpty()) {\n HttpSession session = request.getSession(false);\n if (session != null) {\n String email = (String) session.getAttribute(\"EMAIL\");\n if (email != null) {\n QuestionDAO dao = new QuestionDAO();\n Utils utils = new Utils();\n String createDate = utils.formatDateToString(date);\n boolean successQuestion = dao.createNewQuestion(content, createDate, subjectID, statusID, email);\n if (successQuestion) {\n String questionID = dao.getLastQuestionID(subjectID, createDate, email);\n AnswerDAO adao = new AnswerDAO();\n for (String answer : answerContent) {\n if (answer.equals(answerCorr)) {\n type = true;\n adao.insertAnwser(questionID, answer, type);\n }else{\n adao.insertAnwser(questionID, answer, type);\n }\n }\n url = \"subject\";\n }\n }\n\n }\n\n }\n } catch (SQLException ex) {\n log.error(\"CreateQuestion_SQL:\" + ex.getMessage());\n } catch (NamingException ex) {\n log.error(\"CreateQuestion_Naming:\" + ex.getMessage());\n } finally {\n RequestDispatcher rd = request.getRequestDispatcher(url);\n rd.forward(request, response);\n out.close();\n }\n }",
"void send(String emailName, Map model, Locale locale, EmailPreparator emailPreparator);",
"public void sendEmail() {\n\t\tSystem.out.println(\"Loading session and Authenticating\");\n\t\tfinal Session session = Session.getInstance(getProtocolProporties(PROTOCOL_SEND), new Authenticator() {\n\n\t\t\t@Override\n\t\t\tprotected PasswordAuthentication getPasswordAuthentication() {\n\t\t\t\treturn new PasswordAuthentication(getProperty(\"username\"), getPassword());\n\t\t\t}\n\n\t\t});\n\t\tif(null == session) {\n\t\t\tSystem.err.println(\"Session is null, cann't proceed\");\n\t\t\treturn ;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Authenticated, will try to send an email\");\n\n\t\ttry {\n\t\t\tfinal Message message = new MimeMessage(session) {\n\t\t\t\t//Print the message to console\n\t\t\t\t@Override\n\t\t\t\tpublic String toString() {\n\t\t\t\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tstringBuilder.append(\"\\n\").append(\"From : \").append(\"\\n\");\n\t\t\t\t\t\tfor (Address address : this.getFrom())\n\t\t\t\t\t\t\tstringBuilder.append(address).append(\"\\n\");\n\t\t\t\t\t\tstringBuilder.append(\"\\n\").append(\"To : \").append(\"\\n\");\n\t\t\t\t\t\tfor (Address address : this.getRecipients(Message.RecipientType.TO))\n\t\t\t\t\t\t\tstringBuilder.append(address).append(\"\\n\");\n\t\t\t\t\t\tstringBuilder.append(\"Subject : \").append(\"\\n\").append(this.getSubject());\n\t\t\t\t\t\tstringBuilder.append(\"\\n\").append(\"Sent Date : \").append(this.getSentDate());\n\t\t\t\t\t} catch (MessagingException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\treturn stringBuilder.toString();\n\t\t\t\t}\n\t\t\t};\n\t\t\t\n\t\t\t//Get Mail field details\n\t\t\tmessage.setFrom(new InternetAddress(getProperty(\"username\")));\n\t\t\tmessage.setRecipient(Message.RecipientType.TO, new InternetAddress(getUserInput(\"to\")));\n\t\t\tmessage.setSubject(getUserInput(\"subject\"));\n\t\t\tmessage.setText(getUserInput(\"messageContent\"));\n\t\t\tmessage.setSentDate(new Date());\n\t\t\tSystem.out.println(\"Sending the mail as details below :\");\n\t\t\tSystem.out.println(message);\n\t\t\t\n\t\t\t//Send email here, this throws exception if fails\n\t\t\tTransport.send(message);\n\t\t\t\n\t\t\tSystem.out.println(\"Email Sent\");\n\t\t} catch (final MessagingException ex) {\n\t\t\tSystem.err.println(\"Error: \" + ex.getMessage());\n\t\t\tex.printStackTrace();\n\t\t}\n\t}"
]
| [
"0.7442984",
"0.72031415",
"0.7161305",
"0.7157292",
"0.7098769",
"0.7059551",
"0.683328",
"0.6785783",
"0.67042947",
"0.665783",
"0.6615139",
"0.65586793",
"0.6557035",
"0.6523966",
"0.6504762",
"0.6499596",
"0.6496507",
"0.6395205",
"0.6394015",
"0.63729095",
"0.63516116",
"0.63436353",
"0.6341746",
"0.633587",
"0.6323296",
"0.6247245",
"0.6245704",
"0.62310225",
"0.6222226",
"0.62156487",
"0.6211952",
"0.61657524",
"0.6164902",
"0.61588264",
"0.61567324",
"0.6146774",
"0.6130082",
"0.6128969",
"0.61238396",
"0.6072829",
"0.6072779",
"0.60604215",
"0.6050348",
"0.6041872",
"0.60293967",
"0.6023956",
"0.5999195",
"0.59971565",
"0.5962048",
"0.5960679",
"0.59388995",
"0.59081477",
"0.58791775",
"0.5874967",
"0.58539045",
"0.5840689",
"0.5837808",
"0.58170927",
"0.5812136",
"0.58086264",
"0.57884574",
"0.5777827",
"0.57666856",
"0.57610846",
"0.5749776",
"0.57478505",
"0.5741138",
"0.57387495",
"0.5736702",
"0.57277703",
"0.57164663",
"0.5709646",
"0.57068926",
"0.5696481",
"0.56873316",
"0.5686356",
"0.5683887",
"0.5682418",
"0.56802",
"0.5677046",
"0.5675693",
"0.5668942",
"0.5663412",
"0.56446487",
"0.56420547",
"0.56378067",
"0.56336606",
"0.5630849",
"0.56153655",
"0.56117135",
"0.5606319",
"0.55921805",
"0.5590778",
"0.55855125",
"0.55843025",
"0.55824286",
"0.5579967",
"0.5577304",
"0.55766064",
"0.55737084"
]
| 0.6757429 | 8 |
/ JADX WARNING: inconsistent code. / Code decompiled incorrectly, please refer to instructions dump. | public okhttp3.Request followUpRequest() {
/*
r5 = this;
r1 = 0;
r0 = r5.userResponse;
if (r0 != 0) goto L_0x000b;
L_0x0005:
r0 = new java.lang.IllegalStateException;
r0.<init>();
throw r0;
L_0x000b:
r0 = r5.streamAllocation;
r0 = r0.connection();
if (r0 == 0) goto L_0x0027;
L_0x0013:
r0 = r0.route();
L_0x0017:
r2 = r5.userResponse;
r2 = r2.code();
r3 = r5.userRequest;
r3 = r3.method();
switch(r2) {
case 300: goto L_0x0063;
case 301: goto L_0x0063;
case 302: goto L_0x0063;
case 303: goto L_0x0063;
case 307: goto L_0x0053;
case 308: goto L_0x0053;
case 401: goto L_0x0046;
case 407: goto L_0x0029;
case 408: goto L_0x00dc;
default: goto L_0x0026;
};
L_0x0026:
return r1;
L_0x0027:
r0 = r1;
goto L_0x0017;
L_0x0029:
if (r0 == 0) goto L_0x003f;
L_0x002b:
r1 = r0.proxy();
L_0x002f:
r1 = r1.type();
r2 = java.net.Proxy.Type.HTTP;
if (r1 == r2) goto L_0x0046;
L_0x0037:
r0 = new java.net.ProtocolException;
r1 = "Received HTTP_PROXY_AUTH (407) code while not using proxy";
r0.<init>(r1);
throw r0;
L_0x003f:
r1 = r5.client;
r1 = r1.proxy();
goto L_0x002f;
L_0x0046:
r1 = r5.client;
r1 = r1.authenticator();
r2 = r5.userResponse;
r1 = r1.authenticate(r0, r2);
goto L_0x0026;
L_0x0053:
r0 = "GET";
r0 = r3.equals(r0);
if (r0 != 0) goto L_0x0063;
L_0x005b:
r0 = "HEAD";
r0 = r3.equals(r0);
if (r0 == 0) goto L_0x0026;
L_0x0063:
r0 = r5.client;
r0 = r0.followRedirects();
if (r0 == 0) goto L_0x0026;
L_0x006b:
r0 = r5.userResponse;
r2 = "Location";
r0 = r0.header(r2);
if (r0 == 0) goto L_0x0026;
L_0x0075:
r2 = r5.userRequest;
r2 = r2.url();
r0 = r2.resolve(r0);
if (r0 == 0) goto L_0x0026;
L_0x0081:
r2 = r0.scheme();
r4 = r5.userRequest;
r4 = r4.url();
r4 = r4.scheme();
r2 = r2.equals(r4);
if (r2 != 0) goto L_0x009d;
L_0x0095:
r2 = r5.client;
r2 = r2.followSslRedirects();
if (r2 == 0) goto L_0x0026;
L_0x009d:
r2 = r5.userRequest;
r2 = r2.newBuilder();
r4 = okhttp3.internal.http.HttpMethod.permitsRequestBody(r3);
if (r4 == 0) goto L_0x00c3;
L_0x00a9:
r4 = okhttp3.internal.http.HttpMethod.redirectsToGet(r3);
if (r4 == 0) goto L_0x00d8;
L_0x00af:
r3 = "GET";
r2.method(r3, r1);
L_0x00b4:
r1 = "Transfer-Encoding";
r2.removeHeader(r1);
r1 = "Content-Length";
r2.removeHeader(r1);
r1 = "Content-Type";
r2.removeHeader(r1);
L_0x00c3:
r1 = r5.sameConnection(r0);
if (r1 != 0) goto L_0x00ce;
L_0x00c9:
r1 = "Authorization";
r2.removeHeader(r1);
L_0x00ce:
r0 = r2.url(r0);
r1 = r0.build();
goto L_0x0026;
L_0x00d8:
r2.method(r3, r1);
goto L_0x00b4;
L_0x00dc:
r0 = r5.requestBodyOut;
if (r0 == 0) goto L_0x00e6;
L_0x00e0:
r0 = r5.requestBodyOut;
r0 = r0 instanceof okhttp3.internal.http.RetryableSink;
if (r0 == 0) goto L_0x00f1;
L_0x00e6:
r0 = 1;
L_0x00e7:
r2 = r5.callerWritesRequestBody;
if (r2 == 0) goto L_0x00ed;
L_0x00eb:
if (r0 == 0) goto L_0x0026;
L_0x00ed:
r1 = r5.userRequest;
goto L_0x0026;
L_0x00f1:
r0 = 0;
goto L_0x00e7;
*/
throw new UnsupportedOperationException("Method not decompiled: okhttp3.internal.http.HttpEngine.followUpRequest():okhttp3.Request");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private void method_7083() {\r\n // $FF: Couldn't be decompiled\r\n }",
"protected void method_2145() {\r\n // $FF: Couldn't be decompiled\r\n }",
"protected void method_2247() {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void method_1148() {\r\n // $FF: Couldn't be decompiled\r\n }",
"protected void method_2141() {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void method_2537() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void method_7081() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void method_2113() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void method_2139() {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void method_6338() {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void m13383b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x000a }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x000a }\n r2 = 0;\t Catch:{ Exception -> 0x000a }\n r0.delete(r1, r2, r2);\t Catch:{ Exception -> 0x000a }\n L_0x000a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.b():void\");\n }",
"static void method_2226() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private void m14210a(java.io.IOException r4, java.io.IOException r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r3 = this;\n r0 = f12370a;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = f12370a;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = 1;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1 = new java.lang.Object[r1];\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r2 = 0;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r1[r2] = r5;\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n r0.invoke(r4, r1);\t Catch:{ InvocationTargetException -> 0x000f, InvocationTargetException -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.connection.RouteException.a(java.io.IOException, java.io.IOException):void\");\n }",
"public void method_2046() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void method_2197() {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void method_7086() {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void method_2250() {\r\n // $FF: Couldn't be decompiled\r\n }",
"static void method_28() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private boolean method_2253(class_1033 param1) {\r\n // $FF: Couldn't be decompiled\r\n }",
"public long mo915b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = -1;\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n if (r2 == 0) goto L_0x000d;\t Catch:{ NumberFormatException -> 0x000e }\n L_0x0006:\n r2 = r4.f18088d;\t Catch:{ NumberFormatException -> 0x000e }\n r2 = java.lang.Long.parseLong(r2);\t Catch:{ NumberFormatException -> 0x000e }\n r0 = r2;\n L_0x000d:\n return r0;\n L_0x000e:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.b.b():long\");\n }",
"private void m25427g() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19111m;\n if (r0 == 0) goto L_0x000f;\n L_0x0004:\n r0 = r2.f19104f;\t Catch:{ Exception -> 0x000f }\n r0 = android.support.v4.content.C0396d.m1465a(r0);\t Catch:{ Exception -> 0x000f }\n r1 = r2.f19111m;\t Catch:{ Exception -> 0x000f }\n r0.m1468a(r1);\t Catch:{ Exception -> 0x000f }\n L_0x000f:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.w.g():void\");\n }",
"public void mo2485a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = r2.f11863a;\n monitor-enter(r0);\n r1 = r2.f11873l;\t Catch:{ all -> 0x002a }\n if (r1 != 0) goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x0007:\n r1 = r2.f11872k;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x000c;\t Catch:{ all -> 0x002a }\n L_0x000b:\n goto L_0x0028;\t Catch:{ all -> 0x002a }\n L_0x000c:\n r1 = r2.f11875n;\t Catch:{ all -> 0x002a }\n if (r1 == 0) goto L_0x0015;\n L_0x0010:\n r1 = r2.f11875n;\t Catch:{ RemoteException -> 0x0015 }\n r1.cancel();\t Catch:{ RemoteException -> 0x0015 }\n L_0x0015:\n r1 = r2.f11870i;\t Catch:{ all -> 0x002a }\n m14216b(r1);\t Catch:{ all -> 0x002a }\n r1 = 1;\t Catch:{ all -> 0x002a }\n r2.f11873l = r1;\t Catch:{ all -> 0x002a }\n r1 = com.google.android.gms.common.api.Status.zzfnm;\t Catch:{ all -> 0x002a }\n r1 = r2.mo3568a(r1);\t Catch:{ all -> 0x002a }\n r2.m14217c(r1);\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x0028:\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n return;\t Catch:{ all -> 0x002a }\n L_0x002a:\n r1 = move-exception;\t Catch:{ all -> 0x002a }\n monitor-exit(r0);\t Catch:{ all -> 0x002a }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.common.api.internal.BasePendingResult.a():void\");\n }",
"private void method_7082(class_1293 param1) {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void mo3613a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f18081b;\n monitor-enter(r0);\n r1 = r4.f18080a;\t Catch:{ all -> 0x001f }\n if (r1 == 0) goto L_0x0009;\t Catch:{ all -> 0x001f }\n L_0x0007:\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n return;\t Catch:{ all -> 0x001f }\n L_0x0009:\n r1 = 1;\t Catch:{ all -> 0x001f }\n r4.f18080a = r1;\t Catch:{ all -> 0x001f }\n r2 = r4.f18081b;\t Catch:{ all -> 0x001f }\n r3 = r2.f12200d;\t Catch:{ all -> 0x001f }\n r3 = r3 + r1;\t Catch:{ all -> 0x001f }\n r2.f12200d = r3;\t Catch:{ all -> 0x001f }\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n r0 = r4.f18083d;\n okhttp3.internal.C2933c.m14194a(r0);\n r0 = r4.f18082c;\t Catch:{ IOException -> 0x001e }\n r0.m14100c();\t Catch:{ IOException -> 0x001e }\n L_0x001e:\n return;\n L_0x001f:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x001f }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a.a():void\");\n }",
"private static void m13385d() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = java.lang.System.currentTimeMillis();\t Catch:{ Exception -> 0x0024 }\n r2 = java.util.concurrent.TimeUnit.DAYS;\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r2 = r2.toMillis(r3);\t Catch:{ Exception -> 0x0024 }\n r4 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = r0 - r2;\t Catch:{ Exception -> 0x0024 }\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\t Catch:{ Exception -> 0x0024 }\n r1 = \"battery_watcher\";\t Catch:{ Exception -> 0x0024 }\n r2 = \"timestamp < ?\";\t Catch:{ Exception -> 0x0024 }\n r3 = 1;\t Catch:{ Exception -> 0x0024 }\n r3 = new java.lang.String[r3];\t Catch:{ Exception -> 0x0024 }\n r6 = 0;\t Catch:{ Exception -> 0x0024 }\n r4 = java.lang.String.valueOf(r4);\t Catch:{ Exception -> 0x0024 }\n r3[r6] = r4;\t Catch:{ Exception -> 0x0024 }\n r0.delete(r1, r2, r3);\t Catch:{ Exception -> 0x0024 }\n L_0x0024:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.d():void\");\n }",
"private boolean m2248a(java.lang.String r3, com.onesignal.La.C0596a r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/318857719.run(Unknown Source)\n*/\n /*\n r2 = this;\n r0 = 0;\n r1 = 1;\n java.lang.Float.parseFloat(r3);\t Catch:{ Throwable -> 0x0007 }\n r3 = 1;\n goto L_0x0008;\n L_0x0007:\n r3 = 0;\n L_0x0008:\n if (r3 != 0) goto L_0x0017;\n L_0x000a:\n r3 = com.onesignal.sa.C0650i.ERROR;\n r1 = \"Missing Google Project number!\\nPlease enter a Google Project number / Sender ID on under App Settings > Android > Configuration on the OneSignal dashboard.\";\n com.onesignal.sa.m1656a(r3, r1);\n r3 = 0;\n r1 = -6;\n r4.mo1392a(r3, r1);\n return r0;\n L_0x0017:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.onesignal.Pa.a(java.lang.String, com.onesignal.La$a):boolean\");\n }",
"public static boolean m19464a(java.lang.String r3, int[] r4) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = android.text.TextUtils.isEmpty(r3);\n r1 = 0;\n if (r0 == 0) goto L_0x0008;\n L_0x0007:\n return r1;\n L_0x0008:\n r0 = r4.length;\n r2 = 2;\n if (r0 == r2) goto L_0x000d;\n L_0x000c:\n return r1;\n L_0x000d:\n r0 = \"x\";\n r3 = r3.split(r0);\n r0 = r3.length;\n if (r0 == r2) goto L_0x0017;\n L_0x0016:\n return r1;\n L_0x0017:\n r0 = r3[r1];\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = java.lang.Integer.parseInt(r0);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r1] = r0;\t Catch:{ NumberFormatException -> 0x0029 }\n r0 = 1;\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = r3[r0];\t Catch:{ NumberFormatException -> 0x0029 }\n r3 = java.lang.Integer.parseInt(r3);\t Catch:{ NumberFormatException -> 0x0029 }\n r4[r0] = r3;\t Catch:{ NumberFormatException -> 0x0029 }\n return r0;\n L_0x0029:\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.arp.a(java.lang.String, int[]):boolean\");\n }",
"public boolean mo3969a() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r4 = this;\n r0 = r4.f19005h;\n if (r0 != 0) goto L_0x0011;\n L_0x0004:\n r0 = r4.f19004g;\n if (r0 == 0) goto L_0x000f;\n L_0x0008:\n r0 = r4.f19004g;\n r1 = com.facebook.ads.C1700b.f5123e;\n r0.mo1313a(r4, r1);\n L_0x000f:\n r0 = 0;\n return r0;\n L_0x0011:\n r0 = new android.content.Intent;\n r1 = r4.f19002e;\n r2 = com.facebook.ads.AudienceNetworkActivity.class;\n r0.<init>(r1, r2);\n r1 = \"predefinedOrientationKey\";\n r2 = r4.m25306b();\n r0.putExtra(r1, r2);\n r1 = \"uniqueId\";\n r2 = r4.f18999b;\n r0.putExtra(r1, r2);\n r1 = \"placementId\";\n r2 = r4.f19000c;\n r0.putExtra(r1, r2);\n r1 = \"requestTime\";\n r2 = r4.f19001d;\n r0.putExtra(r1, r2);\n r1 = \"viewType\";\n r2 = r4.f19009l;\n r0.putExtra(r1, r2);\n r1 = \"useCache\";\n r2 = r4.f19010m;\n r0.putExtra(r1, r2);\n r1 = r4.f19008k;\n if (r1 == 0) goto L_0x0052;\n L_0x004a:\n r1 = \"ad_data_bundle\";\n r2 = r4.f19008k;\n r0.putExtra(r1, r2);\n goto L_0x005b;\n L_0x0052:\n r1 = r4.f19006i;\n if (r1 == 0) goto L_0x005b;\n L_0x0056:\n r1 = r4.f19006i;\n r1.m18953a(r0);\n L_0x005b:\n r1 = 268435456; // 0x10000000 float:2.5243549E-29 double:1.32624737E-315;\n r0.addFlags(r1);\n r1 = r4.f19002e;\t Catch:{ ActivityNotFoundException -> 0x0066 }\n r1.startActivity(r0);\t Catch:{ ActivityNotFoundException -> 0x0066 }\n goto L_0x0072;\n L_0x0066:\n r1 = r4.f19002e;\n r2 = com.facebook.ads.InterstitialAdActivity.class;\n r0.setClass(r1, r2);\n r1 = r4.f19002e;\n r1.startActivity(r0);\n L_0x0072:\n r0 = 1;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.adapters.k.a():boolean\");\n }",
"protected void method_2045(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }",
"protected void method_2246(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }",
"private final java.util.Map<java.lang.String, java.lang.String> m11967c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r7 = this;\n r0 = new java.util.HashMap;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r0.<init>();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r7.f10169c;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r2 = r7.f10170d;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r3 = f10168i;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r4 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r5 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r6 = 0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1 = r1.query(r2, r3, r4, r5, r6);\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n if (r1 == 0) goto L_0x0031;\n L_0x0014:\n r2 = r1.moveToNext();\t Catch:{ all -> 0x002c }\n if (r2 == 0) goto L_0x0028;\t Catch:{ all -> 0x002c }\n L_0x001a:\n r2 = 0;\t Catch:{ all -> 0x002c }\n r2 = r1.getString(r2);\t Catch:{ all -> 0x002c }\n r3 = 1;\t Catch:{ all -> 0x002c }\n r3 = r1.getString(r3);\t Catch:{ all -> 0x002c }\n r0.put(r2, r3);\t Catch:{ all -> 0x002c }\n goto L_0x0014;\n L_0x0028:\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n goto L_0x0031;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x002c:\n r0 = move-exception;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n r1.close();\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n throw r0;\t Catch:{ SecurityException -> 0x0032, SecurityException -> 0x0032 }\n L_0x0031:\n return r0;\n L_0x0032:\n r0 = \"ConfigurationContentLoader\";\n r1 = \"PhenotypeFlag unable to load ContentProvider, using default values\";\n android.util.Log.e(r0, r1);\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzsi.c():java.util.Map<java.lang.String, java.lang.String>\");\n }",
"private void m50366E() {\n }",
"public int method_7084(String param1) {\r\n // $FF: Couldn't be decompiled\r\n }",
"private p000a.p001a.p002a.p003a.C0916s m1655b(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m321a();\n r7 = r7.m322b();\n r1 = 0;\n r2 = r1;\n L_0x000a:\n r3 = r6.f1533u;\n r3 = r3 + 1;\n r6.f1533u = r3;\n r0.m2803e();\n r3 = r0.mo2010a();\n if (r3 != 0) goto L_0x0032;\n L_0x0019:\n r7 = r6.f1513a;\n r8 = \"Cannot retry non-repeatable request\";\n r7.m260a(r8);\n if (r2 == 0) goto L_0x002a;\n L_0x0022:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity. The cause lists the reason the original request failed.\";\n r7.<init>(r8, r2);\n throw r7;\n L_0x002a:\n r7 = new a.a.a.a.b.m;\n r8 = \"Cannot retry request with a non-repeatable request entity.\";\n r7.<init>(r8);\n throw r7;\n L_0x0032:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x003a:\n r2 = r7.mo15e();\t Catch:{ IOException -> 0x0086 }\n if (r2 != 0) goto L_0x004f;\t Catch:{ IOException -> 0x0086 }\n L_0x0040:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Reopening the direct connection.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x0086 }\n r2.mo2023a(r7, r8, r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0057;\t Catch:{ IOException -> 0x0086 }\n L_0x004f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = \"Proxied connection. Need to start over.\";\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n goto L_0x0085;\t Catch:{ IOException -> 0x0086 }\n L_0x0057:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m262a();\t Catch:{ IOException -> 0x0086 }\n if (r2 == 0) goto L_0x007c;\t Catch:{ IOException -> 0x0086 }\n L_0x005f:\n r2 = r6.f1513a;\t Catch:{ IOException -> 0x0086 }\n r3 = new java.lang.StringBuilder;\t Catch:{ IOException -> 0x0086 }\n r3.<init>();\t Catch:{ IOException -> 0x0086 }\n r4 = \"Attempt \";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = r6.f1533u;\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r4 = \" to execute request\";\t Catch:{ IOException -> 0x0086 }\n r3.append(r4);\t Catch:{ IOException -> 0x0086 }\n r3 = r3.toString();\t Catch:{ IOException -> 0x0086 }\n r2.m260a(r3);\t Catch:{ IOException -> 0x0086 }\n L_0x007c:\n r2 = r6.f1518f;\t Catch:{ IOException -> 0x0086 }\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0086 }\n r2 = r2.m464a(r0, r3, r8);\t Catch:{ IOException -> 0x0086 }\n r1 = r2;\n L_0x0085:\n return r1;\n L_0x0086:\n r2 = move-exception;\n r3 = r6.f1513a;\n r4 = \"Closing the connection.\";\n r3.m260a(r4);\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0093 }\n r3.close();\t Catch:{ IOException -> 0x0093 }\n L_0x0093:\n r3 = r6.f1520h;\n r4 = r0.m2802d();\n r3 = r3.retryRequest(r2, r4, r8);\n if (r3 == 0) goto L_0x010a;\n L_0x009f:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x00d9;\n L_0x00a7:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when processing request to \";\n r4.append(r5);\n r4.append(r7);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n L_0x00d9:\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x00ea;\n L_0x00e1:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x00ea:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x000a;\n L_0x00f2:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"Retrying request to \";\n r4.append(r5);\n r4.append(r7);\n r4 = r4.toString();\n r3.m269d(r4);\n goto L_0x000a;\n L_0x010a:\n r8 = r2 instanceof p000a.p001a.p002a.p003a.C0176z;\n if (r8 == 0) goto L_0x0134;\n L_0x010e:\n r8 = new a.a.a.a.z;\n r0 = new java.lang.StringBuilder;\n r0.<init>();\n r7 = r7.mo10a();\n r7 = r7.m474e();\n r0.append(r7);\n r7 = \" failed to respond\";\n r0.append(r7);\n r7 = r0.toString();\n r8.<init>(r7);\n r7 = r2.getStackTrace();\n r8.setStackTrace(r7);\n throw r8;\n L_0x0134:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.b(a.a.a.a.i.b.x, a.a.a.a.n.e):a.a.a.a.s\");\n }",
"void m5768b() throws C0841b;",
"void m1864a() {\r\n }",
"public boolean method_2088(class_689 param1) {\r\n // $FF: Couldn't be decompiled\r\n }",
"void m5770d() throws C0841b;",
"public static void m5820b(java.lang.String r3, java.lang.String r4, java.lang.String r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.StartCheckoutEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r1 = 1;\n r0.putItemCount(r1);\n r1 = java.lang.Long.parseLong(r3);\t Catch:{ Exception -> 0x001f }\n r3 = java.math.BigDecimal.valueOf(r1);\t Catch:{ Exception -> 0x001f }\n r0.putTotalPrice(r3);\t Catch:{ Exception -> 0x001f }\n L_0x001f:\n r3 = \"type\";\n r0.putCustomAttribute(r3, r4);\n r3 = \"cta\";\n r0.putCustomAttribute(r3, r5);\n r3 = com.crashlytics.android.answers.Answers.getInstance();\n r3.logStartCheckout(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.b(java.lang.String, java.lang.String, java.lang.String):void\");\n }",
"public final void mo91715d() {\n }",
"public static void m5812a(java.lang.String r0, java.lang.String r1, java.lang.String r2) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r2 = new com.crashlytics.android.answers.AddToCartEvent;\n r2.<init>();\n r2.putItemType(r0);\n r0 = java.lang.Long.parseLong(r1);\t Catch:{ Exception -> 0x0013 }\n r0 = java.math.BigDecimal.valueOf(r0);\t Catch:{ Exception -> 0x0013 }\n r2.putItemPrice(r0);\t Catch:{ Exception -> 0x0013 }\n L_0x0013:\n r0 = java.util.Locale.getDefault();\n r0 = java.util.Currency.getInstance(r0);\n r2.putCurrency(r0);\n r0 = com.crashlytics.android.answers.Answers.getInstance();\n r0.logAddToCart(r2);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String):void\");\n }",
"public void method_4270() {}",
"private static void m13381a(long r3, float r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r0 = com.foursquare.internal.data.db.C1916a.getDatabase();\n r0.beginTransaction();\t Catch:{ Exception -> 0x001f }\n r1 = \"INSERT INTO battery_watcher (timestamp, level) VALUES (?, ?)\";\t Catch:{ Exception -> 0x001f }\n r1 = r0.compileStatement(r1);\t Catch:{ Exception -> 0x001f }\n r2 = 1;\t Catch:{ Exception -> 0x001f }\n r1.bindLong(r2, r3);\t Catch:{ Exception -> 0x001f }\n r3 = 2;\t Catch:{ Exception -> 0x001f }\n r4 = (double) r5;\t Catch:{ Exception -> 0x001f }\n r1.bindDouble(r3, r4);\t Catch:{ Exception -> 0x001f }\n r1.execute();\t Catch:{ Exception -> 0x001f }\n r0.setTransactionSuccessful();\t Catch:{ Exception -> 0x001f }\n goto L_0x0026;\n L_0x001d:\n r3 = move-exception;\n goto L_0x002a;\n L_0x001f:\n r3 = f10646a;\t Catch:{ all -> 0x001d }\n r4 = \"Issue adding location to battery history\";\t Catch:{ all -> 0x001d }\n com.foursquare.internal.util.FsLog.m6807d(r3, r4);\t Catch:{ all -> 0x001d }\n L_0x0026:\n r0.endTransaction();\n return;\n L_0x002a:\n r0.endTransaction();\n throw r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.foursquare.pilgrim.e.a(long, float):void\");\n }",
"static void method_461() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private static class_1205 method_6442(String param0, int param1) {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void method_2112(int param1, int param2, int param3, aji param4, int param5, int param6) {\r\n // $FF: Couldn't be decompiled\r\n }",
"void m5769c() throws C0841b;",
"void m5771e() throws C0841b;",
"@Override // X.AnonymousClass0PN\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public void A0D() {\n /*\n r5 = this;\n super.A0D()\n X.08d r0 = r5.A05\n X.0OQ r4 = r0.A04()\n X.0Rk r3 = r4.A00() // Catch:{ all -> 0x003d }\n X.0BK r2 = r4.A04 // Catch:{ all -> 0x0036 }\n java.lang.String r1 = \"DELETE FROM receipt_device\"\n java.lang.String r0 = \"CLEAR_TABLE_RECEIPT_DEVICE\"\n r2.A0C(r1, r0) // Catch:{ all -> 0x0036 }\n X.08m r1 = r5.A03 // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"receipt_device_migration_complete\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_index\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n java.lang.String r0 = \"migration_receipt_device_retry\"\n r1.A02(r0) // Catch:{ all -> 0x0036 }\n r3.A00() // Catch:{ all -> 0x0036 }\n r3.close()\n r4.close()\n java.lang.String r0 = \"ReceiptDeviceStore/ReceiptDeviceDatabaseMigration/resetMigration/done\"\n com.whatsapp.util.Log.i(r0)\n return\n L_0x0036:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x0038 }\n L_0x0038:\n r0 = move-exception\n r3.close() // Catch:{ all -> 0x003c }\n L_0x003c:\n throw r0\n L_0x003d:\n r0 = move-exception\n throw r0 // Catch:{ all -> 0x003f }\n L_0x003f:\n r0 = move-exception\n r4.close() // Catch:{ all -> 0x0043 }\n L_0x0043:\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: X.C43661yk.A0D():void\");\n }",
"public static void m5813a(java.lang.String r2, java.lang.String r3, java.lang.String r4, boolean r5) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = new com.crashlytics.android.answers.PurchaseEvent;\n r0.<init>();\n r1 = java.util.Locale.getDefault();\n r1 = java.util.Currency.getInstance(r1);\n r0.putCurrency(r1);\n r0.putItemId(r2);\n r0.putItemType(r3);\n r2 = java.lang.Long.parseLong(r4);\t Catch:{ Exception -> 0x0021 }\n r2 = java.math.BigDecimal.valueOf(r2);\t Catch:{ Exception -> 0x0021 }\n r0.putItemPrice(r2);\t Catch:{ Exception -> 0x0021 }\n L_0x0021:\n r0.putSuccess(r5);\n r2 = com.crashlytics.android.answers.Answers.getInstance();\n r2.logPurchase(r0);\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.d.a(java.lang.String, java.lang.String, java.lang.String, boolean):void\");\n }",
"public void method_2111(int param1, int param2, int param3, aji param4, int param5, int param6) {\r\n // $FF: Couldn't be decompiled\r\n }",
"@androidx.annotation.Nullable\n /* renamed from: j */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final p005b.p096l.p097a.p151d.p152a.p154b.C3474b mo14822j(java.lang.String r9) {\n /*\n r8 = this;\n java.io.File r0 = new java.io.File\n java.io.File r1 = r8.mo14820g()\n r0.<init>(r1, r9)\n boolean r1 = r0.exists()\n r2 = 3\n r3 = 6\n r4 = 1\n r5 = 0\n r6 = 0\n if (r1 != 0) goto L_0x0022\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s\"\n r0.mo14884b(r2, r9, r1)\n L_0x001f:\n r9 = r6\n goto L_0x0093\n L_0x0022:\n java.io.File r1 = new java.io.File\n b.l.a.d.a.b.o1 r7 = r8.f6567b\n int r7 = r7.mo14797a()\n java.lang.String r7 = java.lang.String.valueOf(r7)\n r1.<init>(r0, r7)\n boolean r0 = r1.exists()\n r7 = 2\n if (r0 != 0) goto L_0x0050\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Pack not found with pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0050:\n java.io.File[] r0 = r1.listFiles()\n if (r0 == 0) goto L_0x007b\n int r1 = r0.length\n if (r1 != 0) goto L_0x005a\n goto L_0x007b\n L_0x005a:\n if (r1 <= r4) goto L_0x0074\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"Multiple pack versions found for pack name: %s app version: %s\"\n r0.mo14884b(r3, r9, r1)\n goto L_0x001f\n L_0x0074:\n r9 = r0[r5]\n java.lang.String r9 = r9.getCanonicalPath()\n goto L_0x0093\n L_0x007b:\n b.l.a.d.a.e.f r0 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r7]\n r1[r5] = r9\n b.l.a.d.a.b.o1 r9 = r8.f6567b\n int r9 = r9.mo14797a()\n java.lang.Integer r9 = java.lang.Integer.valueOf(r9)\n r1[r4] = r9\n java.lang.String r9 = \"No pack version found for pack name: %s app version: %s\"\n r0.mo14884b(r2, r9, r1)\n goto L_0x001f\n L_0x0093:\n if (r9 != 0) goto L_0x0096\n return r6\n L_0x0096:\n java.io.File r0 = new java.io.File\n java.lang.String r1 = \"assets\"\n r0.<init>(r9, r1)\n boolean r1 = r0.isDirectory()\n if (r1 != 0) goto L_0x00af\n b.l.a.d.a.e.f r9 = f6563c\n java.lang.Object[] r1 = new java.lang.Object[r4]\n r1[r5] = r0\n java.lang.String r0 = \"Failed to find assets directory: %s\"\n r9.mo14884b(r3, r0, r1)\n return r6\n L_0x00af:\n java.lang.String r0 = r0.getCanonicalPath()\n b.l.a.d.a.b.w r1 = new b.l.a.d.a.b.w\n r1.<init>(r5, r9, r0)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p005b.p096l.p097a.p151d.p152a.p154b.C3544t.mo14822j(java.lang.String):b.l.a.d.a.b.b\");\n }",
"public boolean method_2243() {\r\n // $FF: Couldn't be decompiled\r\n }",
"private void m1654a(p000a.p001a.p002a.p003a.p022i.p024b.C0112x r7, p000a.p001a.p002a.p003a.p034n.C0157e r8) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/293907205.run(Unknown Source)\n*/\n /*\n r6 = this;\n r0 = r7.m322b();\n r7 = r7.m321a();\n r1 = 0;\n L_0x0009:\n r2 = \"http.request\";\n r8.mo160a(r2, r7);\n r1 = r1 + 1;\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r2 = r2.mo1932c();\t Catch:{ IOException -> 0x002f }\n if (r2 != 0) goto L_0x0020;\t Catch:{ IOException -> 0x002f }\n L_0x0018:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x002f }\n r2.mo2023a(r0, r8, r3);\t Catch:{ IOException -> 0x002f }\n goto L_0x002b;\t Catch:{ IOException -> 0x002f }\n L_0x0020:\n r2 = r6.f1529q;\t Catch:{ IOException -> 0x002f }\n r3 = r6.f1528p;\t Catch:{ IOException -> 0x002f }\n r3 = p000a.p001a.p002a.p003a.p032l.C0150c.m428a(r3);\t Catch:{ IOException -> 0x002f }\n r2.mo1931b(r3);\t Catch:{ IOException -> 0x002f }\n L_0x002b:\n r6.m1660a(r0, r8);\t Catch:{ IOException -> 0x002f }\n return;\n L_0x002f:\n r2 = move-exception;\n r3 = r6.f1529q;\t Catch:{ IOException -> 0x0035 }\n r3.close();\t Catch:{ IOException -> 0x0035 }\n L_0x0035:\n r3 = r6.f1520h;\n r3 = r3.retryRequest(r2, r1, r8);\n if (r3 == 0) goto L_0x00a0;\n L_0x003d:\n r3 = r6.f1513a;\n r3 = r3.m270d();\n if (r3 == 0) goto L_0x0009;\n L_0x0045:\n r3 = r6.f1513a;\n r4 = new java.lang.StringBuilder;\n r4.<init>();\n r5 = \"I/O exception (\";\n r4.append(r5);\n r5 = r2.getClass();\n r5 = r5.getName();\n r4.append(r5);\n r5 = \") caught when connecting to \";\n r4.append(r5);\n r4.append(r0);\n r5 = \": \";\n r4.append(r5);\n r5 = r2.getMessage();\n r4.append(r5);\n r4 = r4.toString();\n r3.m269d(r4);\n r3 = r6.f1513a;\n r3 = r3.m262a();\n if (r3 == 0) goto L_0x0088;\n L_0x007f:\n r3 = r6.f1513a;\n r4 = r2.getMessage();\n r3.m261a(r4, r2);\n L_0x0088:\n r2 = r6.f1513a;\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r4 = \"Retrying connect to \";\n r3.append(r4);\n r3.append(r0);\n r3 = r3.toString();\n r2.m269d(r3);\n goto L_0x0009;\n L_0x00a0:\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.a.a.a.i.b.p.a(a.a.a.a.i.b.x, a.a.a.a.n.e):void\");\n }",
"private final void asx() {\n /*\n r12 = this;\n r0 = r12.cFE;\n if (r0 == 0) goto L_0x0073;\n L_0x0004:\n r1 = r12.cxs;\n if (r1 == 0) goto L_0x0073;\n L_0x0008:\n r1 = r12.ayL;\n if (r1 != 0) goto L_0x000d;\n L_0x000c:\n goto L_0x0073;\n L_0x000d:\n r2 = 0;\n if (r1 == 0) goto L_0x0027;\n L_0x0010:\n r1 = r1.Km();\n if (r1 == 0) goto L_0x0027;\n L_0x0016:\n r1 = r1.aar();\n if (r1 == 0) goto L_0x0027;\n L_0x001c:\n r3 = r0.getName();\n r1 = r1.get(r3);\n r1 = (java.util.ArrayList) r1;\n goto L_0x0028;\n L_0x0027:\n r1 = r2;\n L_0x0028:\n if (r1 == 0) goto L_0x0051;\n L_0x002a:\n r1 = (java.lang.Iterable) r1;\n r1 = kotlin.collections.u.Z(r1);\n if (r1 == 0) goto L_0x0051;\n L_0x0032:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$1;\n r3.<init>(r12);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.b(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x003f:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$2;\n r3.<init>(r0);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.f(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x004c:\n r1 = kotlin.sequences.n.f(r1);\n goto L_0x0052;\n L_0x0051:\n r1 = r2;\n L_0x0052:\n r3 = r12.asr();\n if (r1 == 0) goto L_0x0059;\n L_0x0058:\n goto L_0x005d;\n L_0x0059:\n r1 = kotlin.collections.m.emptyList();\n L_0x005d:\n r4 = r12.bub;\n if (r4 == 0) goto L_0x006d;\n L_0x0061:\n r5 = 0;\n r6 = 0;\n r7 = 1;\n r8 = 0;\n r9 = 0;\n r10 = 19;\n r11 = 0;\n r2 = com.iqoption.core.util.e.a(r4, r5, r6, r7, r8, r9, r10, r11);\n L_0x006d:\n r3.c(r1, r2);\n r12.d(r0);\n L_0x0073:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.asx():void\");\n }",
"public void method_2116(class_689 param1, boolean param2) {\r\n // $FF: Couldn't be decompiled\r\n }",
"private static int m69982c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = \"android.os.Build$VERSION\";\t Catch:{ Exception -> 0x0018 }\n r0 = java.lang.Class.forName(r0);\t Catch:{ Exception -> 0x0018 }\n r1 = \"SDK_INT\";\t Catch:{ Exception -> 0x0018 }\n r0 = r0.getField(r1);\t Catch:{ Exception -> 0x0018 }\n r1 = 0;\t Catch:{ Exception -> 0x0018 }\n r0 = r0.get(r1);\t Catch:{ Exception -> 0x0018 }\n r0 = (java.lang.Integer) r0;\t Catch:{ Exception -> 0x0018 }\n r0 = r0.intValue();\t Catch:{ Exception -> 0x0018 }\n return r0;\n L_0x0018:\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rx.internal.util.f.c():int\");\n }",
"static void m7753b() {\n f8029a = false;\n }",
"public final synchronized com.google.android.m4b.maps.bu.C4910a m21843a(java.lang.String r10) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/79094208.run(Unknown Source)\n*/\n /*\n r9 = this;\n monitor-enter(r9);\n r0 = r9.f17909e;\t Catch:{ all -> 0x0056 }\n r1 = 0;\n if (r0 != 0) goto L_0x0008;\n L_0x0006:\n monitor-exit(r9);\n return r1;\n L_0x0008:\n r0 = r9.f17907c;\t Catch:{ all -> 0x0056 }\n r2 = com.google.android.m4b.maps.az.C4733b.m21060a(r10);\t Catch:{ all -> 0x0056 }\n r0 = r0.m21933a(r2, r1);\t Catch:{ all -> 0x0056 }\n if (r0 == 0) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0014:\n r2 = r0.length;\t Catch:{ all -> 0x0056 }\n r3 = 9;\t Catch:{ all -> 0x0056 }\n if (r2 <= r3) goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0019:\n r2 = 0;\t Catch:{ all -> 0x0056 }\n r2 = r0[r2];\t Catch:{ all -> 0x0056 }\n r4 = 1;\t Catch:{ all -> 0x0056 }\n if (r2 == r4) goto L_0x0020;\t Catch:{ all -> 0x0056 }\n L_0x001f:\n goto L_0x0054;\t Catch:{ all -> 0x0056 }\n L_0x0020:\n r5 = com.google.android.m4b.maps.bs.C4891e.m21914c(r0, r4);\t Catch:{ all -> 0x0056 }\n r2 = new com.google.android.m4b.maps.ar.a;\t Catch:{ all -> 0x0056 }\n r7 = com.google.android.m4b.maps.de.C5350x.f20104b;\t Catch:{ all -> 0x0056 }\n r2.<init>(r7);\t Catch:{ all -> 0x0056 }\n r7 = new java.io.ByteArrayInputStream;\t Catch:{ IOException -> 0x0052 }\n r8 = r0.length;\t Catch:{ IOException -> 0x0052 }\n r8 = r8 - r3;\t Catch:{ IOException -> 0x0052 }\n r7.<init>(r0, r3, r8);\t Catch:{ IOException -> 0x0052 }\n r2.m20818a(r7);\t Catch:{ IOException -> 0x0052 }\n r0 = 2;\n r0 = r2.m20843h(r0);\t Catch:{ all -> 0x0056 }\n r10 = r10.equals(r0);\t Catch:{ all -> 0x0056 }\n if (r10 != 0) goto L_0x0042;\n L_0x0040:\n monitor-exit(r9);\n return r1;\n L_0x0042:\n r10 = new com.google.android.m4b.maps.bu.a;\t Catch:{ all -> 0x0056 }\n r10.<init>();\t Catch:{ all -> 0x0056 }\n r10.m22018a(r4);\t Catch:{ all -> 0x0056 }\n r10.m22020a(r2);\t Catch:{ all -> 0x0056 }\n r10.m22016a(r5);\t Catch:{ all -> 0x0056 }\n monitor-exit(r9);\n return r10;\n L_0x0052:\n monitor-exit(r9);\n return r1;\n L_0x0054:\n monitor-exit(r9);\n return r1;\n L_0x0056:\n r10 = move-exception;\n monitor-exit(r9);\n throw r10;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.bs.b.a(java.lang.String):com.google.android.m4b.maps.bu.a\");\n }",
"public static int m22557b(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = com.google.android.gms.internal.measurement.dr.m11788a(r1);\t Catch:{ zzyn -> 0x0005 }\n goto L_0x000c;\n L_0x0005:\n r0 = com.google.android.gms.internal.measurement.zzvo.f10281a;\n r1 = r1.getBytes(r0);\n r0 = r1.length;\n L_0x000c:\n r1 = m22576g(r0);\n r1 = r1 + r0;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.measurement.zzut.b(java.lang.String):int\");\n }",
"public void method_7080(String param1, class_1293 param2) {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void m9741j() throws cf {\r\n }",
"private static void check(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: java.security.Signer.check(java.lang.String):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.check(java.lang.String):void\");\n }",
"public boolean method_2153(boolean param1) {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void method_2259(String param1, double param2, double param4, double param6, int param8, double param9, double param11, double param13, double param15) {\r\n // $FF: Couldn't be decompiled\r\n }",
"private void m50367F() {\n }",
"public void mo21779D() {\n }",
"public final synchronized void mo5320b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r1 = 0;\t Catch:{ all -> 0x004c }\n r2 = 0;\t Catch:{ all -> 0x004c }\n if (r0 == 0) goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0007:\n r0 = r6.f24851a;\t Catch:{ all -> 0x004c }\n if (r0 != 0) goto L_0x0013;\t Catch:{ all -> 0x004c }\n L_0x000b:\n r0 = r6.f24854d;\t Catch:{ all -> 0x004c }\n r3 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r0.deleteFile(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0013:\n r0 = com.google.android.m4b.maps.cg.bx.m23058b();\t Catch:{ all -> 0x004c }\n r3 = r6.f24854d;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24853c;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r3 = r3.openFileOutput(r4, r1);\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24851a;\t Catch:{ IOException -> 0x0033 }\n r4 = r4.m20837d();\t Catch:{ IOException -> 0x0033 }\n r3.write(r4);\t Catch:{ IOException -> 0x0033 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n L_0x002b:\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\n L_0x002f:\n r1 = move-exception;\n r3 = r2;\n goto L_0x003f;\n L_0x0032:\n r3 = r2;\n L_0x0033:\n r4 = r6.f24854d;\t Catch:{ all -> 0x003e }\n r5 = r6.f24853c;\t Catch:{ all -> 0x003e }\n r4.deleteFile(r5);\t Catch:{ all -> 0x003e }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n goto L_0x002b;\t Catch:{ all -> 0x004c }\n L_0x003e:\n r1 = move-exception;\t Catch:{ all -> 0x004c }\n L_0x003f:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n throw r1;\t Catch:{ all -> 0x004c }\n L_0x0046:\n r6.f24851a = r2;\t Catch:{ all -> 0x004c }\n r6.f24852b = r1;\t Catch:{ all -> 0x004c }\n monitor-exit(r6);\n return;\n L_0x004c:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.b():void\");\n }",
"private synchronized void m29549c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x0050 }\n if (r0 == 0) goto L_0x004b;\t Catch:{ all -> 0x0050 }\n L_0x0005:\n r0 = com.google.android.m4b.maps.cg.bx.m23056a();\t Catch:{ all -> 0x0050 }\n r1 = 0;\n r2 = r6.f24854d;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r3 = r6.f24853c;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r2 = r2.openFileInput(r3);\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n if (r2 == 0) goto L_0x0027;\n L_0x0014:\n r3 = new com.google.android.m4b.maps.ar.a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.de.af.f19891a;\t Catch:{ IOException -> 0x0036 }\n r3.<init>(r4);\t Catch:{ IOException -> 0x0036 }\n r6.f24851a = r3;\t Catch:{ IOException -> 0x0036 }\n r3 = r6.f24851a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.ap.C4655c.m20771a(r2);\t Catch:{ IOException -> 0x0036 }\n r3.m20819a(r4);\t Catch:{ IOException -> 0x0036 }\n goto L_0x0029;\t Catch:{ IOException -> 0x0036 }\n L_0x0027:\n r6.f24851a = r1;\t Catch:{ IOException -> 0x0036 }\n L_0x0029:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n L_0x002c:\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n goto L_0x004b;\n L_0x0030:\n r2 = move-exception;\n r5 = r2;\n r2 = r1;\n r1 = r5;\n goto L_0x0044;\n L_0x0035:\n r2 = r1;\n L_0x0036:\n r6.f24851a = r1;\t Catch:{ all -> 0x0043 }\n r1 = r6.f24854d;\t Catch:{ all -> 0x0043 }\n r3 = r6.f24853c;\t Catch:{ all -> 0x0043 }\n r1.deleteFile(r3);\t Catch:{ all -> 0x0043 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n goto L_0x002c;\t Catch:{ all -> 0x0050 }\n L_0x0043:\n r1 = move-exception;\t Catch:{ all -> 0x0050 }\n L_0x0044:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n throw r1;\t Catch:{ all -> 0x0050 }\n L_0x004b:\n r0 = 1;\t Catch:{ all -> 0x0050 }\n r6.f24852b = r0;\t Catch:{ all -> 0x0050 }\n monitor-exit(r6);\n return;\n L_0x0050:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.c():void\");\n }",
"public void method_2249(boolean param1, class_81 param2) {\r\n // $FF: Couldn't be decompiled\r\n }",
"public void mo115190b() {\n }",
"public final void mo1285b() {\n }",
"public void mo23813b() {\n }",
"public boolean method_208() {\r\n return false;\r\n }",
"public final void mo11687c() {\n }",
"public static com.facebook.ads.internal.p081a.C1714d m6464a(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = android.text.TextUtils.isEmpty(r1);\n if (r0 == 0) goto L_0x0009;\n L_0x0006:\n r1 = NONE;\n return r1;\n L_0x0009:\n r0 = java.util.Locale.US;\t Catch:{ IllegalArgumentException -> 0x0014 }\n r1 = r1.toUpperCase(r0);\t Catch:{ IllegalArgumentException -> 0x0014 }\n r1 = com.facebook.ads.internal.p081a.C1714d.valueOf(r1);\t Catch:{ IllegalArgumentException -> 0x0014 }\n return r1;\n L_0x0014:\n r1 = NONE;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.ads.internal.a.d.a(java.lang.String):com.facebook.ads.internal.a.d\");\n }",
"public final void mo51373a() {\n }",
"void mo72113b();",
"public boolean method_2434() {\r\n return false;\r\n }",
"public void mo21787L() {\n }",
"boolean m25333a(java.lang.String r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = this;\n java.lang.Class.forName(r1);\t Catch:{ ClassNotFoundException -> 0x0005 }\n r1 = 1;\n return r1;\n L_0x0005:\n r1 = 0;\n return r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mapbox.android.core.location.c.a(java.lang.String):boolean\");\n }",
"private void kk12() {\n\n\t}",
"void mo80457c();",
"@org.jetbrains.annotations.NotNull\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public static /* synthetic */ com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection copy$default(com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection r4, com.bitcoin.mwallet.core.models.slp.Slp r5, java.util.List<kotlin.ULong> r6, com.bitcoin.bitcoink.p008tx.Satoshis r7, com.bitcoin.bitcoink.p008tx.Satoshis r8, java.util.List<com.bitcoin.mwallet.core.models.p009tx.utxo.Utxo> r9, com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.Error r10, int r11, java.lang.Object r12) {\n /*\n r12 = r11 & 1\n if (r12 == 0) goto L_0x0006\n com.bitcoin.mwallet.core.models.slp.Slp r5 = r4.token\n L_0x0006:\n r12 = r11 & 2\n if (r12 == 0) goto L_0x000c\n java.util.List<kotlin.ULong> r6 = r4.quantities\n L_0x000c:\n r12 = r6\n r6 = r11 & 4\n if (r6 == 0) goto L_0x0013\n com.bitcoin.bitcoink.tx.Satoshis r7 = r4.fee\n L_0x0013:\n r0 = r7\n r6 = r11 & 8\n if (r6 == 0) goto L_0x001a\n com.bitcoin.bitcoink.tx.Satoshis r8 = r4.change\n L_0x001a:\n r1 = r8\n r6 = r11 & 16\n if (r6 == 0) goto L_0x0021\n java.util.List<com.bitcoin.mwallet.core.models.tx.utxo.Utxo> r9 = r4.utxos\n L_0x0021:\n r2 = r9\n r6 = r11 & 32\n if (r6 == 0) goto L_0x0028\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error r10 = r4.error\n L_0x0028:\n r3 = r10\n r6 = r4\n r7 = r5\n r8 = r12\n r9 = r0\n r10 = r1\n r11 = r2\n r12 = r3\n com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection r4 = r6.copy(r7, r8, r9, r10, r11, r12)\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.bitcoin.mwallet.core.models.p009tx.slputxo.SlpUtxoSelection.copy$default(com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection, com.bitcoin.mwallet.core.models.slp.Slp, java.util.List, com.bitcoin.bitcoink.tx.Satoshis, com.bitcoin.bitcoink.tx.Satoshis, java.util.List, com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection$Error, int, java.lang.Object):com.bitcoin.mwallet.core.models.tx.slputxo.SlpUtxoSelection\");\n }",
"public boolean A_()\r\n/* 21: */ {\r\n/* 22:138 */ return true;\r\n/* 23: */ }",
"private final boolean e() {\n /*\n r15 = this;\n r2 = 0\n r1 = 0\n dtd r0 = r15.m // Catch:{ all -> 0x008e }\n if (r0 != 0) goto L_0x000d\n dtd r0 = new dtd // Catch:{ all -> 0x008e }\n r0.<init>() // Catch:{ all -> 0x008e }\n r15.m = r0 // Catch:{ all -> 0x008e }\n L_0x000d:\n int r0 = r15.k // Catch:{ all -> 0x008e }\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x039e\n dvk r3 = r15.g // Catch:{ all -> 0x008e }\n if (r3 == 0) goto L_0x0356\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 == 0) goto L_0x0025\n int r3 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != r4) goto L_0x0032\n L_0x0025:\n r3 = 2097152(0x200000, float:2.938736E-39)\n int r3 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = new byte[r3] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r15.h = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r15.i = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0032:\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.length // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r4\n int r6 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r7 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r8 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r9 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n boolean r0 = r7.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x00ac\n r0 = 1\n L_0x0047:\n java.lang.String r3 = \"GzipInflatingBuffer is closed\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 0\n r0 = 1\n r5 = r3\n L_0x004f:\n if (r0 == 0) goto L_0x02ef\n int r3 = r6 - r5\n if (r3 <= 0) goto L_0x02ef\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.ordinal() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n switch(r0) {\n case 0: goto L_0x00ae;\n case 1: goto L_0x0148;\n case 2: goto L_0x0171;\n case 3: goto L_0x01d7;\n case 4: goto L_0x01fc;\n case 5: goto L_0x0221;\n case 6: goto L_0x0256;\n case 7: goto L_0x0289;\n case 8: goto L_0x02a2;\n case 9: goto L_0x02e9;\n default: goto L_0x005e;\n } // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x005e:\n java.lang.AssertionError r0 = new java.lang.AssertionError // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = java.lang.String.valueOf(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4.length() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r4 + 15\n java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5.<init>(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r4 = \"Invalid state: \"\n java.lang.StringBuilder r4 = r5.append(r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.StringBuilder r3 = r4.append(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = r3.toString() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0087:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x008e:\n r0 = move-exception\n if (r2 <= 0) goto L_0x00ab\n dxe r3 = r15.a\n r3.a(r2)\n dxh r3 = r15.j\n dxh r4 = defpackage.dxh.BODY\n if (r3 != r4) goto L_0x00ab\n dvk r3 = r15.g\n if (r3 == 0) goto L_0x03c9\n dzo r2 = r15.d\n long r4 = (long) r1\n r2.d(r4)\n int r2 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n L_0x00ab:\n throw r0\n L_0x00ac:\n r0 = 0\n goto L_0x0047\n L_0x00ae:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x00ba\n r0 = 0\n goto L_0x004f\n L_0x00ba:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 35615(0x8b1f, float:4.9907E-41)\n if (r0 == r3) goto L_0x00d4\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Not in GZIP format\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00cd:\n r0 = move-exception\n java.lang.RuntimeException r3 = new java.lang.RuntimeException // Catch:{ all -> 0x008e }\n r3.<init>(r0) // Catch:{ all -> 0x008e }\n throw r3 // Catch:{ all -> 0x008e }\n L_0x00d4:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 8\n if (r0 == r3) goto L_0x00e6\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Unsupported compression method\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x00e6:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.j = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvl r4 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 6\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r10.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3 - r10\n if (r3 <= 0) goto L_0x03d9\n r0 = 6\n int r0 = java.lang.Math.min(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r10 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r10 = r10.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r11 = r11.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r10, r11, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = 6 - r0\n r3 = r0\n L_0x0118:\n if (r3 <= 0) goto L_0x013b\n r0 = 512(0x200, float:7.175E-43)\n byte[] r10 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x011f:\n if (r0 >= r3) goto L_0x013b\n int r11 = r3 - r0\n r12 = 512(0x200, float:7.175E-43)\n int r11 = java.lang.Math.min(r11, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r12 = r12.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.a(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r12 = r12.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r13 = 0\n r12.update(r10, r13, r11) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r11\n goto L_0x011f\n L_0x013b:\n dvk r0 = r4.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 6\n defpackage.dvk.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA_LEN // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0148:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 4\n r3 = 4\n if (r0 == r3) goto L_0x0156\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0156:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0162\n r0 = 0\n goto L_0x004f\n L_0x0162:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.k = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_EXTRA // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0171:\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 >= r3) goto L_0x017e\n r0 = 0\n goto L_0x004f\n L_0x017e:\n dvl r10 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r7.k // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x03d6\n int r0 = java.lang.Math.min(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r3 = r3.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r11 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r11 = r11.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r12 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r12 = r12.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.update(r11, r12, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r3 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.a(r3, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r4 - r0\n r3 = r0\n L_0x01a8:\n if (r3 <= 0) goto L_0x01cb\n r0 = 512(0x200, float:7.175E-43)\n byte[] r11 = new byte[r0] // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 0\n L_0x01af:\n if (r0 >= r3) goto L_0x01cb\n int r12 = r3 - r0\n r13 = 512(0x200, float:7.175E-43)\n int r12 = java.lang.Math.min(r12, r13) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r13 = r13.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.a(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r13 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.CRC32 r13 = r13.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r14 = 0\n r13.update(r11, r14, r12) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r12\n goto L_0x01af\n L_0x01cb:\n dvk r0 = r10.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n defpackage.dvk.b(r0, r4) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.HEADER_NAME // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01d7:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 8\n r3 = 8\n if (r0 != r3) goto L_0x01f5\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x01e1:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x01f3\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x01e1\n r0 = 1\n L_0x01ee:\n if (r0 != 0) goto L_0x01f5\n r0 = 0\n goto L_0x004f\n L_0x01f3:\n r0 = 0\n goto L_0x01ee\n L_0x01f5:\n dvm r0 = defpackage.dvm.HEADER_COMMENT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x01fc:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 16\n r3 = 16\n if (r0 != r3) goto L_0x021a\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0206:\n int r3 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 <= 0) goto L_0x0218\n int r3 = r0.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r3 != 0) goto L_0x0206\n r0 = 1\n L_0x0213:\n if (r0 != 0) goto L_0x021a\n r0 = 0\n goto L_0x004f\n L_0x0218:\n r0 = 0\n goto L_0x0213\n L_0x021a:\n dvm r0 = defpackage.dvm.HEADER_CRC // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0221:\n int r0 = r7.j // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = r0 & 2\n r3 = 2\n if (r0 != r3) goto L_0x024f\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 2\n if (r0 >= r3) goto L_0x0234\n r0 = 0\n goto L_0x004f\n L_0x0234:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n long r10 = r0.getValue() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = (int) r10 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 65535(0xffff, float:9.1834E-41)\n r0 = r0 & r3\n dvl r3 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r3.c() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == r3) goto L_0x024f\n java.util.zip.ZipException r0 = new java.util.zip.ZipException // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.lang.String r3 = \"Corrupt GZIP header\"\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n throw r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x024f:\n dvm r0 = defpackage.dvm.INITIALIZE_INFLATER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x0256:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x027e\n java.util.zip.Inflater r0 = new java.util.zip.Inflater // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 1\n r0.<init>(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.g = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x0262:\n java.util.zip.CRC32 r0 = r7.b // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 - r3\n if (r0 <= 0) goto L_0x0284\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n L_0x027b:\n r0 = 1\n goto L_0x004f\n L_0x027e:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.reset() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x0262\n L_0x0284:\n dvm r0 = defpackage.dvm.INFLATER_NEEDS_INPUT // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x027b\n L_0x0289:\n int r0 = r9 + r5\n int r0 = r7.a(r8, r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r5 + r0\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r4 = defpackage.dvm.TRAILER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r4) goto L_0x029e\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r5 = r3\n goto L_0x004f\n L_0x029e:\n r0 = 1\n r5 = r3\n goto L_0x004f\n L_0x02a2:\n java.util.zip.Inflater r0 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 == 0) goto L_0x02c7\n r0 = 1\n L_0x02a7:\n java.lang.String r3 = \"inflater is null\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r7.f // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x02c9\n r0 = 1\n L_0x02b3:\n java.lang.String r3 = \"inflaterInput has unconsumed bytes\"\n defpackage.cld.b(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r0 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 512(0x200, float:7.175E-43)\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != 0) goto L_0x02cb\n r0 = 0\n goto L_0x004f\n L_0x02c7:\n r0 = 0\n goto L_0x02a7\n L_0x02c9:\n r0 = 0\n goto L_0x02b3\n L_0x02cb:\n r3 = 0\n r7.e = r3 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.f = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dtd r3 = r7.a // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.a(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n java.util.zip.Inflater r3 = r7.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r4 = r7.d // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r10 = r7.e // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3.setInput(r4, r10, r0) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r0 = defpackage.dvm.INFLATING // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r7.h = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0 = 1\n goto L_0x004f\n L_0x02e9:\n boolean r0 = r7.a() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x004f\n L_0x02ef:\n if (r0 == 0) goto L_0x0301\n dvm r0 = r7.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvm r3 = defpackage.dvm.HEADER // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n if (r0 != r3) goto L_0x0334\n dvl r0 = r7.c // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0.b() // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r3 = 10\n if (r0 >= r3) goto L_0x0334\n L_0x0301:\n r0 = 1\n L_0x0302:\n r7.n = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.l // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.l = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r2 = r2 + r3\n dvk r0 = r15.g // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r3 = r0.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r4 = 0\n r0.m = r4 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r1 = r1 + r3\n if (r5 != 0) goto L_0x0342\n if (r2 <= 0) goto L_0x0332\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0332\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x0336\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0332:\n r0 = 0\n L_0x0333:\n return r0\n L_0x0334:\n r0 = 0\n goto L_0x0302\n L_0x0336:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0332\n L_0x0342:\n dtd r0 = r15.m // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n byte[] r3 = r15.h // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r4 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n dxv r3 = defpackage.dxw.a(r3, r4, r5) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n r0.a(r3) // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r15.i // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n int r0 = r0 + r5\n r15.i = r0 // Catch:{ IOException -> 0x0087, DataFormatException -> 0x00cd }\n goto L_0x000d\n L_0x0356:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n if (r3 != 0) goto L_0x0386\n if (r2 <= 0) goto L_0x0378\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x0378\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x037a\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x0378:\n r0 = 0\n goto L_0x0333\n L_0x037a:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x0378\n L_0x0386:\n dtd r3 = r15.n // Catch:{ all -> 0x008e }\n int r3 = r3.a // Catch:{ all -> 0x008e }\n int r0 = java.lang.Math.min(r0, r3) // Catch:{ all -> 0x008e }\n int r2 = r2 + r0\n dtd r3 = r15.m // Catch:{ all -> 0x008e }\n dtd r4 = r15.n // Catch:{ all -> 0x008e }\n dxv r0 = r4.a(r0) // Catch:{ all -> 0x008e }\n dtd r0 = (defpackage.dtd) r0 // Catch:{ all -> 0x008e }\n r3.a(r0) // Catch:{ all -> 0x008e }\n goto L_0x000d\n L_0x039e:\n if (r2 <= 0) goto L_0x03ba\n dxe r0 = r15.a\n r0.a(r2)\n dxh r0 = r15.j\n dxh r3 = defpackage.dxh.BODY\n if (r0 != r3) goto L_0x03ba\n dvk r0 = r15.g\n if (r0 == 0) goto L_0x03bd\n dzo r0 = r15.d\n long r2 = (long) r1\n r0.d(r2)\n int r0 = r15.r\n int r0 = r0 + r1\n r15.r = r0\n L_0x03ba:\n r0 = 1\n goto L_0x0333\n L_0x03bd:\n dzo r0 = r15.d\n long r4 = (long) r2\n r0.d(r4)\n int r0 = r15.r\n int r0 = r0 + r2\n r15.r = r0\n goto L_0x03ba\n L_0x03c9:\n dzo r1 = r15.d\n long r4 = (long) r2\n r1.d(r4)\n int r1 = r15.r\n int r1 = r1 + r2\n r15.r = r1\n goto L_0x00ab\n L_0x03d6:\n r3 = r4\n goto L_0x01a8\n L_0x03d9:\n r3 = r0\n goto L_0x0118\n */\n throw new UnsupportedOperationException(\"Method not decompiled: defpackage.dxd.e():boolean\");\n }",
"public void m23075a() {\n }",
"void mo80452a();",
"public final int mo11683a(com.google.android.gms.internal.ads.bci r11, com.google.android.gms.internal.ads.bcn r12) {\n /*\n r10 = this;\n L_0x0000:\n int r12 = r10.f3925e\n r0 = -1\n r1 = 1\n r2 = 0\n switch(r12) {\n case 0: goto L_0x00b2;\n case 1: goto L_0x0044;\n case 2: goto L_0x000e;\n default: goto L_0x0008;\n }\n L_0x0008:\n java.lang.IllegalStateException r11 = new java.lang.IllegalStateException\n r11.<init>()\n throw r11\n L_0x000e:\n int r12 = r10.f3928h\n if (r12 <= 0) goto L_0x0031\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n r12.mo12047a()\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r0 = 3\n r11.mo11675b(r12, r2, r0)\n com.google.android.gms.internal.ads.bcq r12 = r10.f3924d\n com.google.android.gms.internal.ads.bkh r3 = r10.f3923c\n r12.mo11681a(r3, r0)\n int r12 = r10.f3929i\n int r12 = r12 + r0\n r10.f3929i = r12\n int r12 = r10.f3928h\n int r12 = r12 - r1\n r10.f3928h = r12\n goto L_0x000e\n L_0x0031:\n int r11 = r10.f3929i\n if (r11 <= 0) goto L_0x0041\n com.google.android.gms.internal.ads.bcq r3 = r10.f3924d\n long r4 = r10.f3927g\n r6 = 1\n int r7 = r10.f3929i\n r8 = 0\n r9 = 0\n r3.mo11680a(r4, r6, r7, r8, r9)\n L_0x0041:\n r10.f3925e = r1\n return r2\n L_0x0044:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n r12.mo12047a()\n int r12 = r10.f3926f\n if (r12 != 0) goto L_0x006a\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r3 = 5\n boolean r12 = r11.mo11672a(r12, r2, r3, r1)\n if (r12 != 0) goto L_0x005a\n L_0x0058:\n r1 = 0\n goto L_0x008d\n L_0x005a:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n long r3 = r12.mo12063j()\n r5 = 1000(0x3e8, double:4.94E-321)\n long r3 = r3 * r5\n r5 = 45\n long r3 = r3 / r5\n r10.f3927g = r3\n goto L_0x0083\n L_0x006a:\n int r12 = r10.f3926f\n if (r12 != r1) goto L_0x0097\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r3 = 9\n boolean r12 = r11.mo11672a(r12, r2, r3, r1)\n if (r12 != 0) goto L_0x007b\n goto L_0x0058\n L_0x007b:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n long r3 = r12.mo12066m()\n r10.f3927g = r3\n L_0x0083:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n int r12 = r12.mo12059f()\n r10.f3928h = r12\n r10.f3929i = r2\n L_0x008d:\n if (r1 == 0) goto L_0x0094\n r12 = 2\n r10.f3925e = r12\n goto L_0x0000\n L_0x0094:\n r10.f3925e = r2\n return r0\n L_0x0097:\n com.google.android.gms.internal.ads.bad r11 = new com.google.android.gms.internal.ads.bad\n int r12 = r10.f3926f\n r0 = 39\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>(r0)\n java.lang.String r0 = \"Unsupported version number: \"\n r1.append(r0)\n r1.append(r12)\n java.lang.String r12 = r1.toString()\n r11.<init>((java.lang.String) r12)\n throw r11\n L_0x00b2:\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n r12.mo12047a()\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n byte[] r12 = r12.f4559a\n r3 = 8\n boolean r12 = r11.mo11672a(r12, r2, r3, r1)\n if (r12 == 0) goto L_0x00df\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n int r12 = r12.mo12065l()\n int r2 = f3921a\n if (r12 != r2) goto L_0x00d7\n com.google.android.gms.internal.ads.bkh r12 = r10.f3923c\n int r12 = r12.mo12059f()\n r10.f3926f = r12\n r2 = 1\n goto L_0x00df\n L_0x00d7:\n java.io.IOException r11 = new java.io.IOException\n java.lang.String r12 = \"Input not RawCC\"\n r11.<init>(r12)\n throw r11\n L_0x00df:\n if (r2 == 0) goto L_0x00e5\n r10.f3925e = r1\n goto L_0x0000\n L_0x00e5:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.bef.mo11683a(com.google.android.gms.internal.ads.bci, com.google.android.gms.internal.ads.bcn):int\");\n }",
"public void mo12628c() {\n }",
"public synchronized void m6495a(int r6, int r7) throws fr.pcsoft.wdjava.geo.C0918i {\n /* JADX: method processing error */\n/*\nError: jadx.core.utils.exceptions.JadxRuntimeException: Exception block dominator not found, method:fr.pcsoft.wdjava.geo.a.b.a(int, int):void. bs: [B:13:0x001d, B:18:0x0027, B:23:0x0031, B:28:0x003a, B:44:0x005d, B:55:0x006c, B:64:0x0079]\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:86)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/70807318.run(Unknown Source)\n*/\n /*\n r5 = this;\n r4 = 2;\n r1 = 0;\n r0 = 1;\n monitor-enter(r5);\n r5.m6487e();\t Catch:{ all -> 0x0053 }\n switch(r6) {\n case 2: goto L_0x0089;\n case 3: goto L_0x000a;\n case 4: goto L_0x0013;\n default: goto L_0x000a;\n };\t Catch:{ all -> 0x0053 }\n L_0x000a:\n r0 = f2486z;\t Catch:{ all -> 0x0053 }\n r1 = 3;\t Catch:{ all -> 0x0053 }\n r0 = r0[r1];\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n L_0x0011:\n monitor-exit(r5);\n return;\n L_0x0013:\n r3 = new android.location.Criteria;\t Catch:{ all -> 0x0053 }\n r3.<init>();\t Catch:{ all -> 0x0053 }\n r2 = r7 & 2;\n if (r2 != r4) goto L_0x0058;\n L_0x001c:\n r2 = 1;\n r3.setAccuracy(r2);\t Catch:{ i -> 0x0056 }\n L_0x0020:\n r2 = r7 & 128;\n r4 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n if (r2 != r4) goto L_0x0065;\n L_0x0026:\n r2 = 3;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x0063 }\n L_0x002a:\n r2 = r7 & 8;\n r4 = 8;\n if (r2 != r4) goto L_0x007f;\n L_0x0030:\n r2 = r0;\n L_0x0031:\n r3.setAltitudeRequired(r2);\t Catch:{ i -> 0x0081 }\n r2 = r7 & 4;\n r4 = 4;\n if (r2 != r4) goto L_0x0083;\n L_0x0039:\n r2 = r0;\n L_0x003a:\n r3.setAltitudeRequired(r2);\t Catch:{ i -> 0x0085 }\n r2 = r7 & 16;\n r4 = 16;\n if (r2 != r4) goto L_0x0087;\n L_0x0043:\n r3.setAltitudeRequired(r0);\t Catch:{ all -> 0x0053 }\n r0 = 0;\t Catch:{ all -> 0x0053 }\n r0 = r5.m6485a(r0);\t Catch:{ all -> 0x0053 }\n r1 = 1;\t Catch:{ all -> 0x0053 }\n r0 = r0.getBestProvider(r3, r1);\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n goto L_0x0011;\n L_0x0053:\n r0 = move-exception;\n monitor-exit(r5);\n throw r0;\n L_0x0056:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0058:\n r2 = r7 & 1;\n if (r2 != r0) goto L_0x0020;\n L_0x005c:\n r2 = 2;\n r3.setAccuracy(r2);\t Catch:{ i -> 0x0061 }\n goto L_0x0020;\n L_0x0061:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0063:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0065:\n r2 = r7 & 64;\n r4 = 64;\n if (r2 != r4) goto L_0x0072;\n L_0x006b:\n r2 = 2;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x0070 }\n goto L_0x002a;\n L_0x0070:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0072:\n r2 = r7 & 32;\n r4 = 32;\n if (r2 != r4) goto L_0x002a;\n L_0x0078:\n r2 = 1;\n r3.setPowerRequirement(r2);\t Catch:{ i -> 0x007d }\n goto L_0x002a;\n L_0x007d:\n r0 = move-exception;\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x007f:\n r2 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x0031;\t Catch:{ all -> 0x0053 }\n L_0x0081:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0083:\n r2 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x003a;\t Catch:{ all -> 0x0053 }\n L_0x0085:\n r0 = move-exception;\t Catch:{ all -> 0x0053 }\n throw r0;\t Catch:{ all -> 0x0053 }\n L_0x0087:\n r0 = r1;\t Catch:{ all -> 0x0053 }\n goto L_0x0043;\t Catch:{ all -> 0x0053 }\n L_0x0089:\n r0 = f2486z;\t Catch:{ all -> 0x0053 }\n r1 = 2;\t Catch:{ all -> 0x0053 }\n r0 = r0[r1];\t Catch:{ all -> 0x0053 }\n r5.f2488b = r0;\t Catch:{ all -> 0x0053 }\n goto L_0x0011;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: fr.pcsoft.wdjava.geo.a.b.a(int, int):void\");\n }",
"void mo41086b();",
"private synchronized void m3985g() {\n /*\n r8 = this;\n monitor-enter(r8);\n r2 = java.lang.Thread.currentThread();\t Catch:{ all -> 0x0063 }\n r3 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r3 = r3.mo1186c();\t Catch:{ all -> 0x0063 }\n r2 = r2.equals(r3);\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0021;\n L_0x0011:\n r2 = r8.f2114f;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1185b();\t Catch:{ all -> 0x0063 }\n r3 = new com.google.analytics.tracking.android.aa;\t Catch:{ all -> 0x0063 }\n r3.<init>(r8);\t Catch:{ all -> 0x0063 }\n r2.add(r3);\t Catch:{ all -> 0x0063 }\n L_0x001f:\n monitor-exit(r8);\n return;\n L_0x0021:\n r2 = r8.f2122n;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x0028;\n L_0x0025:\n r8.m3999d();\t Catch:{ all -> 0x0063 }\n L_0x0028:\n r2 = com.google.analytics.tracking.android.ab.f1966a;\t Catch:{ all -> 0x0063 }\n r3 = r8.f2110b;\t Catch:{ all -> 0x0063 }\n r3 = r3.ordinal();\t Catch:{ all -> 0x0063 }\n r2 = r2[r3];\t Catch:{ all -> 0x0063 }\n switch(r2) {\n case 1: goto L_0x0036;\n case 2: goto L_0x006e;\n case 3: goto L_0x00aa;\n default: goto L_0x0035;\n };\t Catch:{ all -> 0x0063 }\n L_0x0035:\n goto L_0x001f;\n L_0x0036:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x0066;\n L_0x003e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.poll();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to store\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2112d;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1197a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n goto L_0x0036;\n L_0x0063:\n r2 = move-exception;\n monitor-exit(r8);\n throw r2;\n L_0x0066:\n r2 = r8.f2121m;\t Catch:{ all -> 0x0063 }\n if (r2 == 0) goto L_0x001f;\n L_0x006a:\n r8.m3987h();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x006e:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x00a0;\n L_0x0076:\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.peek();\t Catch:{ all -> 0x0063 }\n r0 = r2;\n r0 = (com.google.analytics.tracking.android.af) r0;\t Catch:{ all -> 0x0063 }\n r7 = r0;\n r2 = \"Sending hit to service\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2111c;\t Catch:{ all -> 0x0063 }\n r3 = r7.m3743a();\t Catch:{ all -> 0x0063 }\n r4 = r7.m3744b();\t Catch:{ all -> 0x0063 }\n r6 = r7.m3745c();\t Catch:{ all -> 0x0063 }\n r7 = r7.m3746d();\t Catch:{ all -> 0x0063 }\n r2.mo1204a(r3, r4, r6, r7);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2.poll();\t Catch:{ all -> 0x0063 }\n goto L_0x006e;\n L_0x00a0:\n r2 = r8.f2123o;\t Catch:{ all -> 0x0063 }\n r2 = r2.mo1198a();\t Catch:{ all -> 0x0063 }\n r8.f2109a = r2;\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n L_0x00aa:\n r2 = \"Need to reconnect\";\n com.google.analytics.tracking.android.av.m3818e(r2);\t Catch:{ all -> 0x0063 }\n r2 = r8.f2116h;\t Catch:{ all -> 0x0063 }\n r2 = r2.isEmpty();\t Catch:{ all -> 0x0063 }\n if (r2 != 0) goto L_0x001f;\n L_0x00b7:\n r8.m3991j();\t Catch:{ all -> 0x0063 }\n goto L_0x001f;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.analytics.tracking.android.y.g():void\");\n }",
"private final void m710e() {\n /*\n r12 = this;\n akn r0 = r12.f531p\n akl r0 = r0.f601d\n if (r0 == 0) goto L_0x0155\n boolean r1 = r0.f580d\n r2 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)\n if (r1 == 0) goto L_0x0017\n aws r1 = r0.f577a\n long r4 = r1.mo1486c()\n r8 = r4\n goto L_0x0019\n L_0x0017:\n r8 = r2\n L_0x0019:\n int r1 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1))\n if (r1 != 0) goto L_0x0122\n ajf r1 = r12.f528m\n akn r2 = r12.f531p\n akl r2 = r2.f602e\n akx r3 = r1.f445c\n r4 = 0\n if (r3 == 0) goto L_0x008a\n boolean r3 = r3.mo486w()\n if (r3 != 0) goto L_0x008a\n akx r3 = r1.f445c\n boolean r3 = r3.mo485v()\n if (r3 == 0) goto L_0x0037\n goto L_0x0042\n L_0x0037:\n if (r0 != r2) goto L_0x008a\n akx r2 = r1.f445c\n boolean r2 = r2.mo359g()\n if (r2 == 0) goto L_0x0042\n goto L_0x008a\n L_0x0042:\n bkr r2 = r1.f446d\n long r2 = r2.mo379b()\n boolean r5 = r1.f447e\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n long r5 = r5.mo379b()\n int r7 = (r2 > r5 ? 1 : (r2 == r5 ? 0 : -1))\n if (r7 >= 0) goto L_0x005c\n blf r2 = r1.f443a\n r2.mo2109d()\n goto L_0x0096\n L_0x005c:\n r1.f447e = r4\n boolean r5 = r1.f448f\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n r5.mo2107a()\n L_0x0068:\n blf r5 = r1.f443a\n r5.mo2108a(r2)\n bkr r2 = r1.f446d\n akq r2 = r2.mo376Q()\n blf r3 = r1.f443a\n akq r3 = r3.f4280a\n boolean r3 = r2.equals(r3)\n if (r3 != 0) goto L_0x0096\n blf r3 = r1.f443a\n r3.mo378a(r2)\n aje r3 = r1.f444b\n ake r3 = (p000.ake) r3\n r3.m694a(r2, r4)\n goto L_0x0096\n L_0x008a:\n r2 = 1\n r1.f447e = r2\n boolean r2 = r1.f448f\n if (r2 == 0) goto L_0x0096\n blf r2 = r1.f443a\n r2.mo2107a()\n L_0x0096:\n long r1 = r1.mo379b()\n r12.f513D = r1\n long r0 = r0.mo440b(r1)\n akp r2 = r12.f533r\n long r2 = r2.f623m\n java.util.ArrayList r5 = r12.f530o\n boolean r5 = r5.isEmpty()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n awt r5 = r5.f612b\n boolean r5 = r5.mo1504a()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n long r6 = r5.f613c\n int r8 = (r6 > r2 ? 1 : (r6 == r2 ? 0 : -1))\n if (r8 != 0) goto L_0x00c5\n boolean r6 = r12.f515F\n if (r6 == 0) goto L_0x00c5\n r6 = -1\n long r2 = r2 + r6\n L_0x00c5:\n r12.f515F = r4\n alh r4 = r5.f611a\n awt r5 = r5.f612b\n java.lang.Object r5 = r5.f2566a\n int r4 = r4.mo525a(r5)\n int r5 = r12.f514E\n r6 = 0\n if (r5 <= 0) goto L_0x00e1\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x00e1:\n L_0x00e2:\n r5 = r6\n L_0x00e3:\n if (r5 != 0) goto L_0x00e6\n goto L_0x0109\n L_0x00e6:\n int r5 = r5.f502a\n if (r4 >= 0) goto L_0x00eb\n L_0x00ea:\n goto L_0x00f4\n L_0x00eb:\n if (r4 != 0) goto L_0x0109\n r7 = 0\n int r5 = (r2 > r7 ? 1 : (r2 == r7 ? 0 : -1))\n if (r5 >= 0) goto L_0x0109\n goto L_0x00ea\n L_0x00f4:\n int r5 = r12.f514E\n int r5 = r5 + -1\n r12.f514E = r5\n if (r5 <= 0) goto L_0x0108\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x0108:\n goto L_0x00e2\n L_0x0109:\n int r2 = r12.f514E\n java.util.ArrayList r3 = r12.f530o\n int r3 = r3.size()\n if (r2 >= r3) goto L_0x011d\n java.util.ArrayList r2 = r12.f530o\n int r3 = r12.f514E\n java.lang.Object r2 = r2.get(r3)\n akb r2 = (p000.akb) r2\n L_0x011d:\n akp r2 = r12.f533r\n r2.f623m = r0\n goto L_0x0140\n L_0x0122:\n r12.m691a(r8)\n akp r0 = r12.f533r\n long r0 = r0.f623m\n int r2 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1))\n if (r2 == 0) goto L_0x0140\n akp r0 = r12.f533r\n awt r7 = r0.f612b\n long r10 = r0.f614d\n r6 = r12\n akp r0 = r6.m686a(r7, r8, r10)\n r12.f533r = r0\n akc r0 = r12.f529n\n r1 = 4\n r0.mo409b(r1)\n L_0x0140:\n akn r0 = r12.f531p\n akl r0 = r0.f603f\n akp r1 = r12.f533r\n long r2 = r0.mo442c()\n r1.f621k = r2\n akp r0 = r12.f533r\n long r1 = r12.m719n()\n r0.f622l = r1\n return\n L_0x0155:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p000.ake.m710e():void\");\n }",
"public void mo21785J() {\n }",
"public final com.google.android.gms.internal.ads.zzafx mo4170d() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r2 = this;\n r0 = r2.f19705f;\n monitor-enter(r0);\n r1 = r2.f19706g;\t Catch:{ IllegalStateException -> 0x000d, IllegalStateException -> 0x000d }\n r1 = r1.m26175a();\t Catch:{ IllegalStateException -> 0x000d, IllegalStateException -> 0x000d }\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n return r1;\t Catch:{ all -> 0x000b }\n L_0x000b:\n r1 = move-exception;\t Catch:{ all -> 0x000b }\n goto L_0x0010;\t Catch:{ all -> 0x000b }\n L_0x000d:\n r1 = 0;\t Catch:{ all -> 0x000b }\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n return r1;\t Catch:{ all -> 0x000b }\n L_0x0010:\n monitor-exit(r0);\t Catch:{ all -> 0x000b }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.zzafn.d():com.google.android.gms.internal.ads.zzafx\");\n }",
"protected boolean func_70041_e_() { return false; }",
"static /* synthetic */ void m204-wrap8(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01 r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap8(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.-wrap8(com.mediatek.internal.telephony.worldphone.WorldPhoneOp01):void\");\n }",
"public int g()\r\n/* 173: */ {\r\n/* 174:198 */ return 0;\r\n/* 175: */ }"
]
| [
"0.7616782",
"0.75728166",
"0.7525724",
"0.74507046",
"0.74505866",
"0.74373597",
"0.7381616",
"0.7381616",
"0.7366568",
"0.735341",
"0.73420185",
"0.73150736",
"0.7308675",
"0.73055106",
"0.7274724",
"0.72523946",
"0.72216254",
"0.71979403",
"0.7177258",
"0.7136552",
"0.7106082",
"0.70418596",
"0.7024962",
"0.70197546",
"0.69911283",
"0.69613564",
"0.69409144",
"0.6908151",
"0.6890134",
"0.68525946",
"0.68281573",
"0.67949134",
"0.6784313",
"0.6777685",
"0.67725635",
"0.677158",
"0.6769469",
"0.6767704",
"0.67430586",
"0.67081237",
"0.6701509",
"0.66999537",
"0.6698843",
"0.6698377",
"0.6670063",
"0.6668109",
"0.66555125",
"0.6613381",
"0.661335",
"0.6609933",
"0.6594555",
"0.65691173",
"0.65659195",
"0.6539569",
"0.6514096",
"0.65095544",
"0.65094143",
"0.6490445",
"0.64368844",
"0.6432842",
"0.6430799",
"0.6404235",
"0.6401294",
"0.6372685",
"0.6369568",
"0.6368447",
"0.63579416",
"0.6329343",
"0.6326999",
"0.63252985",
"0.6317552",
"0.6305244",
"0.630364",
"0.62988764",
"0.6281612",
"0.6281284",
"0.6241846",
"0.6228182",
"0.622796",
"0.62267816",
"0.62259656",
"0.62186515",
"0.62184393",
"0.6204782",
"0.6197622",
"0.61945254",
"0.6180569",
"0.61717045",
"0.61680174",
"0.6164003",
"0.61634594",
"0.6161363",
"0.615725",
"0.61552316",
"0.61522835",
"0.61414874",
"0.61262673",
"0.6115875",
"0.6111993",
"0.6102305",
"0.6096556"
]
| 0.0 | -1 |
Created by vrihas on 6/21/2017. | public interface OnBlogsReceived {
void onSuccess(BlogFeed blogFeedList);
void onFailure();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\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 public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void entrenar() {\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}",
"@Override\n\tprotected void interr() {\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\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n void init() {\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n public void init() {}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n protected void initialize() {\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 }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {}",
"private void m50366E() {\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\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 public int describeContents() { return 0; }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"private void init() {\n\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"public void mo4359a() {\n }",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n public void memoria() {\n \n }",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n public void initialize() { \n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\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 ligar() {\n\t\t\n\t}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\n public void init() {\n }",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\r\n\tpublic final void init() {\r\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\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"private void kk12() {\n\n\t}",
"public void mo6081a() {\n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}"
]
| [
"0.60856324",
"0.58690155",
"0.5843825",
"0.5826998",
"0.5779448",
"0.57771707",
"0.57771707",
"0.5767261",
"0.568354",
"0.5674029",
"0.5667271",
"0.565957",
"0.56509686",
"0.56341255",
"0.56341255",
"0.56341255",
"0.56341255",
"0.56341255",
"0.56230664",
"0.56177706",
"0.56103903",
"0.56093585",
"0.55874234",
"0.55795956",
"0.5578309",
"0.5573716",
"0.55722547",
"0.5543509",
"0.55421615",
"0.5536215",
"0.5531392",
"0.5531392",
"0.5531392",
"0.5531392",
"0.5531392",
"0.5531392",
"0.5522283",
"0.5520452",
"0.5519396",
"0.55188036",
"0.55171216",
"0.5514241",
"0.5514241",
"0.5510837",
"0.5510837",
"0.5510837",
"0.54986626",
"0.5497377",
"0.5497377",
"0.5497262",
"0.5492532",
"0.548205",
"0.54791254",
"0.54791254",
"0.54791254",
"0.5477219",
"0.5476432",
"0.54707503",
"0.54707503",
"0.54707503",
"0.5468707",
"0.54641366",
"0.54522216",
"0.54429746",
"0.54415196",
"0.54338175",
"0.54242796",
"0.5422037",
"0.54062605",
"0.540531",
"0.5386513",
"0.53857243",
"0.5383561",
"0.5382483",
"0.53823525",
"0.5382046",
"0.5382046",
"0.53813213",
"0.5368431",
"0.5363333",
"0.5356768",
"0.5334414",
"0.5330643",
"0.5326776",
"0.5326776",
"0.5323952",
"0.5314514",
"0.5314514",
"0.5314514",
"0.5314514",
"0.5314514",
"0.5314514",
"0.5314514",
"0.5307635",
"0.5305708",
"0.53024054",
"0.53024054",
"0.53024054",
"0.5291827",
"0.52832305",
"0.5275654"
]
| 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
String out ="n";
while (!out.equals("o") && !out.equals("O"))
{
Scanner keyboard = new Scanner(System.in);
System.out.print("Veuillez saisir la somme : ");
int x = keyboard.nextInt();
System.out.print("e pour euro d pour dollar : ");
keyboard = new Scanner(System.in);
String s = keyboard.nextLine();
if (s.equals("e") || s.equals("E"))
System.out.println("la somme en dinar est : " + x*211);
else
{
if (s.equals("d") || s.equals("D"))
System.out.println("la somme en dinar est : " + x*180);
else
System.out.println("Symbole non reconu ");
}
keyboard = new Scanner(System.in);
System.out.print("Voulez vous sortir? n(Non) ou o(Oui) : ");
out = keyboard.nextLine();
}
} | {
"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 |
Sets new state to given cell. | public void setCellState(int i, int j, CellState value) {
switch (value) {
case ZERO_CELL: {
int ZERO_MARK = -1;
field[i][j] = ZERO_MARK;
break;
}
case CROSS_CELL: {
int CROSS_MARK = 1;
field[i][j] = CROSS_MARK;
break;
}
case EMPTY_CELL: {
field[i][j] = EMPTY_MARK;
break;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCellState(int newState) {\n this.myState = newState;\n }",
"protected abstract void setCell(int x, int y, boolean state);",
"public void setCell(Cell cell)\n {\n myCell = cell;\n }",
"public Cell(int state) {\n \t\tthis.state = state;\n \t}",
"public void testSetCell()\r\n {\r\n board.loadBoardState(\"OOOO\",\r\n \"OOOO\",\r\n \"O+OO\",\r\n \"OOOO\");\r\n board.setCell(1, 2, MineSweeperCell.FLAGGED_MINE);\r\n assertBoard(board, \"OOOO\",\r\n \"OOOO\",\r\n \"OMOO\",\r\n \"OOOO\");\r\n }",
"public void setNewState(final Boolean newCellState) {\n this.newState = newCellState;\n }",
"protected void set(int row, int col, Cell cell) {\n\t\tmyGrid.set(row, col, cell);\n\t}",
"public void setCell(boolean cell) {\n\t\tCell = cell;\n\t}",
"@Override\n public void updateCellState(CellPosition cellPosition, CellState cellState) {\n grid.replace(cellPosition, cellState);\n }",
"private void setCellVisited(Cell cell) {\n\n\t\tif (!isIn(cell))\n\t\t\treturn;\n\n\t\tint r = cell.r;\n\t\tint c = cell.c;\n\t\tif (maze.type == HEX) {\n\t\t\tc = c - (r + 1) / 2;\n\t\t}\n\t\ttry {\n\t\t\tvisited[r][c] = true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public abstract void setCell(int row, int column, T item);",
"public abstract void setCellValue(int cellValue, int row, int col);",
"public synchronized void switchCell()\n {\n cellValue = (cellValue == ALIVE) ? DEAD : ALIVE;\n }",
"private void setCell(int x, int y, int newValue) {\n hiddenGrid[x][y] = newValue;\n }",
"public void setCells(ArrayList<CellState> cells) {\n this.cells = cells;\n }",
"public void setCell(\n final org.edna.mxv1.xsdata.XSDataCell cell) {\n this._cell = cell;\n }",
"public void setCurrentCell(\n\t\t\tint index )\n\t{\n\t}",
"public void updateCell() {\n alive = !alive;\n simulator.getSimulation().changeState(xPosition, yPosition);\n setColor();\n }",
"public void setSquare(Square cell) {\n\t\tcells[cell.getRow()][cell.getColumn()] = cell; \n\t}",
"public void setCell(Object value, int col, int row) {\n ((DefaultTableModel) getModel()).setValueAt(value, row, col);\n }",
"public void testSetCell()\n {\n // Test setting a cell under ideal conditions\n assertTrue(b1.getCell(0, 0) == Cell.EMPTY);\n assertTrue(b1.setCell(0, 0, Cell.RED1));\n assertTrue(b1.getCell(0, 0) == Cell.RED1 );\n\n // If a cell is out of bounds, should fail\n assertFalse(b1.setCell(-1, 0, Cell.RED1));\n assertFalse(b1.setCell(0, -1, Cell.RED1));\n assertFalse(b1.setCell(3, 0, Cell.RED1));\n assertFalse(b1.setCell(0, 3, Cell.RED1));\n\n // If a cell is already occupied, should fail\n assertFalse(b1.setCell(0, 0, Cell.RED1));\n\n // If the board is won, should fail\n assertTrue(b1.setCell(0, 1, Cell.RED1));\n assertTrue(b1.setCell(0, 2, Cell.RED1));\n assertEquals(b1.getWhoHasWon(), Cell.RED1);\n assertFalse(b1.setCell(1, 1, Cell.RED1)); // Unoccupied\n assertFalse(b1.setCell(0, 0, Cell.RED1)); // Occupied\n\n\n\n\n }",
"public synchronized void setCellValue(GoLCell in_cell)\n {\n cellValue = in_cell.getCellValue();\n }",
"public void setState(State state) { model.setState(state); }",
"@Override\r\n\tpublic void setCell(Integer x, Integer y, Integer value) {\n\t\tgame[x][y] = value;\r\n\t}",
"public void setState(int i, int j, int val){\r\n this.state[i][j] = val;\r\n }",
"public void setCell(final Cell location) {\r\n this.locateCell.removeInhabit();\r\n locateCell = location;\r\n location.setInhabit(this);\r\n }",
"public void testSetCell() {\n maze1.setCell(test, MazeCell.WALL);\n assertEquals(MazeCell.UNEXPLORED, maze1.getCell(test));\n test = new Location(9, 9);\n maze1.setCell(test, MazeCell.WALL);\n assertEquals(MazeCell.UNEXPLORED, maze1.getCell(test));\n test = new Location(1, 0);\n maze1.setCell(test, MazeCell.WALL);\n assertEquals(MazeCell.WALL, maze1.getCell(test));\n test = new Location(0, 1);\n maze1.setCell(test, MazeCell.WALL);\n assertEquals(MazeCell.WALL, maze1.getCell(test));\n \n \n \n maze1.setCell(test, MazeCell.CURRENT_PATH);\n assertEquals(MazeCell.CURRENT_PATH, maze1.getCell(test));\n maze1.setCell(test, MazeCell.FAILED_PATH);\n assertEquals(MazeCell.FAILED_PATH, maze1.getCell(test));\n \n }",
"public void setCell(boolean upR, boolean upL, boolean doR, boolean doL){\n upperRight = upR;\n upperLeft = upL;\n downerRight = doR;\n downerLeft = doL;\n }",
"public void setToGrassState() {\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.ToPlaceTower) {\n cells.set(i, CellState.Grass);\n }\n }\n }",
"public int setCell(int value){\n int newValue;\n if (isHit(value)){\n newValue = HIT;\n }\n else {\n newValue = MISS;\n }\n return newValue;\n }",
"public synchronized void setCellValue(byte in_cellValue)\n {\n cellValue = (in_cellValue > DEAD) ? ALIVE : DEAD;\n }",
"public void setState(int row, int col) throws ArrayIndexOutOfBoundsException {\r\n board[row][col] = currentPlayer;\r\n }",
"public void setSelectedCell(Coord c) {\n this.selected = c;\n }",
"public Cell(String state, int x, int y) {\n this.state = state;\n this.nextState = state;\n this.coordinate = new Point(x, y);\n }",
"public void setToPlaceTowerState() {\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.Grass) {\n cells.set(i, CellState.ToPlaceTower);\n } else if (cells.get(i) == CellState.Chosen) {\n cells.set(i, CellState.Tower);\n }\n }\n }",
"public boolean setCell(int row, int col, char value) {\n if (this.cells[row][col] instanceof Cell == false) return false;\n this.cells[row][col].setValue(value);\n return true;\n }",
"private void setCell(boolean[][] board, int i, int j) {\n\t\tint numOfNeighbors = getNeighbors(board, i, j);\n\t\tif(board[i][j]) { // if alive\n\t\t\tif(numOfNeighbors < 2 || numOfNeighbors >= 4) {\n\t\t\t\ttempBoard[i][j] = false; // kill cell\n\t\t\t}\n\t\t}else{ // if dead\n\t\t\tif(numOfNeighbors == 3)\n\t\t\t\ttempBoard[i][j] = true; // become alive\n\t\t}\n\t}",
"public void setSeCell(org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle seCell)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().find_element_user(SECELL$18, 0);\n if (target == null)\n {\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().add_element_user(SECELL$18);\n }\n target.set(seCell);\n }\n }",
"public void decisionOnCellState(int counter, int row, int column)\r\n {\r\n if (cellGrid[column][row].isAlive())\r\n {\r\n if (counter < 2)\r\n {\r\n cellGrid[column][row].setToBeAlive(false);\r\n }\r\n else if (counter == 2 || counter == 3)\r\n {\r\n cellGrid[column][row].setToBeAlive(true);\r\n }\r\n else if (counter > 3)\r\n {\r\n cellGrid[column][row].setToBeAlive(false);\r\n } // end of if (counter < 2)\r\n }\r\n else\r\n {\r\n if (counter == 3)\r\n {\r\n cellGrid[column][row].setToBeAlive(true);\r\n } // end of if (counter == 3)\r\n } // end of if (cellGrid[column][row].isAlive())\r\n }",
"public void setCell(int dim, int row, int col ) {\n\n\t\tCell value = getEnumCell();\n\n\t\tif(isEmpty( dim, row, col)){\n\n\t\t\tboard[dim][row][col]= value;\n\n\t\t\tturn++;\n\t\t}\n\n\t\t//\t\telse System.out.println(value.toString() + \" cannot play there. Choose another location for\" + value.toString() + \" .\");\n\n\n\t}",
"public void updateCellState(Move move)\r\n\t{\r\n\t\tCellState color = this.grid[move.getMovedMarbleInitialPosition(0).getX()][move.getMovedMarbleInitialPosition(0).getY()];\r\n\t\t\r\n\t\tfor(int i = 0;i < move.getMovedMarblesCount();i++)\r\n\t\t{\r\n\t\t\tthis.grid[move.getMovedMarbleInitialPosition(i).getX()][move.getMovedMarbleInitialPosition(i).getY()] = CellState.EMPTY;\r\n\t\t}\r\n\t\tfor(int i = 0; i < move.getMovedMarblesFinalCount();i++)\r\n\t\t{\r\n\t\t\tif(isPositionValid(move.getMovedMarbleFinalPosition(i)))\r\n\t\t\t{\r\n\t\t\t\tthis.grid[move.getMovedMarbleFinalPosition(i).getX()][move.getMovedMarbleFinalPosition(i).getY()] = color;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(color == CellState.BLACK_MARBLE) this.blackMarblesCount --;\r\n\t\t\t\tif(color == CellState.WHITE_MARBLE) this.whiteMarblesCount --;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"protected abstract double setCell(\r\n int row,\r\n int col,\r\n double valueToSet);",
"public Cell(final Boolean state) {\n this.alive = state;\n this.newState = state;\n this.neighbors = new LinkedList<Cell>();\n }",
"public void setGFXCell(GFXDataCell gfxCell);",
"public void setCellUsed(int row, int col, boolean val) {\n used[row][col] = val;\n }",
"public void setState(State newState) {this.state = newState;}",
"public void setSwCell(org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle swCell)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().find_element_user(SWCELL$20, 0);\n if (target == null)\n {\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().add_element_user(SWCELL$20);\n }\n target.set(swCell);\n }\n }",
"public void setCurrentState(Component c, JTable table, int itemId, int rowIndexModel, int columnIndexModel, boolean isSelected)\n {\n }",
"public void setState(TileState newState) {\n\t\tthis.setState(newState, true);\n\t}",
"public void setElement(Pair<Integer, Integer> cell, int n){\n\t\tnumbers[cell.getFirst()][cell.getSecond()] = n;\n\t}",
"private void setCellType(Cell cell, CellType type) {\n\t\tfor (AgentListener listener : listeners) {\n\t\t\tlistener.changeCellType(cell.getPosition(), type);\n\t\t}\n\t\tcell.setType(type);\n\t}",
"public void setNwCell(org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle nwCell)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().find_element_user(NWCELL$26, 0);\n if (target == null)\n {\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().add_element_user(NWCELL$26);\n }\n target.set(nwCell);\n }\n }",
"public void init(CellImpl cell);",
"public void setCellType(GridCellType celltype) {\n\t\tif (celltype != null) {\n\t\t\tif (this.celltype != celltype) {\n\t\t\t\tthis.parent.cellToUpdate(this);\n\t\t\t\tthis.celltype = celltype;\n\t\t\t\tthis.parent.cellUpdated(this);\n\t\t\t\tcellCost = this.celltype.cost;\n\t\t\t}\n\t\t}\n\t}",
"public void setCell(int row, int col, String val) {\n board[row][col] = val;\n }",
"protected void setCell(char c) throws IllegalArgumentEvent {\r\n\t\tif(c > 48 && c < 58){ //'0 to 9' in ascii\r\n\t\t\tthis.rocky = false;\r\n\t\t\tthis.food = c - 48;\r\n\t\t\tthis.anthill = 0;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tswitch(c) {\r\n\t\tcase '#':\r\n\t\t\tthis.rocky = true;\r\n\t\t\tthis.food = 0;\r\n\t\t\tthis.anthill = 0;\r\n\t\t\tbreak;\r\n\t\tcase '.':\r\n\t\t\tthis.rocky = false;\r\n\t\t\tthis.food = 0;\r\n\t\t\tthis.anthill = 0;\r\n\t\t\tbreak;\r\n\t\tcase '+':\r\n\t\t\tthis.rocky = false;\r\n\t\t\tthis.food = 0;\r\n\t\t\tthis.anthill = 1;\r\n\t\t\tbreak;\r\n\t\tcase '-':\r\n\t\t\tthis.rocky = false;\r\n\t\t\tthis.food = 0;\r\n\t\t\tthis.anthill = 2;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tthrow new IllegalArgumentEvent(\"Illegal argument in Cell setCell\");\r\n\t\t}\r\n\t}",
"public void step() {\n\t\t// calculate new values\n\t\tfor (int x = 0; x < gridX; x++) {\n\t\t\tfor (int y = 0; y < gridY; y++) {\n\t\t\t\tCell c = cells[x + (y * gridX)];\n\t\t\t\tCell newCell = newCells[x + (y * gridX)];\n\n\t\t\t\tint neighborCount = sameNeighborCount(x, y);\n\n\t\t\t\tif (c.isActive) {\n\t\t\t\t\tif (neighborCount < 2) {\n\t\t\t\t\t\t// all alone, die of loneliness\n\t\t\t\t\t\tnewCell.isActive = false;\n\t\t\t\t\t\tnewCell.cellColor = app.color(deadColor);\n\t\t\t\t\t}\n\t\t\t\t\telse if (neighborCount > 3) {\n\t\t\t\t\t\tnewCell.isActive = false;\n\t\t\t\t\t\tnewCell.cellColor = app.color(deadColor);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Dead cells can be reborn if surrounded by enough neighbors of the same\n\t\t\t\t\t// color. The cell will be reborn using the most prominent color.\n\t\t\t\t\tint populousColor = mostPopulousColor(x, y);\n\t\t\t\t\tif (populousColor > Integer.MIN_VALUE) {\n\t\t\t\t\t\tnewCell.isActive = true;\n\t\t\t\t\t\tnewCell.cellColor = populousColor;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// update to new state\n\t\tfor (int i = 0; i < cells.length; i++) {\n\t\t\tcells[i].isActive = newCells[i].isActive;\n\t\t\tcells[i].cellColor = newCells[i].cellColor;\n\t\t}\n\t}",
"public void setState(StateEnum val) {\n state = val;\n }",
"public void setCellNum(Integer cellNum) {\n this.cellNum = cellNum;\n }",
"public void setCellValue(int i, int j, int val) {\n\t\tthis.puzzle[i][j] = val;\n\t\t// set val as a singleton in constraints[i][j]\n\t\tthis.constraints[i][j].clear();\n\t\tthis.constraints[i][j].set(val, true);\n\t\t// set val in all units\n\t\tthis.constraints[i][0].set(val, true);\n\t\tthis.constraints[0][j].set(val, true);\n\t\tthis.constraints[N + 1][getBlockIndex(i, j)].set(val, true);\n\t\t// remove from nonAssignedCells\n\t\tnonAssignedCells.removeIf(x -> x.getKey() == i && x.getValue() == j);\n\t}",
"public void setState(int state);",
"public void setState(int state);",
"public void set(int rowIndex, int columnIndex, int value) { target.set(index.get(rowIndex), columnIndex, value); }",
"void setState(int state);",
"public void setCell(int row, int col, double value) {\n int di = row - col;\n\n if (di == 0) {\n B[row] = value;\n } else if (di == -1) {\n C[row] = value;\n } else if (di == 1) {\n A[row] = value;\n } else {\n throw new IllegalArgumentException(\"Only the main, super, and sub diagonals can be set.\");\n }\n }",
"public void setCellStatus(boolean cellStatus)\n {\n this.cellStatus = cellStatus;\n }",
"public void punishment(){\n\t\tthis.cell = 0;\n\t}",
"public void startEditingAtCell(Object cell) {\r\n \t\tgraph.startEditingAtCell(cell);\r\n \t\tif ((cell != null) && (cell instanceof JmtCell)) {\r\n \t\t\tJmtCell jcell = (JmtCell) cell;\r\n \t\t\tStationParameterPanel stationPanel = new jmt.gui.common.panels.StationParameterPanel(model, model,\r\n \t\t\t\t\t((CellComponent) jcell.getUserObject()).getKey());\r\n \t\t\t// Adds on the top a panel to change station name\r\n \t\t\tstationPanel.add(new StationNamePanel(model, ((CellComponent) jcell.getUserObject()).getKey()), BorderLayout.NORTH);\r\n \t\t\tdialogFactory.getDialog(stationPanel, \"Editing \" + jcell.getUserObject().toString() + \" Properties...\");\r\n \r\n \t\t\t// Updates cell dimensions if name was changed too much...\r\n \t\t\tHashtable<Object, Map> nest = new Hashtable<Object, Map>();\r\n \t\t\tDimension cellDimension = jcell.getSize(graph);\r\n \t\t\tMap attr = jcell.getAttributes();\r\n \t\t\tRectangle2D oldBounds = GraphConstants.getBounds(attr);\r\n \t\t\tif (oldBounds.getWidth() != cellDimension.getWidth()) {\r\n \t\t\t\tGraphConstants.setBounds(attr, new Rectangle2D.Double(oldBounds.getX(), oldBounds.getY(), cellDimension.getWidth(), cellDimension\r\n \t\t\t\t\t\t.getHeight()));\r\n \t\t\t\tnest.put(cell, attr);\r\n \t\t\t\tjcell.updatePortPositions(nest, GraphConstants.getIcon(attr), cellDimension);\r\n \t\t\t\tgraph.getGraphLayoutCache().edit(nest);\r\n \t\t\t}\r\n \t\t}\r\n \t\t// Blocking region editing\r\n \t\telse if ((cell != null) && (cell instanceof BlockingRegion)) {\r\n \t\t\tObject regionKey = ((BlockingRegion) cell).getKey();\r\n \t\t\tdialogFactory.getDialog(new BlockingRegionParameterPanel(model, model, regionKey), \"Editing \" + model.getRegionName(regionKey)\r\n \t\t\t\t\t+ \" Properties...\");\r\n \t\t}\r\n \t}",
"void editCell(Coord coord, String string);",
"public void SetState(int s) {\n this.state=LS[s];\n }",
"public boolean setNumber(Pair<Integer, Integer> cell, int n){\n\t\treturn setNumber(cell.getFirst(), cell.getSecond(), n);\n\t}",
"@Override\r\n\t\t\tpublic void update(final ViewerCell cell) {\n\t\t\t}",
"@Override\r\n\t\t\tpublic void update(final ViewerCell cell) {\n\t\t\t}",
"public void setSelectedCell(Cell c) {\n //First event can be bogus (from system placing focus on first item)\n if (!selectionEnabled)c=null;\n menuBar.updateCellMenu(c);\n // deselect previous cell\n if (selectedCell != null) {\n selectedCell.setSelected(false);\n }\n // select new cell\n selectedCell = c;\n if (selectedCell != null) {\n selectedCell.setSelected(true);\n }\n // Return focus to the frame, just in case it gets set somewhere else\n // (like the buttons)\n requestFocus();\n }",
"public void setNeCell(org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle neCell)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().find_element_user(NECELL$24, 0);\n if (target == null)\n {\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().add_element_user(NECELL$24);\n }\n target.set(neCell);\n }\n }",
"public Cell() {\r\n\t\tthis.mineCount = 0;\r\n\t\tthis.isFlagged = false;\r\n\t\tthis.isExposed = false;\r\n\t\tthis.isMine = false;\r\n\t}",
"public Cell ()\n {\n cellStatus = false;\n xCoordinate = 0;\n yCoordinate = 0;\n button = new JButton();\n }",
"public void setBoardWithColor(BoardCell cell) {\r\n\t\tif(cell==null) throw new NullPointerException();\r\n\t\tfor(int row=0;row<getMaxRows();row++){\r\n\t\t\tfor(int col=0;col<getMaxCols();col++){\r\n\t\t\t\tboardcell[row][col]=cell;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"public abstract void setEmpty(AwtCell empty);",
"public Cell(T val)\n {\n _value = val;\n _visited = false;\n }",
"public void setCellValue(int value) {\n\t\tthis.cellValue = value;\n\t}",
"public void setState(DiagramModel state) {\r\n for (Element e : state) {\r\n savedState_.add(0, e.makeCopy());\r\n }\r\n }",
"public void setState(NodeState state) {\n this.state = state;\n }",
"Cell() {\r\n\t\tstate = CellState.EMPTY;\r\n\t}",
"public abstract void initCell(\r\n int row,\r\n int col,\r\n double valueToInitialise);",
"public void setValueAt(Object value, int row, int col)\r\n throws IllegalStateException {\r\n\r\n if(columnsAreNum != null && columnsAreNum.length>0){\r\n\t for(int i =0; i< columnsAreNum.length; i++){\r\n\t if(col == columnsAreNum[i]){\r\n\t value = new Double(tranferStringToNum(value.toString()));\r\n\t break;\r\n\t }\r\n\t }\r\n\t}\r\n //Set value at cell\r\n ( (Vector) data.elementAt(row)).setElementAt(value, col);\r\n //Set status modify to this row.\r\n if (!(Integer.parseInt( ( (Vector) data.elementAt(row)).elementAt\r\n (numberOfcolumns).toString()) == IS_INSERTED)) {\r\n ((Vector) data.elementAt(row)).setElementAt(new Integer(IS_MODIFIED),\r\n numberOfcolumns);\r\n this.updatedStatus = true;\r\n }\r\n }",
"void setState(State state);",
"public void setCell(int color) {\r\n\t\tSound sound = Assets.manager.get(Assets.CLICK_SOUND);\r\n\t\tsound.play();\r\n\t\toccupied = color;\r\n\t\tif (color == -1) {\r\n\t\t\tpiece = new Image(Assets.manager.get(Assets.RED_TXT, Texture.class));\r\n\t\t} else {\r\n\t\t\tpiece = new Image(Assets.manager.get(Assets.YELLOW_TXT, Texture.class));\r\n\t\t}\r\n\t\tpiece.setPosition(img.getX() + OFFSET, img.getY() + OFFSET);\r\n\t\tstage.addActor(piece);\r\n\t}",
"public void clearState() {\n // if the user press the wrong cells, aka path, etc.\n // set state back to grass\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.Chosen) {\n cells.set(i, CellState.Tower);\n } else if (cells.get(i) == CellState.ToPlaceTower) {\n cells.set(i, CellState.Grass);\n }\n\n }\n }",
"private void updateCell(LifeMatrix oldMatrix, LifeMatrix newMatrix, int row, int column) throws Exception {\n\t\tboolean oldVal = oldMatrix.getCellValue(row, column);\n\t\tint numNeighbors = oldMatrix.numberOfNeighbors(row, column);\n\t\tboolean newVal = oldVal;\n\t\tif (oldVal) { // there is life in this cell\n\t\t\tif (numNeighbors < 2 || numNeighbors > 3)\n\t\t\t\tnewVal = false; // kill it!\n\t\t} else { // oldVal == false, there is no life in this cell\n\t\t\tif (numNeighbors == 3)\n\t\t\t\tnewVal = true; // A cell is born\n\t\t}\n\t\tnewMatrix.setCellValue(row, column, newVal);\n\t}",
"public EvaluationException setCell(Coords cellCoords) {\n\t\tthis.cellName = cellCoords.getUserString(); \n\t\treturn this;\n\t}",
"@FXML\n public void changeMarksCellEvent(CellEditEvent<UGSubjectMarks, Integer> edittedCell) throws SQLException, ClassNotFoundException{\n UGSubjectMarks markSelected = subjectmarktbl.getSelectionModel().getSelectedItem();\n markSelected.SetSubMark(Integer.parseInt(edittedCell.getNewValue().toString()));\n int newMarks = Integer.parseInt(edittedCell.getNewValue().toString());\n UGSubject.setSubjectMarks(Integer.parseInt(studentID.getText()), sem, markSelected.getSubName(), newMarks);\n \n \n }",
"void changeCellAt(int col, int row, String sexp);",
"public void setObstacleCell(int row, int col, boolean obstacle) {\n if (obstacle && (in_start(row, col) || in_goal(row, col)))\n return;\n\n grid[row][col].setIsObstacle(obstacle);\n\n if (row >= 1) {\n grid[row - 1][col].setVirtualWall(obstacle); // bottom cell\n\n if (col < MapConstant.MAP_Y - 1) {\n grid[row - 1][col + 1].setVirtualWall(obstacle); // bottom-right cell\n }\n\n if (col >= 1) {\n grid[row - 1][col - 1].setVirtualWall(obstacle); // bottom-left cell\n }\n }\n\n if (row < MapConstant.MAP_X - 1) {\n grid[row + 1][col].setVirtualWall(obstacle); // top cell\n\n if (col < MapConstant.MAP_Y - 1) {\n grid[row + 1][col + 1].setVirtualWall(obstacle); // top-right cell\n }\n\n if (col >= 1) {\n grid[row + 1][col - 1].setVirtualWall(obstacle); // top-left cell\n }\n }\n\n if (col >= 1) {\n grid[row][col - 1].setVirtualWall(obstacle); // left cell\n }\n\n if (col < MapConstant.MAP_Y - 1) {\n grid[row][col + 1].setVirtualWall(obstacle); // right cell\n }\n }",
"public Cell(){\n \tthis.shot=false;\n }",
"public void setCellInBoard(int row, int column, char type) {\n this.myMatrix[row][column] = type;\n }",
"public int setCurrentState(int[][] state) {\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tfor (int j = 0; j < 9; j++) {\n\t\t\t\tthis.currentState[i][j] = state[i][j];\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t}",
"@Test\n public void Create_A_Live_Cell()\n {\n GameCell cell = new GameCell();\n cell.setState(1);\n Assert.assertEquals(1, cell.getState());\n }",
"public void setState(Integer state) {\r\n this.state = state;\r\n }",
"public void setState(Integer state) {\r\n this.state = state;\r\n }"
]
| [
"0.80752414",
"0.7782314",
"0.7376921",
"0.6917181",
"0.68312764",
"0.6784409",
"0.6780909",
"0.67637557",
"0.6757701",
"0.6730899",
"0.6722132",
"0.66865194",
"0.6682424",
"0.6674716",
"0.6660048",
"0.66463345",
"0.6591747",
"0.65759605",
"0.64606446",
"0.64251417",
"0.6392081",
"0.638109",
"0.6366713",
"0.6349158",
"0.62389",
"0.62145126",
"0.621285",
"0.6199516",
"0.61947536",
"0.618906",
"0.6156704",
"0.6145001",
"0.6144316",
"0.6124452",
"0.61219835",
"0.6105466",
"0.6100321",
"0.6071422",
"0.6070751",
"0.60569143",
"0.60513127",
"0.60136515",
"0.5987289",
"0.59674245",
"0.59665036",
"0.59471864",
"0.5941291",
"0.5921768",
"0.5919574",
"0.5913069",
"0.58963317",
"0.58667105",
"0.58650726",
"0.58566165",
"0.5831618",
"0.58306944",
"0.5828687",
"0.5747995",
"0.5737562",
"0.5722415",
"0.5712159",
"0.5712159",
"0.57040054",
"0.5701993",
"0.5697064",
"0.5695692",
"0.56955886",
"0.56760335",
"0.5674003",
"0.565742",
"0.56469965",
"0.56427586",
"0.56427586",
"0.56407434",
"0.56078875",
"0.5602124",
"0.55993104",
"0.5594727",
"0.5591306",
"0.5586278",
"0.55832773",
"0.55799115",
"0.55760556",
"0.5575384",
"0.55735046",
"0.55656546",
"0.55644464",
"0.5563162",
"0.55550903",
"0.55481595",
"0.55460095",
"0.55425066",
"0.55400354",
"0.55340725",
"0.5531043",
"0.5527462",
"0.5516586",
"0.5512965",
"0.5495242",
"0.5495242"
]
| 0.7455303 | 2 |
Counts how many empty cells left. | public int countEmptyCells() {
int result = 0;
for (int[] row : field)
for (int cell : row)
if (cell == EMPTY_MARK)
result++;
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int countEmptyCells()\n\t{\n\t\tint count = 0;\n\t\tfor(int i=0;i<this.numberOfRows;i+=1)\n\t\t{\n\t\t\tfor(int j=0;j<this.numberOfColumns;j+=1)\n\t\t\t{\n\t\t\t\tif(this.board[i][j].value==0)\n\t\t\t\t{\n\t\t\t\t\tcount+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}",
"public int getNumberOfEmptyCells() {\n\t\tint numberOfCellsToFill = 81;\n\t\tfor (byte i = 0; i < 9; i++) {\n\t\t\tfor (byte j = 0; j < 9; j++) {\n\t\t\t\tif (!cells[i][j].isEmpty()) {\n\t\t\t\t\tnumberOfCellsToFill--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn numberOfCellsToFill;\n\t}",
"public int countNotEmpty() {\n\t\tint count = 0;\n\t\tfor (HexagonPos hexagonPos : hexagonsPos) {\n\t\t\tif (!(hexagonPos.getHexagon() instanceof Empty))\n\t\t\t\t++count;\n\t\t}\n\t\treturn count;\n\t}",
"public int countEmptyCellInOriginalSudoku()\n\t{\n\t\treturn ((BoardIndividual)getBest()).countEmptyCellInOriginalSudoku();\n\t}",
"private int _countEmpty(IntTreeNode root) {\r\n if (root == null) {\r\n return 1;\r\n } else {\r\n int leftNulls = _countEmpty(root.left);\r\n int rightNulls = _countEmpty(root.right);\r\n return leftNulls + rightNulls;\r\n }\r\n }",
"int getCellsCount();",
"private static int countNonEmptyBoxes(short[][] puzzle) {\r\n\t\tint count = 0;\r\n\t\tfor(int y = 0; y < puzzle.length; y++){\r\n\t\t\tfor(int x = 0; x < puzzle[0].length;x++){\r\n\t\t\t\t\r\n\t\t\t\tif(puzzle[y][x]!=0)\r\n\t\t\t\t\tcount++;\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn count;\r\n\t}",
"private static float computeEmptyCellScore(GameModel model) {\n\n int numEmptyCells = 0;\n for (byte b : model.getGrid()) {\n if (b < 0) {\n numEmptyCells++;\n }\n }\n return 1 << numEmptyCells;\n }",
"public static int size() {\n return cells.size();\n }",
"private void countCells() {\n\t\tvisitedCells = 0;\n\t\ttotalCells = 0;\n\t\tfor (int ix = 0; ix < maxCells_x; ix++) {\n\t\t\tfor (int iy = 0; iy < maxCells_y; iy++) {\n\t\t\t\ttotalCells++;\n\t\t\t\tif (cell[ix][iy] == 1) {\n\t\t\t\t\tvisitedCells++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public int numOfEmptyRooms() {\n return (int) IntStream.rangeClosed(0, numOfRooms - 1)\n .mapToObj(x -> internalList.get(x)).filter(room -> !room.isOccupied()).count();\n }",
"private static double getEmtpyScore(Game2048Board board) {\n double empty = 0;\n if (board.getEmptyTiles().size() < 4) {\n empty = (4 - board.getEmptyTiles().size());\n }\n return empty;\n }",
"public int getCellsCount() {\n return cells_.size();\n }",
"public int size() {\r\n return cells.size();\r\n }",
"int getMergedCellCount();",
"private void determineCounts( )\n {\n for( int r = 0; r < rows; r++ )\n {\n for( int c = 0; c < cols; c++ )\n {\n if( theMines[ r ][ c ] == 1 )\n theCounts[ r ] [ c ] = 9;\n else\n count( r, c );\n }\n }\n }",
"public int getCellsCount() {\n if (cellsBuilder_ == null) {\n return cells_.size();\n } else {\n return cellsBuilder_.getCount();\n }\n }",
"@Override\n\tpublic int getPhysicalNumberOfCells() {\n\t\treturn 0;\n\t}",
"public int getEmptyViewCount() {\n if (mEmptyLayout == null || mEmptyLayout.getChildCount() == 0) {\n return 0;\n }\n if (!mIsUseEmpty) {\n return 0;\n }\n if (mData.size() != 0) {\n return 0;\n }\n return 1;\n }",
"protected int getCellCount() {\n return this.cellCountStack.getLast();\n }",
"public double emptyRowProportion() {\n double count = 0;\n for (int i = 0; i < this.numRows; i++) {\n if (this.rows[i].length == 0) {\n count++;\n }\n }\n return count / this.numRows;\n }",
"void getCounter(){// wazifeye in mthod, shomaresh ast.\n selectedCellCounter=0;\n emptyCellCounter=0;\n charCounter=0;\n for(int i=0; i<30;i++)\n for(int j=0; j<26;j++){\n if(jtf[i][j].getText().length()==0)\n ++emptyCellCounter;\n else\n charCounter+=jtf[i][j].getText().length();\n if(jtf[i][j].getBackground()==Color.blue || jtf[i][j].getBackground()==Color.green)\n ++selectedCellCounter;\n }\n }",
"private boolean isEmpty(){\n return cellSize == 0;\n }",
"public static int lookForCell(char[] characters) {\r\n\t\tint n = 0;//before counting, the number of the space is 0\r\n\t\tfor(int i=0; i<characters.length; i++) {\r\n\t\t\tif(characters[i]==' ') {\r\n\t\t\t\tn = i;//let n equals to the number of position of empty space\r\n\t\t\t\treturn n;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(n);\r\n\t\treturn n;\r\n\t}",
"public int size() {\r\n\t\tint i = 0;\r\n\t\tif (this.value != 0) {\r\n\t\t\ti++;\r\n\t\t\tif(this.leftChild != null) {\r\n\t\t\t\ti = i + this.leftChild.size();\r\n\t\t\t}\r\n\t\t\tif(rightChild != null){\r\n\t\t\t\ti = i + this.rightChild.size();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn i; \r\n\t}",
"private int[][] listEmptyCells() {\n int nbEmpty = 0;\n int[][] emptyCells;\n int k = 0;\n\n for (int i = 0; i < sb.size; i++) {\n for (int j = 0; j < sb.size; j++) {\n if (sb.get(i, j) == 0)\n nbEmpty++;\n }\n }\n emptyCells = new int[nbEmpty][2];\n\n for (int i = 0; i < sb.size; i++) {\n for (int j = 0; j < sb.size; j++) {\n if (sb.get(i, j) == 0) {\n emptyCells[k][0] = i;\n emptyCells[k][1] = j;\n k++;\n }\n }\n }\n return emptyCells;\n }",
"int colCount();",
"public abstract int numOfEmptyToReproduce();",
"public int getNumMinesLeft() {\n return numMinesLeft;\n }",
"int getMissingCount();",
"@Override\n public int getRemainingMines() {\n int numPlacedFlags = cells.stream()\n .mapToInt(b -> (int) b.stream().filter(c -> c.getFlagState() == 1).count()).sum();\n return numMines - numPlacedFlags;\n }",
"public int getEmptySeats() {\n int num = 0;\n int rownum = seatPlan.length;\n int colnum = seatPlan[0].length;\n for (int row = 0; row < rownum; row++) {\n for (int col = 0; col < colnum; col++) {\n if (!checkSeatTaken(row, col)) {\n num++;\n }\n }\n }\n return num;\n }",
"public int numCollisions() {\r\n int collisions = 0;\r\n for (int i = 0; i < tableSize; i++) {\r\n if (table[i].length() > 1) {\r\n collisions += table[i].length() - 1;\r\n }\r\n }\r\n return collisions;\r\n }",
"@Override\n\tpublic int getRowCount() {\n\t\tint i = 0;\n\t\tfor(i=0;;i++){\n\t\t\tif(dataAll[i][0]==null)\n\t\t\t\tbreak;\n\t\t}\n\t\treturn i;\n\t}",
"public static int getRowCount(){\n \n int row=0;\n boolean empty=false; //row is not empty \n do{\n String b = (String) jTable1.getValueAt(row, 0);\n if (b != null && b.length() != 0) {\n row++; //row count\n } else {\n empty = true;\n }\n }while (!empty);\n return row; //returns row value\n }",
"@Override\r\n protected long getN() {\r\n boolean handleOutOfMemoryError = false;\r\n long n = 0;\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 for (int row = 0; row < nrows; row++) {\r\n for (int col = 0; col < ncols; col++) {\r\n double value = getCell(row, col);\r\n if (Double.isNaN(value) && Double.isFinite(value)) {\r\n if (value != noDataValue) {\r\n n++;\r\n }\r\n }\r\n }\r\n }\r\n return n;\r\n }",
"public int countNodes() {\n int leftCount = left == null ? 0 : left.countNodes();\n int rightCount = right == null ? 0 : right.countNodes();\n return 1 + leftCount + rightCount;\n }",
"public int getNumberofNonLeaves() {\n /**\n * TODO: INSERT YOUR CODE HERE\n * FIND THE NUMBER OF NON_LEAF NODES IN THE TREE AND RETURN\n */\n return nonleaves;\n }",
"public void find_empty_cells(int j) {\n\n int current_col = j % cols;\n int cell;\n\n if (current_col > 0) {\n cell = j - cols - 1;\n if (cell >= 0)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n\n cell = j - 1;\n if (cell >= 0)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n\n cell = j + cols - 1;\n if (cell < all_cells)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n }\n\n cell = j - cols;\n if (cell >= 0)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n\n cell = j + cols;\n if (cell < all_cells)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n\n if (current_col < (cols - 1)) {\n cell = j - cols + 1;\n if (cell >= 0)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n\n cell = j + cols + 1;\n if (cell < all_cells)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n\n cell = j + 1;\n if (cell < all_cells)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n }\n\n }",
"public int getNumExits() {\n return mySize.getNumExits();\n }",
"public int length()\n\t{\n\t\tint total_length=0;\n\t\tfor(int iterator=0; iterator<data.length;iterator++)\n\t\t{\n\t\t\tif(data[iterator]!=0)\n\t\t\t{\n\t\t\t\ttotal_length++;\n\t\t\t}\n\t\t}\n\t\treturn total_length;\n\t}",
"public int getNumberOfCells() {\n return tableCellList.size();\n }",
"private int padWithEmptyCells(Composite parent, int col) {\n for (; col < NUM_COL; ++col) {\n emptyCell(parent);\n }\n col = 0;\n return col;\n }",
"public int getNumberOfOccupiedFields() {\n this.numberOfOccupiedFields = numberOfFieldsOccupiedByStoneColor(Color.WHITE) + numberOfFieldsOccupiedByStoneColor(Color.BLACK);\n return numberOfOccupiedFields;\n }",
"public abstract AwtCell getEmpty();",
"public int getNSteps() {\n //if (mCovered == null) {\n //return 0;\n //}\n return mCovered.length;\n }",
"int getBlockNumsCount();",
"int getBlockNumsCount();",
"int getBlockNumbersCount();",
"public int cantHijosIzquierdos() {\n if (NodoBinario.esNodoVacio(this.raiz)) {\n return 0;\n }\n int cantHijosIzq = 0;\n Queue<NodoBinario<T>> colaDeNodos = new LinkedList<>();\n colaDeNodos.offer(this.raiz);\n while (!colaDeNodos.isEmpty()) {\n NodoBinario<T> nodoActual = colaDeNodos.poll();\n if (!nodoActual.esHijoIzquiedoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoIzquierdo());\n cantHijosIzq++;\n }\n if (!nodoActual.esHijoDerechoVacio()) {\n colaDeNodos.offer(nodoActual.getHijoDerecho());\n }\n }\n return cantHijosIzq;\n }",
"public int size() {\r\n int count = 0;\r\n for (int i = 0; i < SIZE; i++) {\r\n if (tree[i] != null) {\r\n count++;\r\n }\r\n }\r\n return count;\r\n }",
"public static int colCount() {\n\treturn sheet.getRow(0).getLastCellNum();\n\t}",
"private int size() {\n\treturn matrix.length; //# of rows\n }",
"public long getMissingCount() {\n return nullCount + nanCount + infinityCount;\n }",
"public int countNeighbours() {\n\t\tint count = 0;\n\t\tif (this.hasNeighbour(0))\n\t\t\tcount++;\n\t\tif (this.hasNeighbour(1))\n\t\t\tcount++;\n\t\tif (this.hasNeighbour(2))\n\t\t\tcount++;\n\t\treturn count;\n\t}",
"public int numSpaceLeft()\n {\n \n return itemLimit - itemsHeld;\n }",
"public int discWhiteCount() {\n int countWHITE = 0;\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\t\n\t\t\tfor (int j = 0; j < board.length; j++) {\n\t\t\t\t\n\t\t\t\tif (!(isSpotBlank(i,j))) {\n\t\t\t\t\t\n\t\t\t\t\tif (isDiscWhite(i,j)) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcountWHITE ++;\n\t\t\t\t\t\t\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn countWHITE;\n\t\t\n\t}",
"private int checkLines(){\r\n \tint contRows = 0;\r\n \t\r\n \tfor (float y = height; y >= 0 && contRows < 4; y--) {\r\n \t\tif (isFullRow(y)) {\r\n \t\t\tcontRows++;\r\n \t\t\tdeleteRow(y);\r\n \t\t}\r\n \t}\r\n \treturn contRows;\r\n }",
"@Override\r\n\t\tpublic int count() {\n\t\t\treturn 0;\r\n\t\t}",
"public int numLeft() {\n return types.size() - index;\n }",
"int getNumberOfStonesLeftToPlace();",
"@Override\n\tpublic int size() {\n\t\tint s = valCount; // saves value of current node\n\t\tfor (int i = 0; i < childCount; ++i) { // then checks all children\n\t\t\ts += children[i].size();\n\t\t}\n\t\treturn s;\n\t}",
"public int countPlus() {\n\t\tint counter = 0;\n\t\t\n\t\tfor(int row = 0; row < grid.length; row++) {\n\t\t\tfor(int col = 0; col < grid[0].length; col++) {\n\t\t\t\tif(isMiddleOfPlus(row, col)) {\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn counter; // TODO ADD YOUR CODE HERE\n\t}",
"public int discBlackCount() {\n\t\tint countBLACK = 0;\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\t\n\t\t\tfor (int j = 0; j < board.length; j++) {\n\t\t\t\t\n\t\t\t\tif (!(isSpotBlank(i,j))) {\n\t\t\t\t\t\n\t\t\t\t\tif (isDiscBlack(i,j)) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcountBLACK ++;\n\t\t\t\t\t\t\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn countBLACK;\n\t\t\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}",
"@Override\n\tpublic int count() {\n\t\treturn 0;\n\t}",
"public int sizeOdd() {\n\t\t// TODO\n\t\treturn sizeOdd(root);\n\t}",
"int countComponents() throws Exception;",
"public int cardsLeft() {\n return deck.size();\n }",
"public int[] countRowZeroes()\n\t{\n\t\tint[] zeros = new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tzeros[i]=0;\n\t\t\tfor(int j=0;j<n;j++)\n\t\t\t{\n\t\t\t\tif(cost[i][j]==0)\n\t\t\t\t{\n\t\t\t\t\tzeros[i]++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn zeros;\n\t}",
"public int fillingOfMatrix(){\n int count=0;\n for (int i=0;i<m;i++)\n count+=matrix[i].size();\n return count;\n }",
"protected static int countNeighbours(int i, int j, byte[][] currentGen){\n int count = 0;\n \n for(int x = i-1; x<i+2; x++){\n count+=checkBorders(x, j-1, currentGen);\n count+=checkBorders(x, j+1, currentGen);\n }\n count+=checkBorders(i-1, j, currentGen);\n count+=checkBorders(i+1, j, currentGen);\n\n return count;\n }",
"public int count() {\n\t\treturn sizeC;\n\t}",
"public int numberOfFullNodes() {\r\n\t\tif (root == null) {\r\n\t\t\treturn 0;\r\n\t\t} // if\r\n\t\treturn numberOfFullNodes(root);\r\n\t}",
"int nbColonnes();",
"public long count() {\n\t\treturn 0;\n\t}",
"public long count() {\n\t\treturn 0;\n\t}",
"public void countCollisions() {\n int col2 = 0;\n int col3 = 0;\n int col4 = 0;\n int col5OrMore = 0;\n \n for (int x = 0; x < buckets.length; x++) {\n SList chain = (SList) buckets[x];\n if (chain.length() == 2) {\n col2++;\n }\n if (chain.length() == 3) {\n col3++;\n }\n if (chain.length() == 4) {\n col4++;\n }\n if (chain.length() >= 5) {\n col5OrMore++;\n }\n }\n System.out.println(\"=========HASHTABLE================\");\n System.out.println(\"# of entries: \" + size);\n System.out.println(\"Number of single collisions: \"+col2);\n System.out.println(\"Number of double collisions: \"+col3);\n System.out.println(\"Number of triple collisions: \"+col4);\n System.out.println(\"Number of 5 or more collisions: \"+col5OrMore);\n }",
"@Override\n\tpublic int getNumRows() {\n\t\treturn 0;\n\t}",
"public int updateBoard() {\n clearTemporaryData();\n setUsedValuesbyRow();\n setUsedValuesByColumns();\n setUsedValueInBoxes();\n findUniqueInBoxes();\n updateValues();\n\n return numbers.stream()\n .filter(n -> n.getValue() == 0)\n .collect(Collectors.toList()).size();\n }",
"public static int count_non_empty(List nodeset) {\n if ((nodeset == null) || (nodeset.size() == 0)) {\n return 0;\n }\n\n int count = 0;\n Iterator iterator = nodeset.iterator();\n\n while (iterator.hasNext()) {\n String value = iterator.next().toString();\n\n if (value.length() > 0) {\n count++;\n }\n }\n\n return count;\n }",
"public int tilesRemain() {\n return tiles.size();\n }",
"int getUnreachableCount();",
"private int count(Board board, char symbol)\n {\n int answer = 0;\n \n for (int i = 0; i < size; i++)\n if (testRow(board, i, symbol))\n answer++;\n \n for (int i = 0; i < size; i++)\n if (testColumn(board, i, symbol))\n answer++;\n \n if (testLeftDiagonal(board, symbol))\n answer++;\n \n if (testRightDiagonal(board, symbol))\n answer++;\n \n return answer;\n }",
"int getColumnCount();",
"int getColumnCount();",
"@Override\n public int getNumNeighboringMines(int row, int col) {\n int count = 0, rowStart = Math.max(row - 1, 0), rowFinish = Math.min(row + 1, grid.length - 1), colStart = Math.max(col - 1, 0), colFinish = Math.min(col + 1, grid[0].length - 1);\n\n for (int curRow = rowStart; curRow <= rowFinish; curRow++) {\n for (int curCol = colStart; curCol <= colFinish; curCol++) {\n if (grid[curRow][curCol].getType() == Tile.MINE) count++;\n }\n }\n return count;\n }",
"public static int rowCount() {\n\t return sheet.getPhysicalNumberOfRows();\n\t}",
"public int getRowCountInSheet() {\n\t\t int rowcount = sheet.getLastRowNum()-sheet.getFirstRowNum();\n\t\t return rowcount;\n\n\t}",
"public int getElfCount() {\n\t\tcounter = 0;\n\t\tfor (int row = 0; row < battlefield.length; row++) {\n\t\t\tfor (int column = 0; column < battlefield[row].length; column++) {\n\t\t\t\tif (battlefield[row][column].getElf() != null) {\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn counter;\n\t}",
"@Override\n public long getNonNullCount() {\n return nonMissingCount + nanCount + infinityCount;\n }",
"public int size() {\n if(root == null){\n return 0;\n }\n else{\n return 1 + size(root.lc) + size(root.rc);\n }\n }",
"@Override\n\tpublic int numElements() {\n\t\treturn stencil.holes.length;\n\t}",
"public int space(){\n return (tableSize - usedIndex);\n }",
"public boolean checkLeft()\n\t{\n\t\tif(col-1>=0)\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"public int cardinality() {\n\t\tint counter = 0;\n\t\tfinal EWAHIterator i =\n\t\t\t\tnew EWAHIterator(this.buffer, this.actualsizeinwords);\n\t\twhile (i.hasNext()) {\n\t\t\tRunningLengthWord localrlw = i.next();\n\t\t\tif (localrlw.getRunningBit()) {\n\t\t\t\tcounter += wordinbits * localrlw.getRunningLength();\n\t\t\t}\n\t\t\tfor (int j = 0; j < localrlw.getNumberOfLiteralWords(); ++j) {\n\t\t\t\tcounter += Long.bitCount(i.buffer()[i.dirtyWords() + j]);\n\t\t\t}\n\t\t}\n\t\treturn counter;\n\t}",
"@Override\r\n\tpublic int getNumberOfNodes() {\n\t\tint leftNumber=0;\r\n\t\tint rightNumber=0;\r\n\t\tif(left!=null){\r\n\t\t\tleftNumber=left.getNumberOfNodes();\r\n\t\t}\r\n\t\tif(right!=null)\r\n\t\t\trightNumber=right.getNumberOfNodes();\r\n\t\treturn leftNumber+rightNumber+1;\r\n\t}",
"public int count( ) {\n if(empty()) {\n return 0;\n } else{\n return countNodes(root);\n }\n }"
]
| [
"0.8079898",
"0.7670334",
"0.7246445",
"0.72293776",
"0.6906921",
"0.68691033",
"0.6775967",
"0.6699691",
"0.66978395",
"0.6650374",
"0.6470564",
"0.64604557",
"0.64396715",
"0.64263314",
"0.6383874",
"0.6368033",
"0.6359795",
"0.63435155",
"0.6301021",
"0.62921077",
"0.62274355",
"0.62236094",
"0.62120736",
"0.6184407",
"0.61803806",
"0.6125245",
"0.60991824",
"0.6096453",
"0.6093205",
"0.60857636",
"0.6081662",
"0.60736334",
"0.6058013",
"0.60496396",
"0.6042882",
"0.60414416",
"0.60013044",
"0.59971905",
"0.5990118",
"0.595485",
"0.5928855",
"0.59186745",
"0.5904683",
"0.5883581",
"0.5866725",
"0.5865988",
"0.5851608",
"0.5851608",
"0.5846673",
"0.5837707",
"0.5832985",
"0.58325756",
"0.58247286",
"0.5823712",
"0.58135104",
"0.58107996",
"0.58098215",
"0.58017814",
"0.57929456",
"0.5776951",
"0.5775231",
"0.5766105",
"0.57520396",
"0.57340527",
"0.57312614",
"0.57312614",
"0.57312614",
"0.57312614",
"0.5729998",
"0.5716854",
"0.5714208",
"0.57132715",
"0.5700038",
"0.5692932",
"0.5692559",
"0.5687011",
"0.567178",
"0.5669568",
"0.5669568",
"0.56673396",
"0.5661706",
"0.5658188",
"0.5653945",
"0.5652806",
"0.5652709",
"0.56478983",
"0.5642578",
"0.5642578",
"0.5638591",
"0.56367445",
"0.5635229",
"0.5633178",
"0.5631361",
"0.5630344",
"0.5624897",
"0.56179607",
"0.56120294",
"0.56105995",
"0.56031686",
"0.5599296"
]
| 0.8646478 | 0 |
Max(by absolute value) sum of cells in a line which is used to determine winner. | public int getMaxLineSum() {
int result = 0;
int maxRowSum = getMaxRowSum();
int maxColumnSum = getMaxColumnSum();
int maxDiagonalSum = getMaxDiagonalSum();
if (abs(maxRowSum) > abs(result))
result = maxRowSum;
if (abs(maxColumnSum) > abs(result))
result = maxColumnSum;
if (abs(maxDiagonalSum) > abs(result))
result = maxDiagonalSum;
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void calValue() {\r\n for (char[] array : root.lines()) {\r\n int[] nums = HeuristicAdvanNode.checkLine(array);\r\n value += calHValue(nums[0], nums[1]);\r\n if (Math.abs(value) > xWin) {\r\n return;\r\n }\r\n }\r\n }",
"public int best(){\n List<Integer> points = count();\n Integer max = 0;\n for (Integer p: points){\n if (p <= 21 && max < p){\n max = p;\n }\n }\n return max;\n }",
"private String findMax(int[][] grid) {\n int max = 0, rx = 0, ry = 0, size = 0;\n for (int y = 1; y <= 300; y++) {\n for (int x = 1; x <= 300; x++) {\n // iterate over diameter, keep results in order to reuse them\n Map<Integer, Integer> squares = new HashMap<>(300);\n for (int d = 0; d <= 300 - Math.max(x, y); d++) {\n int current = 0;\n\n if (d == 0) {\n current += grid[y][x];\n } else {\n for (int offset = 0; offset < d; offset++) {\n current += grid[y + offset][x + d]; // skip inner square, get last column\n current += grid[y + d][x + offset]; // skip inner square, get last row\n }\n current += squares.get(d - 1); // add inner square of size (d-1)\n current += grid[y + d][x + d]; // add bottom-right corner cell\n }\n\n squares.put(d, current);\n\n if (current > max) {\n max = current;\n rx = x; ry = y;\n size = d;\n }\n }\n }\n }\n\n return rx + \",\" + ry + \",\" + (size + 1);\n }",
"private float getMaxY(HomePieceOfFurniture piece) {\n float [][] points = piece.getPoints();\n float maxY = Float.NEGATIVE_INFINITY;\n for (float [] point : points) {\n maxY = Math.max(maxY, point [1]);\n } \n return maxY;\n }",
"private static void findMaxSumMatrix(int[][] matrix) {\n int maxSum = Integer.MIN_VALUE;\n int row = 0;\n int col = 0;\n for (int rows = 0; rows <matrix.length - 2; rows++) {\n for (int column = 0; column <matrix[rows].length - 2; column++) {\n int currentItem = matrix[rows][column];\n int neighborItem = matrix[rows][column + 1];\n int nextNeighborItem = matrix[rows][column + 2];\n\n int currentDownNeighborItem = matrix[rows + 1][column];\n int downNeighborItem = matrix[rows + 1][column + 1];\n int nextDownNeighborItem = matrix[rows + 1][column + 2];\n\n int lastItem = matrix[rows + 2][column];\n int lastNeighborItem = matrix[rows + 2][column + 1];\n int nextLastNeighborItem = matrix[rows + 2][column + 2];\n\n int sum = getSum(currentItem, neighborItem, nextNeighborItem, currentDownNeighborItem, downNeighborItem, nextDownNeighborItem, lastItem, lastNeighborItem, nextLastNeighborItem);\n\n if(maxSum <=sum){\n maxSum = sum;\n row = rows;\n col = column;\n }\n }\n }\n System.out.println(\"Sum = \" + maxSum);\n System.out.printf(\"%s %s %s\\n\",matrix[row][col], matrix[row][col + 1],matrix[row][col + 2]);\n System.out.printf(\"%s %s %s\\n\",matrix[row + 1][col],matrix[row + 1][col + 1], matrix[row + 1][col + 2]);\n System.out.printf(\"%s %s %s\",matrix[row + 2][col], matrix[row + 2][col + 1], matrix[row + 2][col + 2]);\n }",
"public int eval()\n\t\t{\n\t\t\tif (p[BLACK]==0) return MAX+1;\t//black=0 then white win then return max\n\t\t\tif (p[WHITE]==0) return MIN-1;\t//white=0 then black win then return min\n\t\t\tint bl=getNumberOne(p[0]);int wh=getNumberOne(p[1]);\n\t\t\treturn wh-bl;\n\t\t}",
"public int getHourGlassValue(int[][] mat){\n int max=0;\n for(int i=1; i<5; i++){\n for(int j=1; j < 5; j++){\n if(mat[i-1][j-1]!=0 && mat[i-1][j]!=0 && mat[i-1][j+1]!=0 && mat[i][j]!=0\n && mat[i+1][j-1]!=0 && mat[i+1][j]!=0 && mat[i+1][j+1]!=0){\n int val = mat[i-1][j-1] + mat[i-1][j] + mat[i-1][j+1]\n + mat[i][j]\n + mat[i+1][j-1] + mat[i+1][j] + mat[i+1][j+1];\n if(val>max) max=val;\n }\n }\n }\n\n return max;\n }",
"int maxPathSum(int tri[][], int m, int n)\n {\n // loop for bottom-up calculation\n //i是row,j是column\n for (int i = m - 1; i >= 0; i--)\n {\n for (int j = 0; j <= i; j++)\n {\n // for each element, check both\n // elements just below the number\n // and below right to the number\n // add the maximum of them to it\n if (tri[i + 1][j] > tri[i + 1][j + 1])\n tri[i][j] += tri[i+1][j];\n else\n tri[i][j] += tri[i + 1][j + 1];\n }\n }\n\n // return the top element\n // which stores the maximum sum\n return tri[0][0];\n }",
"private int getMax(int[][] dp, int row, int col) {\r\n \tint height = 0;\r\n \tint minWidth = dp[row][col]; // the number of consecutive 1s\r\n \t// go up which means row number decreases\r\n \tfor (int i = row - 1; i >= 0; i--) {\r\n\t\t\t// should not 0, should break\r\n\t\t\tif (dp[i][col] >= minWidth) {\r\n\t\t\t\theight += 1;\r\n\t\t\t} else {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n \t}\r\n \t// go down which means row number increases\r\n \tfor (int i = row; i < dp.length; i++) {\r\n \t // should not 0, should break\r\n \t\tif (dp[i][col] >= minWidth) {\r\n height += 1;\r\n } else {\r\n break;\r\n }\r\n \t}\r\n\r\n \treturn minWidth * height;\r\n }",
"public int theHighest() {\r\n\t\tint highest = 0;\r\n\t\tfor(int i = 0; i < rows_size; i++) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++) {\r\n\t\t\t\tif(game[i][j].getValue() > highest)\r\n\t\t\t\t\thighest = game[i][j].getValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn highest;\r\n\t}",
"public int maxArea(ArrayList<Integer> a) {\n\t if(a.size() < 2){\n\t return 0;\n\t }\n\t int left = 0;\n\t int right = a.size()-1;\n\t int val = 0;\n\t\t\n\t\t// Iterate till the left and right lines are not the same\n\t while(left<right){\n\t\t\t\n\t\t\t// Update the maximum value\n\t val = Math.max(val, (right-left)*(Math.min(a.get(left), a.get(right))));\n\t\t\t\n\t\t\t// Left value is smaller than right, move right\n\t if(a.get(left) < a.get(right)){\n\t left++;\n\t }\n\t\t\t// Left value is larger than right, move left\n\t else{\n\t right--;\n\t }\n\t }\n\t return val;\n\t}",
"private static int maxVal(int[][] board, boolean[][] covered, int row, int col){\n if(row == 6)\n return boardScore(board, covered);\n \n // recursive case\n // choices for current position: 1. cover if allowed or 2. leave uncovered.\n int nextCol = (col + 1) % 6;\n int nextRow = row + (col + 1) / 6;\n int doNotCoverCurrent = maxVal(board, covered, nextRow, nextCol);\n int coverCurrent = 0;\n if( canCoverCurrent(covered, row, col) ){\n covered[row][col] = true;\n coverCurrent = maxVal(board, covered, nextRow, nextCol);\n covered[row][col] = false;\n }\n return Math.max(doNotCoverCurrent, coverCurrent);\n }",
"public void findMaxComb() {\n\t\tHashMap<Integer, HashSet<Integer>> adj = new HashMap<Integer, HashSet<Integer>>();\n\t\tfor (int row=0; row< w; row++) {\n\t\t\tfor (int col=0; col<l; col++) {\n\t\t\t\tHashSet<Integer> hs = new HashSet<Integer>();\n\t\t\t\t//go left\n\t\t\t\tif (inBoard(row, col-1) && visited[row][col-1] != visited[row][col]) //in board and not equal\n\t\t\t\t\ths.add(visited[row][col-1]);\n\n\t\t\t\t//go up\n\t\t\t\tif (inBoard(row-1, col) && visited[row-1][col] != visited[row][col])\n\t\t\t\t\ths.add(visited[row-1][col]);\n\n\t\t\t\t//go right\n\t\t\t\tif (inBoard(row, col+1) && visited[row][col+1] != visited[row][col])\n\t\t\t\t\ths.add(visited[row][col+1]);\n\n\t\t\t\t//go down\n\t\t\t\tif (inBoard(row+1, col) && visited[row+1][col] != visited[row][col])\n\t\t\t\t\ths.add(visited[row+1][col]);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (adj.containsKey(visited[row][col])) {\n\t\t\t\t\tHashSet<Integer> tt = adj.get(visited[row][col]);\n\t\t\t\t\ttt.addAll(hs);//union, return boolen\n\t\t\t\t\tadj.put(visited[row][col], tt); \n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tadj.put(visited[row][col], hs);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tint tempMax = 0;\n\t\tfor (Integer key : adj.keySet()) {\n\t\t\tfor (Integer ele : adj.get(key)) {\n\t\t\t\ttempMax = Math.max(tempMax, map.get(key) + map.get(ele));\n\t\t\t}\n\t\t}\n\t\tmaxComb = tempMax;\n\t}",
"public static int goldMine(int arr[][]) {\n\t\tint f[][] = new int[arr.length][arr[0].length];\n\n\t\tfor (int row = 0; row <= arr.length - 1; row++) {\n\t\t\tf[row][arr[0].length - 1] = arr[row][arr[0].length - 1];\n\t\t}\n\n\t\tfor (int col = arr[0].length - 2; col >= 0; col--) {\n\t\t\tfor (int row = 0; row <= arr.length - 1; row++) {\n\t\t\t\tif (row == 0) {\n\t\t\t\t\tint tempcost = Math.max(f[row][col + 1], f[row + 1][col + 1]);\n\t\t\t\t\tf[row][col] = arr[row][col] + tempcost;\n\t\t\t\t} else if (row == arr.length - 1) {\n\t\t\t\t\tint tempcost = Math.max(f[row][col + 1], f[row - 1][col + 1]);\n\t\t\t\t\tf[row][col] = arr[row][col] + tempcost;\n\t\t\t\t} else {\n\t\t\t\t\tint tempcost = Math.max(f[row][col + 1], f[row - 1][col + 1]);\n\t\t\t\t\ttempcost = Math.max(tempcost, f[row + 1][col + 1]);\n\t\t\t\t\tf[row][col] = arr[row][col] + tempcost;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tint max = Integer.MIN_VALUE;\n\t\tfor (int i = 0; i <= arr.length - 1; i++) {\n\t\t\tif (f[i][0] > max) {\n\t\t\t\tmax = f[i][0];\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}",
"static int getMaxCoinValGeeks(int arr[], int n)\n {\n // Create a table to store solutions of subproblems\n int table[][] = new int[n][n];\n int gap, gapStartIndx, gapEndIndx, x, y, z;\n\n // Fill table using above recursive formula.\n // Note that the tableis filled in diagonal\n // fashion (similar to http://goo.gl/PQqoS),\n // from diagonal elements to table[0][n-1]\n // which is the result.\n for (gap = 0; gap < n; ++gap)\n {\n // both gapStartIndx and gapEndIndx are incremented in each loop iteration\n // for each gap, gapStartIndx keeps moving\n // gapEndIndx is always gap more than the gapStartIndx\n // when gap == 0, gapStartIndx = gapEndIndx\n // table[i,j] identifies the max value obtained by the player who picks first\n // first player = i to get val[i] , range of coins left = i+1, j\n // second player max value = table[i+1,j], range of coins left = i+2, j\n // first player max value = table[i+2,j]. So total value for player 1 is\n // val[i] + table[i+2, j]\n // first player picks j to get val[j], range of coins left i, j-1.\n // second player max = table[i, j-1] range of coins left i, j-2\n // first player max = table[i,j-2]\n // so for finding max value for a p\n for (gapStartIndx = 0, gapEndIndx = gap; gapEndIndx < n; ++gapStartIndx, ++gapEndIndx)\n {\n // Here x is value of F(i+2, j),\n // y is F(i+1, j-1) and z is\n // F(i, j-2) in above recursive formula\n // if gapStartIndx and gapEndIndx are two or more apart\n x = ((gapStartIndx + 2) <= gapEndIndx) ? table[gapStartIndx + 2][gapEndIndx] : 0;\n y = ((gapStartIndx + 1) <= (gapEndIndx - 1)) ? table[gapStartIndx +1 ][gapEndIndx - 1] : 0;\n z = (gapStartIndx <= (gapEndIndx - 2)) ? table[gapStartIndx][gapEndIndx - 2]: 0;\n\n table[gapStartIndx][gapEndIndx] = Math.max(arr[gapStartIndx] +\n Math.min(x, y), arr[gapEndIndx] +\n Math.min(y, z));\n }\n }\n\n return table[0][n - 1];\n }",
"private static int getMaxScore(char[][] board){\n\n\t\tString result = gameStatus(board);\n\n\t\tif (result.equals(\"true\") && winner == 'X') return 1; //if x won\n\t\telse if (result.equals(\"true\") && winner == 'O') return -1;//if O won\n\t\telse if (result.equals(\"tie\")) return 0; //if tie\n\t\telse { \n\n\t\t\tint bestScore = -10;\n\t\t\tHashSet<Integer> possibleMoves = findPossibleMoves(board);\n\n\t\t\tfor (Integer move: possibleMoves){\n\n\t\t\t\tchar[][] modifiedBoard = new char[3][3];\n\n\t\t\t\tfor (int row = 0; row < 3; row++){\n\t\t\t\t\tfor (int col = 0; col < 3; col++){\n\t\t\t\t\t\tmodifiedBoard[row][col] = board[row][col];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tmodifiedBoard[move/3][move%3]='X';\n\n\t\t\t\tint currentScore = getMinScore(modifiedBoard);\n\n\t\t\t\tif (currentScore > bestScore){\n\t\t\t\t\tbestScore = currentScore;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\treturn bestScore;\n\t\t}\n\t}",
"public double getBiggestY() {\r\n double y = 0;\r\n List<Enemy> enemyLowest = this.lowestLine();\r\n if (enemyLowest.size() > 0) {\r\n y = enemyLowest.get(0).getCollisionRectangle().getBoundaries().getLowY();\r\n for (Enemy e: enemyLowest) {\r\n if (e.getCollisionRectangle().getBoundaries().getLowY() > y) {\r\n y = e.getCollisionRectangle().getBoundaries().getLowY();\r\n }\r\n }\r\n return y;\r\n }\r\n return y;\r\n }",
"public int determineHighestVal() {\n if (playerCards[0].value > playerCards[1].value) {\n return playerCards[0].value;\n }\n return playerCards[1].value;\n\n }",
"public int calculateLineBonus()\r\n {\r\n int bonus = 0;\r\n \r\n switch(line[0])\r\n {\r\n case 1:\r\n bonus = gameBoard.getTile(0,0).getTileValue() + gameBoard.getTile(0,1).getTileValue() + gameBoard.getTile(0,2).getTileValue();\r\n break;\r\n case 2:\r\n bonus = gameBoard.getTile(1,0).getTileValue() + gameBoard.getTile(1,1).getTileValue() + gameBoard.getTile(1,2).getTileValue();\r\n break;\r\n case 3:\r\n bonus = gameBoard.getTile(2,0).getTileValue() + gameBoard.getTile(2,1).getTileValue() + gameBoard.getTile(2,2).getTileValue();\r\n break;\r\n case 4: \r\n bonus = gameBoard.getTile(0,0).getTileValue() + gameBoard.getTile(1,0).getTileValue() + gameBoard.getTile(2,0).getTileValue();\r\n break;\r\n case 5:\r\n bonus = gameBoard.getTile(0,1).getTileValue() + gameBoard.getTile(1,1).getTileValue() + gameBoard.getTile(2,1).getTileValue();\r\n break;\r\n case 6: \r\n bonus = gameBoard.getTile(0,2).getTileValue() + gameBoard.getTile(1,2).getTileValue() + gameBoard.getTile(2,2).getTileValue();\r\n break;\r\n case 7: \r\n bonus = gameBoard.getTile(0,0).getTileValue() + gameBoard.getTile(1,1).getTileValue() + gameBoard.getTile(2,2).getTileValue();\r\n break;\r\n case 8:\r\n bonus = gameBoard.getTile(2,0).getTileValue() + gameBoard.getTile(1,1).getTileValue() + gameBoard.getTile(0,2).getTileValue();\r\n break;\r\n }\r\n \r\n return bonus;\r\n }",
"@Test\r\n public void testMaxSum() {\r\n Player player = new Player();\r\n int expResult = -1;\r\n int result = player.maxSum();\r\n assertEquals(expResult, result);\r\n \r\n Stack stack=new Stack(false);\r\n player.setHand(stack.drawTiles(28));\r\n int expResult2=12;\r\n int result2=player.maxSum();\r\n assertEquals(expResult2, result2);\r\n }",
"static int hourglassSum(int[][] arr) {\n int answer = 0 ;\n\n// validatable vertexes\n// i = 1,2,3,4\n// j = 1,2,3,4\n\n int[] adjacentArrX = {-1, -1,-1,0, 1,1,1};\n int[] adjacentArrY = {-1, 0, 1, 0, -1, 0, 1};\n\n for (int i = 1; i < 5; i++) {\n for (int j = 1; j < 5; j++) {\n int nowValue = Integer.MIN_VALUE;\n for (int r = 0; r < adjacentArrX.length; r++) {\n nowValue += arr[i + adjacentArrX[r]][j + adjacentArrY[r]];\n }\n answer = Math.max(answer, nowValue);\n }\n }\n\n\n return answer;\n\n }",
"static int getMaxCoinValMine(int vals[], int n) {\n int[][] maxVals = new int[n][n];\n for(int wind = 0; wind < n; wind++) {\n // start is always less than or equal to end\n for(int start=0, end = start+wind; end<n; start++,end++ ) {\n // no elements element\n if(wind==0) {\n maxVals[start][end] = 0;\n }\n else if(start == end) {\n // only single element\n maxVals[start][end] = vals[start];\n }\n else {\n // start >=0\n // calculate wind[start][end]\n // chose end, then value is val[end] for P1, val[start][end-1] for P2 and val[start][end-2] for P1\n int valEnd = vals[end] + (( start < end-2)? maxVals[start][end-2]:0);\n // chose start, then value is val[start] for P1, val[start+1][end] for P2 and val[start+2][end] for P1\n int valStart = vals[start] + ((start+2 < end)? maxVals[start+2][end]:0);\n maxVals[start][end] = max(valEnd, valStart);\n }\n }\n }\n return maxVals[0][n-1];\n\n }",
"private int getValueOfLine(int[] line) {\n int p1 = 0, p2 = 0;\n for (int n : line) {\n if (n == PLAYER_1)\n p1++;\n if (n == PLAYER_2)\n p2++;\n }\n if (p1 > 0 && p2 > 0)\n return 0;\n // Three in a line means winning\n if (p1 == 3)\n return VALUE_WIN;\n if (p1 == 2)\n return VALUE_TWO_IN_LINE;\n if (p1 == 1)\n return VALUE_ONE_IN_LINE;\n // Three in a line of the other player means losing\n if (p2 == 3)\n return VALUE_LOSE;\n if (p2 == 2)\n return -VALUE_TWO_IN_LINE;\n if (p2 == 1)\n return -VALUE_ONE_IN_LINE;\n return 0;\n }",
"public double max() {\n double resultat = 0;\n double tmp = 0;\n System.out.println(\"type:\" + type);\n for (int i = 0; i < tab.size(); i++) {\n tmp = CalculatorArray.max(tab.get(i));\n if (tmp > resultat) {\n resultat = tmp;\n }\n }\n System.out.println(\"Max colonne:\" + resultat);\n return resultat;\n }",
"public int getCompleteSquare(ArrayList<Line> drawnLines) {\r\n\t\tint square1LinesDrawn = 0;\r\n\t\tint square2LinesDrawn = 0;\r\n\t\t\r\n\t\tfor (Line line : drawnLines) {\r\n\t\t\tif (square1Partners.contains(line) && square1LinesDrawn < 3) {\r\n\t\t\t\tsquare1LinesDrawn++;\r\n\t\t\t}\r\n\t\t\tif (square2Partners.contains(line) && square2LinesDrawn < 3) {\r\n\t\t\t\tsquare2LinesDrawn++;\r\n\t\t\t}\r\n\t\t\tif (square1LinesDrawn == 3 && square2LinesDrawn == 3) {\r\n\t\t\t\treturn 3;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (square1LinesDrawn < 3 && square2LinesDrawn < 3) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn square1LinesDrawn == 3 ? 1 : 2;\r\n\t}",
"static int hourglassSum(int[][] arr) {\n\n int sum = Integer.MIN_VALUE;\n int maxSum = Integer.MIN_VALUE;\n\n for( int i = 0; i < 4; ++i ) {\n for( int j = 0; j < 4; ++j ) {\n sum = arr[i][j] + arr[i][j+1] + arr[i][j+2] + arr[i+1][j+1] + arr[i+2][j] + arr[i+2][j+1] + arr[i+2][j+2];\n maxSum = Math.max( maxSum, sum );\n }\n }\n\n return maxSum;\n }",
"private double findMaxY() {\n\t\tif (pointList.size()==0) {\n\t\t\treturn Double.NaN;\n\t\t}\n\t\tdouble max = pointList.get(0).getY();\n\t\tfor(int i=0; i<pointList.size(); i++)\n\t\t\tif (max<pointList.get(i).getY())\n\t\t\t\tmax = pointList.get(i).getY();\n\t\treturn max;\n\t}",
"public int maxScore(int[] cardPoints, int k) {\n int ans = 0;\n int[] cSum = new int[cardPoints.length + 1];\n for (int i = 1; i < cSum.length; i++) \n cSum[i] = cSum[i - 1] + cardPoints[i - 1];\n \n int windowSize = cardPoints.length - k;\n int sum = cSum[cSum.length - 1];\n for (int i = 0; i <= k; i++)\n ans = Math.max(ans, sum - (cSum[i + windowSize] - cSum[i]));\n \n return ans;\n }",
"private float getQScore(Stone[][] board, int line, int col,\n int depth, int initialDepth){\n Chain chain = new Chain();\n Stone stone;\n if(depth % 2 == 1) stone = new Stone(color ? \"black\" : \"white\", chain);\n else stone = new Stone(color ? \"white\" : \"black\", chain);\n stone.setPosition(line, col);\n int nrStonesRemoved, chainSize, chainLiberties, score;\n board[line][col] = stone;\n //verific daca am luat pietre detinute de oponent\n nrStonesRemoved = Control.verifyNeighbourStones(board, stone.getColor(),\n line, col, false);\n //efectuez eventualele modificari ale lanturilor proprii ce pot aparea in urma plasarii pietrei\n Control.combineChains(board, stone, stone.getColor(), line, col);\n chainSize = stone.getChain().getStones().size();\n chainLiberties = stone.getChain().getLibertiesNumber();\n //aflu scorul starii\n score = nrStonesRemoved * 10 + chainSize * 30 + chainLiberties * 50;\n\n if(depth == 0){\n return (initialDepth % 2 == 1) ? -score : score;\n }\n\n float currentScore, max = 0;\n for(int i = 0; i < size; i++)\n for(int j = 0; j < size; j++){\n chain = new Chain();\n if(depth % 2 == 1) stone = new Stone(color ? \"white\" : \"black\", chain);\n else stone = new Stone(color ? \"black\" : \"white\", chain);\n stone.setPosition(i, j);\n int[] lib = Control.verifyLiberties(board, stone, i, j);\n if(board[i][j] == null && lib[0] + lib[1] != 0){\n currentScore = getQScore(board, i, j, depth - 1, initialDepth);\n if(currentScore > max){\n max = currentScore;\n }\n }\n }\n\n score += max * (depth / initialDepth);\n return (depth % 2 == 1) ? score : -score;\n }",
"private static int max_value(State curr_state) {\n\t\tcounterMinimax++; \r\n\r\n\r\n\t\t//Check if the current state is a terminal state, if it is, return\r\n\t\t//its terminal value\r\n\t\tif(curr_state.isTerminal()){\r\n\t\t\treturn curr_state.getScore();\r\n\t\t}\r\n\r\n\t\tint max_value = Integer.MIN_VALUE;\r\n\t\tState[] successors = curr_state.getSuccessors('1');\r\n\r\n\t\tif(successors.length == 0 && curr_state.isTerminal() == false){\r\n\t\t\tmax_value = Math.max(max_value, min_value(curr_state));\r\n\t\t}\r\n\t\t//\t\telse if(successors.length != 0 && curr_state.isTerminal() == false){\r\n\r\n\t\t//Get the successors of the current state, as dark always runs first\r\n\t\t//it will call maxValue;\r\n\r\n\r\n\t\t//Select the successor that returns the biggest value\r\n\t\tfor(State state : successors){\r\n\t\t\tmax_value = Math.max(max_value, min_value(state));\r\n\t\t}\t\r\n\t\t//\t\t}\r\n\t\treturn max_value;\r\n\t}",
"public int getHeuristicScore() {\n \tCell cell=curMap.getCell(nodePos[0], nodePos[1]);\r\n \tint cost=cell.getCost();\r\n \tint[] goal=curMap.getTerminal();\r\n \t//System.out.println(cost);\r\n \tint heuristic=Math.abs(nodePos[0] - goal[0]) + Math.abs(nodePos[1] - goal[1]);\r\n \treturn heuristic + cost;\r\n }",
"public int largestIsland(int[][] grid) {\n // First of all calculate the area of all of the islands. Assign unique id to every island.\n // Island ids start from 2 because our grid already has numbers 0 and 1\n // Replace the 1's of the island with the id of the island. Create a map of the island id and the area\n // Then again iterate over every element in the grid. Now, everytime we get zero (0), replace the zero \n // with one (1) and look at all four sides of the replace one. If we have island at any side of the \n // replaced one the add the area of that island to the max area and count the replaced one in it.\n if (grid == null || grid.length == 0) {\n return 0;\n }\n \n int max = 0;\n int islandId = 2;\n int row = grid.length;\n int col = grid[0].length;\n Map<Integer, Integer> islandArea = new HashMap<Integer, Integer>();\n int[][] directions = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};\n \n // Finding the area of every island\n for (int i = 0; i < row; i++) {\n for (int j = 0; j < col; j++) {\n if (grid[i][j] == 1) {\n int sizeOfCurrentIsland = getIslandSize(grid, i, j, islandId);\n max = Math.max(max, sizeOfCurrentIsland);\n islandArea.put(islandId++, sizeOfCurrentIsland);\n }\n }\n }\n \n // Iterating over the grid again and see if we change the value of zero (0) then what would be the max\n // area of the island.\n for (int i = 0; i < row; i++) {\n for (int j = 0; j < col; j++) {\n if (grid[i][j] == 0) {\n Set<Integer> setOfIslands = new HashSet<Integer>();\n for (int[] direction : directions) {\n int x = direction[0] + i;\n int y = direction[1] + j;\n if (x > -1 && y > -1 && x < row && y < col && grid[x][y] != 0) {\n setOfIslands.add(grid[x][y]);\n }\n }\n // Count current zero as well. So, sum is initialized to 1\n int sum = 1;\n \n for (int num : setOfIslands) {\n int value = islandArea.get(num);\n sum += value;\n }\n \n max = Math.max(max, sum);\n }\n }\n }\n \n return max;\n }",
"public double getHighestChildY() {\n\t\t/* Aucun enfant => aucune contrainte en y vers le bas */\n\t\tif (childrenEdges == null)\n\t\t\treturn Double.MAX_VALUE;\n\t\t\n\t\tdouble minY = Double.MAX_VALUE;\n\t\tfor (int i = 0; i < childrenEdges.size(); i++) {\n\t\t\t/*\n\t\t\t * Recherche de l'extrémité la plus basse de l'arête (la plus haute étant le noeud\n\t\t\t * courant)\n\t\t\t */\n\t\t\tEdge currentEdge = childrenEdges.elementAt(i);\n\t\t\tdouble y1 = currentEdge.getSource().getShape().getY();\n\t\t\tdouble y2 = currentEdge.getDestination().getShape().getY();\n\t\t\tdouble y = (y1 > y2) ? y1 : y2;\n\t\t\t\n\t\t\t/* Recherche de l'extrémité la plus haute parmi toutes les extrémités basses */\n\t\t\tif (y < minY)\n\t\t\t\tminY = y;\n\t\t}\n\t\t\n\t\treturn minY;\n\t}",
"public int maxArea(int[] height);",
"private int getCost(Game game) {\n\n // Represents the sum of each tile value multiplied by its column index (Gives a tendency to move to the left)\n int weightedSum = 0;\n\n // Represents the number of diagonal pairs of matching value on the board.\n int diagCount = 0;\n\n // The number of tiles on the grid\n int tileCount = 0;\n\n Tile[][] tiles = game.tiles;\n\n for (int x = 0; x < BOARD_X; x++) {\n for (int y = 0; y < BOARD_Y; y++) {\n Tile tile = tiles[x][y];\n\n // Skip empty squares\n if (tile == null) {\n continue;\n }\n\n // Increment the weighted sum with product of the row index and the tile's value\n weightedSum += x * tile.getValue();\n tileCount++;\n\n // If all squares are occupied, return an arbitrarily large value such that this option is not picked.\n if (tileCount == maxTileCount) {\n return 100000;\n }\n\n // Since only up right and down right diagonals are computed, ignore the last row as this would push\n // index's out of range.\n if (x == BOARD_X - 1) {\n continue;\n }\n\n // Retrieve the upper right tile and updates the diagonal counter\n if (y > 0) {\n Tile ur = tiles[x + 1][y - 1];\n if (ur != null) {\n diagCount += (ur.getValue() == tile.getValue()) ? 1 : 0;\n }\n }\n\n // Retrieve the lower right tile and updates the diagonal counter\n if (y < BOARD_Y - 1) {\n Tile dr = tiles[x + 1][y + 1];\n if (dr != null) {\n if (dr.getValue() == tile.getValue()) {\n diagCount += (dr.getValue() == tile.getValue()) ? 1 : 0;\n }\n }\n }\n }\n }\n\n return weightedSum + diagCount;\n }",
"private int highestPossibleValue(List<Card> cards) {\n int value = 0;\n int assCounter = 0;\n\n // Calculate the value without taking * into account\n for (Card card : cards) {\n value += card.getValue();\n if (card.getName().equals(\"*\")) assCounter++;\n }\n\n // Subtracts value of *\n for (int i = 0; i < assCounter; i++) {\n if (value <= 21)\n break;\n value -= 10;\n }\n\n return value;\n }",
"int calculateMinimumHP(int[][] dungeon) {\n int m = dungeon.length;\n assert (m > 0);\n int n = dungeon[0].length;\n int[] dp = new int[n + 1];\n for (int j = n - 1; j >= 0; j--) dp[j] = Integer.MAX_VALUE;\n dp[n] = 1;\n\n for (int i = m - 1; i >= 0; i--) {\n for (int j = n - 1; j >= 0; j--)\n dp[j] = Math.max(1, Math.min(dp[j], dp[j + 1]) - dungeon[i][j]);\n //System.out.println(Arrays.toString(dp));\n dp[n] = Integer.MAX_VALUE;\n }\n return dp[0];\n }",
"public int maxSumSubmatrix(int[][] matrix, int target) {\n int row = matrix.length;\n if(row==0)return 0;\n int col = matrix[0].length;\n int m = Math.min(row,col);\n int n = Math.max(row,col);\n //indicating sum up in every row or every column\n boolean colIsBig = col>row;\n int res = Integer.MIN_VALUE;\n for(int i = 0;i<m;i++){\n int[] array = new int[n];\n // sum from row j to row i\n for(int j = i;j>=0;j--){\n int val = 0;\n TreeSet<Integer> set = new TreeSet<Integer>();\n set.add(0);\n //traverse every column/row and sum up\n for(int k = 0;k<n;k++){\n array[k]=array[k]+(colIsBig?matrix[j][k]:matrix[k][j]);\n val = val + array[k];\n //use TreeMap to binary search previous sum to get possible result \n Integer subres = set.ceiling(val-target);\n if(null!=subres){\n res=Math.max(res,val-subres);\n }\n set.add(val);\n }\n }\n }\n return res;\n}",
"public static int mostMoney(int[][] a) { \n double[] totals = new double[3]; \n double rowTotal = 0.0;\n double rowTotal1 = 0.0;\n double rowTotal2 = 0.0;\n \n \n for(int i = 0; i<4; i++){\n rowTotal += a[0][i];\n totals[0] = rowTotal;}\n \n for(int j = 0; j<4; j++){\n rowTotal1 += a[1][j];\n totals[1] = rowTotal1;}\n \n for(int k = 0; k<4; k++){\n rowTotal2 += a[0][k];\n totals[2] = rowTotal2;}\n \n int indexOfBest=0; //used to find index of best year\n double best = totals[0];\n for(int i =0; i < 3; i++) {\n if(totals[i] >= best){\n best = totals[i];\n indexOfBest = i;}\n \n } return indexOfBest;\n }",
"public int calculateMinimumHP(ArrayList<ArrayList<Integer>> grid) {\n\t\t\t\t int m =grid.size(), n = grid.get(0).size();\n\t\t\t\t int[][][] dp = new int[m+1][n+1][2];\n\t\t\t\t \n\t\t\t\t dp[0][0][0] = 0;\n\t\t\t\t dp[0][0][1] = 0;\n\t\t\t\t dp[0][1][0] = 1; // start with life\n\t\t\t\t dp[0][1][1] = 0; // balance life\n\t\t\t\t dp[1][0][0] = 1;\n\t\t\t\t dp[1][0][1] = 0;\n\t\t\t\t for(int i=2;i<dp[0].length;i++){\n\t\t\t\t\t dp[0][i][0] = Integer.MAX_VALUE;\n\t\t\t\t\t dp[0][i][1] = 0;\n\t\t\t\t }\n\t\t\t\t for(int i=2;i<dp.length;i++){\n\t\t\t\t\t dp[i][0][0] = Integer.MAX_VALUE;\n\t\t\t\t\t dp[i][0][1] = 0;\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t for(int i=1;i<dp.length;i++){\n\t\t\t\t\t for(int j=1;j<dp[0].length;j++){\n\t\t\t\t\t\t \n\t\t\t\t\t\t if(grid.get(i-1).get(j-1) < 0){\n\t\t\t\t\t\t\t int[] fromCell = dp[i-1][j][0]< dp[i][j-1][0]?dp[i-1][j]:dp[i][j-1];\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t dp[i][j][0] = fromCell[0] - grid.get(i-1).get(j-1) - fromCell[1];\n\t\t\t\t\t\t\t dp[i][j][1] = fromCell[1]+ grid.get(i-1).get(j-1)>0?fromCell[1]+ grid.get(i-1).get(j-1):0;\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t int[] fromCell = dp[i-1][j][0]< dp[i][j-1][0]?dp[i-1][j]:dp[i][j-1];\n\t\t\t\t\t\t\t dp[i][j][0] = fromCell[0];\n\t\t\t\t\t\t\t dp[i][j][1] = fromCell[1]+grid.get(i-1).get(j-1);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t return dp[m][n][0];\n\t\t\t\t \n\t\t\t }",
"private int helper(int s, int M, int[] piles){\n if(s >= piles.length){\n return 0;\n }\n if(2*M + s > piles.length){\n return sums[s];\n }\n if(memo[s][M] != 0){\n return memo[s][M];\n }\n int min = Integer.MAX_VALUE;\n for(int x=1; x<=2*M; x++){\n // get the min score the player two can get\n min = Math.min(min, helper(s+x, Math.max(x, M), piles));\n }\n memo[s][M] = sums[s] - min;\n return memo[s][M];\n \n }",
"public int posibleAmount(Square cell) {\n\t\treturn ((getSquare(cell).getSand()<max) ? max-getSquare(cell).getSand() : 0);\n\t}",
"public Line miniMax(Board board) throws IOException {\n currBoard = board;\n if(tod == 0) {\n return MiniMax.timeMiniMax(currBoard, tod, prune, getColour(), otherColor);\n }\n\n return MiniMax.depthMiniMax(currBoard, tod, prune, getColour(), otherColor);\n }",
"public int maxArea(int[] height) {\n int ans = -1;\n for (int lt = 0, rt = height.length - 1; lt < rt; ) {\n ans = Math.max(ans, (rt - lt) * Math.min(height[lt], height[rt]));\n if (height[lt] < height[rt]) {\n lt++;\n } else if (height[lt] > height[rt]) {\n rt--;\n } else {\n if (height[lt + 1] < height[rt - 1]) {\n rt--;\n } else {\n lt++;\n }\n }\n }\n return ans;\n }",
"public int getMaximumPoints();",
"private RolapCalculation getAbsoluteMaxSolveOrder() {\n // Find member with the highest solve order.\n RolapCalculation maxSolveMember = calculations[0];\n for (int i = 1; i < calculationCount; i++) {\n RolapCalculation member = calculations[i];\n if (expandsBefore(member, maxSolveMember)) {\n maxSolveMember = member;\n }\n }\n return maxSolveMember;\n }",
"@Override\n\t\tpublic double heuristic() {\n\t\t\tint sum = 0;\n\t\t\tfor (int i = 0; i < k; i++) {\n\t\t\t\tsum += Math.abs(xGoals[i] - state[i]);\n\t\t\t\tsum += Math.abs(yGoals[i] - state[k + i]);\n\t\t\t}\n\t\t\treturn sum;\n\t\t}",
"private int evaluate(boolean maximizing) {\n int selfEval = getCountOfStonesFor(this);\n selfEval += countOfMills(this) * 5;\n selfEval += countOfPossibleMills(this) * 15;\n\n int opponentEval = getCountOfStonesFor(opponent);\n opponentEval += countOfMills(opponent) * 5;\n opponentEval += countOfPossibleMills(opponent) * 15;\n\n return (selfEval - opponentEval) * (maximizing ? 1 : -1);\n }",
"private float getMinY(HomePieceOfFurniture piece) {\n float [][] points = piece.getPoints();\n float minY = Float.POSITIVE_INFINITY;\n for (float [] point : points) {\n minY = Math.min(minY, point [1]);\n } \n return minY;\n }",
"public Coord maxCell()\n {\n\t int maxX = getGrid().keySet().stream().mapToInt(Coord::getX).max().orElse(0);\n\n\t int maxY = getGrid().keySet().stream().mapToInt(Coord::getY).max().orElse(0);\n\n\t return new Coord(maxX, maxY);\n }",
"private Outcome minMax(PossibleBoard posBoard, Icon icon, int depth) {\n Outcome outcome = new Outcome();\n Result result = posBoard.determineOutcome();\n boolean maximiseWin = icon == getIcon();\n\n // BASE CASE\n if (result.gameComplete()) {\n outcome.score = result.getBonus();\n outcome.moveToMake = posBoard.coor;\n outcome.depth = depth;\n return outcome;\n }\n\n ArrayList<PossibleBoard> posNextBoards = getPossibleNextBoards(posBoard, icon);\n int optimalScore = (maximiseWin ? Integer.MIN_VALUE : Integer.MAX_VALUE);\n Coordinate optimalCoor = new Coordinate(0,0);\n int optimalDepth = Integer.MAX_VALUE;\n\n for (PossibleBoard posNextBoard : posNextBoards) {\n Outcome nextOutcome = minMax(posNextBoard, (icon == Icon.CROSSES ? Icon.NOUGHTS : Icon.CROSSES), depth + 1);\n\n if (maximiseWin && nextOutcome.score >= optimalScore) {\n if (nextOutcome.score == optimalScore && nextOutcome.depth < optimalDepth) continue;\n optimalScore = nextOutcome.score;\n optimalCoor = posNextBoard.coor;\n optimalDepth = nextOutcome.depth;\n\n } else if (!maximiseWin && nextOutcome.score <= optimalScore){\n if (nextOutcome.score == optimalScore && nextOutcome.depth < optimalDepth) continue;\n optimalScore = nextOutcome.score;\n optimalCoor = posNextBoard.coor;\n optimalDepth = nextOutcome.depth;\n\n }\n }\n\n outcome.moveToMake = optimalCoor;\n outcome.score = optimalScore;\n outcome.depth = optimalDepth;\n return outcome;\n }",
"private static int getHighestSum(List<? extends ISubsetSum> list, int n, int sum) {\n\t\tboolean subset[][] = new boolean[sum + 1][n + 1];\n\n\t\t// primeira coluna toda true, pois se considera que com qualquer\n\t\t// conjunto se pode obter uma somatoria de 0.\n\t\tfor (int i = 0; i <= n; i++)\n\t\t\tsubset[0][i] = true;\n\n\t\t// nenhuma somatoria é possível com nenhum elemento.\n\t\tfor (int i = 1; i <= sum; i++)\n\t\t\tsubset[i][0] = false;\n\n\t\t// Vai verificando se com aqueles elementos se obtem a sum iterada.\n\t\tfor (int i = 1; i <= sum; i++) {\n\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\tsubset[i][j] = subset[i][j - 1];\n\t\t\t\tif (i >= list.get(j - 1).getValue()) {\n\t\t\t\t\tsubset[i][j] = subset[i][j] || subset[i - list.get(j - 1).getValue()][j - 1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// itera sobre a ultima row de tras para frente até achar um valor true\n\t\t// e retorna a maior somatoria, tal que somatoria <= sum.\n\t\tint maxSum = 0;\n\t\tfor (int i = sum; i > 0; i--) {\n\t\t\tif (subset[i][n] == true) {\n\t\t\t\tmaxSum = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn maxSum;\n\n\t}",
"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}",
"private static int eval(Board board) {\n if (board.piecesContiguous(board.turn())) {\n return Integer.MAX_VALUE;\n } else if (board.piecesContiguous(board.turn().opposite())) {\n return Integer.MIN_VALUE;\n } else {\n Random r = new Random();\n return r.nextInt();\n }\n }",
"static double addHeuristic1(GameState c, boolean isMaxNode) {\n\t\t// Value returned will be absolute. If its max node, this config is good\n\t\t// then value will be positive. If its min node,\n\t\t// and this config is good for min, then value will be negative\n\n\t\tint i, j, vacant_spaces;\n\t\t// Compute : Feasible Moves for self\n\t\tint self_feasible_moves = 0;\n\t\tint self_remaining_moves = 0;\n\t\tint opponent_feasible_moves = 0;\n\t\tint opponent_remaining_moves = 0;\n\n\t\t// Go through the board and figure out vacant spots\n\t\tvacant_spaces = 0;\n\t\tfor (i = -GameState.HALF_BOARD; i <= GameState.HALF_BOARD; i = i + 1) {\n\t\t\tif (c.getWeight(i) == 0) {\n\t\t\t\tvacant_spaces++;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 1; i <= GameState.MAX_WEIGHT; i = i + 1) {\n\t\t\t// Check if self have the weight\n\t\t\tif (c.IHaveWeight(i)) {\n\t\t\t\tself_remaining_moves++;\n\t\t\t\t// Go through all the possible positions\n\t\t\t\tfor (j = -GameState.HALF_BOARD; j < GameState.HALF_BOARD; j++) {\n\t\t\t\t\tif (c.getWeight(j) == 0) {\n\t\t\t\t\t\t// Place it and see if you tip\n\t\t\t\t\t\tc.makeMove(i, j, PlayerName.none);\n\t\t\t\t\t\tif (!c.isTipping_old()) {\n\t\t\t\t\t\t\tself_feasible_moves++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Now remove the weight\n\t\t\t\t\t\tc.removeMove(j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check if opponent has this weight\n\t\t\tif (c.opponentHasWeight(i)) {\n\t\t\t\topponent_remaining_moves++;\n\t\t\t\t// Go through all the possible positions\n\t\t\t\tfor (j = -GameState.HALF_BOARD; j < GameState.HALF_BOARD; j++) {\n\t\t\t\t\t// Place the weight and see if you tip\n\t\t\t\t\tif (c.getWeight(j) == 0) {\n\t\t\t\t\t\tc.makeMove(i, j, PlayerName.none);\n\t\t\t\t\t\tif (!c.isTipping_old()) {\n\t\t\t\t\t\t\topponent_feasible_moves++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Now remove the weight\n\t\t\t\t\t\tc.removeMove(j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Need to take the max because one of the players may have played one\n\t\t// chance less\n\t\tif (self_remaining_moves == 0 && opponent_remaining_moves == 0) {\n\t\t\treturn 0.0;\n\t\t} else if (self_remaining_moves > opponent_remaining_moves)\n\t\t\treturn (double) (self_feasible_moves - opponent_feasible_moves)\n\t\t\t\t\t/ (double) (self_remaining_moves * vacant_spaces);\n\t\telse\n\t\t\treturn (double) (self_feasible_moves - opponent_feasible_moves)\n\t\t\t\t\t/ (double) (opponent_remaining_moves * vacant_spaces);\n\t}",
"private int heuristicValue(String boardString) {\n String[] tokens = boardString.split(\"\\n\");\n int blackScore = Integer.parseInt(tokens[0].split(\",\")[9]);\n int whiteScore = Integer.parseInt(tokens[1].split(\",\")[9]);\n\n return blackScore - whiteScore;\n }",
"public static int maxMoneyLooted(int[] houses) {\n int n = houses.length;\n int dp[] = new int[n];\n if(n==0)\n return 0;\n dp[0] = houses[0];\n dp[1]= Math.max(houses[0], houses[1]);\n for(int i =2; i<n ; i++)\n {\n dp[i] = Math.max(houses[i] + dp[i-2], dp[i-1] );\n }\n \n return dp[n-1];\n\t}",
"public int getWinner() {\n //checks corner cells\n if (getCorners() != -1)\n return getCorners();\n\n //checks border cells\n if (getBorders() != -1)\n return getBorders();\n\n //check middle cases\n if (getMiddle() != -1)\n return getMiddle();\n\n return -1;\n }",
"private static int getHeuristic(MazeState current, HashSet<MazeState> goals) {\n\t\tint lowestCost = Integer.MAX_VALUE;\n\t\tint currentCost = 0;\n\t\tfor (MazeState goal : goals) {\n\t\t\tcurrentCost = Math.abs(current.col - goal.col) + Math.abs(current.row - goal.row);\n\t\t\tif (currentCost <= lowestCost) {\n\t\t\t\tlowestCost = currentCost;\n\t\t\t}\n\t\t}\n\t\treturn currentCost;\n\t}",
"public static int calculate(int[][] matrix) {\n if (matrix.length == 0) {\n return 0;\n }\n\n int[] temp = new int[matrix[0].length];\n int maxArea = 0;\n\n for (int i = 0; i < matrix.length; i++) {\n for (int j = 0; j < matrix[0].length; j++) {\n\n if (matrix[i][j] != 0) {\n temp[j] += matrix[i][j];\n } else {\n temp[j] += 0;\n }\n }\n\n int area = LargestRectangle.calculate(temp);\n if (maxArea < area) {\n maxArea = area;\n }\n }\n\n return maxArea;\n }",
"private double evaluate() {\n // check for draws first, most lickely\n if (board.gameState() == MNKGameState.DRAW) return 0;\n else if (board.gameState() == MY_WIN) return 2 * M * N; // 2 times max depth\n else if (board.gameState() == ENEMY_WIN) return -2 * M * N;\n else {\n evaluated++;\n // keep the heuristic evaluation between 1 and -1\n return board.value();\n }\n }",
"public byte score() {\n\t\tbyte score = 0;\n\t\t\n\t\tfor (byte r = 0; r < b.length; r++) {\n\t\t\tfor (byte c = 0; c < b[r].length; c++) {\n\t\t\t\tif (b[r][c].getSide()) {\n\t\t\t\t\tscore += (b[r][c]).getValue();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\tscore -= (b[r][c]).getValue();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn score;\n\t}",
"public static int findBestMove(Board board, PieceType playerPiece) {\n int bestVal = -1000;\n int row = -1;\n int col = -1;\n\n // Traverse all cells, evaluate minimax function\n // for all empty cells. And return the cell\n // with optimal value.\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n // Check if cell is empty\n if (board.getBoard()[i][j] == 0) {\n // Make the move\n board.getBoard()[i][j] = playerPiece.getValue();\n\n // compute evaluation function for this\n // move.\n int moveVal = minimax(board, playerPiece, 0, false);\n\n // Undo the move\n board.getBoard()[i][j] = 0;\n\n // If the value of the current move is\n // more than the best value, then update\n // best/\n if (moveVal > bestVal) {\n row = i;\n col = j;\n bestVal = moveVal;\n }\n }\n }\n }\n return (col + 1) + (row * board.getGame().getGridType().getSize());\n }",
"public Coords getJumpPathHighestPoint() {\n Coords highestCoords = null;\n int highestElevation = 0;\n for (MoveStep step : steps) {\n if (getGame().getBoard().getHex(step.getPosition()).getLevel() > highestElevation) {\n highestElevation = step.getElevation();\n highestCoords = step.getPosition();\n }\n }\n return highestCoords;\n }",
"int absoluteValuesSumMinimization(int[] a) {\n return a[(a.length-1)/2];\n }",
"private static int maxSum(int arr[]) {\n int sum = 0;\n Arrays.sort(arr);\n\n // Subtracting a1, a2, a3,....., a(n/2)-1,\n // an/2 twice and adding a(n/2)+1, a(n/2)+2,\n // a(n/2)+3,....., an - 1, an twice.\n for (int i = 0; i < arr.length / 2; i++) {\n sum -= (2 * arr[i]);\n sum += (2 * arr[arr.length - i - 1]);\n }\n\n return sum;\n }",
"private int getHeuristic(Player player) {\n int whitePieces = 0;\n int blackPieces = 0;\n\n for (int r = 0; r < Board.MAX_ROW; r++) {\n for (int c = 0; c < Board.MAX_COLUMN; c++) {\n if (boardObject.getSlot(r, c).getColor() == Slot.WHITE) {\n whitePieces++;\n } else if (boardObject.getSlot(r, c).getColor() == Slot.BLACK) {\n blackPieces++;\n }\n }\n }\n\n if (player.equals(playerBlack)) {\n return blackPieces - whitePieces;\n } else {\n return whitePieces - blackPieces;\n }\n }",
"public int whoWin(){\r\n int winner = -1;\r\n \r\n int highest = 0;\r\n \r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(getPlayerPoints(player) > highest){\r\n highest = getPlayerPoints(player);\r\n winner = player.getID();\r\n }\r\n \r\n }\r\n \r\n return winner;\r\n }",
"private long getAbsMax() {\n return Math.max(Math.abs(Visualizer.getLowerBound().get()),\n Visualizer.getUpperBound().get());\n }",
"java.math.BigDecimal getMaximum();",
"public double max()\n\n {\n double max=xyValueArray.get(0).getY();\n\n for (int i = 0; i < xyValueArray.size(); i++) {\n if (xyValueArray.get(i).getY() > max) {\n max = xyValueArray.get(i).getY();\n }\n }\n return max;\n }",
"public double elementMaxAbs() {\n return ops.elementMaxAbs(mat);\n }",
"public int getbestline() {\n\t\tint i=0;\n\t\tint biggest=0;\n\t\tint keep_track=0;\n\t\twhile(i < amount.length) {\n\t\t\tif(Faucets.amount[i] > biggest) {\n\t\t\t\tbiggest = Faucets.amount[i];\n\t\t\t\tkeep_track = i;\n\t\t\t}\n\t\t\ti+=1;\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"Keep_Track = \\\"\" + keep_track + \"\\\"\");\n\t\treturn keep_track;\n\t\t\n\t}",
"public int manhattan() {\n \tint manhattanScore = 0;\n \t\n \tfor (int row = 0; row < this.dimension(); row++) {\n \t\tfor (int column = 0; column < this.dimension(); column++) {\n \t\t\tif (blocks[row][column] != 0) {\n\t \t\t\tint compareValue = blocks[row][column];\n\t \t\t\t\n\t \t\t\tint expectedRow = (compareValue - 1 ) / this.dimension();\n\t \t\t\tint expectedColumn = (compareValue - 1) - (expectedRow * this.dimension());\n\t \t\t\t\n\t \t\t\tmanhattanScore += (Math.abs(expectedRow - row) + Math.abs(expectedColumn - column));\n \t\t\t}\n \t\t}\n \t}\n \t\n \treturn manhattanScore;\n }",
"private static int getOptimalValue(int depth, int nodeIndex, boolean isMax,\n int[] scores, int h) {\n if (depth == h) \n return scores[nodeIndex];\n \n if (isMax) {\n return Math.max(getOptimalValue(depth+1, nodeIndex*2, false, scores, h), \n getOptimalValue(depth+1, nodeIndex * 2 + 1, false, scores, h));\n } else {\n return Math.min(getOptimalValue(depth+1, nodeIndex*2, true, scores, h), \n getOptimalValue(depth+1, nodeIndex * 2 + 1, true, scores, h));\n }\n }",
"public float getMaxCY5();",
"private static int getBoardSum(Game2048Board board) {\n int boardSum = 0;\n for (Game2048Tile tile : board.getItems()) {\n boardSum += Math.pow(tile.getValue().VAL, SCORE_SUM_POWER);\n }\n return boardSum;\n }",
"public static int maxArea(int[] arr) {\n\t\tint area = 0;\n\t\tint nsr[] = nearestSmallestRight(arr);\n\t\tint nsl[] = nearestSmallestLeft(arr);\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tint temp = (nsr[i]-nsl[i]-1) * arr[i];\n\t\t\tif (area< temp) {\n\t\t\t\tarea = temp;\n\t\t\t}\n\t\t}\n\t\treturn area;\n\t}",
"private float getMaxX(HomePieceOfFurniture piece) {\n float [][] points = piece.getPoints();\n float maxX = Float.NEGATIVE_INFINITY;\n for (float [] point : points) {\n maxX = Math.max(maxX, point [0]);\n } \n return maxX;\n }",
"public int maximalSquare(char[][] matrix) {\n if(matrix == null || matrix.length < 1) return 0;\n int[][] dp = new int[matrix.length][matrix[0].length];\n int max = 0;\n for(int i = 0; i < matrix.length; i++) {\n for(int j = 0; j < matrix[0].length; j++) {\n if(matrix[i][j] == '0') continue;\n if(i > 0 && j > 0 && dp[i - 1][j - 1] > 0) {\n int pre = dp[i - 1][j - 1];\n int cur = 1;\n while (cur <= pre && matrix[i - cur][j] == '1' && matrix[i][j - cur] == '1') cur++;\n// dp[i][j] += (cur -1);\n dp[i][j] = cur;\n }\n max = Math.max(max, dp[i][j] * dp[i][j]);\n }\n }\n return max;\n }",
"private int FindMaxSum(int[] arr, int length) {\r\n\t\t\r\n\t\tint incl = arr[0];\r\n\t\tint excl = 0;\r\n\t\tint excl_new = 0;\r\n\t\t\r\n\t\tfor(int i = 1;i<arr.length;i++)\r\n\t\t{\r\n\t\t\texcl_new = (incl > excl) ? incl : excl;\r\n\t\t\t \r\n /* current max including i */\r\n incl = excl + arr[i];\r\n excl = excl_new;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn excl>incl?excl:incl;\r\n\t}",
"private static int minCoins_bottom_up_dynamic_approach(int[] coins, int amount) {\n if (coins == null || coins.length == 0) return 0;\n if (amount < 0) return 0;\n\n int memo[][] = new int[coins.length + 1][amount + 1];\n\n // populate first row\n for (int col = 0; col <= amount; col++) {\n memo[0][col] = 0;// Important. always initialize 1st row with 1s\n }\n\n // populate first col\n for (int row = 0; row < coins.length; row++) {\n memo[row][0] = 0;// Important. initialize 1st col with 1s or 0s as per your need as explained in method comment\n }\n\n /*\n populate second row\n\n if amount(col) <= coin value, then one coin is required with that value to make that amount\n if amount(col) > coin value, then\n total coins required = amount/coin_value, if remainder=0, otherwise amount/coin_value+1\n */\n for (int col = 1; col <= amount; col++) {\n if (col <= coins[0]) {\n memo[1][col] = 1;\n } else {\n int quotient = col / coins[0];\n\n memo[1][col] = quotient;\n\n int remainder = col % coins[0];\n if (remainder > 0) {\n memo[1][col] += 1;\n }\n }\n }\n\n // start iterating from second row\n for (int row = 2; row < memo.length; row++) {\n // start iterating from second col\n for (int col = 1; col < memo[row].length; col++) {\n\n int coin = coins[row - 1];\n\n // formula to find min required coins for an amount at memo[row][col]\n if (coin > col) { // if coin_value > amount\n memo[row][col] = memo[row - 1][col]; // reserve prev row's value (value determined for prev coins)\n } else {\n memo[row][col] = Math.min(memo[row - 1][col], memo[row][col - coin]) + 1; // min(value determined by prev coins - prev row, value at amount=current_amount-coin_value) + 1\n }\n }\n }\n\n printMemo(coins, memo);\n\n return memo[memo.length - 1][memo[0].length - 1]; // final value is stored in last cell\n }",
"public int getHeuristicScore2() {\n \tCell cell=curMap.getCell(nodePos[0], nodePos[1]);\r\n \t//int cost=cell.getCost();\r\n \tint[] goal=curMap.getTerminal();\r\n \t//System.out.println(cost);\r\n \tint heuristic=Math.abs(nodePos[0] - goal[0]) + Math.abs(nodePos[1] - goal[1]);\r\n \treturn heuristic; //+ cost;\r\n }",
"public int generateScore(List<Integer> line){\r\n\t\tif (line.get(0)+line.get(1)+line.get(2)==2 ) {\r\n\t\t\treturn 10;\r\n\t\t}\r\n\t\telse if (line.get(0)==line.get(1)&&line.get(1)==line.get(2) && line.get(0)==line.get(2)) {\r\n\t\t\treturn 5;\r\n\t\t}\r\n\t\telse if (line.get(0)!=line.get(1)&&line.get(0)!=line.get(2)) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\t\r\n\t\r\n\t}",
"public double area() \n {\n double area = 0;\n for (Line2D line : lines) \n {\n area += line.getP1().getX() * line.getP2().getY();\n area -= line.getP2().getX() * line.getP1().getY();\n }\n area /= 2.0;\n return Math.abs(area);\n }",
"public static int TLEmaxArea(int[] height) {\n int y = 0, y2 = 0;\n int maxs = 0;\n for (int x = 0; x < height.length - 1; x++) {\n for (int x2 = x + 1; x2 < height.length; x2++) {\n y = height[x];\n y2 = height[x2];\n maxs = Math.max(maxs, Math.min(y, y2) * (x2 - x));\n }\n }\n return maxs;\n }",
"private static int getMaxNotInCorner(Game2048Board board, List<Game2048Tile> sortedItems) {\n int maxNotInCorner = 0;\n if (board.get(3, 3).getValue() != sortedItems.get(0).getValue()) {\n maxNotInCorner -= 2;\n }\n if (board.get(3, 2).getValue() != sortedItems.get(1).getValue()) {\n maxNotInCorner -= 1;\n }\n return maxNotInCorner;\n }",
"public int findMax(){\n return nilaiMaks(this.root);\n }",
"public static int maxCircularSum(int[] arr) {\n\t\tint sumNotWrapping = kadane(arr);\n\n\t\t// case 2 : CE are wrapping : NCE are not wrapping\n\t\tint totalSum = 0;\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\ttotalSum += arr[i];\n\t\t\tarr[i] = -arr[i];\n\t\t}\n\n\t\tint sumNCE = kadane(arr);\n\n\t\tint sumWrapping = totalSum + sumNCE;\n\n\t\treturn Math.max(sumNotWrapping, sumWrapping);\n\t}",
"@SuppressWarnings(\"static-method\")\n\tprivate int getYmax(BufferedImage img) {\n\t\tint width = img.getWidth();\n\t\tint height = img.getHeight();\n\t\tint trimmedHeight = 0;\n\t\tfor (int i = 0; i < width; i++) {\n\t\t\tfor (int j = height - 1; j >= 0; j--) {\n\t\t\t\tif (img.getRGB(i, j) != Color.WHITE.getRGB() && j > trimmedHeight) {\n\t\t\t\t\ttrimmedHeight = j;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn trimmedHeight;\n\t}",
"public int maximalRectangle(char[][] matrix) {\n if (null == matrix || matrix.length == 0 || matrix[0].length == 0) {\n return 0;\n }\n int[] height = new int[matrix[0].length];\n for (int i = 0; i < matrix[0].length; i++) {\n if (matrix[0][i] == '1') {\n height[i] = 1;\n }\n }\n int result = largestInLine(height);\n for (int i = 1; i < matrix.length; i++) {\n resetHeight(matrix, height, i);\n result = Math.max(result, largestInLine(height));\n }\n return result;\n }",
"private int negaMax(int depth, String indent) {\r\n\r\n\t\tif (depth <= 0\r\n\t\t\t|| this.chessGame.getGameState() == ChessGame.GAME_STATE_END_WHITE_WON\r\n\t\t\t|| this.chessGame.getGameState() == ChessGame.GAME_STATE_END_BLACK_WON){\r\n\t\t\t\r\n\t\t\treturn evaluateState();\r\n\t\t}\r\n\t\t\r\n\t\tList<Move> moves = generateMoves(false);\r\n\t\tint currentMax = Integer.MIN_VALUE;\r\n\t\t\r\n\t\tfor(Move currentMove : moves){\r\n\t\t\t\r\n\t\t\texecuteMove(currentMove);\r\n\t\t\t//ChessConsole.printCurrentGameState(this.chessGame);\r\n\t\t\tint score = -1 * negaMax(depth - 1, indent+\" \");\r\n\t\t\t//System.out.println(indent+\"handling move: \"+currentMove+\" : \"+score);\r\n\t\t\tundoMove(currentMove);\r\n\t\t\t\r\n\t\t\tif( score > currentMax){\r\n\t\t\t\tcurrentMax = score;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//System.out.println(indent+\"max: \"+currentMax);\r\n\t\treturn currentMax;\r\n\t}",
"public Cell highestCell() {\n for (Cell c : this.board) {\n if (c.height == ForbiddenIslandWorld.ISLAND_SIZE / 2 && !c.isCoastCell()) {\n return c;\n }\n }\n return highestCell();\n }",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int max = Integer.MIN_VALUE;\n int temp;\n int[][] array = new int[6][6];\n for(int i=0; i<6; i++){\n for(int j=0; j<6; j++){\n array[i][j] = sc.nextInt();\n }\n }\n for(int i=0;i<4;i++){\n for(int j=0;j<4;j++){\n temp = array[i][j] + array[i][j+1] + array[i][j+2]\n + array[i+1][j+1]\n + array[i+2][j] + array[i+2][j+1] + array[i+2][j+2];\n max = Math.max(temp,max);\n }\n }\n System.out.println(max);\n }",
"public double minAreaFreeRect(int[][] points) {\n if (points.length < 4) {\n return 0;\n }\n\n //key: info of distance, x,y center positions\n double minVal = Double.MAX_VALUE;\n Map<String, List<int[]>> map = new HashMap<>();\n for (int i = 0; i < points.length - 1; i++) {\n for (int j = i + 1; j < points.length; j++) {\n long dis = (points[i][0] - points[j][0]) * (points[i][0] - points[j][0]) +\n (points[i][1] - points[j][1]) * (points[i][1] - points[j][1]);\n double centerX = (double)(points[i][0] + points[j][0]) / 2;\n double centerY = (double)(points[i][1] + points[j][1]) / 2;\n String key = dis + \" \" + centerX + \" \" + centerY;\n if (!map.containsKey(key)) {\n map.put(key, new ArrayList<int[]>());\n }\n map.get(key).add(new int[]{i,j});\n }\n }\n\n //therefore all vals stored in same key can form rectangles\n //just try all of them to find the one with smallest area\n for (String key: map.keySet()) {\n if (map.get(key).size() < 2) {\n continue;\n }\n List<int[]> values = map.get(key);\n for (int i = 0; i < values.size() - 1; i++) {\n for (int j = i + 1; j < values.size(); j++) {\n int p1 = values.get(i)[0];\n int p2 = values.get(i)[1];\n int p3 = values.get(j)[0];\n\n double len1 = Math.sqrt((points[p1][0] - points[p3][0]) * (points[p1][0] - points[p3][0]) + (points[p1][1] - points[p3][1]) * (points[p1][1] - points[p3][1]));\n double len2 = Math.sqrt((points[p2][0] - points[p3][0]) * (points[p2][0] - points[p3][0]) + (points[p2][1] - points[p3][1]) * (points[p2][1] - points[p3][1]));\n\n minVal = Math.min(minVal, len1 * len2);\n }\n }\n }\n return minVal == Double.MAX_VALUE? 0: minVal;\n\n }",
"public int minPathSum(int[][] grid) {\n\t\tint m = grid.length;\n\t\tint n = grid[0].length;\n\t\tif (n < m) {\n\t\t\tint[] dp = new int[n];\n\t\t\tdp[n-1] = grid[m-1][n-1];\n\t\t\tfor(int i = n-2; i >= 0; i--) {\n\t\t\t\tdp[i] = grid[m-1][i] + dp[i+1];\n\t\t\t}\n\t\t\tfor(int i = m-2; i >= 0; i--) {\n\t\t\t\tfor(int j = n-1; j >= 0; j--) {\n\t\t\t\t\tif(j == n-1) {\n\t\t\t\t\t\tdp[j] += grid[i][j];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdp[j] = grid[i][j] + Math.min(dp[j], dp[j+1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn dp[0];\n\t\t} else {\n\t\t\tint[] dp = new int[m];\n\t\t\tdp[m-1] = grid[m-1][n-1];\n\t\t\tfor(int i = m-2; i >= 0; i--) {\n\t\t\t\tdp[i] = grid[i][n-1] + dp[i+1];\n\t\t\t}\n\t\t\tfor(int i = n-2; i >= 0; i--) {\n\t\t\t\tfor(int j = m-1; j >= 0; j--) {\n\t\t\t\t\tif(j == m-1) {\n\t\t\t\t\t\tdp[j] += grid[j][i];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdp[j] = grid[j][i] + Math.min(dp[j], dp[j+1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn dp[0];\n\t\t}\n\t}",
"static int maxSum()\n {\n // Find array sum and i*arr[i] with no rotation\n int arrSum = 0; // Stores sum of arr[i]\n int currVal = 0; // Stores sum of i*arr[i]\n for (int i=0; i<arr.length; i++)\n {\n arrSum = arrSum + arr[i];\n currVal = currVal+(i*arr[i]);\n }\n\n // Initialize result as 0 rotation sum\n int maxVal = currVal;\n\n // Try all rotations one by one and find\n // the maximum rotation sum.\n for (int j=1; j<arr.length; j++)\n {\n currVal = currVal + arrSum-arr.length*arr[arr.length-j];\n if (currVal > maxVal)\n maxVal = currVal;\n }\n\n // Return result\n return maxVal;\n }",
"static int hourglassSum(int[][] arr) {\n int sum = 0;\n Integer higher = null;\n\n for (int i = 0; i <= arr.length - 3; i++) {\n\n for (int j = 0; j <= arr[i].length - 3; j++) {\n sum = arr[i][j] + sum;\n sum = arr[i][j+1] + sum;\n sum = arr[i][j+2] + sum;\n sum = arr[i+1][j+1] + sum;\n sum = arr[i+2][j] + sum;\n sum = arr[i+2][j+1] + sum;\n sum = arr[i+2][j+2] + sum;\n\n if(higher == null){\n higher = sum;\n } else if(sum > higher) {\n higher = sum;\n }\n sum = 0;\n }\n }\n\n return higher;\n }",
"public int getMaxTotalCost();",
"public static int maxSquare(int[][] matrix) {\n if(matrix==null)\r\n return 0;\r\n int m = matrix.length;\r\n if(m ==0 )\r\n return 0;\r\n int n = matrix[0].length;\r\n if( n==0 )\r\n return 0;\r\n int res = -1;\r\n for(int i = 1;i<m;i++){\r\n for(int j = 1;j<n;j++){\r\n if(matrix[i][j]!=0 ){\r\n matrix[i][j] = min3(matrix[i-1][j-1],matrix[i][j-1],matrix[i-1][j]) + 1;\r\n }\r\n res = Math.max(res,matrix[i][j]);\r\n \r\n }\r\n }\r\n return res;\r\n }"
]
| [
"0.6361608",
"0.6221508",
"0.6120719",
"0.6061119",
"0.605454",
"0.60459507",
"0.5979454",
"0.595278",
"0.59444124",
"0.5933431",
"0.59248775",
"0.5918514",
"0.59149027",
"0.59144956",
"0.5900025",
"0.5839941",
"0.5783322",
"0.57526094",
"0.5741828",
"0.5738571",
"0.57121134",
"0.57017606",
"0.5688195",
"0.5654541",
"0.56316835",
"0.5629988",
"0.562682",
"0.5624792",
"0.55922294",
"0.55901587",
"0.5589312",
"0.5582398",
"0.5576109",
"0.55709976",
"0.5565388",
"0.5565193",
"0.5551983",
"0.5550522",
"0.55455315",
"0.5544286",
"0.55307496",
"0.552439",
"0.5523071",
"0.55202633",
"0.55161613",
"0.550962",
"0.5509189",
"0.5497056",
"0.54830503",
"0.54771566",
"0.5474842",
"0.5468049",
"0.5463192",
"0.54574275",
"0.54571563",
"0.5447063",
"0.5438858",
"0.543406",
"0.5433683",
"0.54166585",
"0.54144853",
"0.5405711",
"0.5403654",
"0.54001695",
"0.5397753",
"0.53804684",
"0.53750783",
"0.5374428",
"0.5373873",
"0.537194",
"0.5369789",
"0.53677166",
"0.53674287",
"0.53668386",
"0.53658307",
"0.53647256",
"0.53630346",
"0.5362907",
"0.535952",
"0.5347865",
"0.5345548",
"0.53453827",
"0.5345213",
"0.53402925",
"0.53395927",
"0.53374726",
"0.53319407",
"0.53303534",
"0.5328825",
"0.53284055",
"0.532211",
"0.5321827",
"0.5319494",
"0.53133804",
"0.53118753",
"0.5311501",
"0.530719",
"0.53055364",
"0.53024715",
"0.5300737"
]
| 0.71553797 | 0 |
Returns string representation of field. | @Override
public String toString() {
StringBuilder result = new StringBuilder();
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
int cell = field[i][j];
result.append(cell == 0 ? "_" : (cell == 1 ? "X" : "O")).append(" ");
}
result.append("\n");
}
return result.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String toString()\n\t{\n\t\treturn fieldname;\n\t}",
"public String toString()\n {\n return m_strFieldName;\n }",
"public String toString() {\n\t\t//TODO add your own field name here\t\t\n\t\t//return buffer.append(this.yourFieldName).toString();\n\t\treturn \"\";\n\t}",
"@Override\n public String toString() {\n String fieldStr = getTag() + \"=\" + getTagVal();\n return fieldStr;\n }",
"@Override\n\tpublic String toString()\n\t{\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tbuffer.append(fieldName + \" :\");\n\t\tbuffer.append(\" Typ=\" + fieldLength + fieldType);\n\t\tif (!EqDataType.isAlpha(fieldType))\n\t\t{\n\t\t\tbuffer.append(\",\" + fieldDecimal);\n\t\t}\n\t\treturn buffer.toString();\n\t}",
"public String field() {\n\t\treturn \"_\"+methodBase();\n\t}",
"public String getField() {\n return field;\n }",
"public String getField()\n {\n return field;\n }",
"public String fieldIdToString() {\r\n\t\treturn new String(String.format(\"%02d\", getID()));\r\n\t}",
"String getField();",
"public String toString()\n\t{\n\t\tField[] fields = this.getClass().getDeclaredFields();\n\t\tint i, max = fields.length;\n\t\tString fieldName = \"\";\n\t\tString fieldType = \"\";\n\t\tString ret = \"\";\n\t\tString value = \"\";\n\t\tboolean skip = false;\n\t\tint j = 0;\n\t\tfor(i = 0; i < max; i++)\n\t\t{\n\t\t\tfieldName = fields[i].getName().toString();\n\t\t\tfieldType = fields[i].getType().toString();\n\t\t\tif(i == 0)\n\t\t\t{\n\t\t\t\tret += \"{\";\n\t\t\t}\n\t\t\tif(fieldType.equals(\"int\") || fieldType.equals(\"long\") || fieldType.equals(\"float\") || fieldType.equals(\"double\") || fieldType.equals(\"boolean\"))\n\t\t\t{\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tvalue = fields[i].get(this).toString();\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) \n\t\t\t\t{\n\t\t\t\t\tvalue = \"0\";\n\t\t\t\t}\n\t\t\t\tskip = false;\n\t\t\t}\n\t\t\telse if(fieldType.contains(\"String\"))\n\t\t\t{\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tvalue = \"\\\"\"+Utility.escapeJSON((String) fields[i].get(this))+\"\\\"\";\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) \n\t\t\t\t{\n\t\t\t\t\tvalue = \"\\\"\"+\"\\\"\";\n\t\t\t\t}\n\t\t\t\tskip = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvalue = \"\\\"\"+\"\\\"\";\n\t\t\t\tskip = true;\n\t\t\t}\n\t\t\tif(!skip)\n\t\t\t{\n\t\t\t\tif(j > 0)\n\t\t\t\t{\n\t\t\t\t\tret += \",\";\n\t\t\t\t}\n\t\t\t\tj++;\n\t\t\t\tret += \"\\r\\n\\t\\\"\"+fieldName+\"\\\":\"+value;\n\t\t\t}\n\t\t\tif(i == max-1)\n\t\t\t{\n\t\t\t\tret += \"\\r\\n}\";\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}",
"protected String buildFieldExp(Field field) {\n final StringBuilder sb = new StringBuilder();\n sb.append(field.getDeclaringClass().getSimpleName());\n final Type genericType = field.getGenericType();\n final String typeExp = genericType != null ? genericType.getTypeName() : field.getType().getSimpleName();\n sb.append(\"@\").append(field.getName()).append(\": \").append(typeExp);\n final Class<?> genericBeanType = getFieldGenericType(field);\n sb.append(genericBeanType != null ? \"<\" + genericBeanType.getSimpleName() + \">\" : \"\");\n return sb.toString();\n }",
"public String getName(){\n return field.getName();\n }",
"java.lang.String getField1564();",
"java.lang.String getField1406();",
"java.lang.String getField1032();",
"public String toString() {\n StringBuilder stringBuilder = new StringBuilder(40);\n stringBuilder.append(\"property '\").append(this.getName()).append(\"' (\");\n if (this._accessorMethod != null) {\n stringBuilder.append(\"via method \").append(this._accessorMethod.getDeclaringClass().getName()).append(\"#\").append(this._accessorMethod.getName());\n } else {\n stringBuilder.append(\"field \\\"\").append(this._field.getDeclaringClass().getName()).append(\"#\").append(this._field.getName());\n }\n if (this._serializer == null) {\n stringBuilder.append(\", no static serializer\");\n } else {\n stringBuilder.append(\", static serializer of type \" + this._serializer.getClass().getName());\n }\n stringBuilder.append(')');\n return stringBuilder.toString();\n }",
"java.lang.String getField1710();",
"java.lang.String getField1610();",
"java.lang.String getField1015();",
"public java.lang.String getField1234() {\n java.lang.Object ref = field1234_;\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 field1234_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"java.lang.String getField1712();",
"java.lang.String getField1525();",
"java.lang.String getField1016();",
"java.lang.String getField1511();",
"java.lang.String getField1764();",
"public java.lang.String getFieldValue() {\n return fieldValue;\n }",
"java.lang.String getField1711();",
"java.lang.String getField1334();",
"java.lang.String getField1563();",
"java.lang.String getField1527();",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getFieldId() != null)\n sb.append(\"FieldId: \").append(getFieldId()).append(\",\");\n if (getFieldValue() != null)\n sb.append(\"FieldValue: \").append(\"***Sensitive Data Redacted***\").append(\",\");\n if (getAxisBinding() != null)\n sb.append(\"AxisBinding: \").append(getAxisBinding()).append(\",\");\n if (getSettings() != null)\n sb.append(\"Settings: \").append(getSettings());\n sb.append(\"}\");\n return sb.toString();\n }",
"java.lang.String getField1425();",
"java.lang.String getField1534();",
"java.lang.String getField1517();",
"java.lang.String getField1263();",
"java.lang.String getField1566();",
"java.lang.String getField1216();",
"java.lang.String getField1337();",
"java.lang.String getField1535();",
"java.lang.String getField1512();",
"java.lang.String getField1715();",
"public String getText() {\n return (getFieldValue(fields[0]) + \".\" + getFieldValue(fields[1]) + \".\" + getFieldValue(fields[2]) + \".\" + getFieldValue(fields[3]));\n }",
"java.lang.String getField1335();",
"java.lang.String getField1464();",
"java.lang.String getField1507();",
"java.lang.String getField1264();",
"public java.lang.String getField1527() {\n java.lang.Object ref = field1527_;\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 field1527_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"java.lang.String getField1646();",
"java.lang.String getField1215();",
"java.lang.String getField1235();",
"java.lang.String getField1510();",
"java.lang.String getField1336();",
"java.lang.String getField1202();",
"java.lang.String getField1411();",
"java.lang.String getField1554();",
"java.lang.String getField1523();",
"java.lang.String getField1557();",
"java.lang.String getField1533();",
"java.lang.String getField1338();",
"public String getText()\n {\n return field.getText();\n }",
"java.lang.String getField1514();",
"java.lang.String getField1531();",
"java.lang.String getField1434();",
"java.lang.String getField1588();",
"java.lang.String getField1031();",
"java.lang.String getField1078();",
"java.lang.String getField1825();",
"java.lang.String getField1115();",
"java.lang.String getField1835();",
"java.lang.String getField1565();",
"java.lang.String getField1225();",
"java.lang.String getField1725();",
"public java.lang.String getField1234() {\n java.lang.Object ref = field1234_;\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 field1234_ = s;\n return s;\n }\n }",
"java.lang.String getField1034();",
"java.lang.String getField1864();",
"java.lang.String getField1579();",
"java.lang.String getField1217();",
"java.lang.String getField1592();",
"java.lang.String getField1519();",
"public java.lang.String getField1027() {\n java.lang.Object ref = field1027_;\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 field1027_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"java.lang.String getField1834();",
"java.lang.String getField1524();",
"java.lang.String getField1435();",
"java.lang.String getField1544();",
"java.lang.String getField1364();",
"java.lang.String getField1025();",
"java.lang.String getField1201();",
"java.lang.String getField1412();",
"java.lang.String getField1843();",
"java.lang.String getField1589();",
"java.lang.String getField1227();",
"java.lang.String getField1719();",
"java.lang.String getField1521();",
"java.lang.String getField1423();",
"java.lang.String getField1555();",
"public java.lang.String getField1056() {\n java.lang.Object ref = field1056_;\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 field1056_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"java.lang.String getField1727();",
"java.lang.String getField1063();",
"java.lang.String getField1545();",
"java.lang.String getField1262();"
]
| [
"0.7669518",
"0.75904983",
"0.7465284",
"0.73449945",
"0.71606904",
"0.70353574",
"0.6993138",
"0.6956166",
"0.6897204",
"0.6815319",
"0.6791366",
"0.6756338",
"0.67061627",
"0.6684475",
"0.668132",
"0.6659601",
"0.6638934",
"0.6628071",
"0.66038126",
"0.6595852",
"0.65838844",
"0.6559673",
"0.65516824",
"0.65511847",
"0.65442324",
"0.6542971",
"0.6542618",
"0.6536913",
"0.6535947",
"0.65345836",
"0.6530969",
"0.65229684",
"0.64955604",
"0.6491648",
"0.6489049",
"0.64875823",
"0.6484684",
"0.64829314",
"0.64799434",
"0.6479267",
"0.6478832",
"0.6477199",
"0.64765394",
"0.6476528",
"0.64737326",
"0.64707977",
"0.6467574",
"0.64643776",
"0.64641666",
"0.6461329",
"0.64606315",
"0.6453745",
"0.6453038",
"0.6450255",
"0.6446324",
"0.6444068",
"0.64427066",
"0.6441357",
"0.6439622",
"0.64393103",
"0.6438507",
"0.64360756",
"0.6435891",
"0.6435351",
"0.64338595",
"0.64331234",
"0.6432619",
"0.64313453",
"0.6429853",
"0.642649",
"0.6426465",
"0.64254653",
"0.64251477",
"0.6423419",
"0.64231783",
"0.6422266",
"0.6421369",
"0.6418967",
"0.6418703",
"0.6415493",
"0.64131665",
"0.64128536",
"0.64125246",
"0.64123344",
"0.64116263",
"0.64112055",
"0.64108366",
"0.640754",
"0.6406131",
"0.64048016",
"0.6400956",
"0.6400569",
"0.6399382",
"0.63977325",
"0.63972956",
"0.639441",
"0.6393656",
"0.6392995",
"0.6391842",
"0.638944",
"0.63885635"
]
| 0.0 | -1 |
Only used in unit tests in order to inject a mock into the PostService class TODO: In order for this method to not be exposed, simulating a friend class that would instead set the IngestionLinker reference would be better | public void setLinker(IngestionLinker injectionLinker) {
this.ingestionLinker = injectionLinker;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Autowired\n public void setPostService(PostService postService) {\n this.postService = postService;\n }",
"public interface PostTagRefService extends IService<PostTagRef> {\n\n}",
"private void init() throws Exception{\n mapper = new ObjectMapper();\n\n // Create the linkRequest\n attribute = AttributeFixture.standardAttribute();\n\n\n }",
"private void register(final ServiceReference serviceReference) {\n final SlingPostOperation service = (SlingPostOperation) this.bundleContext.getService(serviceReference);\n final PostOperationProxy proxy = new PostOperationProxy(service);\n\n final BundleContext bundleContext = serviceReference.getBundle().getBundleContext();\n final Dictionary<String, Object> props = copyServiceProperties(serviceReference);\n final ServiceRegistration reg = bundleContext.registerService(\n PostOperation.SERVICE_NAME, proxy, props);\n\n log.debug(\"Registering {}\", proxy);\n synchronized (this.proxies) {\n this.proxies.put(serviceReference, reg);\n }\n }",
"@BeforeMethod\n public void methodSetup() {\n open(wpPostUri);\n super.targetUri = wpPostUri;\n WPPost wpPost = new WPPost();\n super.wpFooter = wpPost.wpFooter;\n }",
"public interface PostRequest {}",
"public interface HttpPoster {\n\n /**\n * Post data to the provided URL.\n *\n * @param url http url to be reached\n * @param headers headers to be sent\n * @param body body to be sent\n * @param mediaType media type definition\n * @return http response from the POST request\n * @throws IOException in case of http request error\n */\n HttpResponse post(URL url, Map<String, String> headers, byte[] body, String mediaType)\n throws IOException;\n}",
"public RequestUrlHandler() {\n // requestService = SpringContextHolder.getBean(ScfRequestService.class);\n }",
"protected void setUp() throws Exception {\n super.setUp();\n EndpointContext ctx = new EndpointContext();\n binder = new HttpBinder(ctx);\n }",
"@Test\n public void testReferRequest() {\n // TODO: test ReferRequest\n }",
"public Post() {\n\t\t\n\t}",
"public AnnotateClueRunWithURLs() {\r\n\t}",
"public interface Links {\r\n\r\n /**\r\n * 上传图片\r\n *\r\n * @param parts\r\n * @return\r\n */\r\n @Multipart\r\n @POST(\"user/login\")\r\n Call<ResponseBody> userLogin(@Part List<MultipartBody.Part> parts);\r\n\r\n /**\r\n * 添加技术\r\n *\r\n * @param userInfoId\r\n * @param userSkillId\r\n * @param skillTypeId\r\n * @return\r\n */\r\n @POST(\"/yetdwell/skill/addSkill.do\")\r\n Call<ResponseBody> addSkill(@Query(\"userInfoId\") int userInfoId,\r\n @Query(\"userSkillId\") int userSkillId,\r\n @Query(\"skillTypeId\") int skillTypeId);\r\n\r\n}",
"public PublishingClientImpl() {\n this.httpClientSupplier = () -> HttpClients.createDefault();\n this.requestBuilder = new PublishingRequestBuilderImpl();\n }",
"@Before\n public void preparingForTest() {\n link = new PseodoLinkedList();\n }",
"private MockClientNetworkModule() {\n\t\t// TODO complete this constructor\n\t}",
"@Test\n public void testBridgeProcessRequestMetadataDispatcherSupportabilityTracking() throws Exception {\n EnvironmentHolder holder = setupEnvironmentHolder(\"cat_enabled_dt_disabled_test\");\n\n try {\n String className = APISupportabilityTest.ProcessRequestMetadataDispatcherBridgeTestClass.class.getName();\n InstrumentTestUtils.createTransformerAndRetransformClass(className, \"getProcessRequestMetadata\", \"()V;\");\n\n final String processRequestMetadataMetric = \"Supportability/API/ProcessRequestMetadata/API\";\n new ProcessRequestMetadataDispatcherBridgeTestClass().getProcessRequestMetadata();\n\n Map<String, Integer> metricData = InstrumentTestUtils.getAndClearMetricData();\n Assert.assertNotNull(metricData.get(processRequestMetadataMetric));\n Assert.assertEquals(Integer.valueOf(1), metricData.get(processRequestMetadataMetric));\n } finally {\n holder.close();\n }\n }",
"@Override\n\tvoid post() {\n\t\t\n\t}",
"public interface LinkEndPoint {\n\n @POST(\"link\")\n Call<Link> createLink(@Body Link link);\n\n @GET(\"link\")\n Call<List<Link>> getAllLinks();\n\n @DELETE(\"link/{id}\")\n Call<Object> deleteLinks(@Path(\"id\") Integer id);\n\n}",
"@When(\"user calls {string} with Post http request\")\npublic void user_calls_with_post_http_request(String string) {\n\tresponse = res.when().post(\"/maps/api/place/add/json\")\n\t\t\t.then().spec(responspec).extract().response();\n \n}",
"public void postRequest() {\n apiUtil = new APIUtil();\n // As this is an API call , we are not setting up any base url but defining the individual calls\n apiUtil.setBaseURI(configurationReader.get(\"BaseURL\"));\n //This is used to validate the get call protected with basic authentication mechanism\n basicAuthValidation();\n scenario.write(\"Request body parameters are :-\");\n SamplePOJO samplePOJO = new SamplePOJO();\n samplePOJO.setFirstName(scenarioContext.getContext(\"firstName\"));\n samplePOJO.setLastName(scenarioContext.getContext(\"lastName\"));\n\n ObjectMapper objectMapper = new ObjectMapper();\n try {\n apiUtil.setRequestBody(objectMapper.writeValueAsString(samplePOJO));\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n }",
"public interface PostService {\n public ResultInfo addPost(PostVo postVo);\n\n public ResultInfo getPostById(Long id);\n\n public ResultInfo updatePost(PostVo postVo);\n\n public ResultInfo deletePostById(Long id);\n\n public Map share(Long id);\n\n}",
"private RecipleazBackendService() {\n }",
"void add(MockAPI mockAPI);",
"@Before\n public void setUp() {\n deviceController = Mockito.mock(DeviceController.class);\n settingController = Mockito.mock(SettingController.class);\n gprsMessageDAO = Mockito.mock(GprsMessageDAO.class);\n postResults = new ArrayList<>();\n\n Mockito.when(settingController.getSetting(\"deviceCommunicator.endpoint\"))\n .thenReturn(\"http://jouko.test/\");\n\n Mockito.when(settingController.getSetting(\"deviceCommunicator.asId\"))\n .thenReturn(\"as\");\n\n Mockito.when(settingController.getSetting(\"deviceCommunicator.enabled\", \"false\"))\n .thenReturn(\"true\");\n\n subject = new DeviceCommunicator(\n deviceController,\n settingController,\n Clock.fixed(Instant.EPOCH, ZoneOffset.UTC),\n (String postResult) -> {\n postResults.add(postResult);\n return \"<html><body>Request queued by LRC</body></html>\";\n }\n );\n }",
"public RESTImportProxyHandler(Class<?> interfaceClass, String baseUrl){\r\n \t\tthis.interfaceClass=interfaceClass;\r\n \t\tthis.baseUrl=baseUrl;\r\n \t}",
"ServiceReferenceProxy getServiceReference();",
"public interface PostService {\n List<PostDto> getPostsByUser(String email) throws ServiceException;\n\n List<PostDto> getAllPosts()throws ServiceException;\n\n Post insertPost(PostDto dto) throws ServiceException;\n\n void addLikeToPost(LikeDto dto)throws ServiceException;\n\n void addCommentToPost(CommentDto dto)throws ServiceException;\n\n PostDto getPostById(Long id)throws ServiceException;\n\n}",
"@Test\n public void testProcessRequestMetadataDispatcherSupportabilityTracking() throws Exception {\n EnvironmentHolder holder = setupEnvironmentHolder(\"cat_enabled_dt_disabled_test\");\n\n try {\n String className = APISupportabilityTest.ProcessRequestMetadataDispatcherTestClass.class.getName();\n InstrumentTestUtils.createTransformerAndRetransformClass(className, \"getProcessRequestMetadata\", \"()V;\");\n\n final String processRequestMetadataMetric = \"Supportability/API/ProcessRequestMetadata/API\";\n new ProcessRequestMetadataDispatcherTestClass().getProcessRequestMetadata();\n\n Map<String, Integer> metricData = InstrumentTestUtils.getAndClearMetricData();\n Assert.assertNotNull(metricData.get(processRequestMetadataMetric));\n Assert.assertEquals(Integer.valueOf(1), metricData.get(processRequestMetadataMetric));\n } finally {\n holder.close();\n }\n }",
"public interface BlogPostService {\n\n void savePost(BlogPost blogPost);\n}",
"public interface EndpointBase {\n\n boolean isIdleNow();\n\n /**\n * @param connectionTimeout\n * @param methodTimeout\n */\n void setTimeouts(int connectionTimeout, int methodTimeout);\n\n /**\n * @param alwaysMainThread\n */\n void setCallbackThread(boolean alwaysMainThread);\n\n /**\n * @param flags\n */\n void setDebugFlags(int flags);\n\n int getDebugFlags();\n\n /**\n * @param delay\n */\n void setDelay(int delay);\n\n void addErrorLogger(ErrorLogger logger);\n\n void removeErrorLogger(ErrorLogger logger);\n\n void setOnRequestEventListener(OnRequestEventListener listener);\n\n\n void setPercentLoss(float percentLoss);\n\n int getThreadPriority();\n\n void setThreadPriority(int threadPriority);\n\n\n ProtocolController getProtocolController();\n\n void setUrlModifier(UrlModifier urlModifier);\n\n /**\n * No log.\n */\n int NO_DEBUG = 0;\n\n /**\n * Log time of requests.\n */\n int TIME_DEBUG = 1;\n\n /**\n * Log request content.\n */\n int REQUEST_DEBUG = 2;\n\n /**\n * Log response content.\n */\n int RESPONSE_DEBUG = 4;\n\n /**\n * Log cache behavior.\n */\n int CACHE_DEBUG = 8;\n\n /**\n * Log request code line.\n */\n int REQUEST_LINE_DEBUG = 16;\n\n /**\n * Log request and response headers.\n */\n int HEADERS_DEBUG = 32;\n\n /**\n * Log request errors\n */\n int ERROR_DEBUG = 64;\n\n /**\n * Log cancellations\n */\n int CANCEL_DEBUG = 128;\n\n /**\n * Log cancellations\n */\n int THREAD_DEBUG = 256;\n\n /**\n * Log everything.\n */\n int FULL_DEBUG = TIME_DEBUG | REQUEST_DEBUG | RESPONSE_DEBUG | CACHE_DEBUG | REQUEST_LINE_DEBUG | HEADERS_DEBUG | ERROR_DEBUG | CANCEL_DEBUG;\n\n int INTERNAL_DEBUG = FULL_DEBUG | THREAD_DEBUG;\n\n /**\n * Created by Kuba on 17/07/14.\n */\n interface UrlModifier {\n\n String createUrl(String url);\n\n }\n\n interface OnRequestEventListener {\n\n void onStart(Request request, int requestsCount);\n\n void onStop(Request request, int requestsCount);\n\n }\n}",
"public FakeBasicProxyPreparer() {\n\tsuper();\n }",
"public interface PostService {\n\n\t/**\n\t * Gets the post by ID.\n\t *\n\t * @param postId the post id\n\t * @return the post by ID\n\t */\n\tPost getPostByID(long postId);\n\n\t/**\n\t * Post for party.\n\t *\n\t * @param post the post\n\t * @param postToParty the post to party\n\t * @return the post\n\t */\n\tPost postForParty(Post post, Party postToParty);\n\n\t/**\n\t * Post for opportunity.\n\t *\n\t * @param post the post\n\t * @param opportunity the opportunity\n\t * @return the post\n\t */\n\tPost postForOpportunity(Post post, Opportunity opportunity);\n\n\t/**\n\t * Find all by posted for party.\n\t *\n\t * @param postedForParty the posted for party\n\t * @param page the page\n\t * @return the paginated search response model\n\t */\n\tPaginatedSearchResponseModel findAllByPostedForParty(Party postedForParty, Pageable page);\n\n\t/**\n\t * Find all by posted by party.\n\t *\n\t * @param postedByParty the posted by party\n\t * @param page the page\n\t * @return the paginated search response model\n\t */\n\tPaginatedSearchResponseModel findAllByPostedByParty(Party postedByParty, Pageable page);\n\n\t/**\n\t * Find all by posted for opportunity.\n\t *\n\t * @param postedForOpportunity the posted for opportunity\n\t * @param page the page\n\t * @return the paginated search response model\n\t */\n\tPaginatedSearchResponseModel findAllByPostedForOpportunity(Opportunity postedForOpportunity, Pageable page);\n\n\t/**\n\t * Find directed and opportunity based posts for user.\n\t *\n\t * @param partyBean the party bean\n\t * @param page the page\n\t * @return the paginated search response model\n\t */\n\tPaginatedSearchResponseModel findDirectedAndOpportunityBasedPostsForUser(Party partyBean, Pageable page);\n\n\t/**\n\t * Find all posts for user.\n\t *\n\t * @param partyBean the party bean\n\t * @param page the page\n\t * @return the paginated search response model\n\t */\n\tPaginatedSearchResponseModel findAllPostsForUser(Party partyBean, Pageable page);\n\n\t/**\n\t * Find all posts for type.\n\t *\n\t * @param type the type\n\t * @param page the page\n\t * @return the paginated search response model\n\t */\n\tPaginatedSearchResponseModel findAllPostsForType(String type, Pageable page);\n\n}",
"public void mock(){\n\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}",
"@Before\r\n public void setUp() { \r\n ApiProxy.setEnvironmentForCurrentThread(new TestEnvironment());\r\n //ApiProxy.setDelegate(new ApiProxyLocalImpl(new File(\".\")){});\r\n \t\r\n //helper.setUp();\r\n }",
"private Processor()\n {\n super(providerName+\"ProxyProcessor\");\n }",
"protected Proxy(InvocationHandler h) { }",
"protected void setUp() throws Exception {\r\n instance = new LoggingInterceptor();\r\n }",
"@PostConstruct\n public void initRoad(){\n LinearReference();\n }",
"public PhysicalLink() {\n\n }",
"@Before\n public void setup() {\n endpoint = new Endpoint();\n endpoint.setKey(1);\n endpoint.setUrl(URI.create(\"http://localhost/nmr\"));\n\n // Installation, synchronized against\n installation = new Installation();\n installation.setType(InstallationType.TAPIR_INSTALLATION);\n installation.addEndpoint(endpoint);\n\n // Populated Dataset\n dataset = prepareDataset();\n\n // RegistryUpdater, using mocked web service client implementation\n updater = new RegistryUpdater(datasetService, metasyncHistoryService);\n }",
"private AddHarnessIdInterceptor() {}",
"public LogPoster() {\n\t\t\n\t}",
"public void testExtendsLinkerArgsViaReference() {\n final Project project = new Project();\n final LinkerDef baseLinker = new LinkerDef();\n baseLinker.setProject(project);\n baseLinker.setId(\"base\");\n project.addReference(\"base\", baseLinker);\n final LinkerArgument linkerArg = new LinkerArgument();\n linkerArg.setValue(\"/base\");\n baseLinker.addConfiguredLinkerArg(linkerArg);\n\n final LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(baseLinker);\n extendedLinker.setProject(project);\n extendedLinker.setId(\"extended\");\n project.addReference(\"extended\", extendedLinker);\n\n final LinkerDef linkerRef = new LinkerDef();\n linkerRef.setProject(project);\n linkerRef.setRefid(new Reference(project, \"extended\"));\n final String[] preArgs = getPreArguments(linkerRef);\n assertEquals(1, preArgs.length);\n assertEquals(\"/base\", preArgs[0]);\n }",
"public interface Endpoint {\n public static final String REDDIT_BASE_URL = \"http://www.reddit.com\";\n\n //public Object call(String subreddit);\n\n}",
"private Link() {\n }",
"protected LibReference() {\n\t}",
"void setup(HttpRouting.Builder routing);",
"private Posts() {\n }",
"@Autowired\n public PostService(PostRepository postsDao) {\n this.postsDao = postsDao;\n// createDummyList();\n }",
"@Before\n public void setupService() {\n }",
"private MockarooPingHelper(){}",
"@POST(\"posts\")\n Call<Post> createPost(@Body Post post);",
"protected abstract <T extends ReferenceAnnotation> AnnotationImporter<T> getImporter(ReferenceMetadata<T> ref);",
"protected void setUp() {\r\n auditDetail = new AuditDetail();\r\n }",
"public interface DynamicFeignClient {\n\n @RequestLine(\"POST \")\n @Headers(\"Content-Type: application/json\")\n public ResponseModel callback(@RequestBody RequestModel requestModel);\n}",
"public Post() {\n }",
"public interface PostCreationProcessor {\n\n /**\n * 执行后处理工作\n */\n void invoke();\n\n}",
"@Test\n public void testProxy() {\n Dell dell = new Dell();\n Proxy proxy = new Proxy(dell);\n proxy.salePc();\n }",
"public interface PostCatgMapper {\n\n}",
"public void testResolvePostTransfer() throws Exception {\n System.out.println(\"resolvePostTransfer\");\n \n instance.resolvePostTransfer();\n \n }",
"private MockClientFacade() {\n\t\t//this.c = Client.getInstance();\n\t}",
"public interface IDevopsIngressService {\n\n void createIngress(String ingressYaml, String name, String namespace, Long envId, Long commandId);\n\n void deleteIngress(String name, String namespace, Long envId, Long commandId);\n}",
"private void setupApiService(){\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(InstagramAppData.BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n instaGramService = retrofit.create(InstaGramService.class);\n }",
"@Override\n public CompletableFuture<APostOperationResponse> aPostOperation(APostOperationRequest aPostOperationRequest) {\n List<MetricPublisher> metricPublishers = resolveMetricPublishers(clientConfiguration, aPostOperationRequest\n .overrideConfiguration().orElse(null));\n MetricCollector apiCallMetricCollector = metricPublishers.isEmpty() ? NoOpMetricCollector.create() : MetricCollector\n .create(\"ApiCall\");\n try {\n apiCallMetricCollector.reportMetric(CoreMetric.SERVICE_ID, \"QueryToJsonCompatibleService\");\n apiCallMetricCollector.reportMetric(CoreMetric.OPERATION_NAME, \"APostOperation\");\n JsonOperationMetadata operationMetadata = JsonOperationMetadata.builder().hasStreamingSuccessResponse(false)\n .isPayloadJson(true).build();\n\n HttpResponseHandler<APostOperationResponse> responseHandler = protocolFactory.createResponseHandler(\n operationMetadata, APostOperationResponse::builder);\n\n HttpResponseHandler<AwsServiceException> errorResponseHandler = createErrorResponseHandler(protocolFactory,\n operationMetadata);\n String hostPrefix = \"{StringMember}-foo.\";\n HostnameValidator.validateHostnameCompliant(aPostOperationRequest.stringMember(), \"StringMember\",\n \"aPostOperationRequest\");\n String resolvedHostExpression = String.format(\"%s-foo.\", aPostOperationRequest.stringMember());\n\n CompletableFuture<APostOperationResponse> executeFuture = clientHandler\n .execute(new ClientExecutionParams<APostOperationRequest, APostOperationResponse>()\n .withOperationName(\"APostOperation\")\n .withMarshaller(new APostOperationRequestMarshaller(protocolFactory))\n .withResponseHandler(responseHandler).withErrorResponseHandler(errorResponseHandler)\n .withMetricCollector(apiCallMetricCollector).hostPrefixExpression(resolvedHostExpression)\n .withInput(aPostOperationRequest));\n CompletableFuture<APostOperationResponse> whenCompleted = executeFuture.whenComplete((r, e) -> {\n metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));\n });\n executeFuture = CompletableFutureUtils.forwardExceptionTo(whenCompleted, executeFuture);\n return executeFuture;\n } catch (Throwable t) {\n metricPublishers.forEach(p -> p.publish(apiCallMetricCollector.collect()));\n return CompletableFutureUtils.failedFuture(t);\n }\n }",
"private void inject() {\n }",
"public Post()\n {\n }",
"public Post(String user, String postContent, String webAddress) {\n this.orderPosted = nextOrderPosted;\n nextOrderPosted++;\n this.user = user;\n this.postContent = postContent;\n this.webAddress = webAddress;\n// this.myAuthor=myAuthor;\n\n }",
"private AnagramService() {\n\t}",
"private ModuleProvider(String inProviderName,\n AbstractMarketDataModule<?,?> inFeed)\n {\n providerName = inProviderName;\n description = providerName + \" proxy\";\n feed = inFeed;\n moduleManager = ModuleManager.getInstance();\n processor = new Processor();\n // TODO register a feed status listener to detect starts and stops and update status\n start();\n }",
"private TelemetryMessageHandler(){\n super();\n messageList = new TelemetryMessageList();\n telemetryArrivalMap = new TelemetryArrivalMap();\n }",
"ReferenceLink createReferenceLink();",
"public MedPostTranslator() {}",
"interface HttpRedirectsService {\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @HEAD(\"http/redirect/300\")\n Call<Void> head300();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @GET(\"http/redirect/300\")\n Call<ResponseBody> get300();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @HEAD(\"http/redirect/301\")\n Call<Void> head301();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @GET(\"http/redirect/301\")\n Call<ResponseBody> get301();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @PUT(\"http/redirect/301\")\n Call<ResponseBody> put301(@Body Boolean booleanValue);\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @HEAD(\"http/redirect/302\")\n Call<Void> head302();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @GET(\"http/redirect/302\")\n Call<ResponseBody> get302();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @PATCH(\"http/redirect/302\")\n Call<ResponseBody> patch302(@Body Boolean booleanValue);\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @POST(\"http/redirect/303\")\n Call<ResponseBody> post303(@Body Boolean booleanValue);\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @HEAD(\"http/redirect/307\")\n Call<Void> head307();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @GET(\"http/redirect/307\")\n Call<ResponseBody> get307();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @PUT(\"http/redirect/307\")\n Call<ResponseBody> put307(@Body Boolean booleanValue);\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @PATCH(\"http/redirect/307\")\n Call<ResponseBody> patch307(@Body Boolean booleanValue);\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @POST(\"http/redirect/307\")\n Call<ResponseBody> post307(@Body Boolean booleanValue);\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @HTTP(path = \"http/redirect/307\", method = \"DELETE\", hasBody = true)\n Call<ResponseBody> delete307(@Body Boolean booleanValue);\n\n }",
"public interface AppPushRecordsService {\n\n /**\n * 添加\n *\n * @param appPushRecordsModel\n */\n void add(AppPushRecordsModel appPushRecordsModel);\n}",
"@Before\n public void init(){\n mockClient = MockWebServiceClient.createClient(applicationContext);\n }",
"@Before\n public void init(){\n mockClient = MockWebServiceClient.createClient(applicationContext);\n }",
"@Before\n public void setUp() throws Exception {\n MockServletContext mockServletContext = new MockServletContext();\n new SpannerClient().contextInitialized(new ServletContextEvent(mockServletContext));\n SpannerTestTasks.setup();\n\n eventVolunteeringFormHandlerServlet = new VolunteeringFormHandlerServlet();\n\n request = Mockito.mock(HttpServletRequest.class);\n response = Mockito.mock(HttpServletResponse.class);\n }",
"public void before()\n {\n adapter = context.getBean(HandlerAdapter.class);\n }",
"public Post(){\n\n }",
"public interface Link<T> {\n\n /**\n * Resolve the link and get the underlying object.\n *\n * @return the target of the link, not null\n * @throws DataNotFoundException if the link is not resolved\n */\n T resolve();\n\n /**\n * Get the type of the object that this link targets.\n *\n * @return the type of the object, not null\n */\n Class<T> getTargetType();\n\n // TODO - do we want a method to generate a resolved version of a config object e.g. new ResolvedConfigLink(resolver.resolve())\n}",
"@Before\n public void init() throws Exception {\n TestObjectGraphSingleton.init();\n TestObjectGraphSingleton.getInstance().inject(this);\n\n mockWebServer.start();\n }",
"@Test(enabled=false)\n\tpublic void objectPost() {\t\n\t\tPosts posts = new Posts(\"3\", \"Seahawks\", \"Wilson\");\n\t\t\n\t\tResponse res = given().\n\t\twhen().\n\t\tcontentType(ContentType.JSON).\n\t\tbody(posts).\n\t\tpost(\"http://localhost:3000/posts/\");\n\t\n\t\tSystem.out.println(\"Response as object: \"+res.asString());\n\t}",
"private ServiceAgent(boolean userIdIsNumber, ServiceCacherInterface cacher, AccessControllerInterface guard, ServicePrePostProcessorInterface prePostProcessor,\n\t\t\tboolean useLocalData) {\n\t\tthis.numericUserId = userIdIsNumber;\n\t\tthis.cacheManager = cacher;\n\t\tthis.securityManager = guard;\n\t\tthis.useLocalData = useLocalData;\n\t\tthis.applicationHook = prePostProcessor;\n\t}",
"@Override\n public void postReceive(RepositoryHookContext context, Collection<RefChange> refChanges) \n {\n }",
"private static void testmereService(ApplicationContext context) {\n MergeService mergeService = (MergeService) context.getBean(\"mergeServiceImp\"); // 获取远程服务代理\n List<String> result = mergeService.mergeResult();\n for (String s : result) {\n log.info(s);\n }\n }",
"public interface LinkGenerator {\n\n String ATTRIBUTE_CONTROLLER = \"controller\";\n String ATTRIBUTE_RESOURCE = \"resource\";\n String ATTRIBUTE_ACTION = \"action\";\n String ATTRIBUTE_METHOD = \"method\";\n String ATTRIBUTE_URI = \"uri\";\n String ATTRIBUTE_RELATIVE_URI = \"relativeUri\";\n String ATTRIBUTE_INCLUDE_CONTEXT = \"includeContext\";\n String ATTRIBUTE_CONTEXT_PATH = \"contextPath\";\n String ATTRIBUTE_URL = \"url\";\n String ATTRIBUTE_BASE = \"base\";\n String ATTRIBUTE_ABSOLUTE = \"absolute\";\n String ATTRIBUTE_ID = \"id\";\n String ATTRIBUTE_FRAGMENT = \"fragment\";\n String ATTRIBUTE_PARAMS = \"params\";\n String ATTRIBUTE_MAPPING = \"mapping\";\n String ATTRIBUTE_EVENT = \"event\";\n String ATTRIBUTE_ELEMENT_ID = \"elementId\";\n String ATTRIBUTE_PLUGIN = \"plugin\";\n String ATTRIBUTE_NAMESPACE = \"namespace\";\n \n\n Set<String> LINK_ATTRIBUTES = CollectionUtils.newSet(\n ATTRIBUTE_RESOURCE,\n ATTRIBUTE_METHOD,\n ATTRIBUTE_CONTROLLER,\n ATTRIBUTE_ACTION,\n ATTRIBUTE_URI,\n ATTRIBUTE_RELATIVE_URI,\n ATTRIBUTE_CONTEXT_PATH,\n ATTRIBUTE_URL,\n ATTRIBUTE_BASE,\n ATTRIBUTE_ABSOLUTE,\n ATTRIBUTE_ID,\n ATTRIBUTE_FRAGMENT,\n ATTRIBUTE_PARAMS,\n ATTRIBUTE_MAPPING,\n ATTRIBUTE_EVENT,\n ATTRIBUTE_ELEMENT_ID,\n ATTRIBUTE_PLUGIN,\n ATTRIBUTE_NAMESPACE\n );\n\n Map<String, String> REST_RESOURCE_ACTION_TO_HTTP_METHOD_MAP = CollectionUtils.<String, String>newMap(\n \"create\", \"GET\",\n \"save\", \"POST\",\n \"show\", \"GET\",\n \"index\", \"GET\",\n \"edit\", \"GET\",\n \"update\", \"PUT\",\n \"patch\", \"PATCH\",\n \"delete\", \"DELETE\"\n );\n\n Map<String, String> REST_RESOURCE_HTTP_METHOD_TO_ACTION_MAP = CollectionUtils.<String, String>newMap(\n \"GET_ID\", \"show\",\n \"GET\", \"index\",\n \"POST\", \"save\",\n \"DELETE\", \"delete\",\n \"PUT\", \"update\",\n \"PATCH\", \"patch\"\n );\n\n\n /**\n * Generates a link to a static resource for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>base - The base path of the URL, typically an absolute server path</li>\n * <li>contextPath - The context path to link to, defaults to the servlet context path</li>\n * <li>dir - The directory to link to</li>\n * <li>file - The file to link to (relative to the directory if specified)</li>\n * <li>plugin - The plugin that provides the resource</li>\n * <li>absolute - Whether the link should be absolute or not</li>\n * </ul>\n *\n * @param params The named parameters\n * @return The link to the static resource\n */\n String resource(@SuppressWarnings(\"rawtypes\") Map params);\n\n /**\n * Generates a link to a controller, action or URI for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>resource - If linking to a REST resource, the name of the resource or resource path to link to. Either 'resource' or 'controller' should be specified, but not both</li>\n * <li>controller - The name of the controller to use in the link, if not specified the current controller will be linked</li>\n * <li>action - The name of the action to use in the link, if not specified the default action will be linked</li>\n * <li>uri - relative URI</li>\n * <li>url - A map containing the action,controller,id etc.</li>\n * <li>base - Sets the prefix to be added to the link target address, typically an absolute server URL. This overrides the behaviour of the absolute property, if both are specified.</li>\n * <li>absolute - If set to \"true\" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:<port> if no value in Config and not running in production.</li>\n * <li>contextPath - The context path to link to, defaults to the servlet context path</li>\n * <li>id - The id to use in the link</li>\n * <li>fragment - The link fragment (often called anchor tag) to use</li>\n * <li>params - A map containing URL query parameters</li>\n * <li>mapping - The named URL mapping to use to rewrite the link</li>\n * <li>event - Webflow _eventId parameter</li>\n * </ul>\n * @param params The named parameters\n * @return The generator link\n */\n String link(@SuppressWarnings(\"rawtypes\") Map params);\n\n /**\n * Generates a link to a controller, action or URI for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>resource - If linking to a REST resource, the name of the resource or resource path to link to. Either 'resource' or 'controller' should be specified, but not both</li>\n * <li>controller - The name of the controller to use in the link, if not specified the current controller will be linked</li>\n * <li>action - The name of the action to use in the link, if not specified the default action will be linked</li>\n * <li>uri - relative URI</li>\n * <li>url - A map containing the action,controller,id etc.</li>\n * <li>base - Sets the prefix to be added to the link target address, typically an absolute server URL. This overrides the behaviour of the absolute property, if both are specified.</li>\n * <li>absolute - If set to \"true\" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:<port> if no value in Config and not running in production.</li>\n * <li>id - The id to use in the link</li>\n * <li>fragment - The link fragment (often called anchor tag) to use</li>\n * <li>params - A map containing URL query parameters</li>\n * <li>mapping - The named URL mapping to use to rewrite the link</li>\n * <li>event - Webflow _eventId parameter</li>\n * </ul>\n * @param params The named parameters\n * @param encoding The character encoding to use\n * @return The generator link\n */\n String link(@SuppressWarnings(\"rawtypes\") Map params, String encoding);\n\n /**\n * Obtains the context path from which this link generator is operating.\n *\n * @return The base context path\n */\n String getContextPath();\n\n /**\n * The base URL of the server used for creating absolute links.\n *\n * @return The base URL of the server\n */\n String getServerBaseURL();\n}",
"@Inject\n public MachineMonkeyRestApiImpl() {\n }",
"@Before\n public void initialize() throws BeansException, MalformedURLException {\n wsClient = EasyMock.createMock(CaAERSParticipantServiceWSClient.class);\n xsltTransformer = EasyMock.createMock(XSLTTransformer.class);\n caAERSRegistrationServiceInvocationStrategy = new CaAERSRegistrationServiceInvocationStrategy(xsltTransformer,\n wsClient, RETRY_COUNT);\n caAERSUpdateRegistrationServiceInvocationStrategy = new CaAERSUpdateRegistrationServiceInvocationStrategy(\n xsltTransformer, wsClient, RETRY_COUNT);\n }",
"public LinksBean() {\n }",
"public void setReference (SoftReference ref)\r\n {\r\n _reference = ref;\r\n }",
"@Test\r\n public void testSetProxy() {\r\n // Not required\r\n }",
"public Gateway() {\n genClient = new GenericClient<Gateway>(this);\n }",
"@POST\n Call<Post> createPost(@Body Post post);",
"public interface SetupService {\r\n\t\r\n\t/**\r\n\t * postSetup\r\n\t */\r\n\tpublic void postSetup();\r\n}",
"public OrderLineServiceTest() {\n\t\tsetupRequestContext();\n\t}",
"public postDetailsMB() {\n }",
"@Override\n public void feedingHerb() {\n\n }",
"public LinkBuilder() {\n }"
]
| [
"0.5630024",
"0.55099016",
"0.5387196",
"0.53423",
"0.534221",
"0.51972896",
"0.51466674",
"0.5132462",
"0.51161474",
"0.5062666",
"0.5010886",
"0.5009961",
"0.49954557",
"0.4987042",
"0.49737775",
"0.49656552",
"0.49533758",
"0.49489006",
"0.4941002",
"0.49387032",
"0.4937447",
"0.4923582",
"0.49217892",
"0.49157977",
"0.49114642",
"0.4895176",
"0.48924586",
"0.48844683",
"0.48687232",
"0.48622766",
"0.4853447",
"0.4852903",
"0.48408112",
"0.48343718",
"0.4811875",
"0.48062748",
"0.4795451",
"0.47935733",
"0.4791203",
"0.47869265",
"0.4786734",
"0.4785847",
"0.47846103",
"0.47796527",
"0.477849",
"0.47745314",
"0.47732347",
"0.4769585",
"0.47657877",
"0.47633728",
"0.4758709",
"0.47563198",
"0.47533482",
"0.47488517",
"0.47406888",
"0.4739265",
"0.47334242",
"0.47321212",
"0.4730284",
"0.47229898",
"0.47207016",
"0.47127765",
"0.47123203",
"0.47087234",
"0.4708706",
"0.47074893",
"0.47053596",
"0.47044235",
"0.46999434",
"0.46994045",
"0.46949258",
"0.4692581",
"0.46901906",
"0.4683287",
"0.46775144",
"0.46764684",
"0.46744412",
"0.46744412",
"0.46618277",
"0.46590292",
"0.46570912",
"0.46541625",
"0.4652189",
"0.46512198",
"0.4649335",
"0.4648498",
"0.46480897",
"0.46443173",
"0.463183",
"0.46263131",
"0.46246672",
"0.4624078",
"0.46197012",
"0.46188486",
"0.46121323",
"0.4605878",
"0.45992434",
"0.4592938",
"0.45910636",
"0.4588181"
]
| 0.56427795 | 0 |
Public method for getting a list of posts from the ingestion system. If the given parameters exceed the database number of existing rows, null objects will be added to the list. | public List<PostEntity> getInterval(int auth_id, String token, int s, int c, String order, String query, String date) {
if (sessionRepository.findAll().stream().anyMatch(session -> session.getUser_id() == auth_id && session.getToken().equals(token))) {
List<ProviderEntity> providerList = userService.getProviderListForUser(auth_id, token, auth_id, 0, 10);
StringBuilder sb = new StringBuilder();
for(var provider : providerList)
{
sb.append("list=").append(provider.getId()).append("&");
}
System.out.println(sb.toString());
return ingestionLinker.getInterval(s, c, sb.toString(), order, query, date);
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Post> getAllPost() throws Exception;",
"@Override\n\tpublic List<Post> getNewPosts(int number) throws Exception {\n\t\treturn null;\n\t}",
"private void queryPosts() {\n ParseQuery<OutfitPost> query = ParseQuery.getQuery(OutfitPost.class);\n // only include data referred by user key\n query.include(OutfitPost.KEY_USER);\n query.whereEqualTo(OutfitPost.KEY_USER, ParseUser.getCurrentUser());\n // limit query to latest 20 items\n query.setLimit(20);\n // order posts by creation date (newest first)\n query.addDescendingOrder(OutfitPost.KEY_CREATED_KEY);\n // start an asynchronous call for posts\n query.findInBackground(new FindCallback<OutfitPost>() {\n @Override\n public void done(List<OutfitPost> posts, ParseException e) {\n // check for errors\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n // Save oldest post in query for loading more posts\n if (posts.size() > 0) {\n oldestPost = posts.get(posts.size() - 1).getCreatedAt();\n }\n // update adapter with posts list\n adapter.clear();\n adapter.addAll(posts);\n }\n });\n }",
"List<PostInfo> getPostList();",
"public List<BlogPost> getPosts();",
"protected void queryPosts() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n //get all the post objects from the database\n query.include(Post.KEY_USER);\n //set the limit to 20 posts being retrieved\n query.setLimit(POSTS_QUERY_LIMIT);\n\n query.addDescendingOrder(Post.KEY_CREATED_KEY);\n\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e) {\n // e == null if success\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n adapter.clear();\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }\n });\n }",
"public List<Post> retriveAllPosts()\n\t {\n\t\t List<Post> Posts =(List<Post>) Postrepository.findAll();\n\t\t \n\t\t for(Post Post :Posts)\n\t\t {\n\t\t\t //l.info(\"Post +++ :\" +Post);\n\t\t }\n\t\t return Posts;\n\t\t\t \n\t }",
"@Override\n\tpublic List<Post> list() {\n\t\treturn null;\n\t}",
"public static ResultSet getPosts(){\n ResultSet result = null;\n try {\n conn = ConnectionProvider.getCon();\n pst = conn.prepareStatement(\"select * from normalposts\");\n result = pst.executeQuery();\n\n System.out.println(\"PostDAO: getting posts\");\n } catch(Exception e) {\n System.out.println(\"PostDAO: unsuccessful query\");\n System.out.println(e);\n }\n return result;\n }",
"protected void queryPosts()\n {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.whereEqualTo(Post.KEY_USER, ParseUser.getCurrentUser());\n query.setLimit(20);\n query.addDescendingOrder(Post.KEY_CREATED_AT);\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e)\n {\n if(e != null)\n {\n Log.e(TAG, \"Issue with getting posts\", e);\n }\n for(Post post : posts)\n {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username\" + post.getUser().getUsername());\n }\n adapter.clear();\n allPosts.addAll(posts);\n swipeContainer.setRefreshing(false);\n adapter.notifyDataSetChanged();\n\n }\n });\n }",
"public Collection getPosts() throws DatabaseException;",
"@Override\r\n\tpublic List<Post> getAllPost() {\n\t\tString hql = \"from Post\";\r\n\t\treturn (List<Post>) getHibernateTemplate().find(hql);\r\n\t}",
"protected void populateFeed() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.addDescendingOrder(Post.CREATED_AT);\n query.setLimit(20);\n query.findInBackground(new FindCallback<Post>() {\n // Result of the call to Parse\n @Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n posts.addAll(queryPosts);\n adapter.notifyDataSetChanged();\n }\n });\n }",
"@Override\r\n\tpublic List<Post> hotPosts() {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tList<Post> list=new ArrayList<Post>();\r\n\t\treturn postDao.hotPosts();\r\n\t\t\r\n\t}",
"public ArrayList<Post> viewAllPosts()\n\n {\n postList = new ArrayList<Post>();\n\n try\n {\n database = dbH.getReadableDatabase();\n dbH.openDataBase();\n String query = \"SELECT * FROM Post WHERE 1\";\n Cursor c = database.rawQuery(query, null);\n if (c.moveToFirst())\n {\n do\n {\n Post post = new Post();\n post.setPostBody(c.getString(c.getColumnIndex(\"postBody\")));\n post.setPostedBy(c.getString(c.getColumnIndex(\"postedBy\")));\n post.setPostedAt(c.getString(c.getColumnIndex(\"postedAt\")));\n post.setPostID(Integer.valueOf(c.getString(c.getColumnIndex(\"postID\"))));\n post.setBitmap(c.getString(c.getColumnIndex(\"image\")));\n\n postList.add(post);\n } while (c.moveToNext());\n }\n\n else\n {\n Log.i(TAG, \"There are no posts in the DB.\");\n }\n c.close();\n dbH.close();\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n return postList;\n }",
"private void loadPosts(final List<AnipalAbstractPost> posts){\n Query q1 = FirebaseDatabase.getInstance().getReference(\"UserPosts\")\n .child(MainActivity.currentUser.getUserUUID()).orderByChild(\"timestamp\")\n .limitToLast(5);\n q1.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n AnipalAbstractPost post ;\n for(DataSnapshot snap : dataSnapshot.getChildren()){\n if(snap.hasChild(\"photoURL\")){\n // Photo post\n post = snap.getValue(AnipalPhotoPost.class);\n post.findUser(post.getUserUUID());\n }else{\n // Donation post\n post = snap.getValue(AnipalDonationPost.class);\n post.findUser(post.getUserUUID());\n }\n posts.add(post);\n }\n\n Collections.reverse(posts);\n postAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }",
"public Page<Post> getNewPosts(){\n Pageable page = new PageRequest(0, 3, Sort.Direction.DESC, \"createdAt\");\n System.out.println(\"getNewPosts\");\n // Page<Post> posts = postRepository.findTop10OrderByCreatedAtOrderByCreatedAtDesc(page);\n // List<Post> p = postRepository.getNewestPosts();\n\n Page<Post> pp = postRepository.findAll(page);\n\n for (Post p :pp){\n logger.info(\"getNewPosts -> \" + p);\n }\n return pp;\n/* for (Post p :posts){\n System.out.println(\"p->\" + p);\n }\n if (posts != null)\n return posts;\n return null;*/\n }",
"@Override\r\n public List<Post> findAll() {\r\n List<Post> posts = new ArrayList<>();\r\n List<Map<String, Object>> rows = jdbcOp.queryForList(SQL_SELECT_ALL_TICKET);\r\n\r\n for (Map<String, Object> row : rows) {\r\n Post post = new Post();\r\n \r\n int id = (int)row.get(\"id\");\r\n post.setId(id); \r\n \r\n String customername = (String)row.get(\"customername\");\r\n post.setCustomerName(customername); \r\n \r\n String subject = (String)row.get(\"subject\");\r\n post.setSubject(subject);\r\n \r\n String body = (String)row.get(\"body\");\r\n post.setBody(body);\r\n \r\n String categories = (String)row.get(\"categories\");\r\n post.setCategories(categories);\r\n \r\n posts.add(post);\r\n }\r\n return posts;\r\n }",
"public Iterable<Post> listAllPosts();",
"@Override\n protected void queryPosts() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.whereEqualTo(Post.KEY_USER, ParseUser.getCurrentUser());\n Log.d(TAG, \"ParseUser\" + ParseUser.getCurrentUser().toString());\n query.setLimit(20);\n query.addDescendingOrder(Post.KEY_CREATED_AT);\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null){\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n for (Post post: posts){\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }\n });\n }",
"public void initAllPosts(){\n\t\tdbAdapter = new DBAdapter(getActivity());\n\t\tdbAdapter.open();\n\t\tCursor c = dbAdapter.getAllPosts();\n\t\tSimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(\n\t\t\t\tgetActivity(), R.layout.postitem, c, new String[] {\n\t\t\t\t\t\t\"titel\", \"dato\", \"beloeb\" }, new int[] { R.id.titel,\n\t\t\t\t\t\tR.id.dato, R.id.beloeb});\n\t\tsetListAdapter(cursorAdapter);\n\t\t\n\t}",
"@Override\r\n\tpublic List<Post> latastPosts(int bankuaihao) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tList<Post> list=new ArrayList<Post>();\r\n\t\treturn postDao.latastPosts(bankuaihao);\r\n\t\t\r\n\t}",
"private void readPosts() {\n FirebaseDatabase.getInstance().getReference().child(\"Posts\").addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n postList.clear();\n for(DataSnapshot dataSnapshot:snapshot.getChildren())\n {\n Post post = dataSnapshot.getValue(Post.class);\n for(String id : followingList)\n {\n if(post.getPublisher().equals(id))\n {\n postList.add(post);\n }\n }\n }\n postAdapter.notifyDataSetChanged();\n\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n }",
"private void queryPost() {\n tv_search.setText(\"Recently Added Posts:\");\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.setLimit(15);\n query.addDescendingOrder(Post.KEY_CREATED);\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e) {\n if(e!= null){\n Log.e(tag, \"Issue with getting post\", e);\n return;\n }\n adaptor.clear();\n adaptor.addAll(posts);\n //allPost.addAll(posts);\n //adaptor.notifyDataSetChanged();\n //swipeRefreshLayout.setRefreshing(false);\n\n //user just created a post\n if (isJustCreatedNewPost == true)\n {\n //reset bool\n isJustCreatedNewPost = false;\n// //subscribe user to their new post channel\n// String postChannel = \"POST_\"+posts.get(0).getObjectId();\n// ParsePush.subscribeInBackground(postChannel);\n\n }\n }\n });\n }",
"@GetMapping(\"/feed\")\n private ResponseEntity<List<Post>> getPosts() {\n User user = getCurrentUser();\n logger.info(\"Not null \" + (user == null));\n List<Post> posts = postService.findAllByUser(user);\n return new ResponseEntity<>(posts, HttpStatus.OK);\n }",
"void displayAllPosts();",
"List<Post> findAllPosts();",
"@Override\n\tpublic void getAll() {\n\t\tArrayList<Post> list = new ArrayList<Post>();\n\t\tlist = dao.selectAll();\n\t\t\n\t\tfor (Post p : list) {\n\t\t\tSystem.out.println(p.getPostId() + \".\" + p.getPostName() + \" 작성자:\" + p.getMemberId());\n\t\t}\n\t}",
"public List<Post> all() throws DataAccessException{\n String sql = \"select posts.id, posts.user_id, users.name, posts.title, posts.content, posts.create_date from posts join users on posts.user_id=users.id\";\n List<Post> posts = this.jdbcTemplate.query(sql, mapper);\n return posts;\n }",
"private void fetchMorePosts() {\n long lastPostTimestamp = prismPostArrayList.get(prismPostArrayList.size() - 1).getTimestamp();\n //toast(\"Fetching more pics\");\n databaseReferenceAllPosts\n .orderByChild(Key.POST_TIMESTAMP)\n .startAt(lastPostTimestamp + 1)\n .limitToFirst(Default.IMAGE_LOAD_COUNT)\n .addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) {\n PrismPost prismPost = Helper.constructPrismPostObject(postSnapshot);\n prismPostArrayList.add(prismPost);\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (prismPostArrayList.size() > 0) {\n mainContentRecyclerViewAdapter\n .notifyItemInserted(prismPostArrayList.size());\n }\n }\n });\n\n }\n populateUserDetailsForAllPosts(false);\n } else {\n Log.i(Default.TAG_DB, Message.NO_DATA);\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Log.e(Default.TAG_DB, databaseError.getMessage(), databaseError.toException());\n }\n });\n }",
"@GetMapping(\"\")\n public ResponseEntity <List<Post>>listAllPosts() {\n return ResponseEntity.ok(postService.listAllPosts());\n }",
"public ArrayList<String> loadPosts() {\n\t\tSAVE_FILE = PUSH_POSTS;\n\t\tArrayList<String> posts = loadIds();\n\t\treturn posts;\n\t}",
"@Inject\n public LocalApiImpl() {\n entityList= new ArrayList<>();\n for (int i=0; i<10; i++){\n PostEntity postEntity = new PostEntity();\n postEntity.setPostId(i);\n entityList.add(postEntity);\n }\n }",
"public void setPosts(List<Post> posts){\n this.posts = posts;\n }",
"public synchronized List<Post> getGroupPostsWithMoreInfo(int count, int start) {\n try {\n this.connect();\n Group.GroupPosts groupPosts = linkedin.restOperations().getForObject(\n \"http://api.linkedin.com/v1/groups/{group-id}/posts\" +\n \":(creation-timestamp,title,summary,id,\" +\n \"creator:(first-name,last-name))?\" +\n \"count=\" + count +\n \"&start=\" + start +\n \"&order=recency\",\n Group.GroupPosts.class, groupId);\n return groupPosts.getPosts();\n } catch (Exception e) {\n log.debug(\"Exception occured when reading posts from group: \" + groupId);\n }\n return null;\n }",
"@Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n\n adapter.clear();\n adapter.addAll(queryPosts);\n }",
"public ArrayList<AshirBlogPostingHelper> getAllPots() {\n String query = \"SELECT * FROM \" + NAME_OF_TABLE;\n ArrayList<AshirBlogPostingHelper> ashirPostsList = new ArrayList<AshirBlogPostingHelper>();\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(query, null);\n if (c != null) {\n while (c.moveToNext()) {\n String post = c.getString(c.getColumnIndex(Col_2));\n try {\n byte[] getImageFromDb = c.getBlob(c.getColumnIndex(Col_3));\n AshirBlogPostingHelper postHelper = new AshirBlogPostingHelper();\n\n postHelper.setDataPost(post);\n postHelper.setImage(getImageFromDb);\n\n ashirPostsList.add(postHelper);\n }catch (Exception e){\n e.printStackTrace();\n }\n }\n }\n\n db.close();\n return ashirPostsList;\n\n }",
"public int getNumberOfPosts() throws DatabaseException;",
"@Override\r\n\tpublic List<Post> relatedPosts(int bankuaihao) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tList<Post> list=new ArrayList<Post>();\r\n\t\treturn postDao.relatedPosts(bankuaihao);\r\n\t\r\n\t}",
"public ArrayList<PostInfo> getPost() throws SQLException {\n ArrayList<PostInfo> postInfoList = new ArrayList<>();\n String sql = \"SELECT * FROM `post` WHERE `status` = 1 ORDER BY `post_time` DESC\";\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n postInfoList.add(new PostInfo(resultSet.getInt(\"post_id\"), resultSet.getInt(\"place_id\"), resultSet.getString(\"post_text\"),\n resultSet.getDate(\"post_time\"), resultSet.getInt(\"status\"), resultSet.getInt(\"user_id\"), resultSet.getInt(\"editor_id\")));\n }\n return postInfoList;\n }",
"@Override\n public int getItemCount() {\n return posts.size();\n }",
"@Override\n public int getItemCount() {\n return posts.size();\n }",
"public List<PostEntry> findList(String username){\n Connection c = null;\n PreparedStatement ps = null;\n ResultSet rs = null; \n\n List<PostEntry> data = new ArrayList<PostEntry>();\n try {\n //Get connection\n c = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/CS144\", \"cs144\", \"\");\n\n //Prepare statement\n ps = c.prepareStatement(\"SELECT * FROM Posts WHERE username=?\");\n ps.setString(1, username);\n\n rs = ps.executeQuery();\n\n //set in data if exists: ASSUMES there is only one response\n while(rs.next()){\n String title = rs.getString(\"title\");\n Timestamp created = rs.getTimestamp(\"created\");\n Timestamp modified = rs.getTimestamp(\"modified\");\n int postid = rs.getInt(\"postid\"); //conversion to string, need to convert back\n \n PostEntry pe = new PostEntry(title, created, modified, postid);\n\n data.add(pe);\n }\n\n } catch(SQLException e){\n //error handling\n System.out.println(\"SQLException caught.\");\n e.printStackTrace();\n } finally {\n //just need to close all\n try { rs.close(); } catch (Exception e) { /* ignored */ }\n try { ps.close(); } catch (Exception e) { /* ignored */ }\n try { c.close(); } catch (Exception e) { /* ignored */ }\n }\n\n return data;\n }",
"@Override\n\tpublic List<Post> getRecentPostsForUser(String arg0, int arg1)\n\t\t\tthrows Exception {\n\t\treturn null;\n\t}",
"public List<Post> getAllPublic() throws SQLException {\r\n\tString sql = \"SELECT * FROM posts WHERE isPublic = 1 ORDER BY date DESC LIMIT ?\";\r\n\tPreparedStatement st = db.prepareStatement(sql);\r\n\tst.setQueryTimeout(TIMEOUT);\r\n\tst.setInt(1, LIMIT);\r\n\t\r\n\tResultSet results = st.executeQuery();\r\n\tList<Post> parsed = parseResults(results);\r\n\treturn parsed;\r\n }",
"@Test(expected = IndexOutOfBoundsException.class)\r\n public void fetchAllPosts(){\r\n \r\n List<Post> listOfPosts = entityManager.createNamedQuery(\"Post.fetchAllRecords\").getResultList();\r\n \r\n assertTrue(\"Size is always greater than 0.\", listOfPosts.size() > 0);\r\n assertNotNull(\"List object is not null\", listOfPosts);\r\n assertEquals(\"Size should be 3\", listOfPosts.size(),3);\r\n \r\n assertEquals(\"PEOPLE ARE BAD AT TAKING OVER FROM AUTONOMOUS CARS.\", listOfPosts.get(5));\r\n \r\n }",
"@Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n posts.addAll(queryPosts);\n adapter.notifyDataSetChanged();\n }",
"public List<Post> getPosts(){return this.posts;}",
"public interface PostlinksDao {\n List<PostLink> queryAll(@Param(\"offset\")int offset, @Param(\"limit\")int limit);\n int insertPostLink(PostLink postlink);\n}",
"@Override\r\n\tpublic List<Post> refreshResult() {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tList<Post> list=new ArrayList<Post>();\r\n\t\treturn postDao.refreshResult();\r\n\t\t\r\n\t}",
"@GET(\"/auth/api/v1/user/{id}/post/list?\")\n Call<JsonObject> fetchAllPost(@Path(\"id\") String id,@Query(\"api_token\") String token);",
"@Override\n public List<Post> postList() {\n List<Post> savedPosts = (List<Post>) postRepository.findAll();\n Set<Long> userIdList = savedPosts.stream().map(Post::getUserId).collect(Collectors.toSet());\n\n User[] rateResponse = sender.getUsersByUserId(userIdList);\n\n HashMap<Long, User> userHashMap = new LinkedHashMap<>();\n for (User user : rateResponse) {\n userHashMap.put(user.getUserId(), user);\n }\n for (Post savedPost : savedPosts) {\n savedPost.setUser(userHashMap.get(savedPost.getUserId()));\n }\n return savedPosts;\n }",
"public List<Post> findPostsForUser(Integer i) {\n\t\tSession session;\n\t\ttry {\n\t\t\tsession = sessfact.getCurrentSession();\n\t\t} catch (HibernateException e) {\n\t\t\tsession = sessfact.openSession();\n\t\t}\n\t\tTransaction trans = session.beginTransaction();\n\t\tList<Post> list = session.createQuery(\"from Post where user_id =\" + i, Post.class).list();\n\t\ttrans.commit();\n\t\treturn list;\n\n\t}",
"public List getAllBlogPosts(){\n return blogPostFacade.findAll();\n }",
"@Override\n public ArrayList<PostVo> get_post_by_page(int page) {\n ArrayList<PostVo> posts = (ArrayList<PostVo>) baseDAO.findBySQLForVO(\"\" +\n \"select p.p_id as pId , p.p_floor as pFloor , p.p_main as pMain , p.p_title as pTitle\" +\n \" , u.u_name as uName from Post as p join user as u on p.u_id = u.u_id \"\n ,PostVo.class,null,10*(page-1),10);\n return posts;\n }",
"private void refreshFeed() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.addDescendingOrder(\"createdAt\");\n query.setLimit(20);\n query.findInBackground(new FindCallback<Post>() {\n // Result of the call to Parse\n @Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n\n adapter.clear();\n adapter.addAll(queryPosts);\n }\n });\n }",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"issue with getting posts\", e);\n return;\n }\n //iterate through each post and log each of them\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \" \" + post.getUser().getUsername());\n }\n //clear here before adding posts\n mAllPosts.clear();\n mAllPosts.addAll(posts);\n mAdapter.notifyDataSetChanged();\n mSwipeContainer.setRefreshing(false);\n }",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"issue with getting posts\", e);\n return;\n }\n //iterate through each post and log each of them\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \" \" + post.getUser().getUsername());\n }\n //clear here before adding posts\n mAllPosts.clear();\n mAllPosts.addAll(posts);\n mAdapter.notifyDataSetChanged();\n mSwipeContainer.setRefreshing(false);\n }",
"public synchronized List<Post> getPosts(int groupId) {\n try {\n this.connect();\n return linkedin.groupOperations().getPosts(groupId).getPosts();\n } catch (Exception e) {\n log.debug(\"Exception occured when reading posts from group: \" + groupId);\n }\n return null;\n }",
"public Iterable<Post> findAll(){\n return postDao.findAll();\n }",
"private List<Text> getPosts() {\n\t\tList<Text> result = new ArrayList<>();\n\t\tObservableList<Post> postList = PostDAO.searchPosts(String.valueOf(friendsID));\n\t\tfor(Post post : postList) {\n\t\t\tString postTime = post.getPostTime();\n\t\t\tString content = post.getPostContent();\n\t\t\tString editTime = post.getEditTime();\n\t\t\tString toPost;\n\t\t\tif(editTime != null) {\n\t\t\t\ttoPost = \"Post on \" + postTime + \" Last edit on \" + editTime + \"\\n\" + content + \"\\n\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttoPost = \"Post on \" + postTime + \"\\n\" + content + \"\\n\";\n\t\t\t}\n\t\t\tText text = new Text(toPost);\n\t\t\tresult.add(text);\n\t\t}\n\t\treturn result;\n\t}",
"@RequestMapping(value = {\"/fpost/list\"}, method = RequestMethod.GET)\r\n\tpublic ResponseEntity<List<Fpost>> fetchAllFposts() {\r\n\t\tSystem.out.println(\"fetching list of all fposts\");\r\n\t\tList<Fpost> fpost = fpostDAO.list();\r\n\t\treturn new ResponseEntity<List<Fpost>>(fpost, HttpStatus.OK);\r\n\t}",
"@RequestMapping(value = \"fetch-health-tips\", method = RequestMethod.POST)\n private List<HealthPost> fetchHealthTips() {\n SessionService.sessionBuilder(session -> {\n healthPostList = session.createQuery(\"from HealthPost order by id desc\", HealthPost.class).list();\n });\n return healthPostList;\n }",
"@Override\n public List<Post> refresh() {\n try {\n this.posts = manager.refreshFeed(this.user.getEmail());\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n return posts;\n }",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n if (posts.size() == 0) {\n Toast.makeText(getContext(), \"You've reached the end of all posts!\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }",
"public List<User> getUsersByNumberOfPosts(int N);",
"public void initPosPosts(){\n\t\tdbAdapter = new DBAdapter(getActivity());\n\t\tdbAdapter.open();\n\t\tCursor c = dbAdapter.getPosPosts();\n\t\tSimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(\n\t\t\t\tgetActivity(), R.layout.postitem, c, new String[] {\n\t\t\t\t\t\t\"titel\", \"dato\", \"beloeb\" }, new int[] { R.id.titel,\n\t\t\t\t\t\tR.id.dato, R.id.beloeb});\n\t\tsetListAdapter(cursorAdapter);\n\t}",
"public List<Posts> listPosts() {\n\t\treturn this.findAll();\n\t}",
"List<Post> findAll();",
"@GetMapping(\"posts\")\n\tpublic List<Post> index() {\n\t\treturn postSvc.index();\n\t}",
"public List<?> getPosts(long organizationid) {\n\t\t \n\t\tList<?> postsList = null;\n\t\tCriteria query = null;\n\t\ttry { \n\t\t\tquery = getCurrentSession().createCriteria(Post.class); \n\t\t\t//aliases\n\t\t\tquery.createAlias(\"this.orgperson\", \"author\")\n\t\t\t\t .createAlias(\"author.organizationid\", \"organization\")\n\t\t\t\t .createAlias(\"author.personid\", \"orgperson\");\n\t\t\t//restrictions\n\t\t\tquery.add(Restrictions.eq(\"this.status\", \"A\"))\n\t\t\t\t .add(Restrictions.eq(\"author.orgpersonstatus\", 'A'))\n\t\t\t\t .add(Restrictions.eq(\"orgperson.personstatus\", 'A'))\n\t\t\t\t .add(Restrictions.eq(\"organization.organizationid\", organizationid)); \n\t\t\t\n\t\t\t\n\t\t\tquery.setProjection(Projections.projectionList()\n\t\t\t\t\t//post projections\n\t\t\t\t\t.add(Projections.distinct(Projections.property(\"this.id\").as(\"id\")))\n\t\t\t\t\t.add(Projections.property(\"this.bannerpath\").as(\"bannerpath\"))\n\t\t\t\t\t.add(Projections.property(\"this.commentable\").as(\"commentable\"))\n\t\t\t\t\t.add(Projections.property(\"this.content\").as(\"content\"))\n\t\t\t\t\t.add(Projections.property(\"this.date\").as(\"date\"))\n\t\t\t\t\t.add(Projections.property(\"this.media\").as(\"media\"))\n\t\t\t\t\t.add(Projections.property(\"this.status\").as(\"status\"))\n\t\t\t\t\t.add(Projections.property(\"this.title\").as(\"title\"))\n\t\t\t\t\t\n\t\t\t\t\t//author projections\n\t\t\t\t\t.add(Projections.property(\"author.orgpersonid\").as(\"authororgpersonid\")) \n\t\t\t\t\t.add(Projections.property(\"author.orgpersonstatus\").as(\"authororgpersonstatus\"))\n\t\t\t\t\t\n\t\t\t\t\t.add(Projections.property(\"orgperson.personid\").as(\"orgpersonId\"))\n\t\t\t\t\t.add(Projections.property(\"orgperson.firstName\").as(\"orgpersonFirstName\"))\n\t\t\t\t\t.add(Projections.property(\"orgperson.lastName\").as(\"orgpersonLastName\"))\n\t\t\t\t\t.add(Projections.property(\"orgperson.middleName\").as(\"orgpersonMiddleName\"))\n\t\t\t\t\t.add(Projections.property(\"orgperson.personphotourl\").as(\"orgpersonPhotourl\")) \n\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t \n\t\t\tOrder order = Order.desc(\"this.date\");\n\t\t\tquery.addOrder(order);\n\t\t\tpostsList = query.setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP).list(); \n\t\t\t \n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tpostServiceLogger.error(\"error in PostService for getPosts()\",e);\n\t\t}\n\t\treturn postsList;\n\t}",
"@GetMapping(\"/allUsersPosts\")\n public ResponseEntity<List<PostResource>> retrieveAllPostsForAllUsers() {\n //first we will retrieve all users to get their ids\n List<Long> userIds = externalService.retrieveAllUserIds();\n\n //then we will search for every post based on userId\n List<PostResource> postResources = new ArrayList<>();\n for (Long userId : userIds) {\n postResources.addAll(externalService.retrievePostsForUser(userId));\n }\n\n return new ResponseEntity<>(postResources, HttpStatus.ACCEPTED);\n }",
"public List<Post> search(PostCriteria criteria, int page, int size);",
"List<Post> getPostForUser(String email) throws Exception;",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n adapter.clear();\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }",
"public List<Post> findAll() {\n\t\tSession session;\n\t\ttry {\n\t\t\tsession = sessfact.getCurrentSession();\n\t\t} catch (HibernateException e) {\n\t\t\tsession = sessfact.openSession();\n\t\t}\n\t\tTransaction trans = session.beginTransaction();\n\t\tList<Post> list = session.createQuery(\"from Post\", Post.class).list();\n\t\ttrans.commit();\n\n\t\treturn list;\n\t}",
"public Collection getPosts_fromIDRange(int fromID, int toID)\r\n throws IllegalArgumentException, DatabaseException;",
"public List<detailsofpassengerpost> seedetailslist() throws IOException{\n//connect database\nString resource = \"orm/configuration.xml\";\nReader reader = Resources.getResourceAsReader(resource);\nSqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);\nSqlSession session = sessionFactory.openSession();\n\ntry{\n\tSystem.out.println(\"postID in seeDetails=\"+postID);\npostlist=session.selectList(\"selectPassengerPostByID\",postID);\nSystem.out.println(\"postlist size in seeDetails=\"+postlist.size());\n\n//find passenger's name through his email address\nnumberofapplieddrivers=postlist.get(0).getNumberofapplieddrivers();\npassengeremail=postlist.get(0).getEmail();\npassengerlist=session.selectList(\"selectuserbyemail\", passengeremail);\n\npassengername=passengerlist.get(0).getName();\npassengersex=passengerlist.get(0).getSex();\npassengerdob=passengerlist.get(0).getDob();\n\ndd=new detailsofpassengerpost();\ndetaillist=new ArrayList<detailsofpassengerpost>();\n\ndd.setNeedseats(postlist.get(0).getNeedseats());\ndd.setExpectedcartype(postlist.get(0).getExpectedcartype());\ndd.setDeparture(postlist.get(0).getDeparture());\ndd.setDeparturedate(postlist.get(0).getDeparturedate());\ndd.setDestination(postlist.get(0).getDestination());\ndd.setDob(passengerdob);\ndd.setEmail(passengeremail);\ndd.setEstimatedleavingtime(postlist.get(0).getEstimatedleavingtime());\ndd.setExpectedcost(postlist.get(0).getExpectedcost());\ndd.setMemo(postlist.get(0).getMemo());\ndd.setName(passengername);\ndd.setPostID(postID);\ndd.setSex(passengersex);\ndd.setPhone(postlist.get(0).getPhone());\ndd.setNumberofapplieddrivers(numberofapplieddrivers);\ndetaillist.add(dd);\n\nreturn detaillist;\n\n}finally{\nsession.close();\n}\n}",
"public static Result posts() {\n\t\tPost post = new Post();\n\t\tUser user = UserController.loggedInUser();\n\t\tif (user != null) {\n\t\t\tpost.city= user.city;\n\t\t\tpost.state = user.state;\n\t\t\tpost.country = user.country;\n\t\t\tpost.zipcode = user.zipcode;\n\t\t\tpost.createdBy = user.userName;\t\t\t\n\t\t}\n\t\t//TODO:Use bind() instead of the above to avoid 0.0 in price field\n\t\treturn ok(index.render(Post.listPosts(), form(Post.class).fill(post), user));\n\t}",
"private static List<Post> parseResults(ResultSet results) throws SQLException {\r\n\tList<Post> postList = new LinkedList<Post>();\r\n\r\n\twhile (results.next()) {\r\n\t Post p = new Post();\r\n\r\n\t p.id = results.getInt(\"id\");\r\n\t p.author = results.getString(\"author\");\r\n\t \r\n\t long date = results.getInt(\"date\") * 1000L; // milliseconds\r\n\t p.date = new Date(date);\r\n\t \r\n\t p.isPublic = results.getInt(\"isPublic\") == 1;\r\n\t p.setContent(results.getString(\"content\"));\r\n\r\n\t postList.add(p);\r\n\t}\r\n\r\n\treturn postList;\r\n }",
"@GetMapping(value=\"/allstorys\")\n\tpublic @ResponseBody List<Story> selectAllPosts() {\n\t\tloggy.info(\"List of all Stories pulled from the database\");\n\t\treturn storyServ.selectAllStories();\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<Post> getPostsOf(int postId){\n \t\tList<Post> postList = null;\n\t\tCriteria query = null;\n\t\ttry {\n\t\t\t\n\t\t\t query = getCurrentSession().createCriteria(Post.class);\n\t\t\t \n\t\t\t query.createAlias(\"this.orgperson\", \"author\") \n\t\t\t .createAlias(\"author.personid\",\"authorPerson\")\n\t\t\t \t .createAlias(\"this.postcategories\", \"postcategories\")\n\t\t\t \t .createAlias(\"postcategories.category\", \"category\")\n\t\t\t \t .createAlias(\"this.postskills\", \"postskills\")\n\t\t\t \t .createAlias(\"postskills.skill\", \"skill\")\n\t\t\t \t .createAlias(\"this.posttags\", \"posttags\")\n\t\t\t \t .createAlias(\"posttags.tag\", \"tag\");\n\t\t\t \n\t\t\t query.add(Restrictions.eq(\"this.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"author.orgpersonstatus\", 'A'))\n\t\t\t \t .add(Restrictions.eq(\"authorPerson.personstatus\", 'A'))\n\t\t\t \t .add(Restrictions.eq(\"postcategories.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"category.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"postskills.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"skill.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"posttags.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"tag.status\", \"A\")) \n\t\t\t \t .add(Restrictions.eq(\"this.id\", postId));\n\t\t\t \n\t\t\t query.setProjection(Projections.projectionList()\n\t\t\t\t\t \n\t\t\t\t\t //post\n\t\t\t\t\t .add(Projections.property(\"this.id\").as(\"post_id\"))\n\t\t\t\t\t .add(Projections.property(\"this.title\").as(\"post_title\"))\n\t\t\t\t\t .add(Projections.property(\"this.content\").as(\"post_content\")) \n\t\t\t\t\t .add(Projections.property(\"this.bannerpath\").as(\"post_bannerpath\"))\n\t\t\t\t\t .add(Projections.property(\"this.commentable\").as(\"post_commentable\"))\n\t\t\t\t\t .add(Projections.property(\"this.date\").as(\"post_date\"))\n\t\t\t\t\t .add(Projections.property(\"this.media\").as(\"post_media\")) \n\t\t\t\t\t .add(Projections.property(\"this.status\").as(\"post_status\")) \n\t\t\t\t\t //authorperson\n\t\t\t\t\t .add(Projections.property(\"authorPerson.personid\").as(\"authorPersonPersonId\"))\n\t\t\t\t\t .add(Projections.property(\"authorPerson.firstName\").as(\"authorPersonFirstName\"))\n\t\t\t\t\t .add(Projections.property(\"authorPerson.lastName\").as(\"authorPersonLastName\"))\n\t\t\t\t\t .add(Projections.property(\"authorPerson.middleName\").as(\"authorPersonmiddleName\")) \n\t\t\t\t\t //category\n\t\t\t\t\t .add(Projections.property(\"category.id\").as(\"categoryId\")) \n\t\t\t\t\t .add(Projections.property(\"category.name\").as(\"categoryName\")) \n\t\t\t\t\t //skill\n\t\t\t\t\t .add(Projections.property(\"skill.id\").as(\"skillId\")) \n\t\t\t\t\t .add(Projections.property(\"skill.name\").as(\"skillName\")) \n\t\t\t\t\t//tag\n\t\t\t\t\t .add(Projections.property(\"tag.id\").as(\"tagId\")) \n\t\t\t\t\t .add(Projections.property(\"tag.name\").as(\"tagName\")) \n\t\t\t\t\t \n\t\t\t\t\t ); \n\t\t\t \n\t\t\t postList = query.setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP).list(); \n\t\t\t \t \t \n\t\t} catch (Exception e) {\n\t\t\tpostServiceLogger.error(\"error in PostService for getPostsOf()\",e);\n\t\t} \n\t\treturn postList;\n\t}",
"public List getUnfinishedPostList(Object obj) throws SQLException {\n\t\treturn dao.getUnfinishedPostList(obj);\n\t}",
"@Override\n public void onRefresh() {\n fetchPosts();\n }",
"public void initNegPosts(){\n\t\t\tdbAdapter = new DBAdapter(getActivity());\n\t\t\tdbAdapter.open();\n\t\t\tCursor c = dbAdapter.getNegPosts();\n\t\t\tSimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(\n\t\t\t\t\tgetActivity(), R.layout.postitem, c, new String[] {\n\t\t\t\t\t\t\t\"titel\", \"dato\", \"beloeb\" }, new int[] { R.id.titel,\n\t\t\t\t\t\t\tR.id.dato, R.id.beloeb});\n\t\t\tsetListAdapter(cursorAdapter);\n\t\t}",
"@Override\n public int getItemCount() {\n return blogArrayList.size();\n }",
"@Override\n\tpublic void onLoadMore() {\n\t\tLog.d(\"load\", \"\");\n\t\tcurrentPage++;\n\t\tmodel.getPostsByType(userId, currentPage, method, postListiner);\n\t}",
"public static ArrayList<Post> ParsePosts(JSONObject jsonTotalObject)\n {\n ArrayList<Post> posts = new ArrayList<>();\n try\n {\n JSONArray postArray = jsonTotalObject.getJSONArray(\"posts\");\n for(int i = 0 ;i<postArray.length();i++)\n {\n JSONObject object = postArray.getJSONObject(i);\n Post post = new Post();\n // Notice,use \"opt\" instead of \"get\" to avoid null value exception\n post.setTitle(object.optString(\"title\"));\n post.setId(object.optInt(\"id\"));\n post.setThumbnailUrl(Settings.DEFAULT_THUMBNAIL_URL);\n post.setUrl(object.optString(\"url\"));\n // Set to zero if there's no comment.\n post.setCommentCount(object.optInt(\"comment_count\", 0));\n post.setDate(object.optString(\"date\", \"N/A\"));\n post.setExcerpt(object.optString(\"excerpt\",\"N/A\"));\n post.setContent(object.optString(\"content\",\"N/A\"));\n // Care that author is not a String,it is a JSONObject\n JSONObject author = object.getJSONObject(\"author\");\n post.setAuthor(author.optString(\"name\", \"N/A\"));\n // if the post has it's thumbnail image,use it,or just keep default\n JSONObject featuredImages = object.optJSONObject(\"thumbnail_images\");\n if(featuredImages != null)\n {\n post.setFeaturedImageUrl(featuredImages.optJSONObject(\"full\")\n .optString(\"url\", Settings.DEFAULT_THUMBNAIL_URL));\n }\n posts.add(post);\n }\n return posts;\n }\n catch (JSONException e)\n {\n Log.e(TAG,\"JSONException when loading Posts\",e);\n e.printStackTrace();\n return null;\n }\n }",
"@Override\r\n\tpublic List<JobPostDTO> retrieveAllJobPost(List<DropDownDTO> companyList,\r\n\t\t\tint offset, int noOfRecords, String sortBy) {\r\n\t\treturn employerJobPostDAO.retrieveAllJobPost(\r\n\t\t\t\tcompanyList, offset, noOfRecords, sortBy);\r\n\t}",
"private JSONArray getBlogItems(){\n String reqUrl = \"https://www.tistory.com/apis/post/list\";\n String data = String.format(\"access_token=%s&output=%s&blogName=%s&count=%d\"\n ,blog.getAccess_token(),\"json\",blog.getBlogName(),itemCnt);\n try{\n HttpURLConnection conn = initConnGET(reqUrl,data);\n StringBuilder builder = new StringBuilder();\n String line = \"\";\n if (conn.getResponseCode() == conn.HTTP_OK) {\n InputStreamReader isr = new InputStreamReader(conn.getInputStream(), \"UTF-8\");\n BufferedReader reader = new BufferedReader(isr);\n while ((line = reader.readLine()) != null) {\n builder.append(line);\n }\n reader.close();\n }\n conn.disconnect();\n JSONArray items = new JSONObject(builder.toString())\n .getJSONObject(\"tistory\")\n .getJSONObject(\"item\")\n .getJSONArray(\"posts\");\n return items;\n }catch(Exception err){\n return null;\n }\n }",
"public List<Post> getCreatedPosts() {\n return createdPosts;\n }",
"public ArrayList DataPost() {\r\n query = \"SELECT * from tbl_postingan_user\";\r\n hasil = dbConn.executeQuery(query, true);\r\n \r\n if (hasil){\r\n rsData = dbConn.getRs();\r\n listdata = new ArrayList <DataPosting>();\r\n try{ \r\n while(rsData.next()){\r\n DataPosting datapost=new DataPosting();\r\n datapost.setDataid_posting(rsData.getInt(1));\r\n datapost.setDataid_admin(rsData.getInt(2));\r\n datapost.setDataJudulPosting(rsData.getString(3));\r\n datapost.setDatadeskripsi(rsData.getString(4));\r\n datapost.setDatapays(rsData.getString(5));\r\n datapost.setDatacilent(rsData.getString(6));\r\n datapost.setDatanamaperusahaan(rsData.getString(7));\r\n datapost.setDatalocation(rsData.getString(8));\r\n datapost.setDataemail(rsData.getString(9));\r\n datapost.setDatacontact(rsData.getString(10));\r\n datapost.setDatadeadline(rsData.getString(11));\r\n datapost.setDatagambar(rsData.getString(12));\r\n// datapost.setDatadeskripsi(rsData.getString(\"deadline\"));\r\n \r\n listdata.add(datapost);\r\n }\r\n rsData.close();\r\n return listdata;\r\n }\r\n catch(SQLException ex){\r\n System.out.println(\"Terjadi Kesalahan Saat menampilkan Post User\");\r\n return null;\r\n }\r\n \r\n } \r\n return null;\r\n}",
"@Override\n protected void loadNextDataFromApi(int page) {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.whereEqualTo(Post.KEY_USER, ParseUser.getCurrentUser());\n query.setLimit(POST_LIMIT);\n query.setSkip(POST_LIMIT*page);\n query.addDescendingOrder(Post.KEY_CREATED_AT);\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null){\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n for (Post post: posts){\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }\n });\n\n\n }",
"public void readTable() throws SQLException\n\t{\n\t\tStatement stm = conn.createStatement();\n\t\tResultSet rs = stm.executeQuery(READ_QUERY);\n\t\t\n\t\twhile(rs.next())\n\t\t{\n\t\t\tWPPost post = new WPPost(rs.getInt(ID), rs.getInt(POST_AUTHOR), rs.getTimestamp(POST_DATE),\n\t\t\t\t\trs.getTimestamp(POST_DATE_GMT), rs.getString(POST_CONTENT), rs.getString(POST_TITLE), \n\t\t\t\t\trs.getString(POST_EXCERPT), rs.getString(POST_STATUS), rs.getString(COMMENT_STATUS),\n\t\t\t\t\trs.getString(PING_STATUS), rs.getString(POST_PASSWORD), rs.getString(POST_NAME),\n\t\t\t\t\trs.getString(TO_PING), rs.getString(PINGED), rs.getTimestamp(POST_MODIFIED), \n\t\t\t\t\trs.getTimestamp(POST_MODIFIED_GMT), rs.getString(POST_CONTENT_FILTERED), rs.getInt(POST_PARENT),\n\t\t\t\t\trs.getString(GUID), rs.getInt(MENU_ORDER), rs.getString(POST_TYPE), rs.getString(POST_MIME_TYPE),\n\t\t\t\t\trs.getInt(COMMENT_COUNT));\n\t\t\treadValues.add(post);\n\t\t}\n\t}",
"private List<String> searchForPosts(){\n String userId = searchForUser();\n List <String> postIds;\n String response = given().\n get(\"/posts\").then().extract().asString();\n postIds = from(response).getList(String.format(\"findAll { it.userId.equals(%s) }.id\", userId));\n return postIds;\n }",
"@Override\n\tpublic Loader<List<PostEntity>> onCreateLoader(int arg0, Bundle arg1) {\n\t\treturn new ThrowableLoader<List<PostEntity>>(getActivity(), items) {\n\n\t\t\t@Override\n\t\t\tpublic List<PostEntity> loadData() throws Exception {\n\t\t\t\tint pagenum = getListView().getCurrentPage() + 1;\n\t\t\t\treturn service.getPostList(boardId, pagenum, true);\n\t\t\t}\n\t\t};\n\t}",
"@Override\r\n\tpublic List<Post> findAll() {\n\t\treturn codeblogRepository.findAll();\r\n\t}",
"public static ResultSet getPinnedPost(int count){\n ResultSet result = null;\n try {\n conn = ConnectionProvider.getCon();\n pst = conn.prepareStatement(\"select * from pinnedposts where postid = ?\");\n pst.setInt(1, count);\n result = pst.executeQuery();\n System.out.println(\"PostDAO: getting pinned post\");\n } catch(Exception e) {\n System.out.println(\"PostDAO: unsuccessful query\");\n System.out.println(e);\n }\n return result;\n }",
"public interface ForumPostDao {\n\n List<ForumPostPO> getPostModels(int topic_id,int page, int page_size);\n\n ForumPostPO getPostModel(int id);\n\n int addPostModel(ForumPostPO post);\n\n int deletePostModels(int topic_id);\n\n int deletePostModel(int id);\n\n int updatePostModel(int id, ForumPostPO post);\n\n int getNumOfPosts(int topic_id);\n\n}",
"public Collection getLastEnablePosts_inThread_limit(int threadID, int rowsToReturn)\r\n throws IllegalArgumentException, DatabaseException;",
"@Override\r\n\tpublic List<News> getNewsTjList(String pId, String size, String query) {\n\t\treturn null;\r\n\t}"
]
| [
"0.6818028",
"0.6541918",
"0.6451699",
"0.6405414",
"0.63561565",
"0.6351152",
"0.63231665",
"0.6303759",
"0.62844896",
"0.6269367",
"0.62299263",
"0.61772984",
"0.60827076",
"0.6061377",
"0.60441625",
"0.601208",
"0.60044056",
"0.60009205",
"0.5981597",
"0.591493",
"0.5914848",
"0.5850224",
"0.5849318",
"0.58169293",
"0.5815077",
"0.5810185",
"0.5800225",
"0.5798356",
"0.5788518",
"0.57815266",
"0.5778932",
"0.57032835",
"0.57002854",
"0.56786215",
"0.5672845",
"0.5668063",
"0.56664133",
"0.5645813",
"0.5640259",
"0.5638975",
"0.56389153",
"0.56389153",
"0.5633882",
"0.5632708",
"0.56288606",
"0.5614102",
"0.5605796",
"0.5602177",
"0.5599263",
"0.5573101",
"0.5558229",
"0.5554805",
"0.5549088",
"0.5534611",
"0.5534554",
"0.5511363",
"0.5507056",
"0.5507056",
"0.5502702",
"0.54937804",
"0.54908895",
"0.5485892",
"0.5482423",
"0.54738855",
"0.54652923",
"0.54649264",
"0.54530597",
"0.544717",
"0.54450136",
"0.54414755",
"0.54257417",
"0.54131305",
"0.5408636",
"0.5399676",
"0.5392516",
"0.53707325",
"0.5366617",
"0.53402865",
"0.5335385",
"0.53315425",
"0.53236395",
"0.53221965",
"0.53199",
"0.5299117",
"0.529653",
"0.52910364",
"0.52847695",
"0.5261791",
"0.5257563",
"0.5254843",
"0.5233897",
"0.52330583",
"0.51965845",
"0.5179827",
"0.5168015",
"0.5167659",
"0.5163627",
"0.5154168",
"0.5147223",
"0.51432836",
"0.5141903"
]
| 0.0 | -1 |
Public method which returns a list of post from a specific provider. If the given parameters exceed the database number of existing rows, null objects will be added to the list. | public List<PostEntity> getIntervalByProvider(int auth_id, String token, int provider_id, int s, int c) {
if (sessionRepository.findAll().stream().anyMatch(session -> session.getUser_id() == auth_id && session.getToken().equals(token))) {
return ingestionLinker.getIntervalByProvider(provider_id, s, c);
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<PostInfo> getPostList();",
"List<Post> getAllPost() throws Exception;",
"@Override\n\tpublic List<Post> getNewPosts(int number) throws Exception {\n\t\treturn null;\n\t}",
"public ArrayList<Post> viewAllPosts()\n\n {\n postList = new ArrayList<Post>();\n\n try\n {\n database = dbH.getReadableDatabase();\n dbH.openDataBase();\n String query = \"SELECT * FROM Post WHERE 1\";\n Cursor c = database.rawQuery(query, null);\n if (c.moveToFirst())\n {\n do\n {\n Post post = new Post();\n post.setPostBody(c.getString(c.getColumnIndex(\"postBody\")));\n post.setPostedBy(c.getString(c.getColumnIndex(\"postedBy\")));\n post.setPostedAt(c.getString(c.getColumnIndex(\"postedAt\")));\n post.setPostID(Integer.valueOf(c.getString(c.getColumnIndex(\"postID\"))));\n post.setBitmap(c.getString(c.getColumnIndex(\"image\")));\n\n postList.add(post);\n } while (c.moveToNext());\n }\n\n else\n {\n Log.i(TAG, \"There are no posts in the DB.\");\n }\n c.close();\n dbH.close();\n }\n catch (SQLException e)\n {\n e.printStackTrace();\n }\n return postList;\n }",
"public static ResultSet getPosts(){\n ResultSet result = null;\n try {\n conn = ConnectionProvider.getCon();\n pst = conn.prepareStatement(\"select * from normalposts\");\n result = pst.executeQuery();\n\n System.out.println(\"PostDAO: getting posts\");\n } catch(Exception e) {\n System.out.println(\"PostDAO: unsuccessful query\");\n System.out.println(e);\n }\n return result;\n }",
"public Page<Post> getNewPosts(){\n Pageable page = new PageRequest(0, 3, Sort.Direction.DESC, \"createdAt\");\n System.out.println(\"getNewPosts\");\n // Page<Post> posts = postRepository.findTop10OrderByCreatedAtOrderByCreatedAtDesc(page);\n // List<Post> p = postRepository.getNewestPosts();\n\n Page<Post> pp = postRepository.findAll(page);\n\n for (Post p :pp){\n logger.info(\"getNewPosts -> \" + p);\n }\n return pp;\n/* for (Post p :posts){\n System.out.println(\"p->\" + p);\n }\n if (posts != null)\n return posts;\n return null;*/\n }",
"@Override\n\tpublic List<Post> list() {\n\t\treturn null;\n\t}",
"private void queryPosts() {\n ParseQuery<OutfitPost> query = ParseQuery.getQuery(OutfitPost.class);\n // only include data referred by user key\n query.include(OutfitPost.KEY_USER);\n query.whereEqualTo(OutfitPost.KEY_USER, ParseUser.getCurrentUser());\n // limit query to latest 20 items\n query.setLimit(20);\n // order posts by creation date (newest first)\n query.addDescendingOrder(OutfitPost.KEY_CREATED_KEY);\n // start an asynchronous call for posts\n query.findInBackground(new FindCallback<OutfitPost>() {\n @Override\n public void done(List<OutfitPost> posts, ParseException e) {\n // check for errors\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n // Save oldest post in query for loading more posts\n if (posts.size() > 0) {\n oldestPost = posts.get(posts.size() - 1).getCreatedAt();\n }\n // update adapter with posts list\n adapter.clear();\n adapter.addAll(posts);\n }\n });\n }",
"public ArrayList<PostInfo> getPost() throws SQLException {\n ArrayList<PostInfo> postInfoList = new ArrayList<>();\n String sql = \"SELECT * FROM `post` WHERE `status` = 1 ORDER BY `post_time` DESC\";\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sql);\n while (resultSet.next()) {\n postInfoList.add(new PostInfo(resultSet.getInt(\"post_id\"), resultSet.getInt(\"place_id\"), resultSet.getString(\"post_text\"),\n resultSet.getDate(\"post_time\"), resultSet.getInt(\"status\"), resultSet.getInt(\"user_id\"), resultSet.getInt(\"editor_id\")));\n }\n return postInfoList;\n }",
"@Override\r\n public List<Post> findAll() {\r\n List<Post> posts = new ArrayList<>();\r\n List<Map<String, Object>> rows = jdbcOp.queryForList(SQL_SELECT_ALL_TICKET);\r\n\r\n for (Map<String, Object> row : rows) {\r\n Post post = new Post();\r\n \r\n int id = (int)row.get(\"id\");\r\n post.setId(id); \r\n \r\n String customername = (String)row.get(\"customername\");\r\n post.setCustomerName(customername); \r\n \r\n String subject = (String)row.get(\"subject\");\r\n post.setSubject(subject);\r\n \r\n String body = (String)row.get(\"body\");\r\n post.setBody(body);\r\n \r\n String categories = (String)row.get(\"categories\");\r\n post.setCategories(categories);\r\n \r\n posts.add(post);\r\n }\r\n return posts;\r\n }",
"public List<PostEntry> findList(String username){\n Connection c = null;\n PreparedStatement ps = null;\n ResultSet rs = null; \n\n List<PostEntry> data = new ArrayList<PostEntry>();\n try {\n //Get connection\n c = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/CS144\", \"cs144\", \"\");\n\n //Prepare statement\n ps = c.prepareStatement(\"SELECT * FROM Posts WHERE username=?\");\n ps.setString(1, username);\n\n rs = ps.executeQuery();\n\n //set in data if exists: ASSUMES there is only one response\n while(rs.next()){\n String title = rs.getString(\"title\");\n Timestamp created = rs.getTimestamp(\"created\");\n Timestamp modified = rs.getTimestamp(\"modified\");\n int postid = rs.getInt(\"postid\"); //conversion to string, need to convert back\n \n PostEntry pe = new PostEntry(title, created, modified, postid);\n\n data.add(pe);\n }\n\n } catch(SQLException e){\n //error handling\n System.out.println(\"SQLException caught.\");\n e.printStackTrace();\n } finally {\n //just need to close all\n try { rs.close(); } catch (Exception e) { /* ignored */ }\n try { ps.close(); } catch (Exception e) { /* ignored */ }\n try { c.close(); } catch (Exception e) { /* ignored */ }\n }\n\n return data;\n }",
"protected void queryPosts() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n //get all the post objects from the database\n query.include(Post.KEY_USER);\n //set the limit to 20 posts being retrieved\n query.setLimit(POSTS_QUERY_LIMIT);\n\n query.addDescendingOrder(Post.KEY_CREATED_KEY);\n\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e) {\n // e == null if success\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n adapter.clear();\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }\n });\n }",
"private void loadPosts(final List<AnipalAbstractPost> posts){\n Query q1 = FirebaseDatabase.getInstance().getReference(\"UserPosts\")\n .child(MainActivity.currentUser.getUserUUID()).orderByChild(\"timestamp\")\n .limitToLast(5);\n q1.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n AnipalAbstractPost post ;\n for(DataSnapshot snap : dataSnapshot.getChildren()){\n if(snap.hasChild(\"photoURL\")){\n // Photo post\n post = snap.getValue(AnipalPhotoPost.class);\n post.findUser(post.getUserUUID());\n }else{\n // Donation post\n post = snap.getValue(AnipalDonationPost.class);\n post.findUser(post.getUserUUID());\n }\n posts.add(post);\n }\n\n Collections.reverse(posts);\n postAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }",
"public ArrayList<AshirBlogPostingHelper> getAllPots() {\n String query = \"SELECT * FROM \" + NAME_OF_TABLE;\n ArrayList<AshirBlogPostingHelper> ashirPostsList = new ArrayList<AshirBlogPostingHelper>();\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(query, null);\n if (c != null) {\n while (c.moveToNext()) {\n String post = c.getString(c.getColumnIndex(Col_2));\n try {\n byte[] getImageFromDb = c.getBlob(c.getColumnIndex(Col_3));\n AshirBlogPostingHelper postHelper = new AshirBlogPostingHelper();\n\n postHelper.setDataPost(post);\n postHelper.setImage(getImageFromDb);\n\n ashirPostsList.add(postHelper);\n }catch (Exception e){\n e.printStackTrace();\n }\n }\n }\n\n db.close();\n return ashirPostsList;\n\n }",
"public List<BlogPost> getPosts();",
"protected void queryPosts()\n {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.whereEqualTo(Post.KEY_USER, ParseUser.getCurrentUser());\n query.setLimit(20);\n query.addDescendingOrder(Post.KEY_CREATED_AT);\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e)\n {\n if(e != null)\n {\n Log.e(TAG, \"Issue with getting posts\", e);\n }\n for(Post post : posts)\n {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username\" + post.getUser().getUsername());\n }\n adapter.clear();\n allPosts.addAll(posts);\n swipeContainer.setRefreshing(false);\n adapter.notifyDataSetChanged();\n\n }\n });\n }",
"public List<Post> getAllPublic() throws SQLException {\r\n\tString sql = \"SELECT * FROM posts WHERE isPublic = 1 ORDER BY date DESC LIMIT ?\";\r\n\tPreparedStatement st = db.prepareStatement(sql);\r\n\tst.setQueryTimeout(TIMEOUT);\r\n\tst.setInt(1, LIMIT);\r\n\t\r\n\tResultSet results = st.executeQuery();\r\n\tList<Post> parsed = parseResults(results);\r\n\treturn parsed;\r\n }",
"public Collection getPosts() throws DatabaseException;",
"protected void populateFeed() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.addDescendingOrder(Post.CREATED_AT);\n query.setLimit(20);\n query.findInBackground(new FindCallback<Post>() {\n // Result of the call to Parse\n @Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n posts.addAll(queryPosts);\n adapter.notifyDataSetChanged();\n }\n });\n }",
"private void queryPost() {\n tv_search.setText(\"Recently Added Posts:\");\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.setLimit(15);\n query.addDescendingOrder(Post.KEY_CREATED);\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e) {\n if(e!= null){\n Log.e(tag, \"Issue with getting post\", e);\n return;\n }\n adaptor.clear();\n adaptor.addAll(posts);\n //allPost.addAll(posts);\n //adaptor.notifyDataSetChanged();\n //swipeRefreshLayout.setRefreshing(false);\n\n //user just created a post\n if (isJustCreatedNewPost == true)\n {\n //reset bool\n isJustCreatedNewPost = false;\n// //subscribe user to their new post channel\n// String postChannel = \"POST_\"+posts.get(0).getObjectId();\n// ParsePush.subscribeInBackground(postChannel);\n\n }\n }\n });\n }",
"private void readPosts() {\n FirebaseDatabase.getInstance().getReference().child(\"Posts\").addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n postList.clear();\n for(DataSnapshot dataSnapshot:snapshot.getChildren())\n {\n Post post = dataSnapshot.getValue(Post.class);\n for(String id : followingList)\n {\n if(post.getPublisher().equals(id))\n {\n postList.add(post);\n }\n }\n }\n postAdapter.notifyDataSetChanged();\n\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n }",
"public synchronized List<Post> getGroupPostsWithMoreInfo(int count, int start) {\n try {\n this.connect();\n Group.GroupPosts groupPosts = linkedin.restOperations().getForObject(\n \"http://api.linkedin.com/v1/groups/{group-id}/posts\" +\n \":(creation-timestamp,title,summary,id,\" +\n \"creator:(first-name,last-name))?\" +\n \"count=\" + count +\n \"&start=\" + start +\n \"&order=recency\",\n Group.GroupPosts.class, groupId);\n return groupPosts.getPosts();\n } catch (Exception e) {\n log.debug(\"Exception occured when reading posts from group: \" + groupId);\n }\n return null;\n }",
"private static List<Post> parseResults(ResultSet results) throws SQLException {\r\n\tList<Post> postList = new LinkedList<Post>();\r\n\r\n\twhile (results.next()) {\r\n\t Post p = new Post();\r\n\r\n\t p.id = results.getInt(\"id\");\r\n\t p.author = results.getString(\"author\");\r\n\t \r\n\t long date = results.getInt(\"date\") * 1000L; // milliseconds\r\n\t p.date = new Date(date);\r\n\t \r\n\t p.isPublic = results.getInt(\"isPublic\") == 1;\r\n\t p.setContent(results.getString(\"content\"));\r\n\r\n\t postList.add(p);\r\n\t}\r\n\r\n\treturn postList;\r\n }",
"@Override\r\n\tpublic List<Post> refreshResult() {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tList<Post> list=new ArrayList<Post>();\r\n\t\treturn postDao.refreshResult();\r\n\t\t\r\n\t}",
"public List<Post> retriveAllPosts()\n\t {\n\t\t List<Post> Posts =(List<Post>) Postrepository.findAll();\n\t\t \n\t\t for(Post Post :Posts)\n\t\t {\n\t\t\t //l.info(\"Post +++ :\" +Post);\n\t\t }\n\t\t return Posts;\n\t\t\t \n\t }",
"@Override\n public List<Post> postList() {\n List<Post> savedPosts = (List<Post>) postRepository.findAll();\n Set<Long> userIdList = savedPosts.stream().map(Post::getUserId).collect(Collectors.toSet());\n\n User[] rateResponse = sender.getUsersByUserId(userIdList);\n\n HashMap<Long, User> userHashMap = new LinkedHashMap<>();\n for (User user : rateResponse) {\n userHashMap.put(user.getUserId(), user);\n }\n for (Post savedPost : savedPosts) {\n savedPost.setUser(userHashMap.get(savedPost.getUserId()));\n }\n return savedPosts;\n }",
"@GET(\"/auth/api/v1/user/{id}/post/list?\")\n Call<JsonObject> fetchAllPost(@Path(\"id\") String id,@Query(\"api_token\") String token);",
"@Override\n public ArrayList<PostVo> get_post_by_page(int page) {\n ArrayList<PostVo> posts = (ArrayList<PostVo>) baseDAO.findBySQLForVO(\"\" +\n \"select p.p_id as pId , p.p_floor as pFloor , p.p_main as pMain , p.p_title as pTitle\" +\n \" , u.u_name as uName from Post as p join user as u on p.u_id = u.u_id \"\n ,PostVo.class,null,10*(page-1),10);\n return posts;\n }",
"@Override\r\n\tpublic List<Post> getAllPost() {\n\t\tString hql = \"from Post\";\r\n\t\treturn (List<Post>) getHibernateTemplate().find(hql);\r\n\t}",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n adapter.clear();\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }",
"@Override\n protected void queryPosts() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.whereEqualTo(Post.KEY_USER, ParseUser.getCurrentUser());\n Log.d(TAG, \"ParseUser\" + ParseUser.getCurrentUser().toString());\n query.setLimit(20);\n query.addDescendingOrder(Post.KEY_CREATED_AT);\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null){\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n for (Post post: posts){\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }\n });\n }",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic DataWrapper<List<PaperPojo>> getPapers(HttpServletRequest request,Long projectId, String token, Integer pageIndex, Integer pageSize, Paper paper) {\n\t\tDataWrapper<List<PaperPojo>> dataWrappers = new DataWrapper<List<PaperPojo>>();\r\n \tList<PaperPojo> papers=new ArrayList<PaperPojo>();\r\n \t\r\n \tDataWrapper<List<Paper>> dataWrapper = new DataWrapper<List<Paper>>();\r\n\t\t User userInMemory = SessionManager.getSession(token);\r\n\t if (userInMemory != null) {\r\n\t \tString projectIdList=null;\r\n\t \tif(projectIdList==null){\r\n\t \t\tprojectIdList=\"79\";\r\n\t \t}\t\r\n\t \t\tdataWrapper= paperDao.getPaperLists(projectIdList,pageSize, pageIndex,paper);\r\n\t \t\tfor(int i=0;i<dataWrapper.getData().size();i++){\r\n\t \t\t\tPaperPojo papernew=new PaperPojo();\r\n \t\t\t\tpapernew.setProjectId(projectId);\r\n\t \t\t\tpapernew.setId(dataWrapper.getData().get(i).getId());\r\n\t \t\t\tpapernew.setBuildingNum(dataWrapper.getData().get(i).getBuildingNum());\r\n\t \t\t\tpapernew.setProfessionType(dataWrapper.getData().get(i).getProfessionType());\r\n\t \t\t\tpapernew.setFloorNum(dataWrapper.getData().get(i).getFloorNum());\r\n\t \t\t\tpapernew.setOriginName(dataWrapper.getData().get(i).getOriginName());\r\n\t \t\t\tFiles file=fileDao.getById(dataWrapper.getData().get(i).getFileId());\r\n\t \t\t\tif(file!=null){\r\n\t \t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMddHHmmssSSS\" );\r\n\t \t\t\t \tDate d=new Date();\r\n\t \t\t\t \tString str=sdf.format(d);\r\n\t \t\t\t \tString rootPath = request.getSession().getServletContext().getRealPath(\"/\");\r\n\t \t\t\t \tString filePath=\"\";\r\n\t \t\t\t \tif(projectId!=null){\r\n\t \t\t\t \t\tfilePath=\"/codeFiles/\"+projectId;\r\n\t \t\t\t \t}else{\r\n\t \t\t\t \t\tfilePath=\"/codeFiles\";\r\n\t \t\t\t \t}\r\n\t \t\t\t \tString imgpath=rootPath+filePath;\r\n\t \t\t\t \ttry{\r\n\t \t\t\t\tMultiFormatWriter multiFormatWriter = new MultiFormatWriter();\r\n\t \t\t\t @SuppressWarnings(\"rawtypes\")\r\n\t \t\t\t\t\tMap hints = new HashMap(); \r\n\t \t\t\t //内容所使用编码 \r\n\t \t\t\t hints.put(EncodeHintType.CHARACTER_SET, \"utf8\"); \r\n\t \t\t\t BitMatrix bitMatrix = multiFormatWriter.encode(\"http://jasobim.com.cn/\"+file.getUrl(),BarcodeFormat.QR_CODE, 200, 200, hints); \r\n\t \t\t\t //生成二维码 \r\n\t \t\t\t File outputFile = new File(imgpath,str+\".png\"); \r\n\t \t\t\t \r\n\t \t\t\t MatrixToImageWriter.writeToFile(bitMatrix, \"png\", outputFile); \r\n\t \t\t\t\t} catch (Exception e) {\r\n\t \t\t\t\t\te.printStackTrace();\r\n\t \t\t\t\t}\r\n\t \t\t\t \tString url=\"\";\r\n\t \t\t\t \tif(projectId!=null){\r\n\t \t\t\t \t\turl=\"codeFiles/\"+projectId+\"/\"+str+\".png\";\r\n\t \t\t\t \t}else{\r\n\t \t\t\t \t\turl=\"codeFiles/\"+str+\".png\";\r\n\t \t\t\t \t}\r\n\t \t\t\t\tpapernew.setUrl(url);\r\n\t \t\t\t}\r\n\t \t\t\tif(papernew.getId()!=null){\r\n\t \t\t\t\tpapers.add(papernew);\r\n\t \t\t\t}\r\n\t \t\t}\r\n\t \t\tdataWrappers.setData(papers);\r\n\t \t\tif(dataWrapper.getCurrentPage()==-1){\r\n\t \t\t\tdataWrappers.setCurrentPage(1);\r\n\t \t\t}else{\r\n\t \t\t\tdataWrappers.setCurrentPage(dataWrapper.getCurrentPage());\r\n\t \t\t}\r\n\t \t\t\tdataWrappers.setCallStatus(dataWrapper.getCallStatus());\r\n\t \t\t\tdataWrappers.setNumberPerPage(dataWrapper.getNumberPerPage());\r\n\t \t\t\tdataWrappers.setTotalNumber(dataWrapper.getTotalNumber());\r\n\t \t\t\tdataWrappers.setTotalPage(dataWrapper.getTotalPage());\r\n\t \t\r\n\t\t\t} else {\r\n\t\t\t\tdataWrappers.setErrorCode(ErrorCodeEnum.User_Not_Logined);\r\n\t\t\t}\r\n return dataWrappers;\r\n\t}",
"List<Post> getPostForUser(String email) throws Exception;",
"public ArrayList<Object> post_detail_image(Connection con, int user_id,int post_id[],String type_of_post[],String purpose)\n\t{\n\t\tResultSet rs = null; \n\t\tPreparedStatement pst;\n\t\tDate date;\t\t\n\t\tArrayList<Object> post = new ArrayList<Object>();\n\t\tArrayList<Object> post_list = new ArrayList<Object>();\n\t\tint sample_product_media_id,i=0;\n\t\tint post_id_array[]=new int[post_id.length];\n\t\tString sample_product_media_type,sample_product_media_text,type_of_promotional_post,type_of_project_post ,sample_product_media_description;\n\t\tString[] type_of_post_array = new String[type_of_post.length];\n\t\tString sample_product_text=null;\n\t\tBlob sample_product_media,detail_image;\n\t\tbyte[] sample_product_media_bytes,detail_image_bytes;\n\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\t//for all post irrespective of their type\n\t\t\t\tif(post_id==null && type_of_post==null)\n\t\t\t\t{\n\t\t\t\t\tpst=con.prepareStatement(\"select post_id, type_of_post from all_post order by date_of_post desc where e_id=?\"); \n\n\t\t\t\t\tpst.setInt(1,user_id);\n\t\t\t\t\t\n\t\t\t\t\trs=pst.executeQuery();\n\t\t\t\t\n\t\t\t\t\twhile(rs.next()) \n\t\t\t\t\t{\n\t\t\t\t\t\tpost_id_array[i]=rs.getInt(1);\n\t\t\t\t\t //post_id = rs.getInt(1);\n\t\t\t\t\t\ttype_of_post_array[i]=rs.getString(2);\t\n\t\t\t\t\t// type_of_post= rs.getString(2);\t\n\t\t\t\t\t //date = rs.getDate(3);\n\t\t\t\t\t \n\t\t\t\t\t //post_id_array[i]=post_id;\n\t\t\t\t\t// type_of_post_array[i]= type_of_post;\n\t\t\t\t\t i++;\t\t \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(post_id==null)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tfor(int k=0;i<type_of_post.length;k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tpst=con.prepareStatement(\"select post_id, date_of_post from all_post order by date_of_post desc where e_id=? and type_of_post=?\"); \n\n\t\t\t\t\t\tpst.setInt(1,user_id);\n\t\t\t\t\t\tpst.setString(2,type_of_post[k]);\n\t\t\t\t\t\trs=pst.executeQuery();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile(rs.next()) \n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t //post_id = rs.getInt(1);\n\t\t\t\t\t\t //date = rs.getDate(2);\n\t\t\t\t\t\t \n\t\t\t\t\t\t post_id_array[i]=rs.getInt(1);\n\t\t\t\t\t\t type_of_post_array[i]= type_of_post[k];\n\t\t\t\t\t\t i++;\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse //for specific post \n\t\t\t\t{\t\n\t\t\t\t\tfor(int j=0;j<post_id.length;j++)\n\t\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(post_id[j]);\n\t\t\t\t\t\t//System.out.println(type_of_post[j]);\n\t\t\t\t\t\t\n\t\t\t\t\t\tpost_id_array[j]=post_id[j];\n\t\t\t\t\t\ttype_of_post_array[j]= type_of_post[j];\n\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t \t\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\tfor(int ctr =0;ctr < post_id_array.length; ctr++)\n\t\t\t\t{\n\t\t\t\t\tint post_id_ = post_id_array[ctr];\n\t\t\t\t\tString type_of_post_ = type_of_post_array[ctr];\n\t\t\t\t\t\n\t\t\t\t\tif(purpose.equals(\"show\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpost.add(user_id);\n\t\t\t\t\t\t\tpost.add(post_id_);\n\t\t\t\t\t\t\tpost.add(type_of_post_);\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t//if(type_of_post.equals(\"class_promotional_post\") ||type_of_post.equals(\"workshop_promotional_post\") )\n\t\t\t\t\t\t\tif(type_of_post_.contains(\"promotion\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpst=con.prepareStatement(\"select promotional_post_detail_image from promotional_post where e_id=? and promotional_post_id=? and type_of_post=?\"); \n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse // else if(type_of_post.contains(\"project_post\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpst=con.prepareStatement(\"select project_post_detail_image from project_post where e_id=? and project_post_id=? and type_of_post=?\"); \n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tpst.setInt(1,user_id);\n\t\t\t\t\t\t\tpst.setInt(2,post_id_);\n\t\t\t\t\t\t\tpst.setString(3,type_of_post_);\n\t\t\t\t\t\t\trs=pst.executeQuery();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t while(rs.next())\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t detail_image = rs.getBlob(1);\n\t\t\t\t\t\t\t\t if(detail_image!=null)\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t detail_image_bytes = detail_image.getBytes(1,(int)detail_image.length());\t\n\t\t\t\t\t\t\t\t\t post.add(detail_image_bytes);\n\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\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t pst=con.prepareStatement(\"select sample_product_media_id,sample_product_media,sample_product_media_type,media_description from sample_post_product_media where e_id=? and post_id=? and type_of_post=?\"); \n\t\t\t\t\t\t\t pst.setInt(1,user_id);\n\t\t\t\t\t\t\t pst.setInt(2,post_id_);\n\t\t\t\t\t\t\t pst.setString(3,type_of_post_);\n\t\t\t\t\t\t\t rs=pst.executeQuery();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t while(rs.next())\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t sample_product_media_id = rs.getInt(1);\n\t\t\t\t\t\t\t\t sample_product_media_type = rs.getString(3);\n\t\t\t\t\t\t\t\t sample_product_media_description = rs.getString(4);\n\t\t\t\t\t\t\t\t sample_product_media = rs.getBlob(2);\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t if(sample_product_media!=null)\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t sample_product_media_bytes = sample_product_media.getBytes(1,(int)sample_product_media.length());\n\t\t\t\t\t\t\t\t\t\t post.add(sample_product_media_bytes);\n\t\t\t\t\t\t\t\t\t\t post.add(sample_product_media_description);\n\t\t\t\t\t\t\t\t\t\t post.add(sample_product_media_id);\n\t\t\t\t\t\t\t\t\t\t post.add(sample_product_media_type);\n\t\t\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t post_list.add(post);\n\t\t\t\t\t\t\t //System.out.println(post_list);\n\t\t\t}\n\t\t\telse //delete case\n\t\t\t{\n \n\t\t\t\t if(type_of_post_.contains(\"promotion\"))\n\t\t\t\t {\n\t\t\t\t\t \t pst=con.prepareStatement(\"delete from promotional_post where e_id= ? and promotional_post_id =? and type_of_post=?\");\n\t\t\t\t\t\t pst.setInt(1,user_id);\n\t\t\t\t\t\t pst.setInt(2,post_id_);\n\t\t\t\t\t\t pst.setString(3,type_of_post_);\n\t\t\t\t\t\t pst.executeUpdate();\t\t\n\t\t\t\t }\n\t\t\t\t else//if(type_of_post.contains(\"project_post\"))\n\t\t\t\t {\n\t\t\t\t\t \t pst=con.prepareStatement(\"delete from project_post where e_id= ? and project_post_id =? and type_of_post=? \");\n\t\t\t\t\t\t pst.setInt(1,user_id);\n\t\t\t\t\t\t pst.setInt(2,post_id_);\n\t\t\t\t\t\t pst.setString(3,type_of_post_);\n\t\t\t\t\t\t pst.executeUpdate();\t\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t pst=con.prepareStatement(\"delete from sample_post_product_media where e_id= ? and post_id =? and type_of_post=? \");\n\t\t\t\t pst.setInt(1,user_id);\n\t\t\t\t pst.setInt(2,post_id_);\n\t\t\t\t pst.setString(3,type_of_post_);\n\t\t\t\t pst.executeUpdate();\t\n\t\t\t\t \n\t\t\t\t pst=con.prepareStatement(\"delete from all_post where e_id= ? and post_id =? and type_of_post=? \");\n\t\t\t\t pst.setInt(1,user_id);\n\t\t\t\t pst.setInt(2,post_id_);\n\t\t\t\t pst.setString(3,type_of_post_);\n\t\t\t\t pst.executeUpdate();\t\n\t\t\t}\n\t\t}\t\t\t\t\t\t\t\t\n\t}\n\tcatch (Exception e)\t\n\t{\n\t\te.printStackTrace();\n\t}\n\n\t\t\treturn post_list;\n\t}",
"@Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n\n adapter.clear();\n adapter.addAll(queryPosts);\n }",
"private void fetchMorePosts() {\n long lastPostTimestamp = prismPostArrayList.get(prismPostArrayList.size() - 1).getTimestamp();\n //toast(\"Fetching more pics\");\n databaseReferenceAllPosts\n .orderByChild(Key.POST_TIMESTAMP)\n .startAt(lastPostTimestamp + 1)\n .limitToFirst(Default.IMAGE_LOAD_COUNT)\n .addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) {\n PrismPost prismPost = Helper.constructPrismPostObject(postSnapshot);\n prismPostArrayList.add(prismPost);\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (prismPostArrayList.size() > 0) {\n mainContentRecyclerViewAdapter\n .notifyItemInserted(prismPostArrayList.size());\n }\n }\n });\n\n }\n populateUserDetailsForAllPosts(false);\n } else {\n Log.i(Default.TAG_DB, Message.NO_DATA);\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Log.e(Default.TAG_DB, databaseError.getMessage(), databaseError.toException());\n }\n });\n }",
"public synchronized List<Post> getPosts(int groupId) {\n try {\n this.connect();\n return linkedin.groupOperations().getPosts(groupId).getPosts();\n } catch (Exception e) {\n log.debug(\"Exception occured when reading posts from group: \" + groupId);\n }\n return null;\n }",
"List<Share> findByPost(Post post);",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n\n if (posts.size() == 0) {\n Toast.makeText(getContext(), \"You've reached the end of all posts!\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }",
"public List<detailsofpassengerpost> seedetailslist() throws IOException{\n//connect database\nString resource = \"orm/configuration.xml\";\nReader reader = Resources.getResourceAsReader(resource);\nSqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);\nSqlSession session = sessionFactory.openSession();\n\ntry{\n\tSystem.out.println(\"postID in seeDetails=\"+postID);\npostlist=session.selectList(\"selectPassengerPostByID\",postID);\nSystem.out.println(\"postlist size in seeDetails=\"+postlist.size());\n\n//find passenger's name through his email address\nnumberofapplieddrivers=postlist.get(0).getNumberofapplieddrivers();\npassengeremail=postlist.get(0).getEmail();\npassengerlist=session.selectList(\"selectuserbyemail\", passengeremail);\n\npassengername=passengerlist.get(0).getName();\npassengersex=passengerlist.get(0).getSex();\npassengerdob=passengerlist.get(0).getDob();\n\ndd=new detailsofpassengerpost();\ndetaillist=new ArrayList<detailsofpassengerpost>();\n\ndd.setNeedseats(postlist.get(0).getNeedseats());\ndd.setExpectedcartype(postlist.get(0).getExpectedcartype());\ndd.setDeparture(postlist.get(0).getDeparture());\ndd.setDeparturedate(postlist.get(0).getDeparturedate());\ndd.setDestination(postlist.get(0).getDestination());\ndd.setDob(passengerdob);\ndd.setEmail(passengeremail);\ndd.setEstimatedleavingtime(postlist.get(0).getEstimatedleavingtime());\ndd.setExpectedcost(postlist.get(0).getExpectedcost());\ndd.setMemo(postlist.get(0).getMemo());\ndd.setName(passengername);\ndd.setPostID(postID);\ndd.setSex(passengersex);\ndd.setPhone(postlist.get(0).getPhone());\ndd.setNumberofapplieddrivers(numberofapplieddrivers);\ndetaillist.add(dd);\n\nreturn detaillist;\n\n}finally{\nsession.close();\n}\n}",
"@Override\n public int getItemCount() {\n return posts.size();\n }",
"@Override\n public int getItemCount() {\n return posts.size();\n }",
"public void initAllPosts(){\n\t\tdbAdapter = new DBAdapter(getActivity());\n\t\tdbAdapter.open();\n\t\tCursor c = dbAdapter.getAllPosts();\n\t\tSimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(\n\t\t\t\tgetActivity(), R.layout.postitem, c, new String[] {\n\t\t\t\t\t\t\"titel\", \"dato\", \"beloeb\" }, new int[] { R.id.titel,\n\t\t\t\t\t\tR.id.dato, R.id.beloeb});\n\t\tsetListAdapter(cursorAdapter);\n\t\t\n\t}",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"issue with getting posts\", e);\n return;\n }\n //iterate through each post and log each of them\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \" \" + post.getUser().getUsername());\n }\n //clear here before adding posts\n mAllPosts.clear();\n mAllPosts.addAll(posts);\n mAdapter.notifyDataSetChanged();\n mSwipeContainer.setRefreshing(false);\n }",
"@Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null) {\n Log.e(TAG, \"issue with getting posts\", e);\n return;\n }\n //iterate through each post and log each of them\n for (Post post : posts) {\n Log.i(TAG, \"Post: \" + post.getDescription() + \" \" + post.getUser().getUsername());\n }\n //clear here before adding posts\n mAllPosts.clear();\n mAllPosts.addAll(posts);\n mAdapter.notifyDataSetChanged();\n mSwipeContainer.setRefreshing(false);\n }",
"@Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n posts.addAll(queryPosts);\n adapter.notifyDataSetChanged();\n }",
"public static ResultSet getPinnedPost(int count){\n ResultSet result = null;\n try {\n conn = ConnectionProvider.getCon();\n pst = conn.prepareStatement(\"select * from pinnedposts where postid = ?\");\n pst.setInt(1, count);\n result = pst.executeQuery();\n System.out.println(\"PostDAO: getting pinned post\");\n } catch(Exception e) {\n System.out.println(\"PostDAO: unsuccessful query\");\n System.out.println(e);\n }\n return result;\n }",
"List<PmPost> selectByExample(PmPostExample example);",
"private List<Text> getPosts() {\n\t\tList<Text> result = new ArrayList<>();\n\t\tObservableList<Post> postList = PostDAO.searchPosts(String.valueOf(friendsID));\n\t\tfor(Post post : postList) {\n\t\t\tString postTime = post.getPostTime();\n\t\t\tString content = post.getPostContent();\n\t\t\tString editTime = post.getEditTime();\n\t\t\tString toPost;\n\t\t\tif(editTime != null) {\n\t\t\t\ttoPost = \"Post on \" + postTime + \" Last edit on \" + editTime + \"\\n\" + content + \"\\n\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttoPost = \"Post on \" + postTime + \"\\n\" + content + \"\\n\";\n\t\t\t}\n\t\t\tText text = new Text(toPost);\n\t\t\tresult.add(text);\n\t\t}\n\t\treturn result;\n\t}",
"public List<Post> all() throws DataAccessException{\n String sql = \"select posts.id, posts.user_id, users.name, posts.title, posts.content, posts.create_date from posts join users on posts.user_id=users.id\";\n List<Post> posts = this.jdbcTemplate.query(sql, mapper);\n return posts;\n }",
"private ArrayList<BrowsePosts> getDataSet() {\n String[] projection = {\n Posts.PostEntry.COLUMN_NAME_TITLE,\n Posts.PostEntry.COLUMN_NAME_PRICE,\n Posts.PostEntry.COLUMN_NAME_PHOTO_DIR,\n Posts.PostEntry.COLUMN_NAME_DESCRIPTION,\n Posts.PostEntry.COLUMN_NAME_ADDRESS,\n };\n\n // How you want the results sorted in the resulting Cursor\n String sortOrder =\n Posts.PostEntry.COLUMN_NAME_PRICE + \" DESC\";\n\n Cursor cursor = db.query(\n Posts.PostEntry.TABLE_NAME, // The table to query\n projection, // The columns to return\n null, // The columns for the WHERE clause\n null, // The values for the WHERE clause\n null, // don't group the rows\n null, // don't filter by row groups\n sortOrder // The sort order\n );\n\n ArrayList<BrowsePosts> browsePosts = new ArrayList<BrowsePosts>();\n if (cursor.moveToFirst()) {\n do {\n browsePosts.add(new BrowsePosts(\n cursor.getString(cursor.getColumnIndex(Posts.PostEntry.COLUMN_NAME_TITLE)),\n cursor.getString(cursor.getColumnIndex(Posts.PostEntry.COLUMN_NAME_PRICE)),\n cursor.getString(cursor.getColumnIndex(Posts.PostEntry.COLUMN_NAME_PHOTO_DIR)),\n cursor.getString(cursor.getColumnIndex(Posts.PostEntry.COLUMN_NAME_DESCRIPTION)),\n cursor.getString(cursor.getColumnIndex(Posts.PostEntry.COLUMN_NAME_ADDRESS))));\n } while (cursor.moveToNext());\n }\n\n cursor.close();\n\n return browsePosts;\n }",
"@Inject\n public LocalApiImpl() {\n entityList= new ArrayList<>();\n for (int i=0; i<10; i++){\n PostEntity postEntity = new PostEntity();\n postEntity.setPostId(i);\n entityList.add(postEntity);\n }\n }",
"@Override\r\n\tpublic List<Post> getPostByName(String name) {\n\t\tString hql = \"from Post p where p.post_name =?\";\r\n\t\treturn (List<Post>) getHibernateTemplate().find(hql, name);\r\n\t}",
"List<WpPostsWithBLOBs> selectByExampleWithBLOBs(WpPostsExample example);",
"public List<?> getPosts(long organizationid) {\n\t\t \n\t\tList<?> postsList = null;\n\t\tCriteria query = null;\n\t\ttry { \n\t\t\tquery = getCurrentSession().createCriteria(Post.class); \n\t\t\t//aliases\n\t\t\tquery.createAlias(\"this.orgperson\", \"author\")\n\t\t\t\t .createAlias(\"author.organizationid\", \"organization\")\n\t\t\t\t .createAlias(\"author.personid\", \"orgperson\");\n\t\t\t//restrictions\n\t\t\tquery.add(Restrictions.eq(\"this.status\", \"A\"))\n\t\t\t\t .add(Restrictions.eq(\"author.orgpersonstatus\", 'A'))\n\t\t\t\t .add(Restrictions.eq(\"orgperson.personstatus\", 'A'))\n\t\t\t\t .add(Restrictions.eq(\"organization.organizationid\", organizationid)); \n\t\t\t\n\t\t\t\n\t\t\tquery.setProjection(Projections.projectionList()\n\t\t\t\t\t//post projections\n\t\t\t\t\t.add(Projections.distinct(Projections.property(\"this.id\").as(\"id\")))\n\t\t\t\t\t.add(Projections.property(\"this.bannerpath\").as(\"bannerpath\"))\n\t\t\t\t\t.add(Projections.property(\"this.commentable\").as(\"commentable\"))\n\t\t\t\t\t.add(Projections.property(\"this.content\").as(\"content\"))\n\t\t\t\t\t.add(Projections.property(\"this.date\").as(\"date\"))\n\t\t\t\t\t.add(Projections.property(\"this.media\").as(\"media\"))\n\t\t\t\t\t.add(Projections.property(\"this.status\").as(\"status\"))\n\t\t\t\t\t.add(Projections.property(\"this.title\").as(\"title\"))\n\t\t\t\t\t\n\t\t\t\t\t//author projections\n\t\t\t\t\t.add(Projections.property(\"author.orgpersonid\").as(\"authororgpersonid\")) \n\t\t\t\t\t.add(Projections.property(\"author.orgpersonstatus\").as(\"authororgpersonstatus\"))\n\t\t\t\t\t\n\t\t\t\t\t.add(Projections.property(\"orgperson.personid\").as(\"orgpersonId\"))\n\t\t\t\t\t.add(Projections.property(\"orgperson.firstName\").as(\"orgpersonFirstName\"))\n\t\t\t\t\t.add(Projections.property(\"orgperson.lastName\").as(\"orgpersonLastName\"))\n\t\t\t\t\t.add(Projections.property(\"orgperson.middleName\").as(\"orgpersonMiddleName\"))\n\t\t\t\t\t.add(Projections.property(\"orgperson.personphotourl\").as(\"orgpersonPhotourl\")) \n\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t \n\t\t\tOrder order = Order.desc(\"this.date\");\n\t\t\tquery.addOrder(order);\n\t\t\tpostsList = query.setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP).list(); \n\t\t\t \n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tpostServiceLogger.error(\"error in PostService for getPosts()\",e);\n\t\t}\n\t\treturn postsList;\n\t}",
"public static Result posts() {\n\t\tPost post = new Post();\n\t\tUser user = UserController.loggedInUser();\n\t\tif (user != null) {\n\t\t\tpost.city= user.city;\n\t\t\tpost.state = user.state;\n\t\t\tpost.country = user.country;\n\t\t\tpost.zipcode = user.zipcode;\n\t\t\tpost.createdBy = user.userName;\t\t\t\n\t\t}\n\t\t//TODO:Use bind() instead of the above to avoid 0.0 in price field\n\t\treturn ok(index.render(Post.listPosts(), form(Post.class).fill(post), user));\n\t}",
"public void setPosts(List<Post> posts){\n this.posts = posts;\n }",
"@Override\n\tpublic void getAll() {\n\t\tArrayList<Post> list = new ArrayList<Post>();\n\t\tlist = dao.selectAll();\n\t\t\n\t\tfor (Post p : list) {\n\t\t\tSystem.out.println(p.getPostId() + \".\" + p.getPostName() + \" 작성자:\" + p.getMemberId());\n\t\t}\n\t}",
"@Query(nativeQuery = true,\n\tvalue = \"SELECT * FROM posts WHERE post_type=\\\"\"+PostOfPage.DISCRIMINATOR_VALUE+\"\\\" AND page_id=:pageId AND user_id=:userId\")\n\tpublic List<PostOfPage> getUserPostsOfPage(long userId, long pageId);",
"public interface PostlinksDao {\n List<PostLink> queryAll(@Param(\"offset\")int offset, @Param(\"limit\")int limit);\n int insertPostLink(PostLink postlink);\n}",
"@Override\r\n\tpublic DataWrapper<List<CommentEntity>> getByPostId(Integer numPerPage, Integer pageNum,Long postsId) {\n\t\tDataWrapper<List<CommentEntity>> dataWrapper = new DataWrapper<List<CommentEntity>>();\r\n\t\tList<CommentEntity> ret = null;\r\n Session session = getSession();\r\n String sql = \"select c.commentid as commentid,c.postsid as postsid,c.contents as contents,c.time as time,c.userid as userid, u.username as username from comment c,user u where c.userid=u.userid\";\r\n if (postsId != null) {\r\n\t\t\tsql += \" and c.postsid=\" + postsId;\r\n\t\t}\r\n sql += \" order by c.time desc\";\r\n Query query=session.createSQLQuery(sql)\r\n\t\t\t\t.addScalar(\"commentid\",StandardBasicTypes.LONG)\r\n\t\t\t\t.addScalar(\"postsid\",StandardBasicTypes.LONG)\r\n \t\t.addScalar(\"contents\",StandardBasicTypes.STRING)\r\n \t\t.addScalar(\"time\",StandardBasicTypes.TIMESTAMP)\r\n \t\t.addScalar(\"userid\",StandardBasicTypes.LONG)\r\n \t\t.addScalar(\"username\",StandardBasicTypes.STRING)\r\n \t\t.setResultTransformer(Transformers.aliasToBean(CommentEntity.class));\r\n \r\n if (numPerPage == null) {\r\n\t\t\tnumPerPage = 10;\r\n\t\t}\r\n if (pageNum == null) {\r\n\t\t\tpageNum = 1;\r\n\t\t}\r\n int totalltemNum = (query.list().size());\r\n int totalPageNum = DaoUtils.getTotalPageNum(totalltemNum, numPerPage);\r\n \r\n \r\n if (numPerPage > 0 && pageNum > 0) {\r\n query.setMaxResults(numPerPage);\r\n query.setFirstResult((pageNum - 1) * numPerPage);\r\n }\r\n dataWrapper.setCurrentPage(pageNum);\r\n dataWrapper.setNumberPerPage(numPerPage);\r\n dataWrapper.setTotalPage(totalPageNum);\r\n dataWrapper.setTotalNumber(totalltemNum);\r\n ret=query.list();\r\n dataWrapper.setData(ret);\r\n return dataWrapper;\r\n\t}",
"public ArrayList<PostInfo> searchPost(int id) throws SQLException {\n //pl is postList\n ArrayList<PostInfo> pl = new ArrayList<>();\n String sql = \"SELECT * FROM `post` WHERE `post_id` = ?\";\n preparedStatement = connection.prepareStatement(sql);\n preparedStatement.setInt(1, id);\n resultSet = preparedStatement.executeQuery();\n while (resultSet.next()) {\n pl.add(new PostInfo(resultSet.getInt(\"post_id\"), resultSet.getInt(\"place_id\"), resultSet.getString(\"post_text\"),\n resultSet.getDate(\"post_time\"), resultSet.getInt(\"status\"), resultSet.getInt(\"user_id\"), resultSet.getInt(\"editor_id\")));\n }\n\n return pl;\n }",
"public interface ForumPostDao {\n\n List<ForumPostPO> getPostModels(int topic_id,int page, int page_size);\n\n ForumPostPO getPostModel(int id);\n\n int addPostModel(ForumPostPO post);\n\n int deletePostModels(int topic_id);\n\n int deletePostModel(int id);\n\n int updatePostModel(int id, ForumPostPO post);\n\n int getNumOfPosts(int topic_id);\n\n}",
"private void refreshFeed() {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.addDescendingOrder(\"createdAt\");\n query.setLimit(20);\n query.findInBackground(new FindCallback<Post>() {\n // Result of the call to Parse\n @Override\n public void done(List<Post> queryPosts, ParseException e) {\n // There is an error\n if(e != null) {\n Log.e(TAG, \"Error in getting posts\");\n return;\n }\n for(Post post : queryPosts) {\n // post.getUser() gets the Id... post.getUser().getUsername() gets the Username associated to the id of getUser in User's table\n Log.i(TAG, \"Post \" + post.getDescription() + \" username: \" + post.getUser().getUsername());\n }\n\n adapter.clear();\n adapter.addAll(queryPosts);\n }\n });\n }",
"WpPostsWithBLOBs selectByPrimaryKey(Long id);",
"@Override\n protected void loadNextDataFromApi(int page) {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.whereEqualTo(Post.KEY_USER, ParseUser.getCurrentUser());\n query.setLimit(POST_LIMIT);\n query.setSkip(POST_LIMIT*page);\n query.addDescendingOrder(Post.KEY_CREATED_AT);\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null){\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n for (Post post: posts){\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }\n });\n\n\n }",
"List<Post> findAllPosts();",
"public List<Post> getPosts(){return this.posts;}",
"List<WpPosts> selectByExample(WpPostsExample example);",
"@Override\n\tpublic List<Post> getRecentPostsForUser(String arg0, int arg1)\n\t\t\tthrows Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic List<Poor> getPoorList(Map<String, Object> params) {\n\t\treturn this.poorDAO.query(params);\n\t}",
"@GetMapping(\"/feed\")\n private ResponseEntity<List<Post>> getPosts() {\n User user = getCurrentUser();\n logger.info(\"Not null \" + (user == null));\n List<Post> posts = postService.findAllByUser(user);\n return new ResponseEntity<>(posts, HttpStatus.OK);\n }",
"public static ArrayList<Post> ParsePosts(JSONObject jsonTotalObject)\n {\n ArrayList<Post> posts = new ArrayList<>();\n try\n {\n JSONArray postArray = jsonTotalObject.getJSONArray(\"posts\");\n for(int i = 0 ;i<postArray.length();i++)\n {\n JSONObject object = postArray.getJSONObject(i);\n Post post = new Post();\n // Notice,use \"opt\" instead of \"get\" to avoid null value exception\n post.setTitle(object.optString(\"title\"));\n post.setId(object.optInt(\"id\"));\n post.setThumbnailUrl(Settings.DEFAULT_THUMBNAIL_URL);\n post.setUrl(object.optString(\"url\"));\n // Set to zero if there's no comment.\n post.setCommentCount(object.optInt(\"comment_count\", 0));\n post.setDate(object.optString(\"date\", \"N/A\"));\n post.setExcerpt(object.optString(\"excerpt\",\"N/A\"));\n post.setContent(object.optString(\"content\",\"N/A\"));\n // Care that author is not a String,it is a JSONObject\n JSONObject author = object.getJSONObject(\"author\");\n post.setAuthor(author.optString(\"name\", \"N/A\"));\n // if the post has it's thumbnail image,use it,or just keep default\n JSONObject featuredImages = object.optJSONObject(\"thumbnail_images\");\n if(featuredImages != null)\n {\n post.setFeaturedImageUrl(featuredImages.optJSONObject(\"full\")\n .optString(\"url\", Settings.DEFAULT_THUMBNAIL_URL));\n }\n posts.add(post);\n }\n return posts;\n }\n catch (JSONException e)\n {\n Log.e(TAG,\"JSONException when loading Posts\",e);\n e.printStackTrace();\n return null;\n }\n }",
"public ArrayList DataPost() {\r\n query = \"SELECT * from tbl_postingan_user\";\r\n hasil = dbConn.executeQuery(query, true);\r\n \r\n if (hasil){\r\n rsData = dbConn.getRs();\r\n listdata = new ArrayList <DataPosting>();\r\n try{ \r\n while(rsData.next()){\r\n DataPosting datapost=new DataPosting();\r\n datapost.setDataid_posting(rsData.getInt(1));\r\n datapost.setDataid_admin(rsData.getInt(2));\r\n datapost.setDataJudulPosting(rsData.getString(3));\r\n datapost.setDatadeskripsi(rsData.getString(4));\r\n datapost.setDatapays(rsData.getString(5));\r\n datapost.setDatacilent(rsData.getString(6));\r\n datapost.setDatanamaperusahaan(rsData.getString(7));\r\n datapost.setDatalocation(rsData.getString(8));\r\n datapost.setDataemail(rsData.getString(9));\r\n datapost.setDatacontact(rsData.getString(10));\r\n datapost.setDatadeadline(rsData.getString(11));\r\n datapost.setDatagambar(rsData.getString(12));\r\n// datapost.setDatadeskripsi(rsData.getString(\"deadline\"));\r\n \r\n listdata.add(datapost);\r\n }\r\n rsData.close();\r\n return listdata;\r\n }\r\n catch(SQLException ex){\r\n System.out.println(\"Terjadi Kesalahan Saat menampilkan Post User\");\r\n return null;\r\n }\r\n \r\n } \r\n return null;\r\n}",
"public List<User> getUsersByNumberOfPosts(int N);",
"public String[] findPost(String username, int postid){\n Connection c = null;\n PreparedStatement ps = null;\n ResultSet rs = null; \n\n String[] data = null;\n try {\n //Get connection\n c = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/CS144\", \"cs144\", \"\");\n\n //Prepare statement\n ps = c.prepareStatement(\"SELECT * FROM Posts WHERE username=? AND postid=?\");\n ps.setString(1, username);\n ps.setInt(2, postid);\n\n rs = ps.executeQuery();\n\n //set in data if exists: ASSUMES there is only one response\n if(rs.next()){\n data = new String[2];\n data[0] = rs.getString(\"title\");\n data[1] = rs.getString(\"body\");\n }\n\n } catch(SQLException e){\n //error handling\n System.out.println(\"SQLException caught.\");\n e.printStackTrace();\n } finally {\n //just need to close all\n try { rs.close(); } catch (Exception e) { /* ignored */ }\n try { ps.close(); } catch (Exception e) { /* ignored */ }\n try { c.close(); } catch (Exception e) { /* ignored */ }\n }\n\n return data;\n }",
"public List<PostEntry> savePost(String username, int postid, String title, String body){\n Connection c = null;\n PreparedStatement ps = null; \n ResultSet rs = null;\n\n boolean ret = true;\n\n //check if postid exists.\n if(postid>0 && findPost(username, postid)==null){\n return null;\n }\n try {\n //Get connection\n c = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/CS144\", \"cs144\", \"\");\n int changed;\n if(postid>0){\n //UPDATE\n System.out.println(\"update post!\");\n ps = c.prepareStatement(\"UPDATE Posts SET title=?, body=?, modified=? WHERE username=? AND postid=?\");\n ps.setString(1, title);\n ps.setString(2, body);\n ps.setTimestamp(3, new Timestamp(System.currentTimeMillis())); //set modified to current time\n ps.setString(4, username);\n ps.setInt(5, postid);\n\n changed = ps.executeUpdate();\n }\n else {\n //get largest postid and add 1 to get newID\n\n System.out.println(\"new post!\");\n ps = c.prepareStatement(\"SELECT MAX(postid) FROM Posts WHERE username=?\");\n ps.setString(1, username);\n\n rs = ps.executeQuery();\n int newID = 1;\n if(rs.next()){\n newID = rs.getInt(1) + 1;\n }\n ps.close();\n\n ps = c.prepareStatement(\"INSERT INTO Posts (username, postid, title, body, modified, created) VALUES(?,?,?,?,?,?)\");\n ps.setString(1, username);\n ps.setInt(2, newID);\n ps.setString(3, title);\n ps.setString(4, body);\n ps.setTimestamp(5, new Timestamp(System.currentTimeMillis())); //set modified to current time\n ps.setTimestamp(6, new Timestamp(System.currentTimeMillis())); //set created to current time\n \n changed = ps.executeUpdate();\n }\n\n if(changed==0){\n ret = false;\n }\n\n } catch(SQLException e){\n //error handling\n System.out.println(\"SQLException caught.\");\n e.printStackTrace();\n } finally {\n //just need to close all\n try { rs.close(); } catch (Exception e) { /* ignored */ }\n try { ps.close(); } catch (Exception e) { /* ignored */ }\n try { c.close(); } catch (Exception e) { /* ignored */ }\n }\n\n //return list data\n if(ret)\n return findList(username);\n else\n return null;\n }",
"@Override\r\n\tpublic List<Post> hotPosts() {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tList<Post> list=new ArrayList<Post>();\r\n\t\treturn postDao.hotPosts();\r\n\t\t\r\n\t}",
"public void initNegPosts(){\n\t\t\tdbAdapter = new DBAdapter(getActivity());\n\t\t\tdbAdapter.open();\n\t\t\tCursor c = dbAdapter.getNegPosts();\n\t\t\tSimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(\n\t\t\t\t\tgetActivity(), R.layout.postitem, c, new String[] {\n\t\t\t\t\t\t\t\"titel\", \"dato\", \"beloeb\" }, new int[] { R.id.titel,\n\t\t\t\t\t\t\tR.id.dato, R.id.beloeb});\n\t\t\tsetListAdapter(cursorAdapter);\n\t\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<Post> getPostsOf(int postId){\n \t\tList<Post> postList = null;\n\t\tCriteria query = null;\n\t\ttry {\n\t\t\t\n\t\t\t query = getCurrentSession().createCriteria(Post.class);\n\t\t\t \n\t\t\t query.createAlias(\"this.orgperson\", \"author\") \n\t\t\t .createAlias(\"author.personid\",\"authorPerson\")\n\t\t\t \t .createAlias(\"this.postcategories\", \"postcategories\")\n\t\t\t \t .createAlias(\"postcategories.category\", \"category\")\n\t\t\t \t .createAlias(\"this.postskills\", \"postskills\")\n\t\t\t \t .createAlias(\"postskills.skill\", \"skill\")\n\t\t\t \t .createAlias(\"this.posttags\", \"posttags\")\n\t\t\t \t .createAlias(\"posttags.tag\", \"tag\");\n\t\t\t \n\t\t\t query.add(Restrictions.eq(\"this.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"author.orgpersonstatus\", 'A'))\n\t\t\t \t .add(Restrictions.eq(\"authorPerson.personstatus\", 'A'))\n\t\t\t \t .add(Restrictions.eq(\"postcategories.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"category.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"postskills.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"skill.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"posttags.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"tag.status\", \"A\")) \n\t\t\t \t .add(Restrictions.eq(\"this.id\", postId));\n\t\t\t \n\t\t\t query.setProjection(Projections.projectionList()\n\t\t\t\t\t \n\t\t\t\t\t //post\n\t\t\t\t\t .add(Projections.property(\"this.id\").as(\"post_id\"))\n\t\t\t\t\t .add(Projections.property(\"this.title\").as(\"post_title\"))\n\t\t\t\t\t .add(Projections.property(\"this.content\").as(\"post_content\")) \n\t\t\t\t\t .add(Projections.property(\"this.bannerpath\").as(\"post_bannerpath\"))\n\t\t\t\t\t .add(Projections.property(\"this.commentable\").as(\"post_commentable\"))\n\t\t\t\t\t .add(Projections.property(\"this.date\").as(\"post_date\"))\n\t\t\t\t\t .add(Projections.property(\"this.media\").as(\"post_media\")) \n\t\t\t\t\t .add(Projections.property(\"this.status\").as(\"post_status\")) \n\t\t\t\t\t //authorperson\n\t\t\t\t\t .add(Projections.property(\"authorPerson.personid\").as(\"authorPersonPersonId\"))\n\t\t\t\t\t .add(Projections.property(\"authorPerson.firstName\").as(\"authorPersonFirstName\"))\n\t\t\t\t\t .add(Projections.property(\"authorPerson.lastName\").as(\"authorPersonLastName\"))\n\t\t\t\t\t .add(Projections.property(\"authorPerson.middleName\").as(\"authorPersonmiddleName\")) \n\t\t\t\t\t //category\n\t\t\t\t\t .add(Projections.property(\"category.id\").as(\"categoryId\")) \n\t\t\t\t\t .add(Projections.property(\"category.name\").as(\"categoryName\")) \n\t\t\t\t\t //skill\n\t\t\t\t\t .add(Projections.property(\"skill.id\").as(\"skillId\")) \n\t\t\t\t\t .add(Projections.property(\"skill.name\").as(\"skillName\")) \n\t\t\t\t\t//tag\n\t\t\t\t\t .add(Projections.property(\"tag.id\").as(\"tagId\")) \n\t\t\t\t\t .add(Projections.property(\"tag.name\").as(\"tagName\")) \n\t\t\t\t\t \n\t\t\t\t\t ); \n\t\t\t \n\t\t\t postList = query.setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP).list(); \n\t\t\t \t \t \n\t\t} catch (Exception e) {\n\t\t\tpostServiceLogger.error(\"error in PostService for getPostsOf()\",e);\n\t\t} \n\t\treturn postList;\n\t}",
"public Iterable<Post> findAll(){\n return postDao.findAll();\n }",
"PaginatedSearchResponseModel findAllPostsForUser(Party partyBean, Pageable page);",
"@Override\n public List<Post> getPostsByUser(Long userId) {\n return userDao.gePostsByUser(userId);\n }",
"@Override\r\n\tpublic Post searchInfById(Post post2) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tResultSet resultSet=postDao.selectById(post2);\r\n\t\tPost post=new Post();\r\n\t\ttry {\r\n\t\t\tif(resultSet.next()) {\r\n\t\t\t\tpost.setPostId(resultSet.getInt(1));\r\n\t\t\t\tpost.setPostName(resultSet.getString(3));\r\n\t\t\t\tpost.setUserId(resultSet.getInt(2));\r\n\t\t\t\tpost.setPostProperty(resultSet.getInt(4));\r\n\t\t\t\tpost.setPostEnterNum(resultSet.getInt(5));\r\n\t\t\t\tpost.setPostTime(resultSet.getDate(6));\r\n\t\t\t\tpost.setPostScore(resultSet.getDouble(7));\r\n\t\t\t\tpost.setScoreCount(resultSet.getInt(8));\r\n\t\t\t\tpost.setLastComTime(resultSet.getDate(9));\r\n\t\t\t\tpost.setResId(resultSet.getInt(10));\r\n\t\t\t\tpost.setResPath(resultSet.getString(12));\r\n\t\t\t\tpost.setUserName(resultSet.getString(14));\r\n\t\t\t\tpost.setUserLevel(resultSet.getInt(16));\r\n\t\t\t\tpost.setUserStatus(resultSet.getInt(17));\r\n\t\t\t\tpost.setPropertyName(resultSet.getString(19));\r\n\t\t\t\tpost.setLocation(resultSet.getString(22));\r\n\t\t\t\tpost.setPhone(resultSet.getString(23));\r\n\t\t\t\tpost.setPostCode(resultSet.getInt(24));\r\n\t\t\t\tpost.setEmail(resultSet.getString(25));\r\n\t\t\t\tpost.setGender(resultSet.getString(26));\r\n\t\t\t\tpost.setHobby(resultSet.getString(27));\r\n\t\t\t\tpost.setMajor(resultSet.getString(28));\r\n\t\t\t\tpost.setScore(resultSet.getInt(29));\r\n\t\t\t\tpost.setNickName(resultSet.getString(30));\r\n\t\t\t\tpost.setUserRegion(resultSet.getString(31));\r\n\t\t\t\tpost.setUserPhoto(resultSet.getString(32));\r\n\t\t\t\tpost.setComCount(resultSet.getInt(39));\r\n\t\t\t\t\r\n\t\t\t\treturn post;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\treturn null;\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"private void fetchPostos() {\n //CRIA UMA REFERENCIA PARA A COLEÇÃO DE POSTOS\n\n FirebaseFirestore.getInstance().collection(\"/postos\")\n .addSnapshotListener(new EventListener<QuerySnapshot>() {\n @Override\n public void onEvent(@Nullable QuerySnapshot queryDocumentSnapshots, @Nullable FirebaseFirestoreException e) {\n //VERIFICANDO SE ENCONTROU ALGUMA EXCEÇÃO CAPAZ DE IMPEDIR A EXECUÇÃO, CASO ENCONTRE, PARE A APLICAÇÃO\n if (e != null) {\n Log.e(\"TESTE\", \"Erro: \", e);\n return;\n }\n //REFERÊNCIA PARA TODOS POSTOS DA BASE\n List<DocumentSnapshot> documentos = queryDocumentSnapshots.getDocuments();\n\n\n for (DocumentSnapshot doc : documentos) {\n Posto posto = doc.toObject(Posto.class);\n int cont = 0;\n for (int i = 0; i < denunciasNaBase.size(); i++) {\n\n if (denunciasNaBase.get(i).getPosto().equalsIgnoreCase(posto.getCnpj())) {\n Log.d(\"TESTE\", \"Posto \" + posto.getCnpj() + \"denuncia \" + denunciasNaBase.get(i).getPosto());\n cont++;\n }\n }\n if (cont > 0) {\n adapter.add(new DenunciaItem(posto, cont));\n }\n }\n\n }\n });\n }",
"@Override\n\tpublic JCRPageList getPostForSplitTopic(String topicPath) throws Exception {\n\t\treturn null;\n\t}",
"DataProviders retrieveProviders() throws RepoxException;",
"DataProviders retrieveProviders() throws RepoxException;",
"List<Post> findAll();",
"public List<Post> search(PostCriteria criteria, int page, int size);",
"public Collection getLastEnablePosts_inThread_limit(int threadID, int rowsToReturn)\r\n throws IllegalArgumentException, DatabaseException;",
"@Override\n public List<Post> refresh() {\n try {\n this.posts = manager.refreshFeed(this.user.getEmail());\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n return posts;\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<Post> getPostsOf(int postId , int userId){\n\t\t\n\t\tList<Post> postList = null;\n\t\tCriteria query = null;\n\t\ttry {\n\t\t\t\n\t\t\t query = getCurrentSession().createCriteria(Post.class);\n\t\t\t \n\t\t\t query.createAlias(\"this.orgperson\", \"author\") \n\t\t\t .createAlias(\"author.personid\",\"authorPerson\")\n\t\t\t \t .createAlias(\"this.postcategories\", \"postcategories\")\n\t\t\t \t .createAlias(\"postcategories.category\", \"category\")\n\t\t\t \t .createAlias(\"this.postskills\", \"postskills\")\n\t\t\t \t .createAlias(\"postskills.skill\", \"skill\")\n\t\t\t \t .createAlias(\"this.posttags\", \"posttags\")\n\t\t\t \t .createAlias(\"posttags.tag\", \"tag\");\n\t\t\t \n\t\t\t query.add(Restrictions.eq(\"this.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"author.orgpersonstatus\", 'A'))\n\t\t\t \t .add(Restrictions.eq(\"authorPerson.personstatus\", 'A'))\n\t\t\t \t .add(Restrictions.eq(\"postcategories.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"category.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"postskills.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"skill.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"posttags.status\", \"A\"))\n\t\t\t \t .add(Restrictions.eq(\"tag.status\", \"A\")) \n\t\t\t \t .add(Restrictions.eq(\"this.id\", postId))\n\t\t\t \t .add(Restrictions.eq(\"author.orgpersonid\", userId));\n\t\t\t \n\t\t\t query.setProjection(Projections.projectionList()\n\t\t\t\t\t \n\t\t\t\t\t //post\n\t\t\t\t\t .add(Projections.property(\"this.id\").as(\"post_id\"))\n\t\t\t\t\t .add(Projections.property(\"this.title\").as(\"post_title\"))\n\t\t\t\t\t .add(Projections.property(\"this.content\").as(\"post_content\")) \n\t\t\t\t\t .add(Projections.property(\"this.bannerpath\").as(\"post_bannerpath\"))\n\t\t\t\t\t .add(Projections.property(\"this.commentable\").as(\"post_commentable\"))\n\t\t\t\t\t .add(Projections.property(\"this.date\").as(\"post_date\"))\n\t\t\t\t\t .add(Projections.property(\"this.media\").as(\"post_media\")) \n\t\t\t\t\t .add(Projections.property(\"this.status\").as(\"post_status\")) \n\t\t\t\t\t //authorperson\n\t\t\t\t\t .add(Projections.property(\"authorPerson.personid\").as(\"authorPersonPersonId\"))\n\t\t\t\t\t .add(Projections.property(\"authorPerson.firstName\").as(\"authorPersonFirstName\"))\n\t\t\t\t\t .add(Projections.property(\"authorPerson.lastName\").as(\"authorPersonLastName\"))\n\t\t\t\t\t .add(Projections.property(\"authorPerson.middleName\").as(\"authorPersonmiddleName\")) \n\t\t\t\t\t //category \n\t\t\t\t\t .add(Projections.property(\"postcategories.id\").as(\"postCategoryId\"))\n\t\t\t\t\t .add(Projections.property(\"postcategories.status\").as(\"postCategoryStatus\"))\n\t\t\t\t\t .add(Projections.property(\"category.id\").as(\"categoryId\")) \n\t\t\t\t\t .add(Projections.property(\"category.name\").as(\"categoryName\")) \n\t\t\t\t\t //skill\n\t\t\t\t\t .add(Projections.property(\"postskills.id\").as(\"postSkillsId\"))\n\t\t\t\t\t .add(Projections.property(\"postskills.status\").as(\"postSkillsStatus\"))\n\t\t\t\t\t .add(Projections.property(\"skill.id\").as(\"skillId\")) \n\t\t\t\t\t .add(Projections.property(\"skill.name\").as(\"skillName\")) \n\t\t\t\t\t//tag\n\t\t\t\t\t .add(Projections.property(\"posttags.id\").as(\"postTagsId\"))\n\t\t\t\t\t .add(Projections.property(\"posttags.status\").as(\"postTagsStatus\"))\n\t\t\t\t\t .add(Projections.property(\"tag.id\").as(\"tagId\")) \n\t\t\t\t\t .add(Projections.property(\"tag.name\").as(\"tagName\")) \n\t\t\t\t\t \n\t\t\t\t\t ); \n\t\t\t \n\t\t\t postList = query.setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP).list();\n\t\t\t \n\t\t\t \t \t \n\t\t} catch (Exception e) {\n\t\t\tpostServiceLogger.error(\"error in PostService for getPostsOf()\",e);\n\t\t}\n\t\treturn postList;\n\t}",
"public TableModelPosto(ArrayList<Posto> listPostos) {\n postos = listPostos;\n }",
"public List<TdiaryArticle> list(Object rp) throws SQLException {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic List<JobPostDTO> retrieveAllJobPost(List<DropDownDTO> companyList,\r\n\t\t\tint offset, int noOfRecords, String sortBy) {\r\n\t\treturn employerJobPostDAO.retrieveAllJobPost(\r\n\t\t\t\tcompanyList, offset, noOfRecords, sortBy);\r\n\t}",
"void displayAllPosts();",
"public void initPosPosts(){\n\t\tdbAdapter = new DBAdapter(getActivity());\n\t\tdbAdapter.open();\n\t\tCursor c = dbAdapter.getPosPosts();\n\t\tSimpleCursorAdapter cursorAdapter = new SimpleCursorAdapter(\n\t\t\t\tgetActivity(), R.layout.postitem, c, new String[] {\n\t\t\t\t\t\t\"titel\", \"dato\", \"beloeb\" }, new int[] { R.id.titel,\n\t\t\t\t\t\tR.id.dato, R.id.beloeb});\n\t\tsetListAdapter(cursorAdapter);\n\t}",
"@SelectProvider(type=NewsSqlProvider.class, method=\"selectByExample\")\n @Results({\n @Result(column=\"NEWS_ID\", property=\"newsId\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"TITLE\", property=\"title\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"BODY\", property=\"body\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"IMG_URL\", property=\"imgUrl\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"URL\", property=\"url\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"CREATE_TIME\", property=\"createTime\", jdbcType=JdbcType.TIMESTAMP)\n })\n List<News> selectByExample(NewsExample example);",
"@GetMapping(\"\")\n public ResponseEntity <List<Post>>listAllPosts() {\n return ResponseEntity.ok(postService.listAllPosts());\n }"
]
| [
"0.63703614",
"0.61037874",
"0.6029133",
"0.58628166",
"0.5811506",
"0.5795049",
"0.57381475",
"0.5736242",
"0.5655117",
"0.55752885",
"0.5569433",
"0.5566766",
"0.55633485",
"0.5535597",
"0.54935545",
"0.54833627",
"0.5482948",
"0.5411096",
"0.54063255",
"0.5384617",
"0.53683764",
"0.53651315",
"0.5340073",
"0.5296887",
"0.5293852",
"0.5286667",
"0.5286266",
"0.5270654",
"0.52592784",
"0.5237149",
"0.5236453",
"0.52331656",
"0.5215629",
"0.52074045",
"0.5203212",
"0.5202945",
"0.51799613",
"0.5161364",
"0.5146121",
"0.5145846",
"0.51454735",
"0.51454735",
"0.5129701",
"0.511933",
"0.511933",
"0.51180553",
"0.51158035",
"0.51088846",
"0.5083764",
"0.50816387",
"0.50637865",
"0.5060415",
"0.5050357",
"0.5035469",
"0.5030787",
"0.50295293",
"0.50273156",
"0.50269973",
"0.5010097",
"0.5005211",
"0.5001447",
"0.49999315",
"0.49826303",
"0.49633622",
"0.4953507",
"0.49446586",
"0.49416897",
"0.49385798",
"0.49334204",
"0.4927198",
"0.49260306",
"0.49167624",
"0.4913653",
"0.49096578",
"0.48982427",
"0.4897249",
"0.48872277",
"0.48851562",
"0.48832655",
"0.4877853",
"0.48778006",
"0.48703632",
"0.4865595",
"0.48536918",
"0.48492384",
"0.48460144",
"0.48410186",
"0.48410186",
"0.48336038",
"0.48308033",
"0.48302457",
"0.4825548",
"0.48230642",
"0.4808639",
"0.48014984",
"0.48000064",
"0.4794034",
"0.47867036",
"0.47854805",
"0.4785038"
]
| 0.49906966 | 62 |
Verify the Title of the PECOS Page. | public void verifyDashboardTitle() {
app.azzert().titleEquals("PECOS");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean verifyPageTitle(String pageTitle) {\n commonMethods.switchToFrame(driver, \"frameMain\");\n String headerName = $(header).text();\n switchTo().defaultContent();\n return (headerName.contains(pageTitle));\n }",
"@Test\n\tpublic void titlevalidation() throws IOException\n\t{\n\t\t\n\t\tLandingpage l=new Landingpage(driver);\n\t\t//compare text from the browser with the actual text\n\t\t//here comes assertion\n\t\tAssert.assertEquals(l.title().getText(),\"FEATURED COURSES\");\n\t\tlog.info(\"Compared properly\");\n\t\t\n\t}",
"public void verifyPageTitle(String page) {\n\t\tWebElement title=driver.findElement(By.xpath(\"//a[contains(text(),'\"+page+\"')]\"));\n\t\tmoveToElement(title);\n\t\tAssert.assertTrue(isElementPresent(title),\"The [\"+page+\"] is not present]\");\n\t}",
"public boolean verifyTitle(String title) {\n\t\tif (getter().getTitle().equals(title)) {\r\n\t\t\tSystem.out.println(\"Page title: \"+title+\" matched successfully\");\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Page url: \"+title+\" not matched\");\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public String validatePageTitle(){\n\treturn driver.getTitle();\t\n\t}",
"@Test \n\tpublic void homePageTitleTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\t\t\n\t\t//Fetch title \n\t\tString title = homePage.getTitle();\n\t\t\n\t\t//Assert title content \n\t\tAssert.assertTrue(title.equals(\"Lorem Ipsum - All the facts - Lipsum generator\"));\n\t}",
"public static void pageTitleVerify(String expected) {\r\n\t\tString actual = driver.getTitle();\r\n\t\tAssert.assertEquals(actual, expected);\r\n\t\tReporter.log(\"Page title is Verified\");\r\n\r\n\t}",
"public boolean checkPageTitle(String title) {\n return new WebDriverWait(webDriver, DRIVER_WAIT_TIME).until(ExpectedConditions.titleIs(title));\n }",
"@Test\n public void verifyTitleOfHomePageTest()\n {\n\t \n\t String abc=homepage.validateHomePageTitle();\n\t Assert.assertEquals(\"THIS IS DEMO SITE FOR \",abc );\n }",
"private void checkTitle(final WebDriver driver) {\r\n\t\tfinal String title = driver.getTitle();\r\n\t\tAssert.assertEquals(\"Wrong page title\", PAGE_TITLE, title);\r\n\t}",
"public void verifyPage() {\n\t\twaitForPageToLoad();\n\t\tString title = driver.getTitle();\n\t\tSystem.out.println(title);\n\t\tAssert.assertEquals(title,\"News: India News, Latest Bollywood News, Sports News, Business & Political News, National & International News | Times of India\");\n\t}",
"@Test(priority = 2, dependsOnMethods = {\n\t\t\t\"navigatetosyndicationstatus\" }, description = \"To Verify Title and Title Text\")\n\tpublic void VerifyTitleTxt() throws Exception {\n\t\tdata = new TPSEE_Syndication_Status_Page(CurrentState.getDriver());\n\t\tdata.VerifyTitlenText();\n\t\taddEvidence(CurrentState.getDriver(), \"To Verify Title and Title Text\", \"yes\");\n\t}",
"public void validateTitle()\r\n\t{\r\n\t\tString titleDisplayed = this.heading.getText();\r\n\t\tassertEquals(titleDisplayed, \"Dashboard\");\r\n\t\tSystem.out.println(\"Value is asserted\");\r\n\t\t\t}",
"public static void verifyPageTitle(WebDriver driver,String expectedTitle)\n\t{\n\t\tWebDriverWait wait = new WebDriverWait(driver,20);\n\t\twait.until(ExpectedConditions.titleContains(expectedTitle));\n\t\tString actualTitle = driver.getTitle();\n\t\tif(actualTitle.equals(expectedTitle))\n\t\t{\n\t\t\tSystem.out.println(\"The Expected Page is Dispalyed--->\"+expectedTitle);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"The Expected Page is not Dispalyed--->\"+actualTitle);\n\t\t}\n\t}",
"@When(\"^User checks$\")\r\n\r\n\tpublic void user_cahecks_the_title() throws Throwable {\n\r\n\t\tSystem.out.println(\"Page Title \" + driver.getTitle());\r\n\r\n\t\tActualTitle =driver.getTitle();\r\n\r\n\t}",
"public boolean verifyTitle(String expTitle)\n\t{\n\t\tif(expTitle.equals(driver.getTitle().trim()))// if 1.1 started here\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"@Test(priority=0)\n\tpublic void titleVerification() {\n\t\tString expectedTitle = \"Facebook – log in or sign up\";\n\t\tString actualTitle = driver.getTitle();\n\t\tAssert.assertEquals(actualTitle, expectedTitle);\n\t}",
"@Test\n\n public void validateAppTitle() throws IOException {\n LandingPage l = new LandingPage(driver);\n //compare the text from the browser with actual text.- Error..\n Assert.assertEquals(l.getTitle().getText(), \"FEATURED COURSES\");\n\n System.out.println(\"Test running from Inside docker for tests dated 22-03-2020\");\n System.out.println(\"Test completed\");\n\n ;\n\n\n }",
"public boolean verifyPageTitle(By by) {\n commonMethods.switchToFrame(driver, \"frameMain\");\n Boolean isDisplayed = $(by).isDisplayed();\n switchTo().defaultContent();\n return isDisplayed;\n }",
"public boolean checkPageTitleContains(String title) {\n return new WebDriverWait(webDriver, DRIVER_WAIT_TIME)\n .until(ExpectedConditions.titleContains(title));\n }",
"protected void VerifyExpectedPageIsShown(String expectedTitle) {\n\t\tString actualTitle = getPageTitle();\n\t\t\n\t\tif (!expectedTitle.equals(actualTitle))\n\t\t\tReports.logAMessage(LogStatus.FAIL, \"The actual page title '\" + actualTitle + \"' is not equal to the expected page title '\" + expectedTitle + \"'\");\n\t\t\n\t\tassertEquals(expectedTitle, actualTitle);\n\t}",
"public String validateAddVehiclePageTitleTitle(){\n\t\treturn driver.getTitle();\n\t}",
"@Test(priority=3, dependsOnMethods= {\"validateUrl\"})\n\tpublic void validateTtitle() {\n\t\t\n\t\tString actualTtitle = driver.getTitle();\n\t\tString expectedTitle = \"Messenger\";\n\t\tAssert.assertEquals(actualTtitle, expectedTitle);\n\t\t\n\t\t\n\t\t\n\t\tReporter.log(\"Validating the messanger page title\");\n\t\t\n\t}",
"public boolean titlePresent(String title){\n\t\t\t boolean pageRedirected = false;\n\t pageRedirected = driver.getTitle().equals(title);\n\t Reporter.log(\"==========title Presnt for ProductPage======\", true);\n\t \n\t return pageRedirected;\n\t }",
"public static void verify_browser_title(String expectedTitle) throws CheetahException {\n\t\ttry {\n\t\t\tWebDriverWait wait = new WebDriverWait(CheetahEngine.getDriverInstance(), 2);\n\t\t\twait.until(ExpectedConditions.titleContains(expectedTitle));\n\n\t\t} catch (NoSuchElementException e) {\n\t\t\tthrow new CheetahException(e);\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\t\t}\n\t}",
"public String validateLoginPageTitle() {\n\t\treturn driver.getTitle();\n\t\t\n\t}",
"@Then(\"^get the title home page$\")\r\n public void test_amazon_login_page_title() {\r\n\r\n driver.manage().timeouts().pageLoadTimeout(4, TimeUnit.SECONDS);\r\n driver.manage().timeouts().implicitlyWait(4, TimeUnit.SECONDS);\r\n\r\n String title = driver.getTitle();\r\n Assert.assertEquals(\"Amazon.com: Online Shopping for Electronics, Apparel, Computers, Books, DVDs & more\", title);\r\n }",
"@Then(\"^check the heading of the page$\")\r\n\tpublic void check_the_heading_of_the_page() throws Exception {\n\t\tString heading=driver.findElement(By.xpath(\".//*[@id='mainCnt']/div[1]/div[1]/h1\")).getText();\r\n\t\tif(heading.contentEquals(\"Hotel Booking Application\")) {\r\n\t\t\tSystem.out.println(\"content matched\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"content not matched\");\r\n\t\t}\r\n\t\tThread.sleep(2000);\r\n\t//\tdriver.close();\r\n\t}",
"public String validateLoginPageTitle() {\n\t\treturn driver.getTitle();\n\t}",
"boolean hasTitle();",
"protected boolean titlePageNeeded(){\n return true;\n }",
"@When(\"^title of the page is Guru$\")\n\tpublic void title_of_the_page_is_Guru() {\n\t\tString title= driver.getTitle();\n\t\t Assert.assertEquals(title, \"Guru99 Bank Home Page\");\n\t\t System.out.println(title);\n\t}",
"public String validateLoginPageTitile(){\n return driver.getTitle();//qani vor gettitley stringa get berum menq\n }",
"@Then(\"^I should see \\\"([^\\\"]*)\\\" page$\")\n public void i_should_see_page(String arg1) throws Throwable {\n settings.verifyPageTitle(arg1);\n\n\n }",
"public boolean isValidTitle(Title title);",
"@Test\r\n\t\tpublic void testShowsCorrectTitle() {\r\n\t\t\t\r\n\t\t\t// Simply check that the title contains the word \"Hoodpopper\"\r\n\t\t\t\r\n\t\t\tString title = driver.getTitle();\r\n\t\t\tassertTrue(title.contains(\"Hoodpopper\"));\r\n\t\t}",
"@Test\n\tpublic void accountsPageTitleTest(){\n\t\tSystem.out.println(\"Test 1\");\n\t\tString title = driver.getTitle();\n\t\tSystem.out.println(\"Page Title is: \" + title);\n\t\tAssert.assertEquals(title, \"My Account\"); // Assert is a Class and AssertEquals is a Static method as it is referred by class name\n\t}",
"public void verifySessionIntroTitle(){\r\n String actualIntroHeading = driver.findElement(By.className(introHeadingClassLocator)).getText().trim();\r\n Assert.assertTrue(actualIntroHeading.contains(expectedIntroHeading),\"Intro Title is present.\");\r\n }",
"public void verifyDemoPageisOpened(String strTitleofthepage) {\r\n\t\tWebElement demopage = driver.findElement(By.xpath(\"//h3[text()='\" + strTitleofthepage + \"']\"));\r\n\t\tif (demopage.isDisplayed()) {\r\n\t\t\tSystem.out.println(demopage.getText() + \"is opened\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Expected page is not opened\");\r\n\t\t}\r\n\t}",
"public void assertTitle(final String title);",
"public void validateTitle( WebDriver driver,String title) {\n\t\t\ttry {\n\t\t\tAssert.assertEquals(driver.getTitle(), title);\n\t\t\tlogger.log(LogStatus.INFO, \"Document title is validated\"+driver.getTitle());\n\t\t\t}\n\t\t\tcatch(AssertionError e)\n\t\t\t{\n\t\t\t\tlog.logReport(\"Document title is not matched with Expected \"+title);\n\t\t\t\tlogger.log(LogStatus.INFO, \"Document title is not matched with Expected \"+title );\n\t\t\t}\n\t\t}",
"@Test\n @Then(\"Headphones page is opened\")\n public void s08_HPUrlCheck() {\n String currentHPTitle = driver.getTitle();\n if (currentHPTitle.contains(\"Наушники\")) {\n System.out.println(\"Step08 PASSED\");\n }\n else\n {\n System.out.println(\"Step08 FAILED\");\n }\n System.out.println(\"Step08 PASSED\");\n }",
"public String verifyTitle(String object, String data) {\n\t\tlogger.debug(\"Verifying title\");\n\t\ttry {\n\t\t\tString actualTitle = driver.getTitle();\n\t\t\tString expectedTitle = data.trim();\n\t\t\tif (actualTitle.equals(expectedTitle))\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- Title not verified \" + expectedTitle + \" -- \" + actualTitle;\n\t\t}\n\t\t\n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" Error in retrieving title\";\n\t\t}\n\t}",
"public boolean isPageLoaded (String title){\n botStyle.waitForPageTitle(title, 60);\n return driver.getTitle().equals(title);\n }",
"@Test(groups ={Slingshot,Regression})\n\tpublic void verifyTitleField() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Title Field validations and its appropriate error message\"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDataspl\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.StandardUserCreation()\n\t\t.ValidateAddnewUserTitleField(userProfile);\t\t\t\t \t \t\t\t\t\t\t\n\t}",
"public void verifyCEPracticeAreaLoadedInNewWindow(String cedemopagetitle) {\n\t assertByPageTitle(cedemopagetitle);\n }",
"public String getPageTitle()\n {\n return page == null ? StringUtils.EMPTY : page.getElementInfo().getTitle();\n }",
"public static boolean checkTitle(String title) {\r\n\t\tboolean result = false;\r\n\t\tif (check(title) && title.matches(CommandParameter.REG_EXP_TITLE)) {\r\n\t\t\tresult = true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"@Test \n\tpublic void homePageHeaderTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// Validate page header \n\t\tString header = homePage.getHeader();\n\t\tAssert.assertTrue(header.equals(\"\"));\n\n\t\t// Fetch latin quote: \n\t\tString latinQuote = homePage.getQuote(\"latin\");\n\t\tAssert.assertEquals(\"\\\"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit...\\\"\", latinQuote);\n\n\t\t// Fetch english quote, which is: \n\t\tString englishQuote = homePage.getQuote(\"english\"); \n\t\tAssert.assertEquals(\"\\\"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain...\\\"\",englishQuote); \n\t}",
"public static boolean verifyTitleOfWebPage(WebDriver driver, String expected) throws InterruptedException {\n\t\tThread.sleep(2000);\n\t\ttry {\n\n\t\t\tif (driver != null) {\n\t\t\t\tString actualtitle = driver.getTitle();\n\t\t\t\tif (actualtitle.equalsIgnoreCase(expected))\n\n\t\t\t\t\treturn true;\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Expected is \" + expected + \" but found \" + actualtitle);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Driver is not initilased.\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Some exception occured. \" + e.getMessage());\n\t\t\treturn false;\n\t\t}\n\t}",
"public String getTitle(){\n\t\tlog.debug(\"Getting title of Cruises page\");\n\t\tString title = driver.getTitle();\n\t\tlog.info(\"Title of Cruises page is: \"+title);\n\t\treturn title;\n\t}",
"@Test(priority = 2)\n //@Parameters({\"browser\"})\n public void testPageTitleA2() throws Exception{\n driver.get(\"http://www.snapdeal.com\");\n //Thread.sleep(5000);\n String strPageTitle = driver.getTitle();\n System.out.println(\"SnapDeal : \"+strPageTitle);\n try{\n Assert.assertTrue(strPageTitle.contains(\"Amazon\"), \"SnapDeal : Page title doesn't match : \"+strPageTitle);\n }catch (Exception e){\n System.out.println(e);\n }\n //Thread.sleep(5000);\n // driver.quit();\n }",
"public void waitForPageTitle(String pageTitle) {\n\t\ttry {\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, 30);\n\t\t\twait.until(ExpectedConditions.titleContains(pageTitle.split(\",\")[0]));\n\t\t} catch (Exception ex) {\n\t\t\tWebDriverWait wait = new WebDriverWait(driver, 30);\n\t\t\twait.until(ExpectedConditions.titleContains(pageTitle.split(\",\")[1]));\n\t\t}\n\t}",
"@Given(\"Goto settings page and verify title\")\n\tpublic void goto_settings_page_and_verify_title() throws InterruptedException {\n\t\tdriver.findElement(By.xpath(\"//div[@id='sidebar-wrapper']/div/a[4]/span[2]\")).click();\n\t\tThread.sleep(2000);\n\t\tString SettingsTitle = driver.getTitle();\n\t\tSystem.out.println(\"THe page title is: \" +SettingsTitle);\n\t\tThread.sleep(2000);\n\t}",
"public final String getPageTitle() {\n\t\treturn pageTitle;\n\t}",
"public void title(WebDriver driver) {\r\n double start = System.currentTimeMillis();\r\n driver.getTitle();\r\n double res = (System.currentTimeMillis() - start) / 1000;\r\n String result = String.valueOf(res);\r\n if (!driver.getTitle().equals(\"\")) {\r\n log = \"+\";\r\n PASSED_TEST++;\r\n } else {\r\n log = \"!\";\r\n FAILED_TEST++;\r\n }\r\n resultTitle = log + \" [checkPageTitle \\\"\" + driver.getTitle() + \"\\\"]\" + \" \" + result + \"\\n\";\r\n resTime += res;\r\n countTESTS++;\r\n }",
"public String getPageTitle() {\n\t\treturn pageTitle;\n\t}",
"public String pagetitle() throws Exception{\r\n\t\t\ttry {\r\n\t\t\t\tStr_pagetitle = driver.getTitle();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"FAILED TO GET THE PAGE TITLE:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn Str_pagetitle;\r\n\t\t}",
"public boolean isSitePage(final String pageTitle)\n {\n boolean displayed = false;\n try\n {\n String selector = \"div.dijitSelected span\";\n String title = findAndWait(By.cssSelector(selector)).getText();\n displayed = pageTitle.equalsIgnoreCase(title) ? true : false;\n }\n catch (NoSuchElementException e)\n {\n displayed = false;\n }\n return displayed;\n }",
"public String getPageTitle() {\r\n\t\treturn this.pageTitle;\r\n\t}",
"@Test(priority = 1,enabled = true)\n //@Parameters({\"browser\"})\n public void testPageTitleA1() throws Exception{\n driver.navigate().to(\"http://www.youtube.com\");\n //Thread.sleep(5000);\n String strPageTitle = driver.getTitle();\n System.out.println(\"Youtube : \"+strPageTitle);\n Assert.assertTrue(strPageTitle.contains(\"Flipkart\"), \"Youtube : Page title doesn't match : \"+strPageTitle);\n //Thread.sleep(5000);\n // driver.quit();\n }",
"public void Verify_Expected_Header_Visibility()\r\n\t{\r\n\t\tString Runtime_Header_text=Page_header.getText();\r\n\t\tif(Runtime_Header_text.equals(Exp_page_header))\r\n\t\t\tSystem.out.println(\"Expected Header visible at webpage\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Expected Header not visible at webpage\");\r\n\t}",
"public boolean waitForTitlePresent(String title){\n\t\t\n\t\twait.until(ExpectedConditions.titleIs(title));\n\t\treturn true;\n\t}",
"public boolean hasTitle(final String title);",
"protected void addTitlePage(Document doc) throws Exception {\n \n \t\tdoc.add(new Paragraph(\"\\n\\n\\n\\n\"));\r\t\t\t\n // data dictionary\n Font font = FontFactory.getFont(FontFactory.HELVETICA_BOLD, 22);\n \t\tParagraph prg = new Paragraph(\"Data Dictionary\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n doc.add(prg);\n \n doc.add(new Paragraph(\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\"));\n \n // full definition\n font = FontFactory.getFont(FontFactory.HELVETICA_BOLD, 14);\n prg = new Paragraph(\"Definition of\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n doc.add(prg);\n \n // dataset name\n font = FontFactory.getFont(FontFactory.HELVETICA_BOLD, 26);\n prg = new Paragraph(dsName, font);\n \t\tprg.setAlignment(Element.ALIGN_CENTER);\n \t\tdoc.add(prg);\n \t\t\n \t\t// dataset word\n font = FontFactory.getFont(FontFactory.HELVETICA, 14);\n \t\tprg = new Paragraph(\"dataset\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n doc.add(prg);\n \n \t\tdoc.add(new Paragraph(\"\\n\\n\"));\n \t\t\n \t\t// version\n \t\tprg = new Paragraph();\n \t\tprg.add(new Chunk(\"Version: \", font));\n \t\tprg.add(new Chunk(dsVersion, font));\n \t\tprg.setAlignment(Element.ALIGN_CENTER);\n \t\tdoc.add(prg);\n \t\t\n \t\t// date\n \t\t//prg = new Paragraph(getTitlePageDate());\n \t\t//prg.setAlignment(Element.ALIGN_CENTER);\n \t\t//doc.add(prg);\n \n doc.add(new Paragraph(\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"));\n \n // European Environment Agency\n font = FontFactory.getFont(FontFactory.TIMES_BOLD, 12);\n prg = new Paragraph(\"European Environment Agency\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n \n if (!Util.voidStr(logo)){\n Image img = Image.getInstance(logo);\n img.setAlignment(Image.LEFT);\n \n prg.add(new Chunk(img, 0, 0));\n }\n \n doc.add(prg);\n }",
"public default boolean hasTitle() {\n\t\tString title = getTitle();\n\t\treturn title != null && !title.trim().isEmpty();\n\t}",
"@Override\n @Nonnull\n public String getPlainText ()\n {\n return m_aPageTitle.getPlainText ();\n }",
"@Test(dependsOnMethods = \"testAddTitleRequiredFields\")\n\tpublic void testAddTitle() {\n\t\t\n\t\t//Instantiate titles page object.\n\t\tTitlesPage titlesPageObject = new TitlesPage(driver);\n\t\t\n\t\t//Set the local title name variable to value created in titles page object.\n\t\ttitle = titlesPageObject.getTitleName();\n\t\t\n\t\t//Enter in the name value into the 'Name' field.\n\t\tReporter.log(\"Enter in a name value into the 'Name' field.<br>\");\n\t\ttitlesPageObject.enterTitleName();\n\t\t\n\t\t//Click the 'Create Title' button.\n\t\tReporter.log(\"Click the 'Create Title' button.<br>\");\n\t\ttitlesPageObject.clickCreateTitleButton();\n\t\t\n\t\t//Verify the success message is displayed to indicate a successful title creation.\n\t\tReporter.log(\"Verify an success message is displayed to indicate a successful title creation.<br>\");\n\t\tAssert.assertTrue(titlesPageObject.verifyTitlesPageSuccessMessage(), \"Unable to verify the title was successfully created; please investigate.\");\n\t\t\n\t\t//Verify the newly created title exists in the list of titles.\n\t\tReporter.log(\"Verify the newly created title value of [ \"+ title +\" ] is displayed in the list of titles on the page.<br>\");\n\t\tAssert.assertTrue(titlesPageObject.verifyTitleInList(title, true), \"Unable to verify the newly created title was found in the list of titles; please investigate.\");\n\t\t\n\t}",
"@When(\"I am on Home page\")\n public void homepage_i_am_on_home_page() {\n homePage = new HomePage(driver);\n homePage.check_page_title();\n }",
"@Test\n public void panelTitleTest() {\n Player.GetItem item = getPlayerHandler().getMediaItem();\n onView(withId(R.id.title)).check(matches(withText(item.getTitle())));\n }",
"public void setPageTitle(String pageTitle) {\r\n\t\tthis.pageTitle = pageTitle;\r\n\t}",
"@SmallTest\n\tpublic void testTitle() {\n\t\tassertEquals(getActivity().getTitle(), solo.getString(R.string.title_activity_memory_game));\n\t}",
"public boolean ECbannertitleCheck(ExtentTest extentedReport) throws Exception {\n\t\ttry {\n\t\t\treturn GenericUtils.verifyWebElementTextEquals(txtBannerName, \"Engagement Centre\");\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tthrow new Exception(\"Exception while getting banner title\" + e);\n\t\t}\n\n\t}",
"public static void printTitle( String title )\r\n {\n }",
"public static String getPageTitle() {\n\t\tLOG.info(\"Reading current page title.\");\n\t\treturn Constants.driver.getTitle();\n\n\t}",
"public void verifyCourseArchivesLoadedInNewWindow(String coursearchivespagetitle) {\n assertByPageTitle(coursearchivespagetitle);\t\n }",
"@Test(dependsOnMethods = \"testUpdateTitleRequiredFields\")\n\tpublic void testUpdateTitle() {\n\t\t\n\t\t//Instantiate titles page object.\n\t\tTitlesPage titlesPageObject = new TitlesPage(driver);\n\t\t\n\t\t//Set the local updated title name variable to value created in titles page object.\n\t\tupdatedTitle = titlesPageObject.getTitleName();\n\t\t\n\t\t//Enter in the name value into the 'Name' field.\n\t\tReporter.log(\"Enter in a name value into the 'Name' field.<br>\");\n\t\ttitlesPageObject.clearTitleNameField();\n\t\ttitlesPageObject.enterTitleName();\n\t\t\n\t\t//Click the 'Update Title' button.\n\t\tReporter.log(\"Click the 'Update Title' button.<br>\");\n\t\ttitlesPageObject.clickUpdateTitleButton();\n\t\t\n\t\t//Verify the success message is displayed to indicate an successful title update.\n\t\tReporter.log(\"Verify an success message is displayed to indicate a successful title update.<br>\");\n\t\tAssert.assertTrue(titlesPageObject.verifyTitlesPageSuccessMessage(), \"Unable to verify the title was successfully updated; please investigate.\");\n\t\t\n\t\t//Verify the newly created title exists in the list of titles.\n\t\tReporter.log(\"Verify the newly updated title value of [ \"+ updatedTitle +\" ] is displayed in the list of titles on the page.<br>\");\n\t\tAssert.assertTrue(titlesPageObject.verifyTitleInList(updatedTitle, true), \"Unable to verify the newly updated title was found in the list of titles; please investigate.\");\n\t\t\n\t}",
"public static void VerifyThreeItem_ContainerTitle(String renderControl){\n\t\tboolean actualThreeItemTitle=false;\n\t\ttry{\n\t\t\tactualThreeItemTitle=sitecoreObj.aboutusThreeItemContainerTitle.isDisplayed();\n\t\t\tAssert.assertEquals(actualThreeItemTitle, true);\n\t\t\tlog.info(\"The Actual AboutUs \" + renderControl + \" Container Header Title - <\"+sitecoreObj.aboutusThreeItemContainerTitle.getTagName()+\">\");\n\t\t\tlog.info(\"The Expected AboutUs \" + renderControl + \" Container Header Title - <h2>\");\n\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs \" + renderControl + \" Container Header Title are Same\");\n\t\t}catch(AssertionError e){\n\t\t\tlog.error(\"The Actual AboutUs \" + renderControl + \" Container Header Title - <\"+sitecoreObj.aboutusThreeItemContainerTitle.getTagName()+\">\");\n\t\t\tlog.error(\"The Expected AboutUs \" + renderControl + \" Container Header Title - <h2>\");\n\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs \" + renderControl + \" Container Header Title are NOT same\");\n\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\tlog.error(\"TEST FAILED: There is No Container Header Title element On \" + renderControl + \" Container\");\n\t\t}\t\t\n\t}",
"public void validateTitle(String title){\n boolean isValid = title != null && !title.isEmpty();\n setTitleValid(isValid);\n }",
"public boolean verifyTabTitles(String pagename, boolean Screenshot, ExtentTest extentReport) throws Exception {\n\t\tboolean status = false;\n\t\tWaitUtils.waitForElementPresent(driver, pageActiveTitle, \"Element is displayed on data capture page\");\n\t\tswitch (pagename.toLowerCase()) {\n\n\t\tcase \"datacapture\":\n\t\t\tif (pageActiveTitle.getAttribute(\"title\").equals(\"Data Capture\")) {\n\t\t\t\tstatus = true;\n\t\t\t\treturn status;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \"pricepresentation\":\n\t\t\tWaitUtils.waitForElementPresent(driver, pageActiveTitle,\n\t\t\t\t\t\"Element is displayed on data capture page\");\n\n\t\t\tif (pageActiveTitle.getAttribute(\"title\").equals(\"Cover/Price Presentation\")) {\n\t\t\t\tstatus = true;\n\t\t\t\treturn status;\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase \"acceptance\":\n\t\t\tWaitUtils.waitForElementPresent(driver, pageActiveTitle, \"Element is displayed on data capture page\");\n\n\t\t\tif (pageActiveTitle.getAttribute(\"title\").equals(\"Acceptance\")) {\n\t\t\t\tstatus = true;\n\t\t\t\treturn status;\n\t\t\t}\n\t\t\tbreak;\n\n\t\t}\n\t\treturn status;\n\n\t}",
"public void assertWindowTitle(String seriesName) {\r\n\r\n\t\tString windowText = driver.getTitle();\r\n\t\t// Assert.assertEquals(\"Text not found!\", windowText.contains(seriesName));\r\n\t\tAssert.assertEquals(true, windowText.contains(seriesName));\r\n\t}",
"public String getModalPageTitle() {\n waitForLoadingScreen();\n return findVisibleElement(modalPageTitle).getText();\n }",
"@Test\n public void dashboardPageTest(){\n test = report.createTest(\"Dashboard Page Title Test\");\n test.info(\"logging in to application\");\n loginPage.login(\"driver_username\", \"driver_password\");\n wait.until(ExpectedConditions.textToBePresentInElement(dashboardPage.pageHeader,\"Quick Launchpad\"));\n String actual = dashboardPage.pageHeader.getText();\n test.info(\"verifying page title\");\n assertEquals(actual, \"Quick Launchpad\");\n test.pass(\"PASS: Dashboard Page Title Test\");\n }",
"public String get_defineSetupPage_Titletext() {\r\n\t\treturn FetchText(DefineSetupPageTitle);\r\n\t}",
"public boolean isSetTitle()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(TITLE$2) != null;\n }\n }",
"@Test \n\tpublic void homePageParagraphTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\n\t\t// Check paragraph count \n\t\tint paragraphCount = homePage.getParagraphCount(); \n\t\tAssert.assertTrue(paragraphCount == 5);\n\n\t\t// Validate \"What is Lorum Ipsum?\" paragraph \n\t\tList<String> what = homePage.getParagraph(\"what\");\n\t\tAssert.assertEquals(\"What is Lorem Ipsum?\", what.get(0)); \n\t\tAssert.assertTrue(what.get(1).startsWith(\"Lorem Ipsum is simply dummy text of the printing and typesetting industry\"));\n\n\t\t// Validate Why do we use it? paragraph \n\t\tList<String> why = homePage.getParagraph(\"why\"); \n\t\tAssert.assertEquals(\"Why do we use it?\", why.get(0));\n\t\tAssert.assertTrue(why.get(1).startsWith(\"It is a long established fact \"));\n\n\t\t// Validate Where does it come from? paragraph\n\t\tList<String> where = homePage.getParagraph(\"where\"); \n\t\tAssert.assertEquals(\"Where does it come from?\",where.get(0));\n\t\tAssert.assertTrue(where.get(1).startsWith(\"Contrary to popular belief, Lorem Ipsum is not simply random text.\"));\n\n\t\t// Validate Where can I get some? paragraph \n\t\tList<String> getSome = homePage.getParagraph(\"getSome\"); \n\t\tAssert.assertEquals(\"Where can I get some?\", getSome.get(0));\n\t\tAssert.assertTrue(getSome.get(1).startsWith(\"There are many variations of passages of Lorem Ipsum available,\"));\n\t}",
"public static void verifyLogOutPageTitleLeadsToLoginPage() {\n click(AMAZON_PAGE_TITLE);\n }",
"public static void VerifyTitleText_ContentTitle(String xPath, String headerTag){\n\t\tString actualTitleTextContentTitle = null;\n\t\tfor(int i=1; i<=3; i++){\n\t\ttry{\n\t\t\tactualTitleTextContentTitle=Driver.findElement(By.xpath(xPath + i + \"]/\" + headerTag + \"[1]\")).getText();\n\t\t\tAssert.assertEquals(actualTitleTextContentTitle, dataSourceProvider.getProperty(\"Article\" + i + \"Title\"));\n\t\t\tlog.info(\"The Actual AboutUs Title Text is - \"+actualTitleTextContentTitle);\n\t\t\tlog.info(\"The Expected AboutUs Title Text is - \"+dataSourceProvider.getProperty(\"Article\" + i + \"Title\"));\n\t\t\tlog.info(\"TEST PASSED: The Actual and Expected AboutUs Title Text are Same\");\n\t\t}catch(AssertionError e){\n\t\t\tlog.error(\"The Actual AboutUs Title Text is - \"+actualTitleTextContentTitle);\n\t\t\tlog.error(\"The Expected AboutUs Title Text is - \"+dataSourceProvider.getProperty(\"Article\" + i + \"Title\"));\n\t\t\tlog.error(\"TEST FAILED: The Actual and Expected AboutUs TitleText ContentTitle are NOT same\");\n\t\t}catch(org.openqa.selenium.NoSuchElementException e){\n\t\t\tlog.error(\"TEST FAILED: There is No Override article ContentTitle element On TitleText Container\");\n\t\t}\t\t\n\t }\n\t}",
"public abstract boolean Verifypage();",
"@Then(\"^titel of page is \\\"([^\\\"]*)\\\"$\")\r\n public void titel_of_page_is(String arg1) throws Throwable {\n throw new PendingException();\r\n }",
"@Step\n\tpublic void getQuoteTitle(String toverify) {\n\t\tlog.info(\"get the quote Title \" + quoteTable.getIntro());\n\t\tlog.info(\"And we want it to be \" + toverify);\n\t\tassertThat(quoteTable.getIntro(), equalToIgnoringCase(toverify));\n\t}",
"public void VerifyCustomeralsoViewedTitle(String Exptext){\r\n\t\tString[] ExpText = getValue(Exptext).split(\",\", 2);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Title with \"+ExpText+\" should be present in SKU Page\");\r\n\t\ttry{\r\n\t\t\tif(getAndVerifyTextfromList(locator_split(\"txtCustomeralsoOrdered\"), ExpText[1], Integer.valueOf(ExpText[0]))){\r\n\t\t\t\tSystem.out.println(ExpText[1]+\" is present\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- \"+ExpText[1]+\" is present in SKU Page\");\r\n\t\t\t} else{ \r\n\t\t\t\tthrow new Error(\"Actual Text: \"+ExpText[1]+\" is not present in SKU Page\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(NoSuchElementException e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- \"+elementProperties.getProperty(\"txtCustomeralsoOrdered\").toString() +\" is not Present\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtCustomeralsoOrdered\").toString()\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch(Error Er){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Actual Text: \"+ExpText[1]+\" is not present in SKU Page\");\r\n\t\t\tthrow new Error(\"Expected text - '\"+ExpText[1]+\" and Actual Text : \"+getText(locator_split(\"txtCustomeralsoOrdered\"))+\" is not equal\");\r\n\t\t}\r\n\t}",
"private boolean updateTitle()\r\n\t{\r\n\t\tString newTitle = titleBase != null ? titleBase : \"\";\r\n\r\n\t\tif (propertyBrowser.isReadOnly() && readonlyText != null)\r\n\t\t{\r\n\t\t\tnewTitle += readonlyText;\r\n\t\t}\r\n\r\n\t\tif (propertyBrowser.isObjectModified() && modifiedText != null)\r\n\t\t{\r\n\t\t\tnewTitle += modifiedText;\r\n\t\t}\r\n\r\n\t\tif (title == null || !title.equals(newTitle))\r\n\t\t{\r\n\t\t\ttitle = newTitle;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Feature(value = \"Site testing\")\n @Stories(value = {@Story(value = \"Main page functionality\"),\n @Story(value = \"Service page functionality\")})\n @Test(priority = 1)\n public void mainPageTitleBeforeLoginTest() {\n checkMainPageTitle(mainPage);\n }",
"public boolean isSetTitle() {\n return this.Title != null;\n }",
"public void setTitle(String title) {\r\n if (title != null) {\r\n this.title = title;\r\n }\r\n else{\r\n System.out.println(\"Not a valid title\");\r\n }\r\n }",
"public boolean validateSignin() {\n\t\tString titleExpected = PageTitleConstant.SIGN_IN_PAGE;\n\n\t\tboolean result = validatePageTitle(titleExpected);\n\t\tif (result) {\n\n\t\t\tstoreVerificationResults(true, \"Page Title displayed\");\n\n\t\t} else {\n\n\t\t\tstoreVerificationResults(false, \"Page Title not displayed\");\n\n\t\t}\n\n\t\treturn result;\n\t}",
"public void verifyGUIBoxTitleComment() {\n getLogger().info(\"Verify Box's Title Comment\");\n try {\n boolean result;\n final String count;\n if (!listCommentItemEle.isEmpty())\n count = \"\" + listCommentItemEle.size();\n else\n count = \"0\";\n final String defaultBoxTitleComment = \"Comments\" + \"\\n\" + count;\n waitForVisibleElement(commentboxTitleEle, \"Comment Box Title.\");\n validateDisPlayedElement(commentboxTitleEle, \"Comment Box Title.\");\n result = validateElementText(commentboxCountNumberEle, count);\n Assert.assertTrue(result, \"Box's Title Count Number Comment is displayed unsuccessfully\");\n result = validateElementText(commentboxTitleEle, defaultBoxTitleComment);\n Assert.assertTrue(result, \"Box's Title Comment is displayed unsuccessfully\");\n NXGReports.addStep(\"Verify Box's Title Comment\", LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n getLogger().info(e);\n NXGReports.addStep(\"TestScript Failed: Verify Box's Title Comment\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }",
"public void testGetTitle() {\n System.out.println(\"getTitle\");\n Wizard instance = new Wizard();\n String expResult = \"\";\n String result = instance.getTitle();\n assertEquals(expResult, result);\n }",
"public boolean isSetTitle() {\n return this.title != null;\n }"
]
| [
"0.7749022",
"0.76598877",
"0.7625787",
"0.75181973",
"0.7455886",
"0.7383603",
"0.7286721",
"0.71532434",
"0.71418893",
"0.71308804",
"0.7056476",
"0.7024089",
"0.7015088",
"0.69725645",
"0.69391966",
"0.6918346",
"0.6906277",
"0.6877098",
"0.6832605",
"0.68047404",
"0.6777953",
"0.6690513",
"0.6659666",
"0.6637236",
"0.66254604",
"0.6554676",
"0.65458137",
"0.65411127",
"0.65310806",
"0.6521085",
"0.6515161",
"0.6508268",
"0.65022624",
"0.6499923",
"0.6486944",
"0.64487594",
"0.6416054",
"0.6402749",
"0.63082504",
"0.6304958",
"0.63045937",
"0.62979835",
"0.6295881",
"0.6295638",
"0.6248625",
"0.62180007",
"0.6217728",
"0.62135214",
"0.61991936",
"0.6198937",
"0.6197157",
"0.6166972",
"0.6145339",
"0.61076534",
"0.6094894",
"0.6086221",
"0.60508746",
"0.60307455",
"0.6026801",
"0.60097545",
"0.60038245",
"0.5984686",
"0.598279",
"0.59163046",
"0.59095097",
"0.5908171",
"0.59025615",
"0.5896139",
"0.58793294",
"0.5875496",
"0.5861557",
"0.585836",
"0.5846108",
"0.58411866",
"0.5837566",
"0.5836624",
"0.5831185",
"0.5824786",
"0.5821907",
"0.5816394",
"0.5810873",
"0.58071697",
"0.5789322",
"0.57892877",
"0.57887965",
"0.57872754",
"0.5786998",
"0.57721686",
"0.57414573",
"0.5735071",
"0.57276374",
"0.57274157",
"0.5716474",
"0.5704706",
"0.57039803",
"0.57030064",
"0.57019776",
"0.5699097",
"0.56910974",
"0.56861377"
]
| 0.7289267 | 6 |
Verify the Element in the Dashboard page. | public void verifyOnDashboardPage() {
verifyUserLoggedIn.waitForState().enabled(30);
verifyUserLoggedIn.assertContains().text("Dev Links");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void checkElements() {\n mActivityTestRule.launchActivity(intentForWeb()); // launch the activity with the intent\n\n onWebView().check(webContent(hasElementWithId(\"email_input\")));\n onWebView().check(webContent(hasElementWithId(\"password_input\")));\n onWebView().check(webContent(hasElementWithId(\"submit_button\")));\n }",
"private void checkPage() {\n Assert.assertTrue(\"Electric cars button not displayed.\",electricCars.isDisplayed());\n }",
"public void isElementVisible(WebElement elem) {\n try {\n driverWait.until(ExpectedConditions.visibilityOf(elem));\n System.out.println(\"Element is present in the page\");\n } catch (Exception e) {\n Assert.fail(\"Element isn't present in the page\");\n }\n }",
"public void verifyElementIsVisible(String elementName) {\n wait.forElementToBeDisplayed(5, returnElement(elementName), elementName);\n Assert.assertTrue(\"FAIL: Yellow Triangle not present\", returnElement(elementName).isDisplayed());\n }",
"public void verifyUIElements(){\r\n\t\t\tisClickable(Txt_HomePage_Search);\r\n\t\t\tisClickable(Btn_HomePage_Search);\r\n\t\t}",
"@Test\n @Issue(\"EZ-8885\")\n void verifyGeneralElementsOnLoginPage() {\n LoginPage loginPage = new LoginPage(BaseUrl.loginPageBaseUrl());\n loginPage.open().getStatusLoginFields();\n LoginPage.getButtonsStatus();\n\n SoftAssertions softly = new SoftAssertions();\n softly.assertThat(loginPage.getStatusLoginFields()).isTrue();\n softly.assertThat(LoginPage.getButtonsStatus()).isTrue();\n softly.assertThat(getBrowserConsoleErrors()).isFalse();\n softly.assertAll();\n\n }",
"public boolean validatePageElements() {\n boolean nameCheck = name.isDisplayed() && name.isEnabled();\n boolean emailCheck = email.isDisplayed() && email.isEnabled();\n boolean passwordCheck = password.isDisplayed() && password.isEnabled();\n boolean signupGoogleCheck = signupGoogle.isDisplayed() && signupGoogle.isEnabled();\n boolean signupSlackCheck = signupSlack.isDisplayed() && signupSlack.isEnabled();\n boolean signupOutlookCheck = signupOutlook.isDisplayed() && signupOutlook.isEnabled();\n boolean signupAppleCheck = signupApple.isDisplayed() && signupApple.isEnabled();\n boolean signupFacebookCheck = signupFacebook.isDisplayed() && signupFacebook.isEnabled();\n boolean logoCheck = miroLogo.isDisplayed();\n\n return nameCheck && emailCheck && passwordCheck && signupGoogleCheck && signupSlackCheck && signupOutlookCheck && signupAppleCheck && signupFacebookCheck && logoCheck;\n\n }",
"public static boolean verifyVisibilityOfElement(WebElement element) {\n\t\ttry {\n\n\t\t\tif (element.isDisplayed())\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Some exception occured.\" + e.getMessage());\n\t\t\treturn false;\n\t\t}\n\t}",
"public void checkVisibility(WebElement element) {\n wait = new WebDriverWait(driver, 15, 50);\n wait.until(ExpectedConditions.visibilityOf(element));\n }",
"@Test (groups = {\"Regression\"})\n public void verifyElementsOnHarrowWebsiteHomePageAreDisplayed() {\n homePage.isDisplayedServicesBtn();\n }",
"@Test(priority = 1)\n\tprotected void landingpageVerification() {\n\t\tAssert.assertEquals(spincoLandingPage.isLogoDisplayed(),true);\n\t\tspincoLandingPage.clickLoginRegister();\n\t}",
"public boolean verifyPageLoad() {\n\t\tboolean result = lnkLoginButton.isDisplayed();\n\t\tLog.info(\"Home Page Loaded Successfully\");\n\t\treturn result;\n\t}",
"public String verifyUserOnWomenPage(){\n WebElement womenPage = driver.findElement(By.cssSelector(\"div[class='breadcrumb clearfix'] a[title='Dresses']\"));\n String womenPageStatus = womenPage.getText();\n return womenPageStatus;\n }",
"public void verifyThePageLoadsSuccessfully(String columnType) {\n\t\tWebElement element=findElement(By.xpath(\"//a[text()='\"+columnType+\"']\"));\n Assert.assertTrue(element.isDisplayed());\t\t\n\t}",
"public static void isPupupPreasent(WebElement ele ,String objectName) {\n if (ele.isDisplayed())\n\t{System.out.println(ele +\"Is displayed in he screen\");}\n else \n\t{System.out.println(ele+\"not found in the Screen\");}\n\n\n}",
"public boolean isDashboardPagePresent() {\r\n\t\treturn isElementPresent(dashboardPage, SHORTWAIT);\r\n\t}",
"@Step(\"There are the following elements on Different Elements page: 4 checkboxes, 4 radios, 1 dropdown, 2 buttons\")\n public void checkElements() {\n checkboxes.shouldHaveSize(4);\n radios.shouldHaveSize(4);\n dropdown.shouldBe(Condition.exist);\n buttons.shouldHaveSize(2);\n }",
"public static void waitForElementVisiblity(WebElement element) {\n\t\t\t\n\t\t}",
"public void verifyAgentPageIsDisplayed() throws Exception {\n\n\t\twdriver.findElement(By.xpath(WebData.verifyAgentScreen)).isDisplayed();\n\t}",
"@Test\n public void testDashboardLink() {\n dashboardPage.clickOnDashboardNavLink();\n //expected result: user is on dashboard \n \n String expectedPanelHeadingText = \"Dashboard\";\n String actualPanelHeadingText = dashboardPage.getPanelHeadingText();\n \n assertTrue(\"Failed - panel heading texts don't match\", expectedPanelHeadingText.equals(actualPanelHeadingText));\n \n}",
"public void validatePageLoad() {\n\t\tJavascriptExecutor js;\n\t\tjs = (JavascriptExecutor) uiElementAction.driver;\n\t\tboolean assertion =\n\t\t\t\tjs.executeScript(\"return document.readyState\").equals(\"complete\") == true;\n\t\tLog.info(\"The page loaded successfully: \" + assertion);\n\t\tAssert.assertTrue(\"The page loaded successfully: \" + assertion, assertion);\n\t}",
"public void verifyApplyButtonInAboutMe() throws UIAutomationException{\r\n\t\telementController.requireElementSmart(fileName,\"Apply Button In About Me\",GlobalVariables.configuration.getAttrSearchList(), \"Apply Button In About Me\");\r\n\t\t\t\t\r\n\t\t// Assertion : Check Button is present on page\r\n\t\tString linkText=dataController.getPageDataElements(fileName, \"Apply Button Name In About Me\", \"Name\");\r\n\t\tSystem.out.println(linkText);\r\n // UIActions.waitForLinkText(linkText,Integer.parseInt(GlobalVariables.configuration.getConfigData().get(\"TimeOutForFindingElementSeconds\")));\r\n\t}",
"public static String verifyElements() throws SQLException, InterruptedException, IOException\n\t{\n\n\t\tAPPLICATION_LOGS.debug(\"Executing test case : Verifying all the attributes of the Login Page\");\n\t\tFacebookLibrary.navigate();\n\t\t// Verify whether Username input-box, Password input-box and SignIn button present on the page or not\n\t\tBoolean usernameFieldPresent=FunctionLibrary.isElementPresent(locatorUserNameInputBox, nameUserNameInputBox);\n\t\tBoolean passwdFieldPresent=FunctionLibrary.isElementPresent(locatorPasswordInputBox, namePasswordInputBox);\n\t\tBoolean signInButtonPresent=FunctionLibrary.isElementPresent(locatorLogInButton, nameLogInButton);\n\n\t\tif(!usernameFieldPresent && !passwdFieldPresent && !signInButtonPresent )\n\t\t{\n\t\t\treturn \"Fail : Username Field or Password Field or SignIn button is not present on the page \";\n\t\t}\n\t\treturn \"Pass: All elements are present in the Login Page\";\n\n\n\t}",
"public static void VerifySum()\r\n\t {\r\n\t WebElement BagSum = Browser.instance.findElement(BagValueSum);\r\n\t\r\n\t if(BagSum.getAttribute(\"value\").equals(output))\r\n\t {\r\n\t\tSystem.out.println(\"Bag Value Sum is Matching\"); \r\n\t } \r\n\t else\r\n\t {\r\n\t\t System.out.println(\"Bag Value Sum is not matching\");\r\n\t }\r\n\r\n\t\tWebDriverWait wait=new WebDriverWait(Browser.instance,10);\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(cancelButton));\r\n\t\tBrowser.instance.findElement(cancelButton).click();\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(confirmYesButton));\r\n\t\tBrowser.instance.findElement(confirmYesButton).click();\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(editButton));\r\n\r\n}",
"@Given(\"^user launch on dashboard page$\")\r\n\tpublic void user_launch_on_dashboard_page() {\r\n\t\tdashboarpage.validatelandedondashboarpage();\r\n\t}",
"public void verifyPage() {\n\t\twaitForPageToLoad();\n\t\tString title = driver.getTitle();\n\t\tSystem.out.println(title);\n\t\tAssert.assertEquals(title,\"News: India News, Latest Bollywood News, Sports News, Business & Political News, National & International News | Times of India\");\n\t}",
"public void ValidateProductSearchIsSuccessfull(){\n\t if (driver.findElement(search_refinement_categories_segment).isDisplayed()){\n\t Assert.assertTrue(true);\n\t logger.info(\"Search Page is displayed because refinement category is displayed\");\n\t }\n\t else{\n\t logger.fatal(\"Search Page is not displayed because refinement category is not displayed\");\n\t Assert.fail(\"Search Page is not displayed because refinement category is not displayed\");\n\t }\n\t }",
"public static void verify_element_is_displayed(By locator) throws CheetahException {\n\t\ttry {\n\t\t\twait_for_element(locator);\n\t\t\tWebElement element = CheetahEngine.getDriverInstance().findElement(locator);\n\t\t\tdriverUtils.highlightElement(element);\n\t\t\tdriverUtils.unHighlightElement(element);\n\t\t\tassertEquals(true, element.isDisplayed());\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\n\t\t}\n\n\t}",
"public void verifyAddAgentPage() throws Exception {\n\n\t\twdriver.findElement(By.xpath(WebData.verifyAddAgentPage)).isDisplayed();\n\t}",
"public void verify_AddSubCategoriesPage_DisplayedElements() {\n\n\t\tboolean bstatus;\n\n\t\tbstatus = isElementDisplayed(select_mainCategory, true);\n\t\tReporter.log(bstatus, \"Main Category drop displayed \", \"Main Category drop down not displayed\");\n\n\t\tbstatus = isElementDisplayed(edit_SubCategory, true);\n\t\tReporter.log(bstatus, \"Sub Category text field displayed\", \"Sub Category text field not displayed\");\n\n\t\tbstatus = isElementDisplayed(select_AssignedOrder, true);\n\t\tReporter.log(bstatus, \"Assigned order drop down displayed\", \"Assigned order drop down not displayed\");\n\n\t\tbstatus = isElementDisplayed(btn_Submit, true);\n\t\tReporter.log(bstatus, \"Submit button displayed\", \"Submit button not displayed\");\n\n\t}",
"@Test\n public void BalanceIsShown() {\n onView(withId(R.id.balanceText)).check(matches(isDisplayed()));\n onView(withId(R.id.balanceField)).check(matches(isDisplayed()));\n }",
"@Override\n\tprotected void isLoaded() throws Error {\n\t\tassertTrue(driver.findElement(By.xpath(\"//a[contains(text(),'Reports')]\")).getText().toString()\n\t\t\t\t.contains(\"Reports\"));\n\t}",
"@Then(\"user verifies that {string} message is displayed\")\n public void user_verifies_that_message_is_displayed(String expectedWarningMessage) {\n\n String actualWarningMessage = loginPage.getWarningMessageText();\n Assert.assertEquals(expectedWarningMessage,actualWarningMessage);\n // Assert.assertTrue(loginPage.warningMessage.isDisplayed()); //if the webelement is setted as public\n\n\n\n }",
"public void VerifyHomepage(){\r\n\t\t//String username = getValue(Email);\r\n\t//\tString password = getValue(Password);\r\n\r\n\t//\tclass Local {};\r\n\t\t/*Reporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");*/\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\t//driver.findElement(locator_split(\"btn_privacyok\")).click();\r\n\t\tclick(locator_split(\"btn_privacyok\"));\r\n\t\t\t\r\n\t\t\t/*Reporter.log(\"PASS_MESSAGE:- My Account is clicked and user is logged in\");*/\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- User is not logged in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"public boolean isDisplayed(WebElement ElementToCheck){\n\t\tWebDriverWait wait = new WebDriverWait(driverInstance, Constants.DRIVER_WAIT);\n\t\ttry{\n\t\t\twait.until(ExpectedConditions.visibilityOf(ElementToCheck));\n\t\t\treturn ElementToCheck.isDisplayed();\n\t\t}\n\t\tcatch(Exception E){\n\t\t\tLog.error(\"Element is not getting displayed\");\n\t\t\treturn false;\n\t\t}\n\t}",
"public VerifyController verifyIsDisplayed(By element) {\n\t\tassertTrue(getChromeDriver().findElement(element).isDisplayed());\n\t\treturn this;\n\t}",
"public void checkOutFlight() {\n confirmationPage.checkButton();\n }",
"public void verifyGeneralTrainingIsDisplayed() {\n\t\t moveToElement(generalTraining);\n Assert.assertTrue(generalTraining.isDisplayed());\t\n reportInfo();\n\t }",
"public WebElement verifyRegistrationPage(WebDriver driver) {\n\t\t\treturn driver.findElement(By.xpath(\"//strong[text()='Registration']\"));\n\t\t}",
"public void v_Verify_Guest1_Displayed(){\n\t}",
"public boolean verifyPreAdmission_StudentCountReportPage() {\r\n\t\ttry {\r\n\t\t\tSystem.out.println(txt_StudentCountReportPage.getText().trim());\r\n\t\t\ttxt_StudentCountReportPage.isDisplayed();\r\n\t\t\tlog(\"PreAdmission Student Count Report page is dispalyed and object is:-\"\r\n\t\t\t\t\t+ txt_StudentCountReportPage.toString());\r\n\t\t\tThread.sleep(1000);\r\n\t\t\treturn true;\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"@Test //Test to see you are able to buy policy and confirmation page is displayed\n public void policyConfirmationTest() throws InterruptedException {\n \t WebElement submitPolicy=driver.findElement(By.xpath(\"/html/body/center/form/center[3]/pre/input[3]\"));\n \t submitPolicy.click();\n \t assertTrue(driver.findElement(By.xpath(\"/html/body/center[2]/h3\")).isDisplayed()); \n\t Thread.sleep(3000);\n\t driver.close();\n\n}",
"@Test(priority=3)\n\tpublic void verifySignUpBtn() {\n\t\tboolean signUpBtn = driver.findElement(By.name(\"websubmit\")).isEnabled();\n\t\tAssert.assertTrue(signUpBtn);\n\t}",
"public void v_Verify_Guest9_Displayed(){\n\t}",
"public void checkFields() {\n WebElement firstName = Wait.clickable(driver,firstNameField);\n WebElement lastName = Wait.clickable(driver,lastNameField);\n WebElement userName = Wait.clickable(driver,userNameField);\n WebElement password = Wait.clickable(driver,passwordField);\n WebElement email = Wait.clickable(driver,emailField);\n WebElement userType = Wait.clickable(driver,userTypeField);\n WebElement country = Wait.clickable(driver,countryField);\n WebElement salesOrg = Wait.clickable(driver,salesOrgField);\n WebElement customerName = Wait.clickable(driver,customerNameField);\n WebElement shipToParty = Wait.clickable(driver,shipToPartyField);\n WebElement saveBtn = Wait.clickable(driver,saveButton);\n WebElement cancelBtn = Wait.clickable(driver,cancelButton);\n \n //Assert all elements are displayed\n AssertJUnit.assertTrue(\"Add Multi User Page: First name field not displayed\",firstName.isDisplayed());\n AssertJUnit.assertTrue(\"Add Multi User Page: Last name field not displayed\",lastName.isDisplayed());\n AssertJUnit.assertTrue(\"Add Multi User Page: User name field not displayed\",userName.isDisplayed());\n AssertJUnit.assertTrue(\"Add Multi User Page: Password field not displayed\",password.isDisplayed());\n AssertJUnit.assertTrue(\"Add Multi User Page: Email field not displayed\",email.isDisplayed());\n AssertJUnit.assertTrue(\"Add Multi User Page: User Type field not displayed\",userType.isDisplayed());\n AssertJUnit.assertTrue(\"Add Multi User Page: Country field not displayed\",country.isDisplayed());\n AssertJUnit.assertTrue(\"Add Multi User Page: Sales Org field not displayed\",salesOrg.isDisplayed());\n AssertJUnit.assertTrue(\"Add Multi User Page: Customer Name field not displayed\",customerName.isDisplayed());\n AssertJUnit.assertTrue(\"Add Multi User Page: Ship To Party field not displayed\",shipToParty.isDisplayed());\n AssertJUnit.assertTrue(\"Add Multi User Page: Save button not displayed\",saveBtn.isDisplayed());\n AssertJUnit.assertTrue(\"Add Multi User Page: Cancel button not displayed\",cancelBtn.isDisplayed());\n \n }",
"public void v_Verify_Guest11_Displayed(){\n\t}",
"public void VerifyMainMenuItems() {\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Dashboard);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Initiatives);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_LiveMediaPlans);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_MediaPlans);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Audiences);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Offers);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_CreativeAssets);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Reports);\n\t}",
"public static void verifyElementIsDisplayed(MobileElement mobileElement, String expectedText) {\n try {\n\n AppiumDriver<MobileElement> driver = getAppiumDriver();\n WebDriverWait wait = new WebDriverWait(driver, 25);\n wait.until(ExpectedConditions.visibilityOf(mobileElement));\n if (mobileElement.isDisplayed())\n ReportHelper.logReportStatus(LogStatus.PASS, \"The text \" + expectedText + \" is displayed\");\n else\n ReportHelper.logReportStatus(LogStatus.FAIL, \"The element \" + expectedText + \" is not displayed\");\n } catch (Exception e) {\n ReportHelper.logReportStatus(LogStatus.FAIL, \"The element \" + expectedText + \" is not displayed\");\n\n }\n }",
"public boolean isElementPresent(WebElement element) {\n wait.until(ExpectedConditions.elementToBeClickable(element));\n// wait.until(ExpectedConditions.visibilityOf(element));\n return element.isDisplayed();\n }",
"public void v_Verify_Guest4_Displayed(){\n\t}",
"public static boolean isDisplayed(final WebElement element) {\n try {\n defaultWait.until(ExpectedConditions.visibilityOf(element));\n return true;\n } catch (Exception exception) {\n Log.info(\"Element not displayed on UI :\" + element.toString() + \" \" + exception.getMessage());\n return false;\n }\n }",
"public static void verifyEmployeeFormIsDisplayed() {\n\t\tBy addEmployeeForm = By.xpath(\"//form[@name='employeeForm']\");\n\t\tString description = \"Employee form is displayed\";\n\t\tif (SeleniumUtils.elementIsVisible(addEmployeeForm)) {\n\t\t\taddStepToTest(\"pass\", description, \"EmployeeForm\");\n\t\t} else {\n\t\t\taddStepToTest(\"fail\", description, \"EmployeeForm\");\n\t\t}\n\t}",
"public void v_Verify_Guest10_Displayed(){\n\t}",
"public void assertMyTraderPage() {\r\n\t\tprint(\"Welcome to My Trader text on My Trader page\");\r\n\t\twaitForElementPresentInDom(3);\r\n\t\tlocator = Locator.MyTrader.MyTrader_Message.value;\r\n\t\tAssert.assertTrue(isTextPresent(locator, \"Welcome to MyTrader\"), \"Element Locator :\" + locator + \" Not found\");\r\n\t}",
"public boolean isAt(){\n\t\tWaitExtensions.waitForPageToLoad(10);\n\t\treturn loginButton.isDisplayed();\n\t\t\n\t}",
"public WebElement checkVisibilityOf(final WebElement element) {\n return (new WebDriverWait(webDriver, WAIT_TIME)).until(ExpectedConditions.visibilityOf(element));\n }",
"public void v_Verify_Guest12_Displayed(){\n\t}",
"private boolean elementDisplayed(String xpath){\n try {\n WebElement element = Driver.getDriver().findElement(By.xpath(xpath));\n return element.isDisplayed();\n }catch(Exception e){\n return false;\n }\n }",
"public boolean verifyFailure() {\r\n return driver.findElement(failMsg).isDisplayed();\r\n }",
"@Test(priority=22)\n\tpublic void verifyActiveAdsVistsLeadsCountandIconsaredisplaying() throws Exception {\n\t\tOverviewTradusPROPage overviewObj=new OverviewTradusPROPage(driver);\n\t\t/*LoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(\"[email protected]\", \"sunfra123\");\n\t\tclick(loginPage.LoginButton);*/\n\t\texplicitWaitFortheElementTobeVisible(driver,overviewObj.overviewPageVerificationElement);\n\t\twaitTill(2000);\n\t\t//for ActiveAds\n\t\tAssert.assertTrue(getText(overviewObj.totalActiveAdsText).trim().equals(\"Total number of active ads\"),\n\t\t\t\t\"Total number of active Ads text is not displaying\");\n\t\tAssert.assertTrue(verifyElementPresent(overviewObj.iconInActiveAdsCountSection),\n\t\t\t\t\"Icon is not displaying for total number of active Ads\");\n\t\twaitTill(1000);\n\t\tAssert.assertTrue(Integer.parseInt(getText(overviewObj.totalActiveAdsCount).trim())>0,\n\t\t\t\t\"Total number of active Ads count is incorrect\");\n\t\t\n\t\t//for visits\n\t\tAssert.assertTrue(getText(overviewObj.totalVisitsText).trim().equals(\"Total of visits\"),\n\t\t\t\t\"Total number of visit text is not displaying\");\n Assert.assertTrue(verifyElementPresent(overviewObj.iconInVisitesCountSection),\n\t\t\t\t\"Icon is not displaying for total number of visits\");\n Assert.assertTrue(Integer.parseInt(getText(overviewObj.totalVisitsCount).trim())>0,\n\t\t\t\t\"Total number of visit count is incorrect\");\n //for Leads\n \tAssert.assertTrue(getText(overviewObj.totalLeadsText).trim().equals(\"Total of leads\"),\n \t\t\t\t\t\t\"Total number of Leads text is not displaying\");\n \tAssert.assertTrue(verifyElementPresent(overviewObj.iconInTotalLeadsCountSection),\n \t\t\t\t\t\t\"Icon is not displaying for total number of Leads\");\n \tAssert.assertTrue(Integer.parseInt(getText(overviewObj.totalLeadsCount).trim())>0,\n \t\t\t\t\t\"Total number of Leads count is incorrect\");\n\t\n\t}",
"public void v_Verify_Guest3_Displayed(){\n\t}",
"public void click_CheckavailabitlityButton()\r\n\t{\r\n\t\r\n\r\n\t\tSystem.out.println(\"Inside of the checkavailabitlity\");\r\n\t\t\r\n\t\t/*\r\n\t\tExplicitWait(Checkavailability);\r\n\r\n\r\n\t\tJavascriptexecutor(Checkavailability);\r\n\t\t//System.out.println(\"clicked on Checkavailability\");\r\n\t\tSeleniumRepo.waitForPageLoaded();\r\n\t\tlogger.info(\"clicked on Checkavailability\");\r\n\t\ttest.log(Status.INFO, \"clicked on Checkavailability\");\r\n\t\t\r\n\t\t */\r\n\t\r\n\t\tExplicitWait(Checkavailability);\r\n\r\n\t\tif (Checkavailability.isDisplayed() ) \r\n\t\t{\r\n\t\t\t\r\n\t\t\t//Checkavailability.click();\r\n\t\t\tJavascriptexecutor(Checkavailability);\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"clicked on Checkavailability\");\r\n\t\t\t\r\n\t\t\tSeleniumRepo.waitForPageLoaded();\r\n\t\t\tExplicitWait(Checkavailability);\r\n\r\n\t\t\tlogger.info(\"clicked on Checkavailability\");\r\n\t\t\ttest.log(Status.INFO, \"clicked on Checkavailability\");\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\t//System.out.println(\"BookNow button not found\");\r\n\t\t\tlogger.error(\"Check Availability button not found\");\r\n\t\t\ttest.log(Status.FAIL, \"Check Availability button not found\");\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}",
"public void v_Verify_Guest8_Displayed(){\n\t}",
"public static void isElementDisplayed(WebElement element) {\n \tboolean elementDisplayed= element.isDisplayed();\n \t\n \tif(elementDisplayed) {\n \t\tSystem.out.println(element+\" \"+\"object is Displayed\");\n \t}\n \telse {\n \t\tSystem.out.println(element+\" \"+\"object is not Displayed\");\n \t}\n }",
"@Test\n public void dashboardPageTest(){\n test = report.createTest(\"Dashboard Page Title Test\");\n test.info(\"logging in to application\");\n loginPage.login(\"driver_username\", \"driver_password\");\n wait.until(ExpectedConditions.textToBePresentInElement(dashboardPage.pageHeader,\"Quick Launchpad\"));\n String actual = dashboardPage.pageHeader.getText();\n test.info(\"verifying page title\");\n assertEquals(actual, \"Quick Launchpad\");\n test.pass(\"PASS: Dashboard Page Title Test\");\n }",
"public boolean veirfyUserOnSummerDressesPage(){\n WebElement page = driver.findElement(By.cssSelector(\"div[class='cat_desc']\"));\n boolean pageStatus = page.isDisplayed();\n return pageStatus;\n }",
"public String verifyUserOnPrintedDressPage(){\n WebElement page = driver.findElement(By.cssSelector(\"span[class='lighter']\"));\n String pageStatus = page.getText();\n return pageStatus;\n }",
"@Override\n public boolean isPageLoaded() {\n\n setLogString(\"Verify the savings Page is loaded\", true, CustomLogLevel.LOW);\n return isDisplayed(getDriver(), By.cssSelector(SAVINGS_CONTAINER), TINY_TIMEOUT)\n && isDisplayed(getDriver(), By.className(SAVINGS_DOLLARS), TINY_TIMEOUT)\n && isDisplayed(getDriver(), By.cssSelector(MENU_SAVINGS), TINY_TIMEOUT);\n\n }",
"public void v_Verify_Guest7_Displayed(){\n\t}",
"@Then(\"^homepage is visible$\")\n\tpublic void homepage_is_visible() throws Throwable {\n\t\tString verify = driver.findElement(By.xpath(\"//marquee[@class='heading3']\")).getText();\n\t\tAssert.assertEquals(verify, \"Welcome To Customer's Page of Guru99 Bank\", \"Error in loading!\");\n\t}",
"private void waitforvisibleelement(WebDriver driver2, WebElement signoutimg2) {\n\t\r\n}",
"public void v_Verify_Guest5_Displayed(){\n\t}",
"@Test\n public void checkExistentWidgetAndParameter() throws Exception {\n\n driver = WidgetUtils.OpenWidgetEditMode(driver, wait, baseUrl, widgetName);\n\n //Step 3 - Check if the parameter exist in 'Settings'\n //Move to the iframe\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//div[@id='solutionNavigatorAndContentPanel']/div[4]/table/tbody/tr[2]/td/div/div/table/tbody/tr/td/iframe\")));\n WebElement frameCDEDashboard = driver.findElement(By.xpath(\"//div[@id='solutionNavigatorAndContentPanel']/div[4]/table/tbody/tr[2]/td/div/div/table/tbody/tr/td/iframe\"));\n driver.switchTo().frame(frameCDEDashboard);\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//div[@class='layoutPanelButton']\")));\n assertTrue(driver.findElement(By.xpath(\"//div[@class='layoutPanelButton']\")).isEnabled());\n //Press 'Settings'\n driver.findElement(By.xpath(\"//div[@id='headerLinks']/div[5]/a\")).click();\n wait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.xpath(\"//div[@id='popup']\")));\n assertNotNull(driver.findElement(By.xpath(\"//span[@id='widgetParameters']/div/input\")));\n //The parameter MUST be equal to the one set\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//span[@id='widgetParameters']/div/span\")));\n assertEquals(driver.findElement(By.xpath(\"//span[@id='widgetParameters']/div/span\")).getText(), paramName);\n //Press on the check box\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//span[@id='widgetParameters']/div/input\")));\n assertTrue(driver.findElement(By.xpath(\"//span[@id='widgetParameters']/div/input\")).isSelected());\n //Press button 'Cancel'\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//div[@class='popupbuttons']/button[@id='popup_state0_buttonCancel']\")));\n driver.findElement(By.xpath(\"//div[@class='popupbuttons']/button[@id='popup_state0_buttonCancel']\")).click();\n\n\n //Step 4 - Click on Component Panel and check if the widget is listed\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//div[@class='componentsPanelButton']\")));\n driver.findElement(By.xpath(\"//div[@class='componentsPanelButton']\")).click();\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//div[@id='cdfdd-components-palletePallete']/div[9]/h3/span\")));\n driver.findElement(By.xpath(\"//div[@id='cdfdd-components-palletePallete']/div[9]/h3/span\")).click();\n //Getting the element where the widget created is displayed\n WebElement listOfWidgets = driver.findElement(By.xpath(\"//div[@id='cdfdd-components-palletePallete']/div[9]/div\"));\n //Check if the widget created is listed\n WebElement theWidgetCreated = listOfWidgets.findElement(By.xpath(\"//a[@class='tooltip' and contains(text(),'\" + widgetName + \"')]\"));\n assertNotNull(theWidgetCreated);\n assertEquals(theWidgetCreated.getText(), widgetName);\n\n\n //Step 5 - Click in the widget created and check if the widget is add at Components column and Properties\n theWidgetCreated.click();\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//table[@id='table-cdfdd-components-components']/tbody/tr[4]/td\")));\n wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(\"//table[@id='table-cdfdd-components-properties']/tbody/tr[2]/td\")));\n assertEquals(driver.findElement(\n By.xpath(\"//table[@id='table-cdfdd-components-components']/tbody/tr[4]/td\")).getText(),\n widgetName + \" Widget\");\n assertEquals(driver.findElement(\n By.xpath(\"//table[@id='table-cdfdd-components-properties']/tbody/tr[2]/td\")).getText(),\n \"Parameter \" + paramName);\n }",
"public void verifySystemStatusTabIsDisplayed() {\n \tAssert.assertTrue(systemStatus.isDisplayed());\n }",
"public Boolean apply(WebDriver t) {\n\t\t\t\t\t\tif(t.findElements(By.xpath(\"//input[@value='Log In']\")).size()>=1) {\n\t\t\t\t\t\t\tSystem.err.println(\"Webelement located\");\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"Waiting...\");\n\t\t\t\t\treturn false;\n\t\t\t\t\t}",
"public boolean verifyHomePageDisplayed(){\r\n\t\tWebDriver driver = SeleniumDriver.getInstance().getWebDriver();\r\n\t\tWebElement body;\r\n\t\ttry{\r\n\t\t\tbody = driver.findElement(By.tagName(\"body\"));\r\n\t\t\tif(body.getAttribute(\"class\").contains(\"home page\")){\r\n\t\t\t\tmyAssert.setGblPassFailMessage(\"pass\", \"UpTake home page is displayed\");\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tmyAssert.setGblPassFailMessage(\"fail\", \"UpTake home page is not displayed\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t return true;\r\n\t}",
"public void v_Verify_Guest2_Displayed(){\n\t}",
"@Override\n\tpublic void checkPage() {\n\t}",
"public void verifyCourseInfoPageSuccessfullyDisplayedInNewWindow(){\n\t\tgetDriver().navigate().refresh();\n\t\tAssert.assertTrue(enrollNowButton.isDisplayed());\n\t\t\n\t}",
"public void checkAdmin (){exxampe for findElement combinations:\n\t \t//driver.findElement(By.partialLinkText(\"Super Admin\")).findElement(By.xpath(\"parent::*\")).findElement(By.xpath(\"parent::*\")).findElement(By.xpath(\"td[1]/input\")).click();\n\t \t//\n\t \t\n\t \tdriver.findElement(By.xpath(\"//table[@class='table table-striped']/tbody/tr[*]/td[contains(text(), 'admin')]/../td[1]/input\")).click();\n\t \t \n\t \t\n\t }",
"public void verifyRegisterLink() {\n registerLink.assertState().enabled();\n registerLink.assertContains().text(\"Register\");\n }",
"@Test\n\tpublic void verifyAdIdPriceTMVVisitsEmailsAndStatusDetailsAreDisplaying() throws Exception {\n\t\tAllStockTradusPROPage AllStockPage= new AllStockTradusPROPage(driver);\n\t\twaitTill(2000);\n\t\tLoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(userName, pwd);\n\t\tjsClick(driver, loginPage.LoginButton);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.myStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.myStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.MyStockText);\n\t\twaitTill(3000);\n\t\twhile(!verifyElementPresent(AllStockPage.tradusLinkforMANtires)) {\n\t\t\tdriver.navigate().refresh();\n\t\t\twaitTill(3000);\n\t\t}\n\t\tfor(int i=0; i<AllStockPage.PostedAds.size();i++)\n\t\t{\n\t\t\t/*switch(i) {\n\t\t\tcase 0: Assert.assertTrue(getText(AllStockPage.PostedAdsAdIds.get(i)).equals(\"Ad ID: 2986865\"),\n\t\t\t\t \"Expected Ad id is not displaying for 1st ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsCurrencyAndPrices.get(i)).equals(\"EUR 0\"),\n\t\t\t\t \"Given currency & price are not displaying for 1st ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsTMV.get(i)).equals(\"No price rating\"),\n\t\t\t\t \"Tradus market value is not displaying as no price rating for 1st ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsTMV.get(i)),\n\t\t\t\t \"Visits are not displaying for 1st ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsEmails.get(i)),\n\t\t\t\t \"Emails are not displaying for 1st ad in all stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsStatus.get(i)).equals(\"Tradus\"),\n\t\t\t\t \"Status is not displaying as active on tradus for 1st ad in All stock page\");break;\n\t\t\t\t \n\t\t\tcase 1: Assert.assertTrue(getText(AllStockPage.PostedAdsAdIds.get(i)).equals(\"Ad ID: 2986861\"),\n\t\t\t\t \"Expected Ad id is not displaying for 2nd ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsCurrencyAndPrices.get(i)).equals(\"EUR 100\"),\n\t\t\t\t \"Given currency & price are not displaying for 2nd ad in All stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsTMV.get(i)).equals(\"No price rating\"),\n\t\t\t\t \"Tradus market value is not displaying as no price rating for 2nd ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsTMV.get(i)),\n\t\t\t\t \"Visits are not displaying for 2nd ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsEmails.get(i)),\n\t\t\t\t \"Emails are not displaying for 2nd ad in all stock page\");\n\t\t\tAssert.assertTrue(getText(AllStockPage.PostedAdsStatus.get(i)).equals(\"Tradus\"),\n\t\t\t\t \"Status is not displaying as active on tradus for 2nd ad in All stock page\");\n\t\t\t}*/\n\t\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsAdIds.get(i)),\n\t\t\t\t\t \"Expected Ad id is not displaying for \"+i+ \" ad in All stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsCurrencyAndPrices.get(i)),\n\t\t \t\t\"Given currency & price are not displaying for \"+i+ \" ad in All stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsTMV.get(i)),\n\t\t \t\t\"Tradus market value is not displaying as no price rating for \"+i+ \" ad in all stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsVisits.get(i)),\n\t\t \t\t\"Visits are not displaying for \"+i+ \" ad in all stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsEmails.get(i)),\n\t\t \t\t\"Emails are not displaying for \"+i+ \" ad in all stock page\");\n\t\t Assert.assertTrue(verifyElementPresent(AllStockPage.PostedAdsStatus.get(i)),\n\t\t \t\t\"Status is not displaying as active on tradus for \"+i+ \" ad in All stock page\");\n\t\t}\n\t}",
"public boolean isElementPresent(WebElement element) {\n try{\n return element.isDisplayed();\n }catch (RuntimeException e){\n return false;\n }\n }",
"@Test\n\tpublic void verifyEditDeleteAndPromoteOptionsAreDisplayingForPublishedAds() throws Exception {\n\t\tAllStockTradusPROPage AllStockPage= new AllStockTradusPROPage(driver);\n\t\tLoginTradusPROPage loginPage = new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(userName, pwd);\n\t\tjsClick(driver, loginPage.LoginButton);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.myStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.myStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\tjsClick(driver, AllStockPage.allMyStockOptioninSiderBar);\n\t\texplicitWaitFortheElementTobeVisible(driver, AllStockPage.MyStockText);\n\t\twaitTill(3000);\n\t\twhile(!verifyElementPresent(AllStockPage.tradusLinkforMANtires)) {\n\t\t\tdriver.navigate().refresh();\n\t\t\twaitTill(3000);\n\t\t}\n\t\t/*Assert.assertEquals(AllStockPage.PostedAds.size(), 2, \n\t\t\t\t\"No of ads found is not showing as 2 ads\");*/\n\t\tfor(int i=0; i<AllStockPage.PostedAds.size();i++)\n\t\t{\n\t\t\tswitch(i) {\n\t\t\tcase 0: Assert.assertTrue(verifyElementPresent(AllStockPage.EditOptionOnPostedAds.get(i)),\n\t\t\t\t \"Edit option is not displaying for 1st ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.DeleteOptionOnPostedAds.get(i)),\n\t\t\t\t \"Delete option is not displaying for 1st ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PromoteOptionOnPostedAds.get(i)),\n\t\t\t\t \"Promote option is not displaying for 1st ad in all stock page\");break;\n\t\t\tcase 1: Assert.assertTrue(verifyElementPresent(AllStockPage.EditOptionOnPostedAds.get(i)),\n\t\t\t\t \"Edit option is not displaying for 2nd ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.DeleteOptionOnPostedAds.get(i)),\n\t\t\t\t \"Delete option is not displaying for 2nd ad in all stock page\");\n\t\t\tAssert.assertTrue(verifyElementPresent(AllStockPage.PromoteOptionOnPostedAds.get(i)),\n\t\t\t\t \"Promote option is not displaying for 2nd ad in all stock page\");\n\t\t\t}\n\t\t\t}\n\t}",
"@Test\n public void testifyBtn() throws InterruptedException {\n onView(withId(R.id.SaveButton)).check(matches(isDisplayed()));\n\n }",
"public void verify_WelcomePopupandclick(){\n\t\tif(isDisplayedWithoutException(welcomePopup)){\n\t\t\tclick(welcomePopup);\n\t\t\tSystem.out.println(\"the Welcome popup is visible on the page and clicked done\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"The Welcome popup is not present on the page\");\n\t\t}\n\t}",
"@Override\n\tprotected void initWebObject()\n\t{\n\t\tlogger.debug( \"validating static elements for web object id: <{}>, name:<{}>...\",\n\t\t\t\tgetQualifier(), getLogicalName() );\n\n\t\tfinal String REASON = \"assert that element \\\"%s\\\" exits\";\n\n\t\tString REASON1 = \"Validate that comparison is among/between \" + comparingShips + \" ships\";\n\t\tString ACTUAL_RESULT_STR = getRoot().getAttribute( \"class\" );\n\t\tMatcher<String> EXPECTED_OF_STR = JMatchers.endsWith( String.format( \"comparing-%d\", comparingShips ) );\n\t\tgetDriver().assertThat( REASON1, ACTUAL_RESULT_STR, EXPECTED_OF_STR );\n\n\t\tJAssertion assertion = getRoot().createAssertion();\n\t\tOptional<HtmlElement> e = getRoot().childExists( By.cssSelector( \"div.compare-section.quick-preview\" ), FIVE_SECONDS );\n\t\tassertion.assertThat( String.format( REASON, \".compare-section.quick-preview\" ), e.isPresent(), is( true ) );\n\t}",
"@Test(priority=0)\n\tpublic void verifyOverviewPageAfterLoginToAccount() throws Exception {\n\t\tLoginTradusPROPage loginPage= new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(testUser,pwd);\n\t\tclick(loginPage.LoginButton);\n\t\twaitTill(3000);\n\t explicitWaitFortheElementTobeVisible(driver,loginPage.overviewPageVerificationElement);\n\t waitTill(7000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms\"),\n\t \t\t\"Overview page is not displaying after login to account\");\n\t}",
"public void verifySchedulePaymentTabElementsDisplayed() {\n\r\n\t\tAssert.assertTrue(carrierschedulepayment.amountColumn.getText().contains(\"Amount\"), \"Amount Column not found\");\r\n\t\tAssert.assertTrue(carrierschedulepayment.payerColumn.getText().contains(\"Payer\"), \"Payer Column not found\");\r\n\t\tAssert.assertTrue(carrierschedulepayment.loadIDColumn.getText().contains(\"Load ID\"), \"Load ID not found\");\r\n\t\tAssert.assertTrue(carrierschedulepayment.InvoiceColumn.getText().contains(\"Invoice #\"), \"Invoice # not found\");\r\n\t\tAssert.assertTrue(carrierschedulepayment.schdateColumn.getText().contains(\"Scheduled Date\"),\r\n\t\t\t\t\"Schedule Date not found\");\r\n\t\tAssert.assertTrue(carrierschedulepayment.searchButton.isDisplayed(), \"Search Button not found\");\r\n\t\tAssert.assertTrue(carrierschedulepayment.searchInputField.isDisplayed(), \"Search Input Field not found\");\r\n\t}",
"public void Verify_Page_Header_Visibility()\r\n\t{\r\n\t\t if(Page_header.isDisplayed())\r\n\t\t\t System.out.println(\"header visible at webpage\");\r\n\t\t else\r\n\t\t\t System.out.println(\"header not visible at webpage\");\r\n\t\t\r\n\t}",
"public void waitForVisibilityOfWebElement(WebElement webElement){\r\n\t\twait.until(ExpectedConditions.visibilityOf(webElement));\r\n\t}",
"@Test\n public void signinvalidation() {\n\t SalesApplicationPage spg = new SalesApplicationPage(driver);\n if(spg.getPopUpSize()>0)\n\t {\n\t\t spg.getPopUp().click();\n\t }\n System.out.println(driver.getTitle());\n Assert.assertTrue(driver.getTitle().equals(\"Home | Salesforrrce\"));\n }",
"public boolean clickOnRequirements() throws Exception\n\t {\n\t\ttry\n\t\t{\n\t boolean st4=requirements.isEnabled();\n\t boolean st5=requirements.isDisplayed();\n\t System.out.println(st4);\n\t System.out.println(st5);\n\t \n\t //WebElement element1=driver.findElement(By.xpath(\"//a[@title='Test Repository']\"));\n\t WebDriverWait wait1 = new WebDriverWait(driver, 30);\n\t wait1.until(ExpectedConditions.elementToBeClickable(requirements));\n\t requirements.click();\n\t bp=new BasePage();\n\t bp.waitForElement();\n\t log.info(\"Successfully Landed on Requirements Page\");\n\t\n\t \n\t String validate_Requirements=validateRequirements.getText();\n\t String expmsg=\"Requirements\";\n\t if(validate_Requirements.equals(expmsg))\n\t {\n\t \tlog.info(\"Successfully Landed on Test Requirement Page\");\n\t \n\t \t}\n\t \n\t else\n\t {\n\t \t log.info(\"You are not in Test Requirement Page\");\n\t \n\t }\n\t return true;\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tthrow e;\n\t\t}\n\t \n\t}",
"@Override\n protected void performAssertion(WebDriver driver) {\n WebElement loggedInAs = driver.findElement(By.cssSelector(\"span.logged-in-as\"));\n Assert.assertNotNull(loggedInAs);\n\n WebElement loggedInAsUsername = driver.findElement(By.cssSelector(\"span.logged-in-as span.username\"));\n Assert.assertNotNull(loggedInAsUsername);\n }",
"public void Assert()\n\t{\n\t\tString c=driver.findElement(By.xpath(\"//a[text()='CTS']\")).getText();\n\t\t Assert.assertEquals(\"CTS\", c);\n\t}",
"public void verifyQuickNavigatorIsDisplayed() {\n\t\tmoveToElement(burgerButton);\n\t\tAssert.assertTrue(isElementPresent(burgerButton));\n\t\treportInfo();\n\t\t}",
"public boolean verifySuccess() {\r\n return driver.findElement(successMsg).isDisplayed();\r\n }",
"public boolean emailisdisplayed() throws Exception {\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(email);\r\n\t\t\t\tflag = element.isDisplayed();\r\n\t\t\t\tAssert.assertTrue(flag, \"Email is is not dispalyed and enabled\");\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"Email Id NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\treturn flag;\r\n\t\t\t\r\n\t\t}",
"@Test\r\n\tpublic void TC_01_verifyRegistrationPage() {\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t}",
"public void Verify_Expected_Header_Visibility()\r\n\t{\r\n\t\tString Runtime_Header_text=Page_header.getText();\r\n\t\tif(Runtime_Header_text.equals(Exp_page_header))\r\n\t\t\tSystem.out.println(\"Expected Header visible at webpage\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Expected Header not visible at webpage\");\r\n\t}"
]
| [
"0.68596023",
"0.6813983",
"0.6525476",
"0.6474705",
"0.6451673",
"0.6398947",
"0.6363416",
"0.6351542",
"0.63114905",
"0.62930226",
"0.6261638",
"0.62026596",
"0.6184374",
"0.6161035",
"0.61546195",
"0.6147591",
"0.6143308",
"0.6137485",
"0.6123633",
"0.6121106",
"0.60888433",
"0.6081913",
"0.60803187",
"0.60779506",
"0.6076079",
"0.6075518",
"0.6068351",
"0.6065383",
"0.6054539",
"0.6050744",
"0.6035215",
"0.6031992",
"0.6025043",
"0.6017864",
"0.598429",
"0.59800565",
"0.5969132",
"0.5963363",
"0.5953844",
"0.5949296",
"0.5930508",
"0.5910035",
"0.59015554",
"0.58989143",
"0.58965456",
"0.5884098",
"0.58772063",
"0.5874112",
"0.58698136",
"0.5864525",
"0.58506525",
"0.58488166",
"0.58455455",
"0.58417726",
"0.584136",
"0.58338314",
"0.58215886",
"0.5821263",
"0.58180285",
"0.581604",
"0.5815505",
"0.5807598",
"0.5789478",
"0.5787993",
"0.57875",
"0.57808506",
"0.57785475",
"0.5778091",
"0.576822",
"0.5762658",
"0.5762458",
"0.5760541",
"0.5752855",
"0.57526064",
"0.5748958",
"0.5745597",
"0.57394683",
"0.57391185",
"0.57344514",
"0.5730963",
"0.5724758",
"0.57188296",
"0.5717706",
"0.5715622",
"0.5706154",
"0.5704349",
"0.57040215",
"0.5698251",
"0.5694595",
"0.56907415",
"0.56809324",
"0.5679456",
"0.56752115",
"0.56682616",
"0.56628966",
"0.56519765",
"0.56469196",
"0.5635921",
"0.56317675",
"0.5630564"
]
| 0.6657027 | 2 |
Verify the Alert from the False Login. | public void verifyFalseLogin() {
alertElement.waitForState().present(30);
alertElement.assertContains().text("Please Enter a Valid User ID");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String isInConsistentAlert(String object, String data) {\n\t\tlogger.debug(\"Verify the Invalid Alert pop up \");\n\t\tboolean presentFlag = false;\n\t\ttry {\n\t\t\t//waitForPageLoad(driver);\n\t\t\tAlert alert = driver.switchTo().alert();\n\t\t\tif (!presentFlag) {\n\t\t\t\tlogger.debug(\"Alert detected\");\n\t\t\t\tThread.sleep(2000);\n\t\t\t\talert.accept();\n\t\t\t\t//browserSpecificPauseForAlert(object, data);\n\t\t\t\tpresentFlag = true;\n\t\t\t}\n\t\t\tif (presentFlag) {\t\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\t} else {\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_PASS + \" -- Alert not detected\";\n\t\t}\n\t}",
"public int checkForAlert() {\n return 0;\n }",
"public void checkAlert() {\n try {\n wait(1000);\n driver.switchTo().alert();\n driver.findElement(By.xpath(\"//*[@title='No, thanks']\")).click();\n } catch (Exception e) {\n // Do nothing\n }\n }",
"@Test\n public void RediffAlerts() \n {\n\t \n\t \n\t WebDriver driver=new ChromeDriver();\n\t \n\t driver.manage().window().maximize();\n\t driver.get(\"https://mail.rediff.com/cgi-bin/login.cgi\");\n\t driver.findElement(By.xpath(\"//input[@value='Go']\")).click();\n\t \n\t Alert alert = driver.switchTo().alert();\n\t \n\t System.out.println(\"Alert message if user is not entering user details: \"\n\t +alert.getText());\n\t\t\n\t String text = alert.getText();\n\t\t\n\t\t\n\t\tif(text.equals(\"Please enter a valid user name\"))\n\t\t{\n\t\t\tSystem.out.println(\"correct alert messg\");\n\t\t}\n\t\telse\n\t\t\t{\n\t\t\tSystem.out.println(\"in-correct alert messg\");\n\t\t\t}\n\t\t\n\t\talert.accept(); //click on OK btn\n\t\t\n\t\t//alert.dismiss(); //click on cancel btn\n\t\t\n\t}",
"public void verifyAlertMessage(String vExpMsg) {\n\t\tvActMessage = myD.findElement(By.id(\"hideMe\")).getText();\n\t\tSystem.out.println(\"Actual Message is :\" + vActMessage);\n\t\tSystem.out.println(\"Expected Message is :\" + vExpMsg);\n\t\tif (vActMessage.equals(vExpMsg)) {\n\t\t\tvResult = \"Pass\";\n\t\t} else {\n\t\t\tvResult = \"Fail\";\n\t\t}\n\t\tSystem.out.println(\"Test Case is a \"+ vResult);\n\t}",
"public void unauthorized() {\n super.unauthorized();\n LoginFragment.this.getTracker().send(new HitBuilders.EventBuilder().setCategory(\"sign_in\").setAction(\"incorrect\").setLabel(\"incorrect\").build());\n Answers.getInstance().logLogin(new LoginEvent().putSuccess(false));\n new AlertDialog.Builder(LoginFragment.this.getActivity()).setMessage(R.string.incorrect_email_or_password).setPositiveButton(17039370, (DialogInterface.OnClickListener) null).show();\n }",
"@Test\n\tpublic void checking_thirdalertbtn_withcancel()throws IOException, InterruptedException\n\t{\n\t\tgetlogin();\n\t\tSwitchtoPage sp=new SwitchtoPage(driver);\n\t\tsp.getswitchtolink().click();\n\t\tsp.getAlertlink().click();\n\t\tsp.getalTextbox().click();\n\t\tsp.getPrompt().click();\n \t Alert al=driver.switchTo().alert();\n \t al.dismiss();\n\t}",
"@Override\n public boolean check() {\n return GlobalParams.isLogin();\n }",
"public String isInvalidAlert(String object, String data) {\n\t\tlogger.debug(\"Verify the Alert pop up \");\n\t\ttry {\n\t\t\tThread.sleep(2000);\n\t\t\ttry {\n\t\t\t\t//waitForPageLoad(driver);\n\t\t\t\tif (driver.switchTo().alert() != null) {\n\t\t\t\t\tlogger.debug(\"Alert detected\");\n\t\t\t\t\tAlert alert = explicitWaitForAlert();\n\t\t\t\t\t//browserSpecificPauseForAlert(object, data);\n\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t\talert.accept();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \" Alert not detected\";\n\t\t\t\t}\n\t\t\t} catch (NoAlertPresentException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t// e.printStackTrace();\n\t\t\t\treturn Constants.KEYWORD_PASS + \" Alert not detected\";\n\t\t\t}\n\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \"--some exception occured\" + e.getMessage();\n\t\t}\n\t\treturn Constants.KEYWORD_FAIL + \" Alert Should not be detected\";\n\t}",
"public void TC_04_Authentication_Alert() {\n\n\t\tdriver.get(\"http://admin:[email protected]/basic_auth\");\n\t}",
"public boolean checkAnmeldung()\n {\n boolean result = false;\n if (!sUsername.equals(userDBM.getEmail()) || !sPw.equals(userDBM.getPw()))\n {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.incorrectData)\n .setCancelable(false)\n .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener()\n {\n public void onClick(DialogInterface dialog, int id)\n {\n //do things\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n else\n {\n result = true;\n }\n return result;\n }",
"private void bannedAlert() {\n Alert alert = new Alert(Alert.AlertType.WARNING);\n alert.initOwner(_dialogStage);\n alert.setTitle(\"Account blocked\");\n alert.setHeaderText(\"Account blocked\");\n alert.setContentText(\"Your account has been blocked due\"\n + \" to too many incorrect login attempts. To \"\n + \"unblock your account, please contact an \"\n + \"administrator.\");\n\n alert.showAndWait();\n return;\n }",
"public String isAlertDismis(String object, String data) {\n\t\tlogger.debug(\"Verify the Alert pop up \");\n\t\tboolean presentFlag = false;\n\n\t\ttry {\n\t\t\t//waitForPageLoad(driver);\n\t\t\tAlert alert = explicitWaitForAlert();\n\t\t\tif (!presentFlag) {\n\t\t\t\tlogger.debug(\"Alert detected\");\n\t\t\t\tThread.sleep(2000);\n\t\t\t\talert.dismiss();\n\t\t\t\t//browserSpecificPauseForAlert(object, data);\n\t\t\t} else {\n\t\t\t\treturn Constants.KEYWORD_FAIL + \"--Alert not found\";\n\t\t\t}\n\n\t\t} \n\t\tcatch(TimeoutException ex)\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 + \"--Alert not found\" + e.getMessage();\n\t\t}\n\t\treturn Constants.KEYWORD_PASS;\n\t}",
"private void noSensorAlert() {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(context);\n alertDialog.setMessage(\"This device doesn;t have the necessary sensors for this application \")\n .setCancelable(false)\n .setNegativeButton(\"Close\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) { stop()/*finish()*/; }\n });\n }",
"public void checkForAlerts() {\n }",
"private void validateLoginUser() {\n\t\tUser user = userDao.getByPin(et_password.getText().toString());\n\t\tSession.setDriver(user);\n\n\t\tif (user.getWorkStatus().equals(User.STATUS_INACTIVE)) {\n\n\t\t\tdoLogin();\n\t\t} else {\n\t\t\tString locAt = \"\";\n\t\t\tif (user.getWorkStatus().equals(User.STATUS_IN_VEHICLE)) {\n\t\t\t\tVehiclesDao dao = new VehiclesDao();\n\t\t\t\tlocAt = dao.getById(user.getCurrentVehicleId()).getName();\n\t\t\t} else {\n\t\t\t\tServiceLocationDao dao = new ServiceLocationDao();\n\t\t\t\tlocAt = dao.getById(user.getCurrentServiceLocationId()).getName();\n\t\t\t}\n\t\t\tString msg = \"You are currently marked as \" + user.getWorkStatus() + \" at \" + locAt + \" since \" + user.getWorkStatusDate()\n\t\t\t\t\t+ \"\\n\" + \"Do you want to continue and override this status?\";\n\t\t\tAlertDialog.Builder alert_box = new AlertDialog.Builder(this);\n\t\t\talert_box.setIcon(R.drawable.icon);\n\t\t\talert_box.setMessage(msg);\n\t\t\talert_box.setPositiveButton(\"YES\", new DialogInterface.OnClickListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdoPunchOut(et_password.getText().toString());\n\t\t\t\t\tdoLogin();\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t});\n\t\t\talert_box.setNeutralButton(\"NO\", new DialogInterface.OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\talert_box.show();\n\t\t}\n\t}",
"@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}",
"public assetDetailsPage click_YesofAlert_msg() throws InterruptedException, IOException {\r\n\t\tWebElement alrtmsg = driver.findElementByName(\"You are about to lose your changes.Do you want to continue ?\");\r\n\r\n\t\tif (IsElementVisibleStatus(alrtmsg)) {\r\n\t\t\tWebElement alrtmsg_YesBtn = driver.findElementByName(\"Yes\");\r\n\t\t\tclickOn(alrtmsg_YesBtn);\r\n\t\t\tThread.sleep(1000);\r\n\t\t\treturn new assetDetailsPage();\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No Alert message displayed\");\r\n\t\t\treturn new assetDetailsPage();\r\n\t\t}\r\n\t}",
"public boolean isAlertPresent()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//driver.switchTo().alert();\r\n\t\t\treturn true;\r\n\r\n\t\t}\r\n\t\tcatch(NoAlertPresentException ex)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\r\n\t}",
"public void click_NoofAlert_msg() throws InterruptedException {\r\n\t\tWebElement alrtmsg = driver.findElementByName(\"You are about to lose your changes.Do you want to continue ?\");\r\n\r\n\t\tif (IsElementVisibleStatus(alrtmsg)) {\r\n\t\t\tWebElement alrtmsg_NoBtn = driver.findElementByName(\"No\");\r\n\t\t\tclickOn(alrtmsg_NoBtn);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No Alert message displayed\");\r\n\t\t}\r\n\r\n\t}",
"public void resultIsNull(){\n if(alertDialog.isShowing()){\n return;\n }\n if(inActive){\n return;\n }\n }",
"public void AcceptAlertIfPresent() {\n if (isAlertPresent()) {\n AcceptAlert();\n log.info(\"alert accepted\");\n } else\n log.info(\"NoAlertPresent\");\n \n }",
"public boolean visible_AlertMsg_state() {\r\n\t\tWebElement alrtmsg = driver.findElementByName(\"You are about to lose your changes.Do you want to continue ?\");\r\n\t\treturn IsElementVisibleStatus(alrtmsg);\r\n\t}",
"boolean hasLoginapiavgrtt();",
"@DISPID(43)\r\n\t// = 0x2b. The runtime will prefer the VTID if present\r\n\t@VTID(41)\r\n\tboolean alerted();",
"public void v_Verify_Guest2_Hidden(){\n\t}",
"public void handleForgotPassword() {\n\t\tAlert alert = new Alert(AlertType.WARNING);\n\t\talert.initOwner(mainApp.getPrimaryStage());\n\t\talert.setTitle(\"Under building\");\n\t\talert.setHeaderText(\"Under construction.\");\n\t\talert.setContentText(\"At the moment you can not get your password. Thanks for being patient.\");\n\t\talert.showAndWait();\n\t}",
"private void verifyUser(){\n getValues();\n boolean validate;\n\n validate = db.authenticateUser(username, password);\n\n if (validate) {\n\n Cursor cursor = db.fetchData(username,password);\n cursor.moveToFirst();\n\n String contact = cursor.getString(3);\n\n session.createLoginSession(username, password, contact);\n\n Toast.makeText(this, \"[SYSTEM]: Login Successful! \", Toast.LENGTH_SHORT).show();\n\n Intent i = new Intent(this, MainActivity.class);\n startActivity(i);\n finish();\n } else {\n Toast.makeText(this, \"FAIL!\", Toast.LENGTH_SHORT).show();\n }\n }",
"public boolean verifyFailure() {\r\n return driver.findElement(failMsg).isDisplayed();\r\n }",
"boolean hasLoginResponse();",
"public void v_Verify_Guest11_Hidden(){\n\t}",
"public void verifyLogin(){\n\n //Verifica que haya conexion de internet\n networkManager = (ConnectivityManager) this.getSystemService(\n Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = networkManager.getActiveNetworkInfo();\n boolean isConnected = networkInfo != null && networkInfo.isConnectedOrConnecting();\n\n if (PreferenceUtils.getEmail (this) != null) { //Verifica que hay una session abierta.\n showSplash ();\n if(isConnected){\n\n //Checa el tipo de session\n if(PreferenceUtils.getSession (this))\n //Facebook session\n new LoadDataLoginFacebook (this).execute(\n PreferenceUtils.getName (this),\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n else\n //Manual session\n new LoadDataLogin (this).execute (\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n }\n else{ //Si no hay internet pasa directo a la session abierta.\n Intent intent = new Intent (AccessActivity.this, MainActivity.class);\n startActivity (intent);\n }\n }\n }",
"public void v_Verify_Guest3_Hidden(){\n\t}",
"public void acceptAlert() {\n WebDriverWait wait = new WebDriverWait(getDriver(), timeOut);\n wait.until(ExpectedConditions.alertIsPresent());\n getDriver().switchTo().alert().accept();\n }",
"boolean hasLoginapisuccessfulhitcount();",
"public void v_Verify_Guest4_Hidden(){\n\t}",
"public void v_Verify_Guest7_Hidden(){\n\t}",
"@Test\n public void BnotMatchPass () {\n onView(withId(R.id.username)).check(matches(isDisplayed()));\n //enter correct past password\n onView(withId(R.id.oldPassword)).perform(typeText(\"00000000\"));\n //close keyboard\n closeSoftKeyboard();\n //enter new pass\n onView(withId(R.id.newPassword)).perform(typeText(\"serene00\"));\n //close keyboard\n closeSoftKeyboard();\n //enter diff new pass\n onView(withId(R.id.reNewPassword)).perform(typeText(\"passwoord77\"));\n //close keyboard\n closeSoftKeyboard();\n //click the save button\n onView(withId(R.id.save)).perform(click());\n // check toast visibility\n onView(withText(R.string.passwordMatch))\n .inRoot(new ToastMatcher())\n .check(matches(withText(R.string.passwordMatch)));\n //check activity still shown\n assertFalse(activityTestRule.getActivity().isFinishing());\n }",
"public void v_Verify_Guest8_Hidden(){\n\t}",
"@Test\n public void authenticateTestFailure() {\n assertFalse(device.authenticate());\n }",
"private void verifyAuthWithServer() {\n mResetModel.connect(\n myBinding.editResetEmail.getText().toString());\n //This is an Asynchronous call. No statements after should rely on the\n //result of connect().\n }",
"public void handleSMSAlert()\n\t{\n\t\t\n\t\tWebDriverWait wait=new WebDriverWait(driver, 60);\n\t\t\n\t\twait.until(ExpectedConditions.visibilityOf(checker));\n\t\t\n\t\tif(!Generic.getAttribute(checker, \"resourceId\").contains(\"message\"))\n\t\t\treturn; // No Alert found\n\t\telse\n\t\t{\n\t\t\tif(checker.getText().contains(\"verification could not be completed\"))\n\t\t\t\tAssert.fail(\"Phone Verification failed\");\n\t\t\t\n\t\t\tLog.info(\"== Handling SMS Alert ==\");\n\t\t\tokButton.click();\n\t\t\t\n\t\t\twaitOnProgressBarId(60);\n\t\t}\n\t\t\n\t\twait.until(ExpectedConditions.visibilityOf(checker));\n\t\t\n\t\tif(!Generic.getAttribute(checker, \"resourceId\").contains(\"message\"))\n\t\t\treturn; // No Alert found\n\t\telse\n\t\t{\n\t\t\tLog.info(\"== Handling second SMS Alert ==\");\n\t\t\tokButton.click();\n\t\t\t\n\t\t\twait.until(ExpectedConditions.visibilityOf(checker));\n\t\t}\n\t\t\t\t\n\t\t\n\t\t\n\t}",
"public void v_Verify_Guest12_Hidden(){\n\t}",
"public void v_Verify_Guest5_Hidden(){\n\t}",
"boolean checkVerification();",
"public void v_Verify_Guest11_Displayed(){\n\t}",
"public void v_Verify_Guest2_Displayed(){\n\t}",
"public boolean isAlertPresent() {\r\n\t try {\r\n\t getAlert();\r\n\t return true;\r\n }\r\n\t catch(NoAlertPresentException e) {\r\n\t return false; \r\n\t }\t \r\n }",
"public static void verify() {\n\n\t\t\t\n\t\t\t\n\t\t\n\t}",
"@Test\r\n\tpublic void verification(){\n\t\tdriver.findElement(By.className(\"button block\")).click();\r\n\t\t\r\n\t\t//open a new tab\r\n\t\tdriver.findElement(By.cssSelector(\"body\")).sendKeys(Keys.CONTROL +\"t\");\r\n\t\t\r\n\t\t//switch to new tab\r\n\t\tArrayList<String> tabs = new ArrayList<String>(driver.getWindowHandles());\r\n\t\tdriver.switchTo().window(tabs.get(1));\r\n\t driver.get(\"https://www.textnow.com/login\");\r\n\t driver.findElement(By.id(\"loginUsername\")).sendKeys(\"elaineren\");\r\n\t driver.findElement(By.id(\"loginPassword\")).sendKeys(\"5691219-kk\");\r\n\t driver.findElement(By.id(\"submitLogin\")).click();\r\n\t \r\n\t String scode=driver.findElement(By.id(\"new\")).getText();\r\n\t System.out.println(scode);\r\n\t \r\n\t driver.findElement(By.linkText(\"Log Out\"));\r\n\t \r\n\t driver.switchTo().window(tabs.get(0));\r\n\t}",
"public void verifyUser() {\n\t\toutMessage.setAction(1);\n\t\toutMessage.setObject(this.getUser());\n\t\tmodelCtrl.sendServerMessage(outMessage);\n\t\tinMessage = modelCtrl.getServerResponse();\n\t\t//user is verified\n\t\tif (inMessage.getAction() == 1) {\n\t\t\taccept();\n\t\t}\n\t\t//user is not verified, return to start\n\t\telse {\n\t\t\tSystem.out.println(\"User is not verified\");\n\t\t\tdeny();\n\t\t\t\n\t\t}\n\t}",
"@Override\n public void onClick(DialogInterface dialog, int id) {\n\n\n String password = pass.getText().toString();\n\n try {\n if (password.length() < 2) {\n Toast.makeText(EntranceStep2Activity.this, \"Invalid password\", Toast.LENGTH_LONG).show();\n showPasswordDialog();\n } else {\n\n String user_pwd = PreferencesController.getInstance().getUserPassword();\n\n if (password.compareTo(user_pwd) == 0) {\n //dialog.dismiss();\n\n editSeatStatus();\n } else {\n Toast.makeText(EntranceStep2Activity.this,\n \"Password Incorrect, please try again\",\n Toast.LENGTH_LONG).show();\n // pass.setText(\"\");\n // pass.requestFocus();\n\n showPasswordDialog();\n }\n\n\n //TODO here any local checks if password or user is valid\n\n\n //this will do the actual check with my back-end server for valid user/pass and callback with the response\n //new CheckLoginAsync(MainActivity.this,username,password).execute(\"\",\"\");\n }\n } catch (Exception e) {\n Toast.makeText(EntranceStep2Activity.this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }",
"public void verify() {\n lblTheDatabaseNameIsEmpty();\n lblDatabaseName();\n lblUserName();\n lblPassword();\n lblDatabaseLocation();\n txtPassword();\n txtUserName();\n txtDatabaseLocation();\n btSettings();\n txtDatabaseName();\n btCancel();\n btOK();\n }",
"public void v_Verify_Guest9_Hidden(){\n\t}",
"public void v_Verify_Guest3_Displayed(){\n\t}",
"@Test\npublic void cytc_005() throws InterruptedException {\n\t Thread.sleep(3000);\n\t cyclosPOM.cyclosGenericLogin(\"srivalli2\",\"pass12345\");\n\t screenShot.captureScreenShot(\"CYTC00501\");\n\t Thread.sleep(3000);\n\t cyclosPOM.myProfileOption();\n\t screenShot.captureScreenShot(\"CYTC00502\");\n\t Thread.sleep(2000);\n\t cyclosPOM.changeProfileBtn();\n\t screenShot.captureScreenShot(\"CYTC00503\");\n\t Thread.sleep(1000);\n\t cyclosPOM.changeAddress(\"Raidurgam\");\n\t cyclosPOM.saveButton();\n\t screenShot.captureScreenShot(\"CYTC00504\");\n\t System.out.println(driver.switchTo().alert().getText());\n\t driver.switchTo().alert().accept();\n\t screenShot.captureScreenShot(\"CYTC00505\");\n\t String Actual = cyclosPOM.verifyAddress();\n\t String Expected = \"Raidurgam\";\n\t Assert.assertEquals(Actual, Expected);\n}",
"public void v_Verify_Guest7_Displayed(){\n\t}",
"public void v_Verify_Guest12_Displayed(){\n\t}",
"public void v_Verify_Guest10_Hidden(){\n\t}",
"public boolean wasOkay();",
"public void verifyPassivate() {\n // TODO - How to test the EJB passivate?\n throw new RuntimeException(\"Test not implemented yet.\");\n }",
"public void v_Verify_Guest5_Displayed(){\n\t}",
"public void v_Verify_Guest1_Displayed(){\n\t}",
"private void verifyCode() {\n com.explara_core.login.LoginScreenManager.getInstance().verifyCode(getActivity().getApplicationContext(), mCode, mEmail, new com.explara_core.login.LoginScreenManager.VerifyCodeListener() {\n @Override\n public void onCodeVerified(com.explara_core.login.login_dto.LoginResponseDto loginResponse) {\n if (getActivity() != null && loginResponse != null) {\n if (loginResponse.status.equals(Constants.STATUS_ERROR)) {\n //Constants.createToastWithMessage(this, response.getMessage());\n mMaterialProgressDialog.dismiss();\n AppUtility.createSnackWithMessage(getActivity().findViewById(R.id.forgot_verification_activity_relative_layout), loginResponse.message);\n } else {\n mMaterialProgressDialog.dismiss();\n mMaterialAlertDialog = new MaterialDialog.Builder(getActivity())\n .title(\"Alert\")\n .content(loginResponse.message)\n .positiveText(\"Ok\")\n .positiveColor(Color.RED)\n .negativeColor(Color.GRAY)\n .callback(new MaterialDialog.ButtonCallback() {\n @Override\n public void onPositive(MaterialDialog dialog) {\n super.onPositive(dialog);\n // navigate to login screen\n navigateToResetPage();\n }\n\n @Override\n public void onNegative(MaterialDialog dialog) {\n super.onNegative(dialog);\n }\n })\n .show();\n\n }\n }\n }\n\n @Override\n public void onCodeVerifyFailed() {\n if (getActivity() != null) {\n mMaterialProgressDialog.dismiss();\n Toast.makeText(getActivity(), \"Oops! Could not verify the code.\", Toast.LENGTH_SHORT).show();\n }\n }\n }, TAG);\n }",
"@Test\n public void ValidLoginTest() throws Exception {\n openDemoSite(driver).typeAuthInfo(loginEmail, \"Temp1234%\").signInByClick();\n }",
"public boolean enterPasswordDialog(){\n final Dialog login = new Dialog(this);\n // Set GUI of login screen\n login.setContentView(R.layout.alertbox);\n login.setTitle(\"Please Login\");\n Button btnLogin = (Button) login.findViewById(R.id.btnLogin);\n Button btnCancel = (Button) login.findViewById(R.id.btnCancel);\n final EditText txtUsername = (EditText)login.findViewById(R.id.txtUsername);\n final EditText txtPassword = (EditText)login.findViewById(R.id.txtPassword);\n btnLogin.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v){\n String username_string = txtUsername.getText().toString().trim();\n String password_string = txtPassword.getText().toString().trim();\n if(username_string.equals(\"123\") && password_string.equals(\"123\"))\n {\n // Validate Your login credential here than display message\n Toast.makeText(DrawerActivity.this,\n \"Login Successful\", Toast.LENGTH_SHORT).show();\n loginflag=true;\n Intent i = new Intent(DrawerActivity.this, SaveTimingsActivity.class);\n startActivity(i);\n // Redirect to dashboard / home screen.\n login.dismiss();\n\n }\n else if(!username_string.equals(\"123\") && !password_string.equals(\"123\")){\n Toast.makeText(DrawerActivity.this,\n \"Invalid Credentials\", Toast.LENGTH_SHORT).show();\n loginflag=false;\n }\n\n }\n });\n btnCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n login.dismiss();\n }\n });\n login.show();\n return loginflag;\n}",
"public void alertInvalid(){\n Alert alert = new Alert(Alert.AlertType.WARNING);\n alert.setTitle(\"Herencia invalida\");\n alert.setHeaderText(\"Un hijo no puede ser hijo de su padre o un padre no puede ser padre de su padre,\"\n + \"No puede crear herencia con entidades debiles.\");\n alert.showAndWait();\n }",
"public boolean verify();",
"public void v_Verify_Guest8_Displayed(){\n\t}",
"public String isAlertAccept(String object, String data) {\n\t\tlogger.debug(\"Verify the Alert pop up \");\n\t\tboolean presentFlag = false;\n\t\ttry {\n\t\t\t//waitForPageLoad(driver);\n\t\t\tAlert alert = explicitWaitForAlert();\n\t\t\tif (!presentFlag) {\n\t\t\t\tlogger.debug(\"Alert detected\");\n\t\t\t\tThread.sleep(2000);\n\t\t\t\t//browserSpecificPauseForAlert(object, data);\n\t\t\t\talert.accept();\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\treturn Constants.KEYWORD_FAIL + \"--Alert not found\";\n\t\t\t}\n\n\t\t} \n\t\tcatch(TimeoutException ex)\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 + \"--Alert not found\" + e.getMessage();\n\t\t}\n\t\treturn Constants.KEYWORD_PASS;\n\t}",
"public void v_Verify_Guest4_Displayed(){\n\t}",
"boolean checkUserCorrispondenceLogin(String emailLogin, String passwordLogin);",
"public void CheckFinalResult(){\n\n if(TempPassword.equals(PasswordHolder))\n {\n\n Toast.makeText(MainActivity.this,\"Login Successfully\",Toast.LENGTH_LONG).show();\n\n // Going to Dashboard activity after login success message.\n Intent intent = new Intent(MainActivity.this, ThirdActivity.class);\n\n // Sending Email to Dashboard Activity using intent.\n intent.putExtra(UserName, NameHolder);\n\n startActivity(intent);\n\n\n }\n else {\n\n Toast.makeText(MainActivity.this,\"UserName or Password is Wrong, Please Try Again.\",Toast.LENGTH_LONG).show();\n\n }\n TempPassword = \"NOT_FOUND\" ;\n\n }",
"private void alertForgetPwdMsg() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.MyTheme);\n builder.setMessage(R.string.alert_user_is_locked)\n .setCancelable(false)\n .setPositiveButton(R.string.ok,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n onForgetPwd();\n\n }\n })\n .setNegativeButton(R.string.cancel,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n builder.show();\n }",
"public boolean Is_reducesensoralertbox_Visible() {\r\n\t\tWebElement alert = driver.findElementByName(\"Defined number of sensors is less than the configured. \"\r\n\t\t\t\t+ \"It will reset the sensor configuration. Do you want to continue?\");\r\n\t\treturn IsElementVisibleStatus(alert);\r\n\t}",
"private boolean SecuenciaValidacion() {\n String cuenta = jTextFieldUser.getText().trim();\n String contrasenia = new String(jPasswordFieldPswd.getPassword());\n\n JDialogSplash jDialogSplash = new JDialogSplash(this, ModalityType.APPLICATION_MODAL);\n jDialogSplash.setLocationRelativeTo(this);\n jDialogSplash.setVisible(true);\n\n if (cuenta.equals(id) && contrasenia.equals(pass)) {\n LOG.info(\"Logging successful\");\n return true;\n } else {\n LOG.info(\"Logging failed\");\n return false;\n }\n }",
"public void verifyForgotLinkModalWindow() {\n modalWindow.assertState().enabled();\n modalWindow.assertContains().text(\"warningLeaving the PECOS Website\");\n }",
"public void v_Verify_Guest6_Hidden(){\n\t}",
"public void v_Verify_Guest9_Displayed(){\n\t}",
"public static void AlertAccept() {\n\t\tAlert alt = Browser.Driver.switchTo().alert();\n\t\talt.accept();\n\t}",
"@Test\n public void signinvalidation() {\n\t SalesApplicationPage spg = new SalesApplicationPage(driver);\n if(spg.getPopUpSize()>0)\n\t {\n\t\t spg.getPopUp().click();\n\t }\n System.out.println(driver.getTitle());\n Assert.assertTrue(driver.getTitle().equals(\"Home | Salesforrrce\"));\n }",
"protected boolean isAlertPresent() {\n try {\n driver.switchTo().alert();\n return true;\n } catch (NoAlertPresentException e) {\n if(LOG.isDebugEnabled()) {\n LOG.debug(\"No alert found\", e);\n }\n return false;\n }\n }",
"public static void acceptAlertPopup() throws InterruptedException{\n \ttry {\n \t\talert = driver.switchTo().alert();\n \t\tSystem.out.println(alert.getText());\n \t\tThread.sleep(2000);\n \t\talert.accept();\n \t\tlog.info(\"Alert Accepted\");\n \t }\n \tcatch(Exception e) {\n \t\tSystem.out.println(\"Alert Error : acceptAlertPopup()\");\n \t }\n }",
"public void Verify_UnfortunatelyMessage() throws InterruptedException\r\n\t{\r\n\t\tExplicitWait(Checkavailability);\r\n\t\tThread.sleep(3000);\r\n\t\tif(showRoomInfo.getText().contains(\"Unfortunately, there are no available rooms.\")||(showRoomInfo.getText().contains(\"Or try our partner hotels below.\"))||(showRoomInfo.getText().contains(\"Please try adjusting your search criteria.\")))\r\n\t\t{\r\n\t\t\t//System.out.println(\"After Closing the room/rate using House Control ,rooms are not showing in Booking Engine \");\r\n\t\t\tlogger.info(\"After Closing the room/rate using House Control ,rooms are not showing in Booking Engine \");\r\n\t\t\ttest.log(Status.PASS, \"After Closing the room/rate using House Control ,rooms are not showing in Booking Engine \");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tlogger.error(\"Room/rate are not closed properly in Admin\");\r\n\t\t\ttest.log(Status.FAIL, \"Room/rate are not closed properly in Admin\");\r\n\t\t}\r\n\t}",
"public boolean verify() {\r\n\t\t\r\n\t\tboolean status = true;\r\n\t\tJavascriptExecutor js = (JavascriptExecutor) driver;\r\n\t\tjs.executeScript(\"document.getElementById(\\\"t_sv\\\").value='hello'\");\r\n\t\tString str1=driver.findElement(By.cssSelector(\"div[class=t_txtblkin] textarea[id=t_sv]\")).getText();\r\n\t\tdriver.findElement(By.cssSelector(\"div[class='t_out trtl_inline col '] div[class=t_select] option[value=hi]\")).click();\r\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\tjs.executeScript(\"document.getElementById(\\\"t_revIcon\\\").click\");\r\n\t\tString str2 = driver.findElement(By.cssSelector(\"div[class=t_txtblkout] textarea[id=t_tv]\")).getText();\r\n\t\tif (str1.equals(str2))\r\n\t\t\t status = true;\r\n\t\t\t else\r\n\t\t\t status = false;\r\n\t\t\t return status;\r\n\t}",
"public void actionPerformed(ActionEvent arg0)\n {\n userAlert = chkAlert.getState();\n }",
"public boolean Verify_NonIpoConfirmation() {\n\t\n\tboolean flag = false;\n\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.THANKYOU_LABEL).isDisplayed();\n\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"DISPLAYED\");\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.ORDERRECEIVED_LABEL).isDisplayed();\n\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"DISPLAYED\");\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.WHATNEXT_SECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"DISPLAYED\");\n\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.UPONDELIVERY_SECTION).isDisplayed();\n\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"DISPLAYED\");\n\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed();\n\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"DISPLAYED\");\n\t\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.MYSTORE_SECTION).isDisplayed();\n\t\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"DISPLAYED\");\n\t\t\t\t\t\t flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.GOTOHOMEPAGE_BUTTON).isDisplayed();\n\t\t\t\t\t\t if(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");\n\t\t\t\t\t\t\t}else{extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"NOTDISPLAYED\");}\n\t\t \t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"NOTDISPLAYED\");}\n\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"NOTDISPLAYED\");}\n\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"NOTDISPLAYED\");}\n\t\nreturn flag;\n\t}",
"public String verify()\n\t{\n\t\t\treturn null;\n\t}",
"@Override\r\n\tpublic boolean checkLogout() {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean checkLogout() {\n\t\treturn false;\r\n\t}",
"public void login(ActionEvent e) {\n boolean passwordCheck = jf_password.validate();\n boolean emailCheck = jf_email.validate();\n if (passwordCheck && emailCheck) {\n\n\n new LoginRequest(jf_email.getText(), jf_password.getText()) {\n @Override\n protected void success(JSONObject response) {\n Platform.runLater(fxMain::switchToDashboard);\n }\n\n @Override\n protected void fail(String error) {\n Alert alert = new Alert(Alert.AlertType.ERROR, error, ButtonType.OK);\n alert.showAndWait();\n }\n };\n\n\n }\n }",
"public String Login_by_entering_credentials_which_do_not_exsist() {\n\temailtextbox.sendKeys(\"User\"+random.nextInt(100000)+\"@gmail.com\");\n\tpasswordtextbox.sendKeys(\"password\"+random.nextInt(100000));\n\tLoginButton.click();\n\twait.TextToBe_Wait(\"//div[text()='Invalid Email or Password']\", \"Invalid Email or Password\");\n\tString text=ErrorMessage.getText();\n\treturn text;\n\t}",
"public static void Android_Invalid_otp() {\n try {\n\n AppiumDriver<MobileElement> driver = getAppiumDriver();\n Thread.sleep(2000);\n MobileElement el1 = driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.ViewFlipper/android.widget.RelativeLayout/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[1]/android.widget.EditText\");\n el1.click();\n\n String userName = getData(\"UserName\");\n el1.sendKeys(userName);\n driver.hideKeyboard();\n MobileElement el2 = driver.findElementByXPath(\"/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.ViewFlipper/android.widget.RelativeLayout/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[1]/android.view.ViewGroup/android.view.ViewGroup[3]/android.widget.EditText\");\n String password = getData(\"Password\");\n\n el2.sendKeys(password);\n driver.hideKeyboard();\n ReportHelper.logReportStatus(LogStatus.PASS, \"UserName and Password Given Successfully\");\n\n MobileElement loginBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Login']\");\n loginBtn.click();\n\n Thread.sleep(12000);\n\n driver.findElementByXPath(\"//android.widget.EditText[@text='Confirmation Code']\").sendKeys(\"5252\");\n Thread.sleep(2000);\n ReportHelper.logReportStatus(LogStatus.PASS, \"Invalid OTP Given Successfully\");\n driver.hideKeyboard();\n MobileElement continueBtn = driver.findElementByXPath(\"//android.widget.Button[@text='Continue']\");\n continueBtn.click();\n Thread.sleep(15000);\n MobileElement Errormsg = driver.findElementByXPath(\"//android.widget.TextView[@text='Sorry the authentication code you entered is incorrect. Please try again.']\");\n\n if (Errormsg.isDisplayed()) {\n Thread.sleep(3000);\n ReportHelper.logReportStatus(LogStatus.PASS, \"Sorry the authentication code you entered is incorrect. Please try again.\");\n MobileElement e2 = driver.findElementByXPath(\"//android.widget.Button[@text='Go To Home']\");\n e2.click();\n Thread.sleep(2000);\n }\n\n\n } catch (Exception e) {\n ReportHelper.logReportStatus(LogStatus.FAIL, \"login into the application\");\n\n }\n }",
"@Override\n public void onSignInFailed() {\n BYPASS_LOGIN = true;\n }",
"public void checkAlert(String alertMessage) {\n\t\ttry {\n\t\t\tWebDriverWait wait = new WebDriverWait(Driver.getInstance(), 20);\n\t\t\twait.until(ExpectedConditions.alertIsPresent());\n\t\t\tAlert alert = Driver.getInstance().switchTo().alert();\n\t\t\tThread.sleep(2000);\n\t\t\tassertTrue(alert.getText().matches(\".*\" + alertMessage + \".*\"));\n\t\t\talert.accept();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test\n public void basicConfirmHandlingDismissTest(){\n\n WebElement confirmButton = driver.findElement(By.id(\"confirmexample\"));\n WebElement confirmResult = driver.findElement(By.id(\"confirmreturn\"));\n\n assertEquals(\"cret\", confirmResult.getText());\n confirmButton.click();\n\n String alertMessage = \"I am a confirm alert\";\n Alert confirmAlert = driver.switchTo().alert();\n assertEquals(alertMessage,confirmAlert.getText());\n confirmAlert.dismiss();\n assertEquals(\"false\", confirmResult.getText());\n }",
"public void acceptAlert() {\n\t\tAlert popUp = null;\n\t\ttry {\n\t\t\tpopUp = getDriver().switchTo().alert();\n\t\t\tpopUp.accept();\n\t\t} catch (NoAlertPresentException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public boolean authenticateUser() {\r\n try {\r\n \r\n firstServerMessage();\r\n sendKeys();\r\n sessionKeyMsg();\r\n \r\n \r\n \r\n \treturn true;\r\n }\r\n \r\n catch(Exception ioe){\r\n System.out.println(\"Terminating session with Acct#: \" + currAcct.getNumber());\r\n //ioe.printStackTrace();\r\n return false;\r\n }\r\n \r\n }",
"@Test\n public void alerts () throws Exception\n {\n JavascriptExecutor js = (JavascriptExecutor) driver;\n\n //ACEPTAR ALERTA\n js.executeScript(\"alert('Saludos pal Amigo Raul');\");\n wait = new WebDriverWait(driver, 2);\n wait.until(ExpectedConditions.alertIsPresent());\n utils.Loading(driver, 300);\n /*driver.switchTo().alert().accept();\n utils.Loading(driver, 300);*/\n\n //DISMIS ALERTA --> LO QUE HACE ESTA FUNCION ES CANCELAR LAS ALERTAS,se cumple cuando se tiene un botón cancelar,diferentes a positivo\n String Alert = driver.switchTo().alert().getText();\n System.out.println(\"El texto es\" + Alert);\n driver.switchTo().alert().dismiss();\n }"
]
| [
"0.672878",
"0.6572521",
"0.65717775",
"0.6544014",
"0.6486054",
"0.6346155",
"0.62745106",
"0.62738574",
"0.62437975",
"0.6206362",
"0.61363924",
"0.61106205",
"0.6095903",
"0.6087939",
"0.60794276",
"0.6074453",
"0.60712284",
"0.60712284",
"0.60274255",
"0.6026071",
"0.6012518",
"0.59865063",
"0.59689283",
"0.5967571",
"0.59451026",
"0.5940583",
"0.59319305",
"0.5928349",
"0.59187365",
"0.5911323",
"0.5907862",
"0.59023744",
"0.5881458",
"0.5881438",
"0.5881131",
"0.5874492",
"0.5867934",
"0.58660764",
"0.58643335",
"0.5861254",
"0.5855677",
"0.58505166",
"0.5842863",
"0.5837519",
"0.5835015",
"0.58311796",
"0.5828098",
"0.58267874",
"0.58148897",
"0.58104014",
"0.5808702",
"0.58077973",
"0.57971627",
"0.57850134",
"0.57834077",
"0.5780077",
"0.5779262",
"0.57765293",
"0.5764169",
"0.5757733",
"0.5757694",
"0.5755681",
"0.57555956",
"0.5753161",
"0.57490814",
"0.57472163",
"0.5738515",
"0.573606",
"0.57330096",
"0.57243806",
"0.57237935",
"0.571572",
"0.5715096",
"0.5714664",
"0.5710554",
"0.56998175",
"0.56993675",
"0.56883013",
"0.56880075",
"0.5669869",
"0.56697863",
"0.56693363",
"0.5667163",
"0.5663083",
"0.56627667",
"0.5661626",
"0.56571794",
"0.5643146",
"0.56249416",
"0.5622663",
"0.5622663",
"0.56219876",
"0.56103235",
"0.5608635",
"0.5608288",
"0.5604093",
"0.5601232",
"0.5600276",
"0.55999047",
"0.5590957"
]
| 0.78963155 | 0 |
Method to Login to PECOS. | public void login(String uname, String pwd) {
username.type(uname);
password.type(pwd);
loginButton.click();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public com.sun.jna.PointerType login(Credentials c) throws RelationException;",
"public Reply login(String hostname) throws ThingsException, InterruptedException;",
"String login(String userName, String password) throws RemoteException, InterruptedException;",
"public void login () {\n\t\tGPPSignIn.sharedInstance().authenticate();\n\t}",
"public void testLoginPUK() {\r\n try {\r\n tokenHandler.loginPUK(pukCode);\r\n tokenHandler.logoutPUK();\r\n } catch (Exception e) {\r\n fail(e.toString());\r\n }\r\n }",
"public void connect() throws OOBException {\n \t\tlog.debug(\"enter to connect \");\n \t\tJSch jsch = new JSch();\n \t\ttry {\n\t\t\tjsch.addIdentity(PRIVATE_KEY, PASSPHRASE);\n \t\t\tjsch.setKnownHosts(KNOWN_HOSTS);\n \t\t\tlog.debug(\"user \" + user + \"host : \" + host);\n \t\t\tsession = jsch.getSession(user, host, 22);\n \t\t\tsession.connect();\n \t\t} catch (JSchException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}",
"public static String connect(String... varargs) {\n\t\t// setting the default values when arguments' values are omitted\n\t\tString pmaCoreURL = varargs.length > 0 ? varargs[0] : pmaCoreLiteURL;\n\t\tString pmaCoreUsername = varargs.length > 1 ? varargs[1] : \"\";\n\t\tString pmaCorePassword = varargs.length > 2 ? varargs[2] : \"\";\n\t\t// Attempt to connect to PMA.core instance; success results in a SessionID\n\t\tif (pmaCoreURL.equals(pmaCoreLiteURL)) {\n\t\t\tif (isLite()) {\n\t\t\t\t// no point authenticating localhost / PMA.core.lite\n\t\t\t\treturn pmaCoreLiteSessionID;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\t// purposefully DON'T use helper function apiUrl() here:\n\t\t// why? Because apiUrl() takes session information into account (which we\n\t\t// don't have yet)\n\t\tString url = PMA.join(pmaCoreURL, \"api/json/authenticate?caller=SDK.Java\");\n\t\tif (!pmaCoreUsername.equals(\"\")) {\n\t\t\turl = url.concat(\"&username=\").concat(PMA.pmaQ(pmaCoreUsername));\n\t\t}\n\t\tif (!pmaCorePassword.equals(\"\")) {\n\t\t\turl = url.concat(\"&password=\").concat(PMA.pmaQ(pmaCorePassword));\n\t\t}\n\t\ttry {\n\t\t\tURL urlResource = new URL(url);\n\t\t\tHttpURLConnection con;\n\t\t\tif (url.startsWith(\"https\")) {\n\t\t\t\tcon = (HttpsURLConnection) urlResource.openConnection();\n\t\t\t} else {\n\t\t\t\tcon = (HttpURLConnection) urlResource.openConnection();\n\t\t\t}\n\t\t\tcon.setRequestMethod(\"GET\");\n\t\t\tString jsonString = PMA.getJSONAsStringBuffer(con).toString();\n\t\t\tString sessionID = null;\n\t\t\tif (PMA.isJSONObject(jsonString)) {\n\t\t\t\tJSONObject jsonResponse = PMA.getJSONObjectResponse(jsonString);\n\t\t\t\tif (!jsonResponse.get(\"Success\").toString().toLowerCase().equals(\"true\")) {\n\t\t\t\t\treturn null;\n\t\t\t\t} else {\n\t\t\t\t\tsessionID = jsonResponse.getString(\"SessionId\");\n\t\t\t\t\tpmaUsernames.put(sessionID, pmaCoreUsername);\n\t\t\t\t\tpmaSessions.put(sessionID, pmaCoreURL);\n\t\t\t\t\tif (!pmaSlideInfos.containsKey(sessionID)) {\n\t\t\t\t\t\tpmaSlideInfos.put(sessionID, new HashMap<String, Object>());\n\t\t\t\t\t}\n\t\t\t\t\tpmaAmountOfDataDownloaded.put(sessionID, jsonResponse.length());\n\t\t\t\t\treturn sessionID;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// Something went wrong; unable to communicate with specified endpoint\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\treturn null;\n\t\t}\n\t}",
"@Test\n\t\tpublic void login() {\n\n\t\t\tlaunchApp(\"chrome\", \"http://demo1.opentaps.org/opentaps/control/main\");\n\t\t\t//Enter username\n\t\t\tenterTextById(\"username\", \"DemoSalesManager\");\n\t\t\t//Enter Password\n\t\t\tenterTextById(\"password\", \"crmsfa\");\n\t\t\t//Click Login\n\t\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\t//Check Browser Title\n\t\t\tverifyBrowserTitle(\"Opentaps Open Source ERP + CRM\");\n\t\t\t//Click Logout\n\t\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\t\n\n\t\t}",
"public void loginAsUser() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"user\");\n vinyardApp.fillPassord(\"123\");\n vinyardApp.clickSubmitButton();\n }",
"public static void Login() \r\n\t{\n\t\t\r\n\t}",
"private void login() {\n setCredentials();\n setSysProperties();\n\n Properties sysProperties = System.getProperties();\n sysProperties.put(\"mail.store.protocol\", \"imaps\");\n this.session = Session.getInstance(sysProperties,\n new Authenticator() {\n @Override\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(username, password);\n }\n });\n }",
"void login(String cuid, String pass)\n throws RemoteException;",
"public abstract void login(String userName, String password) throws RemoteException;",
"private void login() {\n AnonimoTO dati = new AnonimoTO();\n String username = usernameText.getText();\n String password = passwordText.getText();\n\n if (isValidInput(username, password)) {\n dati.username = username;\n dati.password = password;\n\n ComplexRequest<AnonimoTO> request =\n new ComplexRequest<AnonimoTO>(\"login\", RequestType.SERVICE);\n request.addParameter(dati);\n\n SimpleResponse response =\n (SimpleResponse) fc.processRequest(request);\n\n if (!response.getResponse()) {\n if (ShowAlert.showMessage(\n \"Username o password non corretti\", AlertType.ERROR)) {\n usernameText.clear();\n passwordText.clear();\n }\n }\n }\n\n }",
"@Test\n\tpublic void loginToOpentaps() {\n\t\tinvokeApp(\"chrome\", \"http://demo1.opentaps.org\");\n\n\t\t// Step 2: Enter user name\n\t\tenterById(\"username\", \"DemoSalesManager\");\n\n\t\t// Step 3: Enter Password\n\t\tenterById(\"password\", \"crmsfa\");\n\n\t\t// Step 4: Click Login\n\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\n\t\t// Step 5: Verify Username\n\t\tverifyTextContainsByXpath(\"//div[@id='form']/h2\", \"Welcome\");\n\t\t\n\t\t// Step 6: Click Logout\n\t\tclickByClassName(\"decorativeSubmit\");\n\t\t\n\n\n\n\t}",
"public void login() throws IOException {\n\t\tApp.setRoot(\"LogIn\");\n\t}",
"@Override\n\tpublic synchronized String login(String username, String password) throws HFModuleException {\n\t\tLog.d(\"HFModuleManager\", \"login\");\n\t\t\n\t\tUserLoginPayload payload = new UserLoginPayload();\n\t\tpayload.setAccessKey(HFConfigration.accessKey);\n\t\tpayload.setUserName(username);\n\t\tpayload.setPassword(password);\n\t\tpayload.setMac(getMacAddress());\n\t\tpayload.setClientName(android.os.Build.MANUFACTURER);\n\t\t\n\t\tUserLoginRequest request = new UserLoginRequest();\n\t\trequest.setPayload(payload);\n\t\t\n\t\ttry {\n\t\t\tUserIdResponse response = cloudSecurityManager.login(request);\n\t\t\t\n\t\t\t\n\t\t\t//[should remove these code later]\n\t\t\tthis.setSid(response.getSessionId());\n\t\t\tHFLocalSaveHelper.getInstence().getMainUserInfoHelper()\n\t\t\t\t\t.setUserName(HFConfigration.cloudUserName);\n\t\t\tHFLocalSaveHelper.getInstence().getMainUserInfoHelper()\n\t\t\t\t\t.setPswd(HFConfigration.cloudPassword);\n\t\t\tHFLocalSaveHelper.getInstence().setAccesskey(\n\t\t\t\t\tHFConfigration.accessKey);\n\t\t\tHFLocalSaveHelper.getInstence().setIsregisted(true);\n\t\t\tManagerFactory.getManager(context, IHFSFManager.class).syncRemoteModuleInfo(\n\t\t\t\t\tnew SyncModuleEventListener() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onSyncSuccess() {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tnotifyLoginEvent(true);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onSyncErr() {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tnotifyLoginEvent(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t//[should remove these code later] the end \n\t\t\t\n\t\t\tString sessionId = response.getSessionId();\n\t\t\tString userId = response.getPayload().getUserId();\n\t\t\t\n\t\t\tUserInfo userInfo;\n\t\t\twhile ((userInfo = userInfoDao.getActiveUserInfo()) != null) {\n\t\t\t\tuserInfo.setActive(false);\n\t\t\t\tuserInfoDao.saveUserInfo(userInfo);\n\t\t\t}\n\t\t\t\n\t\t\tuserInfo = userInfoDao.getUserInfo(userId);\n\t\t\tif (userInfo == null) {\n\t\t\t\tuserInfo = new UserInfo();\n\t\t\t\tuserInfo.setUserId(userId);\n\t\t\t}\n\t\t\tuserInfo.setUserName(username);\n\t\t\tuserInfo.setPassword(password);\n\t\t\tuserInfo.setToken(sessionId);\n\t\t\tuserInfo.setTokenExpiredTime(System.currentTimeMillis() + UserInfo.TOKEN_EXPIRED_TIME);\n\t\t\tuserInfo.setActive(true);\n\t\t\tuserInfo.setAccessKey(payload.getAccessKey());\n\t\t\tuserInfoDao.saveUserInfo(userInfo);\n\t\t\t\n\t\t\treturn sessionId;\n\t\t} catch (CloudException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t\tthrow new HFModuleException(e1.getErrorCode(), e1.getMessage());\n\t\t}\n\t}",
"private void loginAsAdmin() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"admin\");\n vinyardApp.fillPassord(\"321\");\n vinyardApp.clickSubmitButton();\n }",
"protected void login() {\n\t\t\r\n\t}",
"protected synchronized void login() {\n\t\tauthenticate();\n\t}",
"public void doLogin() throws IOException {\n if (principal != null) {\n LOG.info(\n \"Attempting to login to KDC using principal: {} keytab: {}\", principal, keytab);\n UserGroupInformation.loginUserFromKeytab(principal, keytab);\n LOG.info(\"Successfully logged into KDC\");\n } else if (!isProxyUser(UserGroupInformation.getCurrentUser())) {\n LOG.info(\"Attempting to load user's ticket cache\");\n UserGroupInformation.loginUserFromSubject(null);\n LOG.info(\"Loaded user's ticket cache successfully\");\n } else {\n throwProxyUserNotSupported();\n }\n }",
"public static void main(String[] args) throws Exception {\n LoginProtocol.CSLogin.Builder builder = LoginProtocol.CSLogin.newBuilder();\n builder.setDeviceId(\"67B917EB-92DE-48FD-BB7F-E882AC7169BE\");\n builder.setAppVer(\"1.18.0\");\n builder.setCountry(\"CN\");\n builder.setPlatform(\"Windows\");\n builder.setProtoVer(4);\n builder.setZoneName(\"RPG_1\");\n connectAndLogin(\"192.168.1.30\", 8088, builder.build());\n }",
"public LoginResult login() {\n\t\tif (!auth.isLoggedIn())\n\t\t\treturn LoginResult.MAIN_LOGOUT;\n\n\t\ttry {\n\t\t\tHttpURLConnection conn = Utility.getGetConn(FUND_INDEX);\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tArrayList<Cookie> tmpCookies = Cookie.getCookies(conn);\n\t\t\taws = Cookie.getCookie(tmpCookies, \"AWSELB\");\n\t\t\tphp = Cookie.getCookie(tmpCookies, \"PHPSESSID\");\n\t\t\t\n\t\t\tconn = Utility.getGetConn(FUND_LOGIN);\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(aws, php));\n\t\t\tString location = Utility.getLocation(conn);\n\t\t\t\n\t\t\t// https://webapps.itsd.ttu.edu/shim/getfunds/index.php/login?service=https%3A%2F%2Fget.cbord.com%2Fraidercard%2Ffull%2Flogin.php\n\t\t\tconn = Utility.getGetConn(location);\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\t// TODO: future speed optimization\n\t\t\t//if (auth.getPHPCookie() == null) {\n\t\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getELCCookie()));\n\t\t\t\tCookie phpCookie = Cookie.getCookie(Cookie.getCookies(conn), \"PHPSESSID\");\n\t\t\t\t// saves time for Blackboard and retrieveProfileImage().\n\t\t\t\tauth.setPHPCookie(phpCookie);\n\t\t\t\t\n\t\t\t\tconn = Utility.getGetConn(Utility.getLocation(conn));\n\t\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getERaiderCookies()));\n\t\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\t\t\n\t\t\t\tlocation = Utility.getLocation(conn);\n\t\t\t\tif (location.startsWith(\"signin.aspx\"))\n\t\t\t\t\tlocation = \"https://eraider.ttu.edu/\" + location;\n\t\t\t\tconn = Utility.getGetConn(location);\n\t\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getERaiderCookies()));\n\t\t\t\t// might need to set ESI and ELC here. If other areas are bugged, this is why.\n\t\t\t/*} else {\n\t\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getELCCookie(), auth.getPHPCookie()));\n\t\t\t\t/// TODO This is in retirevProfileImage, maybe Mobile Login, and Blackboard!!!\n\t\t\t\tthrow new NullPointerException(\"Needs implementation!\");\n\t\t\t}*/\n\t\t\t\n\t\t\t// https://webapps.itsd.ttu.edu/shim/getfunds/index.php?elu=XXXXXXXXXX&elk=XXXXXXXXXXXXXXXX\n\t\t\tconn = Utility.getGetConn(Utility.getLocation(conn));\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getPHPCookie(), auth.getELCCookie()));\n\t\t\t\n\t\t\t// https://webapps.itsd.ttu.edu/shim/getfunds/index.php/login?service=https%3A%2F%2Fget.cbord.com%2Fraidercard%2Ffull%2Flogin.php\n\t\t\tconn = Utility.getGetConn(Utility.getLocation(conn));\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getPHPCookie(), auth.getELCCookie()));\n\t\t\t\n\t\t\t// https://get.cbord.com/raidercard/full/login.php?ticket=ST-...\n\t\t\tconn = Utility.getGetConn(Utility.getLocation(conn));\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(aws, php));\n\t\t\t\n\t\t\t// https://get.cbord.com/raidercard/full/funds_home.php\n\t\t\tlocation = Utility.getLocation(conn);\n\t\t\tif (location.startsWith(\"index.\")) {\n\t\t\t\tlocation = \"https://get.cbord.com/raidercard/full/\" + location;\n\t\t\t}\n\t\t\tconn = Utility.getGetConn(location);\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(aws, php));\n\t\t\tUtility.readByte(conn);\n\t\t} catch (IOException e) {\n\t\t\tTTUAuth.logError(e, \"raiderfundlogin\", ErrorType.Fatal);\n\t\t\treturn LoginResult.OTHER;\n\t\t} catch (Throwable t) {\n\t\t\tTTUAuth.logError(t, \"raiderfundlogingeneral\", ErrorType.APIChange);\n\t\t\treturn LoginResult.OTHER;\n\t\t}\n\n\t\tloggedIn = true;\n\n\t\treturn LoginResult.SUCCESS;\n\t}",
"private void loginUser() throws JSONException, UnsupportedEncodingException {\n JSONObject jsonObject = new JSONObject();\n jsonObject.put(\"username\", editUserName.getText().toString());\n jsonObject.put(\"password\", editPassword.getText().toString());\n jsonObject.put(\"DeviceID\", diviceToken);\n jsonObject.put(\"DevicePlatform\", devicePlatform);\n invokeLogin(jsonObject);\n\n\n }",
"public void connect(String ipAddr) {\n try {\n // Connect to specified Pi\n telnet.connect(ipAddr, usrID, passwrd);\n // Get input and output stream references\n in = telnet.getInputStream();\n out = new PrintStream(telnet.getOutputStream());\n // Log the user in\n readUntil(\"login: \");\n write(usrID);\n readUntil(\"Password: \");\n write(passwrd);\n // Advance to a prompt\n readUntil(prompt + \" \");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void loginAsTom() {\n textFieldUsername.withTimeoutOf(2000, MILLIS).type(\"tomsmith\");\n textFieldPassword.type(\"SuperSecretPassword!\");\n buttonLogin.click();\n }",
"public int login(String username, String password) \n {\n\treturn this.acctCtrl.login(username, password);\n\n }",
"private void _login() throws SessionException {\n\n \n String servergroup = (String) this._argTable.get(CMD.SERVERGROUP);\n String filetype = (String) this._argTable.get(CMD.FILETYPE);\n String user = (String) this._argTable.get(CMD.USER);\n String password = (String) this._argTable.get(CMD.PASSWORD);\n this._client = new Client(this._domainFile);\n \n //if (servergroup == null) {\n // servergroup = this._client.getDefaultGroup();\n // if (servergroup != null)\n // this._argTable.put(CMD.SERVERGROUP, servergroup);\n //}\n if (servergroup != null)\n {\n if (!this._client.isGroupDefined(servergroup))\n throw new SessionException(\"Group \" + servergroup\n + \" not found in domain!\", Constants.DOMAINLOOKUPERR); \n }\n \n //if (servergroup != null && !l.contains(servergroup))\n // throw new SessionException(\"Group \" + servergroup\n // + \" not found in domain!\", Constants.DOMAINLOOKUPERR);\n if (filetype != null)\n {\n \t this._client.login(user, password, servergroup, filetype);\n }\n else\n {\n \t this._client.login(user, password);\n \t if (servergroup != null)\n \t this._client.setDefaultGroup(servergroup);\n }\n \n if (this._argTable.get(CMD.SERVERGROUP) == null)\n \t this._argTable.put(CMD.SERVERGROUP, \n \t this._client.getDefaultGroup());\n \n }",
"private void logIn() throws IOException {\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String line = reader.readLine();\n String[] a = line.split(\";\");\n\n String user = a[0];\n String password = a[1];\n boolean rez = service.checkPassword(user, password);\n if(rez == TRUE)\n System.out.println(\"Ok\");\n else\n System.out.println(\"Not ok\");\n }",
"private void login(String username,String password){\n\n }",
"int authenticateUser(IDAOSession session, String userName, String password);",
"Conseiller obtenirConseillerParLogin(String login);",
"public void login() {\n\n String username = usernameEditText.getText().toString();\n String password = passwordEditText.getText().toString();\n regPresenter.setHost(hostEditText.getText().toString());\n regPresenter.login(username, password);\n }",
"Map<String, String> interactiveLogin(CloudContext cloudContext, ExtendedCloudCredential extendedCloudCredential,\n CredentialNotifier credentialNotifier);",
"private void login() {\n if (blobStore != null) {\n return;\n }\n if (swiftUsername == null || swiftPassword == null || swiftAuthUrl == null || swiftContainer == null) {\n logger.error(\"Blob storage account is not configured\");\n throw new IllegalArgumentException(\"ERROR: Blob storage account is not configured\");\n }\n blobStore = ContextBuilder.newBuilder(blobApi)\n .endpoint(swiftAuthUrl)\n .credentials(swiftUsername, swiftPassword)\n .buildView(BlobStoreContext.class)\n .getBlobStore();\n\n if (!blobStore.containerExists(swiftContainer)) {\n// CreateContainerOptions options = CreateContainerOptions.Builder\n// .withMetadata(ImmutableMap.of(\"description\", \"E-PRTR data\"));\n// blobStore.createContainerInLocation(null, swiftContainer, options);\n Location location = getRegion();\n blobStore.createContainerInLocation(location, swiftContainer);\n }\n }",
"UserToken login(String username, String password) throws WorkspaceException;",
"private void login(){\n\t\tprogress.toggleProgress(true, R.string.pagetext_signing_in);\n\t\tParseUser.logInInBackground(email.split(\"@\")[0], password, new LogInCallback() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void done(ParseUser user, ParseException e) {\n\t\t\t\tif (e == null) {\n\t\t\t\t\tprogress.toggleProgress(false);\n\t\t\t\t\tIntent intent = new Intent(context, MainActivity.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t// else, incorrect password\n\t\t\t\t\tToast.makeText(context, \n\t\t\t\t\t\t\t\t getString(R.string.parse_login_fail, email), \n\t\t\t\t\t\t\t\t Toast.LENGTH_LONG).show();\t\t\t\t\t\n\t\t\t\t\tLog.e(\"Error Logging into Parse\", \"Details: \" + e.getMessage());\n\t\t\t\t}\n\t\t\t}\t\t\t\t\t\t\t\n\t\t});\n\t}",
"final void loginAsDDUser() {\n\t\tPage_ viewContactPage = createPage(\"PAGE_VIEW_CONTACT_PROPERTIES_FILE\");\r\n\t\tcommonPage.clickAndWait(\"tabContacts\", \"newButton\");\r\n\t\tsearch(testProperties.getConstant(\"CONTACT_CSN\"));\r\n\t\t\r\n\t\t//We search the results on Account CSN to get the contact we want; we don't search on the contact name itself\r\n\t\t// because there are often duplicate names\r\n\r\n\t\t//commonPage.clickLinkInRelatedList(\"accountCsnInContactsRelatedList\", testProperties.getConstant(\"ACCOUNT_CSN\"), \"nameInContactsRelatedList\");\r\n\t\t//commonPage.clickLinkInRelatedList(\"accountCsnInReadOnlyContactsRelatedList\", testProperties.getConstant(\"ACCOUNT_CSN\"), \"nameInReadOnlyContactsRelatedList\");\r\n\t\tcommonPage.clickLinkInRelatedList(\"accountCsnInReadOnlyContactsRelatedList\", testProperties.getConstant(\"ACCOUNT_CSN\"), \"nameInReadOnlyContactsRelatedList\");\r\n\t\t//viewContactPage.waitForFieldPresent(\"loginAsPortalUserLink\");\r\n\t\tviewContactPage.waitForFieldPresent(\"contactDetailHeader\");\r\n\t}",
"void login(String user, String password);",
"protected void login() {\n\t\tdriver.get(getProperty(\"baseUrl\"));\n\n\t\t// 2. Enter valid credentials in the Username and Password fields.\n\t\tLoginPageObjects.usernameTextField(driver).sendKeys(getProperty(\"validUsername\"));\n\t\tLoginPageObjects.passwordTextField(driver).sendKeys(getProperty(\"validPassword\"));\n\n\t\t// 3. Click on the Login button\n\t\tLoginPageObjects.loginButton(driver).click();\n\t\t// waiting.waitForLoad(driver);\n\t}",
"RequestResult loginRequest() throws Exception;",
"public void loginPin(){\n\t\tstate = ATM_State.LOGINPIN;\n\t\tgui.setDisplay(\"Enter your account PIN: \\n\");\n\t}",
"LoginContext login(String username, String password) throws LoginException;",
"public WebDriver login() {\r\n System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\sa841\\\\Documents\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n //System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\sa841\\\\Documents\\\\chromedriver_win32\\\\phantomjs.exe\");\r\n String URL = \"http://Admin:[email protected]:8080/phenotips123/bin/loginsubmit/XWiki/XWikiLogin/\";\r\n ChromeOptions options = new ChromeOptions();\r\n options.addArguments(\"window-size=1024,768\");\r\n DesiredCapabilities capabilities = DesiredCapabilities.chrome();\r\n capabilities.setCapability(ChromeOptions.CAPABILITY, options);\r\n WebDriver driver = new ChromeDriver(capabilities);\r\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n //WebDriver driver = new PhantomJS();\r\n driver.get(URL);\r\n driver.findElement(By.id(\"j_username\")).sendKeys(\"Admin\");\r\n driver.findElement(By.id(\"j_password\")).sendKeys(\"admin\");\r\n driver.findElement(By.className(\"button\")).click();\r\n return driver;\r\n }",
"public abstract boolean login(String email, String passwaord) throws CouponSystemException;",
"Login(String strLogin)\n {\n \tsetLogin(strLogin);\n }",
"public Blob login(String inCommandLine, Properties inTestProps) throws IOException, NuxeoException,\n CommandNotAvailable {\n\n if (!Framework.isTestModeSet()) {\n throw new NuxeoException(\n \"A call to login(String inCommandLine, Properties inTestProps) can me made only in test mode.\");\n }\n\n if (StringUtils.isBlank(inCommandLine)) {\n throw new NuxeoException(\n \"When calling login(), a valid commandline must be passed, the default one does not handle authentification\");\n }\n\n CmdParameters params = new CmdParameters();\n\n String loginUrl = inTestProps.getProperty(\"loginUrl\");\n params.addNamedParameter(CommandLineParameters.URL, loginUrl);\n\n Blob cookieJar = Blobs.createBlobWithExtension(\".jar\");\n params.addNamedParameter(CommandLineParameters.COOKIE_JAR, cookieJar.getFile().getAbsolutePath());\n\n params.addNamedParameter(\"loginVar\", inTestProps.getProperty(\"loginVar\"));\n params.addNamedParameter(\"loginValue\", inTestProps.getProperty(\"loginValue\"));\n params.addNamedParameter(\"pwdVar\", inTestProps.getProperty(\"pwdVar\"));\n params.addNamedParameter(\"pwdValue\", inTestProps.getProperty(\"pwdValue\"));\n params.addNamedParameter(\"submitVar\", inTestProps.getProperty(\"submitVar\"));\n params.addNamedParameter(\"submitValue\", inTestProps.getProperty(\"submitValue\"));\n\n @SuppressWarnings(\"unused\")\n Blob ignorePdf = buildCommandLineAndRun(inCommandLine, params, null, true);\n\n return cookieJar;\n }",
"public abstract void login(\r\n com.google.protobuf.RpcController controller,\r\n PbDemoProto.Login_C2S request,\r\n com.google.protobuf.RpcCallback<PbDemoProto.Login_S2C> done);",
"private void login(){\n displayPane(loginP);\n }",
"@BeforeGroups(groups = \"OFFICER\")\n protected void loginOfficer() throws Exception {\n login(\"[email protected]\", \"officer\");\n }",
"public void testLoginPIN() {\r\n try {\r\n tokenHandler.loginPIN(pinCode);\r\n tokenHandler.logoutPIN();\r\n } catch (Exception e) {\r\n fail(e.toString());\r\n }\r\n }",
"@Override\n\tpublic void loginGPGS() {\n\t}",
"public abstract void login(\r\n com.google.protobuf.RpcController controller,\r\n PbDemoProto.Login_C2S request,\r\n com.google.protobuf.RpcCallback<PbDemoProto.Login_S2C> done);",
"@Override\n\tpublic ResultMessage login(String user_name, String password) throws RemoteException{\n\t\treturn null;\n\t}",
"public Subject login() throws LoginException {\n\t\tSubject ret = null;\n\t\t\n\t\tlc = new LoginContext(ClientLogin.SEYCON_DOMAIN, new ClientCallBackHandler(this.username, this.password));\n\t\t\n\t\tlc.login();\n\t\tret = lc.getSubject();\n\n\t return ret;\n\t}",
"@FXML\n\tprivate void handleLogin() {\n\t \n\t\t\t\ttry {\n\t\t\t\t\tmain.showHomePageOverview(username.getText(),password.getText());\n\t\t\t\t} catch (SQLException 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}",
"public Person login(String username, String password);",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-02-25 10:38:11.378 -0500\", hash_original_method = \"73F3340DC9AFFDCAEE47EFC3606433FD\", hash_generated_method = \"EE604B285EECDD6018DC5ABFCB02AF33\")\n \npublic void rlogin(String localUsername, String remoteUsername,\n String terminalType)\n throws IOException\n {\n rexec(localUsername, remoteUsername, terminalType, false);\n }",
"public Person authenticateAndGetUser(String numCc, String password) throws RemoteException;",
"protected Response login() {\n return login(\"\");\n }",
"public void login() {\n presenter.login(username.getText().toString(), password.getText().toString());\n }",
"@Override\n\tprotected void login() {\n\t\tsuper.login();\n\t}",
"public boolean login() { \r\n byte keytype = (byte)ACR120U.AC_MIFARE_LOGIN_KEYTYPE_A;\r\n byte[] key = new byte[6];\r\n for(int i=0;i<6;i++) \r\n key[i] = (byte)0xff;\r\n int result;\r\n result = cardReader.login(handle,sector,keytype,(byte)00,key);\r\n if (result < 0){ \r\n message = \"No Card\";\r\n return false;\r\n }\r\n return true;\r\n }",
"public void logon() throws IOException, GeneralSecurityException {\n String line;\n char response;\n\n if (state != State.CONNECTED) {\n connect();\n }\n\n socketOut.write('0');\n socketOut.flush();\n socketOut.write(VERSION.getBytes());\n socketOut.write('\\n');\n socketOut.write(GETCOMMAND.getBytes());\n socketOut.write('\\n');\n socketOut.write(USERNAME.getBytes());\n socketOut.write(username.getBytes());\n socketOut.write('\\n');\n socketOut.write(PASSPHRASE.getBytes());\n socketOut.write(new String(passphrase).getBytes());\n socketOut.write('\\n');\n socketOut.write(LIFETIME.getBytes());\n socketOut.write(Integer.toString(lifetime).getBytes());\n socketOut.write('\\n');\n if (credname != null) {\n socketOut.write(CREDNAME.getBytes());\n socketOut.write(credname.getBytes());\n socketOut.write('\\n');\n }\n socketOut.flush();\n\n line = readLine(socketIn);\n if (line == null) {\n throw new EOFException();\n }\n if (!line.equals(VERSION)) {\n throw new ProtocolException(\"bad MyProxy protocol VERSION string: \"\n + line);\n }\n line = readLine(socketIn);\n if (line == null) {\n throw new EOFException();\n }\n if (!line.startsWith(RESPONSE)\n || line.length() != RESPONSE.length() + 1) {\n throw new ProtocolException(\n \"bad MyProxy protocol RESPONSE string: \" + line);\n }\n response = line.charAt(RESPONSE.length());\n if (response == '1') {\n StringBuffer errString;\n\n errString = new StringBuffer(\"MyProxy logon failed\");\n while ((line = readLine(socketIn)) != null) {\n if (line.startsWith(ERROR)) {\n errString.append('\\n');\n errString.append(line.substring(ERROR.length()));\n }\n }\n throw new FailedLoginException(errString.toString());\n } else if (response == '2') {\n throw new ProtocolException(\n \"MyProxy authorization RESPONSE not implemented\");\n } else if (response != '0') {\n throw new ProtocolException(\n \"unknown MyProxy protocol RESPONSE string: \" + line);\n }\n while ((line = readLine(socketIn)) != null) {\n if (line.startsWith(TRUSTROOTS)) {\n String filenameList = line.substring(TRUSTROOTS.length());\n trustrootFilenames = filenameList.split(\",\");\n trustrootData = new String[trustrootFilenames.length];\n for (int i = 0; i < trustrootFilenames.length; i++) {\n String lineStart = \"FILEDATA_\" + trustrootFilenames[i]\n + \"=\";\n line = readLine(socketIn);\n if (line == null) {\n throw new EOFException();\n }\n if (!line.startsWith(lineStart)) {\n throw new ProtocolException(\n \"bad MyProxy protocol RESPONSE: expecting \"\n + lineStart + \" but received \" + line);\n }\n trustrootData[i] = new String(Base64.decode(line\n .substring(lineStart.length())));\n }\n }\n }\n state = State.LOGGEDON;\n }",
"public void login() {\n if (!areFull()) {\n return;\n }\n\n // Get the user login info\n loginInfo = getDBQuery(nameField.getText());\n if (loginInfo.equals(\"\")) {\n return;\n }\n\n // Get password and check if the entered password is true\n infoArray = loginInfo.split(\" \");\n String password = infoArray[1];\n if (!passField.getText().equals(password)) {\n errorLabel.setText(\"Wrong Password!\");\n return;\n }\n\n continueToNextPage();\n }",
"public void logincredentials() {\n\t\tutil.entertext(prop.getValue(\"locators.text.uname\"), \"admin\");\n\t\tutil.entertext(prop.getValue(\"locators.text.password\"), \"Admin123\");\n\t\tutil.ClickElement(prop.getValue(\"locators.button.regdesk\"));\n\t\tutil.ClickElement(prop.getValue(\"locators.button.login\"));\n\t\tlogreport.info(\"logged into the application\");\n\n\t}",
"public static void authenticate() {\n\n Stage window = new Stage();\n\n final String url = OAUTH_URL + getQuery();\n\n BorderPane borderPane = new BorderPane();\n WebView browser = new WebView();\n WebEngine webEngine = browser.getEngine();\n\n webEngine.load(url);\n borderPane.setCenter(browser);\n\n webEngine.setOnStatusChanged(event -> {\n if (event.getSource() instanceof WebEngine) {\n WebEngine we = (WebEngine) event.getSource();\n String location = we.getLocation();\n // If we are redirected to REDIRECT_URL we get contents, and send it to verify() to get access token\n if (location.startsWith(REDIRECT_URL) && location.contains(\"code\") && AUTH_OBECT == null) try {\n URL url1 = new URL(location);\n String[] params = url1.getQuery().split(\"&\");\n Map<String, String> map = new HashMap<>();\n for (String param : params) {\n String name = param.split(\"=\")[0];\n String value = param.split(\"=\")[1];\n map.put(name, value);\n }\n String code = map.get(\"code\");\n // We have code so we continue the flow\n verify(code);\n window.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n // create scene\n window.setTitle(\"Authentication\");\n Scene scene = new Scene(borderPane, 750, 500);\n window.setScene(scene);\n window.showAndWait();\n }",
"void login() {\r\n\t\t// to show the window and the data input\r\n\t\td = new Dialog(f, true);\r\n\t\thost = new TextField(10);\r\n\t\ttf_name = new TextField(10);\r\n\t\td.setLayout(new GridLayout(3, 2));\r\n\t\td.add(new Label(\"host:\"));\r\n\t\td.add(host);\r\n\t\td.add(new Label(\"name:\"));\r\n\t\td.add(tf_name);\r\n\t\tButton b = new Button(\"OK\");\r\n\t\tb.addActionListener(new ActionListener() {\r\n\t\t\t// if the input is ended, then use the realLogin method to login the server\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\trealLogin(host.getText(), tf_name.getText());\r\n\t\t\t\td.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\td.add(b);\r\n\t\td.setResizable(true);\r\n\t\td.setSize(200, 150);\r\n\t\td.show();\r\n\t\t(new Thread(this)).start();\r\n\t}",
"public void login(){\n JSONObject clientInfo = new JSONObject();\n try{\n clientInfo.put(\"username\", mUsername);\n clientInfo.put(\"password\", mPassword);\n clientInfo.put(\"deviceID\", getDeviceID());\n clientInfo.put(\"ipAddress\", getClientIP());\n mSocket.emit(\"login\", clientInfo);\n }catch(JSONException ex){\n throw new RuntimeException(ex);\n }\n }",
"public Login(Main pai) {\n this.pai = pai;\n initComponents();\n senhaBox.setEchoChar('*');\n \n loginBox.setText(\"[email protected]\");\n senhaBox.setText(\"eymar\");\n }",
"@FXML\n\tprivate void onLogin(ActionEvent event) throws IOException {\n\t\tif (!username.getText().equals(\"\") && !password.getText().equals(\"\")) {\n\t\t\tUserCommunication clientCom = new UserCommunication();\n\t\t\tSession client = clientCom.login(username.getText(), password.getText());\n\t\t\t\n\t\t\tif(client != null) { \n\t\t\t\t// login good\n\t\t\t\tparent.createSession(client);\n\t\t\t\tparent.populateProfileDatas();\n\t\t\t\tparent.goToHome();\n\t\t\t\tparent.changeContextualMenu(TypeMenu.CONNECTED);\n\t\t\t\tusername.clear();\n\t\t\t\tpassword.clear();\n\t\t\t\t\n\t\t\t\t// load favorites\n\t\t\t\tArrayList<SearchFavorite> sf = new SearchFavoriteDAO().findByUserId(client.getUser().getID());\n\t\t\t\tparent.setFavorites(sf);\n\t\t\t\tparent.populateSearcheScrollPane();\n\t\t\t\t\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// login failed\n\t\t\t\tMessage.show(\"Erreur\", \"Authentification échouée\", AlertType.INFORMATION);\n\t\t\t}\n\t\t} else {\n\t\t\tMessage.show(\"Erreur au niveau du formulaire\", \"Veuillez remplir le formulaire convenablement.\", AlertType.WARNING);\n\t\t}\n\t}",
"private void loginClient() throws IOException {\n\t\tString instanceID = UUID.randomUUID().toString();\r\n\t\tString loginName = fromClient.readLine();\r\n\t\t\r\n\t\tif (clientTable.has(loginName)) {\r\n\t\t\tString password = fromClient.readLine();\r\n\t\t\t\r\n\t\t\tif (!clientTable.testPassword(loginName, password)) toClient.println(Commands.INVALID_PASSWORD);\r\n\t\t\telse {\r\n\t\t\t\tReport.behaviour(loginName + \" has connected\");\r\n\t\t\t\t\r\n\t\t\t\t//tells the client the connection was a success\r\n\t\t\t\ttoClient.println(Commands.CONNECTION_SUCCESS);\r\n\t\t\t\t\r\n\t\t\t\t//adds a running queue to the account\r\n\t\t\t\tclientTable.addQueue(loginName, instanceID);\r\n\t\t\t\t\r\n\t\t\t\t//create threads\r\n\t\t\t\tmakeThreads(loginName, instanceID);\r\n\t\t\t}\r\n\t\t} \r\n\t\t\r\n\t\t//send error messages if the login was unsuccessful\r\n\t\telse toClient.println(Commands.USER_NOT_FOUND);\r\n\t}",
"public String quickLogin(String token, String email, String password, HttpServletRequest req, HttpServletResponse resp) {\r\n //1. user info\r\n List<String> data = new ArrayList<String>();\r\n log.info (\"[quickLogin] verify user: \" + token);\r\n String userInfo = \"\";\r\n if (token != null) {\r\n userInfo = this.userTokenVerify(token, req, resp);\r\n } else if (email != null || password != null) { \r\n userInfo = this.login(email, password, req, resp); \r\n } else {\r\n userInfo = this.guestRegister(req, resp);\r\n }\r\n if (this.getStatus(userInfo) != NnStatusCode.SUCCESS) {\r\n return userInfo;\r\n } \r\n String sphere = \"en\";\r\n Pattern pattern = Pattern.compile(\".*sphere\\t((en|zh)).*\", Pattern.DOTALL);\r\n Matcher matcher = pattern.matcher(userInfo);\r\n if (matcher.matches()) {\r\n sphere = matcher.group(1);\r\n } \r\n data.add(userInfo);\r\n //2. channel lineup\r\n log.info (\"[quickLogin] channel lineup: \" + token);\r\n String lineup = this.channelLineup(token, null, null, false, null, true, false, false, false, null, req);\r\n data.add(lineup);\r\n if (this.getStatus(lineup) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //3. featured curators\r\n log.info (\"[quickLogin] featured curators\");\r\n String curatorInfo = this.curator(null, null, \"featured\", req);\r\n data.add(curatorInfo);\r\n //4. trending\r\n log.info (\"[quickLogin] trending channels\");\r\n String trending = this.channelStack(Tag.TRENDING, sphere, token, null, false);\r\n data.add(trending);\r\n if (this.getStatus(trending) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //5. recommended\r\n log.info (\"[quickLogin] recommended channels\");\r\n String recommended = this.channelStack(Tag.RECOMMEND, sphere, token, null, false); \r\n data.add(recommended);\r\n if (this.getStatus(recommended) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //6. featured\r\n log.info (\"[quickLogin] featured channels\");\r\n String featured = this.channelStack(Tag.FEATURED, sphere, token, null, false);\r\n data.add(featured);\r\n if (this.getStatus(featured) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //7. hottest\r\n log.info (\"[quickLogin] hot channels\");\r\n String hot = this.channelStack(Tag.HOT, sphere, token, null, false);\r\n data.add(hot);\r\n if (this.getStatus(hot) != NnStatusCode.SUCCESS) {\r\n return this.assembleSections(data);\r\n }\r\n //8. category top level\r\n // log.info (\"[quickLogin] top level categories: \" + ((sphere == null) ? \"default\" : sphere));\r\n // hardcoding to English for now, and keeping translations on the player side\r\n log.info (\"[quickLogin] top level categories: en\");\r\n String categoryTop = this.category (null, \"en\", false);\r\n data.add(categoryTop);\r\n return this.assembleSections(data);\r\n }",
"void login(String email, String password) throws InvalidCredentialsException, IOException;",
"@POST\r\n\t@Path(\"/companyLogin/{compName}/{password}\")\r\n\tpublic Response login(\r\n\t\t\t@PathParam(\"compName\") String compName, \r\n\t\t\t@PathParam(\"password\") String password) throws LoginException, DaoException, ConnectorException {\n\t\t\t\tClientType client = ClientType.COMPANY;\r\n\t\t\t\t// create new company facade\r\n\t\t\t\tCompanyFacade compF = new CompanyFacade();\r\n\t\t\t\t// send login parameters\r\n\t\t\t\tcompF = compF.login(compName, password, client);\r\n\t\t\t\t\r\n\t\t\t\t// Check if CompanyFacade object is not null before running the rest of the code\r\n\t\t\t\tif(compF == null) {\r\n\t\t\t\t\t// if Company login fail, put null in the as the Company facade.\r\n\t\t\t\t\treq.getSession().setAttribute(FACADE, null);\r\n\t\t\t\t\treturn customResponse.getStatusUNCustom(\"login\", \"Access Denied [Company] - FAILED)\");\r\n\t\t\t\t}\r\n\t\t\t\t// pushing the facade into the session\r\n\t\t\t\treq.getSession().setAttribute(FACADE, compF);\r\n\r\n\t\t\t\t// if evreything good, return status OK.\r\n\t\t\t\treturn customResponse.getStatusOKCustom(\"login\", \"Access Granted - Wellcom \" + compName + \" :)\");\r\n\t\t\t\t\r\n\t}",
"@Override\n\tpublic void LoginProc(Parent root) {\n\t\tTextField idTxt = (TextField) root.lookup(\"#txtid\");\n\t\tTextField pwTxt = (TextField) root.lookup(\"#txtpw\");\n\t\tSystem.out.println(\"ID : \"+idTxt.getText()+\",PW : \"+pwTxt.getText()+\"가 입력되었습니다.\");\n\t}",
"Document login(String username, String password);",
"String login(String string2, String string3) throws IOException {\n Protocol protocol = this;\n synchronized (protocol) {\n Response response;\n String string4 = this.apopChallenge;\n String string5 = null;\n if (string4 != null) {\n string5 = this.getDigest(string3);\n }\n if (this.apopChallenge != null && string5 != null) {\n response = this.simpleCommand(\"APOP \" + string2 + \" \" + string5);\n } else {\n Response response2 = this.simpleCommand(\"USER \" + string2);\n if (!response2.ok) {\n if (response2.data == null) return \"USER command failed\";\n return response2.data;\n }\n response = this.simpleCommand(\"PASS \" + string3);\n }\n if (response.ok) return null;\n if (response.data == null) return \"login failed\";\n return response.data;\n }\n }",
"@FXML\n void doLogin(ActionEvent event) {\n try {\n loginModel.doLogin(new Login(textFieldUsername.getText(), passwordFieldPassword.getText()));\n } catch (WrongCredentialsException e) {\n e.printStackTrace();\n Alert alert = new Alert(Alert.AlertType.WARNING, \"Wrong username or password\");\n alert.showAndWait();\n } catch (Exception e) {\n e.printStackTrace();\n Alert alert = new Alert(Alert.AlertType.WARNING, \"Cannot load application. Goodbye!\");\n alert.showAndWait();\n Platform.exit();\n } finally {\n textFieldUsername.clear();\n passwordFieldPassword.clear();\n }\n }",
"@Override\r\n\tpublic void login() {\n\t\t\r\n\t}",
"public login() {\n initComponents();\n setTitle(\"COLLAGE MANAGEMENT SYSTEM\");\n }",
"public void tener_acceso_a_la_plataforma() {\n\t\tbaseState.setUrl(\"http://km.choucairtesting.com/login/index.php\");\t\n\t\tbaseState.setBrowserType(BrowserType.GoogleChrome);\n\t\tbaseState.execute(desktop);\t\n\t\tSerenity.takeScreenshot();\n\t\t\n\t}",
"public User login(String loginName, String password) throws UserBlockedException;",
"public void login(ActionEvent e) {\n boolean passwordCheck = jf_password.validate();\n boolean emailCheck = jf_email.validate();\n if (passwordCheck && emailCheck) {\n\n\n new LoginRequest(jf_email.getText(), jf_password.getText()) {\n @Override\n protected void success(JSONObject response) {\n Platform.runLater(fxMain::switchToDashboard);\n }\n\n @Override\n protected void fail(String error) {\n Alert alert = new Alert(Alert.AlertType.ERROR, error, ButtonType.OK);\n alert.showAndWait();\n }\n };\n\n\n }\n }",
"@FXML\r\n\tpublic void handleLoginButton() throws IOException{\r\n\t\tString username = tfUsernameLogin.getText();\r\n\t\tString password = pfPasswordLogin.getText();\r\n\t\tuserCred = theController.isValidUser(username, password);\r\n\t\tif(userCred.equals(\"manager\")){\r\n\t\t\tloginSuccess = true;\r\n\t\t\tconsoleScreen.setDisable(false);\r\n\t\t\tactionItemsScreen.setDisable(false);\r\n\t\t\tmemberScreen.setDisable(false);\r\n\t\t\tteamScreen.setDisable(false);\r\n\t\t\thandleConsoleButton();\r\n\t\t}\r\n\t\telse if(userCred.equals(\"employee\")){\r\n\t\t\tloginSuccess = true;\r\n\t\t\tconsoleScreen.setDisable(false);\r\n\t\t\tactionItemsScreen.setDisable(false);\r\n\t\t\tmemberScreen.setDisable(true);\r\n\t\t\tteamScreen.setDisable(true);\r\n\t\t\thandleConsoleButton();\r\n\t\t}\r\n\t\telse{\r\n\t\t\tlbAlertLogin.setTextFill(Color.RED);\r\n\t\t\tlbAlertLogin.setText(userCred);\r\n\t\t}\r\n\t}",
"@Request(opcode = OpCode.CSLogin)\n public RetPacket handlerLogin(Object clientData, Session session){\n return null;\n }",
"@Override\n\tpublic boolean employeeLogin(Context ctx) {\n\t\tString username = ctx.formParam(\"username\");\n\t\tString password = ctx.formParam(\"password\");\n\t\tboolean result = authService.employeeLogIn(username, password);\n\t\treturn result;\n\t}",
"@Override\n\tpublic boolean managerLogin(Context ctx) {\n\t\tString username = ctx.formParam(\"username\");\n\t\tString password = ctx.formParam(\"password\");\n\t\tboolean result = authService.managerLogIn(username, password);\n\t\treturn result;\n\t}",
"public Login() {\n initComponents();\n KiemTraKN();\n }",
"private void loginUser(String username, String password) {\n ParseUser.logInInBackground(username, password, new LogInCallback() {\n @Override\n public void done(ParseUser user, ParseException e) {\n if(e != null){\n Log.e(TAG, \"Issue with login: \"+e);\n Toast.makeText(LoginActivity.this, e+\"\", Toast.LENGTH_SHORT);\n return;\n }\n\n linkOneSignalID(ParseUser.getCurrentUser());\n goMainActivity();\n Toast.makeText(LoginActivity.this, \"Success!\", Toast.LENGTH_SHORT);\n }\n });\n }",
"public void LogIn() {\n\t\t\r\n\t}",
"public String login() {\r\n FacesContext context = FacesContext.getCurrentInstance();\r\n HttpServletRequest request = (HttpServletRequest) context.getExternalContext().getRequest();\r\n System.out.println(\"Username: \" + email);\r\n System.out.println(\"Password: \" + password);\r\n try {\r\n //this method will actually check in the realm for the provided credentials\r\n request.login(this.email, this.password);\r\n\r\n } catch (ServletException e) {\r\n context.addMessage(null, new FacesMessage(\"Login failed.\"));\r\n return \"error\";\r\n }\r\n return \"/faces/users/index.xhtml\";\r\n }",
"public void cl_login(String uname, String pwd)\n\t{\n\t\tEnter(txt_uname, uname);\n\t\tEnter(txt_pwd, pwd);\n\t\tClick(btn_login);\n\t\t\n\t}",
"private void adminLogin() {\n\t\tdriver.get(loginUrl);\r\n\t\t// fill the form\r\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(USERNAME);\r\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(PASSWORD);\r\n\t\t// submit login\r\n\t\tdriver.findElement(By.name(\"btn_submit\")).click();\r\n\t}",
"public boolean login(String pinNumber) {\n\n return getCredentials(pinNumber);\n\n }",
"public void connect() throws Exception\n\t{\n\t\tHostnameVerifier hv = new HostnameVerifier()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic boolean verify(String urlHostName, SSLSession session)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\ttrustAllHttpsCertificates();\n\t\tHttpsURLConnection.setDefaultHostnameVerifier(hv);\n\t\t// These following methods have to be called in this order.\n\t\tinitSvcInstRef();\n\t\tinitVimPort();\n\t\tinitServiceContent();\n\t\tvimPort.login(serviceContent.getSessionManager(), user, password, null);\n\t\tinitPropertyCollector();\n\t\tinitRootFolder();\n\t\tisConnected = true;\n\t}",
"public void gotoLogin() {\n try {\n LoginController login = (LoginController) replaceSceneContent(\"Login.fxml\");\n login.setApp(this);\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public UIUser login(LoginToken token, List<String> openCodelists) throws ServiceException, IllegalActionException;",
"public String authenticate() throws LoginException\r\n {\r\n HttpRequest conn = null;\r\n String cookie = \"\";\r\n conn = new HttpRequest(this.url, Method.POST);\r\n HttpResponse _response = conn.send(\"name=\" + username + \"&password=\" + password);\r\n if (_response.getStatus() == HttpURLConnection.HTTP_OK)\r\n {\r\n List<String> cookies = _response.getHeader(AUTH_COOKIE);\r\n for (String c : cookies)\r\n {\r\n this.cookieSession = c.split(\";\")[0];\r\n if (this.cookieSession != null)\r\n break;\r\n }\r\n cookie = this.cookieSession;\r\n }\r\n else if (_response.getStatus() == 401)\r\n {\r\n throw new LoginException(\"Access denied, unauthorized for user [\" + username + \"] and url [\" + url + \"]\");\r\n }\r\n else\r\n {\r\n throw new LoginException(\"Cannot make login in COUCHDB for user [\" + username + \"] and url [\" + url + \"]\"\r\n + \"Http code[\" + _response.getStatus() + \"] \" + _response.getBody());\r\n }\r\n return cookie;\r\n }",
"public LoginResponse login(LoginRequest request, String urlPath) throws IOException, TweeterRemoteException {\n LoginResponse response = clientCommunicator.doPost(urlPath, request, null, LoginResponse.class);\n if(response.isSuccess()) {\n return response;\n } else {\n throw new RuntimeException(response.getMessage());\n }\n }",
"public AdbLoginResponse loginScoinFromAdb(AdbLoginScoinRequest adbLoginScoinRequest);"
]
| [
"0.658612",
"0.5997122",
"0.5925245",
"0.59076554",
"0.5841871",
"0.5819514",
"0.5774168",
"0.57588196",
"0.5723948",
"0.5649163",
"0.56350625",
"0.5626013",
"0.5597081",
"0.5584182",
"0.5570941",
"0.5560385",
"0.55079734",
"0.55011487",
"0.5500883",
"0.54941666",
"0.5476079",
"0.54653805",
"0.5447351",
"0.54450375",
"0.54246265",
"0.5413757",
"0.5390916",
"0.5385268",
"0.53362894",
"0.53286237",
"0.53095293",
"0.53086954",
"0.53010464",
"0.52988",
"0.52970415",
"0.5296855",
"0.5296652",
"0.5292035",
"0.52914697",
"0.5274133",
"0.52587634",
"0.5256836",
"0.5251399",
"0.5239458",
"0.52262896",
"0.5224819",
"0.52135366",
"0.5206755",
"0.52049285",
"0.5200265",
"0.5200058",
"0.51981807",
"0.5195344",
"0.5193062",
"0.5190958",
"0.5189723",
"0.518966",
"0.5183365",
"0.517705",
"0.5160051",
"0.5157869",
"0.5154175",
"0.5150562",
"0.51464474",
"0.5141981",
"0.51219785",
"0.5120857",
"0.5113485",
"0.5112433",
"0.5111693",
"0.51107645",
"0.51095444",
"0.50956947",
"0.5089494",
"0.5082459",
"0.5081106",
"0.50774026",
"0.50730544",
"0.5072772",
"0.50699115",
"0.5067569",
"0.50662446",
"0.5065861",
"0.5063379",
"0.5060341",
"0.50591284",
"0.505354",
"0.50517625",
"0.5048493",
"0.50435185",
"0.50388116",
"0.503483",
"0.50260895",
"0.5014517",
"0.5013914",
"0.501366",
"0.50001556",
"0.4992747",
"0.49910456",
"0.49870124",
"0.49846855"
]
| 0.0 | -1 |
Verify the Forgot password Link in the LoginPage and clicks on it. | public void verifyForgotPwdLink() {
forgotPasswordLink.assertState().enabled();
forgotPasswordLink.assertContains().text("Forgot your password?");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clickForgotPassword() {\r\n\t\tutilities.clickOnElement(aForgotPassword);\r\n\t}",
"public ForgotPasswordPage goToNewPasswordPage(){\n\n botStyle.click(forgotPasswordLink);\n\n return PageFactory.initElements(driver, ForgotPasswordPage.class);\n }",
"private void onForgetPwd() {\n Intent intent = new Intent(this, ForgotPasswordActivity.class);\n startActivity(intent);\n finish();\n }",
"public void changePasswordLinkText() {\n\t\tchangePasswordLinkText.click();\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tString resetUrl = \"#activateacc;uid=\" + user.getRefId();\r\n\t\t\t\tWindow.open(resetUrl, \"Password Reset\", \"\");\r\n\t\t\t}",
"public void login_pw() {\n\t\tIntent intent = new Intent(this, ResetPasswordActivity.class);\n\t\tstartActivity(intent);\n\t}",
"@Test\n\tpublic void verifyBackToLoginButtonInForgetPasswordPageAndItsNavigation() throws Exception{\n\t\tLoginOtomotoProfiLMSPage loginPage = new LoginOtomotoProfiLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.languageDropdown);\n\t\tactionClick(driver,loginPage.languageDropdown);\n\t\twaitTill(1000);\n\t\tactionClick(driver,loginPage.englishOptioninLangDropdown);\n\t\tFogrotPasswordOTMPLMSPage forgotPasswordPageObj = new FogrotPasswordOTMPLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.forgotPasswordLink);\n\t\ttry {\n\t\tclick(loginPage.forgotPasswordLink);\n\t\t}catch (Exception e) {\n\t\t\tjsClick(driver,loginPage.forgotPasswordLink);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordPageHeading);\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\tAssert.assertTrue(verifyElementPresent(forgotPasswordPageObj.forgotPasswordLoginPageLink), \"Back to login link isn't present in forgot password page\");\n\t\ttry {\n\t\t\tclick(forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\t\t}catch (Exception e) {\n\t\t\t\tjsClick(driver,forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.emailTextField);\n\t\twaitTill(1000);\n\t\tAssert.assertTrue(verifyElementPresent(loginPage.emailTextField), \"User isn't landing on login page on clicking back to login button from forgot password page\");\n\t}",
"public void onClick(View v) {\n Intent i = new Intent(getApplicationContext(), ForgotPassword.class);\r\n startActivity(i);\r\n }",
"public void forGotPass(View view) {\n // Perform Forgot Password Action in response to tapping Sign In button\n Intent intent = new Intent( this, ForGotPasswordActivity.class);\n startActivity(intent);\n }",
"public void click_changepwd() {\r\n\t\tdriver.findElement(change_password).click();\r\n\t}",
"public void clickGoToLogin(){\n\t\t\n\t\tgoToLoginBtn.click();\n\t\t\n\t}",
"@Test\r\n public static void tc_ClickChange_Password()\t\r\n {\n\t GenericFunctions.launchApplication(\"firefox\");\r\n\t \r\n\t //We get business logic here as we used page factory\r\n\t Admin_ClickChangePassword clk_passwword = PageFactory.initElements(driver, Admin_ClickChangePassword.class);\r\n\t clk_passwword.admin_ClickOnChngPswd();\r\n }",
"private void jForgottenPasswordMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jForgottenPasswordMouseClicked\n new ForgottenPassword().setVisible(true);\n dispose();\n }",
"public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}",
"public void clickMyPasswordTab() throws UIAutomationException{\r\n\t\r\n\t\telementController.requireElementSmart(fileName,\"My Password In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"My Password In Social Panel\");\r\n\t\tUIActions.click(fileName,\"My Password In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"My Password In Social Panel\");\r\n\r\n\t\tString TextInPage=UIActions.getText(fileName,\"My Password In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"My Password In Social Panel\");\r\n\t\tString TextInXML=dataController.getPageDataElements(fileName,\"My Password Tab Text\" , \"Name\");\r\n\t\tif(!TextInPage.contains(TextInXML)){\r\n\t\t\tthrow new UIAutomationException( \"'\"+TextInXML +\"' not found\");\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void clickOnLoginLink() {\r\n\t\t\r\n\t\tSelenium.click(lnkLogIn());\r\n\t}",
"public String Signup_logout_and_click_forgetpassword() {\n\tJavascriptExecutor js = (JavascriptExecutor)driver;\n\tjs.executeScript( \"arguments[0].click();\", ForgetPasswordButton );\n\tString text=signupPage.Email_value_of_the_user();\n\twait.SingleElementWait(\"//input[@id='resetemail']\");\n\tForgetPasswordTextbox.sendKeys(text);\n\tResetButton.click();\n\twait.SingleElementWait(\"//div[@class='alert alert-success']\");\n\tString successmessage=ForgetPasswordResetSuccessMessage.getText();\n\treturn successmessage;\n\t}",
"@Test\r\n\tpublic void verification(){\n\t\tdriver.findElement(By.className(\"button block\")).click();\r\n\t\t\r\n\t\t//open a new tab\r\n\t\tdriver.findElement(By.cssSelector(\"body\")).sendKeys(Keys.CONTROL +\"t\");\r\n\t\t\r\n\t\t//switch to new tab\r\n\t\tArrayList<String> tabs = new ArrayList<String>(driver.getWindowHandles());\r\n\t\tdriver.switchTo().window(tabs.get(1));\r\n\t driver.get(\"https://www.textnow.com/login\");\r\n\t driver.findElement(By.id(\"loginUsername\")).sendKeys(\"elaineren\");\r\n\t driver.findElement(By.id(\"loginPassword\")).sendKeys(\"5691219-kk\");\r\n\t driver.findElement(By.id(\"submitLogin\")).click();\r\n\t \r\n\t String scode=driver.findElement(By.id(\"new\")).getText();\r\n\t System.out.println(scode);\r\n\t \r\n\t driver.findElement(By.linkText(\"Log Out\"));\r\n\t \r\n\t driver.switchTo().window(tabs.get(0));\r\n\t}",
"private InboxPage clickPasswordNext() {\n try {\n Thread.sleep(2000);\n } catch (Exception e) {\n }\n if (waitForElementDisplayed(By.id(ID_PASSWORD_NEXT), 10, 20)) {\n clickOnElementUsingJquery(driver.findElement(By.id(ID_PASSWORD_NEXT)));\n return new InboxPage(driver);\n }\n return null;\n }",
"public void User_login()\r\n\t{\n\t\tdriver.findElement(FB_Locators.Signin_Email).clear();\r\n\t\tdriver.findElement(FB_Locators.Signin_Email).sendKeys(username);\r\n\t\t\r\n\t\t//Script using element referral..\r\n\t\tWebElement Password_Element=driver.findElement(FB_Locators.Signin_password);\r\n\t\tPassword_Element.clear();\r\n\t\tPassword_Element.sendKeys(password);\r\n\t\t\r\n\t\t//Login button using webelemnet referral\r\n\t\tWebElement Login_btn_Element=driver.findElement(FB_Locators.Signin_btn);\r\n\t\tLogin_btn_Element.click();\r\n\t}",
"public void clickLogin() {\n\t\tcontinueButton.click();\n\t}",
"@When(\"^user should enter the valid password in the loginpage$\")\n\tpublic void user_should_enter_the_valid_password_in_the_loginpage() throws Throwable {\n\t\tinputValuestoElement(pa.getAp().getPasswordinput(), \"superman@1010\");\n\t\n\t \n\t}",
"public void ClickSignIn() {\n if (lnkSignIn.isDisplayed()) {\n lnkSignIn.click();\n }\n else{System.out.println(\"Sign In link is not displayed\");\n }\n }",
"public void clickLogin() {\r\n\t\tdriver.findElement(SignIn).click();\r\n\t\t//SignIn.click();\r\n\t\t//SignIn.click();\r\n\t\t//return new LoginPage();\r\n\t}",
"@Test\n\tpublic void checkPageLoginFlow() {\n\t driver.findElement(By.cssSelector(\"a.login\")).click();\n\n\t // Click login again on Login Page\n\t driver.findElement(By.cssSelector(\"button.login-page-dialog-button\")).click();\n\t\t \n\t // Enter Username & PW\n\t String username = \"username\";\n\t String password = \"password\";\n\n\t // Select and enter text for username and password\n\t driver.findElement(By.id(\"1-email\")).click();\n\t driver.findElement(By.id(\"1-email\")).sendKeys(username);\n\t driver.findElement(By.name(\"password\")).click();\n\t driver.findElement(By.name(\"password\")).sendKeys(password);\n\n\t // Verify Username box displayed\n\t boolean usernameElement = driver.findElement(By.id(\"1-email\")).isDisplayed();\n\t \tAssert.assertTrue(usernameElement, \"Is Not Present, this is not expected\");\n\t \n\t // Verify Password box displayed\n\t boolean passwordElement = driver.findElement(By.name(\"password\")).isDisplayed();\n\t \tAssert.assertTrue(passwordElement, \"Is Not Present, this is not expected\");\n\t}",
"private void initForgotPasswordFlow(){\n TextView forgotPassword = (TextView) findViewById(R.id.lnkForgotPassword);\n forgotPassword.setMovementMethod(LinkMovementMethod.getInstance());\n forgotPassword.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, ForgotPasswordActivity.class);\n startActivity(intent);\n }\n });\n }",
"public void clickLoginBtn() {\r\n\t\tthis.loginBtn.click(); \r\n\t}",
"public void forgetPass() throws InterruptedException\n\t{\n\tdriver.findElement(By.partialLinkText(\"For\")).click();\n\tSystem.out.println(driver.getCurrentUrl());// shows forget password page url\n\tThread.sleep(5000);\n\n\t}",
"private void goUpdatePasswordSucess() {\n\n AppManager.getAppManager().finishActivity(ForgetpasswordActivity.class);\n finish();\n }",
"@Then (\"^SignIn with new credentials$\")\t\t\t\t\t\n public void SignIn_with_new_credentials() throws Throwable \t\t\t\t\t\t\t\n { \t\t\n \tdriver.findElement(By.xpath(\"//*[@id='passwordNext']/content/span\")).click();\t\t\t\t\t\n }",
"public void clickOnLoginButton(){\n\t\tthis.loginButton.click();\n\t}",
"@Test(groups ={Slingshot,Regression,CsaAgent})\t\n\t\t\t\tpublic void verifyPasswordResetLink() throws Exception {\n\t\t\t\t\tReport.createTestLogHeader(\"CSA Journey\", \"To verify the Password Reset functionality\");\n\t\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"PSABroker\");\n\t\t\t\t\t//deregisterinBgbonline(userProfile); \n\t\t\t\t\t//Register a user \n\t\t\t\t\t/*new PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.clickRegisteraUser(userProfile);\n\t\t\t\t\tnew SapCrmAction()\n\t\t\t\t\t .loginDetails(crmuserProfile)\n\t\t\t\t\t .searchByAccountId(crmuserProfile, userProfile);\n\t\t\t\t\tnew RegistrationAction()\n\t\t\t\t\t.openEncryptURL(userProfile)\n\t\t\t\t\t.fillRegistrationDetails(userProfile)\n\t\t\t\t\t.verifyThankYouPage()\n\t\t\t\t\t.clickLoginLink()\n\t\t\t\t\t.verifyAuditEntry(userProfile)\n\t\t\t\t\t.verifyEmailIdInDb(userProfile);*/\n\t\t\t\t\t//verify Lookup User functionality\n\t\t\t\t\tnew PartnerServiceAgentAction()\n\t\t\t\t\t.navigateToPSARegistration()\n\t\t\t\t\t.verifyFindUser(userProfile)\n\t\t\t\t\t.verifyPasswordLink(userProfile);\t \n\t\t\t\t}",
"public void clickOnLoginButton() {\n\t\tutil.clickOnElement(this.loginPageLocators.getLoginButtonElement());\n\t}",
"@Test\n\tpublic void verifyForgetPasswordPageHeadingAndInfoTextAlongWithEmailField() throws Exception{\n\t\tLoginOtomotoProfiLMSPage loginPage = new LoginOtomotoProfiLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.languageDropdown);\n\t\tactionClick(driver,loginPage.languageDropdown);\n\t\twaitTill(1000);\n\t\tactionClick(driver,loginPage.englishOptioninLangDropdown);\n\t\tFogrotPasswordOTMPLMSPage forgotPasswordPageObj = new FogrotPasswordOTMPLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.forgotPasswordLink);\n\t\ttry {\n\t\tclick(loginPage.forgotPasswordLink);\n\t\t}catch (Exception e) {\n\t\t\tjsClick(driver,loginPage.forgotPasswordLink);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordPageHeading);\n\t\tAssert.assertEquals(getText(forgotPasswordPageObj.forgotPasswordPageHeading), \"Recover your password\",\"Recover your password heading is not displaying in forget password page\");\n\t\tAssert.assertEquals(getText(forgotPasswordPageObj.forgotPasswordInfoText), \"Please enter your email address to reset your password.\",\"Info text is not displaying as expected in forget password page\");\n\t\tAssert.assertTrue(verifyElementPresent(forgotPasswordPageObj.forgotPasswordEmailInputField), \"Email field is not displaying in forget password page\");\n\t}",
"@Test\r\n\tpublic void TC_09_verify_Passowrd_Does_Not_Match_with_confirm_password() {\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t// Step 1: Verify the registration page is displayed\r\n\t\t\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t\t\r\n\t\t// Step 2: Enter valid/mandatory registration details with both password and confirm password do'nt match\r\n\t\t\r\n\t\tregPgObj.enterRegistrationDetails(\"firstName\", firstName);\r\n\t\tregPgObj.enterRegistrationDetails(\"lastName\", lastName);\r\n\t\tregPgObj.enterRegistrationDetails(\"email\", email);\r\n\t\tregPgObj.enterRegistrationDetails(\"password\", password);\r\n\t\tregPgObj.enterRegistrationDetails(\"confirmPassword\", \"test12345\");\r\n\t\t\r\n\t\t// Step 3: Click on Sign in button\r\n\t\t\r\n\t\tregPgObj.clickSignInButton();\r\n\t\t\r\n\t\t// Step 4: Verify user should NOT be able to proceed further with registration as proper validation message regarding password and confirm\r\n\t\t// password do'nt match is displayed\r\n\t\t\r\n\t\terrMsg = Page_Registration.getpswdErrMsg();\r\n\t\tAssert.assertEquals(errMsg, \"The password you entered does not match\");\r\n\r\n\t}",
"public void clickLogin() {\n\t\t driver.findElement(loginBtn).click();\n\t }",
"@Test\n public void ValidLoginTest() throws Exception {\n openDemoSite(driver).typeAuthInfo(loginEmail, \"Temp1234%\").signInByClick();\n }",
"@Test\n\tpublic void TC02_Login() {\n\t\tSystem.out.println(\"TC02 : 1. Click to Login Page\");\n\t\tclickToElemnet(loginLinkX);\n\n\t\t// Verify Navigate to Login Page\n\t\tSystem.out.println(\"TC02 : 2. Login Page Display Status :\" + checkElementDisplayed(loginPageX));\n\n\t\t// Login to Page\n\t\tsendkeysToElement(emailTxtX, regEmail);\n\t\tsendkeysToElement(passwordTxtX, regPassword);\n\t\tclickToElemnet(loginBtnX);\n\n\t\t// Verify Login Successfully\n\t\tSystem.out.println(\"TC02 : 3. Login Successfully Status : \" + checkElementDisplayed(myAccountLinkX));\n\t}",
"public void onClick(View v) {\n\t\t\t\tif (checkFields()) {\n\t\t\t\t\tcode = txt_code.getText().toString();\n\t\t\t\t\tnew_password = txt_password.getText().toString();\n\t\t\t\t\t\n\t\t\t\t\tif (connectionDetector.isConnectingToInternet()) {\n\t\t\t\t\t\tgetResetPassword();\n\t\t\t\t\t}else {\n\t\t\t\t\t\tconnectionDetector.showErrorMessage();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstartActivity(new Intent(ChangePasswordActivity.this, UserProfileActivity.class));\n\t\t\t}",
"public void ClickLogin()\n\t{\n\t\t\n\t\tbtnLogin.submit();\n\t}",
"public void clickOnResetButton() {\n\t\tutil.clickOnElement(this.loginPageLocators.getResetButtonElement());\n\t}",
"public void clickloginlink(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Loginlink should be clicked from Home Page\");\r\n\t\ttry{\r\n\t\t\twaitForElement(locator_split(\"lnkLogin\"));\r\n\t\t\tclick(locator_split(\"lnkLogin\"));\r\n\t\t\twaitForPageToLoad(200);\r\n\t\t\tSystem.out.println(\"Login link clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:-Login link is clicked from home page\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Login link is not clicked\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"public void showPasswordPrompt();",
"public void navigateToLoginPage() {\r\n\t\tBrowser.open(PhpTravelsGlobal.PHP_TRAVELS_LOGIN_URL);\r\n\t}",
"@Then(\"^click on the Login button user nagivate to the next page$\")\r\n\tpublic void click_on_the_Login_button_user_nagivate_to_the_next_page() throws Throwable {\n\t w.submit();\r\n\t}",
"public void clickLogin(){\n\t\tdriver.findElement(login).click();\n\t}",
"public void clickLogin(){\n\t\t\tdriver.findElement(login).click();\n\t}",
"@Test\n public void backToSignInTest() {\n driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n String actualResult = forgetPasswordPO\n .clickBackToSignInLink()\n .getSignInPO()\n .getSignInTitle();\n\n Assert.assertEquals(\"Welcome back!\", actualResult);\n }",
"@When(\"^click on login button$\")\n\tpublic void click_on_login_button() throws Throwable {\n\t\tdriver.findElement(By.xpath(\"//input[@name='btnLogin']\")).click();\n\t}",
"@Test(priority = 1)\n public void incorrectLoginWithPassword() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, correctMail);\n login.typeCredentials(login.passwordLabel, incorrectPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.errorBox);\n login.checkErrorMessageMatching(login.errorBox,wrongUsernameAndPasswordError);\n }",
"public void clickSignInLink()\n\t{\n \telementUtils.performElementClick(wbSignInLink);\n\t}",
"public void loginFacebook() {\r\n\t\tdriver.findElement(By.xpath(LearnObjectMap.FB_LOGIN_USERNAME_XPATH)).sendKeys(\"9705033563\");\r\n\t\tdriver.findElement(By.xpath(LearnObjectMap.FB_LOGIN_PASSWORD_XPATH)).sendKeys(\"asfczc\");\r\n\t\tdriver.findElement(By.xpath(LearnObjectMap.FB_LOGIN_XPATH)).click();\r\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\r\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(LearnObjectMap.FB_LOGIN_ERROR_MSG_XPATH)));\r\n\t\tString errorMsg = driver.findElement(By.xpath(LearnObjectMap.FB_LOGIN_ERROR_MSG_XPATH)).getText();\r\n\t\tSystem.out.println(\"Error message -->\"+errorMsg);\r\n\t\tAssert.assertEquals(errorMsg, \"The password that you've entered is incorrect. Forgotten password?\",\"Error message validation Failed\");\r\n\t\t\r\n\t}",
"@Test\n\tpublic void LoggedInTest() throws IOException {\n\t\tLoginapp.Loginapp();\n\t\tLoginapp.frameChecking(\".//*[@id='frmLink']/table/tbody/tr[2]/td/table/tbody/tr/td[1]/a[4]\");\n\n\n}",
"@Test\n public void loginTest() throws MalformedURLException{\n // User user=new User();\n loginPage.fillGmailAccountInput().hitNextbutton().fillPasswordInput();\n InboxPage inboxPage = loginPage.clickNextButton();\n Assert.assertTrue(inboxPage.isElementClickable(inboxPage.composeButton ));\n\n }",
"@Override\r\n public void onClick(View view) {\n showDialog(PASSWORD_DIALOG_ID);\r\n }",
"public void lostPasswordClicked(View view) {\r\n\r\n }",
"public void Login()throws Exception{\r\n if(eMailField.getText().equals(\"user\") && PasswordField.getText().equals(\"pass\")){\r\n displayMainMenu();\r\n }\r\n else{\r\n System.out.println(\"Username or Password Does not match\");\r\n }\r\n }",
"public void clickOnLogin() {\n\t\tWebElement loginBtn=driver.findElement(loginButton);\n\t\tif(loginBtn.isDisplayed())\n\t\t\tloginBtn.click();\n\t}",
"@When(\"^user should cliks the Login Button in login page$\")\n\tpublic void user_should_cliks_the_Login_Button_in_login_page() throws Throwable {\n\t\telementClick(pa.getAp().getLoginclick());\n\t \n\t}",
"@Test(priority = 2)\r\n\tpublic void testLoginPage() {\r\n\r\n\t\tdriver.navigate().to(Login.URL);\r\n\t\tdriver.manage().window().maximize();\r\n\t\tLogin.typeEmail(driver, \"[email protected]\");\r\n\t\tLogin.typePassword(driver, \"lozinka\");\r\n\t\t\r\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\r\n\t\tLogin.clickLoginButton(driver);\r\n\t\t\t\t\r\n\t\tString currentUrl = driver.getCurrentUrl();\r\n\t\tString expectedUrl = \"https://www.humanity.com/app/\";\r\n\t\tSoftAssert sa = new SoftAssert();\r\n\t\tsa.assertEquals(currentUrl, expectedUrl);\r\n\t\tsa.assertAll();\r\n\t}",
"@Test(priority = 3)\n public void emptyPasswordLogin() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, correctMail);\n login.typeCredentials(login.passwordLabel, \"\");\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.errorBox);\n login.checkErrorMessageMatching(login.errorBox,emptyPasswordError);\n\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString pass = sp.getString(\"pass\", \"\");\r\n\t\t\t\tLog.d(\"pass\", pass);\r\n\t\t\t\tif(edtPass.getText().toString().equals(pass)){\r\n\t\t\t\t\tstartActivity(new Intent(PasswordMain.this, MainActivity.class));\r\n\t\t\t\t\tfinish();\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tToast.makeText(PasswordMain.this, \"Password Is Invalid\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\tedtPass.setText(\"\");\r\n\t\t\t\t}\r\n\t\t\t}",
"@When(\"^I should see One Time Password page$\")\n public void i_should_see_One_Time_Password_page() throws Throwable {\n }",
"public void SwichLogingPageAndSignIn()\r\n {\r\n WaitTime(2000);\r\n driver.navigate().to(\"https://www.n11.com/giris-yap\");\r\n \r\n driver.findElement(By.cssSelector(\"#email\")).sendKeys(\"[email protected]\");\r\n WaitTime(2000);\r\n driver.findElement(By.cssSelector(\"#password\")).sendKeys(\"nacre123456\");\r\n WaitTime(2000);\r\n driver.findElement(By.cssSelector(\"#loginButton\")).click();\r\n \r\n }",
"public static void navigateAdminLoginPage() {\n Browser.driver.get(\"http://shop.pragmatic.bg/admin\");\n }",
"@Test\n\tpublic void checkLoginPage() {\n\n\t\t// Locate the logo on the page\n\t\tWebElement logo = driver.findElement(By.xpath(\"(//a/img)[1]\"));\n\t\tString logoSrc = logo.getAttribute(\"src\");\n\n\t\t// Locate the heading of the page\n\t\tString heading = driver.findElement(By.className(\"auth-header\"))\n\t\t\t\t.getText();\n\n\t\t// Locate the Username related fields\n\t\tString usernameLabel = driver.findElement(By.xpath(\"(//label)[1]\"))\n\t\t\t\t.getText();\n\t\tWebElement usernameIcon = driver\n\t\t\t\t.findElement(By.className(\"os-icon-user-male-circle\"));\n\t\tWebElement usernameTextField = driver.findElement(By.id(\"username\"));\n\t\tString placeholderText = usernameTextField.getAttribute(\"placeholder\");\n\n\t\t// Locate the Password related fields\n\t\tString passwordLabel = driver.findElement(By.xpath(\"(//label)[2]\"))\n\t\t\t\t.getText();\n\t\tWebElement passwordIcon = driver\n\t\t\t\t.findElement(By.className(\"os-icon-fingerprint\"));\n\t\tWebElement passwordTextField = driver.findElement(By.id(\"password\"));\n\t\tString placeholderPassword = passwordTextField\n\t\t\t\t.getAttribute(\"placeholder\");\n\n\t\t// Locate the Sign in button\n\t\tWebElement signInButton = driver.findElement(By.id(\"log-in\"));\n\t\tString signInButtonText = signInButton.getText();\n\n\t\t// Locate the Remember me checkbox and label\n\t\tWebElement rememberMeCheckbox = driver\n\t\t\t\t.findElement(By.className(\"form-check-input\"));\n\t\tString rememberMeText = driver\n\t\t\t\t.findElement(By.className(\"form-check-label\")).getText();\n\n\t\t// Locate the social media icons\n\t\tWebElement twitterIcon = driver.findElement(By.xpath(\"(//a/img)[2]\"));\n\t\tString twitterSrc = twitterIcon.getAttribute(\"src\");\n\n\t\tWebElement facebookIcon = driver.findElement(By.xpath(\"(//a/img)[3]\"));\n\t\tString facebookSrc = facebookIcon.getAttribute(\"src\");\n\n\t\tWebElement linkedInIcon = driver.findElement(By.xpath(\"(//a/img)[4]\"));\n\t\tString linkedInSrc = linkedInIcon.getAttribute(\"src\");\n\n\t\t// Assert that the logo is displayed\n\t\tAssert.assertTrue(logo.isDisplayed());\n\t\tAssert.assertEquals(logoSrc,\n\t\t\t\t\"https://demo.applitools.com/img/logo-big.png\");\n\n\t\t// Add assertions for all elements displayed on the Login for,\n\t\tAssert.assertEquals(heading, \"Login Form\");\n\t\tAssert.assertEquals(usernameLabel, \"Username\");\n\t\tAssert.assertTrue(usernameIcon.isDisplayed());\n\t\tAssert.assertTrue(usernameTextField.isDisplayed());\n\t\tAssert.assertEquals(placeholderText, \"Enter your username\");\n\n\t\tAssert.assertEquals(passwordLabel, \"Password\");\n\t\tAssert.assertTrue(passwordIcon.isDisplayed());\n\t\tAssert.assertTrue(passwordTextField.isDisplayed());\n\t\tAssert.assertEquals(placeholderPassword, \"Enter your password\");\n\n\t\tAssert.assertTrue(signInButton.isDisplayed());\n\t\tAssert.assertEquals(signInButtonText, \"Log In\");\n\n\t\tAssert.assertTrue(rememberMeCheckbox.isDisplayed());\n\t\tAssert.assertFalse(rememberMeCheckbox.isSelected());\n\t\tAssert.assertEquals(rememberMeText, \"Remember Me\");\n\n\t\tAssert.assertTrue(twitterIcon.isDisplayed());\n\t\tAssert.assertEquals(twitterSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/twitter.png\");\n\n\t\tAssert.assertTrue(facebookIcon.isDisplayed());\n\t\tAssert.assertEquals(facebookSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/facebook.png\");\n\n\t\tAssert.assertTrue(linkedInIcon.isDisplayed());\n\t\tAssert.assertEquals(linkedInSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/linkedin.png\");\n\t}",
"@Test\n\tpublic void verifySuccessMessageUponSubmittingValidEmailInForgetPasswordPage() throws Exception{\n\t\tLoginOtomotoProfiLMSPage loginPage = new LoginOtomotoProfiLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.languageDropdown);\n\t\tactionClick(driver,loginPage.languageDropdown);\n\t\twaitTill(1000);\n\t\tactionClick(driver,loginPage.englishOptioninLangDropdown);\n\t\tFogrotPasswordOTMPLMSPage forgotPasswordPageObj = new FogrotPasswordOTMPLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.forgotPasswordLink);\n\t\tjsClick(driver,loginPage.forgotPasswordLink);\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordPageHeading);\n\t\tsendKeys(forgotPasswordPageObj.forgotPasswordEmailInputField, testUserPL);\n\t\tjsClick(driver,forgotPasswordPageObj.forgotPasswordRecoveryButton);\n\t\twaitTill(2000);\n\t Assert.assertEquals(getText(forgotPasswordPageObj.forgotPasswordSuccessMessage), \"We've sent you an email with a link to reset your password. You may close this tab and check your email.\", \"Success message is not displaying upon submitting the forget password page with valid ceredentials\");\n\t}",
"@Then(\"^The user clicks the login button$\")\n\tpublic void the_user_clicks_the_login_button() throws Throwable {\n\t\t\n\t lpw.click_login_button();\n\t}",
"@When(\"^Click on Sign Up Button$\")\npublic void click_on_Sign_Up_Button() throws Throwable \n{\n\tdriver.findElement(By.xpath(\"//*[@id=\\\"login-block\\\"]/div/ul/li[1]/a\")).click();\n\tSystem.out.println(\"User is successfully navigated to Registration screen\");\n \n}",
"@Test\n\tpublic void checkconfirmpasswordfieldpresent()\n\t{\n\t\t\n\t\tPageFactory.initElements(driver, Resetpassword.class);\n\t\tResetpassword.password.sendKeys(\"password\");\n\t\tResetpassword.confirm_password.sendKeys(\"confirm password\");\n\t\tString user_text=Resetpassword.error_message.getText();\n\t\tAssert.assertEquals(user_text,\"Password should match with confirm password.\");\n\t\t\n\t}",
"public void Navigate_to_Registration_Page(){\n\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Tab_Home_Screen_Link_Text);\n Assert.assertTrue(getRegistrationTab_InHomeScreen().getText().equals(StringUtils.Registration_Tab_Text));\n getRegistrationTab_InHomeScreen().click();\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Form_Submit_Button);\n\n }",
"private void setUpRecoverPassword() {\n binding.textViewRecoverPassword.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Open the fragment\n Timber.d(\"Forgot password clicked\");\n ForgotPasswordDialog forgotPasswordDialog = new ForgotPasswordDialog();\n forgotPasswordDialog.show(getChildFragmentManager(), ForgotPasswordDialog.class.getSimpleName());\n\n }\n });\n }",
"@When(\"^click on Login Button$\")\npublic void click_on_Login_Button() throws Throwable \n{\n\tdriver.findElement(By.id(\"form-login_submitAuth\")).click();\n}",
"@Given(\"^User should logged in to URL$\")\n\tpublic void user_should_logged_in_to_URL() throws Throwable {\n\t\thomepage.clickloginifdisplayed();\n\t\twait.WaitForElement(loginpage.getLoginemail(), 60);\n\t\tloginpage.ValidLogin();\n\t}",
"@Override\n public void onClick(View view) {\n checkEmailAndPassword();\n\n\n\n }",
"public void forgotPasswordClicked(View view) {\n setContentView(R.layout.activity_forgot_password);\n System.out.println(\"forgot password clicked\");\n }",
"public LoginPage verifyWrongPassword() {\n string errorText = driver.findElement(By.id(\"errorMessage\")).text(); \n Assert.equals(\"Ooops, seems you have the wrong credentials there! :(\", errorText);\n return this;\n }",
"public void clickApplyButtonInMyPassword() throws UIAutomationException{\t\r\n\t\telementController.requireElementSmart(fileName,\"Apply Button In My Password\",GlobalVariables.configuration.getAttrSearchList(), \"Apply Button In My Password\");\r\n\t\tUIActions.click(fileName,\"Apply Button In My Password\",GlobalVariables.configuration.getAttrSearchList(), \"Apply Button In My Password\");\r\n\t\tUIActions.getText(fileName, \"Password Changed Notification\",GlobalVariables.configuration.getAttrSearchList() , \"Password Changed Notification\");\r\n\t\t}",
"@Given(\"^User is navigating to G-mail Login Page$\")\n\tpublic void navigateURL() throws Throwable {\n\t\tSystem.out.println(\"Entered URL\"); \n\t\t\n\t}",
"@WebElementLocator(webDesktop = \"//input[@type='password']\",webPhone = \"//input[@type='password']\")\n private static WebElement passwordField() {\n return getDriver().findElement(By.xpath(new WebElementLocatorFactory().getLocator(LoginPage.class, \"passwordField\")));\n }",
"public void onClick(DialogInterface dialog,int id) {\n ForgotPasswordAct.this.finish();\n }",
"public void onClick(DialogInterface dialog,int id) {\n ForgotPasswordAct.this.finish();\n }",
"@Test(priority = 0)\n public void correctLogin() {\n Login login = new Login(driver, wait);\n login.LoginMethod(login);\n login.typeCredentials(login.emailLabel, correctMail);\n login.typeCredentials(login.passwordLabel, correctPassword);\n login.click(login.submitBtn);\n login.checkElementDisplayed(login.loginContainer);\n }",
"public void sendLoginClickPing() {\n WBMDOmnitureManager.sendModuleAction(new WBMDOmnitureModule(\"reg-login\", ProfessionalOmnitureData.getAppNamePrefix(this), WBMDOmnitureManager.shared.getLastSentPage()));\n }",
"public void onClick(View v) {\n String mail=email.getText().toString();\n String password=pass.getText().toString();\n \n // fetch the Password form database for respective user name\n String storeddata=loginDataBaseAdapter.getSinlgeEntry(mail);\n \n // check if the Stored password matches with Password entered by user\n if(password.equals(storeddata))\n {\n // Toast.makeText(SignIn.this, \"Login Successfull\", Toast.LENGTH_LONG).show();\n launchRingDialog(v);\n Intent intent=new Intent(context,My_Dropbox.class);\n startActivity(intent);\n }\n \n else\n {\n \n Toast.makeText(SignIn.this, \"Invalid Email or Password\", Toast.LENGTH_LONG).show();\n }\n \n }",
"public void clickLoginButton() {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"Verifying the login button is available or not\");\n\t\tAssert.assertTrue(clickLoginButton.isDisplayed());\n\t\tclickLoginButton.click();\n\t}",
"public PageBase click_on_login_submit_form_button () {\r\n HomePageClass homePage = new HomePageClass(driver);\r\n\r\n LGN_Login_submitBTN.click();\r\n\r\n WebDriverWait wait = getWait();\r\n wait.until(ExpectedConditions.visibilityOf(homePage.logout));\r\n\r\n return homePage;\r\n\r\n }",
"@Given(\"^I am on the Sign in page$\")\n\tpublic void I_am_on_the_Sign_in_page() throws Throwable {\n\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\tdriver.findElement(By.linkText(\"Sign in\")).click();\n\t}",
"public void login2() {\n\t\tdriver.findElement(By.cssSelector(\"input[name='userName']\")).sendKeys(\"testing\");\n\t\tdriver.findElement(By.cssSelector(\"input[name='password']\")).sendKeys(\"testing\");\n\t\tdriver.findElement(By.cssSelector(\"input[name='login']\")).click();\n\t\t\n\n\t\n\t\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartActivity(new Intent(PasswordMain.this, ChangePass.class));\r\n\t\t\t}",
"@When(\"^The user enters the password$\")\n\tpublic void the_user_enters_the_password() throws Throwable {\n\t\t\n\t lpw.password_textbox();\n\t}",
"@Test\n\tpublic void Login()\n\t{\n\t\n\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\work\\\\chromedriver.exe\");\n\tWebDriver d = new ChromeDriver();\n\t\n\td.get(\"https://mail.rediff.com/cgi-bin/login.cgi\");\n\t\n\tRediffLoginPagePOF rl = new RediffLoginPagePOF(d);\n\trl.User().sendKeys(\"hello\");\n\trl.Password().sendKeys(\"hello\");\n\t//rl.Go().click();\n\trl.Home().click();\n\t\n\tRediffHomePage rh = new RediffHomePage(d);\n\trh.Searchtext().sendKeys(\"books\");\n\trh.Searchbtn().click();\n\tSystem.out.println(\"text1\");\n\tSystem.out.println(\"branch1\");\n\t\n\t\t\n\t\n\t\n\t}",
"public String Login_by_entering_credentials_which_do_not_exsist() {\n\temailtextbox.sendKeys(\"User\"+random.nextInt(100000)+\"@gmail.com\");\n\tpasswordtextbox.sendKeys(\"password\"+random.nextInt(100000));\n\tLoginButton.click();\n\twait.TextToBe_Wait(\"//div[text()='Invalid Email or Password']\", \"Invalid Email or Password\");\n\tString text=ErrorMessage.getText();\n\treturn text;\n\t}",
"@Override\n public void onClick(View v) {\n if (isEmailValid(inputEmail.getText().toString())) {\n if(inputPass.getText().toString().equals(inputPassConfirm.getText().toString())) {\n // Open next page of registration\n try {\n Intent i = new Intent(mContext, RegisterFinalActivity.class);\n i.putExtra(\"email\", inputEmail.getText().toString());\n i.putExtra(\"pass\", inputPass.getText().toString());\n mContext.startActivity(i);\n } catch (Exception e) {\n Log.i(\"Not found\", Arrays.toString(e.getStackTrace()));\n }\n } else {\n runOnUiThread(() -> {\n Toast toast = Toast.makeText(getApplicationContext(), \"Parolele introduse nu coincid!\", Toast.LENGTH_LONG);\n toast.show();\n });\n }\n } else {\n runOnUiThread(() -> {\n Toast toast = Toast.makeText(getApplicationContext(), \"Email-ul introdus nu este corespunzător!\", Toast.LENGTH_LONG);\n toast.show();\n });\n }\n }",
"@Test(dataProviderClass = Data_Provider_A6.class ,dataProvider=\"ForgetPasswordDataProvider\")\n\tpublic void forgetPasswordTest(String url ,String usname,String password) throws InterruptedException, IOException{\n\t\tWebElement loginbutton = elementCssSelector(\"a[href='https://login.xero.com/']\");\n\t\t((JavascriptExecutor)driver).executeScript(\"arguments[0].click();\" , loginbutton);\n\t\t\n\t\tThread.sleep(6000);\n\t\t//clicking on the forget password? link\n\t\tWebElement forgetPasswordLink = elementCssSelector(\"a[href='/ForgottenPassword']\");\n\t\tforgetPasswordLink.click();\n\t\t\t\t\n\t\tThread.sleep(8000);\n\t\tWebElement email = elementXpath(\"//*[@id='UserName']\");\n\t\tenterText(email,usname ,\"email\");\n\t\t\n\t\tThread.sleep(5000);\n\t\t//clicking on the email button\n\t\tWebElement senLinkButton = elementXpath(\"//*[@id='submitButton']/a/span\");\n\t\tclickBUtton(senLinkButton ,\"sen link Button\");\n\t}",
"public void irParaPaginaDeLogin (){\n\n click(By.className(btnLoginClass));\n }",
"@Test\n public void correctUsernameIncorrectPasswordTest(){\n\n WebElement userField = driver.findElement(By.name(\"user\"));\n WebElement passwordField = driver.findElement(By.name(\"passwd\"));\n WebElement submitbutton = driver.findElement(By.className(\"submit\"));\n\n userField.sendKeys(Constants.REDDIT_VALID_ACCT);\n passwordField.sendKeys(Constants.REDDIT_INVALID_PASS);\n submitbutton.click();\n\n WebDriverWait w = new WebDriverWait(driver, 10);\n\n assertTrue(submitbutton.isDisplayed());\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n String mail = resetMail.getText().toString();\n fAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(Login.this, \"Reset Link Sent To Your Email.\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Login.this, \"Error ! Reset Link is Not Sent\" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n String mail = resetMail.getText().toString();\n fAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(Login.this, \"Reset link sent to your email.\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Login.this, \"Error! Reset link was not sent\" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n\n }",
"@Test(description = \"Go to Login Page From Home Page Header\")\n @Issue(\"EZ-8885\")\n @Description(\"Check the Login button on Header Home Page\")\n void verifyLoginButtonOnMainPage() {\n HomePage homePage = new HomePage(BaseUrl.homePageBaseUrl());\n homePage.open().getHeaderButtonsSection()\n .getLoginAreaButton().clickOnLoginAreaButton(\"https://hotline.ua/login/\");\n\n assertThat(getBrowserConsoleErrors()).isFalse();\n }"
]
| [
"0.7955749",
"0.7129381",
"0.6940247",
"0.69051266",
"0.6769207",
"0.6767533",
"0.6764164",
"0.66962755",
"0.66498494",
"0.66493744",
"0.66464645",
"0.6607284",
"0.66039026",
"0.6576367",
"0.6546385",
"0.65010375",
"0.6481298",
"0.6474887",
"0.64275026",
"0.64271474",
"0.64104277",
"0.6402106",
"0.63869345",
"0.6370036",
"0.6328918",
"0.6309691",
"0.6290822",
"0.62891",
"0.6283955",
"0.6274617",
"0.62643784",
"0.6255777",
"0.6255731",
"0.62526107",
"0.625113",
"0.6241408",
"0.6235971",
"0.6226736",
"0.61975807",
"0.6197549",
"0.61924714",
"0.61910343",
"0.6170901",
"0.6159443",
"0.61585873",
"0.61558884",
"0.61541355",
"0.6150275",
"0.61231625",
"0.61226135",
"0.6119448",
"0.61174965",
"0.6116595",
"0.6109174",
"0.6101116",
"0.60870147",
"0.60869145",
"0.6084703",
"0.60816294",
"0.607894",
"0.60783154",
"0.607024",
"0.60701925",
"0.6062672",
"0.6059659",
"0.6058343",
"0.60558146",
"0.6053562",
"0.6049216",
"0.604912",
"0.6048689",
"0.604638",
"0.60387474",
"0.6030748",
"0.60266566",
"0.6025135",
"0.60234535",
"0.6010185",
"0.59953094",
"0.5989059",
"0.59825236",
"0.59825236",
"0.597781",
"0.597537",
"0.59716403",
"0.5971487",
"0.5964573",
"0.59633124",
"0.5947705",
"0.5945049",
"0.5944813",
"0.5935925",
"0.59262973",
"0.5922325",
"0.5915896",
"0.5912062",
"0.5911592",
"0.59095204",
"0.5906931",
"0.59045386"
]
| 0.7552984 | 1 |
Verify the Mange Profile Link in the LoginPage and clicks on it. | public void verifyManageProfileLink() {
profileLink.assertState().enabled();
profileLink.assertContains().text("Manage your user profile");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}",
"public void clickOnProfile() {\n\t\telement(\"link_profile\").click();\n\t\tlogMessage(\"User clicks on Profile on left navigation bar\");\n\t}",
"public void ClickSignIn() {\n if (lnkSignIn.isDisplayed()) {\n lnkSignIn.click();\n }\n else{System.out.println(\"Sign In link is not displayed\");\n }\n }",
"@Then(\"^User should see home page with profile link$\")\n\tpublic void user_should_see_home_page_with_profile_link() throws Throwable {\n\t\twait.WaitForElement(profilepage.getywalletlink(), 60);\n\t\tprofilepage.verifyloginsuccess();\n\t\tThread.sleep(100);\n\t}",
"@Override\r\n\tpublic void clickOnLoginLink() {\r\n\t\t\r\n\t\tSelenium.click(lnkLogIn());\r\n\t}",
"public void clickGoToLogin(){\n\t\t\n\t\tgoToLoginBtn.click();\n\t\t\n\t}",
"@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyManageUserLinkNavigation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify MumV Navigation Links Manage user page\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvAddnewStdUser\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.verifyWhatisthisOverlay()\n\t\t.ManageUserNavigationVerificationLinks(); \t \t \t\n\t}",
"public void clickSignInLink()\n\t{\n \telementUtils.performElementClick(wbSignInLink);\n\t}",
"public void ClickAccount() {\n if (lnkAccount.isDisplayed()) {\n lnkAccount.click();\n }\n else{System.out.println(\"Account link is not displayed\");}\n }",
"@When(\"^When user navigates to profile page$\")\n\tpublic void when_user_navigates_to_profile_page() throws Throwable {\n\t\twait.WaitForElement(reviewConfirmationPageObjects.getmuserlink(), 60);\n\t\treviewConfirmationPageObjects.clickonprofile();\n\t}",
"public void Navigate_to_Registration_Page(){\n\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Tab_Home_Screen_Link_Text);\n Assert.assertTrue(getRegistrationTab_InHomeScreen().getText().equals(StringUtils.Registration_Tab_Text));\n getRegistrationTab_InHomeScreen().click();\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Form_Submit_Button);\n\n }",
"public void clickLogin() {\r\n\t\tdriver.findElement(SignIn).click();\r\n\t\t//SignIn.click();\r\n\t\t//SignIn.click();\r\n\t\t//return new LoginPage();\r\n\t}",
"public void goToProfilePage() {\n\t\tUtil.element(userTab, driver).click();\n\t}",
"public void clickloginlink(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Loginlink should be clicked from Home Page\");\r\n\t\ttry{\r\n\t\t\twaitForElement(locator_split(\"lnkLogin\"));\r\n\t\t\tclick(locator_split(\"lnkLogin\"));\r\n\t\t\twaitForPageToLoad(200);\r\n\t\t\tSystem.out.println(\"Login link clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:-Login link is clicked from home page\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Login link is not clicked\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"@Given(\"^I am on the Sign in page$\")\n\tpublic void I_am_on_the_Sign_in_page() throws Throwable {\n\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\tdriver.findElement(By.linkText(\"Sign in\")).click();\n\t}",
"@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}",
"@Test\n public void loginTest() throws MalformedURLException{\n // User user=new User();\n loginPage.fillGmailAccountInput().hitNextbutton().fillPasswordInput();\n InboxPage inboxPage = loginPage.clickNextButton();\n Assert.assertTrue(inboxPage.isElementClickable(inboxPage.composeButton ));\n\n }",
"public void clickOnLoginButton() {\n\t\tutil.clickOnElement(this.loginPageLocators.getLoginButtonElement());\n\t}",
"public void User_login()\r\n\t{\n\t\tdriver.findElement(FB_Locators.Signin_Email).clear();\r\n\t\tdriver.findElement(FB_Locators.Signin_Email).sendKeys(username);\r\n\t\t\r\n\t\t//Script using element referral..\r\n\t\tWebElement Password_Element=driver.findElement(FB_Locators.Signin_password);\r\n\t\tPassword_Element.clear();\r\n\t\tPassword_Element.sendKeys(password);\r\n\t\t\r\n\t\t//Login button using webelemnet referral\r\n\t\tWebElement Login_btn_Element=driver.findElement(FB_Locators.Signin_btn);\r\n\t\tLogin_btn_Element.click();\r\n\t}",
"public void clickHomeProfilePage() {\n wait.until(CustomWait.visibilityOfElement(profileHomePageButton));\n profileHomePageButton.click();\n }",
"public void clickLogin() {\n\t\tcontinueButton.click();\n\t}",
"public void clickOnLoginButton(){\n\t\tthis.loginButton.click();\n\t}",
"@Test(priority = 2)\r\n\tpublic void testLoginPage() {\r\n\r\n\t\tdriver.navigate().to(Login.URL);\r\n\t\tdriver.manage().window().maximize();\r\n\t\tLogin.typeEmail(driver, \"[email protected]\");\r\n\t\tLogin.typePassword(driver, \"lozinka\");\r\n\t\t\r\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\r\n\t\tLogin.clickLoginButton(driver);\r\n\t\t\t\t\r\n\t\tString currentUrl = driver.getCurrentUrl();\r\n\t\tString expectedUrl = \"https://www.humanity.com/app/\";\r\n\t\tSoftAssert sa = new SoftAssert();\r\n\t\tsa.assertEquals(currentUrl, expectedUrl);\r\n\t\tsa.assertAll();\r\n\t}",
"@Test\n\tpublic void TC02_Login() {\n\t\tSystem.out.println(\"TC02 : 1. Click to Login Page\");\n\t\tclickToElemnet(loginLinkX);\n\n\t\t// Verify Navigate to Login Page\n\t\tSystem.out.println(\"TC02 : 2. Login Page Display Status :\" + checkElementDisplayed(loginPageX));\n\n\t\t// Login to Page\n\t\tsendkeysToElement(emailTxtX, regEmail);\n\t\tsendkeysToElement(passwordTxtX, regPassword);\n\t\tclickToElemnet(loginBtnX);\n\n\t\t// Verify Login Successfully\n\t\tSystem.out.println(\"TC02 : 3. Login Successfully Status : \" + checkElementDisplayed(myAccountLinkX));\n\t}",
"public void clickLogin(){\n\t\tdriver.findElement(login).click();\n\t}",
"public void clickLogin(){\n\t\t\tdriver.findElement(login).click();\n\t}",
"public static void navigateAdminLoginPage() {\n Browser.driver.get(\"http://shop.pragmatic.bg/admin\");\n }",
"@Given(\"^User should logged in to URL$\")\n\tpublic void user_should_logged_in_to_URL() throws Throwable {\n\t\thomepage.clickloginifdisplayed();\n\t\twait.WaitForElement(loginpage.getLoginemail(), 60);\n\t\tloginpage.ValidLogin();\n\t}",
"@Test(priority=19)\n\tpublic void verifyRedirectionOfProfileAndLogoutOptions() throws Exception {\n\t\tOverviewTradusPROPage overviewPage= new OverviewTradusPROPage(driver);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.profileIconOnHeader);\n\t click(overviewPage.profileIconOnHeader);\n\t waitTill(1000);\n\t click(overviewPage.profileOptionInProfileIconDropdown);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.profilePageVerificationElement);\n\t waitTill(2000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms/profile\"),\n\t \t\t\"Profile page is not displaying by clicking on profile option under profile icon dropdown list\");\n\t click(overviewPage.logoutOptionInProfileIconDropdown);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.LoginText);\n\t waitTill(2000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/login\"),\n\t \t\t\"User not logged out from account by cicking on logout option in dropdown\");\n\t}",
"@Given(\"^user should open link$\")\r\n\tpublic void user_should_open_link() throws Throwable {\r\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n driver.manage().deleteAllCookies();\r\n\r\n driver.get(prop.getProperty(\"url\"));\r\n\r\n WebDriverWait wait = new WebDriverWait(driver,60);\r\n \t wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(prop.getProperty(\"Popup\"))));\r\n \t driver.findElement(By.xpath(prop.getProperty(\"Popup\"))).click();Thread.sleep(5000);\r\n\t}",
"public void VerifyHomepage(){\r\n\t\t//String username = getValue(Email);\r\n\t//\tString password = getValue(Password);\r\n\r\n\t//\tclass Local {};\r\n\t\t/*Reporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");*/\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\t//driver.findElement(locator_split(\"btn_privacyok\")).click();\r\n\t\tclick(locator_split(\"btn_privacyok\"));\r\n\t\t\t\r\n\t\t\t/*Reporter.log(\"PASS_MESSAGE:- My Account is clicked and user is logged in\");*/\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- User is not logged in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"@When(\"^the user opens linked sigup page$\")\r\n\tpublic void the_user_opens_linked_sigup_page() throws Throwable {\n\tsign.linkedin_signup();\r\n\t\t\r\n\t}",
"public void logInAcceptanceTestFounder() throws Exception {\n String acceptanceTestUserName = \"[email protected]\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n }",
"@When(\"^Click on Sign Up Button$\")\npublic void click_on_Sign_Up_Button() throws Throwable \n{\n\tdriver.findElement(By.xpath(\"//*[@id=\\\"login-block\\\"]/div/ul/li[1]/a\")).click();\n\tSystem.out.println(\"User is successfully navigated to Registration screen\");\n \n}",
"public void clickRegisterLink() {\n $(registerLink).click();\n }",
"public void clickLogin() {\n\t\t driver.findElement(loginBtn).click();\n\t }",
"public void clickLoginBtn() {\r\n\t\tthis.loginBtn.click(); \r\n\t}",
"public void clickOnLogin() {\n\t\tWebElement loginBtn=driver.findElement(loginButton);\n\t\tif(loginBtn.isDisplayed())\n\t\t\tloginBtn.click();\n\t}",
"public void openProfile(){\n\t\t\n\t\tclickElement(profile_L, driver);\n\t}",
"@Given(\"User is on the login page\")\n\tpublic void user_is_on_the_login_page() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src\\\\test\\\\resources\\\\chromedriver.exe\");\n\t\tdriver=new ChromeDriver();\n\t\tdriver.get(\"https://10.232.237.143/TestMeApp/fetchcat.htm\");\n\t\tdriver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\n\t\tdriver.manage().window().maximize();\n\t driver.findElement(By.id(\"details-button\")).click();\n\t\tdriver.findElement(By.id(\"proceed-link\")).click();\n\t}",
"public void clickUpdateProfileLink()\n\t{\n \telementUtils.performElementClick(wbUpdateProfileLink);\n\t}",
"@And(\"is on login page\")\n\tpublic void is_on_login_page() {\n\t\tSystem.out.println(\"user on 1\");\n\t\tdriver.navigate().to(\"https://example.testproject.io/web/\");\n\n\t}",
"public void click_SIGN_IN() {\r\n\t\tbtn_SIGN_IN.click();\r\n\t}",
"public HomePage clickOnLogin() {\n// Actions action = new Actions(driver);\n// action.moveToElement(login).build().perform();\n// closeAd.click();\n login.isDisplayed();\n login.click();\n return this;\n }",
"@Test\n\tpublic void checkLoginPage() {\n\n\t\t// Locate the logo on the page\n\t\tWebElement logo = driver.findElement(By.xpath(\"(//a/img)[1]\"));\n\t\tString logoSrc = logo.getAttribute(\"src\");\n\n\t\t// Locate the heading of the page\n\t\tString heading = driver.findElement(By.className(\"auth-header\"))\n\t\t\t\t.getText();\n\n\t\t// Locate the Username related fields\n\t\tString usernameLabel = driver.findElement(By.xpath(\"(//label)[1]\"))\n\t\t\t\t.getText();\n\t\tWebElement usernameIcon = driver\n\t\t\t\t.findElement(By.className(\"os-icon-user-male-circle\"));\n\t\tWebElement usernameTextField = driver.findElement(By.id(\"username\"));\n\t\tString placeholderText = usernameTextField.getAttribute(\"placeholder\");\n\n\t\t// Locate the Password related fields\n\t\tString passwordLabel = driver.findElement(By.xpath(\"(//label)[2]\"))\n\t\t\t\t.getText();\n\t\tWebElement passwordIcon = driver\n\t\t\t\t.findElement(By.className(\"os-icon-fingerprint\"));\n\t\tWebElement passwordTextField = driver.findElement(By.id(\"password\"));\n\t\tString placeholderPassword = passwordTextField\n\t\t\t\t.getAttribute(\"placeholder\");\n\n\t\t// Locate the Sign in button\n\t\tWebElement signInButton = driver.findElement(By.id(\"log-in\"));\n\t\tString signInButtonText = signInButton.getText();\n\n\t\t// Locate the Remember me checkbox and label\n\t\tWebElement rememberMeCheckbox = driver\n\t\t\t\t.findElement(By.className(\"form-check-input\"));\n\t\tString rememberMeText = driver\n\t\t\t\t.findElement(By.className(\"form-check-label\")).getText();\n\n\t\t// Locate the social media icons\n\t\tWebElement twitterIcon = driver.findElement(By.xpath(\"(//a/img)[2]\"));\n\t\tString twitterSrc = twitterIcon.getAttribute(\"src\");\n\n\t\tWebElement facebookIcon = driver.findElement(By.xpath(\"(//a/img)[3]\"));\n\t\tString facebookSrc = facebookIcon.getAttribute(\"src\");\n\n\t\tWebElement linkedInIcon = driver.findElement(By.xpath(\"(//a/img)[4]\"));\n\t\tString linkedInSrc = linkedInIcon.getAttribute(\"src\");\n\n\t\t// Assert that the logo is displayed\n\t\tAssert.assertTrue(logo.isDisplayed());\n\t\tAssert.assertEquals(logoSrc,\n\t\t\t\t\"https://demo.applitools.com/img/logo-big.png\");\n\n\t\t// Add assertions for all elements displayed on the Login for,\n\t\tAssert.assertEquals(heading, \"Login Form\");\n\t\tAssert.assertEquals(usernameLabel, \"Username\");\n\t\tAssert.assertTrue(usernameIcon.isDisplayed());\n\t\tAssert.assertTrue(usernameTextField.isDisplayed());\n\t\tAssert.assertEquals(placeholderText, \"Enter your username\");\n\n\t\tAssert.assertEquals(passwordLabel, \"Password\");\n\t\tAssert.assertTrue(passwordIcon.isDisplayed());\n\t\tAssert.assertTrue(passwordTextField.isDisplayed());\n\t\tAssert.assertEquals(placeholderPassword, \"Enter your password\");\n\n\t\tAssert.assertTrue(signInButton.isDisplayed());\n\t\tAssert.assertEquals(signInButtonText, \"Log In\");\n\n\t\tAssert.assertTrue(rememberMeCheckbox.isDisplayed());\n\t\tAssert.assertFalse(rememberMeCheckbox.isSelected());\n\t\tAssert.assertEquals(rememberMeText, \"Remember Me\");\n\n\t\tAssert.assertTrue(twitterIcon.isDisplayed());\n\t\tAssert.assertEquals(twitterSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/twitter.png\");\n\n\t\tAssert.assertTrue(facebookIcon.isDisplayed());\n\t\tAssert.assertEquals(facebookSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/facebook.png\");\n\n\t\tAssert.assertTrue(linkedInIcon.isDisplayed());\n\t\tAssert.assertEquals(linkedInSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/linkedin.png\");\n\t}",
"public void clickLoginButton() {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"Verifying the login button is available or not\");\n\t\tAssert.assertTrue(clickLoginButton.isDisplayed());\n\t\tclickLoginButton.click();\n\t}",
"public void verifyOnDashboardPage() {\n verifyUserLoggedIn.waitForState().enabled(30);\n verifyUserLoggedIn.assertContains().text(\"Dev Links\");\n }",
"public void I_Should_click_My_Account_link(){\n\t MyAccountLink.click();\n\t \n}",
"@Given(\"^User is navigating to G-mail Login Page$\")\n\tpublic void navigateURL() throws Throwable {\n\t\tSystem.out.println(\"Entered URL\"); \n\t\t\n\t}",
"private void clickSignOn() {\n\t\tthis.clickElement(signon);\n\t}",
"@Test\n\tpublic void loginSuccessful() {\n\t\tHomePage.sign_in_label.click();\n\t\tLoginContainer.LogInUser(VALID_USER_NAME, VALID_USER_PASSWORD);\n\t\t\n\t\t// Wait for page to load\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\n\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.className(\"links-container\")));\n\t\t\n\t\t//Check if proper page is loaded\n\t\tPageFactory.initElements(driver, LoginSuccessfulTest.class);\n\t\tAssert.assertEquals(linksContainer.getAttribute(\"title\"), \"Kasia suszczynska - My page\", \"Links container title\");\n\t}",
"@Test\n\tpublic void LoggedInTest() throws IOException {\n\t\tLoginapp.Loginapp();\n\t\tLoginapp.frameChecking(\".//*[@id='frmLink']/table/tbody/tr[2]/td/table/tbody/tr/td[1]/a[4]\");\n\n\n}",
"@Test(description = \"Go to Login Page From Home Page Header\")\n @Issue(\"EZ-8885\")\n @Description(\"Check the Login button on Header Home Page\")\n void verifyLoginButtonOnMainPage() {\n HomePage homePage = new HomePage(BaseUrl.homePageBaseUrl());\n homePage.open().getHeaderButtonsSection()\n .getLoginAreaButton().clickOnLoginAreaButton(\"https://hotline.ua/login/\");\n\n assertThat(getBrowserConsoleErrors()).isFalse();\n }",
"public SignInPage selectSignInButtonFromNavBar() {\n \t new WebDriverWait (DRIVER, 5)\n \t .until (ExpectedConditions.presenceOfElementLocated(navigationBarSignInLinkLocator))\n \t .click();\n \t\n \t new WebDriverWait (DRIVER, 5).until(\n \t\t\t ExpectedConditions.stalenessOf(DRIVER.findElement(navigationBarSignInLinkLocator)));\n \t \n return new SignInPage(); \n }",
"@Then(\"^user check is logged in$\")\n public void check_user_logged(){\n log.info(\"try to check if user is logged in\");\n String linkSignOut = pageLogin.getLinkSignOut().getText();\n Assert.assertTrue(linkSignOut.equals(\"Sign out\"), \"There is no visible link sign out\");\n String linkUserName = pageLogin.getLinkUserFullname().getText();\n Assert.assertTrue(linkUserName.equals(\"Antoni Giez\"));\n log.info(\"user is logged in, username - \" + linkUserName);\n }",
"public void navigateToLoginPage() {\r\n\t\tBrowser.open(PhpTravelsGlobal.PHP_TRAVELS_LOGIN_URL);\r\n\t}",
"public void clickUserProfile(){\r\n driver.findElement(userTab).click();\r\n driver.findElement(profileBtn).click();\r\n }",
"@Given(\"^I am able to access the sign in page$\")\n public void i_am_able_to_access_the_sign_in_page() throws Throwable {\n bbcSite.bbcSignInPage().goToSignInPage();\n Assert.assertEquals(bbcSite.bbcSignInPage().getSignInPageURL(), bbcSite.getCurrentURL());\n }",
"@Given(\"^The user is in the login page$\")\n\tpublic void the_user_is_in_the_login_page() throws Throwable {\n\t\tChrome_Driver();\n\t\tlpw =new Login_Page_WebElements();\n\t\tlpw.open_orange_hrm();\n\t}",
"public void clickToLogoutLink() {\n\t\twaitToElementClickable(driver,RegisterPageUI.LOGOUT_LINK);\n\t\tclickToElement(driver,RegisterPageUI.LOGOUT_LINK);\n\t}",
"@Test\r\n public void login() {\n driver.findElement(By.className(\"login\")).click();\r\n // Fill in the form\r\n driver.findElement(By.id(\"email\")).sendKeys(\"[email protected]\");\r\n driver.findElement(By.id(\"passwd\")).sendKeys(\"tester\");\r\n driver.findElement(By.id(\"SubmitLogin\")).click();\r\n // Assert if element is displayed\r\n // Assert if element is displayed\r\n Assert.assertTrue(driver.findElement(\r\n By.cssSelector(\"ul.myaccount_lnk_list\")).isDisplayed());\r\n }",
"@Test\n public void testlogInAcceptanceTestFounder() throws Exception {\n String acceptanceTestUserName = \"[email protected]\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n //verify we're viewing the testing profile\n assertTrue(driver.findElement(By.id(\"founderProfile\")).isDisplayed());\n logOutUser();\n }",
"@Test\n public void logInAcceptanceTestMentor() throws Exception {\n String acceptanceTestUserName = \"[email protected]\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n logOutUser();\n }",
"@Test\n public void ValidLoginTest() throws Exception {\n openDemoSite(driver).typeAuthInfo(loginEmail, \"Temp1234%\").signInByClick();\n }",
"public void irParaPaginaDeLogin (){\n\n click(By.className(btnLoginClass));\n }",
"@Test(priority=26)\n\tpublic void verifyLoginPageByClickingOnLogoutOptionInDropdown() throws Exception {\n\t\tOverviewTradusPROPage overviewPage= new OverviewTradusPROPage(driver);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.profileIconOnHeader);\n\t click(overviewPage.profileIconOnHeader);\n\t waitTill(1000);\n\t click(overviewPage.logoutOptionInProfileIconDropdown);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.LoginText);\n\t waitTill(1000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/login\"),\n\t \t\t\"Login Page is not displaying by cicking on logout option in dropdown\");\n\t}",
"@Given(\"user is on login page\")\n\tpublic void user_is_on_login_page() {\n\t\tSystem.out.println(\"user is on login page\");\n\t\tWebDriverManager.chromedriver().setup();\n\t\tdriver=new ChromeDriver();\n\t\tdriver.manage().window().maximize();\n\t\tdriver.get(\"https://opensource-demo.orangehrmlive.com/index.php/auth/validateCredentials\");\n\t \n\t}",
"public static void verifyLogOutPageTitleLeadsToLoginPage() {\n click(AMAZON_PAGE_TITLE);\n }",
"public void verifyForgotPwdLink() {\n forgotPasswordLink.assertState().enabled();\n forgotPasswordLink.assertContains().text(\"Forgot your password?\");\n }",
"public void clickSignIn() {\r\n\t\tdriver.findElement(signIn).click();\r\n\t}",
"@Given(\"^User is on Login Page$\")\n\tpublic void userIsOnLoginPage() throws Throwable {\n\t\tassertTrue(isElementPresent(driver, By.id(\"new_user\")));\n\t}",
"@Test\n\tpublic void checkPageLoginFlow() {\n\t driver.findElement(By.cssSelector(\"a.login\")).click();\n\n\t // Click login again on Login Page\n\t driver.findElement(By.cssSelector(\"button.login-page-dialog-button\")).click();\n\t\t \n\t // Enter Username & PW\n\t String username = \"username\";\n\t String password = \"password\";\n\n\t // Select and enter text for username and password\n\t driver.findElement(By.id(\"1-email\")).click();\n\t driver.findElement(By.id(\"1-email\")).sendKeys(username);\n\t driver.findElement(By.name(\"password\")).click();\n\t driver.findElement(By.name(\"password\")).sendKeys(password);\n\n\t // Verify Username box displayed\n\t boolean usernameElement = driver.findElement(By.id(\"1-email\")).isDisplayed();\n\t \tAssert.assertTrue(usernameElement, \"Is Not Present, this is not expected\");\n\t \n\t // Verify Password box displayed\n\t boolean passwordElement = driver.findElement(By.name(\"password\")).isDisplayed();\n\t \tAssert.assertTrue(passwordElement, \"Is Not Present, this is not expected\");\n\t}",
"public void clickGoToYourAccountButton() {\n\t\telement(signUpObjects.getOTPButton).click();\n\t}",
"@Then(\"^Browser display Sign In page$\")\n public void browser_display_Sign_In_page() throws Throwable {\n sign.browserDisplaySignIn();\n\n\n }",
"@Given(\"^User should see profile page$\")\n\tpublic void user_should_see_profile_page() throws Throwable {\n\t\twait.WaitForElement(profileTestInsurancePage.gettestinsuranceheading(), 60);\n\t\tprofileTestInsurancePage.verifyprofileTestInsurancePage();\n\t}",
"public void clickOnPriorAuth() {\n\t\tscrollDown(element(\"link_priorAuth\"));\n\t\telement(\"link_priorAuth\").click();\n\t\tlogMessage(\"User clicks on Prior Authorizations on left navigation bar at Physician End\");\n\t}",
"public void AdminLink(){\n\t\tAdminLink.click();\n\t}",
"public MenuSignOnPageClass navigateToSignOn() {\n\t\tthis.clickSignOn();\n\t\treturn new MenuSignOnPageClass(myDriver, myWait);\n\t}",
"public void ClickUserInformationPage() {\r\n\t\tuserinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"User Information\\\" button on the Birthdays page\");\r\n\t}",
"@Override\n\tpublic void goToLogin() {\n\t\t\n\t}",
"public boolean verifyPageLoad() {\n\t\tboolean result = lnkLoginButton.isDisplayed();\n\t\tLog.info(\"Home Page Loaded Successfully\");\n\t\treturn result;\n\t}",
"@Given(\"^user is on the login page$\")\n public void userIsOnTheLoginPage() throws Throwable {\n }",
"private void gotoUserProfile() {\n Intent launchUserProfile = new Intent(this, Profile.class);\n startActivity(launchUserProfile);\n }",
"public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}",
"@When(\"^the user open the Parabank Registration page$\")\r\n\tpublic void the_user_open_the_Parabank_Registration_page() throws Throwable {\n\t getUrl();\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tString resetUrl = \"#activateacc;uid=\" + user.getRefId();\r\n\t\t\t\tWindow.open(resetUrl, \"Password Reset\", \"\");\r\n\t\t\t}",
"@Test\n\tpublic void verifyBackToLoginButtonInForgetPasswordPageAndItsNavigation() throws Exception{\n\t\tLoginOtomotoProfiLMSPage loginPage = new LoginOtomotoProfiLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.languageDropdown);\n\t\tactionClick(driver,loginPage.languageDropdown);\n\t\twaitTill(1000);\n\t\tactionClick(driver,loginPage.englishOptioninLangDropdown);\n\t\tFogrotPasswordOTMPLMSPage forgotPasswordPageObj = new FogrotPasswordOTMPLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.forgotPasswordLink);\n\t\ttry {\n\t\tclick(loginPage.forgotPasswordLink);\n\t\t}catch (Exception e) {\n\t\t\tjsClick(driver,loginPage.forgotPasswordLink);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordPageHeading);\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\tAssert.assertTrue(verifyElementPresent(forgotPasswordPageObj.forgotPasswordLoginPageLink), \"Back to login link isn't present in forgot password page\");\n\t\ttry {\n\t\t\tclick(forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\t\t}catch (Exception e) {\n\t\t\t\tjsClick(driver,forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.emailTextField);\n\t\twaitTill(1000);\n\t\tAssert.assertTrue(verifyElementPresent(loginPage.emailTextField), \"User isn't landing on login page on clicking back to login button from forgot password page\");\n\t}",
"@Test\r\n\tpublic void verification(){\n\t\tdriver.findElement(By.className(\"button block\")).click();\r\n\t\t\r\n\t\t//open a new tab\r\n\t\tdriver.findElement(By.cssSelector(\"body\")).sendKeys(Keys.CONTROL +\"t\");\r\n\t\t\r\n\t\t//switch to new tab\r\n\t\tArrayList<String> tabs = new ArrayList<String>(driver.getWindowHandles());\r\n\t\tdriver.switchTo().window(tabs.get(1));\r\n\t driver.get(\"https://www.textnow.com/login\");\r\n\t driver.findElement(By.id(\"loginUsername\")).sendKeys(\"elaineren\");\r\n\t driver.findElement(By.id(\"loginPassword\")).sendKeys(\"5691219-kk\");\r\n\t driver.findElement(By.id(\"submitLogin\")).click();\r\n\t \r\n\t String scode=driver.findElement(By.id(\"new\")).getText();\r\n\t System.out.println(scode);\r\n\t \r\n\t driver.findElement(By.linkText(\"Log Out\"));\r\n\t \r\n\t driver.switchTo().window(tabs.get(0));\r\n\t}",
"@And(\"user clicks on Login\")\n public void userClicksOnLogin() {\n homePage.clickOnLogin();\n\n }",
"@Test\r\n\tpublic void TC_01_verifyRegistrationPage() {\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t}",
"public void clickAccountsLink()\n\t{\n \telementUtils.performElementClick(wbAccountsLink);\n\t}",
"public AccountPage Signup_through_loginpage() {\n\tJavascriptExecutor js = (JavascriptExecutor)driver;\n\tjs.executeScript( \"arguments[0].click();\", SignUpButton );\n\tsignupPage.SignUp_Form();\n\treturn new AccountPage();\n\t}",
"public PageBase click_on_login_submit_form_button () {\r\n HomePageClass homePage = new HomePageClass(driver);\r\n\r\n LGN_Login_submitBTN.click();\r\n\r\n WebDriverWait wait = getWait();\r\n wait.until(ExpectedConditions.visibilityOf(homePage.logout));\r\n\r\n return homePage;\r\n\r\n }",
"public void ClickLogin()\n\t{\n\t\t\n\t\tbtnLogin.submit();\n\t}",
"@Test\n\tpublic void login(){\n\t\tloginPage.login(data.readData(\"email\"), data.readData(\"password\"));\n\t\tAssert.assertEquals(isPresent(locateElement(By.id(home.homeLogo))),true,\"user not got logged in successfully\");\n\t}",
"@Then(\"^click on the Login button user nagivate to the next page$\")\r\n\tpublic void click_on_the_Login_button_user_nagivate_to_the_next_page() throws Throwable {\n\t w.submit();\r\n\t}",
"public void loginFacebook() {\r\n\t\tdriver.findElement(By.xpath(LearnObjectMap.FB_LOGIN_USERNAME_XPATH)).sendKeys(\"9705033563\");\r\n\t\tdriver.findElement(By.xpath(LearnObjectMap.FB_LOGIN_PASSWORD_XPATH)).sendKeys(\"asfczc\");\r\n\t\tdriver.findElement(By.xpath(LearnObjectMap.FB_LOGIN_XPATH)).click();\r\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\r\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(LearnObjectMap.FB_LOGIN_ERROR_MSG_XPATH)));\r\n\t\tString errorMsg = driver.findElement(By.xpath(LearnObjectMap.FB_LOGIN_ERROR_MSG_XPATH)).getText();\r\n\t\tSystem.out.println(\"Error message -->\"+errorMsg);\r\n\t\tAssert.assertEquals(errorMsg, \"The password that you've entered is incorrect. Forgotten password?\",\"Error message validation Failed\");\r\n\t\t\r\n\t}",
"@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyGlobalNavigationLinks()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Gas Page Navigation Links\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"GloabalSMRGas\");\n\t\tnew SubmitMeterReadAction()\n\t\t.BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .BgbverifyAfterLogin()\n\t .clickSubmitMeterReadLink()\t\n\t\t.verifyGlobalNavigationLink();\n}",
"public void ClickMyAccount( ){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account Link clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"LoginLogout\"));\r\n\t\t\tclick(locator_split(\"LoginLogout\"));\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- My Account Link clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- My Account Link is not clicked \"+elementProperties.getProperty(\"LoginLogout\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"public void clickOnContinueAsGuestUserLink()\n \t{\n \t\tproductRequirementsPageLocators.continueAsGuestUserLIink.click();\n\n \t}"
]
| [
"0.7214619",
"0.7025234",
"0.6996365",
"0.69962806",
"0.69622695",
"0.68098575",
"0.6696946",
"0.66924316",
"0.66756016",
"0.6573798",
"0.6564357",
"0.654158",
"0.6515274",
"0.6514989",
"0.65070426",
"0.6485019",
"0.6484321",
"0.64711994",
"0.6429414",
"0.641704",
"0.63924474",
"0.63865525",
"0.63850194",
"0.6370964",
"0.63651615",
"0.6364764",
"0.636103",
"0.63387793",
"0.63364416",
"0.6331552",
"0.63282996",
"0.6326082",
"0.63206154",
"0.63099426",
"0.63026255",
"0.6296153",
"0.6280787",
"0.62773705",
"0.626954",
"0.6267433",
"0.62510943",
"0.62507117",
"0.6248792",
"0.6240438",
"0.6239351",
"0.6238142",
"0.6235067",
"0.6232162",
"0.6209385",
"0.6208202",
"0.6206949",
"0.6201839",
"0.6196717",
"0.6185828",
"0.61781764",
"0.6161193",
"0.6157706",
"0.6136012",
"0.6115203",
"0.6109427",
"0.610941",
"0.61076045",
"0.6101778",
"0.610035",
"0.60966945",
"0.6095685",
"0.60955715",
"0.6091912",
"0.6087229",
"0.6086845",
"0.60833573",
"0.6077636",
"0.6076716",
"0.6071808",
"0.60607666",
"0.60574144",
"0.6047264",
"0.6047029",
"0.60403526",
"0.60400546",
"0.6037261",
"0.602129",
"0.6019632",
"0.60127056",
"0.6009009",
"0.60061806",
"0.60020405",
"0.59831",
"0.59800786",
"0.59787256",
"0.5967562",
"0.5965861",
"0.59633505",
"0.5956579",
"0.5955239",
"0.59533143",
"0.5945322",
"0.59392786",
"0.59363055",
"0.59339976"
]
| 0.7051257 | 1 |
Verify the Mange Profile Link in the LoginPage and clicks on it. | public void verifyLearnMoreLink() {
learnMoreLink.assertState().enabled();
learnMoreLink.assertContains().text("Learn more about registering for an account.");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}",
"public void verifyManageProfileLink() {\n profileLink.assertState().enabled();\n profileLink.assertContains().text(\"Manage your user profile\");\n }",
"public void clickOnProfile() {\n\t\telement(\"link_profile\").click();\n\t\tlogMessage(\"User clicks on Profile on left navigation bar\");\n\t}",
"public void ClickSignIn() {\n if (lnkSignIn.isDisplayed()) {\n lnkSignIn.click();\n }\n else{System.out.println(\"Sign In link is not displayed\");\n }\n }",
"@Then(\"^User should see home page with profile link$\")\n\tpublic void user_should_see_home_page_with_profile_link() throws Throwable {\n\t\twait.WaitForElement(profilepage.getywalletlink(), 60);\n\t\tprofilepage.verifyloginsuccess();\n\t\tThread.sleep(100);\n\t}",
"@Override\r\n\tpublic void clickOnLoginLink() {\r\n\t\t\r\n\t\tSelenium.click(lnkLogIn());\r\n\t}",
"public void clickGoToLogin(){\n\t\t\n\t\tgoToLoginBtn.click();\n\t\t\n\t}",
"@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyManageUserLinkNavigation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify MumV Navigation Links Manage user page\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvAddnewStdUser\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.verifyWhatisthisOverlay()\n\t\t.ManageUserNavigationVerificationLinks(); \t \t \t\n\t}",
"public void clickSignInLink()\n\t{\n \telementUtils.performElementClick(wbSignInLink);\n\t}",
"public void ClickAccount() {\n if (lnkAccount.isDisplayed()) {\n lnkAccount.click();\n }\n else{System.out.println(\"Account link is not displayed\");}\n }",
"@When(\"^When user navigates to profile page$\")\n\tpublic void when_user_navigates_to_profile_page() throws Throwable {\n\t\twait.WaitForElement(reviewConfirmationPageObjects.getmuserlink(), 60);\n\t\treviewConfirmationPageObjects.clickonprofile();\n\t}",
"public void Navigate_to_Registration_Page(){\n\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Tab_Home_Screen_Link_Text);\n Assert.assertTrue(getRegistrationTab_InHomeScreen().getText().equals(StringUtils.Registration_Tab_Text));\n getRegistrationTab_InHomeScreen().click();\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Form_Submit_Button);\n\n }",
"public void clickLogin() {\r\n\t\tdriver.findElement(SignIn).click();\r\n\t\t//SignIn.click();\r\n\t\t//SignIn.click();\r\n\t\t//return new LoginPage();\r\n\t}",
"public void goToProfilePage() {\n\t\tUtil.element(userTab, driver).click();\n\t}",
"public void clickloginlink(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Loginlink should be clicked from Home Page\");\r\n\t\ttry{\r\n\t\t\twaitForElement(locator_split(\"lnkLogin\"));\r\n\t\t\tclick(locator_split(\"lnkLogin\"));\r\n\t\t\twaitForPageToLoad(200);\r\n\t\t\tSystem.out.println(\"Login link clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:-Login link is clicked from home page\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Login link is not clicked\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"@Given(\"^I am on the Sign in page$\")\n\tpublic void I_am_on_the_Sign_in_page() throws Throwable {\n\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\tdriver.findElement(By.linkText(\"Sign in\")).click();\n\t}",
"@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}",
"@Test\n public void loginTest() throws MalformedURLException{\n // User user=new User();\n loginPage.fillGmailAccountInput().hitNextbutton().fillPasswordInput();\n InboxPage inboxPage = loginPage.clickNextButton();\n Assert.assertTrue(inboxPage.isElementClickable(inboxPage.composeButton ));\n\n }",
"public void clickOnLoginButton() {\n\t\tutil.clickOnElement(this.loginPageLocators.getLoginButtonElement());\n\t}",
"public void User_login()\r\n\t{\n\t\tdriver.findElement(FB_Locators.Signin_Email).clear();\r\n\t\tdriver.findElement(FB_Locators.Signin_Email).sendKeys(username);\r\n\t\t\r\n\t\t//Script using element referral..\r\n\t\tWebElement Password_Element=driver.findElement(FB_Locators.Signin_password);\r\n\t\tPassword_Element.clear();\r\n\t\tPassword_Element.sendKeys(password);\r\n\t\t\r\n\t\t//Login button using webelemnet referral\r\n\t\tWebElement Login_btn_Element=driver.findElement(FB_Locators.Signin_btn);\r\n\t\tLogin_btn_Element.click();\r\n\t}",
"public void clickHomeProfilePage() {\n wait.until(CustomWait.visibilityOfElement(profileHomePageButton));\n profileHomePageButton.click();\n }",
"public void clickLogin() {\n\t\tcontinueButton.click();\n\t}",
"public void clickOnLoginButton(){\n\t\tthis.loginButton.click();\n\t}",
"@Test(priority = 2)\r\n\tpublic void testLoginPage() {\r\n\r\n\t\tdriver.navigate().to(Login.URL);\r\n\t\tdriver.manage().window().maximize();\r\n\t\tLogin.typeEmail(driver, \"[email protected]\");\r\n\t\tLogin.typePassword(driver, \"lozinka\");\r\n\t\t\r\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\r\n\t\tLogin.clickLoginButton(driver);\r\n\t\t\t\t\r\n\t\tString currentUrl = driver.getCurrentUrl();\r\n\t\tString expectedUrl = \"https://www.humanity.com/app/\";\r\n\t\tSoftAssert sa = new SoftAssert();\r\n\t\tsa.assertEquals(currentUrl, expectedUrl);\r\n\t\tsa.assertAll();\r\n\t}",
"@Test\n\tpublic void TC02_Login() {\n\t\tSystem.out.println(\"TC02 : 1. Click to Login Page\");\n\t\tclickToElemnet(loginLinkX);\n\n\t\t// Verify Navigate to Login Page\n\t\tSystem.out.println(\"TC02 : 2. Login Page Display Status :\" + checkElementDisplayed(loginPageX));\n\n\t\t// Login to Page\n\t\tsendkeysToElement(emailTxtX, regEmail);\n\t\tsendkeysToElement(passwordTxtX, regPassword);\n\t\tclickToElemnet(loginBtnX);\n\n\t\t// Verify Login Successfully\n\t\tSystem.out.println(\"TC02 : 3. Login Successfully Status : \" + checkElementDisplayed(myAccountLinkX));\n\t}",
"public void clickLogin(){\n\t\tdriver.findElement(login).click();\n\t}",
"public void clickLogin(){\n\t\t\tdriver.findElement(login).click();\n\t}",
"public static void navigateAdminLoginPage() {\n Browser.driver.get(\"http://shop.pragmatic.bg/admin\");\n }",
"@Given(\"^User should logged in to URL$\")\n\tpublic void user_should_logged_in_to_URL() throws Throwable {\n\t\thomepage.clickloginifdisplayed();\n\t\twait.WaitForElement(loginpage.getLoginemail(), 60);\n\t\tloginpage.ValidLogin();\n\t}",
"@Test(priority=19)\n\tpublic void verifyRedirectionOfProfileAndLogoutOptions() throws Exception {\n\t\tOverviewTradusPROPage overviewPage= new OverviewTradusPROPage(driver);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.profileIconOnHeader);\n\t click(overviewPage.profileIconOnHeader);\n\t waitTill(1000);\n\t click(overviewPage.profileOptionInProfileIconDropdown);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.profilePageVerificationElement);\n\t waitTill(2000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms/profile\"),\n\t \t\t\"Profile page is not displaying by clicking on profile option under profile icon dropdown list\");\n\t click(overviewPage.logoutOptionInProfileIconDropdown);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.LoginText);\n\t waitTill(2000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/login\"),\n\t \t\t\"User not logged out from account by cicking on logout option in dropdown\");\n\t}",
"@Given(\"^user should open link$\")\r\n\tpublic void user_should_open_link() throws Throwable {\r\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n driver.manage().deleteAllCookies();\r\n\r\n driver.get(prop.getProperty(\"url\"));\r\n\r\n WebDriverWait wait = new WebDriverWait(driver,60);\r\n \t wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(prop.getProperty(\"Popup\"))));\r\n \t driver.findElement(By.xpath(prop.getProperty(\"Popup\"))).click();Thread.sleep(5000);\r\n\t}",
"public void VerifyHomepage(){\r\n\t\t//String username = getValue(Email);\r\n\t//\tString password = getValue(Password);\r\n\r\n\t//\tclass Local {};\r\n\t\t/*Reporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");*/\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\t//driver.findElement(locator_split(\"btn_privacyok\")).click();\r\n\t\tclick(locator_split(\"btn_privacyok\"));\r\n\t\t\t\r\n\t\t\t/*Reporter.log(\"PASS_MESSAGE:- My Account is clicked and user is logged in\");*/\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- User is not logged in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"@When(\"^the user opens linked sigup page$\")\r\n\tpublic void the_user_opens_linked_sigup_page() throws Throwable {\n\tsign.linkedin_signup();\r\n\t\t\r\n\t}",
"public void logInAcceptanceTestFounder() throws Exception {\n String acceptanceTestUserName = \"[email protected]\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n }",
"@When(\"^Click on Sign Up Button$\")\npublic void click_on_Sign_Up_Button() throws Throwable \n{\n\tdriver.findElement(By.xpath(\"//*[@id=\\\"login-block\\\"]/div/ul/li[1]/a\")).click();\n\tSystem.out.println(\"User is successfully navigated to Registration screen\");\n \n}",
"public void clickRegisterLink() {\n $(registerLink).click();\n }",
"public void clickLogin() {\n\t\t driver.findElement(loginBtn).click();\n\t }",
"public void clickLoginBtn() {\r\n\t\tthis.loginBtn.click(); \r\n\t}",
"public void clickOnLogin() {\n\t\tWebElement loginBtn=driver.findElement(loginButton);\n\t\tif(loginBtn.isDisplayed())\n\t\t\tloginBtn.click();\n\t}",
"public void openProfile(){\n\t\t\n\t\tclickElement(profile_L, driver);\n\t}",
"@Given(\"User is on the login page\")\n\tpublic void user_is_on_the_login_page() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src\\\\test\\\\resources\\\\chromedriver.exe\");\n\t\tdriver=new ChromeDriver();\n\t\tdriver.get(\"https://10.232.237.143/TestMeApp/fetchcat.htm\");\n\t\tdriver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\n\t\tdriver.manage().window().maximize();\n\t driver.findElement(By.id(\"details-button\")).click();\n\t\tdriver.findElement(By.id(\"proceed-link\")).click();\n\t}",
"public void clickUpdateProfileLink()\n\t{\n \telementUtils.performElementClick(wbUpdateProfileLink);\n\t}",
"@And(\"is on login page\")\n\tpublic void is_on_login_page() {\n\t\tSystem.out.println(\"user on 1\");\n\t\tdriver.navigate().to(\"https://example.testproject.io/web/\");\n\n\t}",
"public void click_SIGN_IN() {\r\n\t\tbtn_SIGN_IN.click();\r\n\t}",
"public HomePage clickOnLogin() {\n// Actions action = new Actions(driver);\n// action.moveToElement(login).build().perform();\n// closeAd.click();\n login.isDisplayed();\n login.click();\n return this;\n }",
"@Test\n\tpublic void checkLoginPage() {\n\n\t\t// Locate the logo on the page\n\t\tWebElement logo = driver.findElement(By.xpath(\"(//a/img)[1]\"));\n\t\tString logoSrc = logo.getAttribute(\"src\");\n\n\t\t// Locate the heading of the page\n\t\tString heading = driver.findElement(By.className(\"auth-header\"))\n\t\t\t\t.getText();\n\n\t\t// Locate the Username related fields\n\t\tString usernameLabel = driver.findElement(By.xpath(\"(//label)[1]\"))\n\t\t\t\t.getText();\n\t\tWebElement usernameIcon = driver\n\t\t\t\t.findElement(By.className(\"os-icon-user-male-circle\"));\n\t\tWebElement usernameTextField = driver.findElement(By.id(\"username\"));\n\t\tString placeholderText = usernameTextField.getAttribute(\"placeholder\");\n\n\t\t// Locate the Password related fields\n\t\tString passwordLabel = driver.findElement(By.xpath(\"(//label)[2]\"))\n\t\t\t\t.getText();\n\t\tWebElement passwordIcon = driver\n\t\t\t\t.findElement(By.className(\"os-icon-fingerprint\"));\n\t\tWebElement passwordTextField = driver.findElement(By.id(\"password\"));\n\t\tString placeholderPassword = passwordTextField\n\t\t\t\t.getAttribute(\"placeholder\");\n\n\t\t// Locate the Sign in button\n\t\tWebElement signInButton = driver.findElement(By.id(\"log-in\"));\n\t\tString signInButtonText = signInButton.getText();\n\n\t\t// Locate the Remember me checkbox and label\n\t\tWebElement rememberMeCheckbox = driver\n\t\t\t\t.findElement(By.className(\"form-check-input\"));\n\t\tString rememberMeText = driver\n\t\t\t\t.findElement(By.className(\"form-check-label\")).getText();\n\n\t\t// Locate the social media icons\n\t\tWebElement twitterIcon = driver.findElement(By.xpath(\"(//a/img)[2]\"));\n\t\tString twitterSrc = twitterIcon.getAttribute(\"src\");\n\n\t\tWebElement facebookIcon = driver.findElement(By.xpath(\"(//a/img)[3]\"));\n\t\tString facebookSrc = facebookIcon.getAttribute(\"src\");\n\n\t\tWebElement linkedInIcon = driver.findElement(By.xpath(\"(//a/img)[4]\"));\n\t\tString linkedInSrc = linkedInIcon.getAttribute(\"src\");\n\n\t\t// Assert that the logo is displayed\n\t\tAssert.assertTrue(logo.isDisplayed());\n\t\tAssert.assertEquals(logoSrc,\n\t\t\t\t\"https://demo.applitools.com/img/logo-big.png\");\n\n\t\t// Add assertions for all elements displayed on the Login for,\n\t\tAssert.assertEquals(heading, \"Login Form\");\n\t\tAssert.assertEquals(usernameLabel, \"Username\");\n\t\tAssert.assertTrue(usernameIcon.isDisplayed());\n\t\tAssert.assertTrue(usernameTextField.isDisplayed());\n\t\tAssert.assertEquals(placeholderText, \"Enter your username\");\n\n\t\tAssert.assertEquals(passwordLabel, \"Password\");\n\t\tAssert.assertTrue(passwordIcon.isDisplayed());\n\t\tAssert.assertTrue(passwordTextField.isDisplayed());\n\t\tAssert.assertEquals(placeholderPassword, \"Enter your password\");\n\n\t\tAssert.assertTrue(signInButton.isDisplayed());\n\t\tAssert.assertEquals(signInButtonText, \"Log In\");\n\n\t\tAssert.assertTrue(rememberMeCheckbox.isDisplayed());\n\t\tAssert.assertFalse(rememberMeCheckbox.isSelected());\n\t\tAssert.assertEquals(rememberMeText, \"Remember Me\");\n\n\t\tAssert.assertTrue(twitterIcon.isDisplayed());\n\t\tAssert.assertEquals(twitterSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/twitter.png\");\n\n\t\tAssert.assertTrue(facebookIcon.isDisplayed());\n\t\tAssert.assertEquals(facebookSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/facebook.png\");\n\n\t\tAssert.assertTrue(linkedInIcon.isDisplayed());\n\t\tAssert.assertEquals(linkedInSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/linkedin.png\");\n\t}",
"public void clickLoginButton() {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"Verifying the login button is available or not\");\n\t\tAssert.assertTrue(clickLoginButton.isDisplayed());\n\t\tclickLoginButton.click();\n\t}",
"public void verifyOnDashboardPage() {\n verifyUserLoggedIn.waitForState().enabled(30);\n verifyUserLoggedIn.assertContains().text(\"Dev Links\");\n }",
"public void I_Should_click_My_Account_link(){\n\t MyAccountLink.click();\n\t \n}",
"@Given(\"^User is navigating to G-mail Login Page$\")\n\tpublic void navigateURL() throws Throwable {\n\t\tSystem.out.println(\"Entered URL\"); \n\t\t\n\t}",
"private void clickSignOn() {\n\t\tthis.clickElement(signon);\n\t}",
"@Test\n\tpublic void loginSuccessful() {\n\t\tHomePage.sign_in_label.click();\n\t\tLoginContainer.LogInUser(VALID_USER_NAME, VALID_USER_PASSWORD);\n\t\t\n\t\t// Wait for page to load\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\n\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.className(\"links-container\")));\n\t\t\n\t\t//Check if proper page is loaded\n\t\tPageFactory.initElements(driver, LoginSuccessfulTest.class);\n\t\tAssert.assertEquals(linksContainer.getAttribute(\"title\"), \"Kasia suszczynska - My page\", \"Links container title\");\n\t}",
"@Test\n\tpublic void LoggedInTest() throws IOException {\n\t\tLoginapp.Loginapp();\n\t\tLoginapp.frameChecking(\".//*[@id='frmLink']/table/tbody/tr[2]/td/table/tbody/tr/td[1]/a[4]\");\n\n\n}",
"@Test(description = \"Go to Login Page From Home Page Header\")\n @Issue(\"EZ-8885\")\n @Description(\"Check the Login button on Header Home Page\")\n void verifyLoginButtonOnMainPage() {\n HomePage homePage = new HomePage(BaseUrl.homePageBaseUrl());\n homePage.open().getHeaderButtonsSection()\n .getLoginAreaButton().clickOnLoginAreaButton(\"https://hotline.ua/login/\");\n\n assertThat(getBrowserConsoleErrors()).isFalse();\n }",
"public SignInPage selectSignInButtonFromNavBar() {\n \t new WebDriverWait (DRIVER, 5)\n \t .until (ExpectedConditions.presenceOfElementLocated(navigationBarSignInLinkLocator))\n \t .click();\n \t\n \t new WebDriverWait (DRIVER, 5).until(\n \t\t\t ExpectedConditions.stalenessOf(DRIVER.findElement(navigationBarSignInLinkLocator)));\n \t \n return new SignInPage(); \n }",
"@Then(\"^user check is logged in$\")\n public void check_user_logged(){\n log.info(\"try to check if user is logged in\");\n String linkSignOut = pageLogin.getLinkSignOut().getText();\n Assert.assertTrue(linkSignOut.equals(\"Sign out\"), \"There is no visible link sign out\");\n String linkUserName = pageLogin.getLinkUserFullname().getText();\n Assert.assertTrue(linkUserName.equals(\"Antoni Giez\"));\n log.info(\"user is logged in, username - \" + linkUserName);\n }",
"public void navigateToLoginPage() {\r\n\t\tBrowser.open(PhpTravelsGlobal.PHP_TRAVELS_LOGIN_URL);\r\n\t}",
"public void clickUserProfile(){\r\n driver.findElement(userTab).click();\r\n driver.findElement(profileBtn).click();\r\n }",
"@Given(\"^I am able to access the sign in page$\")\n public void i_am_able_to_access_the_sign_in_page() throws Throwable {\n bbcSite.bbcSignInPage().goToSignInPage();\n Assert.assertEquals(bbcSite.bbcSignInPage().getSignInPageURL(), bbcSite.getCurrentURL());\n }",
"@Given(\"^The user is in the login page$\")\n\tpublic void the_user_is_in_the_login_page() throws Throwable {\n\t\tChrome_Driver();\n\t\tlpw =new Login_Page_WebElements();\n\t\tlpw.open_orange_hrm();\n\t}",
"public void clickToLogoutLink() {\n\t\twaitToElementClickable(driver,RegisterPageUI.LOGOUT_LINK);\n\t\tclickToElement(driver,RegisterPageUI.LOGOUT_LINK);\n\t}",
"@Test\r\n public void login() {\n driver.findElement(By.className(\"login\")).click();\r\n // Fill in the form\r\n driver.findElement(By.id(\"email\")).sendKeys(\"[email protected]\");\r\n driver.findElement(By.id(\"passwd\")).sendKeys(\"tester\");\r\n driver.findElement(By.id(\"SubmitLogin\")).click();\r\n // Assert if element is displayed\r\n // Assert if element is displayed\r\n Assert.assertTrue(driver.findElement(\r\n By.cssSelector(\"ul.myaccount_lnk_list\")).isDisplayed());\r\n }",
"@Test\n public void testlogInAcceptanceTestFounder() throws Exception {\n String acceptanceTestUserName = \"[email protected]\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n //verify we're viewing the testing profile\n assertTrue(driver.findElement(By.id(\"founderProfile\")).isDisplayed());\n logOutUser();\n }",
"@Test\n public void logInAcceptanceTestMentor() throws Exception {\n String acceptanceTestUserName = \"[email protected]\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n logOutUser();\n }",
"@Test\n public void ValidLoginTest() throws Exception {\n openDemoSite(driver).typeAuthInfo(loginEmail, \"Temp1234%\").signInByClick();\n }",
"public void irParaPaginaDeLogin (){\n\n click(By.className(btnLoginClass));\n }",
"@Test(priority=26)\n\tpublic void verifyLoginPageByClickingOnLogoutOptionInDropdown() throws Exception {\n\t\tOverviewTradusPROPage overviewPage= new OverviewTradusPROPage(driver);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.profileIconOnHeader);\n\t click(overviewPage.profileIconOnHeader);\n\t waitTill(1000);\n\t click(overviewPage.logoutOptionInProfileIconDropdown);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.LoginText);\n\t waitTill(1000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/login\"),\n\t \t\t\"Login Page is not displaying by cicking on logout option in dropdown\");\n\t}",
"@Given(\"user is on login page\")\n\tpublic void user_is_on_login_page() {\n\t\tSystem.out.println(\"user is on login page\");\n\t\tWebDriverManager.chromedriver().setup();\n\t\tdriver=new ChromeDriver();\n\t\tdriver.manage().window().maximize();\n\t\tdriver.get(\"https://opensource-demo.orangehrmlive.com/index.php/auth/validateCredentials\");\n\t \n\t}",
"public static void verifyLogOutPageTitleLeadsToLoginPage() {\n click(AMAZON_PAGE_TITLE);\n }",
"public void verifyForgotPwdLink() {\n forgotPasswordLink.assertState().enabled();\n forgotPasswordLink.assertContains().text(\"Forgot your password?\");\n }",
"public void clickSignIn() {\r\n\t\tdriver.findElement(signIn).click();\r\n\t}",
"@Given(\"^User is on Login Page$\")\n\tpublic void userIsOnLoginPage() throws Throwable {\n\t\tassertTrue(isElementPresent(driver, By.id(\"new_user\")));\n\t}",
"@Test\n\tpublic void checkPageLoginFlow() {\n\t driver.findElement(By.cssSelector(\"a.login\")).click();\n\n\t // Click login again on Login Page\n\t driver.findElement(By.cssSelector(\"button.login-page-dialog-button\")).click();\n\t\t \n\t // Enter Username & PW\n\t String username = \"username\";\n\t String password = \"password\";\n\n\t // Select and enter text for username and password\n\t driver.findElement(By.id(\"1-email\")).click();\n\t driver.findElement(By.id(\"1-email\")).sendKeys(username);\n\t driver.findElement(By.name(\"password\")).click();\n\t driver.findElement(By.name(\"password\")).sendKeys(password);\n\n\t // Verify Username box displayed\n\t boolean usernameElement = driver.findElement(By.id(\"1-email\")).isDisplayed();\n\t \tAssert.assertTrue(usernameElement, \"Is Not Present, this is not expected\");\n\t \n\t // Verify Password box displayed\n\t boolean passwordElement = driver.findElement(By.name(\"password\")).isDisplayed();\n\t \tAssert.assertTrue(passwordElement, \"Is Not Present, this is not expected\");\n\t}",
"public void clickGoToYourAccountButton() {\n\t\telement(signUpObjects.getOTPButton).click();\n\t}",
"@Then(\"^Browser display Sign In page$\")\n public void browser_display_Sign_In_page() throws Throwable {\n sign.browserDisplaySignIn();\n\n\n }",
"@Given(\"^User should see profile page$\")\n\tpublic void user_should_see_profile_page() throws Throwable {\n\t\twait.WaitForElement(profileTestInsurancePage.gettestinsuranceheading(), 60);\n\t\tprofileTestInsurancePage.verifyprofileTestInsurancePage();\n\t}",
"public void clickOnPriorAuth() {\n\t\tscrollDown(element(\"link_priorAuth\"));\n\t\telement(\"link_priorAuth\").click();\n\t\tlogMessage(\"User clicks on Prior Authorizations on left navigation bar at Physician End\");\n\t}",
"public void AdminLink(){\n\t\tAdminLink.click();\n\t}",
"public MenuSignOnPageClass navigateToSignOn() {\n\t\tthis.clickSignOn();\n\t\treturn new MenuSignOnPageClass(myDriver, myWait);\n\t}",
"public void ClickUserInformationPage() {\r\n\t\tuserinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"User Information\\\" button on the Birthdays page\");\r\n\t}",
"@Override\n\tpublic void goToLogin() {\n\t\t\n\t}",
"public boolean verifyPageLoad() {\n\t\tboolean result = lnkLoginButton.isDisplayed();\n\t\tLog.info(\"Home Page Loaded Successfully\");\n\t\treturn result;\n\t}",
"@Given(\"^user is on the login page$\")\n public void userIsOnTheLoginPage() throws Throwable {\n }",
"private void gotoUserProfile() {\n Intent launchUserProfile = new Intent(this, Profile.class);\n startActivity(launchUserProfile);\n }",
"public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}",
"@When(\"^the user open the Parabank Registration page$\")\r\n\tpublic void the_user_open_the_Parabank_Registration_page() throws Throwable {\n\t getUrl();\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tString resetUrl = \"#activateacc;uid=\" + user.getRefId();\r\n\t\t\t\tWindow.open(resetUrl, \"Password Reset\", \"\");\r\n\t\t\t}",
"@Test\n\tpublic void verifyBackToLoginButtonInForgetPasswordPageAndItsNavigation() throws Exception{\n\t\tLoginOtomotoProfiLMSPage loginPage = new LoginOtomotoProfiLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.languageDropdown);\n\t\tactionClick(driver,loginPage.languageDropdown);\n\t\twaitTill(1000);\n\t\tactionClick(driver,loginPage.englishOptioninLangDropdown);\n\t\tFogrotPasswordOTMPLMSPage forgotPasswordPageObj = new FogrotPasswordOTMPLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.forgotPasswordLink);\n\t\ttry {\n\t\tclick(loginPage.forgotPasswordLink);\n\t\t}catch (Exception e) {\n\t\t\tjsClick(driver,loginPage.forgotPasswordLink);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordPageHeading);\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\tAssert.assertTrue(verifyElementPresent(forgotPasswordPageObj.forgotPasswordLoginPageLink), \"Back to login link isn't present in forgot password page\");\n\t\ttry {\n\t\t\tclick(forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\t\t}catch (Exception e) {\n\t\t\t\tjsClick(driver,forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.emailTextField);\n\t\twaitTill(1000);\n\t\tAssert.assertTrue(verifyElementPresent(loginPage.emailTextField), \"User isn't landing on login page on clicking back to login button from forgot password page\");\n\t}",
"@Test\r\n\tpublic void verification(){\n\t\tdriver.findElement(By.className(\"button block\")).click();\r\n\t\t\r\n\t\t//open a new tab\r\n\t\tdriver.findElement(By.cssSelector(\"body\")).sendKeys(Keys.CONTROL +\"t\");\r\n\t\t\r\n\t\t//switch to new tab\r\n\t\tArrayList<String> tabs = new ArrayList<String>(driver.getWindowHandles());\r\n\t\tdriver.switchTo().window(tabs.get(1));\r\n\t driver.get(\"https://www.textnow.com/login\");\r\n\t driver.findElement(By.id(\"loginUsername\")).sendKeys(\"elaineren\");\r\n\t driver.findElement(By.id(\"loginPassword\")).sendKeys(\"5691219-kk\");\r\n\t driver.findElement(By.id(\"submitLogin\")).click();\r\n\t \r\n\t String scode=driver.findElement(By.id(\"new\")).getText();\r\n\t System.out.println(scode);\r\n\t \r\n\t driver.findElement(By.linkText(\"Log Out\"));\r\n\t \r\n\t driver.switchTo().window(tabs.get(0));\r\n\t}",
"@And(\"user clicks on Login\")\n public void userClicksOnLogin() {\n homePage.clickOnLogin();\n\n }",
"@Test\r\n\tpublic void TC_01_verifyRegistrationPage() {\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t}",
"public void clickAccountsLink()\n\t{\n \telementUtils.performElementClick(wbAccountsLink);\n\t}",
"public AccountPage Signup_through_loginpage() {\n\tJavascriptExecutor js = (JavascriptExecutor)driver;\n\tjs.executeScript( \"arguments[0].click();\", SignUpButton );\n\tsignupPage.SignUp_Form();\n\treturn new AccountPage();\n\t}",
"public PageBase click_on_login_submit_form_button () {\r\n HomePageClass homePage = new HomePageClass(driver);\r\n\r\n LGN_Login_submitBTN.click();\r\n\r\n WebDriverWait wait = getWait();\r\n wait.until(ExpectedConditions.visibilityOf(homePage.logout));\r\n\r\n return homePage;\r\n\r\n }",
"public void ClickLogin()\n\t{\n\t\t\n\t\tbtnLogin.submit();\n\t}",
"@Test\n\tpublic void login(){\n\t\tloginPage.login(data.readData(\"email\"), data.readData(\"password\"));\n\t\tAssert.assertEquals(isPresent(locateElement(By.id(home.homeLogo))),true,\"user not got logged in successfully\");\n\t}",
"@Then(\"^click on the Login button user nagivate to the next page$\")\r\n\tpublic void click_on_the_Login_button_user_nagivate_to_the_next_page() throws Throwable {\n\t w.submit();\r\n\t}",
"public void loginFacebook() {\r\n\t\tdriver.findElement(By.xpath(LearnObjectMap.FB_LOGIN_USERNAME_XPATH)).sendKeys(\"9705033563\");\r\n\t\tdriver.findElement(By.xpath(LearnObjectMap.FB_LOGIN_PASSWORD_XPATH)).sendKeys(\"asfczc\");\r\n\t\tdriver.findElement(By.xpath(LearnObjectMap.FB_LOGIN_XPATH)).click();\r\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\r\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(LearnObjectMap.FB_LOGIN_ERROR_MSG_XPATH)));\r\n\t\tString errorMsg = driver.findElement(By.xpath(LearnObjectMap.FB_LOGIN_ERROR_MSG_XPATH)).getText();\r\n\t\tSystem.out.println(\"Error message -->\"+errorMsg);\r\n\t\tAssert.assertEquals(errorMsg, \"The password that you've entered is incorrect. Forgotten password?\",\"Error message validation Failed\");\r\n\t\t\r\n\t}",
"@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyGlobalNavigationLinks()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Gas Page Navigation Links\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"GloabalSMRGas\");\n\t\tnew SubmitMeterReadAction()\n\t\t.BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .BgbverifyAfterLogin()\n\t .clickSubmitMeterReadLink()\t\n\t\t.verifyGlobalNavigationLink();\n}",
"public void ClickMyAccount( ){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account Link clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"LoginLogout\"));\r\n\t\t\tclick(locator_split(\"LoginLogout\"));\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- My Account Link clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- My Account Link is not clicked \"+elementProperties.getProperty(\"LoginLogout\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"public void clickOnContinueAsGuestUserLink()\n \t{\n \t\tproductRequirementsPageLocators.continueAsGuestUserLIink.click();\n\n \t}"
]
| [
"0.7214619",
"0.7051257",
"0.7025234",
"0.6996365",
"0.69962806",
"0.69622695",
"0.68098575",
"0.6696946",
"0.66924316",
"0.66756016",
"0.6573798",
"0.6564357",
"0.654158",
"0.6515274",
"0.6514989",
"0.65070426",
"0.6485019",
"0.6484321",
"0.64711994",
"0.6429414",
"0.641704",
"0.63924474",
"0.63865525",
"0.63850194",
"0.6370964",
"0.63651615",
"0.6364764",
"0.636103",
"0.63387793",
"0.63364416",
"0.6331552",
"0.63282996",
"0.6326082",
"0.63206154",
"0.63099426",
"0.63026255",
"0.6296153",
"0.6280787",
"0.62773705",
"0.626954",
"0.6267433",
"0.62510943",
"0.62507117",
"0.6248792",
"0.6240438",
"0.6239351",
"0.6238142",
"0.6235067",
"0.6232162",
"0.6209385",
"0.6208202",
"0.6206949",
"0.6201839",
"0.6196717",
"0.6185828",
"0.61781764",
"0.6161193",
"0.6157706",
"0.6136012",
"0.6115203",
"0.6109427",
"0.610941",
"0.61076045",
"0.6101778",
"0.610035",
"0.60966945",
"0.6095685",
"0.60955715",
"0.6091912",
"0.6087229",
"0.6086845",
"0.60833573",
"0.6077636",
"0.6076716",
"0.6071808",
"0.60607666",
"0.60574144",
"0.6047264",
"0.6047029",
"0.60403526",
"0.60400546",
"0.6037261",
"0.602129",
"0.6019632",
"0.60127056",
"0.6009009",
"0.60061806",
"0.60020405",
"0.59831",
"0.59800786",
"0.59787256",
"0.5967562",
"0.5965861",
"0.59633505",
"0.5956579",
"0.5955239",
"0.59533143",
"0.5945322",
"0.59392786",
"0.59363055",
"0.59339976"
]
| 0.0 | -1 |
Verify the Mange Profile Link in the LoginPage and clicks on it. | public void verifyRegisterForNPILink() {
npiLink.assertState().enabled();
npiLink.assertContains().text("register for a National Provider Identifier (NPI)");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}",
"public void verifyManageProfileLink() {\n profileLink.assertState().enabled();\n profileLink.assertContains().text(\"Manage your user profile\");\n }",
"public void clickOnProfile() {\n\t\telement(\"link_profile\").click();\n\t\tlogMessage(\"User clicks on Profile on left navigation bar\");\n\t}",
"@Then(\"^User should see home page with profile link$\")\n\tpublic void user_should_see_home_page_with_profile_link() throws Throwable {\n\t\twait.WaitForElement(profilepage.getywalletlink(), 60);\n\t\tprofilepage.verifyloginsuccess();\n\t\tThread.sleep(100);\n\t}",
"public void ClickSignIn() {\n if (lnkSignIn.isDisplayed()) {\n lnkSignIn.click();\n }\n else{System.out.println(\"Sign In link is not displayed\");\n }\n }",
"@Override\r\n\tpublic void clickOnLoginLink() {\r\n\t\t\r\n\t\tSelenium.click(lnkLogIn());\r\n\t}",
"public void clickGoToLogin(){\n\t\t\n\t\tgoToLoginBtn.click();\n\t\t\n\t}",
"@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyManageUserLinkNavigation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify MumV Navigation Links Manage user page\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvAddnewStdUser\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.verifyWhatisthisOverlay()\n\t\t.ManageUserNavigationVerificationLinks(); \t \t \t\n\t}",
"public void clickSignInLink()\n\t{\n \telementUtils.performElementClick(wbSignInLink);\n\t}",
"public void ClickAccount() {\n if (lnkAccount.isDisplayed()) {\n lnkAccount.click();\n }\n else{System.out.println(\"Account link is not displayed\");}\n }",
"@When(\"^When user navigates to profile page$\")\n\tpublic void when_user_navigates_to_profile_page() throws Throwable {\n\t\twait.WaitForElement(reviewConfirmationPageObjects.getmuserlink(), 60);\n\t\treviewConfirmationPageObjects.clickonprofile();\n\t}",
"public void Navigate_to_Registration_Page(){\n\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Tab_Home_Screen_Link_Text);\n Assert.assertTrue(getRegistrationTab_InHomeScreen().getText().equals(StringUtils.Registration_Tab_Text));\n getRegistrationTab_InHomeScreen().click();\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Form_Submit_Button);\n\n }",
"public void clickLogin() {\r\n\t\tdriver.findElement(SignIn).click();\r\n\t\t//SignIn.click();\r\n\t\t//SignIn.click();\r\n\t\t//return new LoginPage();\r\n\t}",
"public void goToProfilePage() {\n\t\tUtil.element(userTab, driver).click();\n\t}",
"public void clickloginlink(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Loginlink should be clicked from Home Page\");\r\n\t\ttry{\r\n\t\t\twaitForElement(locator_split(\"lnkLogin\"));\r\n\t\t\tclick(locator_split(\"lnkLogin\"));\r\n\t\t\twaitForPageToLoad(200);\r\n\t\t\tSystem.out.println(\"Login link clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:-Login link is clicked from home page\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Login link is not clicked\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"@Given(\"^I am on the Sign in page$\")\n\tpublic void I_am_on_the_Sign_in_page() throws Throwable {\n\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\tdriver.findElement(By.linkText(\"Sign in\")).click();\n\t}",
"@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}",
"@Test\n public void loginTest() throws MalformedURLException{\n // User user=new User();\n loginPage.fillGmailAccountInput().hitNextbutton().fillPasswordInput();\n InboxPage inboxPage = loginPage.clickNextButton();\n Assert.assertTrue(inboxPage.isElementClickable(inboxPage.composeButton ));\n\n }",
"public void clickOnLoginButton() {\n\t\tutil.clickOnElement(this.loginPageLocators.getLoginButtonElement());\n\t}",
"public void User_login()\r\n\t{\n\t\tdriver.findElement(FB_Locators.Signin_Email).clear();\r\n\t\tdriver.findElement(FB_Locators.Signin_Email).sendKeys(username);\r\n\t\t\r\n\t\t//Script using element referral..\r\n\t\tWebElement Password_Element=driver.findElement(FB_Locators.Signin_password);\r\n\t\tPassword_Element.clear();\r\n\t\tPassword_Element.sendKeys(password);\r\n\t\t\r\n\t\t//Login button using webelemnet referral\r\n\t\tWebElement Login_btn_Element=driver.findElement(FB_Locators.Signin_btn);\r\n\t\tLogin_btn_Element.click();\r\n\t}",
"public void clickHomeProfilePage() {\n wait.until(CustomWait.visibilityOfElement(profileHomePageButton));\n profileHomePageButton.click();\n }",
"public void clickLogin() {\n\t\tcontinueButton.click();\n\t}",
"public void clickOnLoginButton(){\n\t\tthis.loginButton.click();\n\t}",
"@Test(priority = 2)\r\n\tpublic void testLoginPage() {\r\n\r\n\t\tdriver.navigate().to(Login.URL);\r\n\t\tdriver.manage().window().maximize();\r\n\t\tLogin.typeEmail(driver, \"[email protected]\");\r\n\t\tLogin.typePassword(driver, \"lozinka\");\r\n\t\t\r\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\r\n\t\tLogin.clickLoginButton(driver);\r\n\t\t\t\t\r\n\t\tString currentUrl = driver.getCurrentUrl();\r\n\t\tString expectedUrl = \"https://www.humanity.com/app/\";\r\n\t\tSoftAssert sa = new SoftAssert();\r\n\t\tsa.assertEquals(currentUrl, expectedUrl);\r\n\t\tsa.assertAll();\r\n\t}",
"@Test\n\tpublic void TC02_Login() {\n\t\tSystem.out.println(\"TC02 : 1. Click to Login Page\");\n\t\tclickToElemnet(loginLinkX);\n\n\t\t// Verify Navigate to Login Page\n\t\tSystem.out.println(\"TC02 : 2. Login Page Display Status :\" + checkElementDisplayed(loginPageX));\n\n\t\t// Login to Page\n\t\tsendkeysToElement(emailTxtX, regEmail);\n\t\tsendkeysToElement(passwordTxtX, regPassword);\n\t\tclickToElemnet(loginBtnX);\n\n\t\t// Verify Login Successfully\n\t\tSystem.out.println(\"TC02 : 3. Login Successfully Status : \" + checkElementDisplayed(myAccountLinkX));\n\t}",
"public void clickLogin(){\n\t\tdriver.findElement(login).click();\n\t}",
"public void clickLogin(){\n\t\t\tdriver.findElement(login).click();\n\t}",
"public static void navigateAdminLoginPage() {\n Browser.driver.get(\"http://shop.pragmatic.bg/admin\");\n }",
"@Given(\"^User should logged in to URL$\")\n\tpublic void user_should_logged_in_to_URL() throws Throwable {\n\t\thomepage.clickloginifdisplayed();\n\t\twait.WaitForElement(loginpage.getLoginemail(), 60);\n\t\tloginpage.ValidLogin();\n\t}",
"@Test(priority=19)\n\tpublic void verifyRedirectionOfProfileAndLogoutOptions() throws Exception {\n\t\tOverviewTradusPROPage overviewPage= new OverviewTradusPROPage(driver);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.profileIconOnHeader);\n\t click(overviewPage.profileIconOnHeader);\n\t waitTill(1000);\n\t click(overviewPage.profileOptionInProfileIconDropdown);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.profilePageVerificationElement);\n\t waitTill(2000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms/profile\"),\n\t \t\t\"Profile page is not displaying by clicking on profile option under profile icon dropdown list\");\n\t click(overviewPage.logoutOptionInProfileIconDropdown);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.LoginText);\n\t waitTill(2000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/login\"),\n\t \t\t\"User not logged out from account by cicking on logout option in dropdown\");\n\t}",
"@Given(\"^user should open link$\")\r\n\tpublic void user_should_open_link() throws Throwable {\r\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n driver.manage().deleteAllCookies();\r\n\r\n driver.get(prop.getProperty(\"url\"));\r\n\r\n WebDriverWait wait = new WebDriverWait(driver,60);\r\n \t wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(prop.getProperty(\"Popup\"))));\r\n \t driver.findElement(By.xpath(prop.getProperty(\"Popup\"))).click();Thread.sleep(5000);\r\n\t}",
"public void VerifyHomepage(){\r\n\t\t//String username = getValue(Email);\r\n\t//\tString password = getValue(Password);\r\n\r\n\t//\tclass Local {};\r\n\t\t/*Reporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");*/\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\t//driver.findElement(locator_split(\"btn_privacyok\")).click();\r\n\t\tclick(locator_split(\"btn_privacyok\"));\r\n\t\t\t\r\n\t\t\t/*Reporter.log(\"PASS_MESSAGE:- My Account is clicked and user is logged in\");*/\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- User is not logged in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"@When(\"^the user opens linked sigup page$\")\r\n\tpublic void the_user_opens_linked_sigup_page() throws Throwable {\n\tsign.linkedin_signup();\r\n\t\t\r\n\t}",
"public void logInAcceptanceTestFounder() throws Exception {\n String acceptanceTestUserName = \"[email protected]\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n }",
"@When(\"^Click on Sign Up Button$\")\npublic void click_on_Sign_Up_Button() throws Throwable \n{\n\tdriver.findElement(By.xpath(\"//*[@id=\\\"login-block\\\"]/div/ul/li[1]/a\")).click();\n\tSystem.out.println(\"User is successfully navigated to Registration screen\");\n \n}",
"public void clickRegisterLink() {\n $(registerLink).click();\n }",
"public void clickLogin() {\n\t\t driver.findElement(loginBtn).click();\n\t }",
"public void clickLoginBtn() {\r\n\t\tthis.loginBtn.click(); \r\n\t}",
"public void clickOnLogin() {\n\t\tWebElement loginBtn=driver.findElement(loginButton);\n\t\tif(loginBtn.isDisplayed())\n\t\t\tloginBtn.click();\n\t}",
"public void openProfile(){\n\t\t\n\t\tclickElement(profile_L, driver);\n\t}",
"@Given(\"User is on the login page\")\n\tpublic void user_is_on_the_login_page() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src\\\\test\\\\resources\\\\chromedriver.exe\");\n\t\tdriver=new ChromeDriver();\n\t\tdriver.get(\"https://10.232.237.143/TestMeApp/fetchcat.htm\");\n\t\tdriver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\n\t\tdriver.manage().window().maximize();\n\t driver.findElement(By.id(\"details-button\")).click();\n\t\tdriver.findElement(By.id(\"proceed-link\")).click();\n\t}",
"public void clickUpdateProfileLink()\n\t{\n \telementUtils.performElementClick(wbUpdateProfileLink);\n\t}",
"@And(\"is on login page\")\n\tpublic void is_on_login_page() {\n\t\tSystem.out.println(\"user on 1\");\n\t\tdriver.navigate().to(\"https://example.testproject.io/web/\");\n\n\t}",
"public void click_SIGN_IN() {\r\n\t\tbtn_SIGN_IN.click();\r\n\t}",
"public HomePage clickOnLogin() {\n// Actions action = new Actions(driver);\n// action.moveToElement(login).build().perform();\n// closeAd.click();\n login.isDisplayed();\n login.click();\n return this;\n }",
"@Test\n\tpublic void checkLoginPage() {\n\n\t\t// Locate the logo on the page\n\t\tWebElement logo = driver.findElement(By.xpath(\"(//a/img)[1]\"));\n\t\tString logoSrc = logo.getAttribute(\"src\");\n\n\t\t// Locate the heading of the page\n\t\tString heading = driver.findElement(By.className(\"auth-header\"))\n\t\t\t\t.getText();\n\n\t\t// Locate the Username related fields\n\t\tString usernameLabel = driver.findElement(By.xpath(\"(//label)[1]\"))\n\t\t\t\t.getText();\n\t\tWebElement usernameIcon = driver\n\t\t\t\t.findElement(By.className(\"os-icon-user-male-circle\"));\n\t\tWebElement usernameTextField = driver.findElement(By.id(\"username\"));\n\t\tString placeholderText = usernameTextField.getAttribute(\"placeholder\");\n\n\t\t// Locate the Password related fields\n\t\tString passwordLabel = driver.findElement(By.xpath(\"(//label)[2]\"))\n\t\t\t\t.getText();\n\t\tWebElement passwordIcon = driver\n\t\t\t\t.findElement(By.className(\"os-icon-fingerprint\"));\n\t\tWebElement passwordTextField = driver.findElement(By.id(\"password\"));\n\t\tString placeholderPassword = passwordTextField\n\t\t\t\t.getAttribute(\"placeholder\");\n\n\t\t// Locate the Sign in button\n\t\tWebElement signInButton = driver.findElement(By.id(\"log-in\"));\n\t\tString signInButtonText = signInButton.getText();\n\n\t\t// Locate the Remember me checkbox and label\n\t\tWebElement rememberMeCheckbox = driver\n\t\t\t\t.findElement(By.className(\"form-check-input\"));\n\t\tString rememberMeText = driver\n\t\t\t\t.findElement(By.className(\"form-check-label\")).getText();\n\n\t\t// Locate the social media icons\n\t\tWebElement twitterIcon = driver.findElement(By.xpath(\"(//a/img)[2]\"));\n\t\tString twitterSrc = twitterIcon.getAttribute(\"src\");\n\n\t\tWebElement facebookIcon = driver.findElement(By.xpath(\"(//a/img)[3]\"));\n\t\tString facebookSrc = facebookIcon.getAttribute(\"src\");\n\n\t\tWebElement linkedInIcon = driver.findElement(By.xpath(\"(//a/img)[4]\"));\n\t\tString linkedInSrc = linkedInIcon.getAttribute(\"src\");\n\n\t\t// Assert that the logo is displayed\n\t\tAssert.assertTrue(logo.isDisplayed());\n\t\tAssert.assertEquals(logoSrc,\n\t\t\t\t\"https://demo.applitools.com/img/logo-big.png\");\n\n\t\t// Add assertions for all elements displayed on the Login for,\n\t\tAssert.assertEquals(heading, \"Login Form\");\n\t\tAssert.assertEquals(usernameLabel, \"Username\");\n\t\tAssert.assertTrue(usernameIcon.isDisplayed());\n\t\tAssert.assertTrue(usernameTextField.isDisplayed());\n\t\tAssert.assertEquals(placeholderText, \"Enter your username\");\n\n\t\tAssert.assertEquals(passwordLabel, \"Password\");\n\t\tAssert.assertTrue(passwordIcon.isDisplayed());\n\t\tAssert.assertTrue(passwordTextField.isDisplayed());\n\t\tAssert.assertEquals(placeholderPassword, \"Enter your password\");\n\n\t\tAssert.assertTrue(signInButton.isDisplayed());\n\t\tAssert.assertEquals(signInButtonText, \"Log In\");\n\n\t\tAssert.assertTrue(rememberMeCheckbox.isDisplayed());\n\t\tAssert.assertFalse(rememberMeCheckbox.isSelected());\n\t\tAssert.assertEquals(rememberMeText, \"Remember Me\");\n\n\t\tAssert.assertTrue(twitterIcon.isDisplayed());\n\t\tAssert.assertEquals(twitterSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/twitter.png\");\n\n\t\tAssert.assertTrue(facebookIcon.isDisplayed());\n\t\tAssert.assertEquals(facebookSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/facebook.png\");\n\n\t\tAssert.assertTrue(linkedInIcon.isDisplayed());\n\t\tAssert.assertEquals(linkedInSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/linkedin.png\");\n\t}",
"public void clickLoginButton() {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"Verifying the login button is available or not\");\n\t\tAssert.assertTrue(clickLoginButton.isDisplayed());\n\t\tclickLoginButton.click();\n\t}",
"public void verifyOnDashboardPage() {\n verifyUserLoggedIn.waitForState().enabled(30);\n verifyUserLoggedIn.assertContains().text(\"Dev Links\");\n }",
"public void I_Should_click_My_Account_link(){\n\t MyAccountLink.click();\n\t \n}",
"@Given(\"^User is navigating to G-mail Login Page$\")\n\tpublic void navigateURL() throws Throwable {\n\t\tSystem.out.println(\"Entered URL\"); \n\t\t\n\t}",
"private void clickSignOn() {\n\t\tthis.clickElement(signon);\n\t}",
"@Test\n\tpublic void loginSuccessful() {\n\t\tHomePage.sign_in_label.click();\n\t\tLoginContainer.LogInUser(VALID_USER_NAME, VALID_USER_PASSWORD);\n\t\t\n\t\t// Wait for page to load\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\n\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.className(\"links-container\")));\n\t\t\n\t\t//Check if proper page is loaded\n\t\tPageFactory.initElements(driver, LoginSuccessfulTest.class);\n\t\tAssert.assertEquals(linksContainer.getAttribute(\"title\"), \"Kasia suszczynska - My page\", \"Links container title\");\n\t}",
"@Test\n\tpublic void LoggedInTest() throws IOException {\n\t\tLoginapp.Loginapp();\n\t\tLoginapp.frameChecking(\".//*[@id='frmLink']/table/tbody/tr[2]/td/table/tbody/tr/td[1]/a[4]\");\n\n\n}",
"@Test(description = \"Go to Login Page From Home Page Header\")\n @Issue(\"EZ-8885\")\n @Description(\"Check the Login button on Header Home Page\")\n void verifyLoginButtonOnMainPage() {\n HomePage homePage = new HomePage(BaseUrl.homePageBaseUrl());\n homePage.open().getHeaderButtonsSection()\n .getLoginAreaButton().clickOnLoginAreaButton(\"https://hotline.ua/login/\");\n\n assertThat(getBrowserConsoleErrors()).isFalse();\n }",
"public SignInPage selectSignInButtonFromNavBar() {\n \t new WebDriverWait (DRIVER, 5)\n \t .until (ExpectedConditions.presenceOfElementLocated(navigationBarSignInLinkLocator))\n \t .click();\n \t\n \t new WebDriverWait (DRIVER, 5).until(\n \t\t\t ExpectedConditions.stalenessOf(DRIVER.findElement(navigationBarSignInLinkLocator)));\n \t \n return new SignInPage(); \n }",
"@Then(\"^user check is logged in$\")\n public void check_user_logged(){\n log.info(\"try to check if user is logged in\");\n String linkSignOut = pageLogin.getLinkSignOut().getText();\n Assert.assertTrue(linkSignOut.equals(\"Sign out\"), \"There is no visible link sign out\");\n String linkUserName = pageLogin.getLinkUserFullname().getText();\n Assert.assertTrue(linkUserName.equals(\"Antoni Giez\"));\n log.info(\"user is logged in, username - \" + linkUserName);\n }",
"public void navigateToLoginPage() {\r\n\t\tBrowser.open(PhpTravelsGlobal.PHP_TRAVELS_LOGIN_URL);\r\n\t}",
"public void clickUserProfile(){\r\n driver.findElement(userTab).click();\r\n driver.findElement(profileBtn).click();\r\n }",
"@Given(\"^I am able to access the sign in page$\")\n public void i_am_able_to_access_the_sign_in_page() throws Throwable {\n bbcSite.bbcSignInPage().goToSignInPage();\n Assert.assertEquals(bbcSite.bbcSignInPage().getSignInPageURL(), bbcSite.getCurrentURL());\n }",
"@Given(\"^The user is in the login page$\")\n\tpublic void the_user_is_in_the_login_page() throws Throwable {\n\t\tChrome_Driver();\n\t\tlpw =new Login_Page_WebElements();\n\t\tlpw.open_orange_hrm();\n\t}",
"public void clickToLogoutLink() {\n\t\twaitToElementClickable(driver,RegisterPageUI.LOGOUT_LINK);\n\t\tclickToElement(driver,RegisterPageUI.LOGOUT_LINK);\n\t}",
"@Test\r\n public void login() {\n driver.findElement(By.className(\"login\")).click();\r\n // Fill in the form\r\n driver.findElement(By.id(\"email\")).sendKeys(\"[email protected]\");\r\n driver.findElement(By.id(\"passwd\")).sendKeys(\"tester\");\r\n driver.findElement(By.id(\"SubmitLogin\")).click();\r\n // Assert if element is displayed\r\n // Assert if element is displayed\r\n Assert.assertTrue(driver.findElement(\r\n By.cssSelector(\"ul.myaccount_lnk_list\")).isDisplayed());\r\n }",
"@Test\n public void testlogInAcceptanceTestFounder() throws Exception {\n String acceptanceTestUserName = \"[email protected]\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n //verify we're viewing the testing profile\n assertTrue(driver.findElement(By.id(\"founderProfile\")).isDisplayed());\n logOutUser();\n }",
"@Test\n public void logInAcceptanceTestMentor() throws Exception {\n String acceptanceTestUserName = \"[email protected]\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n logOutUser();\n }",
"@Test\n public void ValidLoginTest() throws Exception {\n openDemoSite(driver).typeAuthInfo(loginEmail, \"Temp1234%\").signInByClick();\n }",
"public void irParaPaginaDeLogin (){\n\n click(By.className(btnLoginClass));\n }",
"@Test(priority=26)\n\tpublic void verifyLoginPageByClickingOnLogoutOptionInDropdown() throws Exception {\n\t\tOverviewTradusPROPage overviewPage= new OverviewTradusPROPage(driver);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.profileIconOnHeader);\n\t click(overviewPage.profileIconOnHeader);\n\t waitTill(1000);\n\t click(overviewPage.logoutOptionInProfileIconDropdown);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.LoginText);\n\t waitTill(1000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/login\"),\n\t \t\t\"Login Page is not displaying by cicking on logout option in dropdown\");\n\t}",
"@Given(\"user is on login page\")\n\tpublic void user_is_on_login_page() {\n\t\tSystem.out.println(\"user is on login page\");\n\t\tWebDriverManager.chromedriver().setup();\n\t\tdriver=new ChromeDriver();\n\t\tdriver.manage().window().maximize();\n\t\tdriver.get(\"https://opensource-demo.orangehrmlive.com/index.php/auth/validateCredentials\");\n\t \n\t}",
"public static void verifyLogOutPageTitleLeadsToLoginPage() {\n click(AMAZON_PAGE_TITLE);\n }",
"public void verifyForgotPwdLink() {\n forgotPasswordLink.assertState().enabled();\n forgotPasswordLink.assertContains().text(\"Forgot your password?\");\n }",
"public void clickSignIn() {\r\n\t\tdriver.findElement(signIn).click();\r\n\t}",
"@Given(\"^User is on Login Page$\")\n\tpublic void userIsOnLoginPage() throws Throwable {\n\t\tassertTrue(isElementPresent(driver, By.id(\"new_user\")));\n\t}",
"@Test\n\tpublic void checkPageLoginFlow() {\n\t driver.findElement(By.cssSelector(\"a.login\")).click();\n\n\t // Click login again on Login Page\n\t driver.findElement(By.cssSelector(\"button.login-page-dialog-button\")).click();\n\t\t \n\t // Enter Username & PW\n\t String username = \"username\";\n\t String password = \"password\";\n\n\t // Select and enter text for username and password\n\t driver.findElement(By.id(\"1-email\")).click();\n\t driver.findElement(By.id(\"1-email\")).sendKeys(username);\n\t driver.findElement(By.name(\"password\")).click();\n\t driver.findElement(By.name(\"password\")).sendKeys(password);\n\n\t // Verify Username box displayed\n\t boolean usernameElement = driver.findElement(By.id(\"1-email\")).isDisplayed();\n\t \tAssert.assertTrue(usernameElement, \"Is Not Present, this is not expected\");\n\t \n\t // Verify Password box displayed\n\t boolean passwordElement = driver.findElement(By.name(\"password\")).isDisplayed();\n\t \tAssert.assertTrue(passwordElement, \"Is Not Present, this is not expected\");\n\t}",
"public void clickGoToYourAccountButton() {\n\t\telement(signUpObjects.getOTPButton).click();\n\t}",
"@Then(\"^Browser display Sign In page$\")\n public void browser_display_Sign_In_page() throws Throwable {\n sign.browserDisplaySignIn();\n\n\n }",
"@Given(\"^User should see profile page$\")\n\tpublic void user_should_see_profile_page() throws Throwable {\n\t\twait.WaitForElement(profileTestInsurancePage.gettestinsuranceheading(), 60);\n\t\tprofileTestInsurancePage.verifyprofileTestInsurancePage();\n\t}",
"public void clickOnPriorAuth() {\n\t\tscrollDown(element(\"link_priorAuth\"));\n\t\telement(\"link_priorAuth\").click();\n\t\tlogMessage(\"User clicks on Prior Authorizations on left navigation bar at Physician End\");\n\t}",
"public void AdminLink(){\n\t\tAdminLink.click();\n\t}",
"public MenuSignOnPageClass navigateToSignOn() {\n\t\tthis.clickSignOn();\n\t\treturn new MenuSignOnPageClass(myDriver, myWait);\n\t}",
"public void ClickUserInformationPage() {\r\n\t\tuserinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"User Information\\\" button on the Birthdays page\");\r\n\t}",
"@Override\n\tpublic void goToLogin() {\n\t\t\n\t}",
"public boolean verifyPageLoad() {\n\t\tboolean result = lnkLoginButton.isDisplayed();\n\t\tLog.info(\"Home Page Loaded Successfully\");\n\t\treturn result;\n\t}",
"@Given(\"^user is on the login page$\")\n public void userIsOnTheLoginPage() throws Throwable {\n }",
"private void gotoUserProfile() {\n Intent launchUserProfile = new Intent(this, Profile.class);\n startActivity(launchUserProfile);\n }",
"public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}",
"@When(\"^the user open the Parabank Registration page$\")\r\n\tpublic void the_user_open_the_Parabank_Registration_page() throws Throwable {\n\t getUrl();\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tString resetUrl = \"#activateacc;uid=\" + user.getRefId();\r\n\t\t\t\tWindow.open(resetUrl, \"Password Reset\", \"\");\r\n\t\t\t}",
"@Test\n\tpublic void verifyBackToLoginButtonInForgetPasswordPageAndItsNavigation() throws Exception{\n\t\tLoginOtomotoProfiLMSPage loginPage = new LoginOtomotoProfiLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.languageDropdown);\n\t\tactionClick(driver,loginPage.languageDropdown);\n\t\twaitTill(1000);\n\t\tactionClick(driver,loginPage.englishOptioninLangDropdown);\n\t\tFogrotPasswordOTMPLMSPage forgotPasswordPageObj = new FogrotPasswordOTMPLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.forgotPasswordLink);\n\t\ttry {\n\t\tclick(loginPage.forgotPasswordLink);\n\t\t}catch (Exception e) {\n\t\t\tjsClick(driver,loginPage.forgotPasswordLink);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordPageHeading);\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\tAssert.assertTrue(verifyElementPresent(forgotPasswordPageObj.forgotPasswordLoginPageLink), \"Back to login link isn't present in forgot password page\");\n\t\ttry {\n\t\t\tclick(forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\t\t}catch (Exception e) {\n\t\t\t\tjsClick(driver,forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.emailTextField);\n\t\twaitTill(1000);\n\t\tAssert.assertTrue(verifyElementPresent(loginPage.emailTextField), \"User isn't landing on login page on clicking back to login button from forgot password page\");\n\t}",
"@Test\r\n\tpublic void verification(){\n\t\tdriver.findElement(By.className(\"button block\")).click();\r\n\t\t\r\n\t\t//open a new tab\r\n\t\tdriver.findElement(By.cssSelector(\"body\")).sendKeys(Keys.CONTROL +\"t\");\r\n\t\t\r\n\t\t//switch to new tab\r\n\t\tArrayList<String> tabs = new ArrayList<String>(driver.getWindowHandles());\r\n\t\tdriver.switchTo().window(tabs.get(1));\r\n\t driver.get(\"https://www.textnow.com/login\");\r\n\t driver.findElement(By.id(\"loginUsername\")).sendKeys(\"elaineren\");\r\n\t driver.findElement(By.id(\"loginPassword\")).sendKeys(\"5691219-kk\");\r\n\t driver.findElement(By.id(\"submitLogin\")).click();\r\n\t \r\n\t String scode=driver.findElement(By.id(\"new\")).getText();\r\n\t System.out.println(scode);\r\n\t \r\n\t driver.findElement(By.linkText(\"Log Out\"));\r\n\t \r\n\t driver.switchTo().window(tabs.get(0));\r\n\t}",
"@And(\"user clicks on Login\")\n public void userClicksOnLogin() {\n homePage.clickOnLogin();\n\n }",
"@Test\r\n\tpublic void TC_01_verifyRegistrationPage() {\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t}",
"public void clickAccountsLink()\n\t{\n \telementUtils.performElementClick(wbAccountsLink);\n\t}",
"public AccountPage Signup_through_loginpage() {\n\tJavascriptExecutor js = (JavascriptExecutor)driver;\n\tjs.executeScript( \"arguments[0].click();\", SignUpButton );\n\tsignupPage.SignUp_Form();\n\treturn new AccountPage();\n\t}",
"public PageBase click_on_login_submit_form_button () {\r\n HomePageClass homePage = new HomePageClass(driver);\r\n\r\n LGN_Login_submitBTN.click();\r\n\r\n WebDriverWait wait = getWait();\r\n wait.until(ExpectedConditions.visibilityOf(homePage.logout));\r\n\r\n return homePage;\r\n\r\n }",
"public void ClickLogin()\n\t{\n\t\t\n\t\tbtnLogin.submit();\n\t}",
"@Test\n\tpublic void login(){\n\t\tloginPage.login(data.readData(\"email\"), data.readData(\"password\"));\n\t\tAssert.assertEquals(isPresent(locateElement(By.id(home.homeLogo))),true,\"user not got logged in successfully\");\n\t}",
"@Then(\"^click on the Login button user nagivate to the next page$\")\r\n\tpublic void click_on_the_Login_button_user_nagivate_to_the_next_page() throws Throwable {\n\t w.submit();\r\n\t}",
"public void loginFacebook() {\r\n\t\tdriver.findElement(By.xpath(LearnObjectMap.FB_LOGIN_USERNAME_XPATH)).sendKeys(\"9705033563\");\r\n\t\tdriver.findElement(By.xpath(LearnObjectMap.FB_LOGIN_PASSWORD_XPATH)).sendKeys(\"asfczc\");\r\n\t\tdriver.findElement(By.xpath(LearnObjectMap.FB_LOGIN_XPATH)).click();\r\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\r\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(LearnObjectMap.FB_LOGIN_ERROR_MSG_XPATH)));\r\n\t\tString errorMsg = driver.findElement(By.xpath(LearnObjectMap.FB_LOGIN_ERROR_MSG_XPATH)).getText();\r\n\t\tSystem.out.println(\"Error message -->\"+errorMsg);\r\n\t\tAssert.assertEquals(errorMsg, \"The password that you've entered is incorrect. Forgotten password?\",\"Error message validation Failed\");\r\n\t\t\r\n\t}",
"@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyGlobalNavigationLinks()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Gas Page Navigation Links\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"GloabalSMRGas\");\n\t\tnew SubmitMeterReadAction()\n\t\t.BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .BgbverifyAfterLogin()\n\t .clickSubmitMeterReadLink()\t\n\t\t.verifyGlobalNavigationLink();\n}",
"public void ClickMyAccount( ){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account Link clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"LoginLogout\"));\r\n\t\t\tclick(locator_split(\"LoginLogout\"));\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- My Account Link clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- My Account Link is not clicked \"+elementProperties.getProperty(\"LoginLogout\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"public void clickOnContinueAsGuestUserLink()\n \t{\n \t\tproductRequirementsPageLocators.continueAsGuestUserLIink.click();\n\n \t}"
]
| [
"0.7213416",
"0.7052336",
"0.70261395",
"0.6995903",
"0.6995771",
"0.6962049",
"0.6809209",
"0.6697237",
"0.669226",
"0.66760576",
"0.65740055",
"0.6564032",
"0.65404195",
"0.65153396",
"0.6514663",
"0.6506798",
"0.64841956",
"0.6483843",
"0.6470922",
"0.64282405",
"0.6416623",
"0.6391914",
"0.63862675",
"0.63844556",
"0.637016",
"0.6364604",
"0.6364158",
"0.63612336",
"0.6338802",
"0.6336364",
"0.6332642",
"0.6327579",
"0.63254905",
"0.6320085",
"0.63093305",
"0.6302504",
"0.62955594",
"0.6280499",
"0.6277013",
"0.62706006",
"0.6267337",
"0.6252786",
"0.6250597",
"0.624788",
"0.6239731",
"0.623829",
"0.623769",
"0.6235826",
"0.62333024",
"0.6209112",
"0.6207972",
"0.6205924",
"0.6202046",
"0.61968124",
"0.61852723",
"0.6177642",
"0.616093",
"0.6158007",
"0.61357397",
"0.6115399",
"0.6110035",
"0.6109218",
"0.61070913",
"0.61014044",
"0.60993487",
"0.60965616",
"0.6095856",
"0.60949",
"0.60925806",
"0.60880804",
"0.60854125",
"0.60831887",
"0.60769236",
"0.60762537",
"0.6071142",
"0.60609007",
"0.6058014",
"0.60486853",
"0.6045974",
"0.60412616",
"0.6038515",
"0.6037518",
"0.602127",
"0.6019702",
"0.6012377",
"0.6008884",
"0.60058737",
"0.6001279",
"0.59834343",
"0.59795886",
"0.5977991",
"0.5968848",
"0.59644973",
"0.5962433",
"0.5955335",
"0.5953257",
"0.59527165",
"0.5944798",
"0.5939556",
"0.5936074",
"0.59347034"
]
| 0.0 | -1 |
Verify the Manage Profile Link in the LoginPage and clicks on it. | public void verifyRegisterLink() {
registerLink.assertState().enabled();
registerLink.assertContains().text("Register");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void verifyManageProfileLink() {\n profileLink.assertState().enabled();\n profileLink.assertContains().text(\"Manage your user profile\");\n }",
"public void clickOnProfile() {\n\t\telement(\"link_profile\").click();\n\t\tlogMessage(\"User clicks on Profile on left navigation bar\");\n\t}",
"public void goToLoginPage()\n\t{\n\t\tclickAccountNameIcon();\n\t\tclickSignInLink();\n\t}",
"@Then(\"^User should see home page with profile link$\")\n\tpublic void user_should_see_home_page_with_profile_link() throws Throwable {\n\t\twait.WaitForElement(profilepage.getywalletlink(), 60);\n\t\tprofilepage.verifyloginsuccess();\n\t\tThread.sleep(100);\n\t}",
"public void goToProfilePage() {\n\t\tUtil.element(userTab, driver).click();\n\t}",
"public void ClickSignIn() {\n if (lnkSignIn.isDisplayed()) {\n lnkSignIn.click();\n }\n else{System.out.println(\"Sign In link is not displayed\");\n }\n }",
"@Override\r\n\tpublic void clickOnLoginLink() {\r\n\t\t\r\n\t\tSelenium.click(lnkLogIn());\r\n\t}",
"public void ClickAccount() {\n if (lnkAccount.isDisplayed()) {\n lnkAccount.click();\n }\n else{System.out.println(\"Account link is not displayed\");}\n }",
"@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyManageUserLinkNavigation() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify MumV Navigation Links Manage user page\");\n\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMvAddnewStdUser\");\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.verifyWhatisthisOverlay()\n\t\t.ManageUserNavigationVerificationLinks(); \t \t \t\n\t}",
"@Test(priority=19)\n\tpublic void verifyRedirectionOfProfileAndLogoutOptions() throws Exception {\n\t\tOverviewTradusPROPage overviewPage= new OverviewTradusPROPage(driver);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.profileIconOnHeader);\n\t click(overviewPage.profileIconOnHeader);\n\t waitTill(1000);\n\t click(overviewPage.profileOptionInProfileIconDropdown);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.profilePageVerificationElement);\n\t waitTill(2000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms/profile\"),\n\t \t\t\"Profile page is not displaying by clicking on profile option under profile icon dropdown list\");\n\t click(overviewPage.logoutOptionInProfileIconDropdown);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.LoginText);\n\t waitTill(2000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/login\"),\n\t \t\t\"User not logged out from account by cicking on logout option in dropdown\");\n\t}",
"@When(\"^When user navigates to profile page$\")\n\tpublic void when_user_navigates_to_profile_page() throws Throwable {\n\t\twait.WaitForElement(reviewConfirmationPageObjects.getmuserlink(), 60);\n\t\treviewConfirmationPageObjects.clickonprofile();\n\t}",
"public void clickUserProfile(){\r\n driver.findElement(userTab).click();\r\n driver.findElement(profileBtn).click();\r\n }",
"public void clickGoToLogin(){\n\t\t\n\t\tgoToLoginBtn.click();\n\t\t\n\t}",
"public void clickUpdateProfileLink()\n\t{\n \telementUtils.performElementClick(wbUpdateProfileLink);\n\t}",
"public void clickHomeProfilePage() {\n wait.until(CustomWait.visibilityOfElement(profileHomePageButton));\n profileHomePageButton.click();\n }",
"public void Navigate_to_Registration_Page(){\n\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Tab_Home_Screen_Link_Text);\n Assert.assertTrue(getRegistrationTab_InHomeScreen().getText().equals(StringUtils.Registration_Tab_Text));\n getRegistrationTab_InHomeScreen().click();\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Form_Submit_Button);\n\n }",
"public void clickSignInLink()\n\t{\n \telementUtils.performElementClick(wbSignInLink);\n\t}",
"@When(\"^Click on Sign Up Button$\")\npublic void click_on_Sign_Up_Button() throws Throwable \n{\n\tdriver.findElement(By.xpath(\"//*[@id=\\\"login-block\\\"]/div/ul/li[1]/a\")).click();\n\tSystem.out.println(\"User is successfully navigated to Registration screen\");\n \n}",
"@Given(\"^I am on the Sign in page$\")\n\tpublic void I_am_on_the_Sign_in_page() throws Throwable {\n\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\tdriver.findElement(By.linkText(\"Sign in\")).click();\n\t}",
"public void clickOnLoginButton() {\n\t\tutil.clickOnElement(this.loginPageLocators.getLoginButtonElement());\n\t}",
"public void clickLoginButton() {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"Verifying the login button is available or not\");\n\t\tAssert.assertTrue(clickLoginButton.isDisplayed());\n\t\tclickLoginButton.click();\n\t}",
"public void clickLogin() {\n\t\tcontinueButton.click();\n\t}",
"public void click_SIGN_IN() {\r\n\t\tbtn_SIGN_IN.click();\r\n\t}",
"public void openProfile(){\n\t\t\n\t\tclickElement(profile_L, driver);\n\t}",
"@Test(priority=26)\n\tpublic void verifyLoginPageByClickingOnLogoutOptionInDropdown() throws Exception {\n\t\tOverviewTradusPROPage overviewPage= new OverviewTradusPROPage(driver);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.profileIconOnHeader);\n\t click(overviewPage.profileIconOnHeader);\n\t waitTill(1000);\n\t click(overviewPage.logoutOptionInProfileIconDropdown);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.LoginText);\n\t waitTill(1000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/login\"),\n\t \t\t\"Login Page is not displaying by cicking on logout option in dropdown\");\n\t}",
"public static void navigateAdminLoginPage() {\n Browser.driver.get(\"http://shop.pragmatic.bg/admin\");\n }",
"public void clickOnLoginButton(){\n\t\tthis.loginButton.click();\n\t}",
"public void clickRegisterLink() {\n $(registerLink).click();\n }",
"public void clickLogin() {\n\t\t driver.findElement(loginBtn).click();\n\t }",
"private void gotoUserProfile() {\n Intent launchUserProfile = new Intent(this, Profile.class);\n startActivity(launchUserProfile);\n }",
"public void clickOnLogin() {\n\t\tWebElement loginBtn=driver.findElement(loginButton);\n\t\tif(loginBtn.isDisplayed())\n\t\t\tloginBtn.click();\n\t}",
"public void verifyOnDashboardPage() {\n verifyUserLoggedIn.waitForState().enabled(30);\n verifyUserLoggedIn.assertContains().text(\"Dev Links\");\n }",
"public void clickGoToYourAccountButton() {\n\t\telement(signUpObjects.getOTPButton).click();\n\t}",
"public void clickLogin(){\n\t\tdriver.findElement(login).click();\n\t}",
"public void clickLogin(){\n\t\t\tdriver.findElement(login).click();\n\t}",
"public void getUserProfile() {\n\t\tkeypad.UserProfiles.click();\n\t}",
"public void clickLogin() {\r\n\t\tdriver.findElement(SignIn).click();\r\n\t\t//SignIn.click();\r\n\t\t//SignIn.click();\r\n\t\t//return new LoginPage();\r\n\t}",
"public void clickLoginBtn() {\r\n\t\tthis.loginBtn.click(); \r\n\t}",
"@Given(\"^User should see profile page$\")\n\tpublic void user_should_see_profile_page() throws Throwable {\n\t\twait.WaitForElement(profileTestInsurancePage.gettestinsuranceheading(), 60);\n\t\tprofileTestInsurancePage.verifyprofileTestInsurancePage();\n\t}",
"@Test(priority=0)\n\tpublic void verifyOverviewPageAfterLoginToAccount() throws Exception {\n\t\tLoginTradusPROPage loginPage= new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(testUser,pwd);\n\t\tclick(loginPage.LoginButton);\n\t\twaitTill(3000);\n\t explicitWaitFortheElementTobeVisible(driver,loginPage.overviewPageVerificationElement);\n\t waitTill(7000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms\"),\n\t \t\t\"Overview page is not displaying after login to account\");\n\t}",
"public void AdminLink(){\n\t\tAdminLink.click();\n\t}",
"@When(\"^the user opens linked sigup page$\")\r\n\tpublic void the_user_opens_linked_sigup_page() throws Throwable {\n\tsign.linkedin_signup();\r\n\t\t\r\n\t}",
"@Test(priority = 2)\r\n\tpublic void testLoginPage() {\r\n\r\n\t\tdriver.navigate().to(Login.URL);\r\n\t\tdriver.manage().window().maximize();\r\n\t\tLogin.typeEmail(driver, \"[email protected]\");\r\n\t\tLogin.typePassword(driver, \"lozinka\");\r\n\t\t\r\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\r\n\t\tLogin.clickLoginButton(driver);\r\n\t\t\t\t\r\n\t\tString currentUrl = driver.getCurrentUrl();\r\n\t\tString expectedUrl = \"https://www.humanity.com/app/\";\r\n\t\tSoftAssert sa = new SoftAssert();\r\n\t\tsa.assertEquals(currentUrl, expectedUrl);\r\n\t\tsa.assertAll();\r\n\t}",
"public void verifyForgotPwdLink() {\n forgotPasswordLink.assertState().enabled();\n forgotPasswordLink.assertContains().text(\"Forgot your password?\");\n }",
"public void handleNavMenuViewProfile() {\n if (user != null) {\n view.launchProfilePage(user);\n }\n }",
"@Test\n\tpublic void TC02_Login() {\n\t\tSystem.out.println(\"TC02 : 1. Click to Login Page\");\n\t\tclickToElemnet(loginLinkX);\n\n\t\t// Verify Navigate to Login Page\n\t\tSystem.out.println(\"TC02 : 2. Login Page Display Status :\" + checkElementDisplayed(loginPageX));\n\n\t\t// Login to Page\n\t\tsendkeysToElement(emailTxtX, regEmail);\n\t\tsendkeysToElement(passwordTxtX, regPassword);\n\t\tclickToElemnet(loginBtnX);\n\n\t\t// Verify Login Successfully\n\t\tSystem.out.println(\"TC02 : 3. Login Successfully Status : \" + checkElementDisplayed(myAccountLinkX));\n\t}",
"public void clickSignIn() {\r\n\t\tdriver.findElement(signIn).click();\r\n\t}",
"@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}",
"public void testProfileManagementUI(String profileConfig) throws Exception {\r\n selenium.click(\"link=Profile Management\");\r\n selenium.waitForPageToLoad(\"30000\");\r\n\t\tassertTrue(selenium.isTextPresent(\"Profile Configurations\"));\r\n\t\tassertTrue(selenium.isElementPresent(\"link=Add New Profile Configuration\"));\r\n\t\tassertTrue(selenium.isTextPresent(\"Available Profile Configurations\"));\r\n\t\tassertEquals(\"default\", selenium.getTable(\"//div[@id='workArea']/table.1.0\"));\r\n\t\tassertEquals(\"Delete\", selenium.getTable(\"//div[@id='workArea']/table.1.1\"));\r\n\r\n //Click on the Claim URL for http://schemas.xmlsoap.org/ws/2005/05/identity\r\n assertTrue(selenium.isElementPresent(\"link=Add New Profile Configuration\"));\r\n selenium.click(\"link=\"+ profileConfig );\r\n\t\tselenium.waitForPageToLoad(\"30000\");\r\n assertTrue(selenium.isTextPresent(\"Profile Configurations for \"+ profileConfig));\r\n\t\tselenium.click(\"//input[@value='Cancel']\");\r\n\t\tselenium.waitForPageToLoad(\"30000\");\r\n }",
"void gotoEditProfile();",
"@Test\n public void loginTest() throws MalformedURLException{\n // User user=new User();\n loginPage.fillGmailAccountInput().hitNextbutton().fillPasswordInput();\n InboxPage inboxPage = loginPage.clickNextButton();\n Assert.assertTrue(inboxPage.isElementClickable(inboxPage.composeButton ));\n\n }",
"public void clickloginlink(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Loginlink should be clicked from Home Page\");\r\n\t\ttry{\r\n\t\t\twaitForElement(locator_split(\"lnkLogin\"));\r\n\t\t\tclick(locator_split(\"lnkLogin\"));\r\n\t\t\twaitForPageToLoad(200);\r\n\t\t\tSystem.out.println(\"Login link clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:-Login link is clicked from home page\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Login link is not clicked\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}",
"void gotoEditProfile(String fbId);",
"@Override\n public void onClick(View view) {\n\n Intent intent = new Intent(LoginActivity.this, ProfileSetupActivity.class);\n startActivity(intent);\n }",
"public void I_Should_click_My_Account_link(){\n\t MyAccountLink.click();\n\t \n}",
"@Test\r\n public void login() {\n driver.findElement(By.className(\"login\")).click();\r\n // Fill in the form\r\n driver.findElement(By.id(\"email\")).sendKeys(\"[email protected]\");\r\n driver.findElement(By.id(\"passwd\")).sendKeys(\"tester\");\r\n driver.findElement(By.id(\"SubmitLogin\")).click();\r\n // Assert if element is displayed\r\n // Assert if element is displayed\r\n Assert.assertTrue(driver.findElement(\r\n By.cssSelector(\"ul.myaccount_lnk_list\")).isDisplayed());\r\n }",
"@Test(description = \"Go to Login Page From Home Page Header\")\n @Issue(\"EZ-8885\")\n @Description(\"Check the Login button on Header Home Page\")\n void verifyLoginButtonOnMainPage() {\n HomePage homePage = new HomePage(BaseUrl.homePageBaseUrl());\n homePage.open().getHeaderButtonsSection()\n .getLoginAreaButton().clickOnLoginAreaButton(\"https://hotline.ua/login/\");\n\n assertThat(getBrowserConsoleErrors()).isFalse();\n }",
"public static void verifyLogOutPageTitleLeadsToLoginPage() {\n click(AMAZON_PAGE_TITLE);\n }",
"@Given(\"^user should open link$\")\r\n\tpublic void user_should_open_link() throws Throwable {\r\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n driver.manage().deleteAllCookies();\r\n\r\n driver.get(prop.getProperty(\"url\"));\r\n\r\n WebDriverWait wait = new WebDriverWait(driver,60);\r\n \t wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(prop.getProperty(\"Popup\"))));\r\n \t driver.findElement(By.xpath(prop.getProperty(\"Popup\"))).click();Thread.sleep(5000);\r\n\t}",
"public void VerifyHomepage(){\r\n\t\t//String username = getValue(Email);\r\n\t//\tString password = getValue(Password);\r\n\r\n\t//\tclass Local {};\r\n\t\t/*Reporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");*/\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\t//driver.findElement(locator_split(\"btn_privacyok\")).click();\r\n\t\tclick(locator_split(\"btn_privacyok\"));\r\n\t\t\t\r\n\t\t\t/*Reporter.log(\"PASS_MESSAGE:- My Account is clicked and user is logged in\");*/\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- User is not logged in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"@Given(\"^User is on Login Page$\")\n\tpublic void userIsOnLoginPage() throws Throwable {\n\t\tassertTrue(isElementPresent(driver, By.id(\"new_user\")));\n\t}",
"@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyManageviewLinks() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Functionalities of links present in Manage views page\");\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.ClickManageUserLink()\n\t\t.ManageViews()\t \t\t\t\t\t \t \t\t\t\t \t \t\t\n\t\t.ManageviewNavigationLinks();\t\t\t \t \t\t\n\n\t}",
"private void clickSignOn() {\n\t\tthis.clickElement(signon);\n\t}",
"@Given(\"User is on the login page\")\n\tpublic void user_is_on_the_login_page() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src\\\\test\\\\resources\\\\chromedriver.exe\");\n\t\tdriver=new ChromeDriver();\n\t\tdriver.get(\"https://10.232.237.143/TestMeApp/fetchcat.htm\");\n\t\tdriver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);\n\t\tdriver.manage().window().maximize();\n\t driver.findElement(By.id(\"details-button\")).click();\n\t\tdriver.findElement(By.id(\"proceed-link\")).click();\n\t}",
"public void ClickUserInformationPage() {\r\n\t\tuserinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"User Information\\\" button on the Birthdays page\");\r\n\t}",
"@Test\n public void positiveTest() {\n\n loginPage.setUsername(\"admin\");\n loginPage.setPassword(\"123\");\n loginPage.clickOnLogin();\n Assert.assertEquals(driver.getTitle(), \"Players\", \"Wrong title after login\");\n Assert.assertNotEquals(driver.getCurrentUrl(), LoginPage.URL_login, \"You are still on login page.\");\n }",
"public void clickToLogoutLink() {\n\t\twaitToElementClickable(driver,RegisterPageUI.LOGOUT_LINK);\n\t\tclickToElement(driver,RegisterPageUI.LOGOUT_LINK);\n\t}",
"public void User_login()\r\n\t{\n\t\tdriver.findElement(FB_Locators.Signin_Email).clear();\r\n\t\tdriver.findElement(FB_Locators.Signin_Email).sendKeys(username);\r\n\t\t\r\n\t\t//Script using element referral..\r\n\t\tWebElement Password_Element=driver.findElement(FB_Locators.Signin_password);\r\n\t\tPassword_Element.clear();\r\n\t\tPassword_Element.sendKeys(password);\r\n\t\t\r\n\t\t//Login button using webelemnet referral\r\n\t\tWebElement Login_btn_Element=driver.findElement(FB_Locators.Signin_btn);\r\n\t\tLogin_btn_Element.click();\r\n\t}",
"public void clickOnContinueAsGuestUserLink()\n \t{\n \t\tproductRequirementsPageLocators.continueAsGuestUserLIink.click();\n\n \t}",
"@And(\"is on login page\")\n\tpublic void is_on_login_page() {\n\t\tSystem.out.println(\"user on 1\");\n\t\tdriver.navigate().to(\"https://example.testproject.io/web/\");\n\n\t}",
"@Given(\"^User should logged in to URL$\")\n\tpublic void user_should_logged_in_to_URL() throws Throwable {\n\t\thomepage.clickloginifdisplayed();\n\t\twait.WaitForElement(loginpage.getLoginemail(), 60);\n\t\tloginpage.ValidLogin();\n\t}",
"public void clickAccountsLink()\n\t{\n \telementUtils.performElementClick(wbAccountsLink);\n\t}",
"@Given(\"^I am able to access the sign in page$\")\n public void i_am_able_to_access_the_sign_in_page() throws Throwable {\n bbcSite.bbcSignInPage().goToSignInPage();\n Assert.assertEquals(bbcSite.bbcSignInPage().getSignInPageURL(), bbcSite.getCurrentURL());\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 SignInPage selectSignInButtonFromNavBar() {\n \t new WebDriverWait (DRIVER, 5)\n \t .until (ExpectedConditions.presenceOfElementLocated(navigationBarSignInLinkLocator))\n \t .click();\n \t\n \t new WebDriverWait (DRIVER, 5).until(\n \t\t\t ExpectedConditions.stalenessOf(DRIVER.findElement(navigationBarSignInLinkLocator)));\n \t \n return new SignInPage(); \n }",
"public void clickSignInButton() {\r\n\t\tdriver.findElement(signInButton).click();\r\n\t}",
"public void clickOnPriorAuth() {\n\t\tscrollDown(element(\"link_priorAuth\"));\n\t\telement(\"link_priorAuth\").click();\n\t\tlogMessage(\"User clicks on Prior Authorizations on left navigation bar at Physician End\");\n\t}",
"@Test\n public void ValidLoginTest() throws Exception {\n openDemoSite(driver).typeAuthInfo(loginEmail, \"Temp1234%\").signInByClick();\n }",
"@Test\r\n\tpublic void TC_01_verifyRegistrationPage() {\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t}",
"@Test(priority = 0, groups = \"test\")\r\n\tpublic void TestLogin()\r\n\t{\r\n\t\t// Step-1] Login using adminX credentials.\r\n\t login.AdminXLogin();\r\n\t extent.log(LogStatus.INFO, \"LoggedIn successfully.\");\r\n\t wait.until(ExpectedConditions.elementToBeClickable(By.linkText(\"PRODUCT\")));\r\n\t // Step-2] Open Add scheme page.\r\n\t Ops.OpenAddScheme();\r\n\t \r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tString resetUrl = \"#activateacc;uid=\" + user.getRefId();\r\n\t\t\t\tWindow.open(resetUrl, \"Password Reset\", \"\");\r\n\t\t\t}",
"public void logInAcceptanceTestFounder() throws Exception {\n String acceptanceTestUserName = \"[email protected]\";\n String acceptanceTestPassword = \"qualityassurance\";\n //Log into Mentor Marketplace as our acceptance test user\n System.out.println(\"Logging in as test user\");\n driver.findElement(By.id(\"registrationButton\")).click();\n driver.findElement(By.id(\"session_key-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestUserName);\n driver.findElement(By.id(\"session_password-oauth2SAuthorizeForm\")).sendKeys(acceptanceTestPassword);\n driver.findElement(By.name(\"authorize\")).click();\n //Set up a wait to use while navigating between pages\n WebDriverWait wait = new WebDriverWait(driver, 10);\n //Wait for the page to load\n WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"founderProfile\")));\n }",
"public void irParaPaginaDeLogin (){\n\n click(By.className(btnLoginClass));\n }",
"@Test\n\tpublic void loginSuccessful() {\n\t\tHomePage.sign_in_label.click();\n\t\tLoginContainer.LogInUser(VALID_USER_NAME, VALID_USER_PASSWORD);\n\t\t\n\t\t// Wait for page to load\n\t\tWebDriverWait wait = new WebDriverWait(driver, 10);\n\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.className(\"links-container\")));\n\t\t\n\t\t//Check if proper page is loaded\n\t\tPageFactory.initElements(driver, LoginSuccessfulTest.class);\n\t\tAssert.assertEquals(linksContainer.getAttribute(\"title\"), \"Kasia suszczynska - My page\", \"Links container title\");\n\t}",
"@Test\n\tpublic void checkPageLoginFlow() {\n\t driver.findElement(By.cssSelector(\"a.login\")).click();\n\n\t // Click login again on Login Page\n\t driver.findElement(By.cssSelector(\"button.login-page-dialog-button\")).click();\n\t\t \n\t // Enter Username & PW\n\t String username = \"username\";\n\t String password = \"password\";\n\n\t // Select and enter text for username and password\n\t driver.findElement(By.id(\"1-email\")).click();\n\t driver.findElement(By.id(\"1-email\")).sendKeys(username);\n\t driver.findElement(By.name(\"password\")).click();\n\t driver.findElement(By.name(\"password\")).sendKeys(password);\n\n\t // Verify Username box displayed\n\t boolean usernameElement = driver.findElement(By.id(\"1-email\")).isDisplayed();\n\t \tAssert.assertTrue(usernameElement, \"Is Not Present, this is not expected\");\n\t \n\t // Verify Password box displayed\n\t boolean passwordElement = driver.findElement(By.name(\"password\")).isDisplayed();\n\t \tAssert.assertTrue(passwordElement, \"Is Not Present, this is not expected\");\n\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent=new Intent(getApplicationContext(),Login_Profile.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\t\n\t\t\t}",
"@Override\n\tpublic void goToLogin() {\n\t\t\n\t}",
"@Test\r\n\tpublic void test_2_SignIn() {\n\t\tdriver.findElement(By.cssSelector(\"#nav-link-accountList > span.nav-line-2\")).click();\r\n\t\tString signIn = driver.getTitle();\r\n\t\tAssert.assertEquals(signIn, \"Amazon Sign In\");\r\n\t\t// enter email\r\n\t\tdriver.findElement(By.id(\"ap_email\")).sendKeys(email);\r\n\t\t// enter password\r\n\t\tdriver.findElement(By.id(\"ap_password\")).sendKeys(password);\r\n\t\t// click on submit\r\n\t\tdriver.findElement(By.id(\"signInSubmit\")).click();\r\n\t\tSystem.out.println(\"Sign in is successful\");\r\n\t}",
"@Test\n\tpublic void verifyBackToLoginButtonInForgetPasswordPageAndItsNavigation() throws Exception{\n\t\tLoginOtomotoProfiLMSPage loginPage = new LoginOtomotoProfiLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.languageDropdown);\n\t\tactionClick(driver,loginPage.languageDropdown);\n\t\twaitTill(1000);\n\t\tactionClick(driver,loginPage.englishOptioninLangDropdown);\n\t\tFogrotPasswordOTMPLMSPage forgotPasswordPageObj = new FogrotPasswordOTMPLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.forgotPasswordLink);\n\t\ttry {\n\t\tclick(loginPage.forgotPasswordLink);\n\t\t}catch (Exception e) {\n\t\t\tjsClick(driver,loginPage.forgotPasswordLink);\n\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordPageHeading);\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\tAssert.assertTrue(verifyElementPresent(forgotPasswordPageObj.forgotPasswordLoginPageLink), \"Back to login link isn't present in forgot password page\");\n\t\ttry {\n\t\t\tclick(forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\t\t}catch (Exception e) {\n\t\t\t\tjsClick(driver,forgotPasswordPageObj.forgotPasswordLoginPageLink);\n\t\t\t}\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.emailTextField);\n\t\twaitTill(1000);\n\t\tAssert.assertTrue(verifyElementPresent(loginPage.emailTextField), \"User isn't landing on login page on clicking back to login button from forgot password page\");\n\t}",
"public void clickOnEasyPeasyFormsLogoOnSignUpPage() throws Exception {\n\t\tsuper.waitAndClickElement(Logo_EasyPeasyForms_SignUp_Page);\n\t}",
"@When(\"^the user open the Parabank Registration page$\")\r\n\tpublic void the_user_open_the_Parabank_Registration_page() throws Throwable {\n\t getUrl();\r\n\t}",
"public AccountPage Signup_through_loginpage() {\n\tJavascriptExecutor js = (JavascriptExecutor)driver;\n\tjs.executeScript( \"arguments[0].click();\", SignUpButton );\n\tsignupPage.SignUp_Form();\n\treturn new AccountPage();\n\t}",
"@Test\n\tpublic void checkLoginPage() {\n\n\t\t// Locate the logo on the page\n\t\tWebElement logo = driver.findElement(By.xpath(\"(//a/img)[1]\"));\n\t\tString logoSrc = logo.getAttribute(\"src\");\n\n\t\t// Locate the heading of the page\n\t\tString heading = driver.findElement(By.className(\"auth-header\"))\n\t\t\t\t.getText();\n\n\t\t// Locate the Username related fields\n\t\tString usernameLabel = driver.findElement(By.xpath(\"(//label)[1]\"))\n\t\t\t\t.getText();\n\t\tWebElement usernameIcon = driver\n\t\t\t\t.findElement(By.className(\"os-icon-user-male-circle\"));\n\t\tWebElement usernameTextField = driver.findElement(By.id(\"username\"));\n\t\tString placeholderText = usernameTextField.getAttribute(\"placeholder\");\n\n\t\t// Locate the Password related fields\n\t\tString passwordLabel = driver.findElement(By.xpath(\"(//label)[2]\"))\n\t\t\t\t.getText();\n\t\tWebElement passwordIcon = driver\n\t\t\t\t.findElement(By.className(\"os-icon-fingerprint\"));\n\t\tWebElement passwordTextField = driver.findElement(By.id(\"password\"));\n\t\tString placeholderPassword = passwordTextField\n\t\t\t\t.getAttribute(\"placeholder\");\n\n\t\t// Locate the Sign in button\n\t\tWebElement signInButton = driver.findElement(By.id(\"log-in\"));\n\t\tString signInButtonText = signInButton.getText();\n\n\t\t// Locate the Remember me checkbox and label\n\t\tWebElement rememberMeCheckbox = driver\n\t\t\t\t.findElement(By.className(\"form-check-input\"));\n\t\tString rememberMeText = driver\n\t\t\t\t.findElement(By.className(\"form-check-label\")).getText();\n\n\t\t// Locate the social media icons\n\t\tWebElement twitterIcon = driver.findElement(By.xpath(\"(//a/img)[2]\"));\n\t\tString twitterSrc = twitterIcon.getAttribute(\"src\");\n\n\t\tWebElement facebookIcon = driver.findElement(By.xpath(\"(//a/img)[3]\"));\n\t\tString facebookSrc = facebookIcon.getAttribute(\"src\");\n\n\t\tWebElement linkedInIcon = driver.findElement(By.xpath(\"(//a/img)[4]\"));\n\t\tString linkedInSrc = linkedInIcon.getAttribute(\"src\");\n\n\t\t// Assert that the logo is displayed\n\t\tAssert.assertTrue(logo.isDisplayed());\n\t\tAssert.assertEquals(logoSrc,\n\t\t\t\t\"https://demo.applitools.com/img/logo-big.png\");\n\n\t\t// Add assertions for all elements displayed on the Login for,\n\t\tAssert.assertEquals(heading, \"Login Form\");\n\t\tAssert.assertEquals(usernameLabel, \"Username\");\n\t\tAssert.assertTrue(usernameIcon.isDisplayed());\n\t\tAssert.assertTrue(usernameTextField.isDisplayed());\n\t\tAssert.assertEquals(placeholderText, \"Enter your username\");\n\n\t\tAssert.assertEquals(passwordLabel, \"Password\");\n\t\tAssert.assertTrue(passwordIcon.isDisplayed());\n\t\tAssert.assertTrue(passwordTextField.isDisplayed());\n\t\tAssert.assertEquals(placeholderPassword, \"Enter your password\");\n\n\t\tAssert.assertTrue(signInButton.isDisplayed());\n\t\tAssert.assertEquals(signInButtonText, \"Log In\");\n\n\t\tAssert.assertTrue(rememberMeCheckbox.isDisplayed());\n\t\tAssert.assertFalse(rememberMeCheckbox.isSelected());\n\t\tAssert.assertEquals(rememberMeText, \"Remember Me\");\n\n\t\tAssert.assertTrue(twitterIcon.isDisplayed());\n\t\tAssert.assertEquals(twitterSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/twitter.png\");\n\n\t\tAssert.assertTrue(facebookIcon.isDisplayed());\n\t\tAssert.assertEquals(facebookSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/facebook.png\");\n\n\t\tAssert.assertTrue(linkedInIcon.isDisplayed());\n\t\tAssert.assertEquals(linkedInSrc,\n\t\t\t\t\"https://demo.applitools.com/img/social-icons/linkedin.png\");\n\t}",
"@Test\n public void testAccessUserSearch() {\n try {\n driver.findElement(By.id(\"nav-users\")).click();\n wait(3);\n assertEquals(\"http://stackoverflow.com/users\", driver.getCurrentUrl());\n }\n catch(NoSuchElementException nsee) {\n fail();\n }\n }",
"private void checkToSignup() {\n toolbar.setTitle(R.string.about);\n Intent intent = new Intent(this, SigninActivity.class);\n startActivityForResult(intent, ConstantValue.SIGN_UP_CODE);\n }",
"@Test(enabled = true, priority = 8)\n\tpublic void loginButtonTest03() {\n\t\tdriver.findElement(By.cssSelector(\"#cms-login-submit\")).click();\n\n\t}",
"public void ClickLogin()\n\t{\n\t\t\n\t\tbtnLogin.submit();\n\t}",
"public void clickSaveChangesButton() {\n\t\tlog.info(\"Verifying the login button is available or not\");\n\t\tAssert.assertTrue(clickSaveChangesButton.isDisplayed());\n\t\tclickSaveChangesButton.click();\n\t}",
"@Test(priority=18)\n\tpublic void verifyProfileAndLogoutOptionsByClickingProfileIconOnHeader() throws Exception {\n\t\tOverviewTradusPROPage overviewPage= new OverviewTradusPROPage(driver);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.profileIconOnHeader);\n\t click(overviewPage.profileIconOnHeader);\n\t waitTill(2000);\n\t Assert.assertTrue(getText(overviewPage.profileOptionInProfileIconDropdown).equals(\"Profile\"),\n\t\t\t\t\"Profile option is not displaying in dropdown by clicking on profile icon\");\n\t Assert.assertTrue(getText(overviewPage.logoutOptionInProfileIconDropdown).equals(\"Log out\"),\n\t\t\t\t\"Logout option is not displaying in dropdown by clicking on profile icon\");\n\t}",
"@Test\n\tpublic void Test_Access1() throws Exception {\n\t\t\n\t\tfinal HtmlForm form = (HtmlForm) page.getElementById(\"signInForm1\");\n\t\t\n\t\tform.getInputByName(\"username\").setValueAttribute(\"jb\");\t// Correct Login Data\n\t\tform.getInputByName(\"password\").setValueAttribute(\"jb\");\n\t\t\n\t\tpage = form.getInputByName(\"submit\").click();\n\t\t\n\t\tassertNotSame(\"Fab Lab - Anmelden\", page.getTitleText());\t// Not the login page anymore\n\t\tassertEquals(\"Fab Lab - BasePage\", page.getTitleText());\n\t}",
"@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyGlobalNavigationLinks()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Gas Page Navigation Links\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"GloabalSMRGas\");\n\t\tnew SubmitMeterReadAction()\n\t\t.BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .BgbverifyAfterLogin()\n\t .clickSubmitMeterReadLink()\t\n\t\t.verifyGlobalNavigationLink();\n}"
]
| [
"0.7655095",
"0.7378497",
"0.7042001",
"0.70154154",
"0.6954829",
"0.6876155",
"0.6855366",
"0.681556",
"0.67777187",
"0.6777715",
"0.6775256",
"0.67673874",
"0.67104614",
"0.6630756",
"0.6630093",
"0.6581292",
"0.6574106",
"0.6410288",
"0.6399263",
"0.6392292",
"0.6388109",
"0.63837",
"0.637419",
"0.6369387",
"0.6365323",
"0.63590497",
"0.634826",
"0.6334922",
"0.6321326",
"0.6299717",
"0.6296269",
"0.6292114",
"0.6290515",
"0.6287954",
"0.6287139",
"0.628492",
"0.6278144",
"0.6270057",
"0.62606406",
"0.6224824",
"0.6205839",
"0.6205311",
"0.6195269",
"0.61922204",
"0.6179042",
"0.6178104",
"0.61760044",
"0.61634",
"0.61616874",
"0.61529803",
"0.6151891",
"0.615079",
"0.6144582",
"0.6142987",
"0.6113627",
"0.6100224",
"0.60997844",
"0.6085509",
"0.60817426",
"0.60795945",
"0.60774106",
"0.6064697",
"0.6057314",
"0.60533756",
"0.6025109",
"0.60235953",
"0.60218185",
"0.6010165",
"0.6003875",
"0.5995746",
"0.5994391",
"0.59929097",
"0.5989091",
"0.5984306",
"0.59834856",
"0.59819865",
"0.5981619",
"0.5980942",
"0.5975992",
"0.59731686",
"0.5969124",
"0.5965732",
"0.59605",
"0.59567624",
"0.5951897",
"0.5937256",
"0.59328616",
"0.5930313",
"0.5926212",
"0.5918047",
"0.59174114",
"0.59173155",
"0.59009624",
"0.58970416",
"0.5896545",
"0.58951735",
"0.58927256",
"0.5891003",
"0.5888146",
"0.5875626",
"0.58738655"
]
| 0.0 | -1 |
Verify the HHS Footer Link in LoginPage. | public void verifyHhsLink() {
dhhsFooterLink.assertState().enabled();
dhhsFooterLink.assertContains().text("Department of Health & Human Services");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void verifyCmsLink() {\n cmsFooterLink.assertState().enabled();\n cmsFooterLink.assertContains().text(\"CMS\");\n }",
"public void verifyLogoutPageDisplayed() {\n\t\twaitForPageLoaded();\n\t\t_normalWait(1000);\n\t\tassertByPageTitle(Constants.pageTitle_LoggedoutPage);\n\t}",
"public void verifyAccessibilityLink() {\n accessibilityFooterLink.assertState().enabled();\n accessibilityFooterLink.assertContains().text(\"Accessibility\");\n }",
"public void waitMainLinksInFooter(final String lnk) {\n\n (new WebDriverWait(driver(), 10)).until(new ExpectedCondition<Boolean>() {\n @Override\n public Boolean apply(WebDriver d) {\n List<WebElement> elements = driver().findElements(By.xpath(Locators.FOOTER_ELEMENTS));\n String resultStr = \"\";\n StringBuilder strBuild = new StringBuilder();\n for (WebElement element : elements) {\n strBuild = strBuild.append(element.getText() + \" \");\n }\n\n return strBuild.toString().contains(lnk);\n\n }\n });\n\n }",
"public static void verifyLogOutPageTitleLeadsToLoginPage() {\n click(AMAZON_PAGE_TITLE);\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 validateFooters() {\n\t}",
"public void userIsOnHomePage(){\n\n assertURL(\"\\\"https://demo.nopcommerce.com/\\\" \");\n }",
"@Test(description = \"Go to Login Page From Home Page Header\")\n @Issue(\"EZ-8885\")\n @Description(\"Check the Login button on Header Home Page\")\n void verifyLoginButtonOnMainPage() {\n HomePage homePage = new HomePage(BaseUrl.homePageBaseUrl());\n homePage.open().getHeaderButtonsSection()\n .getLoginAreaButton().clickOnLoginAreaButton(\"https://hotline.ua/login/\");\n\n assertThat(getBrowserConsoleErrors()).isFalse();\n }",
"@Override\n public boolean isFooterDisplayed() {\n\n setLogString(\"Check footer is not displayed\", true, CustomLogLevel.HIGH);\n return isNotDisplayed(getDriver(), By.className(FOOTER_CONTAINER), TINY_TIMEOUT);\n }",
"@Test(priority = 1)\n\tprotected void landingpageVerification() {\n\t\tAssert.assertEquals(spincoLandingPage.isLogoDisplayed(),true);\n\t\tspincoLandingPage.clickLoginRegister();\n\t}",
"public void verifyUserIsOnHomepage()\n {\n asserttextmessage(getTextFromElement(_welcomeTileText),expected,\"user on home page\");\n\n }",
"public void clickOnEmailLink1InFooter() {\n\t By element =By.xpath(\"//a[text()='CE at VIN' ]\");\n\t scrollIntoView(element);\n\t _normalWait(3000);\n\t waitAndClick(emailLink1InFooter);\n\t }",
"@Test\n\tpublic void verifycustomerSupportlink() {\n\t\tKeywords.clickOnElement(PropertiesFile.getLocator(\"Spportlink\")[0],PropertiesFile.getLocator(\"Spportlink\")[1]);\n\t\tSystem.out.println(\"24*7 goCare Support link is Displayed on Header\");\n\t\tConstants.driver.manage().timeouts().implicitlyWait(60,TimeUnit.SECONDS) ;\n\t\tKeywords.terminateBrowser();\n\n\t}",
"public boolean verifyHomePageDisplayed(){\r\n\t\tWebDriver driver = SeleniumDriver.getInstance().getWebDriver();\r\n\t\tWebElement body;\r\n\t\ttry{\r\n\t\t\tbody = driver.findElement(By.tagName(\"body\"));\r\n\t\t\tif(body.getAttribute(\"class\").contains(\"home page\")){\r\n\t\t\t\tmyAssert.setGblPassFailMessage(\"pass\", \"UpTake home page is displayed\");\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tmyAssert.setGblPassFailMessage(\"fail\", \"UpTake home page is not displayed\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t return true;\r\n\t}",
"@Override\r\n\tpublic boolean checkLogout() {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean checkLogout() {\n\t\treturn false;\r\n\t}",
"public void checkOtherFooterLinks(String linkText,String url,String finder,String pageText){\n\t\tWebElement labelLink = driver.findElement(By.xpath(linkText));\n\t\tlabelLink.click();\n\t\tassertTrue(driver.getCurrentUrl().equals(url), \"Page is missing\");\n\t\t\n\t\tif(driver.getCurrentUrl().equals(url)){\n\t\t\tWebElement text = driver.findElement(By.xpath(finder));\n\t\t\tString ideaPageText = text.getText();\n\t\t\tassertEquals(ideaPageText,pageText,\"Text mismatch\");\n\t\t\t}\n\t\tdriver.navigate().back();\n\t\t}",
"@Then(\"^homepage is visible$\")\n\tpublic void homepage_is_visible() throws Throwable {\n\t\tString verify = driver.findElement(By.xpath(\"//marquee[@class='heading3']\")).getText();\n\t\tAssert.assertEquals(verify, \"Welcome To Customer's Page of Guru99 Bank\", \"Error in loading!\");\n\t}",
"public void clickOnEmailLink2InFooter() {\n\t\t_normalWait(2000);\n\t\twaitAndClick(emailLink2InFooter);\n\t }",
"public void verifyOnDashboardPage() {\n verifyUserLoggedIn.waitForState().enabled(30);\n verifyUserLoggedIn.assertContains().text(\"Dev Links\");\n }",
"public void clickToLogoutLink() {\n\t\twaitToElementClickable(driver,RegisterPageUI.LOGOUT_LINK);\n\t\tclickToElement(driver,RegisterPageUI.LOGOUT_LINK);\n\t}",
"@Test\r\n\tpublic void TC_01_verifyRegistrationPage() {\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t}",
"void Footer() {\n\t\tJPanel panel = new JPanel(new FlowLayout());\r\n\t\tpanel.add(btnLogin);\r\n\t\tpanel.add(btnReset);\r\n\t\t\r\n\t\tadd(panel, BorderLayout.SOUTH);\r\n\t\t\r\n\t\t//Action Listener untuk melakukan action pindah halaman\r\n\t\tbtnLogin.addActionListener(this);\r\n\t\tbtnReset.addActionListener(this);\r\n\t}",
"private void checkToLogout() {\n logout();\n checkToHome();\n drawViewSideMenu();\n }",
"public abstract boolean Verifypage();",
"public void redirectToHomePageNotLoggedIn() {\r\n\t\t\r\n\t\twebAppDriver.get(baseUrl);//+\"?optimizely_x8236533790=0\"\r\n\t\t/*try {\r\n\t\t\twebAppDriver.verifyElementTextContains(By.id(linkLogoutId), \"Logout\", true);\r\n\t\t\tloginAction.clickOnLogOut();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// this is just to do logout if customer is auto logged in during\r\n\t\t\t// reservation\r\n\t\t}\r\n\t\t*/\r\n\t}",
"public boolean hasFooter() {\n return hasFooter;\n }",
"public void verifyRegisterLink() {\n registerLink.assertState().enabled();\n registerLink.assertContains().text(\"Register\");\n }",
"private boolean isValidLoginResponse(Response response) {\n\t\treturn response.header(\"Location\").toLowerCase().contains(\"testsession\");\r\n\t}",
"public static void printFooter(String anyValidName){\n System.out.println(\"\\n*** \" + anyValidName+ \" ***\");\n }",
"public void onFooterRefresing();",
"@AfterTest\n\t\tpublic void logout(){\n//Calling method to logout from the account and verify logout message.\n//'**********************************************************\n\t\t\tLogOutPage accountLogoutPage =myWishlistPage.logout();\n\t\t\tAssert.assertTrue(accountLogoutPage.getlogoutMsg().equals(\"Account Logout\"), \"Account Logout message is not displayed\");\n\t\t\textentTest.log(LogStatus.PASS,\"Account Logout message is displayed and the user is signed out from the account\");\n//'**********************************************************\n//Close the report\n//'**********************************************************\n\t\t\textentReports.endTest(extentTest);\n\t\t\textentReports.flush();\n\t\t\textentReports.close();\n\t\t}",
"public void VerifyHomepage(){\r\n\t\t//String username = getValue(Email);\r\n\t//\tString password = getValue(Password);\r\n\r\n\t//\tclass Local {};\r\n\t\t/*Reporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");*/\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\t//driver.findElement(locator_split(\"btn_privacyok\")).click();\r\n\t\tclick(locator_split(\"btn_privacyok\"));\r\n\t\t\t\r\n\t\t\t/*Reporter.log(\"PASS_MESSAGE:- My Account is clicked and user is logged in\");*/\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- User is not logged in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"@Then(\"^user check is logged in$\")\n public void check_user_logged(){\n log.info(\"try to check if user is logged in\");\n String linkSignOut = pageLogin.getLinkSignOut().getText();\n Assert.assertTrue(linkSignOut.equals(\"Sign out\"), \"There is no visible link sign out\");\n String linkUserName = pageLogin.getLinkUserFullname().getText();\n Assert.assertTrue(linkUserName.equals(\"Antoni Giez\"));\n log.info(\"user is logged in, username - \" + linkUserName);\n }",
"public void verifyForgotPwdLink() {\n forgotPasswordLink.assertState().enabled();\n forgotPasswordLink.assertContains().text(\"Forgot your password?\");\n }",
"public void Verify_Page_Header_Visibility()\r\n\t{\r\n\t\t if(Page_header.isDisplayed())\r\n\t\t\t System.out.println(\"header visible at webpage\");\r\n\t\t else\r\n\t\t\t System.out.println(\"header not visible at webpage\");\r\n\t\t\r\n\t}",
"@Test\n public void check_Login_Success() {\n lPage = new LoginPage(webDriver);\n lPage.login(\"admin\",\"admin\");\n hPage = new HomePage(webDriver);\n String loginText = hPage.getHomePageText();\n assertEquals(\"Congratulations!\",loginText);\n }",
"public void Verify_Expected_Header_Visibility()\r\n\t{\r\n\t\tString Runtime_Header_text=Page_header.getText();\r\n\t\tif(Runtime_Header_text.equals(Exp_page_header))\r\n\t\t\tSystem.out.println(\"Expected Header visible at webpage\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Expected Header not visible at webpage\");\r\n\t}",
"@Test(priority = 28)\r\n\tpublic void removalUserLinkCheck() {\r\n\tAssert.assertEquals(mainPage.removalUserLinkCheck(), true);\r\n\t}",
"public void verifyForgotLinkModalWindow() {\n modalWindow.assertState().enabled();\n modalWindow.assertContains().text(\"warningLeaving the PECOS Website\");\n }",
"public void waitForVerifyHhsPage() {\n verifyHHSPageElement.waitForState().enabled(30);\n }",
"@When(\"^user should signout to exit from the loggedin page$\")\n\tpublic void user_should_signout_to_exit_from_the_loggedin_page() throws Throwable {\n\t\telementClick(pa.getAp().getLogout());\n\t\t\n\t \n\t}",
"public void waitMainFooterLinks() {\n for (String footerLink : footerLinks) {\n waitMainLinksInFooter(footerLink);\n }\n }",
"public void angelHomePage()\r\n\t{\r\n\t\tResultUtil.report(\"INFO\", \"AngelHomePage > angelHomePage\", driver);\r\n\t\tswitchFrameToAngelContent();\r\n\t\tif(Element.verify(\"Logged in Message\", driver, \"XPATH\", \"//span[@class='pageTitleSpan' and text()='Home']\"))\r\n\t\t{\r\n\t\t\tResultUtil.report(\"PASS\", \"Successfully logged in\", driver);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tResultUtil.report(\"FAIL\", \"Login failed\", driver);\r\n\t\t}\t\t\r\n\t}",
"@Given(\"^Registered user is on the main page of website$\")\n public void registeredUserIsOnTheMainPageOfWebsite() {\n }",
"public void verify_WelcomePopupandclick(){\n\t\tif(isDisplayedWithoutException(welcomePopup)){\n\t\t\tclick(welcomePopup);\n\t\t\tSystem.out.println(\"the Welcome popup is visible on the page and clicked done\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"The Welcome popup is not present on the page\");\n\t\t}\n\t}",
"@Then(\"^User should see home page with profile link$\")\n\tpublic void user_should_see_home_page_with_profile_link() throws Throwable {\n\t\twait.WaitForElement(profilepage.getywalletlink(), 60);\n\t\tprofilepage.verifyloginsuccess();\n\t\tThread.sleep(100);\n\t}",
"public static FooterMyAccountPage getFooterMyAccountPage(WebDriver driver) {\n\t\treturn null;\r\n\t}",
"public void v_Verify_Guest12_Displayed(){\n\t}",
"public void isRedirectionCorrect() {\n\n\t\tString title = WebUtility.getTitle();\n\t\tAssert.assertEquals(title, data.getValidatingData(\"homepage_Title\"));\n\t\tSystem.out.println(\"Redirection is on the correct page\");\n\t}",
"boolean hasHasInstitutionHomePage();",
"@Test\n public void verifyTitleOfHomePageTest()\n {\n\t \n\t String abc=homepage.validateHomePageTitle();\n\t Assert.assertEquals(\"THIS IS DEMO SITE FOR \",abc );\n }",
"@Test(priority=0)\n\tpublic void verifyOverviewPageAfterLoginToAccount() throws Exception {\n\t\tLoginTradusPROPage loginPage= new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(testUser,pwd);\n\t\tclick(loginPage.LoginButton);\n\t\twaitTill(3000);\n\t explicitWaitFortheElementTobeVisible(driver,loginPage.overviewPageVerificationElement);\n\t waitTill(7000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms\"),\n\t \t\t\"Overview page is not displaying after login to account\");\n\t}",
"@Then(\"^check the heading of the page$\")\r\n\tpublic void check_the_heading_of_the_page() throws Exception {\n\t\tString heading=driver.findElement(By.xpath(\".//*[@id='mainCnt']/div[1]/div[1]/h1\")).getText();\r\n\t\tif(heading.contentEquals(\"Hotel Booking Application\")) {\r\n\t\t\tSystem.out.println(\"content matched\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"content not matched\");\r\n\t\t}\r\n\t\tThread.sleep(2000);\r\n\t//\tdriver.close();\r\n\t}",
"@Then(\"Admin homepage should be loaded successfully\")\r\npublic void admin_homepage_should_be_loaded_successfully() {\n\r\n\tboolean isloginsuccess=uAdminlogin.isHeaderFound();\r\n\tAssert.assertEquals(isloginsuccess, true);\r\n\t\r\n}",
"public void verifyPage() {\n\t\twaitForPageToLoad();\n\t\tString title = driver.getTitle();\n\t\tSystem.out.println(title);\n\t\tAssert.assertEquals(title,\"News: India News, Latest Bollywood News, Sports News, Business & Political News, National & International News | Times of India\");\n\t}",
"@Test\n public void checkLoginAndLogout() {\n mInjector.authentication()\n .authenticateValidUser(USERNAME, PASSWORD)\n .checkMainScreenIsDisplayed(); // Then the main screen appears\n\n mInjector.navigationDrawer()\n .logoutUser(USERNAME) // When the user logs out\n .checkAuthScreenIsDisplayed();\n }",
"@Then(\"I want to login successfully\")\n\tpublic void output() {\n\t\tact.gethomepage().verifyLoggedUser();\n\n\t\t//String username = linkWelcome.getText();\n\t\t//String login = \"Welcome Admin\";\n\t\t//if (username.equals(login)) {\n\t\t\t//System.out.println(\"User name is correct\");\n\t\t//} else {\n\t\t\t//System.out.println(\"Username is not correct\");\n\n\t\t}",
"public boolean isFooter() {\n return isFooter;\n }",
"@Test\n public void testLogout() {\n assertEquals(SAMPLE_ID, navigationBean.getSessionUser().getUserID());\n assertEquals(\"/facelets/open/index.xhtml?faces-redirect=true\", navigationBean.logout());\n assertEquals(0, navigationBean.getSessionUser().getUserID());\n }",
"@Test\n public void signinvalidation() {\n\t SalesApplicationPage spg = new SalesApplicationPage(driver);\n if(spg.getPopUpSize()>0)\n\t {\n\t\t spg.getPopUp().click();\n\t }\n System.out.println(driver.getTitle());\n Assert.assertTrue(driver.getTitle().equals(\"Home | Salesforrrce\"));\n }",
"@Test(priority=26)\n\tpublic void verifyLoginPageByClickingOnLogoutOptionInDropdown() throws Exception {\n\t\tOverviewTradusPROPage overviewPage= new OverviewTradusPROPage(driver);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.profileIconOnHeader);\n\t click(overviewPage.profileIconOnHeader);\n\t waitTill(1000);\n\t click(overviewPage.logoutOptionInProfileIconDropdown);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.LoginText);\n\t waitTill(1000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/login\"),\n\t \t\t\"Login Page is not displaying by cicking on logout option in dropdown\");\n\t}",
"public void v_Verify_Guest7_Displayed(){\n\t}",
"private void testFinished() {\n\t\t\tLoginPage.logout(driver());\n\t\t}",
"@Given(\"^User is on netbanking landing page$\")\r\n public void user_is_on_netbanking_landing_page() throws Throwable {\n System.out.println(\"Navigated to Login URL\");\r\n }",
"public void v_Verify_Guest6_Displayed(){\n\t}",
"public void clicklogoutiflogin(String welcome){\r\n\t\tString welcomemess = getValue(welcome);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Logout Button should be clicked if its logged in\");\r\n\t\ttry{\r\n\t\t\tif(getAndVerifyPartialText(locator_split(\"Regwelcomemsg\"),welcomemess)) { \r\n\t\t\t\twaitForElement(locator_split(\"Pancakemenu\"));\r\n\t\t\t\tclick(locator_split(\"Pancakemenu\"));\r\n\t\t\t\twaitForElement(locator_split(\"Logoutbutton\"));\r\n\t\t\t\tclick(locator_split(\"Logoutbutton\"));\r\n\t\t\t\tclick(locator_split(\"Logoutuser\"));\r\n\t\t\t\twaitForPageToLoad(1000);\r\n\t\t\t\twaitForElement(locator_split(\"Pancakemenu\"));\r\n\t\t\t\tSystem.out.println(\"User has been logged out\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- User has been logged out\");\r\n\t\t\t}else{\t\r\n\t\t\t\tSystem.out.println(\"User is not logged in\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- User is not logged in\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Logout button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"Logoutbutton\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"public void setPageFooter(String footer)\n {\n // ignore\n }",
"boolean hasLoginResponse();",
"protected String getPageFooter()\n {\n if (this.pageFooter == null) {\n String copyright = (this.privateLabel != null)? this.privateLabel.getCopyright() : \"\";\n StringBuffer sb = new StringBuffer();\n sb.append(\"<center>\");\n sb.append(\"<hr><span style='font-size:7pt;'>\" + copyright + \"</span>\");\n sb.append(\"</center>\");\n this.pageFooter = sb.toString();\n }\n return this.pageFooter;\n }",
"@Test(priority = 4)\n\tpublic void homePageRedirection() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"HomepageRedirection\");\n\t\tlog.info(\"Starting Redirection validation\");\n\t\thome.isRedirectionCorrect(validate);\n\t\tlog.info(\"Redirection is on the correct page\");\n\t\tlog.info(\"Starting the Hero Image Product Validation testing\");\n\n\t}",
"public boolean verifyAccountInquiryPage(){\n\t\tboolean isAccountInquiryPagePresent=false;\n\t\tSeleniumUtil.switchToFrame(driver, \"DialogBox_Frame\");\n\t\tString text = SeleniumUtil.getElementWithFluentWait(accountInquiryTitle).getText();\n\t\tSystem.out.println(text);\n\t\tif(text.equalsIgnoreCase(\" Financial Inquiry\")){\n\t\t\tSystem.out.println(\"Account Inquiry Page is opened\");\n\t\t\tSeleniumUtil.getElementWithFluentWait(accountInquiryTitle).sendKeys(Keys.ESCAPE);\n\t\t\tisAccountInquiryPagePresent=true;\n\t\t}\n\t\treturn isAccountInquiryPagePresent;\n\t}",
"private org.gwtbootstrap3.client.ui.PanelFooter get_f_PanelFooter36() {\n return build_f_PanelFooter36();\n }",
"@Given(\"^The user is in the login page$\")\n\tpublic void the_user_is_in_the_login_page() throws Throwable {\n\t\tChrome_Driver();\n\t\tlpw =new Login_Page_WebElements();\n\t\tlpw.open_orange_hrm();\n\t}",
"public void verifySessionOneHeading(){\r\n String actualSessionHeading = driver.findElement(By.xpath(sessionHeadingXpathLocator)).getText();\r\n Assert.assertTrue(actualSessionHeading.contains(expectedSessionHeading),\"Session Heading is present.\");\r\n }",
"public void verifyLabelSuccessfulLogin() throws IOException {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"Verifying if Label is available or not\");\n\t\t//JavaScriptExec.sleep();\n\t\tAssert.assertTrue(verifyLabelSuccessfulLogin.getText().contains(BasePage.getCellData(xlsxName, sheetName, 3, 0)),\n\t\t\t\t\"Assert Failed as its unable to search text in Logged in Page\");\n\t}",
"private void logoutHandler() {\n AlertDialog.Builder builder = new AlertDialog.Builder(context, android.R.style.Theme_DeviceDefault_Dialog);\n builder.setTitle(\"Logout?\");\n builder.setMessage(\"Are you sure you want to logout?\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n Util.setLoggedInFlag(false);\n\n HPIApp.getAppContext().stopService(new Intent(HPIApp.getAppContext(), StepService.class));\n\n Intent intent = new Intent(HomeActivity.this, SplashActivity.class);\n startActivity(intent);\n HomeActivity.this.finish();\n }\n });\n\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n\n builder.show();\n }",
"@Then(\"^Homepage is populated$\")\r\n public void homepage_is_populated() throws Throwable {\n \tSystem.out.println(\"Validated HomePage\");\r\n \r\n }",
"public void verifyRegisterForNPILink() {\n npiLink.assertState().enabled();\n npiLink.assertContains().text(\"register for a National Provider Identifier (NPI)\");\n }",
"public void verifyLearnMoreLink() {\n learnMoreLink.assertState().enabled();\n learnMoreLink.assertContains().text(\"Learn more about registering for an account.\");\n }",
"public void onFooterRefreshComplete() {\n onFooterRefreshComplete(true);\n }",
"public LandingPage doCheckHeaderMenu() {\n if (EXPECTED_HEADER.length != HEADER_MENU.size()) {\n System.out.println(\"Not all headers were found on the page\");\n }\n for (int i = 0; i < HEADER_MENU.toArray().length; i++) {\n HEADER_MENU.get(i).click();\n final String headerName = HEADER_MENU.get(i).getText();\n if (headerName.equals(EXPECTED_HEADER[i])) {\n // exit\n } else {\n // exit\n }\n }\n return this;\n }",
"public void v_Verify_Guest4_Displayed(){\n\t}",
"public final void entryRuleCheckContainsLink() throws RecognitionException {\n try {\n // InternalBrowser.g:704:1: ( ruleCheckContainsLink EOF )\n // InternalBrowser.g:705:1: ruleCheckContainsLink EOF\n {\n before(grammarAccess.getCheckContainsLinkRule()); \n pushFollow(FOLLOW_1);\n ruleCheckContainsLink();\n\n state._fsp--;\n\n after(grammarAccess.getCheckContainsLinkRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"public void v_Verify_Guest8_Displayed(){\n\t}",
"boolean hasLoginapifailhitcount();",
"boolean hasLoginapisuccessfulhitcount();",
"public void v_Verify_Guest5_Displayed(){\n\t}",
"@Override\n\tpublic void onModuleLoad() {\n\t\tButton loginButton = new Button(\"Einloggen\");\n\t\tloginButton.addStyleName(\"loginlogoutButton\");\n\t\tloginButton.addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tWindow.Location.assign(loginurl);\n\t\t\t}\n\n\t\t});\n\t\tsignInLink.getElement().setClassName(\"login-area\");\n\t\tsignInLink.setTitle(\"sign out\");\n\t\tloginImage.getElement().setClassName(\"login-image\");\n\t\tloginPanel.add(loginButton);\n\t\tHTML starttext = new HTML(\"<h2>Willkommen bei Hakuna Contacta</h2><div id=\\\"startlogin\\\">So funktionierts:<br>1. Kontakte ausw\\u00E4hlen<br>2. Exportfelder ausw\\u00E4hlen<br>3. Download der Exportdatei<br>(4. Als Quelldatei f\\u00FCr Word Serienbrief verwenden)</div><div id=\\\"gcontacts2word\\\"><img src=\\\"images/gcontacts2word.png\\\"><p class=\\\"whitetext\\\">Exportformate - CSV (Word-Serienbrief), CSV (Komma getrennt), vCARD, xCard (XML) </p></div><div id=\\\"arrow1\\\"><img src=\\\"images/arrow1.png\\\"/></div>\");\n\t\tRootPanel.get(\"content\").add(starttext);\n\n\t\tRootPanel.get(\"loginPanelContainer\").add(loginPanel);\n\t\tRootPanel.get(\"footer\").clear();\n\t\tHTML footerimage = new HTML(\"<img src=\\\"images/1.jpg\\\">\");\n\t\tRootPanel.get(\"footer\").add(footerimage);\n\t\tfinal StringBuilder userEmail = new StringBuilder();\n\t\tgreetingService.login(GWT.getHostPageBaseURL(),\n\t\t\t\tnew AsyncCallback<LoginInfo>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(final Throwable caught) {\n\t\t\t\t\t\tGWT.log(\"login -> onFailure\");\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(final LoginInfo result) {\n\t\t\t\t\t\tif (result.getName() != null\n\t\t\t\t\t\t\t\t&& !result.getName().isEmpty()) {\n\t\t\t\t\t\t\taddGoogleAuthHelper();\n\t\t\t\t\t\t\tloadLogout(result);\n\t\t\t\t\t\t\tButton logoutButton = new Button(\"Ausloggen\");\n\t\t\t\t\t\t\tlogoutButton.addStyleName(\"loginlogoutButton\");\n\t\t\t\t\t\t\tloginPanel.clear();\n\t\t\t\t\t\t\tlogoutButton.addClickHandler(new ClickHandler() {\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\t\t\t\t\t\tthisClientEngine.exitSession();\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tloginPanel.add(logoutButton);\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tloadLogin(result);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tuserEmail.append(result.getEmailAddress());\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t}",
"public void v_Verify_Guest3_Displayed(){\n\t}",
"@Override // com.android.settings.wifi.dpp.WifiDppQrCodeBaseFragment\n public boolean isFooterAvailable() {\n return false;\n }",
"public PageBase click_on_login_submit_form_button () {\r\n HomePageClass homePage = new HomePageClass(driver);\r\n\r\n LGN_Login_submitBTN.click();\r\n\r\n WebDriverWait wait = getWait();\r\n wait.until(ExpectedConditions.visibilityOf(homePage.logout));\r\n\r\n return homePage;\r\n\r\n }",
"boolean hasAccountLink();",
"@Test(description = \"Verify Login page elements\")\n @Issue(\"EZ-8885\")\n void verifyTextElementsOnLoginPage() {\n LoginPage loginPage = new LoginPage(BaseUrl.loginPageBaseUrl());\n loginPage.open().getPageLogoLink();\n loginPage.getSectionTitle();\n loginPage.getTitleRelatedToFields();\n\n\n SoftAssertions softly = new SoftAssertions();\n softly.assertThat(loginPage.getPageLogoLink()).isEqualTo(\"https://hotline.ua/public/i/logo-v2.svg\");\n softly.assertThat(loginPage.getSectionTitle()).isEqualTo(\"Вход\");\n softly.assertThat(loginPage.getTitleRelatedToFields()).isEqualTo(\"Заполните поля\");\n softly.assertThat(getBrowserConsoleErrors()).isFalse();\n softly.assertAll();\n }",
"private boolean isConsumerHomePage() throws Exception {\n\n\t\tif (wh.isElementPresent(HomePageUI.verifyHomepage, 3) || \n\t\t\t\twh.isElementPresent(HomePageUI.verifyHomepage1, 3)) {\n\n\t\t\treturn true;\n\t\t} else {\n\n\t\t\treturn false;\n\t\t}\n\t}",
"@Test\n\tpublic void checkValidLoginCommissioner() {\n\t\ttest = report.createTest(\"CheckValidLoginCommissioner\");\n\t\t\n\t\tcommissionerhomepage = loginpage.successfullLoginCommissioner(UserContainer.getCommissioner());\n\t\ttest.log(Status.INFO, \"Signed in\");\n\t\t\n\t\tAssert.assertEquals(commissionerhomepage.getUserNameText(), UserContainer.getCommissioner().getLogin());\n\t\ttest.log(Status.PASS, \"Checked if the right page is opened.\");\n\t\t\n\t\tloginpage = commissionerhomepage.clickLogout();\n\t\ttest.log(Status.INFO, \"Signed off\");\n\t}",
"@Test(priority = 28)\r\n\tpublic void removalUserLinkCheckAnew() {\r\n\tAssert.assertEquals(mainPage.removalUserLinkCheck(), true);\r\n\t}",
"@Test\r\n\tpublic void TC_09_verify_Passowrd_Does_Not_Match_with_confirm_password() {\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t// Step 1: Verify the registration page is displayed\r\n\t\t\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t\t\r\n\t\t// Step 2: Enter valid/mandatory registration details with both password and confirm password do'nt match\r\n\t\t\r\n\t\tregPgObj.enterRegistrationDetails(\"firstName\", firstName);\r\n\t\tregPgObj.enterRegistrationDetails(\"lastName\", lastName);\r\n\t\tregPgObj.enterRegistrationDetails(\"email\", email);\r\n\t\tregPgObj.enterRegistrationDetails(\"password\", password);\r\n\t\tregPgObj.enterRegistrationDetails(\"confirmPassword\", \"test12345\");\r\n\t\t\r\n\t\t// Step 3: Click on Sign in button\r\n\t\t\r\n\t\tregPgObj.clickSignInButton();\r\n\t\t\r\n\t\t// Step 4: Verify user should NOT be able to proceed further with registration as proper validation message regarding password and confirm\r\n\t\t// password do'nt match is displayed\r\n\t\t\r\n\t\terrMsg = Page_Registration.getpswdErrMsg();\r\n\t\tAssert.assertEquals(errMsg, \"The password you entered does not match\");\r\n\r\n\t}",
"public void v_Verify_Guest2_Displayed(){\n\t}"
]
| [
"0.6640623",
"0.6204251",
"0.6113194",
"0.60937226",
"0.6085925",
"0.6050313",
"0.6046022",
"0.6043207",
"0.59759504",
"0.59360063",
"0.5874566",
"0.5859803",
"0.5843133",
"0.57335967",
"0.57142824",
"0.56761634",
"0.56761634",
"0.56521726",
"0.56484455",
"0.5612361",
"0.56014097",
"0.5573021",
"0.5500665",
"0.54944813",
"0.54789996",
"0.5448463",
"0.54338336",
"0.54277927",
"0.54198647",
"0.53947306",
"0.53662264",
"0.5361073",
"0.5338656",
"0.53349835",
"0.5330826",
"0.53150964",
"0.5306376",
"0.52652043",
"0.525591",
"0.52452195",
"0.5241562",
"0.5241266",
"0.5228454",
"0.5220753",
"0.51968366",
"0.51827997",
"0.5181418",
"0.5177234",
"0.5143831",
"0.51436377",
"0.51310945",
"0.5120587",
"0.51111424",
"0.5104426",
"0.5086292",
"0.5071633",
"0.50684255",
"0.5063207",
"0.50571275",
"0.5043129",
"0.50415885",
"0.5039666",
"0.50288326",
"0.5023184",
"0.5020762",
"0.5019134",
"0.50178826",
"0.50163084",
"0.5005654",
"0.50047517",
"0.5001628",
"0.49988046",
"0.49792525",
"0.49763334",
"0.49732167",
"0.49592888",
"0.49588984",
"0.4952368",
"0.49497753",
"0.4948546",
"0.49470064",
"0.49432313",
"0.4939792",
"0.49290887",
"0.49278414",
"0.49267226",
"0.49255723",
"0.49208695",
"0.4913867",
"0.49122846",
"0.49118844",
"0.49070343",
"0.49062142",
"0.49055943",
"0.4904135",
"0.49000886",
"0.49000704",
"0.48997033",
"0.4898011",
"0.48857138"
]
| 0.767156 | 0 |
Verify the CMS Footer Link in LoginPage. | public void verifyCmsLink() {
cmsFooterLink.assertState().enabled();
cmsFooterLink.assertContains().text("CMS");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void verifyHhsLink() {\n dhhsFooterLink.assertState().enabled();\n dhhsFooterLink.assertContains().text(\"Department of Health & Human Services\");\n }",
"public void waitMainLinksInFooter(final String lnk) {\n\n (new WebDriverWait(driver(), 10)).until(new ExpectedCondition<Boolean>() {\n @Override\n public Boolean apply(WebDriver d) {\n List<WebElement> elements = driver().findElements(By.xpath(Locators.FOOTER_ELEMENTS));\n String resultStr = \"\";\n StringBuilder strBuild = new StringBuilder();\n for (WebElement element : elements) {\n strBuild = strBuild.append(element.getText() + \" \");\n }\n\n return strBuild.toString().contains(lnk);\n\n }\n });\n\n }",
"public void verifyLogoutPageDisplayed() {\n\t\twaitForPageLoaded();\n\t\t_normalWait(1000);\n\t\tassertByPageTitle(Constants.pageTitle_LoggedoutPage);\n\t}",
"@Override\n public boolean isFooterDisplayed() {\n\n setLogString(\"Check footer is not displayed\", true, CustomLogLevel.HIGH);\n return isNotDisplayed(getDriver(), By.className(FOOTER_CONTAINER), TINY_TIMEOUT);\n }",
"public void checkOtherFooterLinks(String linkText,String url,String finder,String pageText){\n\t\tWebElement labelLink = driver.findElement(By.xpath(linkText));\n\t\tlabelLink.click();\n\t\tassertTrue(driver.getCurrentUrl().equals(url), \"Page is missing\");\n\t\t\n\t\tif(driver.getCurrentUrl().equals(url)){\n\t\t\tWebElement text = driver.findElement(By.xpath(finder));\n\t\t\tString ideaPageText = text.getText();\n\t\t\tassertEquals(ideaPageText,pageText,\"Text mismatch\");\n\t\t\t}\n\t\tdriver.navigate().back();\n\t\t}",
"public void verifyAccessibilityLink() {\n accessibilityFooterLink.assertState().enabled();\n accessibilityFooterLink.assertContains().text(\"Accessibility\");\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 static void verifyLogOutPageTitleLeadsToLoginPage() {\n click(AMAZON_PAGE_TITLE);\n }",
"public void clickOnEmailLink1InFooter() {\n\t By element =By.xpath(\"//a[text()='CE at VIN' ]\");\n\t scrollIntoView(element);\n\t _normalWait(3000);\n\t waitAndClick(emailLink1InFooter);\n\t }",
"public void verifyOnDashboardPage() {\n verifyUserLoggedIn.waitForState().enabled(30);\n verifyUserLoggedIn.assertContains().text(\"Dev Links\");\n }",
"@Test(priority = 1)\n\tprotected void landingpageVerification() {\n\t\tAssert.assertEquals(spincoLandingPage.isLogoDisplayed(),true);\n\t\tspincoLandingPage.clickLoginRegister();\n\t}",
"public void userIsOnHomePage(){\n\n assertURL(\"\\\"https://demo.nopcommerce.com/\\\" \");\n }",
"public void validateFooters() {\n\t}",
"public void verifyRegisterLink() {\n registerLink.assertState().enabled();\n registerLink.assertContains().text(\"Register\");\n }",
"public void clickOnEmailLink2InFooter() {\n\t\t_normalWait(2000);\n\t\twaitAndClick(emailLink2InFooter);\n\t }",
"@Override\r\n\tpublic boolean checkLogout() {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean checkLogout() {\n\t\treturn false;\r\n\t}",
"public void clickToLogoutLink() {\n\t\twaitToElementClickable(driver,RegisterPageUI.LOGOUT_LINK);\n\t\tclickToElement(driver,RegisterPageUI.LOGOUT_LINK);\n\t}",
"@Test\n\tpublic void verifycustomerSupportlink() {\n\t\tKeywords.clickOnElement(PropertiesFile.getLocator(\"Spportlink\")[0],PropertiesFile.getLocator(\"Spportlink\")[1]);\n\t\tSystem.out.println(\"24*7 goCare Support link is Displayed on Header\");\n\t\tConstants.driver.manage().timeouts().implicitlyWait(60,TimeUnit.SECONDS) ;\n\t\tKeywords.terminateBrowser();\n\n\t}",
"@Test(description = \"Go to Login Page From Home Page Header\")\n @Issue(\"EZ-8885\")\n @Description(\"Check the Login button on Header Home Page\")\n void verifyLoginButtonOnMainPage() {\n HomePage homePage = new HomePage(BaseUrl.homePageBaseUrl());\n homePage.open().getHeaderButtonsSection()\n .getLoginAreaButton().clickOnLoginAreaButton(\"https://hotline.ua/login/\");\n\n assertThat(getBrowserConsoleErrors()).isFalse();\n }",
"void Footer() {\n\t\tJPanel panel = new JPanel(new FlowLayout());\r\n\t\tpanel.add(btnLogin);\r\n\t\tpanel.add(btnReset);\r\n\t\t\r\n\t\tadd(panel, BorderLayout.SOUTH);\r\n\t\t\r\n\t\t//Action Listener untuk melakukan action pindah halaman\r\n\t\tbtnLogin.addActionListener(this);\r\n\t\tbtnReset.addActionListener(this);\r\n\t}",
"public boolean hasFooter() {\n return hasFooter;\n }",
"@Test(priority = 28)\r\n\tpublic void removalUserLinkCheck() {\r\n\tAssert.assertEquals(mainPage.removalUserLinkCheck(), true);\r\n\t}",
"public abstract boolean Verifypage();",
"public void verifyForgotPwdLink() {\n forgotPasswordLink.assertState().enabled();\n forgotPasswordLink.assertContains().text(\"Forgot your password?\");\n }",
"public boolean isFooter() {\n return isFooter;\n }",
"public void onFooterRefresing();",
"private void checkToLogout() {\n logout();\n checkToHome();\n drawViewSideMenu();\n }",
"public void waitMainFooterLinks() {\n for (String footerLink : footerLinks) {\n waitMainLinksInFooter(footerLink);\n }\n }",
"public void verifyForgotLinkModalWindow() {\n modalWindow.assertState().enabled();\n modalWindow.assertContains().text(\"warningLeaving the PECOS Website\");\n }",
"public void verifyUserIsOnHomepage()\n {\n asserttextmessage(getTextFromElement(_welcomeTileText),expected,\"user on home page\");\n\n }",
"@Test\n\tpublic void checkValidLoginCommissioner() {\n\t\ttest = report.createTest(\"CheckValidLoginCommissioner\");\n\t\t\n\t\tcommissionerhomepage = loginpage.successfullLoginCommissioner(UserContainer.getCommissioner());\n\t\ttest.log(Status.INFO, \"Signed in\");\n\t\t\n\t\tAssert.assertEquals(commissionerhomepage.getUserNameText(), UserContainer.getCommissioner().getLogin());\n\t\ttest.log(Status.PASS, \"Checked if the right page is opened.\");\n\t\t\n\t\tloginpage = commissionerhomepage.clickLogout();\n\t\ttest.log(Status.INFO, \"Signed off\");\n\t}",
"@Then(\"^user check is logged in$\")\n public void check_user_logged(){\n log.info(\"try to check if user is logged in\");\n String linkSignOut = pageLogin.getLinkSignOut().getText();\n Assert.assertTrue(linkSignOut.equals(\"Sign out\"), \"There is no visible link sign out\");\n String linkUserName = pageLogin.getLinkUserFullname().getText();\n Assert.assertTrue(linkUserName.equals(\"Antoni Giez\"));\n log.info(\"user is logged in, username - \" + linkUserName);\n }",
"public static void printFooter(String anyValidName){\n System.out.println(\"\\n*** \" + anyValidName+ \" ***\");\n }",
"@Then(\"^homepage is visible$\")\n\tpublic void homepage_is_visible() throws Throwable {\n\t\tString verify = driver.findElement(By.xpath(\"//marquee[@class='heading3']\")).getText();\n\t\tAssert.assertEquals(verify, \"Welcome To Customer's Page of Guru99 Bank\", \"Error in loading!\");\n\t}",
"public void setPageFooter(String footer)\n {\n // ignore\n }",
"public void verifyCollaborationTemplateLink() throws UIAutomationException{\r\n\t\telementController.requireElementSmart(fileName,\"Domain Plan Editor\",GlobalVariables.configuration.getAttrSearchList(), \"Domain Plan Editor link\");\r\n\t\t\t\t\r\n\t\t// Assertion : Check Link is present on page\r\n\t\tString linkText=dataController.getPageDataElements(fileName, \"Collaboration Templates Link\", \"LinkText\");\r\n\t\tUIActions.waitForLinkText(linkText,Integer.parseInt(GlobalVariables.configuration.getConfigData().get(\"TimeOutForFindingElementSeconds\")));\r\n\t}",
"@Test\r\n\tpublic void TC_01_verifyRegistrationPage() {\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t}",
"public boolean verifyHomePageDisplayed(){\r\n\t\tWebDriver driver = SeleniumDriver.getInstance().getWebDriver();\r\n\t\tWebElement body;\r\n\t\ttry{\r\n\t\t\tbody = driver.findElement(By.tagName(\"body\"));\r\n\t\t\tif(body.getAttribute(\"class\").contains(\"home page\")){\r\n\t\t\t\tmyAssert.setGblPassFailMessage(\"pass\", \"UpTake home page is displayed\");\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tmyAssert.setGblPassFailMessage(\"fail\", \"UpTake home page is not displayed\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t return true;\r\n\t}",
"public void isRedirectionCorrect() {\n\n\t\tString title = WebUtility.getTitle();\n\t\tAssert.assertEquals(title, data.getValidatingData(\"homepage_Title\"));\n\t\tSystem.out.println(\"Redirection is on the correct page\");\n\t}",
"public void redirectToHomePageNotLoggedIn() {\r\n\t\t\r\n\t\twebAppDriver.get(baseUrl);//+\"?optimizely_x8236533790=0\"\r\n\t\t/*try {\r\n\t\t\twebAppDriver.verifyElementTextContains(By.id(linkLogoutId), \"Logout\", true);\r\n\t\t\tloginAction.clickOnLogOut();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// this is just to do logout if customer is auto logged in during\r\n\t\t\t// reservation\r\n\t\t}\r\n\t\t*/\r\n\t}",
"@AfterTest\n\t\tpublic void logout(){\n//Calling method to logout from the account and verify logout message.\n//'**********************************************************\n\t\t\tLogOutPage accountLogoutPage =myWishlistPage.logout();\n\t\t\tAssert.assertTrue(accountLogoutPage.getlogoutMsg().equals(\"Account Logout\"), \"Account Logout message is not displayed\");\n\t\t\textentTest.log(LogStatus.PASS,\"Account Logout message is displayed and the user is signed out from the account\");\n//'**********************************************************\n//Close the report\n//'**********************************************************\n\t\t\textentReports.endTest(extentTest);\n\t\t\textentReports.flush();\n\t\t\textentReports.close();\n\t\t}",
"@Test(priority = 28)\r\n\tpublic void removalUserLinkCheckAnew() {\r\n\tAssert.assertEquals(mainPage.removalUserLinkCheck(), true);\r\n\t}",
"@Override // com.android.settings.wifi.dpp.WifiDppQrCodeBaseFragment\n public boolean isFooterAvailable() {\n return false;\n }",
"public static FooterMyAccountPage getFooterMyAccountPage(WebDriver driver) {\n\t\treturn null;\r\n\t}",
"public void onFooterRefreshComplete() {\n onFooterRefreshComplete(true);\n }",
"public void verifyManageProfileLink() {\n profileLink.assertState().enabled();\n profileLink.assertContains().text(\"Manage your user profile\");\n }",
"public void verifyRegisterForNPILink() {\n npiLink.assertState().enabled();\n npiLink.assertContains().text(\"register for a National Provider Identifier (NPI)\");\n }",
"public void verifyCommunitiesLink() throws UIAutomationException{\r\n\t\telementController.requireElementSmart(fileName,\"Collaboration Plans\",GlobalVariables.configuration.getAttrSearchList(), \"Collaboration Plans\");\r\n\t\t\t\t\r\n\t\t// Assertion : Check Link is present on page\r\n\t\tString linkText=dataController.getPageDataElements(fileName, \"Collaboration Plans Link\", \"LinkText\");\r\n \tUIActions.waitForLinkText(linkText,Integer.parseInt(GlobalVariables.configuration.getConfigData().get(\"TimeOutForFindingElementSeconds\")));\r\n\t}",
"boolean hasAccountLink();",
"private static String footer() {\r\n String output = \"\";\r\n\r\n output += \"\\n\\\\end{document}\";\r\n\r\n return output;\r\n }",
"protected String getPageFooter()\n {\n if (this.pageFooter == null) {\n String copyright = (this.privateLabel != null)? this.privateLabel.getCopyright() : \"\";\n StringBuffer sb = new StringBuffer();\n sb.append(\"<center>\");\n sb.append(\"<hr><span style='font-size:7pt;'>\" + copyright + \"</span>\");\n sb.append(\"</center>\");\n this.pageFooter = sb.toString();\n }\n return this.pageFooter;\n }",
"public void verifyLearnMoreLink() {\n learnMoreLink.assertState().enabled();\n learnMoreLink.assertContains().text(\"Learn more about registering for an account.\");\n }",
"public void welComeLink()\r\n\t{\r\n\t\tboolean welcome = welComeLinkElement.isDisplayed();\r\n\t\tAssert.assertTrue(welcome);\r\n\t\t\r\n\t}",
"public void verifyPage() {\n\t\twaitForPageToLoad();\n\t\tString title = driver.getTitle();\n\t\tSystem.out.println(title);\n\t\tAssert.assertEquals(title,\"News: India News, Latest Bollywood News, Sports News, Business & Political News, National & International News | Times of India\");\n\t}",
"@Given(\"^Registered user is on the main page of website$\")\n public void registeredUserIsOnTheMainPageOfWebsite() {\n }",
"@When(\"^user should signout to exit from the loggedin page$\")\n\tpublic void user_should_signout_to_exit_from_the_loggedin_page() throws Throwable {\n\t\telementClick(pa.getAp().getLogout());\n\t\t\n\t \n\t}",
"public void verifyChannelsAdminLink() throws UIAutomationException{\r\n\t\telementController.requireElementSmart(fileName,\"Channels Admin\",GlobalVariables.configuration.getAttrSearchList(), \"Channels Admin Link\");\r\n\t\t\t\t\r\n\t\t// Assertion : Check Link is present on page\r\n\t\tString linkText=dataController.getPageDataElements(fileName, \"Channels Admin Link\", \"LinkText\");\r\n\t\tSystem.out.println(linkText);\r\n\t\tUIActions.waitForLinkText(linkText,Integer.parseInt(GlobalVariables.configuration.getConfigData().get(\"TimeOutForFindingElementSeconds\")));\r\n\t}",
"private boolean isValidLoginResponse(Response response) {\n\t\treturn response.header(\"Location\").toLowerCase().contains(\"testsession\");\r\n\t}",
"@Test(description = \"Verify Login page elements\")\n @Issue(\"EZ-8885\")\n void verifyTextElementsOnLoginPage() {\n LoginPage loginPage = new LoginPage(BaseUrl.loginPageBaseUrl());\n loginPage.open().getPageLogoLink();\n loginPage.getSectionTitle();\n loginPage.getTitleRelatedToFields();\n\n\n SoftAssertions softly = new SoftAssertions();\n softly.assertThat(loginPage.getPageLogoLink()).isEqualTo(\"https://hotline.ua/public/i/logo-v2.svg\");\n softly.assertThat(loginPage.getSectionTitle()).isEqualTo(\"Вход\");\n softly.assertThat(loginPage.getTitleRelatedToFields()).isEqualTo(\"Заполните поля\");\n softly.assertThat(getBrowserConsoleErrors()).isFalse();\n softly.assertAll();\n }",
"public boolean completelink() throws Exception {\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(completelink);\r\n\t\t\t\tflag = element.isDisplayed() && element.isEnabled();\r\n\t\t\t\tAssert.assertTrue(flag, \"Complete link is not dispalyed and enabled\");\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"USER NAME NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn flag;\r\n\t\t}",
"@Test\n\tpublic void checkValidLoginRegistrator() {\n\t\ttest = report.createTest(\"CheckValidLoginRegistrator\");\n\t\t\n\t\tregistratorhomepage = loginpage.successfullLoginRegistrator(UserContainer.getRegistrator());\n\t\ttest.log(Status.INFO, \"Signed in\");\n\t\t\n\t\tAssert.assertEquals(registratorhomepage.getUserNameText(), UserContainer.getRegistrator().getLogin());\n\t\ttest.log(Status.PASS, \"Checked if the right page is opened.\");\n\t\t\n\t\tloginpage = registratorhomepage.clickLogout();\n\t\ttest.log(Status.INFO, \"Signed off\");\n\t}",
"private void testFinished() {\n\t\t\tLoginPage.logout(driver());\n\t\t}",
"public void verifyGroupPage()\n\t{\n\t\t_waitForJStoLoad();\n\t\tString groupPageText= groups.getText();\n\t\tAssert.assertEquals(FileNames.Groups.toString(), groupPageText);\n\t}",
"@Test\n public void check_Login_Success() {\n lPage = new LoginPage(webDriver);\n lPage.login(\"admin\",\"admin\");\n hPage = new HomePage(webDriver);\n String loginText = hPage.getHomePageText();\n assertEquals(\"Congratulations!\",loginText);\n }",
"@Override\n\tpublic void onModuleLoad() {\n\t\tButton loginButton = new Button(\"Einloggen\");\n\t\tloginButton.addStyleName(\"loginlogoutButton\");\n\t\tloginButton.addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tWindow.Location.assign(loginurl);\n\t\t\t}\n\n\t\t});\n\t\tsignInLink.getElement().setClassName(\"login-area\");\n\t\tsignInLink.setTitle(\"sign out\");\n\t\tloginImage.getElement().setClassName(\"login-image\");\n\t\tloginPanel.add(loginButton);\n\t\tHTML starttext = new HTML(\"<h2>Willkommen bei Hakuna Contacta</h2><div id=\\\"startlogin\\\">So funktionierts:<br>1. Kontakte ausw\\u00E4hlen<br>2. Exportfelder ausw\\u00E4hlen<br>3. Download der Exportdatei<br>(4. Als Quelldatei f\\u00FCr Word Serienbrief verwenden)</div><div id=\\\"gcontacts2word\\\"><img src=\\\"images/gcontacts2word.png\\\"><p class=\\\"whitetext\\\">Exportformate - CSV (Word-Serienbrief), CSV (Komma getrennt), vCARD, xCard (XML) </p></div><div id=\\\"arrow1\\\"><img src=\\\"images/arrow1.png\\\"/></div>\");\n\t\tRootPanel.get(\"content\").add(starttext);\n\n\t\tRootPanel.get(\"loginPanelContainer\").add(loginPanel);\n\t\tRootPanel.get(\"footer\").clear();\n\t\tHTML footerimage = new HTML(\"<img src=\\\"images/1.jpg\\\">\");\n\t\tRootPanel.get(\"footer\").add(footerimage);\n\t\tfinal StringBuilder userEmail = new StringBuilder();\n\t\tgreetingService.login(GWT.getHostPageBaseURL(),\n\t\t\t\tnew AsyncCallback<LoginInfo>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(final Throwable caught) {\n\t\t\t\t\t\tGWT.log(\"login -> onFailure\");\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(final LoginInfo result) {\n\t\t\t\t\t\tif (result.getName() != null\n\t\t\t\t\t\t\t\t&& !result.getName().isEmpty()) {\n\t\t\t\t\t\t\taddGoogleAuthHelper();\n\t\t\t\t\t\t\tloadLogout(result);\n\t\t\t\t\t\t\tButton logoutButton = new Button(\"Ausloggen\");\n\t\t\t\t\t\t\tlogoutButton.addStyleName(\"loginlogoutButton\");\n\t\t\t\t\t\t\tloginPanel.clear();\n\t\t\t\t\t\t\tlogoutButton.addClickHandler(new ClickHandler() {\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\t\t\t\t\t\tthisClientEngine.exitSession();\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tloginPanel.add(logoutButton);\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tloadLogin(result);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tuserEmail.append(result.getEmailAddress());\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t}",
"public void return_logout_success() {\r\n\t\tMainClientGUI.loggedIn = false;\r\n\t\tswitchScenes(\"/client/boundry/LoginForm.fxml\", \"/client/boundry/MainCss.css\");\r\n\t}",
"@Test(priority=0)\n\tpublic void verifyOverviewPageAfterLoginToAccount() throws Exception {\n\t\tLoginTradusPROPage loginPage= new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(testUser,pwd);\n\t\tclick(loginPage.LoginButton);\n\t\twaitTill(3000);\n\t explicitWaitFortheElementTobeVisible(driver,loginPage.overviewPageVerificationElement);\n\t waitTill(7000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms\"),\n\t \t\t\"Overview page is not displaying after login to account\");\n\t}",
"public boolean isAt(){\n\t\tWaitExtensions.waitForPageToLoad(10);\n\t\treturn loginButton.isDisplayed();\n\t\t\n\t}",
"private org.gwtbootstrap3.client.ui.PanelFooter get_f_PanelFooter36() {\n return build_f_PanelFooter36();\n }",
"@Test\n\tpublic void checkValidLoginAdmin() {\n\t\ttest = report.createTest(\"CheckValidLoginAdmin\");\n\t\t\n\t\tadminhomepage = loginpage.successfullLoginAdmin(UserContainer.getAdmin());\n\t\ttest.log(Status.INFO, \"Signed in\");\n\t\t\n\t\tAssert.assertEquals(adminhomepage.getUserNameText(), UserContainer.getAdmin().getLogin());\n\t\ttest.log(Status.PASS, \"Checked if the right page is opened.\");\n\t\t\n\t\tloginpage = adminhomepage.clickLogout();\n\t\ttest.log(Status.INFO, \"Signed off\");\n\t}",
"public void clickSignOutLink()\n\t{\n \telementUtils.performElementClick(wbSignOutLink);\n\t}",
"@Override\n public boolean check() {\n return GlobalParams.isLogin();\n }",
"public void ConfirmSignOut(){\n ReusableActionsPageObjects.clickOnElement(driver, ConfirmSignOut, logger, \"confirm log out\");\n }",
"@Test\n\tpublic void testadminLogout(){\n\t\tlic.logon(\"nadmin\", \"admin\", true);\n\t\tassertTrue(loc.adminLogout(\"nadmin\"));\n\t\tassertFalse(loc.adminLogout(\"oops\"));\n\t}",
"public abstract boolean isLoggedIn(String url);",
"public void verifyLabelSuccessfulLogin() throws IOException {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"Verifying if Label is available or not\");\n\t\t//JavaScriptExec.sleep();\n\t\tAssert.assertTrue(verifyLabelSuccessfulLogin.getText().contains(BasePage.getCellData(xlsxName, sheetName, 3, 0)),\n\t\t\t\t\"Assert Failed as its unable to search text in Logged in Page\");\n\t}",
"boolean hasHasInstitutionHomePage();",
"@Override\n\tpublic boolean hasLoginForm() {\n\t\tList<HtmlForm> listOfForms=this.page.getForms();\n\t\tif(listOfForms==null){\n\t\t\treturn false;\n\t\t}\n\t\tif(listOfForms.isEmpty()){\n\t\t\treturn false;\n\t\t}\n\t\tIterator<HtmlForm> formsIterator=listOfForms.iterator();\n\t\twhile(formsIterator.hasNext()){\n\t\t\tHtmlForm form=formsIterator.next();\n\t\t\tif(isLoginForm(form)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean verifyPreAdmission_StudentCountReportPage() {\r\n\t\ttry {\r\n\t\t\tSystem.out.println(txt_StudentCountReportPage.getText().trim());\r\n\t\t\ttxt_StudentCountReportPage.isDisplayed();\r\n\t\t\tlog(\"PreAdmission Student Count Report page is dispalyed and object is:-\"\r\n\t\t\t\t\t+ txt_StudentCountReportPage.toString());\r\n\t\t\tThread.sleep(1000);\r\n\t\t\treturn true;\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"@Test(priority=26)\n\tpublic void verifyLoginPageByClickingOnLogoutOptionInDropdown() throws Exception {\n\t\tOverviewTradusPROPage overviewPage= new OverviewTradusPROPage(driver);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.profileIconOnHeader);\n\t click(overviewPage.profileIconOnHeader);\n\t waitTill(1000);\n\t click(overviewPage.logoutOptionInProfileIconDropdown);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.LoginText);\n\t waitTill(1000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/login\"),\n\t \t\t\"Login Page is not displaying by cicking on logout option in dropdown\");\n\t}",
"@Test\n public void verifyTitleOfHomePageTest()\n {\n\t \n\t String abc=homepage.validateHomePageTitle();\n\t Assert.assertEquals(\"THIS IS DEMO SITE FOR \",abc );\n }",
"@Then(\"I want to login successfully\")\n\tpublic void output() {\n\t\tact.gethomepage().verifyLoggedUser();\n\n\t\t//String username = linkWelcome.getText();\n\t\t//String login = \"Welcome Admin\";\n\t\t//if (username.equals(login)) {\n\t\t\t//System.out.println(\"User name is correct\");\n\t\t//} else {\n\t\t\t//System.out.println(\"Username is not correct\");\n\n\t\t}",
"@Test\n public void testLogout() {\n assertEquals(SAMPLE_ID, navigationBean.getSessionUser().getUserID());\n assertEquals(\"/facelets/open/index.xhtml?faces-redirect=true\", navigationBean.logout());\n assertEquals(0, navigationBean.getSessionUser().getUserID());\n }",
"public void VerifyHomepage(){\r\n\t\t//String username = getValue(Email);\r\n\t//\tString password = getValue(Password);\r\n\r\n\t//\tclass Local {};\r\n\t\t/*Reporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");*/\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\t//driver.findElement(locator_split(\"btn_privacyok\")).click();\r\n\t\tclick(locator_split(\"btn_privacyok\"));\r\n\t\t\t\r\n\t\t\t/*Reporter.log(\"PASS_MESSAGE:- My Account is clicked and user is logged in\");*/\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- User is not logged in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"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 }",
"@Given(\"^User should logged in to URL$\")\n\tpublic void user_should_logged_in_to_URL() throws Throwable {\n\t\thomepage.clickloginifdisplayed();\n\t\twait.WaitForElement(loginpage.getLoginemail(), 60);\n\t\tloginpage.ValidLogin();\n\t}",
"@Test\n public void checkLoginAndLogout() {\n mInjector.authentication()\n .authenticateValidUser(USERNAME, PASSWORD)\n .checkMainScreenIsDisplayed(); // Then the main screen appears\n\n mInjector.navigationDrawer()\n .logoutUser(USERNAME) // When the user logs out\n .checkAuthScreenIsDisplayed();\n }",
"private void checkPage() {\n Assert.assertTrue(\"Electric cars button not displayed.\",electricCars.isDisplayed());\n }",
"public void Verify_Page_Header_Visibility()\r\n\t{\r\n\t\t if(Page_header.isDisplayed())\r\n\t\t\t System.out.println(\"header visible at webpage\");\r\n\t\t else\r\n\t\t\t System.out.println(\"header not visible at webpage\");\r\n\t\t\r\n\t}",
"@Test\n\tpublic void testLogout() throws Exception {\n\t\tgotoHomePage();\n\t\t\n\t\t// login then logout\n\t\tlogin(\"admin\", \"123456\");\n\t\t// should redirect to home page\n\t\tAssert.assertEquals(\"SIS\", driver.getTitle());\n\t\tlogout();\n\t\t// should redirect to login page\n\t\tAssert.assertEquals(\"Login Page\", driver.getTitle());\n\t\t\n\t\t// login, go to Cart page, then logout\n\t\tlogin(\"admin\", \"123456\");\n\t\tdriver.findElement(By.linkText(\"Cart\")).click();\n\t\tAssert.assertEquals(\"Cart\", driver.getTitle());\n\t\tlogout();\n\t\t// should redirect to login page\n\t\tAssert.assertEquals(\"Login Page\", driver.getTitle());\n\t\t\n\t\t// login, go to Transcript page, then logout\n\t\tlogin(\"admin\", \"123456\");\n\t\tdriver.findElement(By.linkText(\"Transcript\")).click();\n\t\tAssert.assertEquals(\"Transcript\", driver.getTitle());\n\t\tlogout();\n\t\t// should redirect to login page\n\t\tAssert.assertEquals(\"Login Page\", driver.getTitle());\n\t\t\n\t\t// login, go to Payment page, then logout\n\t\tlogin(\"admin\", \"123456\");\n\t\tdriver.findElement(By.linkText(\"Payment\")).click();\n\t\tAssert.assertEquals(\"Payment\", driver.getTitle());\n\t\tlogout();\n\t\t// should redirect to login page\n\t\tAssert.assertEquals(\"Login Page\", driver.getTitle());\n\t\t\n\t\t// login, go to Grades page, then logout\n\t\tlogin(\"admin\", \"123456\");\n\t\tdriver.findElement(By.linkText(\"Grades\")).click();\n\t\tAssert.assertEquals(\"Grades\", driver.getTitle());\n\t\tlogout();\n\t\t// should redirect to login page\n\t\tAssert.assertEquals(\"Login Page\", driver.getTitle());\n\t\t\n\t\t// login, go to Change Password page, then logout\n\t\tlogin(\"admin\", \"123456\");\n\t\tdriver.findElement(By.linkText(\"Change Password\")).click();\n\t\tAssert.assertEquals(\"Change Password\", driver.getTitle());\n\t\tlogout();\n\t\t// should redirect to login page\n\t\tAssert.assertEquals(\"Login Page\", driver.getTitle());\n\t}",
"boolean hasPageHelper();",
"boolean hasPageHelper();",
"boolean hasPageHelper();",
"private void doFooterClick() {\n switch (mListFooterMode) {\n case LIST_FOOTER_MODE_NONE: // should never happen\n break;\n case LIST_FOOTER_MODE_MORE:\n onLoadMoreMessages();\n break;\n }\n }",
"@Test(priority = 4)\n\tpublic void homePageRedirection() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"HomepageRedirection\");\n\t\tlog.info(\"Starting Redirection validation\");\n\t\thome.isRedirectionCorrect(validate);\n\t\tlog.info(\"Redirection is on the correct page\");\n\t\tlog.info(\"Starting the Hero Image Product Validation testing\");\n\n\t}",
"public boolean verifyAccountInquiryPage(){\n\t\tboolean isAccountInquiryPagePresent=false;\n\t\tSeleniumUtil.switchToFrame(driver, \"DialogBox_Frame\");\n\t\tString text = SeleniumUtil.getElementWithFluentWait(accountInquiryTitle).getText();\n\t\tSystem.out.println(text);\n\t\tif(text.equalsIgnoreCase(\" Financial Inquiry\")){\n\t\t\tSystem.out.println(\"Account Inquiry Page is opened\");\n\t\t\tSeleniumUtil.getElementWithFluentWait(accountInquiryTitle).sendKeys(Keys.ESCAPE);\n\t\t\tisAccountInquiryPagePresent=true;\n\t\t}\n\t\treturn isAccountInquiryPagePresent;\n\t}",
"public void monthlyPayment_Validation() {\n\t\thelper.assertString(monthlyPayment_AftrLogin(), payOffOffer.monthlyPayment_BfrLogin());\n\t\tSystem.out.print(\"The Monthly Payment is: \" + monthlyPayment_AftrLogin());\n\t}",
"@Given(\"^User is on netbanking landing page$\")\r\n public void user_is_on_netbanking_landing_page() throws Throwable {\n System.out.println(\"Navigated to Login URL\");\r\n }",
"public void verify_WelcomePopupandclick(){\n\t\tif(isDisplayedWithoutException(welcomePopup)){\n\t\t\tclick(welcomePopup);\n\t\t\tSystem.out.println(\"the Welcome popup is visible on the page and clicked done\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"The Welcome popup is not present on the page\");\n\t\t}\n\t}"
]
| [
"0.6847342",
"0.6206837",
"0.61733806",
"0.61086917",
"0.6082112",
"0.6043729",
"0.5972404",
"0.59070086",
"0.58888936",
"0.58691144",
"0.5859743",
"0.5790851",
"0.57622147",
"0.5687802",
"0.56855404",
"0.56729805",
"0.56729805",
"0.56422496",
"0.562171",
"0.5534983",
"0.5525334",
"0.5505597",
"0.5502584",
"0.5496364",
"0.54762703",
"0.5452336",
"0.5419052",
"0.54142",
"0.5347197",
"0.5295347",
"0.52652645",
"0.52644885",
"0.52610123",
"0.52592057",
"0.5257501",
"0.52570677",
"0.5212186",
"0.52029467",
"0.52028453",
"0.5194031",
"0.5173571",
"0.5165289",
"0.5131264",
"0.5130538",
"0.5111988",
"0.5099323",
"0.5092844",
"0.5074813",
"0.50526637",
"0.5041758",
"0.5040207",
"0.50352746",
"0.5030076",
"0.50298923",
"0.49901682",
"0.4965596",
"0.49610138",
"0.49581546",
"0.49448285",
"0.49443522",
"0.49387693",
"0.49176234",
"0.4914104",
"0.490493",
"0.4904587",
"0.4903266",
"0.48895088",
"0.48798808",
"0.4879569",
"0.48753357",
"0.4874507",
"0.48579735",
"0.48572448",
"0.48549095",
"0.48393422",
"0.48351115",
"0.48272833",
"0.4826753",
"0.48239654",
"0.48156",
"0.481356",
"0.48108912",
"0.47991604",
"0.4797462",
"0.4796895",
"0.47896206",
"0.4784211",
"0.47775725",
"0.47692093",
"0.47678736",
"0.47641823",
"0.47641522",
"0.47641522",
"0.47641522",
"0.47632253",
"0.47614735",
"0.4757933",
"0.47536635",
"0.47475818",
"0.474325"
]
| 0.7579465 | 0 |
Verify the Accessibility Footer Link in LoginPage. | public void verifyAccessibilityLink() {
accessibilityFooterLink.assertState().enabled();
accessibilityFooterLink.assertContains().text("Accessibility");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void verifyHhsLink() {\n dhhsFooterLink.assertState().enabled();\n dhhsFooterLink.assertContains().text(\"Department of Health & Human Services\");\n }",
"public void verifyCmsLink() {\n cmsFooterLink.assertState().enabled();\n cmsFooterLink.assertContains().text(\"CMS\");\n }",
"@Override\n public boolean isFooterDisplayed() {\n\n setLogString(\"Check footer is not displayed\", true, CustomLogLevel.HIGH);\n return isNotDisplayed(getDriver(), By.className(FOOTER_CONTAINER), TINY_TIMEOUT);\n }",
"public void waitMainLinksInFooter(final String lnk) {\n\n (new WebDriverWait(driver(), 10)).until(new ExpectedCondition<Boolean>() {\n @Override\n public Boolean apply(WebDriver d) {\n List<WebElement> elements = driver().findElements(By.xpath(Locators.FOOTER_ELEMENTS));\n String resultStr = \"\";\n StringBuilder strBuild = new StringBuilder();\n for (WebElement element : elements) {\n strBuild = strBuild.append(element.getText() + \" \");\n }\n\n return strBuild.toString().contains(lnk);\n\n }\n });\n\n }",
"public static void verifyLogOutPageTitleLeadsToLoginPage() {\n click(AMAZON_PAGE_TITLE);\n }",
"public void clickOnEmailLink1InFooter() {\n\t By element =By.xpath(\"//a[text()='CE at VIN' ]\");\n\t scrollIntoView(element);\n\t _normalWait(3000);\n\t waitAndClick(emailLink1InFooter);\n\t }",
"public void verifyLogoutPageDisplayed() {\n\t\twaitForPageLoaded();\n\t\t_normalWait(1000);\n\t\tassertByPageTitle(Constants.pageTitle_LoggedoutPage);\n\t}",
"public void validateFooters() {\n\t}",
"public void clickOnEmailLink2InFooter() {\n\t\t_normalWait(2000);\n\t\twaitAndClick(emailLink2InFooter);\n\t }",
"public void checkOtherFooterLinks(String linkText,String url,String finder,String pageText){\n\t\tWebElement labelLink = driver.findElement(By.xpath(linkText));\n\t\tlabelLink.click();\n\t\tassertTrue(driver.getCurrentUrl().equals(url), \"Page is missing\");\n\t\t\n\t\tif(driver.getCurrentUrl().equals(url)){\n\t\t\tWebElement text = driver.findElement(By.xpath(finder));\n\t\t\tString ideaPageText = text.getText();\n\t\t\tassertEquals(ideaPageText,pageText,\"Text mismatch\");\n\t\t\t}\n\t\tdriver.navigate().back();\n\t\t}",
"public boolean verifyPageLoad() {\n\t\tboolean result = lnkLoginButton.isDisplayed();\n\t\tLog.info(\"Home Page Loaded Successfully\");\n\t\treturn result;\n\t}",
"@Test(description = \"Go to Login Page From Home Page Header\")\n @Issue(\"EZ-8885\")\n @Description(\"Check the Login button on Header Home Page\")\n void verifyLoginButtonOnMainPage() {\n HomePage homePage = new HomePage(BaseUrl.homePageBaseUrl());\n homePage.open().getHeaderButtonsSection()\n .getLoginAreaButton().clickOnLoginAreaButton(\"https://hotline.ua/login/\");\n\n assertThat(getBrowserConsoleErrors()).isFalse();\n }",
"public void clickToLogoutLink() {\n\t\twaitToElementClickable(driver,RegisterPageUI.LOGOUT_LINK);\n\t\tclickToElement(driver,RegisterPageUI.LOGOUT_LINK);\n\t}",
"public void verifyOnDashboardPage() {\n verifyUserLoggedIn.waitForState().enabled(30);\n verifyUserLoggedIn.assertContains().text(\"Dev Links\");\n }",
"public void verifyRegisterLink() {\n registerLink.assertState().enabled();\n registerLink.assertContains().text(\"Register\");\n }",
"public boolean hasFooter() {\n return hasFooter;\n }",
"@Test\n\tpublic void verifycustomerSupportlink() {\n\t\tKeywords.clickOnElement(PropertiesFile.getLocator(\"Spportlink\")[0],PropertiesFile.getLocator(\"Spportlink\")[1]);\n\t\tSystem.out.println(\"24*7 goCare Support link is Displayed on Header\");\n\t\tConstants.driver.manage().timeouts().implicitlyWait(60,TimeUnit.SECONDS) ;\n\t\tKeywords.terminateBrowser();\n\n\t}",
"@Test(priority = 1)\n\tprotected void landingpageVerification() {\n\t\tAssert.assertEquals(spincoLandingPage.isLogoDisplayed(),true);\n\t\tspincoLandingPage.clickLoginRegister();\n\t}",
"public boolean isFooter() {\n return isFooter;\n }",
"public void waitMainFooterLinks() {\n for (String footerLink : footerLinks) {\n waitMainLinksInFooter(footerLink);\n }\n }",
"public void userIsOnHomePage(){\n\n assertURL(\"\\\"https://demo.nopcommerce.com/\\\" \");\n }",
"public void Verify_Expected_Header_Visibility()\r\n\t{\r\n\t\tString Runtime_Header_text=Page_header.getText();\r\n\t\tif(Runtime_Header_text.equals(Exp_page_header))\r\n\t\t\tSystem.out.println(\"Expected Header visible at webpage\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Expected Header not visible at webpage\");\r\n\t}",
"boolean hasAccountLink();",
"public void onFooterRefresing();",
"public void verifyLearnMoreLink() {\n learnMoreLink.assertState().enabled();\n learnMoreLink.assertContains().text(\"Learn more about registering for an account.\");\n }",
"@Override // com.android.settings.wifi.dpp.WifiDppQrCodeBaseFragment\n public boolean isFooterAvailable() {\n return false;\n }",
"public void Verify_Page_Header_Visibility()\r\n\t{\r\n\t\t if(Page_header.isDisplayed())\r\n\t\t\t System.out.println(\"header visible at webpage\");\r\n\t\t else\r\n\t\t\t System.out.println(\"header not visible at webpage\");\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic boolean checkLogout() {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean checkLogout() {\n\t\treturn false;\r\n\t}",
"public static void printFooter(String anyValidName){\n System.out.println(\"\\n*** \" + anyValidName+ \" ***\");\n }",
"@Then(\"^homepage is visible$\")\n\tpublic void homepage_is_visible() throws Throwable {\n\t\tString verify = driver.findElement(By.xpath(\"//marquee[@class='heading3']\")).getText();\n\t\tAssert.assertEquals(verify, \"Welcome To Customer's Page of Guru99 Bank\", \"Error in loading!\");\n\t}",
"public boolean verifyHomePageDisplayed(){\r\n\t\tWebDriver driver = SeleniumDriver.getInstance().getWebDriver();\r\n\t\tWebElement body;\r\n\t\ttry{\r\n\t\t\tbody = driver.findElement(By.tagName(\"body\"));\r\n\t\t\tif(body.getAttribute(\"class\").contains(\"home page\")){\r\n\t\t\t\tmyAssert.setGblPassFailMessage(\"pass\", \"UpTake home page is displayed\");\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tmyAssert.setGblPassFailMessage(\"fail\", \"UpTake home page is not displayed\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t return true;\r\n\t}",
"@Test(priority = 28)\r\n\tpublic void removalUserLinkCheck() {\r\n\tAssert.assertEquals(mainPage.removalUserLinkCheck(), true);\r\n\t}",
"public abstract boolean Verifypage();",
"public void verifyUserIsOnHomepage()\n {\n asserttextmessage(getTextFromElement(_welcomeTileText),expected,\"user on home page\");\n\n }",
"public boolean isAt(){\n\t\tWaitExtensions.waitForPageToLoad(10);\n\t\treturn loginButton.isDisplayed();\n\t\t\n\t}",
"public void VerifyMainMenuItems() {\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Dashboard);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Initiatives);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_LiveMediaPlans);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_MediaPlans);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Audiences);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Offers);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_CreativeAssets);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Reports);\n\t}",
"private void checkToLogout() {\n logout();\n checkToHome();\n drawViewSideMenu();\n }",
"public static FooterMyAccountPage getFooterMyAccountPage(WebDriver driver) {\n\t\treturn null;\r\n\t}",
"public void setPageFooter(String footer)\n {\n // ignore\n }",
"@Test(description = \"Verify Login page elements\")\n @Issue(\"EZ-8885\")\n void verifyTextElementsOnLoginPage() {\n LoginPage loginPage = new LoginPage(BaseUrl.loginPageBaseUrl());\n loginPage.open().getPageLogoLink();\n loginPage.getSectionTitle();\n loginPage.getTitleRelatedToFields();\n\n\n SoftAssertions softly = new SoftAssertions();\n softly.assertThat(loginPage.getPageLogoLink()).isEqualTo(\"https://hotline.ua/public/i/logo-v2.svg\");\n softly.assertThat(loginPage.getSectionTitle()).isEqualTo(\"Вход\");\n softly.assertThat(loginPage.getTitleRelatedToFields()).isEqualTo(\"Заполните поля\");\n softly.assertThat(getBrowserConsoleErrors()).isFalse();\n softly.assertAll();\n }",
"public void verifyForgotPwdLink() {\n forgotPasswordLink.assertState().enabled();\n forgotPasswordLink.assertContains().text(\"Forgot your password?\");\n }",
"public void verifyForgotLinkModalWindow() {\n modalWindow.assertState().enabled();\n modalWindow.assertContains().text(\"warningLeaving the PECOS Website\");\n }",
"boolean hasLoginapifailhitcount();",
"public void clickSignOutLink()\n\t{\n \telementUtils.performElementClick(wbSignOutLink);\n\t}",
"private void doFooterClick() {\n switch (mListFooterMode) {\n case LIST_FOOTER_MODE_NONE: // should never happen\n break;\n case LIST_FOOTER_MODE_MORE:\n onLoadMoreMessages();\n break;\n }\n }",
"@AfterTest\n\t\tpublic void logout(){\n//Calling method to logout from the account and verify logout message.\n//'**********************************************************\n\t\t\tLogOutPage accountLogoutPage =myWishlistPage.logout();\n\t\t\tAssert.assertTrue(accountLogoutPage.getlogoutMsg().equals(\"Account Logout\"), \"Account Logout message is not displayed\");\n\t\t\textentTest.log(LogStatus.PASS,\"Account Logout message is displayed and the user is signed out from the account\");\n//'**********************************************************\n//Close the report\n//'**********************************************************\n\t\t\textentReports.endTest(extentTest);\n\t\t\textentReports.flush();\n\t\t\textentReports.close();\n\t\t}",
"@Test\n @Issue(\"EZ-8885\")\n void verifyGeneralElementsOnLoginPage() {\n LoginPage loginPage = new LoginPage(BaseUrl.loginPageBaseUrl());\n loginPage.open().getStatusLoginFields();\n LoginPage.getButtonsStatus();\n\n SoftAssertions softly = new SoftAssertions();\n softly.assertThat(loginPage.getStatusLoginFields()).isTrue();\n softly.assertThat(LoginPage.getButtonsStatus()).isTrue();\n softly.assertThat(getBrowserConsoleErrors()).isFalse();\n softly.assertAll();\n\n }",
"public void validateSocialMediaLinks(WebDriver driver)\n\t{\n\t\tBoolean actTwitter1 = driver.findElement(By.cssSelector(\"a.twitter\")).isDisplayed();\n System.out.println(\"Twitter is displayed or not: \"+actTwitter1);\n\t}",
"public void verifyCommunitiesLink() throws UIAutomationException{\r\n\t\telementController.requireElementSmart(fileName,\"Collaboration Plans\",GlobalVariables.configuration.getAttrSearchList(), \"Collaboration Plans\");\r\n\t\t\t\t\r\n\t\t// Assertion : Check Link is present on page\r\n\t\tString linkText=dataController.getPageDataElements(fileName, \"Collaboration Plans Link\", \"LinkText\");\r\n \tUIActions.waitForLinkText(linkText,Integer.parseInt(GlobalVariables.configuration.getConfigData().get(\"TimeOutForFindingElementSeconds\")));\r\n\t}",
"public void onFooterRefreshComplete() {\n onFooterRefreshComplete(true);\n }",
"public void verifyMoreInfoPage() throws Throwable{\r\n\t\twdlib.verify(getMoreInfoPage().getText(),flib.getPropKeyValue(PROP_PATH, \"MoreInfo\"), \"More Information page\");\r\n\t}",
"boolean hasHasInstitutionHomePage();",
"public void verifyUIElements(){\r\n\t\t\tisClickable(Txt_HomePage_Search);\r\n\t\t\tisClickable(Btn_HomePage_Search);\r\n\t\t}",
"@When(\"^user should signout to exit from the loggedin page$\")\n\tpublic void user_should_signout_to_exit_from_the_loggedin_page() throws Throwable {\n\t\telementClick(pa.getAp().getLogout());\n\t\t\n\t \n\t}",
"public void verifyManageProfileLink() {\n profileLink.assertState().enabled();\n profileLink.assertContains().text(\"Manage your user profile\");\n }",
"public boolean validateSignOnShadeIsClosed(){\n return getBtnSignOn().isDisplayed();\n }",
"private void assertDetailScreenContents(String description, String buttonText, String footerText) {\n ViewInteraction imageView3 = onView(\n allOf(withId(R.id.promotion_detail_image), withContentDescription(\"Promotional Image\"), isDisplayed()));\n imageView3.check(matches(isDisplayed()));\n\n // Check promotion description contents\n ViewInteraction textView3 = onView(\n allOf(withId(R.id.promotion_detail), withText(description), isDisplayed()));\n textView3.check(matches(withText(description)));\n\n // Check button name.\n ViewInteraction button = onView(\n allOf(withId(R.id.promotion_button), withText(buttonText), isDisplayed()));\n button.check(matches(isDisplayed()));\n\n // Check footer contents or lack of presence if there isn't one.\n if(footerText == null) {\n onView(withId(R.id.promotion_footer)).check(matches(not(isDisplayed())));\n } else {\n ViewInteraction textView4 = onView(\n allOf(withId(R.id.promotion_footer), withText(footerText), isDisplayed()));\n textView4.check(matches(withText(footerText)));\n }\n\n }",
"@Then(\"^user check is logged in$\")\n public void check_user_logged(){\n log.info(\"try to check if user is logged in\");\n String linkSignOut = pageLogin.getLinkSignOut().getText();\n Assert.assertTrue(linkSignOut.equals(\"Sign out\"), \"There is no visible link sign out\");\n String linkUserName = pageLogin.getLinkUserFullname().getText();\n Assert.assertTrue(linkUserName.equals(\"Antoni Giez\"));\n log.info(\"user is logged in, username - \" + linkUserName);\n }",
"public boolean completelink() throws Exception {\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(completelink);\r\n\t\t\t\tflag = element.isDisplayed() && element.isEnabled();\r\n\t\t\t\tAssert.assertTrue(flag, \"Complete link is not dispalyed and enabled\");\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"USER NAME NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn flag;\r\n\t\t}",
"@Test()\n\tpublic void ValidateNavgation() throws IOException\n\t{\n\t\tLandingPage lp=new LandingPage(driver);\n\t\t\n\t\tAssert.assertTrue(lp.getNavbar().isDisplayed());\n\t\tlog.info(\"Navigated bar is displayed\");\n\t\t\t\n\t\t\t\n\t\t\n\t}",
"public boolean verifyAccountInquiryPage(){\n\t\tboolean isAccountInquiryPagePresent=false;\n\t\tSeleniumUtil.switchToFrame(driver, \"DialogBox_Frame\");\n\t\tString text = SeleniumUtil.getElementWithFluentWait(accountInquiryTitle).getText();\n\t\tSystem.out.println(text);\n\t\tif(text.equalsIgnoreCase(\" Financial Inquiry\")){\n\t\t\tSystem.out.println(\"Account Inquiry Page is opened\");\n\t\t\tSeleniumUtil.getElementWithFluentWait(accountInquiryTitle).sendKeys(Keys.ESCAPE);\n\t\t\tisAccountInquiryPagePresent=true;\n\t\t}\n\t\treturn isAccountInquiryPagePresent;\n\t}",
"@Test(priority=26)\n\tpublic void verifyLoginPageByClickingOnLogoutOptionInDropdown() throws Exception {\n\t\tOverviewTradusPROPage overviewPage= new OverviewTradusPROPage(driver);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.profileIconOnHeader);\n\t click(overviewPage.profileIconOnHeader);\n\t waitTill(1000);\n\t click(overviewPage.logoutOptionInProfileIconDropdown);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.LoginText);\n\t waitTill(1000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/login\"),\n\t \t\t\"Login Page is not displaying by cicking on logout option in dropdown\");\n\t}",
"@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifySubmitMeterReadingLandingPageLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the link navigations of Submit meter read landing page\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage1()\n\t\t.verifySubmitMeterreadLandingPageNavigationLinks();\n}",
"@Test\r\n\tpublic void TC_01_verifyRegistrationPage() {\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t}",
"@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyGlobalNavigationLinks()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Gas Page Navigation Links\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"GloabalSMRGas\");\n\t\tnew SubmitMeterReadAction()\n\t\t.BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .BgbverifyAfterLogin()\n\t .clickSubmitMeterReadLink()\t\n\t\t.verifyGlobalNavigationLink();\n}",
"public void VerifyHomepage(){\r\n\t\t//String username = getValue(Email);\r\n\t//\tString password = getValue(Password);\r\n\r\n\t//\tclass Local {};\r\n\t\t/*Reporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");*/\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\t//driver.findElement(locator_split(\"btn_privacyok\")).click();\r\n\t\tclick(locator_split(\"btn_privacyok\"));\r\n\t\t\t\r\n\t\t\t/*Reporter.log(\"PASS_MESSAGE:- My Account is clicked and user is logged in\");*/\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- User is not logged in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"@Test(priority = 5)\n\tpublic void TC_05_Validate_SchoolComputedValues_Link_Navigation() {\n\t\tString ScreenshotName = new Object(){}.getClass().getEnclosingMethod().getName();\n\n\t\tReporter.log(cm.ReporterText(\"TestCase : \" + ScreenshotName));\n\n\t\tco.click(homePage.schoolComputedValuesLink, \"Clicking on School Computed Value Link in Home Page.\");\n\t\tString actualText=co.getText(homePage.pageTitle,\"Extracting the PageTitle\");\n\t\tcm.captureElementScreenShot(driver, homePage.pageTitle, ScreenshotName, cm.basepath());\n\t\tReporter.log(cm.ReporterLink(ScreenshotName));\n\t\tSystem.out.println(\"Asserting the test case\");\n\n\t\tAssert.assertEquals(actualText, \"Computed Values\", \"The page did not navigate to Computed Values Page.\");\n\t}",
"public void verifyRegisterForNPILink() {\n npiLink.assertState().enabled();\n npiLink.assertContains().text(\"register for a National Provider Identifier (NPI)\");\n }",
"@Test(priority=0)\n\tpublic void verifyOverviewPageAfterLoginToAccount() throws Exception {\n\t\tLoginTradusPROPage loginPage= new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(testUser,pwd);\n\t\tclick(loginPage.LoginButton);\n\t\twaitTill(3000);\n\t explicitWaitFortheElementTobeVisible(driver,loginPage.overviewPageVerificationElement);\n\t waitTill(7000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms\"),\n\t \t\t\"Overview page is not displaying after login to account\");\n\t}",
"private boolean isValidLoginResponse(Response response) {\n\t\treturn response.header(\"Location\").toLowerCase().contains(\"testsession\");\r\n\t}",
"public void welComeLink()\r\n\t{\r\n\t\tboolean welcome = welComeLinkElement.isDisplayed();\r\n\t\tAssert.assertTrue(welcome);\r\n\t\t\r\n\t}",
"public boolean isHomeLinkPresent() {\r\n\t\treturn isElementPresent(groupListSideBar.replace(\"Group List\", \"Home\"), SHORTWAIT);\r\n\t}",
"@Test(priority = 28)\r\n\tpublic void removalUserLinkCheckAnew() {\r\n\tAssert.assertEquals(mainPage.removalUserLinkCheck(), true);\r\n\t}",
"public void verifyChannelsAdminLink() throws UIAutomationException{\r\n\t\telementController.requireElementSmart(fileName,\"Channels Admin\",GlobalVariables.configuration.getAttrSearchList(), \"Channels Admin Link\");\r\n\t\t\t\t\r\n\t\t// Assertion : Check Link is present on page\r\n\t\tString linkText=dataController.getPageDataElements(fileName, \"Channels Admin Link\", \"LinkText\");\r\n\t\tSystem.out.println(linkText);\r\n\t\tUIActions.waitForLinkText(linkText,Integer.parseInt(GlobalVariables.configuration.getConfigData().get(\"TimeOutForFindingElementSeconds\")));\r\n\t}",
"private boolean isMenuPage(Document parsed) {\n boolean isCorrect = false;\n Element heading = parsed.getElementById(\"heading\");\n if (heading == null) {\n return false;\n }\n if (heading.text().equals(DirectoryParser.HEADING_TEST_STRING)) {\n isCorrect = true;\n }\n Elements selected = parsed.getElementsByTag(\"article\");\n if (selected.size() != 1) {\n return false;\n } else {\n Attributes articleAttributes = selected.first().attributes();\n if (articleAttributes.size() != 2) {\n return false;\n }\n if (articleAttributes.asList().contains(new Attribute(\"id\", \"main\"))) {\n if ((articleAttributes.asList().contains(new Attribute(\"class\", \"wholePage\")))) {\n isCorrect = true;\n }\n }\n }\n Element menu = parsed.getElementById(\"sixItems\");\n if (menu == null) {\n return false;\n }\n return isCorrect;\n }",
"public void v_Verify_Guest12_Displayed(){\n\t}",
"public void verifyApplyButtonInAboutMe() throws UIAutomationException{\r\n\t\telementController.requireElementSmart(fileName,\"Apply Button In About Me\",GlobalVariables.configuration.getAttrSearchList(), \"Apply Button In About Me\");\r\n\t\t\t\t\r\n\t\t// Assertion : Check Button is present on page\r\n\t\tString linkText=dataController.getPageDataElements(fileName, \"Apply Button Name In About Me\", \"Name\");\r\n\t\tSystem.out.println(linkText);\r\n // UIActions.waitForLinkText(linkText,Integer.parseInt(GlobalVariables.configuration.getConfigData().get(\"TimeOutForFindingElementSeconds\")));\r\n\t}",
"void Footer() {\n\t\tJPanel panel = new JPanel(new FlowLayout());\r\n\t\tpanel.add(btnLogin);\r\n\t\tpanel.add(btnReset);\r\n\t\t\r\n\t\tadd(panel, BorderLayout.SOUTH);\r\n\t\t\r\n\t\t//Action Listener untuk melakukan action pindah halaman\r\n\t\tbtnLogin.addActionListener(this);\r\n\t\tbtnReset.addActionListener(this);\r\n\t}",
"public boolean verifyPreAdmission_StudentCountReportPage() {\r\n\t\ttry {\r\n\t\t\tSystem.out.println(txt_StudentCountReportPage.getText().trim());\r\n\t\t\ttxt_StudentCountReportPage.isDisplayed();\r\n\t\t\tlog(\"PreAdmission Student Count Report page is dispalyed and object is:-\"\r\n\t\t\t\t\t+ txt_StudentCountReportPage.toString());\r\n\t\t\tThread.sleep(1000);\r\n\t\t\treturn true;\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"@Test(priority=10)\n\tpublic void verifyOverviewLinIsHighlightedByDefaultAfterLogin() throws Exception {\n\t\tOverviewTradusPROPage overviewObj= new OverviewTradusPROPage(driver);\n\t explicitWaitFortheElementTobeVisible(driver,overviewObj.overviewLinkOnSideBar);\n\t Assert.assertTrue(getText(overviewObj.highlightedTab).equals(\"Overview\"),\n\t\t\t\t\"Overview link is not highlighted by default\");\n\t}",
"@Override\r\n public void onClickHome(View view) {\r\n \t// if user is performing an IMCI or CCM assessment then \r\n \t// display a confirmation dialog to confirm that the user wishes \r\n \t// to exit the patient assessment\r\n \texitAssessmentDialogHandler();\r\n }",
"public void ClickSignIn() {\n if (lnkSignIn.isDisplayed()) {\n lnkSignIn.click();\n }\n else{System.out.println(\"Sign In link is not displayed\");\n }\n }",
"public void redirectToHomePageNotLoggedIn() {\r\n\t\t\r\n\t\twebAppDriver.get(baseUrl);//+\"?optimizely_x8236533790=0\"\r\n\t\t/*try {\r\n\t\t\twebAppDriver.verifyElementTextContains(By.id(linkLogoutId), \"Logout\", true);\r\n\t\t\tloginAction.clickOnLogOut();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// this is just to do logout if customer is auto logged in during\r\n\t\t\t// reservation\r\n\t\t}\r\n\t\t*/\r\n\t}",
"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 }",
"boolean hasPageHelper();",
"boolean hasPageHelper();",
"boolean hasPageHelper();",
"@Test\n public void checkLoginAndLogout() {\n mInjector.authentication()\n .authenticateValidUser(USERNAME, PASSWORD)\n .checkMainScreenIsDisplayed(); // Then the main screen appears\n\n mInjector.navigationDrawer()\n .logoutUser(USERNAME) // When the user logs out\n .checkAuthScreenIsDisplayed();\n }",
"boolean hasLandingPageView();",
"@Test\n public void signinvalidation() {\n\t SalesApplicationPage spg = new SalesApplicationPage(driver);\n if(spg.getPopUpSize()>0)\n\t {\n\t\t spg.getPopUp().click();\n\t }\n System.out.println(driver.getTitle());\n Assert.assertTrue(driver.getTitle().equals(\"Home | Salesforrrce\"));\n }",
"public void verifyCollaborationTemplateLink() throws UIAutomationException{\r\n\t\telementController.requireElementSmart(fileName,\"Domain Plan Editor\",GlobalVariables.configuration.getAttrSearchList(), \"Domain Plan Editor link\");\r\n\t\t\t\t\r\n\t\t// Assertion : Check Link is present on page\r\n\t\tString linkText=dataController.getPageDataElements(fileName, \"Collaboration Templates Link\", \"LinkText\");\r\n\t\tUIActions.waitForLinkText(linkText,Integer.parseInt(GlobalVariables.configuration.getConfigData().get(\"TimeOutForFindingElementSeconds\")));\r\n\t}",
"private boolean isConsumerHomePage() throws Exception {\n\n\t\tif (wh.isElementPresent(HomePageUI.verifyHomepage, 3) || \n\t\t\t\twh.isElementPresent(HomePageUI.verifyHomepage1, 3)) {\n\n\t\t\treturn true;\n\t\t} else {\n\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean validateBrokersAndNavigatorsPageisDisplayed() {\n\t\tboolean result = false;\n\n\t\tif (Browser.isDisplayed(\"xpath=.//*[@id='DisplayNavigatorBrokerLandingPage']/div/div/div/div/div/div/div/div/div[5]/a/img\")) {\n\t\t\tresult = true;\n\t\t}\n\n\t\treturn result;\n\t}",
"public void clickOnPriorAuth() {\n\t\tscrollDown(element(\"link_priorAuth\"));\n\t\telement(\"link_priorAuth\").click();\n\t\tlogMessage(\"User clicks on Prior Authorizations on left navigation bar at Physician End\");\n\t}",
"@Test\n\tpublic void LoggedInTest() throws IOException {\n\t\tLoginapp.Loginapp();\n\t\tLoginapp.frameChecking(\".//*[@id='frmLink']/table/tbody/tr[2]/td/table/tbody/tr/td[1]/a[4]\");\n\n\n}",
"public void isRedirectionCorrect() {\n\n\t\tString title = WebUtility.getTitle();\n\t\tAssert.assertEquals(title, data.getValidatingData(\"homepage_Title\"));\n\t\tSystem.out.println(\"Redirection is on the correct page\");\n\t}",
"public void verify_WelcomePopupandclick(){\n\t\tif(isDisplayedWithoutException(welcomePopup)){\n\t\t\tclick(welcomePopup);\n\t\t\tSystem.out.println(\"the Welcome popup is visible on the page and clicked done\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"The Welcome popup is not present on the page\");\n\t\t}\n\t}",
"public void ConfirmSignOut(){\n ReusableActionsPageObjects.clickOnElement(driver, ConfirmSignOut, logger, \"confirm log out\");\n }",
"protected String getPageFooter()\n {\n if (this.pageFooter == null) {\n String copyright = (this.privateLabel != null)? this.privateLabel.getCopyright() : \"\";\n StringBuffer sb = new StringBuffer();\n sb.append(\"<center>\");\n sb.append(\"<hr><span style='font-size:7pt;'>\" + copyright + \"</span>\");\n sb.append(\"</center>\");\n this.pageFooter = sb.toString();\n }\n return this.pageFooter;\n }"
]
| [
"0.68320686",
"0.6485554",
"0.63125974",
"0.6143701",
"0.60663605",
"0.6046109",
"0.60394335",
"0.5970209",
"0.5912447",
"0.5867584",
"0.58541507",
"0.5742739",
"0.5656291",
"0.5611834",
"0.5590033",
"0.55501896",
"0.5540516",
"0.5522345",
"0.54685736",
"0.54583687",
"0.5452997",
"0.5447574",
"0.54115975",
"0.54015344",
"0.5391307",
"0.53706515",
"0.53509146",
"0.53426653",
"0.53426653",
"0.53336585",
"0.53063625",
"0.5281866",
"0.5266746",
"0.5253474",
"0.5204277",
"0.51868254",
"0.5186029",
"0.51775485",
"0.5174181",
"0.51592046",
"0.5145",
"0.51442283",
"0.5113411",
"0.5096189",
"0.50896174",
"0.50741225",
"0.507152",
"0.50652593",
"0.50537336",
"0.50461465",
"0.50393367",
"0.503735",
"0.502983",
"0.5025108",
"0.50239015",
"0.49957794",
"0.49946538",
"0.4991681",
"0.49892992",
"0.49796796",
"0.49653894",
"0.49614015",
"0.49529633",
"0.4937887",
"0.49374235",
"0.4935032",
"0.49337474",
"0.4925175",
"0.4921395",
"0.49121112",
"0.4906803",
"0.49046278",
"0.48951176",
"0.48944396",
"0.48864684",
"0.48808724",
"0.48724648",
"0.48682085",
"0.486372",
"0.4858892",
"0.4857076",
"0.4849191",
"0.4846819",
"0.4842156",
"0.4839322",
"0.4839045",
"0.4839045",
"0.4839045",
"0.4833228",
"0.48281255",
"0.48259094",
"0.48229423",
"0.48179996",
"0.48150995",
"0.48134983",
"0.48048878",
"0.4800473",
"0.480045",
"0.4790351",
"0.47822824"
]
| 0.77612835 | 0 |
Verify the HHS Footer Link in LoginPage. | public void waitForVerifyHhsPage() {
verifyHHSPageElement.waitForState().enabled(30);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void verifyHhsLink() {\n dhhsFooterLink.assertState().enabled();\n dhhsFooterLink.assertContains().text(\"Department of Health & Human Services\");\n }",
"public void verifyCmsLink() {\n cmsFooterLink.assertState().enabled();\n cmsFooterLink.assertContains().text(\"CMS\");\n }",
"public void verifyLogoutPageDisplayed() {\n\t\twaitForPageLoaded();\n\t\t_normalWait(1000);\n\t\tassertByPageTitle(Constants.pageTitle_LoggedoutPage);\n\t}",
"public void verifyAccessibilityLink() {\n accessibilityFooterLink.assertState().enabled();\n accessibilityFooterLink.assertContains().text(\"Accessibility\");\n }",
"public void waitMainLinksInFooter(final String lnk) {\n\n (new WebDriverWait(driver(), 10)).until(new ExpectedCondition<Boolean>() {\n @Override\n public Boolean apply(WebDriver d) {\n List<WebElement> elements = driver().findElements(By.xpath(Locators.FOOTER_ELEMENTS));\n String resultStr = \"\";\n StringBuilder strBuild = new StringBuilder();\n for (WebElement element : elements) {\n strBuild = strBuild.append(element.getText() + \" \");\n }\n\n return strBuild.toString().contains(lnk);\n\n }\n });\n\n }",
"public static void verifyLogOutPageTitleLeadsToLoginPage() {\n click(AMAZON_PAGE_TITLE);\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 validateFooters() {\n\t}",
"public void userIsOnHomePage(){\n\n assertURL(\"\\\"https://demo.nopcommerce.com/\\\" \");\n }",
"@Test(description = \"Go to Login Page From Home Page Header\")\n @Issue(\"EZ-8885\")\n @Description(\"Check the Login button on Header Home Page\")\n void verifyLoginButtonOnMainPage() {\n HomePage homePage = new HomePage(BaseUrl.homePageBaseUrl());\n homePage.open().getHeaderButtonsSection()\n .getLoginAreaButton().clickOnLoginAreaButton(\"https://hotline.ua/login/\");\n\n assertThat(getBrowserConsoleErrors()).isFalse();\n }",
"@Override\n public boolean isFooterDisplayed() {\n\n setLogString(\"Check footer is not displayed\", true, CustomLogLevel.HIGH);\n return isNotDisplayed(getDriver(), By.className(FOOTER_CONTAINER), TINY_TIMEOUT);\n }",
"@Test(priority = 1)\n\tprotected void landingpageVerification() {\n\t\tAssert.assertEquals(spincoLandingPage.isLogoDisplayed(),true);\n\t\tspincoLandingPage.clickLoginRegister();\n\t}",
"public void verifyUserIsOnHomepage()\n {\n asserttextmessage(getTextFromElement(_welcomeTileText),expected,\"user on home page\");\n\n }",
"public void clickOnEmailLink1InFooter() {\n\t By element =By.xpath(\"//a[text()='CE at VIN' ]\");\n\t scrollIntoView(element);\n\t _normalWait(3000);\n\t waitAndClick(emailLink1InFooter);\n\t }",
"@Test\n\tpublic void verifycustomerSupportlink() {\n\t\tKeywords.clickOnElement(PropertiesFile.getLocator(\"Spportlink\")[0],PropertiesFile.getLocator(\"Spportlink\")[1]);\n\t\tSystem.out.println(\"24*7 goCare Support link is Displayed on Header\");\n\t\tConstants.driver.manage().timeouts().implicitlyWait(60,TimeUnit.SECONDS) ;\n\t\tKeywords.terminateBrowser();\n\n\t}",
"public boolean verifyHomePageDisplayed(){\r\n\t\tWebDriver driver = SeleniumDriver.getInstance().getWebDriver();\r\n\t\tWebElement body;\r\n\t\ttry{\r\n\t\t\tbody = driver.findElement(By.tagName(\"body\"));\r\n\t\t\tif(body.getAttribute(\"class\").contains(\"home page\")){\r\n\t\t\t\tmyAssert.setGblPassFailMessage(\"pass\", \"UpTake home page is displayed\");\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tmyAssert.setGblPassFailMessage(\"fail\", \"UpTake home page is not displayed\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t return true;\r\n\t}",
"@Override\r\n\tpublic boolean checkLogout() {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean checkLogout() {\n\t\treturn false;\r\n\t}",
"public void checkOtherFooterLinks(String linkText,String url,String finder,String pageText){\n\t\tWebElement labelLink = driver.findElement(By.xpath(linkText));\n\t\tlabelLink.click();\n\t\tassertTrue(driver.getCurrentUrl().equals(url), \"Page is missing\");\n\t\t\n\t\tif(driver.getCurrentUrl().equals(url)){\n\t\t\tWebElement text = driver.findElement(By.xpath(finder));\n\t\t\tString ideaPageText = text.getText();\n\t\t\tassertEquals(ideaPageText,pageText,\"Text mismatch\");\n\t\t\t}\n\t\tdriver.navigate().back();\n\t\t}",
"@Then(\"^homepage is visible$\")\n\tpublic void homepage_is_visible() throws Throwable {\n\t\tString verify = driver.findElement(By.xpath(\"//marquee[@class='heading3']\")).getText();\n\t\tAssert.assertEquals(verify, \"Welcome To Customer's Page of Guru99 Bank\", \"Error in loading!\");\n\t}",
"public void clickOnEmailLink2InFooter() {\n\t\t_normalWait(2000);\n\t\twaitAndClick(emailLink2InFooter);\n\t }",
"public void verifyOnDashboardPage() {\n verifyUserLoggedIn.waitForState().enabled(30);\n verifyUserLoggedIn.assertContains().text(\"Dev Links\");\n }",
"public void clickToLogoutLink() {\n\t\twaitToElementClickable(driver,RegisterPageUI.LOGOUT_LINK);\n\t\tclickToElement(driver,RegisterPageUI.LOGOUT_LINK);\n\t}",
"@Test\r\n\tpublic void TC_01_verifyRegistrationPage() {\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t}",
"void Footer() {\n\t\tJPanel panel = new JPanel(new FlowLayout());\r\n\t\tpanel.add(btnLogin);\r\n\t\tpanel.add(btnReset);\r\n\t\t\r\n\t\tadd(panel, BorderLayout.SOUTH);\r\n\t\t\r\n\t\t//Action Listener untuk melakukan action pindah halaman\r\n\t\tbtnLogin.addActionListener(this);\r\n\t\tbtnReset.addActionListener(this);\r\n\t}",
"private void checkToLogout() {\n logout();\n checkToHome();\n drawViewSideMenu();\n }",
"public abstract boolean Verifypage();",
"public void redirectToHomePageNotLoggedIn() {\r\n\t\t\r\n\t\twebAppDriver.get(baseUrl);//+\"?optimizely_x8236533790=0\"\r\n\t\t/*try {\r\n\t\t\twebAppDriver.verifyElementTextContains(By.id(linkLogoutId), \"Logout\", true);\r\n\t\t\tloginAction.clickOnLogOut();\r\n\t\t} catch (Exception e) {\r\n\t\t\t// this is just to do logout if customer is auto logged in during\r\n\t\t\t// reservation\r\n\t\t}\r\n\t\t*/\r\n\t}",
"public boolean hasFooter() {\n return hasFooter;\n }",
"public void verifyRegisterLink() {\n registerLink.assertState().enabled();\n registerLink.assertContains().text(\"Register\");\n }",
"private boolean isValidLoginResponse(Response response) {\n\t\treturn response.header(\"Location\").toLowerCase().contains(\"testsession\");\r\n\t}",
"public static void printFooter(String anyValidName){\n System.out.println(\"\\n*** \" + anyValidName+ \" ***\");\n }",
"public void onFooterRefresing();",
"@AfterTest\n\t\tpublic void logout(){\n//Calling method to logout from the account and verify logout message.\n//'**********************************************************\n\t\t\tLogOutPage accountLogoutPage =myWishlistPage.logout();\n\t\t\tAssert.assertTrue(accountLogoutPage.getlogoutMsg().equals(\"Account Logout\"), \"Account Logout message is not displayed\");\n\t\t\textentTest.log(LogStatus.PASS,\"Account Logout message is displayed and the user is signed out from the account\");\n//'**********************************************************\n//Close the report\n//'**********************************************************\n\t\t\textentReports.endTest(extentTest);\n\t\t\textentReports.flush();\n\t\t\textentReports.close();\n\t\t}",
"public void VerifyHomepage(){\r\n\t\t//String username = getValue(Email);\r\n\t//\tString password = getValue(Password);\r\n\r\n\t//\tclass Local {};\r\n\t\t/*Reporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- My Account should be clicked and user should get logged in\");*/\r\n\t\ttry{\r\n\t\t\tsleep(3000);\r\n\t\t\t//driver.findElement(locator_split(\"btn_privacyok\")).click();\r\n\t\tclick(locator_split(\"btn_privacyok\"));\r\n\t\t\t\r\n\t\t\t/*Reporter.log(\"PASS_MESSAGE:- My Account is clicked and user is logged in\");*/\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- User is not logged in\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"LoginLogout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"@Then(\"^user check is logged in$\")\n public void check_user_logged(){\n log.info(\"try to check if user is logged in\");\n String linkSignOut = pageLogin.getLinkSignOut().getText();\n Assert.assertTrue(linkSignOut.equals(\"Sign out\"), \"There is no visible link sign out\");\n String linkUserName = pageLogin.getLinkUserFullname().getText();\n Assert.assertTrue(linkUserName.equals(\"Antoni Giez\"));\n log.info(\"user is logged in, username - \" + linkUserName);\n }",
"public void verifyForgotPwdLink() {\n forgotPasswordLink.assertState().enabled();\n forgotPasswordLink.assertContains().text(\"Forgot your password?\");\n }",
"public void Verify_Page_Header_Visibility()\r\n\t{\r\n\t\t if(Page_header.isDisplayed())\r\n\t\t\t System.out.println(\"header visible at webpage\");\r\n\t\t else\r\n\t\t\t System.out.println(\"header not visible at webpage\");\r\n\t\t\r\n\t}",
"@Test\n public void check_Login_Success() {\n lPage = new LoginPage(webDriver);\n lPage.login(\"admin\",\"admin\");\n hPage = new HomePage(webDriver);\n String loginText = hPage.getHomePageText();\n assertEquals(\"Congratulations!\",loginText);\n }",
"public void Verify_Expected_Header_Visibility()\r\n\t{\r\n\t\tString Runtime_Header_text=Page_header.getText();\r\n\t\tif(Runtime_Header_text.equals(Exp_page_header))\r\n\t\t\tSystem.out.println(\"Expected Header visible at webpage\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Expected Header not visible at webpage\");\r\n\t}",
"@Test(priority = 28)\r\n\tpublic void removalUserLinkCheck() {\r\n\tAssert.assertEquals(mainPage.removalUserLinkCheck(), true);\r\n\t}",
"public void verifyForgotLinkModalWindow() {\n modalWindow.assertState().enabled();\n modalWindow.assertContains().text(\"warningLeaving the PECOS Website\");\n }",
"@When(\"^user should signout to exit from the loggedin page$\")\n\tpublic void user_should_signout_to_exit_from_the_loggedin_page() throws Throwable {\n\t\telementClick(pa.getAp().getLogout());\n\t\t\n\t \n\t}",
"public void waitMainFooterLinks() {\n for (String footerLink : footerLinks) {\n waitMainLinksInFooter(footerLink);\n }\n }",
"public void angelHomePage()\r\n\t{\r\n\t\tResultUtil.report(\"INFO\", \"AngelHomePage > angelHomePage\", driver);\r\n\t\tswitchFrameToAngelContent();\r\n\t\tif(Element.verify(\"Logged in Message\", driver, \"XPATH\", \"//span[@class='pageTitleSpan' and text()='Home']\"))\r\n\t\t{\r\n\t\t\tResultUtil.report(\"PASS\", \"Successfully logged in\", driver);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tResultUtil.report(\"FAIL\", \"Login failed\", driver);\r\n\t\t}\t\t\r\n\t}",
"public void verify_WelcomePopupandclick(){\n\t\tif(isDisplayedWithoutException(welcomePopup)){\n\t\t\tclick(welcomePopup);\n\t\t\tSystem.out.println(\"the Welcome popup is visible on the page and clicked done\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"The Welcome popup is not present on the page\");\n\t\t}\n\t}",
"@Given(\"^Registered user is on the main page of website$\")\n public void registeredUserIsOnTheMainPageOfWebsite() {\n }",
"@Then(\"^User should see home page with profile link$\")\n\tpublic void user_should_see_home_page_with_profile_link() throws Throwable {\n\t\twait.WaitForElement(profilepage.getywalletlink(), 60);\n\t\tprofilepage.verifyloginsuccess();\n\t\tThread.sleep(100);\n\t}",
"public static FooterMyAccountPage getFooterMyAccountPage(WebDriver driver) {\n\t\treturn null;\r\n\t}",
"public void v_Verify_Guest12_Displayed(){\n\t}",
"public void isRedirectionCorrect() {\n\n\t\tString title = WebUtility.getTitle();\n\t\tAssert.assertEquals(title, data.getValidatingData(\"homepage_Title\"));\n\t\tSystem.out.println(\"Redirection is on the correct page\");\n\t}",
"boolean hasHasInstitutionHomePage();",
"@Test\n public void verifyTitleOfHomePageTest()\n {\n\t \n\t String abc=homepage.validateHomePageTitle();\n\t Assert.assertEquals(\"THIS IS DEMO SITE FOR \",abc );\n }",
"@Test(priority=0)\n\tpublic void verifyOverviewPageAfterLoginToAccount() throws Exception {\n\t\tLoginTradusPROPage loginPage= new LoginTradusPROPage(driver);\n\t\tloginPage.setAccountEmailAndPassword(testUser,pwd);\n\t\tclick(loginPage.LoginButton);\n\t\twaitTill(3000);\n\t explicitWaitFortheElementTobeVisible(driver,loginPage.overviewPageVerificationElement);\n\t waitTill(7000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/lms\"),\n\t \t\t\"Overview page is not displaying after login to account\");\n\t}",
"@Then(\"^check the heading of the page$\")\r\n\tpublic void check_the_heading_of_the_page() throws Exception {\n\t\tString heading=driver.findElement(By.xpath(\".//*[@id='mainCnt']/div[1]/div[1]/h1\")).getText();\r\n\t\tif(heading.contentEquals(\"Hotel Booking Application\")) {\r\n\t\t\tSystem.out.println(\"content matched\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"content not matched\");\r\n\t\t}\r\n\t\tThread.sleep(2000);\r\n\t//\tdriver.close();\r\n\t}",
"@Then(\"Admin homepage should be loaded successfully\")\r\npublic void admin_homepage_should_be_loaded_successfully() {\n\r\n\tboolean isloginsuccess=uAdminlogin.isHeaderFound();\r\n\tAssert.assertEquals(isloginsuccess, true);\r\n\t\r\n}",
"public void verifyPage() {\n\t\twaitForPageToLoad();\n\t\tString title = driver.getTitle();\n\t\tSystem.out.println(title);\n\t\tAssert.assertEquals(title,\"News: India News, Latest Bollywood News, Sports News, Business & Political News, National & International News | Times of India\");\n\t}",
"@Test\n public void checkLoginAndLogout() {\n mInjector.authentication()\n .authenticateValidUser(USERNAME, PASSWORD)\n .checkMainScreenIsDisplayed(); // Then the main screen appears\n\n mInjector.navigationDrawer()\n .logoutUser(USERNAME) // When the user logs out\n .checkAuthScreenIsDisplayed();\n }",
"@Then(\"I want to login successfully\")\n\tpublic void output() {\n\t\tact.gethomepage().verifyLoggedUser();\n\n\t\t//String username = linkWelcome.getText();\n\t\t//String login = \"Welcome Admin\";\n\t\t//if (username.equals(login)) {\n\t\t\t//System.out.println(\"User name is correct\");\n\t\t//} else {\n\t\t\t//System.out.println(\"Username is not correct\");\n\n\t\t}",
"public boolean isFooter() {\n return isFooter;\n }",
"@Test\n public void testLogout() {\n assertEquals(SAMPLE_ID, navigationBean.getSessionUser().getUserID());\n assertEquals(\"/facelets/open/index.xhtml?faces-redirect=true\", navigationBean.logout());\n assertEquals(0, navigationBean.getSessionUser().getUserID());\n }",
"@Test\n public void signinvalidation() {\n\t SalesApplicationPage spg = new SalesApplicationPage(driver);\n if(spg.getPopUpSize()>0)\n\t {\n\t\t spg.getPopUp().click();\n\t }\n System.out.println(driver.getTitle());\n Assert.assertTrue(driver.getTitle().equals(\"Home | Salesforrrce\"));\n }",
"@Test(priority=26)\n\tpublic void verifyLoginPageByClickingOnLogoutOptionInDropdown() throws Exception {\n\t\tOverviewTradusPROPage overviewPage= new OverviewTradusPROPage(driver);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.profileIconOnHeader);\n\t click(overviewPage.profileIconOnHeader);\n\t waitTill(1000);\n\t click(overviewPage.logoutOptionInProfileIconDropdown);\n\t explicitWaitFortheElementTobeVisible(driver,overviewPage.LoginText);\n\t waitTill(1000);\n\t Assert.assertTrue(driver.getCurrentUrl().equals(\"https://pro.tradus.com/login\"),\n\t \t\t\"Login Page is not displaying by cicking on logout option in dropdown\");\n\t}",
"public void v_Verify_Guest7_Displayed(){\n\t}",
"@Given(\"^User is on netbanking landing page$\")\r\n public void user_is_on_netbanking_landing_page() throws Throwable {\n System.out.println(\"Navigated to Login URL\");\r\n }",
"private void testFinished() {\n\t\t\tLoginPage.logout(driver());\n\t\t}",
"public void v_Verify_Guest6_Displayed(){\n\t}",
"public void clicklogoutiflogin(String welcome){\r\n\t\tString welcomemess = getValue(welcome);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Logout Button should be clicked if its logged in\");\r\n\t\ttry{\r\n\t\t\tif(getAndVerifyPartialText(locator_split(\"Regwelcomemsg\"),welcomemess)) { \r\n\t\t\t\twaitForElement(locator_split(\"Pancakemenu\"));\r\n\t\t\t\tclick(locator_split(\"Pancakemenu\"));\r\n\t\t\t\twaitForElement(locator_split(\"Logoutbutton\"));\r\n\t\t\t\tclick(locator_split(\"Logoutbutton\"));\r\n\t\t\t\tclick(locator_split(\"Logoutuser\"));\r\n\t\t\t\twaitForPageToLoad(1000);\r\n\t\t\t\twaitForElement(locator_split(\"Pancakemenu\"));\r\n\t\t\t\tSystem.out.println(\"User has been logged out\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- User has been logged out\");\r\n\t\t\t}else{\t\r\n\t\t\t\tSystem.out.println(\"User is not logged in\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- User is not logged in\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Logout button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"Logoutbutton\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"public void setPageFooter(String footer)\n {\n // ignore\n }",
"boolean hasLoginResponse();",
"protected String getPageFooter()\n {\n if (this.pageFooter == null) {\n String copyright = (this.privateLabel != null)? this.privateLabel.getCopyright() : \"\";\n StringBuffer sb = new StringBuffer();\n sb.append(\"<center>\");\n sb.append(\"<hr><span style='font-size:7pt;'>\" + copyright + \"</span>\");\n sb.append(\"</center>\");\n this.pageFooter = sb.toString();\n }\n return this.pageFooter;\n }",
"@Test(priority = 4)\n\tpublic void homePageRedirection() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"HomepageRedirection\");\n\t\tlog.info(\"Starting Redirection validation\");\n\t\thome.isRedirectionCorrect(validate);\n\t\tlog.info(\"Redirection is on the correct page\");\n\t\tlog.info(\"Starting the Hero Image Product Validation testing\");\n\n\t}",
"public boolean verifyAccountInquiryPage(){\n\t\tboolean isAccountInquiryPagePresent=false;\n\t\tSeleniumUtil.switchToFrame(driver, \"DialogBox_Frame\");\n\t\tString text = SeleniumUtil.getElementWithFluentWait(accountInquiryTitle).getText();\n\t\tSystem.out.println(text);\n\t\tif(text.equalsIgnoreCase(\" Financial Inquiry\")){\n\t\t\tSystem.out.println(\"Account Inquiry Page is opened\");\n\t\t\tSeleniumUtil.getElementWithFluentWait(accountInquiryTitle).sendKeys(Keys.ESCAPE);\n\t\t\tisAccountInquiryPagePresent=true;\n\t\t}\n\t\treturn isAccountInquiryPagePresent;\n\t}",
"private org.gwtbootstrap3.client.ui.PanelFooter get_f_PanelFooter36() {\n return build_f_PanelFooter36();\n }",
"@Given(\"^The user is in the login page$\")\n\tpublic void the_user_is_in_the_login_page() throws Throwable {\n\t\tChrome_Driver();\n\t\tlpw =new Login_Page_WebElements();\n\t\tlpw.open_orange_hrm();\n\t}",
"public void verifyLabelSuccessfulLogin() throws IOException {\n\t\tLoginSignupCompanyPage sp = new LoginSignupCompanyPage(driver);\n\t\tlog.info(\"Verifying if Label is available or not\");\n\t\t//JavaScriptExec.sleep();\n\t\tAssert.assertTrue(verifyLabelSuccessfulLogin.getText().contains(BasePage.getCellData(xlsxName, sheetName, 3, 0)),\n\t\t\t\t\"Assert Failed as its unable to search text in Logged in Page\");\n\t}",
"public void verifySessionOneHeading(){\r\n String actualSessionHeading = driver.findElement(By.xpath(sessionHeadingXpathLocator)).getText();\r\n Assert.assertTrue(actualSessionHeading.contains(expectedSessionHeading),\"Session Heading is present.\");\r\n }",
"private void logoutHandler() {\n AlertDialog.Builder builder = new AlertDialog.Builder(context, android.R.style.Theme_DeviceDefault_Dialog);\n builder.setTitle(\"Logout?\");\n builder.setMessage(\"Are you sure you want to logout?\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n Util.setLoggedInFlag(false);\n\n HPIApp.getAppContext().stopService(new Intent(HPIApp.getAppContext(), StepService.class));\n\n Intent intent = new Intent(HomeActivity.this, SplashActivity.class);\n startActivity(intent);\n HomeActivity.this.finish();\n }\n });\n\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n\n builder.show();\n }",
"@Then(\"^Homepage is populated$\")\r\n public void homepage_is_populated() throws Throwable {\n \tSystem.out.println(\"Validated HomePage\");\r\n \r\n }",
"public void verifyRegisterForNPILink() {\n npiLink.assertState().enabled();\n npiLink.assertContains().text(\"register for a National Provider Identifier (NPI)\");\n }",
"public void verifyLearnMoreLink() {\n learnMoreLink.assertState().enabled();\n learnMoreLink.assertContains().text(\"Learn more about registering for an account.\");\n }",
"public void onFooterRefreshComplete() {\n onFooterRefreshComplete(true);\n }",
"public LandingPage doCheckHeaderMenu() {\n if (EXPECTED_HEADER.length != HEADER_MENU.size()) {\n System.out.println(\"Not all headers were found on the page\");\n }\n for (int i = 0; i < HEADER_MENU.toArray().length; i++) {\n HEADER_MENU.get(i).click();\n final String headerName = HEADER_MENU.get(i).getText();\n if (headerName.equals(EXPECTED_HEADER[i])) {\n // exit\n } else {\n // exit\n }\n }\n return this;\n }",
"public final void entryRuleCheckContainsLink() throws RecognitionException {\n try {\n // InternalBrowser.g:704:1: ( ruleCheckContainsLink EOF )\n // InternalBrowser.g:705:1: ruleCheckContainsLink EOF\n {\n before(grammarAccess.getCheckContainsLinkRule()); \n pushFollow(FOLLOW_1);\n ruleCheckContainsLink();\n\n state._fsp--;\n\n after(grammarAccess.getCheckContainsLinkRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"public void v_Verify_Guest4_Displayed(){\n\t}",
"public void v_Verify_Guest8_Displayed(){\n\t}",
"boolean hasLoginapifailhitcount();",
"boolean hasLoginapisuccessfulhitcount();",
"public void v_Verify_Guest5_Displayed(){\n\t}",
"@Override\n\tpublic void onModuleLoad() {\n\t\tButton loginButton = new Button(\"Einloggen\");\n\t\tloginButton.addStyleName(\"loginlogoutButton\");\n\t\tloginButton.addClickHandler(new ClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tWindow.Location.assign(loginurl);\n\t\t\t}\n\n\t\t});\n\t\tsignInLink.getElement().setClassName(\"login-area\");\n\t\tsignInLink.setTitle(\"sign out\");\n\t\tloginImage.getElement().setClassName(\"login-image\");\n\t\tloginPanel.add(loginButton);\n\t\tHTML starttext = new HTML(\"<h2>Willkommen bei Hakuna Contacta</h2><div id=\\\"startlogin\\\">So funktionierts:<br>1. Kontakte ausw\\u00E4hlen<br>2. Exportfelder ausw\\u00E4hlen<br>3. Download der Exportdatei<br>(4. Als Quelldatei f\\u00FCr Word Serienbrief verwenden)</div><div id=\\\"gcontacts2word\\\"><img src=\\\"images/gcontacts2word.png\\\"><p class=\\\"whitetext\\\">Exportformate - CSV (Word-Serienbrief), CSV (Komma getrennt), vCARD, xCard (XML) </p></div><div id=\\\"arrow1\\\"><img src=\\\"images/arrow1.png\\\"/></div>\");\n\t\tRootPanel.get(\"content\").add(starttext);\n\n\t\tRootPanel.get(\"loginPanelContainer\").add(loginPanel);\n\t\tRootPanel.get(\"footer\").clear();\n\t\tHTML footerimage = new HTML(\"<img src=\\\"images/1.jpg\\\">\");\n\t\tRootPanel.get(\"footer\").add(footerimage);\n\t\tfinal StringBuilder userEmail = new StringBuilder();\n\t\tgreetingService.login(GWT.getHostPageBaseURL(),\n\t\t\t\tnew AsyncCallback<LoginInfo>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(final Throwable caught) {\n\t\t\t\t\t\tGWT.log(\"login -> onFailure\");\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(final LoginInfo result) {\n\t\t\t\t\t\tif (result.getName() != null\n\t\t\t\t\t\t\t\t&& !result.getName().isEmpty()) {\n\t\t\t\t\t\t\taddGoogleAuthHelper();\n\t\t\t\t\t\t\tloadLogout(result);\n\t\t\t\t\t\t\tButton logoutButton = new Button(\"Ausloggen\");\n\t\t\t\t\t\t\tlogoutButton.addStyleName(\"loginlogoutButton\");\n\t\t\t\t\t\t\tloginPanel.clear();\n\t\t\t\t\t\t\tlogoutButton.addClickHandler(new ClickHandler() {\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\t\t\t\t\t\tthisClientEngine.exitSession();\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tloginPanel.add(logoutButton);\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tloadLogin(result);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tuserEmail.append(result.getEmailAddress());\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t}",
"public void v_Verify_Guest3_Displayed(){\n\t}",
"@Override // com.android.settings.wifi.dpp.WifiDppQrCodeBaseFragment\n public boolean isFooterAvailable() {\n return false;\n }",
"boolean hasAccountLink();",
"public PageBase click_on_login_submit_form_button () {\r\n HomePageClass homePage = new HomePageClass(driver);\r\n\r\n LGN_Login_submitBTN.click();\r\n\r\n WebDriverWait wait = getWait();\r\n wait.until(ExpectedConditions.visibilityOf(homePage.logout));\r\n\r\n return homePage;\r\n\r\n }",
"@Test(description = \"Verify Login page elements\")\n @Issue(\"EZ-8885\")\n void verifyTextElementsOnLoginPage() {\n LoginPage loginPage = new LoginPage(BaseUrl.loginPageBaseUrl());\n loginPage.open().getPageLogoLink();\n loginPage.getSectionTitle();\n loginPage.getTitleRelatedToFields();\n\n\n SoftAssertions softly = new SoftAssertions();\n softly.assertThat(loginPage.getPageLogoLink()).isEqualTo(\"https://hotline.ua/public/i/logo-v2.svg\");\n softly.assertThat(loginPage.getSectionTitle()).isEqualTo(\"Вход\");\n softly.assertThat(loginPage.getTitleRelatedToFields()).isEqualTo(\"Заполните поля\");\n softly.assertThat(getBrowserConsoleErrors()).isFalse();\n softly.assertAll();\n }",
"private boolean isConsumerHomePage() throws Exception {\n\n\t\tif (wh.isElementPresent(HomePageUI.verifyHomepage, 3) || \n\t\t\t\twh.isElementPresent(HomePageUI.verifyHomepage1, 3)) {\n\n\t\t\treturn true;\n\t\t} else {\n\n\t\t\treturn false;\n\t\t}\n\t}",
"@Test\n\tpublic void checkValidLoginCommissioner() {\n\t\ttest = report.createTest(\"CheckValidLoginCommissioner\");\n\t\t\n\t\tcommissionerhomepage = loginpage.successfullLoginCommissioner(UserContainer.getCommissioner());\n\t\ttest.log(Status.INFO, \"Signed in\");\n\t\t\n\t\tAssert.assertEquals(commissionerhomepage.getUserNameText(), UserContainer.getCommissioner().getLogin());\n\t\ttest.log(Status.PASS, \"Checked if the right page is opened.\");\n\t\t\n\t\tloginpage = commissionerhomepage.clickLogout();\n\t\ttest.log(Status.INFO, \"Signed off\");\n\t}",
"@Test(priority = 28)\r\n\tpublic void removalUserLinkCheckAnew() {\r\n\tAssert.assertEquals(mainPage.removalUserLinkCheck(), true);\r\n\t}",
"@Test\r\n\tpublic void TC_09_verify_Passowrd_Does_Not_Match_with_confirm_password() {\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t// Step 1: Verify the registration page is displayed\r\n\t\t\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t\t\r\n\t\t// Step 2: Enter valid/mandatory registration details with both password and confirm password do'nt match\r\n\t\t\r\n\t\tregPgObj.enterRegistrationDetails(\"firstName\", firstName);\r\n\t\tregPgObj.enterRegistrationDetails(\"lastName\", lastName);\r\n\t\tregPgObj.enterRegistrationDetails(\"email\", email);\r\n\t\tregPgObj.enterRegistrationDetails(\"password\", password);\r\n\t\tregPgObj.enterRegistrationDetails(\"confirmPassword\", \"test12345\");\r\n\t\t\r\n\t\t// Step 3: Click on Sign in button\r\n\t\t\r\n\t\tregPgObj.clickSignInButton();\r\n\t\t\r\n\t\t// Step 4: Verify user should NOT be able to proceed further with registration as proper validation message regarding password and confirm\r\n\t\t// password do'nt match is displayed\r\n\t\t\r\n\t\terrMsg = Page_Registration.getpswdErrMsg();\r\n\t\tAssert.assertEquals(errMsg, \"The password you entered does not match\");\r\n\r\n\t}",
"public void v_Verify_Guest2_Displayed(){\n\t}"
]
| [
"0.76709867",
"0.66410375",
"0.6204624",
"0.6113167",
"0.6095075",
"0.6084362",
"0.6050671",
"0.60461175",
"0.6041833",
"0.59758604",
"0.5937797",
"0.58741295",
"0.58598006",
"0.58431417",
"0.57324725",
"0.5715755",
"0.5674635",
"0.5674635",
"0.5653528",
"0.5647157",
"0.56122524",
"0.5600971",
"0.5571336",
"0.55006707",
"0.54941195",
"0.5477845",
"0.5448595",
"0.54338086",
"0.5428984",
"0.54200065",
"0.5394535",
"0.5366155",
"0.5361268",
"0.53356254",
"0.5333693",
"0.5329816",
"0.5313643",
"0.5308806",
"0.52641666",
"0.5257653",
"0.52435416",
"0.5241647",
"0.52264535",
"0.52223885",
"0.519589",
"0.5182271",
"0.51820695",
"0.51755697",
"0.5144448",
"0.5142737",
"0.51300526",
"0.5121292",
"0.5109383",
"0.5102689",
"0.5086062",
"0.50699276",
"0.50676566",
"0.50612533",
"0.50559366",
"0.50439626",
"0.50394845",
"0.5037646",
"0.50277454",
"0.5022676",
"0.5018083",
"0.5017752",
"0.50174046",
"0.50150496",
"0.50074005",
"0.500452",
"0.5000666",
"0.49973336",
"0.49801427",
"0.49747956",
"0.497276",
"0.49597222",
"0.495865",
"0.49504554",
"0.4948748",
"0.49481502",
"0.49452358",
"0.49429503",
"0.49422443",
"0.49291041",
"0.4928634",
"0.49262396",
"0.49245092",
"0.49191958",
"0.49129844",
"0.49118105",
"0.4911243",
"0.49075812",
"0.49057978",
"0.49056232",
"0.49035332",
"0.49001363",
"0.49001133",
"0.48978597",
"0.48976082",
"0.48850036"
]
| 0.5239874 | 42 |
Switch to the Modal window and verify the right modal window is opened. | public void verifyForgotLinkModalWindow() {
modalWindow.assertState().enabled();
modalWindow.assertContains().text("warningLeaving the PECOS Website");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testShowModalDialog() {\n System.out.println(\"showModalDialog\");\n Wizard instance = new Wizard();\n int expResult = 0;\n int result = instance.showModalDialog();\n assertEquals(expResult, result);\n }",
"public static void goToEditSongWindow()\n {\n EditSongWindow editSongWindow = new EditSongWindow();\n editSongWindow.setVisible(true);\n editSongWindow.setFatherWindow(actualWindow, false);\n }",
"public boolean isStartAsModal();",
"@Test(groups=\"swithorAlert\")\n\tpublic void switchWindow() {\n\t\t\n\t\tWebElement newtabButton = driver.findElement(By.id(\"new-tab-button\"));\n\t\tAssert.assertNotNull(newtabButton, \"New tab button not present\");\n\t\tnewtabButton.click();\n\t\t\n\t\t\n\t\tString orgHandle = driver.getWindowHandle();\n\t\tfor (String handle: driver.getWindowHandles())\n\t\t{\n\t\t\tif(!handle.equals(orgHandle)) {\n\t\t\t\tdriver.switchTo().window(handle);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Switched window Url=\"+driver.getCurrentUrl());\n\t\t\n\t\t// Click on Alert\n\t\t\n\t}",
"public void switchToNewlyOpenedWindow(){\n\n\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t\tdriver.getWindowHandles();\n\t\t\tfor(String handle : driver.getWindowHandles())\n\t\t\t{\n\t\t\t\tdriver.switchTo().window(handle);\n\t\t\t}\n\t\t\tLOGGER.info(\"Step : Switching to New Window : Pass\");\n\t\t} catch (InterruptedException e) {\n\t\t\tLOGGER.error(\"Step : Switching to New Window : Fail\");\n\t\t\t//e.printStackTrace();\n\t\t\tthrow new NotFoundException(\"Exception while switching to newly opened window\");\n\t\t}\n\t}",
"protected boolean hasModalWindow() {\n return false;\n }",
"public void testIsModal() {\n System.out.println(\"isModal\");\n Wizard instance = new Wizard();\n boolean expResult = false;\n boolean result = instance.isModal();\n assertEquals(expResult, result);\n }",
"boolean isPopUpOpened();",
"public boolean do_modal() {\r\n\t\tRectangle rectangle = get_rectangle_from_environment_file();\r\n\t\tif ( null == rectangle)\r\n\t\t\treturn do_modal( getOwner(), _minimumWidth, _minimumHeight);\r\n\t\telse\r\n\t\t\treturn do_modal( rectangle);\r\n\t}",
"@Test(priority = 3)\r\n\t//@BeforeMethod\r\n\tpublic void NavigateToPDPPage() throws Exception\r\n\t{\r\n\t\tthis.driver=driver;\r\n Click_Action.Btn_Click(PageObjectModal.WISE_HomePage_Page.WISE_SearchPDPLink, 6, 6,\"Xpath\");\r\n Thread.sleep(1000);\r\n \r\n //**\r\n Set<String> AllWindowHandles = driver.getWindowHandles();\r\n String window1 = (String) AllWindowHandles.toArray()[0];\r\n System.out.print(\"window1 handle code = \"+AllWindowHandles.toArray()[0]);\r\n String window2 = (String) AllWindowHandles.toArray()[1];\r\n System.out.print(\"\\nwindow2 handle code = \"+AllWindowHandles.toArray()[1]);\r\n driver.switchTo().window(window2);\r\n \r\n //**\r\n AssertCls.AssertText(PageObjectModal.WISE_HomePage_Page.WISE_PDPProdName, 6, 6, 6, 5,\"Xpath\");\r\n //AssertCls.AssertText(PageObjectModal.WISE_HomePage_Page.WISE_SearchPDPLink, 1, 2, 5, 5);\r\n //driver.close();\r\n //driver.switchTo().window(window1);\r\n driver.switchTo().window(window1).close();\r\n driver.switchTo().window(window2);\r\n //driver.close();\r\n\t\t\r\n\t\t\t\t\r\n\t}",
"public static void goToPlaylistChooserWindow()\n {\n PlaylistChooser playlistChooser = new PlaylistChooser();\n playlistChooser.setVisible(true);\n playlistChooser.setFatherWindow(actualWindow, false);\n }",
"public void showModalWindow() {\n Stage dialog = new Stage();\n dialog.initOwner(stage);\n dialog.initModality(Modality.WINDOW_MODAL); \n dialog.showAndWait();\n }",
"private void openExitWindowConfirmation() {\n\t\t// int opcion = JOptionPane.showConfirmDialog(this, \"Desea salir del\n\t\t// Chat\", \"Confirmación\",\n\t\t// JOptionPane.YES_NO_OPTION);\n\t\t// if (opcion == JOptionPane.YES_OPTION) {\n\t\tthis.setVisible(false);\n\t\t// }\n\t}",
"public void verifyNewTabDorMessageBoardsOpened() {\n Assert.assertTrue(boardButton.isDisplayed());\t\t\n\t}",
"public void verifyCourseSuggestionLoadedInNewWindow() {\n Assert.assertTrue(ContactLabelCourseSuggestionPage.isDisplayed());\n }",
"public void proceedOnPopUp() {\n Controllers.button.click(proceedToCheckOutPopUp);\n }",
"public void showPopupModal() {\n log.info(\"OrdersBean : showPopupModal\");\n showPopup = true;\n if (getParam(\"idOrder\") != null) {\n int idOrder = parseInt(getParam(\"idOrder\"));\n ordersEntity = ordersServices.findById(idOrder);\n contractsBean.findAllContractsWhenFindOrders(ordersEntity.getId());\n }\n }",
"public void verifyMyActivityPageSuccessfullyDisplayedInNewWindow()\n\t{\n\t\tgetDriver().navigate().refresh();\n\t\tAssert.assertTrue(MyActivitiesHeader.isDisplayed());\n\t\t\n\t}",
"public void verifyCourseInfoPageSuccessfullyDisplayedInNewWindow(){\n\t\tgetDriver().navigate().refresh();\n\t\tAssert.assertTrue(enrollNowButton.isDisplayed());\n\t\t\n\t}",
"public void verifyPrintPageOpenedInNewWindow() {\n\t Assert.assertTrue(printPreviewApp.isDisplayed());\n\t}",
"public void verifyVINCERegistrationPageInNewWindow() {\n\t\tAssert.assertTrue(notAUserText.isDisplayed());\n\t\t_normalWait(3000);\n\t}",
"public void activateScreen() {\n\t\tString currentWindowHandle = web.driver.getWindowHandle();\r\n\r\n\t\t// run your javascript and alert code\r\n\t\t((JavascriptExecutor) web.driver).executeScript(\"alert('Test')\");\r\n\t\tweb.switchTo.alert().accept();\r\n\r\n\t\t// Switch back to to the window using the handle saved earlier\r\n\t\tweb.switchTo.window(currentWindowHandle);\r\n\t}",
"public static void switchToChildWindow() {\n\t\tString mainWindow = driver.getWindowHandle();\n\t\tSet<String> windows = driver.getWindowHandles();\n\t\tfor (String window : windows) {\n\t\t\tif (!window.equals(mainWindow)) {\n\t\t\t\tdriver.switchTo().window(window);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void test_rf_continue_button_opens_correct_activity() {\n //Click the positive button in the dialog\n onView(withText(\"I understand\")).perform(click());\n //Find the views and perform action\n onView(withId(R.id.redFlag_continue)).perform(click());\n //Check if action returns desired outcome\n intended(hasComponent(ObservableSignsActivity.class.getName()));\n }",
"public static void switchToChildWindow() {\t\t\n\t\tString parent = Constants.driver.getWindowHandle();\n\t\tLOG.info(\"Parent window handle: \" +parent);\n\t\tSet <String> windows = Constants.driver.getWindowHandles();\n\t\tIterator <String> itr = windows.iterator();\n\t\twhile (itr.hasNext()) {\n\t\t\tString child = itr.next();\n\t\t\tif (!child.equals(parent)) {\n\t\t\t\tLOG.info(\"Child window handle: \" +child);\n\t\t\t\tConstants.driver.switchTo().window(child);\n\t\t\t} else {\n\t\t\t\tLOG.error(\"Parent(main) and child window hanldles are same.\");\n\t\t\t}\n\t\t}\n\n\t}",
"@And(\"^I pass control to another window$\")\n\tpublic void switchControl(){\n\t\tString result = selenium.switchControl();\n\t\tAssert.assertEquals(selenium.result_pass, result);\n\t}",
"@FXML\n public void loginButtonPressed()\n {\n viewModel.validateLogin();\n mainView.setWindow(\"P\");\n\n }",
"public void switchToParentWindow() throws InterruptedException {\n\t\tSet<String>windowid=driver.getWindowHandles();\n\t\tIterator<String>itr=windowid.iterator();\n\t\tString mainwindow=itr.next();\n\t\tString childwindow=itr.next();\n\t\tdriver.close();\n\t\tdriver.switchTo().window(mainwindow);\n\t\tdriver.switchTo().defaultContent();\n\t\tThread.sleep(5000);\n\t\t\n\t}",
"public void SwitchToWindow(String handle)\n\t{\n\t}",
"public void openLogin(String message, boolean sameName) {\t\n\t\t\n\t\t//RegisterLoginPopup.disposeWindow();\n\t\tWindow[] windows = Window.getWindows();\n for (Window window : windows) {\n if (window instanceof JDialog) {\n JDialog dialog = (JDialog) window;\n if (dialog.getContentPane().getComponentCount() == 1\n && dialog.getContentPane().getComponent(0) instanceof JOptionPane){\n dialog.dispose(); \n }\n }\n }\n\t\t\n\t}",
"public void click_click_CloseModal_Button(){\r\n\t\tclick_CloseModal_Button.click();\r\n\t}",
"private boolean showModal(String resource, String title, Object params) throws Exception {\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(getClass().getResource(resource));\r\n AnchorPane page = loader.load();\r\n\r\n // Create the dialog Stage.\r\n Stage dialogStage = new Stage();\r\n dialogStage.setTitle(title);\r\n dialogStage.initModality(Modality.WINDOW_MODAL);\r\n dialogStage.initOwner(primaryStage);\r\n Scene scene = new Scene(page);\r\n dialogStage.setScene(scene);\r\n\r\n IDataStateModalController controller = loader.getController();\r\n controller.setDialogStage(dialogStage);\r\n controller.setParams(params);\r\n controller.setState(this, this.dataState);\r\n\r\n // Show the dialog and wait until the user closes it\r\n dialogStage.showAndWait();\r\n\r\n return controller.isOkClicked();\r\n }",
"public void check_openfile_window_Presence() throws InterruptedException {\r\n\t\tdriver.switchTo().activeElement();\r\n\t\tWebElement openfile_window = driver.findElementByName(\"How do you want to open this file?\");\r\n\t\tThread.sleep(3000);\r\n\t\t// return IsElementVisibleStatus(openfile_window);\r\n\t\tWebElement openfile_Adobe = driver.findElementByName(\"Adobe Reader\");\r\n\t\tclickOn(openfile_Adobe);\r\n\t\tWebElement ConfirmButton_ok = driver.findElementByAccessibilityId(\"ConfirmButton\");\r\n\t\tclickOn(ConfirmButton_ok);\r\n\t\tdriver.switchTo().activeElement();\r\n\t}",
"public void testSetModal() {\n System.out.println(\"setModal\");\n boolean b = false;\n Wizard instance = new Wizard();\n instance.setModal(b);\n }",
"@FXML\r\n void onActionDisplayMainScreen(ActionEvent event) throws IOException {\r\n\r\n //EXCEPTION SET 2 REQUIREMENT\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setTitle(\"Confirmation Dialog\");\r\n alert.setHeaderText(\"Changes not Saved\");\r\n alert.setContentText(\"Would you like to continue?\");\r\n\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.get() == ButtonType.OK){\r\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\r\n scene = FXMLLoader.load(getClass().getResource(\"MainScreen.fxml\"));\r\n stage.setScene(new Scene(scene));\r\n stage.show();\r\n }\r\n }",
"@Test(priority = 4)\r\n\tpublic void PDPPage_TabsDIsplay() throws Exception\r\n\t{\r\n\t\tthis.driver=driver;\r\n Click_Action.Btn_Click(PageObjectModal.WISE_PDPPage_Page.PDP_TroubleShoot_CSS, 7, 6,\"CSS\");\r\n \r\n //Thread.sleep(1000);\r\n AssertCls.AssertText(PageObjectModal.WISE_PDPPage_Page.PDP_TroubleShootTitle_CSS, 7, 6, 7, 5,\"CSS\");\r\n\r\n Click_Action.Btn_Click(PageObjectModal.WISE_PDPPage_Page.PDP_HowTo_CSS, 8, 6,\"CSS\");\r\n \r\n Thread.sleep(1000);\r\n AssertCls.AssertText(PageObjectModal.WISE_PDPPage_Page.PDP_HowToTitle_CSS, 8, 6, 8, 5,\"CSS\");\r\nClick_Action.Btn_Click(PageObjectModal.WISE_PDPPage_Page.PDP_ProdInfo_CSS, 9, 6,\"CSS\");\r\n \r\n Thread.sleep(1000);\r\n AssertCls.AssertText(PageObjectModal.WISE_PDPPage_Page.PDP_ProdInfoTitle_CSS, 9, 6, 9, 5,\"CSS\");\r\n /*\r\n //**\r\n Set<String> AllWindowHandles = driver.getWindowHandles();\r\n String window1 = (String) AllWindowHandles.toArray()[0];\r\n System.out.print(\"window1 handle code = \"+AllWindowHandles.toArray()[0]);\r\n String window2 = (String) AllWindowHandles.toArray()[1];\r\n System.out.print(\"\\nwindow2 handle code = \"+AllWindowHandles.toArray()[1]);\r\n driver.switchTo().window(window2);\r\n \r\n //**\r\n */\r\n \r\n // driver.close();\r\n //driver.switchTo().window(window1);\r\n //driver.close();\r\n\t\t\r\n\t\t\t\t\r\n\t}",
"public void switchToWindow(int index) {\n\t\ttry {\r\n\t\t\tSet<String> allWindows = getter().getWindowHandles();\r\n\t\t\tList<String> allhandles = new ArrayList<String>(allWindows);\r\n\t\t\tString windowIndex = allhandles.get(index);\r\n\t\t\tgetter().switchTo().window(windowIndex);\r\n\t\t\tSystem.out.println(\"The Window With index: \"+index+\r\n\t\t\t\t\t\" switched successfully\");\r\n\t\t} catch (NoSuchWindowException e) {\r\n\t\t\tSystem.err.println(\"The Window With index: \"+index+ \" not found\");\t\r\n\t\t}\t\r\n\t}",
"public static void goToAboutWindow()\n {\n AboutWindow aboutWindow = new AboutWindow();\n aboutWindow.setVisible(true);\n aboutWindow.setFatherWindow(actualWindow, false);\n }",
"public void waitModalWindow(By waitForElement) {\n\t\tBaseWaitingWrapper.waitForElementToBeVisible(waitForElement, driver);\r\n\t\t\r\n\r\n\t}",
"@FXML\n void openMenuWindow() {\n window.setTitle(\"Timelines: Menu\");\n window.setScene(menuScene);\n window.show();\n window.requestFocus();\n\n messageLabel.setVisible(true);\n }",
"@Test\n\tpublic void testClickOnOkayButton() {\n\n\t\tvar prompt = openPrompt();\n\t\tprompt.getOkayButton().click();\n\t\tassertNoDisplayedModalDialog();\n\t\tassertPromptInputApplied();\n\t}",
"Intent getOpenInOtherWindowIntent();",
"public void Rooms_and_Guests() \r\n\t{\r\n\t\tExplicitWait(roomsandguests);\r\n\t\tif (roomsandguests.isDisplayed()) \r\n\t\t{\r\n\t\t\troomsandguests.click();\r\n\t\t\t//System.out.println(\"roomsandguests popup opened successfully\");\r\n\t\t\tlogger.info(\"roomsandguests popup opened successfully\");\r\n\t\t\ttest.log(Status.PASS, \"roomsandguests popup opened successfully\");\r\n\r\n\t\t} else {\r\n\t\t\t//System.out.println(\"roomsandguests popup not found\");\r\n\t\t\tlogger.error(\"roomsandguests popup not found\");\r\n\t\t\ttest.log(Status.FAIL, \"roomsandguests popup not found\");\r\n\r\n\t\t}\r\n\t}",
"private static boolean switchWindow(WebDriver webDriver, String windowTitle) throws Exception {\n boolean found = false;\n long start = System.currentTimeMillis();\n while (!found) {\n for (String name : webDriver.getWindowHandles()) {\n try {\n webDriver.switchTo().window(name);\n if (webDriver.getTitle().equals(windowTitle)) {\n found = true;\n break;\n }\n } catch (NoSuchWindowException wexp) {\n // some windows may get closed during Runtime startup\n // so may get this exception depending on timing\n System.out.println(\"Ignoring NoSuchWindowException \" + name);\n }\n }\n Thread.sleep(1000);\n if ((System.currentTimeMillis() - start) > 10*1000) {\n break;\n }\n }\n\n if (!found) {\n System.out.println(windowTitle + \" not found\");\n }\n return found;\n }",
"public static void windowspwcw() {\n\t\tString windowHandle = driver.getWindowHandle();\n\t\tSystem.out.println(\"parent window is: \"+windowHandle);\n\t\tSet<String> windowHandles = driver.getWindowHandles();\n\t\tSystem.out.println(\"child window is \"+windowHandles);\n\t\tfor(String eachWindowId:windowHandles)\n\t\t{\n\t\t\tif(!windowHandle.equals(eachWindowId))\n\t\t\t{\n\t\t\t\tdriver.switchTo().window(eachWindowId);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}",
"@Test\n\tpublic void testClickOnBackdrop() {\n\n\t\tvar prompt = openPrompt();\n\t\tprompt.getBackdrop().click();\n\t\tassertNoDisplayedModalDialog();\n\t\tassertPromptInputNotApplied();\n\t}",
"private void openManagementWindow() {\n\n\t\tWindowManager.getInstance().openManagementWindow();\n\t\t// Close the current window\n\t\tthis.close();\n\t}",
"public void testMainMenu() {\n // open and close New Project wizard\n NewProjectWizardOperator.invoke().close();\n\n //workaround for issue 166989\n if (System.getProperty(\"os.name\").equals(\"Mac OS X\")) {\n try {\n new NbDialogOperator(\"Warning\").close();\n } catch (TimeoutExpiredException e) {\n }\n }\n }",
"public void switchToWindow(String handle)\n\t{\n\t\ttry {\n\t\t\tdriver.switchTo().window(handle);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\tLOGGER.error(\"Step : Switching to New Window : Fail\");\n\t\t\t//e.printStackTrace();\n\t\t\tthrow new NotFoundException(\"Exception while switching to window\");\n\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tStudentManagement studentManagement =new StudentManagement();\n\t\t\t studentManagement.setModal(true);\n\t\t\t studentManagement.setVisible(true);\n\t\t\t}",
"public void switchToDefaultWindow() {\n\n\t}",
"public void backToLoginWindow(ActionEvent event) {\n loadLogin();\n // hides current stage (window)\n ((Node) (event.getSource())).getScene().getWindow().hide();\n\n }",
"@Test\n public void basicPromptConfirmHandlingChangeAndDismissTest(){\n\n WebElement promptButton = driver.findElement(By.id(\"promptexample\"));\n WebElement promptResult = driver.findElement(By.id(\"promptreturn\"));\n\n assertEquals(\"pret\", promptResult.getText());\n promptButton.click();\n\n String alertMessage = \"I prompt you\";\n Alert promptAlert = driver.switchTo().alert();\n assertEquals(alertMessage,promptAlert.getText());\n\n promptAlert.sendKeys(\"Hello\");\n promptAlert.dismiss();\n assertEquals(\"pret\", promptResult.getText());\n }",
"public static void switchtoWindows() throws CheetahException {\n\t\tCheetahEngine.logger.logMessage(null, \"SeleniumActions\", \"Attempting to Switch to Window\", Constants.LOG_INFO);\n\t\ttry {\n\t\t\tThread.sleep(3000);\n\t\t\tString winHandleBefore = CheetahEngine.getDriverInstance().getWindowHandle();\n\t\t\tCheetahEngine.cheetahForm.setParentHandle(winHandleBefore);\n\t\t\tCheetahEngine.handleStack.push(winHandleBefore);\n\t\t\tCheetahEngine.logger.logMessage(null, \"SeleniumActions\", \"Parent Window Handle: \" + winHandleBefore,\n\t\t\t\t\tConstants.LOG_INFO);\n\t\t\tSet<String> handles = CheetahEngine.getDriverInstance().getWindowHandles();\n\t\t\tfor (String handle : handles) {\n\t\t\t\tif (!handle.equalsIgnoreCase(winHandleBefore) && !checkHandleInStack(handle)) {\n\t\t\t\t\tThread.sleep(5000);\n\t\t\t\t\tCheetahEngine.logger.logMessage(null, \"SeleniumActions\",\n\t\t\t\t\t\t\t\"Switching to Child Windows Handle: \" + handle, Constants.LOG_INFO);\n\t\t\t\t\tCheetahEngine.getDriverInstance().switchTo().window(handle);\n\t\t\t\t\tString winHandleChild = handle;\n\t\t\t\t\tCheetahEngine.cheetahForm.setChildHandle(winHandleChild);\n\t\t\t\t}\n\t\t\t\tThread.sleep(3000);\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t\tthrow new CheetahException(e);\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\t\t}\n\t}",
"public void openNewWindow(Stage oldStage, String sSceneName, boolean isModal) {\n\n\t\tStage newStage = new Stage();\n\t\tParent root = loadScene(sSceneName);\n\n\t\tScene scene = new Scene(root);\n\t\tscene.getStylesheets().add(\"/styles/Styles.css\");\n\t\tnewStage.setTitle(\"Cronote\");\n\t\tnewStage.setScene(scene);\n\t\tif (isModal) {\n\t\t\tnewStage.initOwner(oldStage);\n\t\t\tnewStage.initModality(Modality.APPLICATION_MODAL);\n\t\t}\n\t\tnewStage.show();\n\t\tif (!isModal) {\n\t\t\tcloseOldStage(oldStage, newStage);\n\t\t}\n\t}",
"public void popResultDialog(int index) {\n JFrame frame = (JFrame) SwingUtilities.windowForComponent(this);\n if (frame != null && index > 0 && index < listRank.size()) {\n Record record = listRank.get(index);\n ResultDetailDialog dialog = new ResultDetailDialog(frame, record);\n dialog.setModal(true);\n int x = frame.getX() + (frame.getWidth() - dialog.getWidth()) / 2;\n int y = frame.getY() + (frame.getHeight() - dialog.getHeight()) / 2;\n dialog.setLocation(x, y);\n dialog.setVisible(true);\n }\n }",
"@Test\n\tvoid HandleWindowPopUp() throws InterruptedException {\n\t\t//Invoke Browser\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"/Users/Suvarna/Downloads/chromedriver\");\n\t\tWebDriver driver = new ChromeDriver();\n\t\t\n\t\t//Launch the website\n\t\tdriver.get(\"http://www.popuptest.com/goodpopups.html\");\n\t\t\n\t\t// Click on the pop-up3 link\n\t\tdriver.findElement(By.xpath(\"/html/body/table[2]/tbody/tr/td/font/b/a[3]\")).click();\n\t\t\n\t\t// wait for 2 second\n\t\tThread.sleep(2000);\n\t\t\n\t\t// Call method to handle window \n\t\tSet<String> handler = driver.getWindowHandles();\n\t\tIterator<String> it = handler.iterator();\n\t\t\n\t\t// get the parent window id\n\t\tString parentWindowId = it.next();\n\t\tSystem.out.println(\"Parent Window id: \"+ parentWindowId);\n\t\t\n\t\t// Get the Pop-up window id\n\t\tString childWindowId =it.next();\n\t\tSystem.out.println(\"Child Window id: \"+ childWindowId);\n\t\t\n\t\t//Passing the control to pop up window ...Switch to pop-up window\n\t\tdriver.switchTo().window(childWindowId);\n\t\t\n\t\tThread.sleep(2000);\n\t\t\n\t\t// Get the title of the Pop-up Window\n\t\tSystem.out.println(\" Child window pop up title \"+ driver.getTitle()); \n\t\t\n\t\t//Close the pop-up window\n\t\tdriver.close();\n\t\t\n\t\t//Switch to Parent Window\n\t\tdriver.switchTo().window(parentWindowId);\n\t\t\n\t\tThread.sleep(2000);\n\t\t\n\t\t//Get the title of Parent window\n\t\tSystem.out.println(\" Parent window title \"+ driver.getTitle());\n\t\t\n\t\t// Close the main window\n\t\tdriver.close();\n\t\t\n\t}",
"public void openWindow()\r\n {\r\n myWindow = new TraderWindow(this);\r\n while(!mailbox.isEmpty())\r\n {\r\n myWindow.showMessage( mailbox.remove() );\r\n }\r\n }",
"public void OpenLoginScreen(ActionEvent event) throws IOException {\n Parent tripViewParent = FXMLLoader.load(getClass().getResource(\"login.fxml\")); // Carregando o arquivo fxml\n\n Stage window = new Stage();\n window.setResizable(false);\n window.setScene(new Scene(tripViewParent));\n window.show();\n\n ((Stage)(((Button)event.getSource()).getScene().getWindow())).close();\n }",
"@FXML\r\n\tprivate void login() {\n\t\tStage stage = (Stage) closeButton.getScene().getWindow();\r\n\t\t// do what you have to do\r\n\t\tstage.close();\r\n\t}",
"public boolean open(JFrame parent) {\n\t\t// first loop until login succeeded\n\t\tOctopusWS port = null;\n\t\twhile (port == null) {\n\t\t\tint result = JOptionPane.showConfirmDialog(parent, this, \"Login\",\n\t\t\t\t\tJOptionPane.PLAIN_MESSAGE);\n\t\t\t// ok is pressed\n\t\t\tif (result == 0) {\n\t\t\t\t// save username and password in appConstants\n\t\t\t\tAppConstants.setUserName(userName.getText());\n\t\t\t\tAppConstants.setPassWord(passWord.getText());\n\n\t\t\t\t// save username in preference\n\t\t\t\tSettings.setPreference(\"userName\", userName.getText());\n\t\t\t\t// try to log in with alert\n\t\t\t\tport = WSCommunicator.loginWithAlert(parent);\n\t\t\t}// if user closes the login window, close main window\n\t\t\telse if (result == JOptionPane.CLOSED_OPTION) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// Once login succeeded open a window in which the user can select the\n\t\t// active book year and journal n\n\n\t\t// if valid login\n\t\t// cache data\n\t\tWSCommunicator.executeWithAlert(parent, port, WSACache1.getInstance());\n\t\t// show new window for the user to choose bookyear and journal\n\t\t// if the user doesn't choose a bookyear and journal close window\n\t\tif (!new ChooseBookYearJournalWindow().open(parent)) {\n\t\t\treturn false;\n\t\t}\n\t\t// second round of caching after receiving necessary info\n\t\tWSCommunicator.executeWithAlert(parent, port, WSACache2.getInstance());\n\n\t\treturn true;\n\n\t}",
"public boolean isDisplayed_click_CloseModal_Button(){\r\n\t\tif(click_CloseModal_Button.isDisplayed()) { return true; } else { return false;} \r\n\t}",
"public void verify_WelcomePopupandclick(){\n\t\tif(isDisplayedWithoutException(welcomePopup)){\n\t\t\tclick(welcomePopup);\n\t\t\tSystem.out.println(\"the Welcome popup is visible on the page and clicked done\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"The Welcome popup is not present on the page\");\n\t\t}\n\t}",
"@FXML\n private void openComposeWindow() {\n try {\n ComposeEmailWindow cew = new ComposeEmailWindow(\"\", \"\", \"\", \"\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@FXML\n void goToLoginPage(ActionEvent event) {\n closeWindow();\n }",
"public void showResultsWindow() {\r\n \t\tshowResults.setSelected(true);\r\n \t\tshowResultsWindow(true);\r\n \t}",
"public void switchToChildWindow(String parent) {\r\n\t\t//get ra tat ca cac tab hoac cua so dang co -->ID duy nhat. Neu dung List thi no se lay ca ID trung\r\n Set<String> allWindows = driver.getWindowHandles();\r\n //for each\r\n for (String ChildWindow : allWindows) {\r\n \t//duyet qua trung\r\n if (!ChildWindow.equals(parent)) {\r\n driver.switchTo().window(ChildWindow);\r\n break;\r\n }\r\n }\r\n \r\n \r\n}",
"public boolean show() {\n\t\tComponent parent = DockingWindowManager.getActiveInstance().getActiveComponent();\n\t\tDockingWindowManager.showDialog(parent, this);\n\t\treturn !wasCancelled;\n\t}",
"@FXML\n public void cancelButtonPressed()\n {\n mainView.setWindow(\"START\");\n }",
"public void closeWindows() {\n\n waitingForPlayers.setVisible(false);\n bonusTilePane.setVisible(false);\n chooseCostPane.setVisible(false);\n payToObtainPane.setVisible(false);\n chooseEffectPane.setVisible(false);\n choosePrivilegePane.setVisible(false);\n chooseWorkersPane.setVisible(false);\n prayPane.setVisible(false);\n yourTurnPane.setVisible(false);\n suspendedPane.setVisible(false);\n yourTurnPane.setVisible(false);\n throwDicesPane.setVisible(false);\n bonusActionPane.setVisible(false);\n\n }",
"@FXML\n private void handleManageClubs(ActionEvent event) {\n try {\n LOGGER.log(Level.INFO, \"Redirecting to ClubManagement window.\");\n FXMLLoader loader = new FXMLLoader(getClass()\n .getResource(\"/reto2desktopclient/view/ClubManagement.fxml\"));\n Parent root = (Parent) loader.load();\n //Getting window controller.\n ClubManagementController controller = (loader.getController());\n controller.setStage(stage);\n //Initializing stage.\n controller.initStage(root);\n } catch (IOException ex) {\n LOGGER.log(Level.SEVERE, \"Could not switch to ClubManagement window: {0}\", ex.getMessage());\n showErroAlert(\"Could not switch to Club Management window due to an\"\n + \" unexpected error, please try later.\");\n }\n }",
"@When(\"^the user verifies the destination address from the new window$\")\n\tpublic void the_user_verifies_the_destination_address_from_the_new_window() throws Throwable {\n\t\tSystem.out.println(\"Parent handle: \" + parentHandle);\n\n\t\t// Bunu list olarak secince isimizi gormuyor. Set olarak secmemiz gerekiyor.\n\t\tSet<String> handles = driver.getWindowHandles();\n\t\t\n\t\tfor (String handle : handles) {\n\t\t\tSystem.out.println(handle);\n\t\t\tif (!handle.equals(parentHandle)) {\n\n\t\t\t\tdriver.switchTo().window(handle);\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t\n\t\t\t\tString addresForNova = homePage.addressLineForNOVA.getAttribute(\"value\");\n\t\t\t\tSystem.out.println(addresForNova);\n\t\t\t\t\n\t\t\t\tThread.sleep(2000);\n\t\t\t\tString expectedAddresForNova = \"5000 Dawes Ave, Alexandria, VA 22311\";\n\n\t\t\t\tif (addresForNova.equals(expectedAddresForNova)) {\n\n\t\t\t\t\tSystem.out.println(\"Correct adress. Continue the test execution\");\n\n\t\t\t\t} else {\n\n\t\t\t\t\thomePage.addressLineForNOVA.clear();\n\t\t\t\t\thomePage.addressLineForNOVA.sendKeys(\"5000 Dawes Ave, Alexandria, VA 22311\");\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdriver.close();\n\t\t\t\tdriver.switchTo().window(parentHandle);\n\t\t\t}",
"@Ignore(\"b/72154153\")\n @Test\n public void testFocusedViewInNormalCase() {\n controller.menuHelper.showMenu();\n controller.menuHelper.assertNavigateToPlayControlsRow();\n assertButtonHasFocus(BUTTON_ID_PLAY_PAUSE);\n controller.pressBack();\n }",
"@Override\n @Test\n public void closeWindow_selected() {\n // open a second page\n guiTestUIMap.testLink().click();\n checkLastStepStatus(TestStatus.PASSED);\n // close the main page\n aludraWebGUI.perform().closeWindows(\"el\", \"op\", GUITestUIMap.TEST_PAGE_TITLE);\n checkLastStepStatus(TestStatus.PASSED);\n // try to select the main page\n aludraWebGUI.perform().selectWindow(GUITestUIMap.TEST_PAGE_TITLE);\n // The following check fails for Google Chrome due to a Selenium RC issue which is not expected to be fixed\n // checkLastStepStatus(TestStatus.FAILEDAUTOMATION);\n }",
"public void switchToAnotherWindowHandle(String winHandleBefore) {\n\t\t\r\n\t\t\r\n\t\tfor (String winHandle : driver.getWindowHandles()) {\r\n\t\t\tif (!winHandle.equals(winHandleBefore))\r\n\t\t\t\tdriver.switchTo().window(winHandle);\r\n\t\t\t\t\r\n\t\t}\r\n\t\t// driver.manage().window().maximize();\r\n\t}",
"public void switchToChildWindow(String parent) throws Exception {\r\n\t\t// get ra tat ca cac tab dang co\r\n\t\tSet<String> allWindows = driver.getWindowHandles();\r\n\t\tThread.sleep(3000);\r\n\t\tfor (String runWindow : allWindows) {\r\n\t\t\tif (!runWindow.equals(parent)) {\r\n\t\t\t\tdriver.switchTo().window(runWindow);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\r\n\t\t\tpublic void buttonClick(ClickEvent event) \r\n\t\t\t{\n\t\t\t\tif(((NavigatorUI) UI.getCurrent()).getMainView().equals(\"Cibernauta\"))\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\tsubWindow.setModal(true);\r\n\t\t\t\t\tsubWindow.setResizable(false);\r\n\t\t\t\t\tsubWindow.setContent(new Contratar_cibernauta(canalL.getValue()));\r\n\t\t\t\t\tUI.getCurrent().addWindow(subWindow);\r\n\t\t\t\t\t\r\n\t\t\t\t}else if(((NavigatorUI) UI.getCurrent()).getMainView().equals(\"Vista_Cliente\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontratacion = comprobarContratacion();\r\n\t\t\t\t\t\r\n\t\t\t\t\tsubWindow.setModal(true);\r\n\t\t\t\t\tsubWindow.setResizable(false);\r\n\t\t\t\t\tsubWindow.setContent(new Contratar_vista_usuario(canalL.getValue(), contratacion, idModalidad));\r\n\t\t\t\t\tUI.getCurrent().addWindow(subWindow);\r\n\t\t\t\t\t\r\n\t\t\t\t}else if(((NavigatorUI) UI.getCurrent()).getMainView().equals(\"Cliente\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontratacion = comprobarContratacion();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(contratacion || idModalidad.isEmpty())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsubWindow.setModal(true);\r\n\t\t\t\t\t\tsubWindow.setResizable(false);\r\n\t\t\t\t\t\tsubWindow.setContent(new Contratar_cliente(canalL.getValue()));\r\n\t\t\t\t\t\tUI.getCurrent().addWindow(subWindow);\r\n\t\t\t\t\t}else\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdoNavigate(Crear_incidencia.VIEW_NAME + \"/\" + \"contratacion\" +\";\" +canalL.getValue());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}",
"public void askSpawn() throws RemoteException{\n respawnPopUp = new RespawnPopUp();\n respawnPopUp.setSenderRemoteController(senderRemoteController);\n respawnPopUp.setMatch(match);\n\n Platform.runLater(\n ()-> {\n try{\n respawnPopUp.start(new Stage());\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }\n );\n }",
"@Test\n\tpublic void testClickOnCancelButton() {\n\n\t\tvar prompt = openPrompt();\n\t\tprompt.getCancelButton().click();\n\t\tassertNoDisplayedModalDialog();\n\t\tassertPromptInputNotApplied();\n\t}",
"public void switchToWindow(String title) {\n\t\ttry {\r\n\t\t\tSet<String> allWindows = getter().getWindowHandles();\r\n\t\t\tfor (String eachWindow : allWindows) {\r\n\t\t\t\tgetter().switchTo().window(eachWindow);\r\n\t\t\t\tif (getter().getTitle().equals(title)) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"The Window Title: \"+title+\r\n\t\t\t\t\t\"is switched \");\r\n\t\t} catch (NoSuchWindowException e) {\r\n\t\t\tSystem.err.println(\"The Window Title: \"+title+\r\n\t\t\t\t\t\" not found\");\r\n\t\t}\r\n\t}",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\t public void run() {\r\n\t\t\t try {\r\n\t\t\t NewLogin window = new NewLogin();\r\n\t\t\t window.setVisible(true);\r\n\t\t\t } catch (Exception e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t });\r\n\t\t\t\t\r\n \t\r\n\t\t\t\t\r\n\t\t\t}",
"public void finishedWindow() {\n\t\tcloseWindow();\n\t\tstoreBuyWindow.getJFrame().setVisible(true);\n\t}",
"public void VerifyFacebookPopUpWindow(){\n\n String MainWindow=driver.getWindowHandle();//to handle mainwindow\n\n // To handle all new opened window.\n Set<String> s1=driver.getWindowHandles();\n Iterator<String> i1=s1.iterator();\n\n while(i1.hasNext())\n {\n String ChildWindow=i1.next();\n\n if(!MainWindow.equalsIgnoreCase(ChildWindow))\n {\n driver.switchTo().window(ChildWindow);// Switching to Child window\n String ActualFacebookUrl= driver.getCurrentUrl();\n Assert.assertEquals(ActualFacebookUrl,ExpectedFaceBookUrl,\"get facebookpage\");//compare actual with expected\n\n //createpagebutton verification\n Assert.assertEquals(getText1(_CraeatePageButton),ExpectedCretePageButton);\n\n //verify colour of createpage button\n String colour=driver.findElement(_CraeatePageButton).getCssValue(\"background-color\");\n System.out.println(colour);\n\n //verify colour value\n Assert.assertEquals(colour,ExpectedcolorValue);\n\n // Closing the Child Window.\n driver.close();\n }\n }\n // Switching to Parent window i.e Main Window.\n driver.switchTo().window(MainWindow);\n }",
"public boolean showFilmEditDialog(Movie movie) {\r\n try {\r\n // Load the fxml file and create a new stage for the popup dialog.\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(FilmApp.class.getResource(\"view/FilmEditDialog.fxml\"));\r\n AnchorPane page = (AnchorPane) loader.load();\r\n\r\n // Create the dialog Stage.\r\n Stage dialogStage = new Stage();\r\n dialogStage.setTitle(\"Edit movie\");\r\n dialogStage.initModality(Modality.WINDOW_MODAL);\r\n dialogStage.initOwner(primaryStage);\r\n Scene scene = new Scene(page);\r\n dialogStage.setScene(scene);\r\n\r\n // Set the movie into the controller.\r\n this.controller = loader.getController();\r\n controller.setDialogStage(dialogStage);\r\n controller.setMovie(movie);\r\n\r\n // Show the dialog and wait until the user closes it\r\n dialogStage.showAndWait();\r\n\r\n return controller.isOkClicked();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n System.out.println(\"je ot tu\");\r\n return false;\r\n }\r\n}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCoachManagement coachManagement = new CoachManagement();\n\t\t\t\tcoachManagement.setModal(true);\n\t\t\t\tcoachManagement.setVisible(true);\n\t\t\t}",
"private void returnToMainScreen(ActionEvent event) throws IOException {\r\n\r\n Parent parent = FXMLLoader.load(getClass().getResource(\"../view/MainScreen.fxml\"));\r\n Scene scene = new Scene(parent);\r\n Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();\r\n stage.setScene(scene);\r\n stage.show();\r\n }",
"public String verifyPrintableViewIsOpening(String object, String data) {\n logger.debug(\"Inside verifyPrintableViewIsOpening() \");\n\n try {\n\n String mainwindow = \"\";\n String newwindow = \"\";\n Set<String> windowids = driver.getWindowHandles();\n Iterator<String> ite = windowids.iterator();\n mainwindow = ite.next();\n newwindow = ite.next();\n driver.switchTo().window(newwindow);\n Thread.sleep(5000);\n String url = driver.getCurrentUrl();\n driver.close();\n driver.switchTo().window(mainwindow);\n if (url.contains(data)) {\n return Constants.KEYWORD_PASS + \" printable window opens\";\n } else {\n return Constants.KEYWORD_FAIL + \" printable window does not open\";\n }\n\n } catch (Exception nse) {\n\n return Constants.KEYWORD_FAIL + nse.getLocalizedMessage();\n }\n }",
"public void switchToWindow(String windowTitle) {\n Set<String> windows = driver.get().getWindowHandles();\n\n for (String window : windows) {\n driver.get().switchTo().window(window);\n if (driver.get().getTitle().contains(windowTitle)) {\n LOGGER.log(Level.FINEST,\n \"Switching to window: \" + driver.get().getTitle());\n return;\n } else {\n LOGGER.log(Level.FINEST,\n \"No match for window: \" + driver.get().getTitle());\n }\n }\n }",
"public String switchToNewWindow(WebDriver driver)\n\t{\n\t\t Set<String> ids = driver.getWindowHandles();\n\t\t Iterator<String> it = ids.iterator();\n\t\t \n\t\t String pid = it.next();\n\t\t String cid = it.next();\n\t\t \n\t\t driver.switchTo().window(cid);\n\t\t return pid;\n\t}",
"public void ifWin() {\n WinMenu.setVisible(true);\n }",
"public void ConfirmPopupWindowClick(View view) {\n LayoutInflater inflater = (LayoutInflater)\n getSystemService(LAYOUT_INFLATER_SERVICE);\n View popupView = inflater.inflate(R.layout.activity_confirm_pub_crawl, null);\n\n // create the popup window\n int width = LinearLayout.LayoutParams.WRAP_CONTENT;\n int height = LinearLayout.LayoutParams.WRAP_CONTENT;\n boolean focusable = true; // lets taps outside the popup also dismiss it\n final PopupWindow popupWindow = new PopupWindow(popupView, width, height, focusable);\n\n // show the popup window\n // which view you pass in doesn't matter, it is only used for the window tolken\n popupWindow.showAtLocation(view, Gravity.CENTER, 0, 0);\n\n Button noBtn = (Button) popupView.findViewById(R.id.NoBtn);\n noBtn.setOnClickListener(new View.OnClickListener() {\n\n public void onClick(View popupView) {\n popupWindow.dismiss();\n }\n });\n\n Button yesBtn = (Button) popupView.findViewById(R.id.YesBtn);\n yesBtn.setOnClickListener(new View.OnClickListener() {\n\n public void onClick(View popupView) {\n popupWindow.dismiss();\n Intent goToRandomPubCrawlActivity = new Intent(AddToPubCrawl.this, random_pub_crawl.class);\n startActivity(goToRandomPubCrawlActivity);\n }\n });\n }",
"private void checkToLogin() {\n Intent intent = new Intent(this, LoginActivity.class);\n startActivityForResult(intent, ConstantValue.LOG_IN_CODE);\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tClassManagement classManagement = new ClassManagement();\n\t\t\t\tclassManagement.setModal(true);\n\t\t\t\tclassManagement.setVisible(true);\n\t\t\t}",
"public void switchToMainWindowHandleAndCloseCurrentOne(String winHandleBefore) {\n\t\tdriver.close();\r\n\t\t// Switch back to original browser (first window)\r\n\t\tdriver.switchTo().window(winHandleBefore);\r\n\r\n\t}",
"@Before\n public void openNewStockPage() {\n onView(withId(R.id.button3)).perform(click());\n }",
"public void doubleRevealWin() {\n AlertDialog.Builder builder = new AlertDialog.Builder(game_activity_fb.this);\n\n builder.setCancelable(false);\n builder.setTitle(\"You Won!\");\n builder.setMessage(\"You can now double reveal \" + UserName + \"!\" +\n \" \" +\n \"Do you want to double reveal?\");\n\n\n builder.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n dialog.cancel();\n }\n });\n\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n Intent challintent = new Intent(game_activity_fb.this, reveal_activity_test.class);\n startActivity(challintent);\n overridePendingTransition(0, 0);\n }\n });\n builder.show();\n\n }",
"@Test\n public void turboVotesButton_onClick_redirectsToTurboVotes() {\n driver.get(\"http://localhost:9876\");\n\n Assert.assertEquals(1, driver.getWindowHandles().size());\n\n WebElement turboVotesButton = driver.findElement(By.id(\"turbo-vote-button\"));\n turboVotesButton.click();\n\n Assert.assertEquals(MAX_NUM_TABS, driver.getWindowHandles().size());\n\n String currentWindow = driver.getWindowHandle();\n for (String windowHandle : driver.getWindowHandles()) {\n if (!currentWindow.contentEquals(windowHandle)) {\n driver.switchTo().window(windowHandle);\n break;\n }\n }\n\n Assert.assertEquals(\"TurboVote\", driver.getTitle());\n }",
"public void triggerPopup();",
"public void handleWindow() throws InterruptedException {\n\t\tSet<String> windHandles = GlobalVars.Web_Driver.getWindowHandles();\n\t\tSystem.out.println(\"Total window handles are:--\" + windHandles);\n\t\tparentwindow = windHandles.iterator().next();\n\t\tSystem.out.println(\"Parent window handles is:-\" + parentwindow);\n\n\t\tList<String> list = new ArrayList<String>(windHandles);\n\t\twaitForElement(3);\n\t\tGlobalVars.Web_Driver.switchTo().window((list.get(list.size() - 1)));\n\t\tSystem.out.println(\"current window title is:-\" + GlobalVars.Web_Driver.getTitle());\n\t\treturn;\n\t}",
"public void returnToMainScreen(ActionEvent event) throws IOException {\n Parent root = FXMLLoader.load(getClass().getResource(\"/view/MainScreen.fxml\"));\n Scene scene = new Scene(root);\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\n window.setScene(scene);\n window.show();\n }"
]
| [
"0.66084343",
"0.65619606",
"0.6466533",
"0.6326687",
"0.6280118",
"0.6167415",
"0.61641717",
"0.60363495",
"0.6017522",
"0.59556776",
"0.5913956",
"0.5884854",
"0.58601934",
"0.5832048",
"0.58281803",
"0.5814322",
"0.5806402",
"0.5805698",
"0.5798739",
"0.57737875",
"0.5773592",
"0.5764882",
"0.575029",
"0.573449",
"0.56920207",
"0.56907207",
"0.56746274",
"0.5674048",
"0.5604458",
"0.5591902",
"0.5583455",
"0.5576774",
"0.55716306",
"0.55554146",
"0.5524426",
"0.55221176",
"0.55184096",
"0.5518069",
"0.55177754",
"0.55171686",
"0.5512748",
"0.55099064",
"0.549588",
"0.54740757",
"0.5470204",
"0.54695255",
"0.5465181",
"0.54525423",
"0.5444998",
"0.5444666",
"0.54409546",
"0.54364985",
"0.54257804",
"0.5422257",
"0.5387574",
"0.5382893",
"0.5365126",
"0.5361553",
"0.53452724",
"0.53183687",
"0.53183544",
"0.5305142",
"0.5302863",
"0.53019404",
"0.5301584",
"0.52957386",
"0.52942246",
"0.52815914",
"0.5279897",
"0.527675",
"0.5273113",
"0.52647215",
"0.5264324",
"0.5263789",
"0.52623016",
"0.5259442",
"0.52534944",
"0.5252274",
"0.5250079",
"0.52472436",
"0.5240871",
"0.5239951",
"0.523945",
"0.5237082",
"0.52367204",
"0.52355295",
"0.5235515",
"0.52325344",
"0.5231954",
"0.52165043",
"0.5210301",
"0.52058846",
"0.52033824",
"0.5198701",
"0.51934826",
"0.5176486",
"0.517347",
"0.5168749",
"0.5161554",
"0.51575774"
]
| 0.67608804 | 0 |
Have four method in this Bicycle class | public void setCadence(int cadence){
this.cadence = cadence;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void buscar() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"Bicycle(){\n\t\tthis.wheels=2;\n\t}",
"public void ride(Bicycle bicycle){\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.brake();\n\n }",
"void Dogs() {\n \n }",
"public void carParking() {\r\n\t\t\r\n\t}",
"void parkingMethod(){\n nearingTheCrater();\n parkingTheArm();\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}",
"public static void main(String[] args) {\n List<Rodent> all = new ArrayList<>();\n all.add(new Mouse());\n all.add(new Gerbil());\n all.add(new Mouse());\n all.add(new Hamster());\n all.add(new Gerbil());\n for (Rodent rodent : all) {\n System.out.println(rodent.eat());\n }\n\n //Exercise 10: (3) Create a base class with two methods. In the first method,\n // call the second method. Inherit a class and override the second method.\n // Create an object of the derived class, upcast it to the base type,\n // and call the first method. Explain what happens.\n Rodent r = new Mouse();\n r.sleep();\n\n //Exercise 17: (2) Using the Cycle hierarchy from Exercise 1, add a balance( ) method\n // to Unicycle and Bicycle, but not to Tricycle.\n // Create instances of all three types and upcast them to an array of Cycle.\n // Try to call balance( ) on each element of the array and observe the results.\n // Downcast and call balance( ) and observe what happens.\n Unicycle unicycle = new Unicycle();\n Bicycle bicycle = new Bicycle();\n Tricycle tricycle = new Tricycle();\n Cycle[] cycles = new Cycle[3];\n cycles[0] = unicycle;\n cycles[1] = bicycle;\n cycles[2] = tricycle;\n// for(int i = 0; i < cycles.length; i++){\n// //cycles[i].balance(0); cannot find the method\n// }\n ((Unicycle) cycles[0]).balance();\n ((Bicycle) cycles[1]).balance();\n// ((Tricycle)cycles[2]).balance(); cannot find the method\n\n\n }",
"public void smell() {\n\t\t\n\t}",
"@Override\n\tpublic void carEngine() {\n\n\t}",
"abstract void fly();",
"public void travel();",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public static void main(String[] args) {\n bicycle sportsCycle = new bicycle();\n bicycle mountainCycle = new bicycle();\n sportsCycle.braking();\n sportsCycle.changeGear(5);\n }",
"public void Fight() \n\t{\n\n\t}",
"@Override\r\n\tpublic void buildRoad() {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tBicycle myBike = new Bicycle(10, 2, \"Sarı\");\n\t\t\n\t\tMounthBicycle mb2= new MounthBicycle(myBike, 7);\n\t\t\n\t\tSystem.out.println(\"MountBicycle information : \" + \" Speed : \"+\n\t\t\t\tmb2.getSpeed() +\" Gear: \" +mb2.getGear()+\" Color: \" + mb2.getColor() +\" Spin: \"+ mb2.getSpin());\n\t\t\t\t\n\t\t\n\t\tMounthBicycle mb1 = new MounthBicycle(3, 4, \"White\");\n\t\tmb1.setSpin(17);\n\t\t\n\t\tSystem.out.println(\"MountBicycle information : \" + \" Speed : \"+\n\t\t\t\tmb1.getSpeed() +\" Gear: \" +mb1.getGear()+\" Color: \" + mb1.getColor() +\" Spin: \"+ mb1.getSpin());\n\t\t\t\t\n\t\t\n\n\t}",
"private void travelMethod(RouteFinder routeFinder){\n routeFinder.carPressed(); //by default\n HashMap<JButton, Boolean> buttonMap = routePanel.getButtonDownMap();\n for (JButton button : buttonMap.keySet()) {\n boolean isPressed = buttonMap.get(button);\n if (button.equals(routePanel.getBicycleButton()) && isPressed) routeFinder.bikePressed();\n else if (button.equals(routePanel.getFootButton()) && isPressed) routeFinder.walkPressed();\n else if (button.equals(routePanel.getCarButton()) && isPressed) routeFinder.carPressed();\n }\n }",
"Operations operations();",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"@Override\n\tpublic void driving() {\n\t\t\n\t}",
"static void SampleItinerary()\n {\n System.out.println(\"\\n ***Everyone piles on the boat and goes to Molokai***\");\n\n bg.AdultRowToMolokai();\n bg.ChildRideToMolokai();\n bg.AdultRideToMolokai();\n bg.ChildRideToMolokai();\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"abstract void walk();",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void classroom() {\n\t\t\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public abstract void ratCrewGo();",
"public static void main(String[] args){\n Car myCar = new Car();\n myCar.car_human();\n myCar.car_color(); \n }",
"public void travaille();",
"private FlyWithWings(){\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"public abstract void mo70713b();",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"public abstract void mo35054b();",
"public void logic(){\r\n\r\n\t}",
"public static void main(String[] args) {\n\n Bicycle adultBike = new Bicycle(\"Jeff\");\n adultBike.changeSpeed(20);\n System.out.println(\"speed=\" + adultBike.getSpeed());\n\n Bicycle kidsBike = new Bicycle(\"Austin\");\n kidsBike.changeSpeed(25);\n System.out.println(\"speed=\" + kidsBike.getSpeed());\n }",
"public abstract void alimentarse();",
"public static void main(String[] args) {\n\t//Class name variable - new ClassName(); \n\t\n Car car1=new Car(); // we create a new object by using NEW\n \n //1 Object\n System.out.println(\"---------The first object----------\");\n car1.make=\"Honda\"; //you assign features according to their data type specified in template\n car1.model=\"Civic\"; //we can identify because this object has its unique features\n car1.color=\"Silver\";\n car1.door=4;\n car1.wheels=4; \n \n System.out.println(\"Car \"+car1.make+\" has \"+car1.wheels+\" wheels\");\n // define behavior \n car1.drive(); // if we debug when we run drive will search for same method -> it will jump to line 39\n\t\tcar1.reverse();\n\t\tcar1.honk(); \n \n //2 Object\n Car car2 = new Car();\n System.out.println(\"---------The second object---------\");\n car2.make=\"Tesla\";\n car2.model=\"X\";\n car2.color=\"Blue\";\n car2.door=4;\n car2.wheels=4;\n System.out.println(\"My car is \"+car2.color+ \" \"+car2.make);\n // define behavior\n car2.drive();\n car2.reverse();\n car2.honk();\n}",
"public void leerPlanesDietas();",
"public abstract void afvuren();",
"public void gored() {\n\t\t\n\t}",
"public Bicycle(int startCadence, int startSpeed, int startGear,\n String name) {\n System.out.println(\"Bicycle.Bicycle- has arguments\");\n this.gear = startGear;\n this.cadence = startCadence;\n this.speed = startSpeed;\n this.name = name;\n }",
"@Override\r\n\tpublic void carBreak() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public abstract void mo2150a();",
"private void poetries() {\n\n\t}",
"public static void main(String[] args) {\n\t\tSubstraction ob1 = new Substraction();\n\t\tSubstraction ob2 = new Substraction();\n\t\tob1.x = 100;\n\t\tob1.y = 200;\n\t\tob2.x = 10;\n\t\tob2.y = 20;\n\t\tob1.sub1();\n\t\tob2.sub1();\n\t\t\n\t\tob1.x1 = 10; // this should be Substraction.x1 = 10;\n\t\tob1.y1 = 20;\n\t\tob2.x1 = 20;\n\t\tob2.y1 = 20;\n\t\tob1.sub2();\n\t\tob2.sub2();\n\t\tob1.obC1.method1();\n\t\tob1.obc2.method2();\n\t\tob1.obc2.method1();\n\t\t\n\n\t}",
"public abstract void mo957b();",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"public Bicycle(int gear, int speed)\r\n {\r\n this.gear = gear;\r\n this.speed = speed;\r\n }",
"public abstract void mo4359a();",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"public Round_Robin() {\n\t\tiniciaComponentes();\n\t\t\n\t\t\t\n\t}",
"@Override\n\tpublic void goi() {\n\n\t}",
"public BicycleStation() {\n super();\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\tpublic void breath() {\n\n\t}",
"@Override\r\n\tpublic void walk() {\n\r\n\t}",
"public interface CaracteristiquesJoueurDeChamps{\n /**\n * This method is for a celebration when a goal is scored\n */\n \n void celebrer();\n \n /**\n * This method is for shoot on the goal\n * @return double, the stat of shoot\n */\n \n double tirer();\n \n /**\n * This method is for pass the ball\n * @return double, the stat of pass\n */\n \n double passer();\n \n /**\n * This method is for defend on the ball\n * @return double, the stat of defense\n */\n \n double defendre();\n \n /**\n * This method is for injury a player\n * @return double, the stat of injury\n */\n double seBlesser();\n \n /**\n * This method is for the mood of the player\n * @return double, the stat of agressivity\n */\n double agression();\n \n \n /**\n * This method is for run\n */\n void courir();\n \n \n double fatigue();\n \n \n }",
"public void snare();",
"public abstract void mo2624j();",
"public interface Cycle {\n public void ride();\n\n public void wheels();\n\n public void balance();\n}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public void train ()\t{\t}",
"public void ingresaVehiculo (){\r\n \r\n Vehicle skate = new Skateboard(\"vanz\", \"2009\", \"1 metro\");\r\n Vehicle carro = new Car(\"renault\", \"2009\", \"disel\",\"corriente\" );\r\n Vehicle jet = new Jet(\"jet\", \"2019\", \"premiun\", \"ocho motores\");\r\n Vehicle cicla = new Bicycle(\"shimano\", \"2010\",\"4 tiempos\" ) ; \r\n Vehuculo.add(skate);\r\n Vehuculo.add(carro);\r\n Vehuculo.add(jet);\r\n Vehuculo.add(cicla); \r\n \r\n /*\r\n for en el cual se hace el parceo y se instancia la clase Skateboard\r\n \r\n */\r\n for (Vehicle Vehuculo1 : Vehuculo) {\r\n if(Vehuculo1 instanceof Skateboard){\r\n Skateboard skatevehiculo = (Skateboard)Vehuculo1;\r\n skatevehiculo.imprimirPadre();\r\n skatevehiculo.imprimirSkate();\r\n skatevehiculo.imprimirInterfaz();\r\n }\r\n /*\r\n se intancia y se hace el parceo de la clase car\r\n \r\n */\r\n else if(Vehuculo1 instanceof Car){\r\n \r\n Car carvhiculo = (Car)Vehuculo1;\r\n carvhiculo.imprimirPadre();\r\n carvhiculo.imprimirCarro();\r\n carvhiculo.imprimirVehiculopotenciado();\r\n \r\n \r\n \r\n }\r\n /*se intancia y se hace el parceo de la clase\r\n \r\n */\r\n else if(Vehuculo1 instanceof Jet){\r\n \r\n Jet jethiculo = (Jet)Vehuculo1;\r\n jethiculo.imprimirPadre();\r\n jethiculo.imprimirJet();\r\n jethiculo.imprimirVehiculopotenciado();\r\n jethiculo.imprimirInterfaz();\r\n }\r\n else if(Vehuculo1 instanceof Bicycle){\r\n \r\n Bicycle ciclavehiculo = (Bicycle)Vehuculo1;\r\n ciclavehiculo.imprimirPadre();\r\n ciclavehiculo.imprimirBici();\r\n }\r\n }\r\n \r\n \r\n }",
"void tocar();",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void walk() {\n\t\t\n\t}",
"public static void main(String[] args) {\n Animal zebra=new Animal(\"Pol\", \"Male\", 11, \"Zebra\");\n zebra.sleep();\n zebra.walk();\n zebra.eat();\n \n Animal giraffe=new Animal(\"Necky\",\"Female\",23,\"Giraffe\");\n giraffe.sleep();\n giraffe.walk();\n giraffe.eat();\n \n \n}",
"public interface bik extends bie {\n boolean A();\n\n int B();\n\n int C();\n\n void D();\n\n void E();\n\n void F();\n\n String G();\n\n void H();\n\n boolean I();\n\n boolean J();\n\n String K();\n\n boolean L();\n\n void M();\n\n int a(String str);\n\n int a(String str, String str2, int i);\n\n int a(String str, String str2, String str3, int i);\n\n int a(String str, String str2, String str3, String str4);\n\n JsonDatasWithType a(String str, String str2);\n\n void a(int i);\n\n void a(bii bii);\n\n void a(bio bio);\n\n void a(bis bis);\n\n void a(bit bit);\n\n void a(biu biu);\n\n void a(biv biv);\n\n void a(biw biw);\n\n void a(bix bix);\n\n void a(biy biy);\n\n void a(biz biz);\n\n void a(bja bja);\n\n void a(bjc bjc);\n\n void a(JsFunctionCallback jsFunctionCallback);\n\n void a(String str, int i);\n\n void a(String str, bij bij);\n\n void a(String str, String str2, int i, String str3);\n\n void a(boolean z);\n\n int b(String str, String str2, int i);\n\n int b(String str, String str2, String str3, int i);\n\n GirfFavoriteRoute b(String str);\n\n String b(String str, String str2);\n\n void b();\n\n void b(int i);\n\n void b(biy biy);\n\n void b(bja bja);\n\n void b(bjc bjc);\n\n void b(String str, int i);\n\n void b(boolean z);\n\n List<String> c(int i);\n\n List<String> c(String str);\n\n List<String> c(String str, int i);\n\n void c();\n\n void c(biy biy);\n\n void c(String str, String str2);\n\n void c(boolean z);\n\n List<String> d(String str);\n\n void d();\n\n void d(boolean z);\n\n List<String> e(String str);\n\n void e();\n\n void e(boolean z);\n\n GirfFavoritePoint f(String str);\n\n void f();\n\n void f(boolean z);\n\n List<JsonDataWithId> g(String str);\n\n void g(boolean z);\n\n boolean g();\n\n JsonDatasWithType h(String str);\n\n void h(boolean z);\n\n boolean h();\n\n int i(String str);\n\n void i(boolean z);\n\n boolean i();\n\n int j(String str);\n\n void j(boolean z);\n\n boolean j();\n\n void k(boolean z);\n\n boolean k();\n\n boolean k(String str);\n\n int l(String str);\n\n int l(boolean z);\n\n boolean l();\n\n String m(String str);\n\n boolean m();\n\n GirfSyncService n();\n\n boolean n(String str);\n\n List<GirfFavoritePoint> o();\n\n List<GirfFavoritePoint> p();\n\n List<String> r();\n\n List<String> s();\n\n boolean t();\n\n List<String> u();\n\n List<String> v();\n\n boolean w();\n\n String x();\n\n List<String> y();\n\n int z();\n}",
"@Override\r\n\tpublic void carDashboar() {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tLion l=new Lion();\n\t\tBase b=new Base();\n\t\tb.toAnimal(l);\n\t\tb.toRoar(l);\n\t\tb.toWalk(l);\n\t\tLionKing lk=new LionKing();\n\t\tb.toAnimal(lk);\n\t\tb.toRoar(lk); //인자가 lion이엇니 이하클래스는 괜찮\n\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"void breed()\n {\n roaches *= 2;\n }",
"private Road()\n\t{\n\t\t\n\t}",
"public abstract void mo27385c();",
"public static void main(String[] args) {\n Car car = new Car();\n Bicycle bike = new Bicycle();\n Boat boat = new Boat();\n\n Vehicle[] racers = {car, bike, boat};\n for (Vehicle x : racers) {\n x.go();\n }\n }",
"abstract protected void brew();",
"void walk() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tpublic void onBlue() {\n\t\taddSequential(new DriveStraightByDistance(PEG_STRAIGHT - ROBOT_LENGTH / 2), 3.5);\n\t\t//TODO: might need to change to a little less\n\t\taddSequential(new TurnDegrees(90), 2.5);\n\t\taddSequential(new DriveStraightByDistance(EXTRA_DIS), 4);\n\t\taddSequential(new OpenPlacer2());\n\t\taddSequential(new ArcadeDriveByValues(-0.5, -0.5), 1);// TODO change commad\n\t\taddSequential(new ClosePlacer());\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\r\n\t\t\r\n multipleInherit obj=new multipleInherit();\r\n obj.walking();\r\n obj.sleeping();\r\n obj.read();\r\n\t}",
"@Override\n\tpublic\n\tvoid speed() {\n\t\t\n\t}",
"static void SampleItinerary() {\n\t\tSystem.out.println(\"\\n ***Everyone piles on the boat and goes to Molokai***\");\n\t\tbg.AdultRowToMolokai();\n\t\tbg.ChildRideToMolokai();\n\t\tbg.AdultRideToMolokai();\n\t\tbg.ChildRideToMolokai();\n\t}",
"@Override\n public void bfs() {\n\n }",
"public abstract void mo27386d();",
"Cone orderCone(Flavor[]balls) {\n\t \n }",
"public abstract void mo56925d();",
"public void mo4359a() {\n }",
"@Override\r\n\tpublic void carSideLight() {\n\t\t\r\n\t}",
"public abstract void drive();",
"public static void main(String[] args) {\n\t\t\n\t\tVehicle myVehicle = new Vehicle(500, 4);\n\t\tmyVehicle.ride();\n\t\tSystem.out.println(myVehicle.toString());\n\t\t\n\t\tCar myCar = new Car(90, 4);\n\t\tmyCar.ride();\n\t\tSystem.out.println(myCar.toString());\n\t\t\n\t\tMotorcycle myMotorcycle = new Motorcycle(88, 2);\n\t\tmyMotorcycle.ride();\n\t\tSystem.out.println(myMotorcycle.toString());\n\n\t}",
"@Override\r\n\tpublic void fly() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic Answer handle(Request request) throws Exception {\r\n\t\tGPS startPoint = request.getStartPos();\r\n\t\tGPS endPoint = request.getEndPos();\r\n\t\tCurrentDistribution curDis = CurrentDistribution.getInstance();\r\n\t\tArrayList<Station> givenTypeAvaStations = null;// whether this init is a correct choice in case that ArrayList can not be covered directly \r\n\t\tdouble ridingSpeed = 0.00001;//if not given proper bicycle type, time cost would be extremely large\r\n\t\tif(request.getBikeType().equalsIgnoreCase(\"E\")) {\r\n\t\t\tridingSpeed = Server.eleRidingSpeed;\r\n\t\t\tgivenTypeAvaStations = curDis.geteAvaStationList();\r\n\t\t}\r\n\t\t\r\n\t\tif(request.getBikeType().equalsIgnoreCase(\"M\")) {\r\n\t\t\tridingSpeed = Server.mecRidingSpeed;\r\n\t\t\tgivenTypeAvaStations = curDis.getmAvaStationList();\r\n\t\t}\r\n\r\n\t\tif(givenTypeAvaStations.size() == 0) {\r\n\t\t\tServer.error(\"no available station containing given type of bicycle\");\r\n\t\t}\r\n\r\n\t\tStation minStartStation = givenTypeAvaStations.get(0);\r\n\t\tStation minEndStation = curDis.getReturnableStationList().get(0);\r\n\t\t\r\n\t\tdouble minEndDis = Math.sqrt((minEndStation.getPos().getX() - endPoint.getX()) * (minEndStation.getPos().getX() - endPoint.getX()) + \r\n\t\t\t\t(minEndStation.getPos().getY() - endPoint.getY())*(minEndStation.getPos().getY() - endPoint.getY()));\r\n\t\t\r\n\t\tfor(Station s: curDis.getReturnableStationList()) {\r\n\t\t\tdouble endDis = Math.sqrt((s.getPos().getX() - endPoint.getX())*(s.getPos().getX() - endPoint.getX()) + \r\n\t\t\t\t\t(s.getPos().getY() - endPoint.getY()) * (s.getPos().getY() - endPoint.getY()));\r\n\t\t\tif( endDis < minEndDis) {\r\n\t\t\t\tminEndStation = s;\r\n\t\t\t\tminEndDis = endDis; \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tdouble minWalkRideTime = Math.sqrt((minStartStation.getPos().getX() - startPoint.getX()) * (minStartStation.getPos().getX() - startPoint.getX())+\r\n\t\t\t\t(minStartStation.getPos().getY() - startPoint.getY()) * (minStartStation.getPos().getY() - startPoint.getY()))/\r\n\t\t\t\tServer.walkingSpeed +\r\n\t\t\t\t(Math.abs(minStartStation.getPos().getX() - endPoint.getX())+ \r\n\t\t\t\t\t\tMath.abs(minStartStation.getPos().getY() - endPoint.getY()))/\r\n\t\t\t\tridingSpeed;\r\n\t\t\r\n\t\tfor(Station s: givenTypeAvaStations) {\r\n\t\t\tdouble walkRideTime = Math.sqrt((s.getPos().getX() - startPoint.getX()) * (s.getPos().getX() - startPoint.getX())+\r\n\t\t\t\t\t(s.getPos().getY() - startPoint.getY()) * (s.getPos().getY() - startPoint.getY()))/\r\n\t\t\t\t\tServer.walkingSpeed +\r\n\t\t\t\t\t(Math.abs(s.getPos().getX() - endPoint.getX())+ \r\n\t\t\t\t\t\t\tMath.abs(s.getPos().getY() - endPoint.getY()))/\r\n\t\t\t\t\tridingSpeed;\r\n\t\t\tif( walkRideTime < minWalkRideTime) {\r\n\t\t\t\tminStartStation = s;\r\n\t\t\t\tminWalkRideTime = walkRideTime; \r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\r\n\t\tdouble minStartDis = Math.sqrt((minStartStation.getPos().getX() - startPoint.getX())*(minStartStation.getPos().getX() - startPoint.getX())\r\n\t\t\t\t+ (minStartStation.getPos().getY() - startPoint.getY())*(minStartStation.getPos().getY() - startPoint.getY()));\r\n\t\tdouble minRideDis = (Math.abs(minStartStation.getPos().getX() - minEndStation.getPos().getX())+ \r\n\t\t\t\tMath.abs(minStartStation.getPos().getY() - minEndStation.getPos().getY()));\r\n\t\tdouble minTime = (minEndDis + minStartDis)/ Server.walkingSpeed + minRideDis/ridingSpeed;\r\n\t\tdouble minDis = minStartDis + minEndDis + minRideDis;\r\n\t\tif(minTime > 500) {\r\n\t\t\tthrow new Exception(\"BikeType input illegal.\");\r\n\t\t}\r\n\t\t\r\n\t\tAnswer ans = new Answer(minStartStation, minEndStation, minTime, minDis);\r\n\t\treturn ans;\r\n\t}",
"@Override\n\tpublic void gasDiesel() {\n\n\t}",
"public interface Vehicle {\n\n void applyBrakes();\n void speedUp(int delta);\n void slowDown(int delta);\n}"
]
| [
"0.6601279",
"0.65257925",
"0.6489605",
"0.6470792",
"0.62291837",
"0.60568625",
"0.60401154",
"0.60164446",
"0.60164446",
"0.5952797",
"0.58996755",
"0.58576643",
"0.58268565",
"0.5818759",
"0.5810573",
"0.5798519",
"0.5796869",
"0.57892644",
"0.57854843",
"0.5761549",
"0.57533264",
"0.5732165",
"0.5730944",
"0.57262486",
"0.57196504",
"0.5708677",
"0.56470835",
"0.56462336",
"0.564618",
"0.564618",
"0.56328964",
"0.5617264",
"0.5602597",
"0.55894667",
"0.5584859",
"0.5583383",
"0.55700916",
"0.55401677",
"0.5534683",
"0.55327255",
"0.55322886",
"0.5532085",
"0.55288815",
"0.5527051",
"0.55235595",
"0.5519682",
"0.55152345",
"0.5513353",
"0.5512725",
"0.5511968",
"0.55117446",
"0.5509018",
"0.5504721",
"0.5504466",
"0.5501916",
"0.55018306",
"0.5491498",
"0.5489544",
"0.54860985",
"0.54843885",
"0.54796153",
"0.54761666",
"0.54761004",
"0.54752487",
"0.5469378",
"0.5462465",
"0.5462032",
"0.54563093",
"0.54545647",
"0.54543704",
"0.5448503",
"0.54476124",
"0.5443473",
"0.54399264",
"0.54391444",
"0.5429133",
"0.5421758",
"0.5413271",
"0.54051375",
"0.539904",
"0.5396965",
"0.539684",
"0.5391222",
"0.539062",
"0.5389147",
"0.5388569",
"0.53863555",
"0.53795356",
"0.5377792",
"0.5371815",
"0.53701067",
"0.53637815",
"0.53615236",
"0.53586835",
"0.5357969",
"0.53564906",
"0.5351748",
"0.5347969",
"0.5347102",
"0.5344914",
"0.5344034"
]
| 0.0 | -1 |
Creates new form MenuView | public MenuView(MainFrame main) {
initComponents();
this.mainFrame = main;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Menu createViewMenu();",
"@Override\r\n\tpublic void createMenu(Menu menu) {\n\r\n\t}",
"public myView() {\n initComponents();\n CreatMenu();\n }",
"@Override\n public void create(SwipeMenu menu) {\n switch (menu.getViewType()) {\n case VIEW_TYPE_1:\n createMenu1(menu);\n break;\n case VIEW_TYPE_2:\n createMenu2(menu);\n break;\n case VIEW_TYPE_3:\n createMenu3(menu);\n break;\n }\n }",
"@Override\n public void create(SwipeMenu menu) {\n switch (menu.getViewType()) {\n case 0:\n createMenu1(menu);\n break;\n case 1:\n createMenu2(menu);\n break;\n case 2:\n createMenu3(menu);\n break;\n }\n }",
"public FormMenu() {\n initComponents();\n menuController = new MenuController(this);\n menuController.nonAktif();\n }",
"@Override\n public void create(SwipeMenu menu) {\n switch (menu.getViewType()) {\n case 0:\n createMenu1(menu);\n break;\n case 1:\n createMenu2(menu);\n break;\n\n }\n }",
"public void createMenu() {\n deleteMenuGroupError = false;\n createMenuGroupError = true;\n if (menu.createMenu()) {\n updateMenuError = false;\n deleteMenuError = false;\n createMenuError = true;\n } else {\n createMenuError = false;\n }\n }",
"public void createMenu() {\n\t\tmenuBar.add(createGameMenuColumn());\n\t\tmenuBar.add(createTestsMenuColumn());\n\t\tmenuBar.add(createCheatsMenuColumn());\n\n\t\tparentMainView.setJMenuBar(menuBar);\n\t}",
"private void buildViewMenu(){\n //Create a Run Payroll menu item\n viewItem = new JMenuItem(\"View CS History\");\n viewItem.setMnemonic(KeyEvent.VK_H);\n viewItem.addActionListener(new ViewListener());\n \n //Create a JMenu object for the run menu\n viewMenu = new JMenu(\"View\");\n viewMenu.setMnemonic(KeyEvent.VK_V);\n \n //Add the item to the menu\n viewMenu.add(viewItem);\n }",
"public Menu createToolsMenu();",
"public JMTMenuBar createMenu() {\r\n \t\tJMTMenuBar menu = new JMTMenuBar(JMTImageLoader.getImageLoader());\r\n \t\t// File menu\r\n \t\tMenuAction action = new MenuAction(\"File\", new AbstractJmodelAction[] { newModel, openModel, saveModel, saveModelAs, closeModel, null, exit });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Edit menu\r\n \t\taction = new MenuAction(\"Edit\", new AbstractJmodelAction[] {\r\n \t\t// editUndo, editRedo, null\r\n \t\t\t\tactionCut, actionCopy, actionPaste, actionDelete, null, takeScreenShot });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Define menu\r\n \t\taction = new MenuAction(\"Define\",\r\n \t\t\t\tnew AbstractJmodelAction[] { editUserClasses, editMeasures, editSimParams, editPAParams, null, editDefaults });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Solve menu\r\n \t\taction = new MenuAction(\"Solve\", new AbstractJmodelAction[] { simulate, pauseSimulation, stopSimulation, null, switchToExactSolver, null,\r\n \t\t\t\tshowResults });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\t// Help menu\r\n \t\taction = new MenuAction(\"Help\", new AbstractJmodelAction[] { openHelp, null, about });\r\n \t\tmenu.addMenu(action);\r\n \r\n \t\treturn menu;\r\n \t}",
"public menuPrincipalView() {\n initComponents();\n }",
"public MenuController() {\r\n\t \r\n\t }",
"@Test\n public void testMenuFactoryCreate() {\n Menu menuController = menuFactory.getMenu();\n menuController.addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n assertEquals(1, menuController.getMenu().size());\n }",
"public Menu createFileMenu();",
"private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }",
"public TextController createMenu(ControllerCore genCode) {\n\t\tmenuTXT = new TextController(\"menu\", getParentController(controlItemSCSCLC), genCode) {\n\t\t\t@Override\n\t\t\tpublic void initialize() {\n\t\t\t\tsetLinkedController(menu$1LBL);\n\t\t\t\tsetProperty(\"menu\");\n\t\t\t\tsuper.initialize();\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tif (null != fieldBindManager)\n\t\t\t\t\t\tfieldBindManager = new XjcFieldBindingManager(this);\n\t\t\t\t\tgetControl().addFocusListener(new XjcFocusListener(this));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\treturn menuTXT;\n\t}",
"private void addMenu(){\n //Where the GUI is created:\n \n Menu menu = new Menu(\"Menu\");\n MenuItem menuItem1 = new MenuItem(\"Lista de Libros\");\n MenuItem menuItem2 = new MenuItem(\"Nuevo\");\n\n menu.getItems().add(menuItem1);\n menu.getItems().add(menuItem2);\n \n menuItem1.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n cargarListaGeneradores( 2, biblioteca.getBiblioteca());\n }\n });\n \n menuItem2.setOnAction(new EventHandler<ActionEvent>() { \n @Override\n public void handle(ActionEvent event) {\n gridPane.getChildren().clear();\n addUIControls() ;\n }\n });\n \n menuBar.getMenus().add(menu);\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add_new, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_create, menu);\n return true;\n }",
"public Menu()\n {\n \n }",
"IFormManager createFormManagerForMenu(IForm menu);",
"public void createmenu(){\n\n\n Context context = getApplicationContext();\n menuadpater = new MenuAdapter(context);\n\n MENULIST.setAdapter(menuadpater);\n\n\n }",
"protected MenuBarView createMenuBuilder(Main mainFrameUtil) {\r\n return new MenuBarView(mainFrameUtil);\r\n }",
"@Override\n public void Create() {\n\n initView();\n }",
"@Override\n\t\t\tpublic void create(SwipeMenu menu) {\n\t\t\t\tSwipeMenuItem openItem = new SwipeMenuItem(getActivity()\n\t\t\t\t\t\t.getApplicationContext());\n\t\t\t\topenItem.setWidth(dp2px(60));\n\t\t\t\topenItem.setIcon(R.drawable.list_delete);\n\t\t\t\topenItem.setBackground(R.color.deep_pink);\n\t\t\t\tmenu.addMenuItem(openItem);\n\n\t\t\t\t// Edit Item\n\t\t\t\tSwipeMenuItem editItem = new SwipeMenuItem(getActivity()\n\t\t\t\t\t\t.getApplicationContext());\n\t\t\t\teditItem.setBackground(R.color.deep_yellow);\n\t\t\t\teditItem.setWidth(dp2px(60));\n\t\t\t\teditItem.setIcon(R.drawable.total_swipeedit);\n\t\t\t\tmenu.addMenuItem(editItem);\n\n\t\t\t}",
"public Menu createMenu(String name) {\r\n\t\treturn new Menu(name,this);\r\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add_template, menu);\n\t\treturn true;\n\t}",
"private void createMenu() {\n\t\tJMenuBar mb = new JMenuBar();\n\t\tsetJMenuBar(mb);\n\t\tmb.setVisible(true);\n\t\t\n\t\tJMenu menu = new JMenu(\"File\");\n\t\tmb.add(menu);\n\t\t//mb.getComponent();\n\t\tmenu.add(new JMenuItem(\"Exit\"));\n\t\t\n\t\t\n\t}",
"@objid (\"fff3543b-6152-4665-9552-d57a3790f997\")\n public static MMenuElement createMenu(final IModule module, MPart view) {\n MMenu moduleMenu = MMenuFactory.INSTANCE.createMenu();\n moduleMenu.setEnabled(true);\n moduleMenu.setToBeRendered(true);\n moduleMenu.setVisible(true);\n moduleMenu.setLabel(module.getLabel());\n moduleMenu.setIconURI(getModuleIconeURI(module));\n moduleMenu.getTags().add(DYNAMIC_MODULE_MENU_TAG);\n moduleMenu.getTags().add(module.getName());\n // Create command, handler and corresponding menu entry for each\n // IModuleAction provided by the module with\n // location == ActionLocation.contextualpopup\n createMenuEntriesForAction(module, moduleMenu, view);\n // If at least one command added, add the module to the main popup.\n if (!moduleMenu.getChildren().isEmpty()) {\n return moduleMenu;\n }\n return null;\n }",
"public menuFornecedorView() {\n initComponents();\n botoes(true,true,false,true,false,false);\n campos(false,true,false,false,false,false);\n }",
"public Menu() {\r\n\r\n }",
"@Override\r\n\tprotected MenuManager createMenuManager() {\r\n\t\tMenuManager menuManager = new MenuManager(\"menu\");\r\n\t\treturn menuManager;\r\n\t}",
"public int create(Esysmeudef menu);",
"private static JMenuBar createMenu() {\r\n JMenuBar mb = new JMenuBar();\r\n JMenu menu = new JMenu(\"File\");\r\n JMenuItem item = new JMenuItem(\"Save\");\r\n item.addActionListener((ActionEvent evt) -> {\r\n saveActionPerformed();\r\n });\r\n menu.add(item);\r\n mb.add(menu);\r\n\r\n menu = new JMenu(\"Help\");\r\n item = new JMenuItem(\"Show how-to\");\r\n item.addActionListener((ActionEvent evt) -> {\r\n showHelp();\r\n });\r\n menu.add(item);\r\n\r\n mb.add(menu);\r\n\r\n return mb;\r\n }",
"@Override\n\tpublic void create() {\n\t\tAssets.load();\n\t\t\n\t\t//creo pantallas y cargo por defecto menuPrincipal\n\t\tscreenJuego = new JuegoScreen(this);\n\t\tmenuPrincipal = new MenuPrincipal(this);\n\t\tsetScreen(menuPrincipal);\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.new_menu, menu);\n\n return true;\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.form, menu);\n\t\treturn true;\n\t}",
"protected void createContents() {\n\t\tshlMenu = new Shell();\n\t\tshlMenu.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/File-delete-icon.png\"));\n\t\tshlMenu.setBackground(SWTResourceManager.getColor(255, 102, 0));\n\t\tshlMenu.setSize(899, 578);\n\t\tshlMenu.setText(\"MENU\");\n\t\t\n\t\tMenu menu = new Menu(shlMenu, SWT.BAR);\n\t\tshlMenu.setMenuBar(menu);\n\t\t\n\t\tMenuItem mnętmBookLists = new MenuItem(menu, SWT.NONE);\n\t\tmnętmBookLists.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booklist frame \n\t\t\t\tBookListFrame window = new BookListFrame();\n\t\t\t\twindow.open();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmnętmBookLists.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Todo-List-icon.png\"));\n\t\tmnętmBookLists.setText(\"Book Lists\");\n\t\t\n\t\tMenuItem mnętmMemberList = new MenuItem(menu, SWT.NONE);\n\t\tmnętmMemberList.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call memberlistframe\n\t\t\t\tMemberListFrame window = new MemberListFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmnętmMemberList.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Misc-User-icon.png\"));\n\t\tmnętmMemberList.setText(\"Member List\");\n\t\t\n\t\tMenuItem mnętmNewItem = new MenuItem(menu, SWT.NONE);\n\t\tmnętmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call rent list\n\t\t\t\tRentListFrame rlf=new RentListFrame();\n\t\t\t\trlf.open();\n\t\t\t}\n\t\t});\n\t\tmnętmNewItem.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Time-And-Date-Calendar-icon.png\"));\n\t\tmnętmNewItem.setText(\"Rent List\");\n\t\t\n\t\tButton btnNewButton = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booksettingsframe\n\t\t\t\tBookSettingsFrame window = new BookSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Printing-Books-icon.png\"));\n\t\tbtnNewButton.setBounds(160, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call membersettingsframe\n\t\t\t\tMemberSettingsFrame window = new MemberSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_1.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Add-User-icon.png\"));\n\t\tbtnNewButton_1.setBounds(367, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_2 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tRentingFrame rf=new RentingFrame();\n\t\t\t\trf.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_2.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Statistics-icon.png\"));\n\t\tbtnNewButton_2.setBounds(567, 176, 114, 112);\n\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tmenu.add(0,context_class_test_menu1, 0, \"newmenu\"+Math.random());\r\n\t\t\t\tLog.e(\"test\", \"完成添加\");\r\n\r\n\t\t\t}",
"private void createMenu(){\n \n menuBar = new JMenuBar();\n \n game = new JMenu(\"Rummy\");\n game.setMnemonic('R');\n \n newGame = new JMenuItem(\"New Game\");\n newGame.setMnemonic('N');\n newGame.addActionListener(menuListener);\n \n \n \n exit = new JMenuItem(\"Exit\");\n exit.setMnemonic('E');\n exit.addActionListener(menuListener); \n \n \n \n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public Menu() {\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_dbcreate, menu);\n return true;\n }",
"public Menu() {\n\n\t}",
"IMenuView getMenuView();",
"void addMenu(V object);",
"@Override\n public boolean onCreateOptionsMenu(final Menu menu) {\n getMenuInflater().inflate(R.menu.menu_deadlines_add_new_item, menu);\n return true;\n }",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.expense_add_new, menu);\r\n\t\treturn true;\r\n\t}",
"public String chooseMenu() {\n String input = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"menu_id\");\n setName(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"name\"));\n setType(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"type\"));\n setMenu_id(Integer.parseInt(input));\n return \"EditMenu\";\n\n }",
"public void buildMenu() {\n\t\tthis.Menu = new uPanel(this.layer, 0, 0, (int) (this.getWidth() * 2), (int) (this.getHeight() * 3)) {\r\n\t\t\t@Override\r\n\t\t\tpublic boolean handleEvent(uEvent event) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick() {\r\n\t\t\t\tsuper.onClick();\r\n\t\t\t\tthis.space.sortLayer(this.layer);\r\n\t\t\t\tthis.castEvent(\"MENUPANEL_CLICK\");\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.screen.addPrehide(this.Menu);\r\n\r\n\t\tthis.Node.addChild(this.Menu.getNode());\r\n\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.add_new_entry, menu);\n return true;\n }",
"public void generateMenu(){\n menuBar = new JMenuBar();\n\n JMenu file = new JMenu(\"Datei\");\n JMenu tools = new JMenu(\"Werkzeuge\");\n JMenu help = new JMenu(\"Hilfe\");\n\n JMenuItem open = new JMenuItem(\"Öffnen \");\n JMenuItem save = new JMenuItem(\"Speichern \");\n JMenuItem exit = new JMenuItem(\"Beenden \");\n JMenuItem preferences = new JMenuItem(\"Einstellungen \");\n JMenuItem about = new JMenuItem(\"Über das Projekt \");\n\n\n file.add(open);\n file.add(save);\n file.addSeparator();\n file.add(exit);\n tools.add(preferences);\n help.add(about);\n\n menuBar.add(file);\n menuBar.add(tools);\n menuBar.add(help);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_create_view_group, menu);\n return true;\n }",
"private void voltarMenu() {\n\t\tmenu = new TelaMenu();\r\n\t\tmenu.setVisible(true);\r\n\t\tthis.dispose();\r\n\t}",
"public void createMenus()\n {\n EventQueueUtilities.runOnEDT(this::createMenusNow);\n }",
"private void makeMenu() {\r\n int i = 0;\r\n int j = 0;\r\n final JMenuBar bar = new JMenuBar();\r\n final Action[] menuActions = {new NewItemAction(MENU_ITEM_STRINGS[i++]),\r\n new ExitAction(MENU_ITEM_STRINGS[i++], myFrame),\r\n new AboutAction(MENU_ITEM_STRINGS[i++], myFrame)};\r\n i = 0;\r\n\r\n final JMenu fileMenu = new JMenu(MENU_STRINGS[j++]);\r\n fileMenu.setMnemonic(KeyEvent.VK_F);\r\n fileMenu.add(menuActions[i++]);\r\n fileMenu.addSeparator();\r\n fileMenu.add(menuActions[i++]);\r\n\r\n final JMenu optionsMenu = new JMenu(MENU_STRINGS[j++]);\r\n optionsMenu.setMnemonic(KeyEvent.VK_O);\r\n\r\n final JMenu helpMenu = new JMenu(MENU_STRINGS[j++]);\r\n helpMenu.setMnemonic(KeyEvent.VK_H);\r\n helpMenu.add(menuActions[i++]);\r\n\r\n bar.add(fileMenu);\r\n bar.add(optionsMenu);\r\n bar.add(helpMenu);\r\n\r\n myFrame.setJMenuBar(bar);\r\n }",
"public static void createLookAndFeelMenuItem(JMenu viewMenu, JFrame f) {\n\t\t\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_create_edit, menu);\n return true;\n }",
"public Menu() {\n initComponents();\n }",
"public Menu() {\n initComponents();\n }",
"public Menu() {\n initComponents();\n }",
"private void initializeMenu() {\n menu = new Menu(parent.getShell());\n MenuItem item1 = new MenuItem(menu, SWT.NONE);\n item1.setText(Resources.getMessage(\"LatticeView.9\")); //$NON-NLS-1$\n item1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n model.getClipboard().addToClipboard(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.CLIPBOARD, selectedNode));\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n \n MenuItem item2 = new MenuItem(menu, SWT.NONE);\n item2.setText(Resources.getMessage(\"LatticeView.10\")); //$NON-NLS-1$\n item2.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(final SelectionEvent arg0) {\n controller.actionApplySelectedTransformation();\n model.setSelectedNode(selectedNode);\n controller.update(new ModelEvent(ViewSolutionSpace.this, ModelPart.SELECTED_NODE, selectedNode));\n actionRedraw();\n }\n });\n }",
"public MenuGroupForm() {\n this(new MenuGroup());\n }",
"private void CreateMenu() {\n\t\topcionesMenu = getResources().getStringArray(\r\n\t\t\t\tR.array.devoluciones_lista_options);\r\n\r\n\t\tdrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);\r\n\t\t// Buscamos nuestro menu lateral\r\n\t\tdrawerList = (ListView) findViewById(R.id.left_drawer);\r\n\r\n\t\tdrawerList.setAdapter(new ArrayAdapter<String>(getSupportActionBar()\r\n\t\t\t\t.getThemedContext(), android.R.layout.simple_list_item_1,\r\n\t\t\t\topcionesMenu));\r\n\r\n\t\t// Añadimos Funciones al menú laterak\r\n\t\tdrawerList.setOnItemClickListener(new OnItemClickListener() {\r\n\r\n\t\t\t@SuppressLint(\"NewApi\")\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\r\n\r\n\t\t\t\tdrawerList.setItemChecked(position, true);\r\n\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\ttituloSeccion = opcionesMenu[position];\r\n\t\t\t\tgetSupportActionBar().setTitle(tituloSeccion);\r\n\r\n\t\t\t\t// SELECCIONAR LA POSICION DEL RECIBO SELECCIONADO ACTUALMENTE\r\n\t\t\t\tpositioncache = customArrayAdapter.getSelectedPosition();\r\n\t\t\t\t// int pos = customArrayAdapter.getSelectedPosition();\r\n\t\t\t\t// OBTENER EL RECIBO DE LA LISTA DE RECIBOS DEL ADAPTADOR\r\n\t\t\t\titem_selected = (vmDevolucion) customArrayAdapter\r\n\t\t\t\t\t\t.getItem(positioncache);\r\n\t\t\t\tif(fragmentActive== FragmentActive.LIST){\r\n\t\t\t\t\r\n\t\t\t\t\tswitch (position) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcase NUEVO_DEVOLUCION:\r\n\t\t\t\t\t\t\tintent = new Intent(ViewDevoluciones.this,\r\n\t\t\t\t\t\t\t\t\tViewDevolucionEdit.class);\r\n\t\t\t\t\t\t\tintent.putExtra(\"requestcode\", NUEVO_DEVOLUCION);\r\n\t\t\t\t\t\t\tstartActivityForResult(intent, NUEVO_DEVOLUCION);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase ABRIR_DEVOLUCION:\r\n\t\t\t\t\t\t\tabrirDevolucion();\r\n\t\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase BORRAR_DEVOLUCION:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\tif (!item_selected.getEstado().equals(\"REGISTRADA\")) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"El registro no se puede borrar en estado \"+ item_selected.getItemEstado()+\" .\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tMessage msg = new Message();\r\n\t\t\t\t\t\t\tBundle b = new Bundle();\r\n\t\t\t\t\t\t\tb.putInt(\"id\", (int) item_selected.getId());\r\n\t\t\t\t\t\t\tmsg.setData(b);\r\n\t\t\t\t\t\t\tmsg.what = ControllerProtocol.DELETE_DATA_FROM_LOCALHOST;\r\n\t\t\t\t\t\t\tNMApp.getController().getInboxHandler().sendMessage(msg);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase ENVIAR_DEVOLUCION:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tenviarDevolucion(ControllerProtocol.GETOBSERVACIONDEV);\r\n\t\t\t\t\t\t\t//BDevolucionM.beforeSend(item_selected.getId());\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase IMPRIMIR_COMPROBANTE:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tdevolucion = ModelDevolucion.getDevolucionbyID(item_selected.getId());\r\n\t\t\t\t\t\t\tif (devolucion.getNumeroCentral() == 0)\r\n\t\t\t\t\t\t\t\tenviarDevolucion(ControllerProtocol.GETOBSERVACIONDEV);\r\n\t\t\t\t\t\t\telse {\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tenviarImprimirDevolucion(\r\n\t\t\t\t\t\t\t\t\t\t\"Se mandara a imprimir el comprobante de la Devolución\",\r\n\t\t\t\t\t\t\t\t\t\tdevolucion);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t * BDevolucionM.ImprimirDevolucion(item_selected.getId(),\r\n\t\t\t\t\t\t\t * false);\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase BORRAR_ENVIADAS:\r\n\t\t\t\t\t\t\tif (item_selected == null) \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\t\t\tMessage msg2 = new Message();\r\n\t\t\t\t\t\t\tBundle b2 = new Bundle();\r\n\t\t\t\t\t\t\tb2.putInt(\"id\", -1);\r\n\t\t\t\t\t\t\tmsg2.setData(b2);\r\n\t\t\t\t\t\t\tmsg2.what = ControllerProtocol.DELETE_DATA_FROM_LOCALHOST;\r\n\t\t\t\t\t\t\tNMApp.getController().getInboxHandler().sendMessage(msg2);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase FICHA_DEL_CLIENTE:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\t\t\tif (NMNetWork.isPhoneConnected(NMApp.getContext())\r\n\t\t\t\t\t\t\t\t\t&& NMNetWork.CheckConnection(NMApp.getController())) {\r\n\t\t\t\t\t\t\t\tfragmentActive = FragmentActive.FICHACLIENTE;\r\n\t\t\t\t\t\t\t\tShowCustomerDetails();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase CUENTAS_POR_COBRAR:\r\n\t\t\t\t\t\t\tif (item_selected == null) {\r\n\t\t\t\t\t\t\t\tdrawerLayout.closeDrawers();\r\n\t\t\t\t\t\t\t\tAppDialog.showMessage(vd, \"Información\",\r\n\t\t\t\t\t\t\t\t\t\t\"Seleccione un registro.\",\r\n\t\t\t\t\t\t\t\t\t\tDialogType.DIALOGO_ALERTA);\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (NMNetWork.isPhoneConnected(NMApp.getContext())\r\n\t\t\t\t\t\t\t\t\t&& NMNetWork.CheckConnection(NMApp.getController())) {\r\n\t\t\t\t\t\t\t\tfragmentActive = FragmentActive.CONSULTAR_CUENTA_COBRAR;\r\n\t\t\t\t\t\t\t\tLOAD_CUENTASXPAGAR();\r\n\t\t\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase CERRAR:\r\n\t\t\t\t\t\t\tfinish();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(fragmentActive == FragmentActive.CONSULTAR_CUENTA_COBRAR){\r\n\t\t\t\t\t\r\n\t\t\t\t\tswitch (position) {\r\n\t\t\t\t\tcase MOSTRAR_FACTURAS:\r\n\t\t\t\t\t\tcuentasPorCobrar.cargarFacturasCliente();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_NOTAS_DEBITO: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarNotasDebito(); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_NOTAS_CREDITO: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarNotasCredito(); \r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_PEDIDOS: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarPedidos();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MOSTRAR_RECIBOS: \r\n\t\t\t\t\t\tcuentasPorCobrar.cargarRecibosColector(); \r\n\t\t\t\t\tbreak;\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\ttituloSeccion = getTitle();\r\n\t\ttituloApp = getTitle();\r\n\r\n\t\tdrawerToggle = new ActionBarDrawerToggle(this, drawerLayout,\r\n\t\t\t\tR.drawable.ic_navigation_drawer, R.string.drawer_open,\r\n\t\t\t\tR.string.drawer_close) {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onDrawerClosed(View view) {\r\n\t\t\t\tgetSupportActionBar().setTitle(tituloSeccion);\r\n\t\t\t\tActivityCompat.invalidateOptionsMenu(ViewDevoluciones.this);\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onDrawerOpened(View drawerView) {\r\n\t\t\t\tgetSupportActionBar().setTitle(tituloApp);\r\n\t\t\t\tActivityCompat.invalidateOptionsMenu(ViewDevoluciones.this);\r\n\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// establecemos el listener para el dragable ....\r\n\t\tdrawerLayout.setDrawerListener(drawerToggle);\r\n\r\n\t\tgetSupportActionBar().setDisplayHomeAsUpEnabled(true);\r\n\t\tgetSupportActionBar().setHomeButtonEnabled(true);\r\n\r\n\t}",
"private JMenu getMnuView() {\r\n\t\tif (mnuView == null) {\r\n\t\t\tmnuView = new JMenu();\r\n\t\t\tmnuView.setText(\"View\");\r\n\t\t\tmnuView.add(getMnuGoTo());\r\n\t\t\tmnuView.add(getSepView1());\r\n\t\t\tmnuView.add(getMniDebug());\r\n\t\t\tmnuView.add(getMniAutoRun());\r\n\t\t\tmnuView.add(getMniViewVXML());\r\n\t\t\tmnuView.add(getMniViewJS());\r\n\t\t}\r\n\t\treturn mnuView;\r\n\t}",
"public menu() {\n initComponents();\n }",
"public menu() {\n initComponents();\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_creatuser, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.add_new_notice_menu, menu);\n return true;\n }",
"public void onMenuNew() {\n handleMenuOpen(null);\n }",
"public MenuBar.MenuItem addView(Class<? extends View> viewClass) {\n String label = viewClass.getSimpleName();\n return addView(viewClass, true, label, null);\n }",
"protected void createContextMenu() {\n\t\t// TODO : XML Editor 에서 Query Editor 관련 Action 삭제~~\n\t\tMenuManager contextMenu = new MenuManager(\"#PopUp\"); //$NON-NLS-1$\n\t\tcontextMenu.add(new Separator(\"additions\")); //$NON-NLS-1$\n\t\tcontextMenu.setRemoveAllWhenShown(true);\n\t\tcontextMenu.addMenuListener(new NodeActionMenuListener());\n\t\tMenu menu = contextMenu.createContextMenu(getControl());\n\t\tgetControl().setMenu(menu);\n\t\t// makeActions();\n\t\t// hookSingleClickAction();\n\n\t}",
"private void loadMenu() {\n theView.getGamePanel().removeAll();\n Menu menu = new Menu(theView);\n menu.revalidate();\n menu.repaint();\n theView.getGamePanel().add(menu);\n menu.requestFocusInWindow();\n theView.setVisible(true);\n }",
"public Menu() {\n mainMenuScene = createMainMenuScene();\n mainMenu();\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.create_self, menu);\n\t\treturn true;\n\t}",
"private void createMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\tfileMenu = new JMenu(flp.getString(\"file\"));\n\t\tmenuBar.add(fileMenu);\n\n\t\tfileMenu.add(new JMenuItem(new ActionNewDocument(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionOpen(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSave(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSaveAs(flp, this)));\n\t\tfileMenu.addSeparator();\n\t\tfileMenu.add(new JMenuItem(new ActionExit(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionStatistics(flp, this)));\n\n\t\teditMenu = new JMenu(flp.getString(\"edit\"));\n\n\t\teditMenu.add(new JMenuItem(new ActionCut(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionCopy(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionPaste(flp, this)));\n\n\t\ttoolsMenu = new JMenu(flp.getString(\"tools\"));\n\n\t\titemInvert = new JMenuItem(new ActionInvertCase(flp, this));\n\t\titemInvert.setEnabled(false);\n\t\ttoolsMenu.add(itemInvert);\n\n\t\titemLower = new JMenuItem(new ActionLowerCase(flp, this));\n\t\titemLower.setEnabled(false);\n\t\ttoolsMenu.add(itemLower);\n\n\t\titemUpper = new JMenuItem(new ActionUpperCase(flp, this));\n\t\titemUpper.setEnabled(false);\n\t\ttoolsMenu.add(itemUpper);\n\n\t\tsortMenu = new JMenu(flp.getString(\"sort\"));\n\t\tsortMenu.add(new JMenuItem(new ActionSortAscending(flp, this)));\n\t\tsortMenu.add(new JMenuItem(new ActionSortDescending(flp, this)));\n\n\t\tmenuBar.add(editMenu);\n\t\tmenuBar.add(createLanguageMenu());\n\t\tmenuBar.add(toolsMenu);\n\t\tmenuBar.add(sortMenu);\n\n\t\tthis.setJMenuBar(menuBar);\n\t}",
"@Override\n public void create(SwipeMenu menu) {\n SwipeMenuItem item1 = new SwipeMenuItem(\n getApplicationContext());\n item1.setBackground(new ColorDrawable(Color.DKGRAY));\n // set width of an option (px)\n item1.setWidth(200);\n item1.setTitle(\"Action 1\");\n item1.setTitleSize(18);\n item1.setTitleColor(Color.WHITE);\n menu.addMenuItem(item1);\n\n SwipeMenuItem item2 = new SwipeMenuItem(\n getApplicationContext());\n // set item background\n item2.setBackground(new ColorDrawable(Color.RED));\n item2.setWidth(200);\n item2.setTitle(\"Action 2\");\n item2.setTitleSize(18);\n item2.setTitleColor(Color.WHITE);\n menu.addMenuItem(item2);\n }",
"public Menu() {\r\n \r\n ingresaVehiculo (); \r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_new_category, menu);\n return true;\n }",
"void createMenus(Container cp) {\r\n createMenu4Shape(cp);\r\n createMenu4Color(cp);\r\n createMenu4Filled(cp);\r\n createButtons(cp);\r\n }",
"protected ViewerPopupMenu createPopupMenu()\n {\n ViewerPopupMenu menu = super.createPopupMenu();\n\n viewAction = new ViewerAction(this, \"View\", \"view\",\n \"View Dofs\",\n \"View the dofs of an Actor in table form.\",\n null, null, \"Ctrl-V\", null, \"false\");\n\n menu.addSeparator();\n menu.add(viewAction);\n\n return menu;\n }",
"public void createItem(View view) {\n \t\n String[] temp = getCurrentItemTypes();\n \n Intent intent = new Intent(this, CreateItem.class);\n intent.putExtra(EDIT, \"no\");\n intent.putExtra(TYPES, temp);\n startActivityForResult(intent, 1);\n }",
"View createView();",
"private JMenu createFileMenu() {\n\t\tJMenu menu = new JMenu(\"File\"); \n\t\tmenu.add(createDetectiveNotes());\n\t\tmenu.add(createFileExitItem());\n\t\treturn menu;\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add_new_claim, menu);\n\t\treturn true;\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_new_message, menu);\n return true;\n }",
"@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_new_main, menu);\r\n return true;\r\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.activity_new_task, menu);\n return true;\n }",
"public FrmMenu() {\n initComponents();\n }",
"public int menuCreate(MenuVO menuVO) {\n\t\treturn mapper.menuCreate(menuVO);\r\n\t}",
"@Override\n public void create(SwipeMenu menu) {\n SwipeMenuItem goodItem = new SwipeMenuItem(getContext());\n // set item background\n goodItem.setBackground(new ColorDrawable(Color.rgb(0x30, 0xB1, 0xF5)));\n // set item width\n goodItem.setWidth(dp2px(90));\n // set a icon\n goodItem.setIcon(R.mipmap.ic_action_good);\n // add to menu\n menu.addMenuItem(goodItem);\n // create \"delete\" item\n SwipeMenuItem deleteItem = new SwipeMenuItem(getContext());\n // set item background\n deleteItem.setBackground(new ColorDrawable(Color.rgb(0xF9, 0x3F, 0x25)));\n // set item width\n deleteItem.setWidth(dp2px(90));\n // set a icon\n deleteItem.setIcon(R.mipmap.ic_action_discard);\n // add to menu\n menu.addMenuItem(deleteItem);\n }",
"private MenuBar.MenuItem createMenuItem(View vista, String menuAddress, Resource menuIcon) {\n MenuBar.MenuItem menuItem;\n MenuCommand cmd = new MenuCommand(menuBar, vista);\n menuItem = menuBar.addItem(menuAddress, menuIcon, cmd);\n menuItem.setStyleName(AMenuBar.MENU_DISABILITATO);\n\n return menuItem;\n }",
"UIFormMenu toUIFormMenu(String heading);",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.add_item, menu);\n return true;\n }",
"public void ajouterNouveauMenu(int idLigneprecedente, Menu nouveauMenu);",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add_item, menu);\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_new_appt, menu);\n return true;\n }",
"private void createMenu()\n\t{\n\t\tfileMenu = new JMenu(\"File\");\n\t\thelpMenu = new JMenu(\"Help\");\n\t\ttoolsMenu = new JMenu(\"Tools\");\n\t\t\n\t\tmenuBar = new JMenuBar();\n\t\t\n\t\texit = new JMenuItem(\"Exit\");\t\t\n\t\treadme = new JMenuItem(\"Readme\");\n\t\tabout = new JMenuItem(\"About\");\n\t\tsettings = new JMenuItem(\"Settings\");\n\t\t\t\t\n\t\tfileMenu.add (exit);\n\t\t\n\t\thelpMenu.add (readme);\n\t\thelpMenu.add (about);\t\n\t\t\n\t\ttoolsMenu.add (settings);\n\t\t\n\t\tmenuBar.add(fileMenu);\n\t\tmenuBar.add(toolsMenu);\n\t\tmenuBar.add(helpMenu);\t\t\n\t\t\t\t\n\t\tdefaultMenuBackground = menuBar.getBackground();\n\t\tdefaultMenuForeground = fileMenu.getForeground();\n\t\t\n\t}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_create_user, menu);\n return true;\n }"
]
| [
"0.8018157",
"0.72608435",
"0.7217236",
"0.710012",
"0.7044515",
"0.6975708",
"0.69588494",
"0.6831627",
"0.6796137",
"0.66907096",
"0.6671628",
"0.66293186",
"0.66138875",
"0.6493336",
"0.644808",
"0.6446263",
"0.644399",
"0.63953626",
"0.6370447",
"0.6370179",
"0.63643163",
"0.63634723",
"0.63609314",
"0.63532794",
"0.63435435",
"0.6339784",
"0.6337369",
"0.63232684",
"0.6313384",
"0.63111424",
"0.63048005",
"0.6291358",
"0.62802917",
"0.62627214",
"0.6262008",
"0.6245614",
"0.623639",
"0.6231162",
"0.62222576",
"0.62168247",
"0.6212115",
"0.6208015",
"0.62077314",
"0.6204897",
"0.61933845",
"0.6192919",
"0.6180985",
"0.6179468",
"0.6172465",
"0.61588234",
"0.615565",
"0.61332875",
"0.6128952",
"0.6125083",
"0.6124454",
"0.611638",
"0.6115229",
"0.6112826",
"0.6110844",
"0.6099213",
"0.6094008",
"0.6094008",
"0.6094008",
"0.6088676",
"0.60884976",
"0.6079638",
"0.60754305",
"0.60698116",
"0.60698116",
"0.6055182",
"0.6054718",
"0.60541713",
"0.60457355",
"0.60418653",
"0.60239536",
"0.60228974",
"0.60223114",
"0.6021009",
"0.60135317",
"0.60101384",
"0.6003689",
"0.60013205",
"0.5995665",
"0.5991132",
"0.59869355",
"0.5986794",
"0.59862876",
"0.5984771",
"0.5982867",
"0.5980981",
"0.5979897",
"0.5978924",
"0.5976219",
"0.5975476",
"0.59742135",
"0.5971362",
"0.5971054",
"0.5968484",
"0.5963932",
"0.59638435",
"0.5961537"
]
| 0.0 | -1 |
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() {
startButton = new javax.swing.JButton();
highscoresButton = new javax.swing.JButton();
quitButton = new javax.swing.JButton();
setMaximumSize(new java.awt.Dimension(600, 420));
setMinimumSize(new java.awt.Dimension(105, 103));
setPreferredSize(new java.awt.Dimension(600, 420));
startButton.setText("Start");
startButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
startButtonActionPerformed(evt);
}
});
highscoresButton.setText("Highscores");
highscoresButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
highscoresButtonActionPerformed(evt);
}
});
quitButton.setText("Quit");
quitButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
quitButtonActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(244, 244, 244)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(startButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(highscoresButton, javax.swing.GroupLayout.DEFAULT_SIZE, 97, Short.MAX_VALUE)
.addComponent(quitButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap(259, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(146, 146, 146)
.addComponent(startButton)
.addGap(6, 6, 6)
.addComponent(highscoresButton)
.addGap(6, 6, 6)
.addComponent(quitButton)
.addContainerGap(193, Short.MAX_VALUE))
);
} | {
"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 PatientUI() {\n initComponents();\n }",
"public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }",
"public Oddeven() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public intrebarea() {\n initComponents();\n }",
"public Magasin() {\n initComponents();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"public ZobrazUdalost() {\n initComponents();\n }",
"public NewCustomerGUI() {\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 kunde() {\n initComponents();\n }",
"public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public MusteriEkle() {\n initComponents();\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 frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public DESHBORDPANAL() {\n initComponents();\n }",
"public frmVenda() {\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 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 }",
"public sinavlar2() {\n initComponents();\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 P0405() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public Choose1() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }",
"public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public GUI_StudentInfo() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"public bt526() {\n initComponents();\n }",
"public Pemilihan_Dokter() {\n initComponents();\n }",
"public Ablak() {\n initComponents();\n }",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"public Pregunta23() {\n initComponents();\n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public AvtekOkno() {\n initComponents();\n }",
"public busdet() {\n initComponents();\n }",
"public ViewPrescriptionForm() {\n initComponents();\n }",
"public Ventaform() {\n initComponents();\n }",
"public Kuis2() {\n initComponents();\n }",
"public CreateAccount_GUI() {\n initComponents();\n }",
"public POS1() {\n initComponents();\n }",
"public Carrera() {\n initComponents();\n }",
"public EqGUI() {\n initComponents();\n }",
"public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }",
"public nokno() {\n initComponents();\n }",
"public dokter() {\n initComponents();\n }",
"public ConverterGUI() {\n initComponents();\n }",
"public hitungan() {\n initComponents();\n }",
"public Modify() {\n initComponents();\n }",
"public frmAddIncidencias() {\n initComponents();\n }",
"public CovidGUI(){\n initComponents();\n }"
]
| [
"0.73199165",
"0.7291065",
"0.7291065",
"0.7291065",
"0.72868747",
"0.72488254",
"0.7214099",
"0.7209363",
"0.7196111",
"0.7190702",
"0.7184576",
"0.71590984",
"0.71483636",
"0.7093415",
"0.70814407",
"0.70579475",
"0.69872457",
"0.69773155",
"0.6955104",
"0.69544697",
"0.69453543",
"0.6943464",
"0.69364315",
"0.6931576",
"0.6928309",
"0.6925433",
"0.69250214",
"0.69115317",
"0.6911434",
"0.6893781",
"0.6892524",
"0.6891883",
"0.6891585",
"0.68891054",
"0.6883182",
"0.68830794",
"0.6881544",
"0.68788856",
"0.6876481",
"0.6873896",
"0.6871883",
"0.6859969",
"0.6856538",
"0.6855796",
"0.6855392",
"0.68540794",
"0.68534625",
"0.6853007",
"0.6853007",
"0.6844998",
"0.6837484",
"0.68364847",
"0.68297",
"0.6829288",
"0.6827209",
"0.6824552",
"0.6822856",
"0.68174845",
"0.6817476",
"0.68111503",
"0.6809666",
"0.6809588",
"0.6809156",
"0.68081236",
"0.6802404",
"0.6794206",
"0.6793367",
"0.6792882",
"0.6791294",
"0.6789582",
"0.67894405",
"0.6788515",
"0.6782408",
"0.6766765",
"0.6766263",
"0.67650926",
"0.67574364",
"0.6756913",
"0.6753227",
"0.67513406",
"0.6741571",
"0.6740101",
"0.6737476",
"0.6737115",
"0.67346376",
"0.6727922",
"0.6727414",
"0.67207795",
"0.67162555",
"0.67161065",
"0.6715331",
"0.6709024",
"0.67072886",
"0.6703357",
"0.67023003",
"0.6701596",
"0.66995883",
"0.6699478",
"0.6694889",
"0.66919625",
"0.6689987"
]
| 0.0 | -1 |
Test compitability with old JSON format. | @Test
@SmallTest
public void testSerializeToJson() throws Throwable {
final String jsonObjectString =
"{'crash-local-id':'123456abc','crash-capture-time':1234567890,"
+ "'crash-is-hidden':false,"
+ "'crash-keys':{'app-package-name':'org.test.package'}}";
JSONObject expectedJsonObject = new JSONObject(jsonObjectString);
CrashInfo c = createCrashInfo("123456abc", 1234567890, null, -1, "org.test.package", null);
Assert.assertEquals(c.serializeToJson(), expectedJsonObject.toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected MatchStrength hasJSONFormat(InputAccessor acc)\n/* */ throws IOException\n/* */ {\n/* 507 */ return ByteSourceJsonBootstrapper.hasJSONFormat(acc);\n/* */ }",
"@Test\n void getAndFormatJson() {\n g.getJsonFromGitHub();\n String json = g.getJsonString();\n\n boolean isValid;\n try {\n new Gson().fromJson(json, Object.class);\n isValid = true;\n } catch(com.google.gson.JsonSyntaxException ex) {\n isValid = false;\n }\n assertTrue(isValid, \"Invalid JSON\");\n }",
"@Test\n public void verifyJsonBackWardCompatible() throws IOException, URISyntaxException, ParseException {\n\n ObjectMapper mapper = new ObjectMapper();\n\n String origJsonDataFile = UserTest.class.getSimpleName() + \"_noDesc.json\";\n String jsonData = ApiTestUtil.readJSONFile(origJsonDataFile);\n\n User u = mapper.readValue(jsonData, User.class);\n assertEquals( Integer.valueOf(56239), u.getId());\n\n String targetJson = mapper.writeValueAsString(u);\n JSONObject json = ApiTestUtil.convertJSONStr2Obj(targetJson);\n JSONObject expectedJson = ApiTestUtil.convertJSONStr2Obj(jsonData);\n\n ApiTestUtil.verifyJson((Map<String, Object>)json, (Map<String, Object>)expectedJson);\n\n }",
"@Test\n public void testWithNewWarnings() {\n String request = \"{\\\"canComputeNew\\\":{\\\"failedNewAll\\\":\\\"\\\",\\\"failedNewHigh\\\":\\\"1\\\",\\\"failedNewLow\\\":\\\"\\\",\\\"failedNewNormal\\\":\\\"\\\",\\\"unstableNewAll\\\":\\\"1\\\",\\\"unstableNewHigh\\\":\\\"\\\",\\\"unstableNewLow\\\":\\\"\\\",\\\"unstableNewNormal\\\":\\\"\\\",\\\"useDeltaValues\\\":false},\\\"canRunOnFailed\\\":false,\\\"defaultEncoding\\\":\\\"\\\",\\\"failedTotalAll\\\":\\\"\\\",\\\"failedTotalHigh\\\":\\\"\\\",\\\"failedTotalLow\\\":\\\"\\\",\\\"failedTotalNormal\\\":\\\"\\\",\\\"healthy\\\":\\\"0\\\",\\\"pattern\\\":\\\"\\\",\\\"shouldDetectModules\\\":false,\\\"thresholdLimit\\\":\\\"low\\\",\\\"unHealthy\\\":\\\"50\\\",\\\"unstableTotalAll\\\":\\\"\\\",\\\"unstableTotalHigh\\\":\\\"\\\",\\\"unstableTotalLow\\\":\\\"\\\",\\\"unstableTotalNormal\\\":\\\"\\\"}\";\n\n JSONObject input = JSONObject.fromObject(request);\n JSONObject output = PluginDescriptor.convertHierarchicalFormData(input);\n\n String expected = \"{\\\"canComputeNew\\\":true,\\\"failedNewAll\\\":\\\"\\\",\\\"failedNewHigh\\\":\\\"1\\\",\\\"failedNewLow\\\":\\\"\\\",\\\"failedNewNormal\\\":\\\"\\\",\\\"unstableNewAll\\\":\\\"1\\\",\\\"unstableNewHigh\\\":\\\"\\\",\\\"unstableNewLow\\\":\\\"\\\",\\\"unstableNewNormal\\\":\\\"\\\",\\\"useDeltaValues\\\":false,\\\"canRunOnFailed\\\":false,\\\"defaultEncoding\\\":\\\"\\\",\\\"failedTotalAll\\\":\\\"\\\",\\\"failedTotalHigh\\\":\\\"\\\",\\\"failedTotalLow\\\":\\\"\\\",\\\"failedTotalNormal\\\":\\\"\\\",\\\"healthy\\\":\\\"0\\\",\\\"pattern\\\":\\\"\\\",\\\"shouldDetectModules\\\":false,\\\"thresholdLimit\\\":\\\"low\\\",\\\"unHealthy\\\":\\\"50\\\",\\\"unstableTotalAll\\\":\\\"\\\",\\\"unstableTotalHigh\\\":\\\"\\\",\\\"unstableTotalLow\\\":\\\"\\\",\\\"unstableTotalNormal\\\":\\\"\\\"}\";\n assertEquals(\"Wrong JSON \", JSONObject.fromObject(expected), output);\n }",
"void validateJson();",
"private static boolean isJSONValid(String jsonInString){\n\n\t\ttry {\n\t\t\tfinal ObjectMapper mapper = new ObjectMapper();\n\t\t\tmapper.readTree(jsonInString);\n\t\t\treturn true;\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(\"INVALID JSON-LD SYNTAX\");\n\t\t\treturn false;\n\t\t}\n\n\t}",
"@Test\n public void testWithoutNewWarnings() {\n String request = \"{\\\"canRunOnFailed\\\":false,\\\"defaultEncoding\\\":\\\"\\\",\\\"failedTotalAll\\\":\\\"\\\",\\\"failedTotalHigh\\\":\\\"\\\",\\\"failedTotalLow\\\":\\\"\\\",\\\"failedTotalNormal\\\":\\\"\\\",\\\"healthy\\\":\\\"0\\\",\\\"pattern\\\":\\\"\\\",\\\"shouldDetectModules\\\":false,\\\"thresholdLimit\\\":\\\"low\\\",\\\"unHealthy\\\":\\\"50\\\",\\\"unstableTotalAll\\\":\\\"\\\",\\\"unstableTotalHigh\\\":\\\"\\\",\\\"unstableTotalLow\\\":\\\"\\\",\\\"unstableTotalNormal\\\":\\\"\\\"}\";\n\n JSONObject input = JSONObject.fromObject(request);\n JSONObject output = PluginDescriptor.convertHierarchicalFormData(input);\n\n assertEquals(\"Wrong JSON \", input, output);\n }",
"@Test(timeout = 4000)\n public void test079() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject((Object) \"gettoUpperCase\");\n jSONObject1.names();\n Integer integer0 = new Integer(92);\n JSONObject jSONObject2 = jSONObject0.append(\"gettoUpperCase\", integer0);\n jSONObject2.names();\n jSONObject0.optJSONArray(\"gettoUpperCase\");\n JSONObject.numberToString(integer0);\n Boolean boolean0 = new Boolean(true);\n JSONObject.testValidity(boolean0);\n }",
"@Test(timeout = 4000)\n public void test099() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject(jSONObject0);\n JSONObject jSONObject2 = jSONObject1.putOpt(\"\", jSONObject0);\n Byte.compare((byte)42, (byte)42);\n JSONObject.quote(\"\");\n Byte.toUnsignedInt((byte)42);\n JSONObject.valueToString(jSONObject2, (-1394), (-1394));\n JSONObject jSONObject3 = new JSONObject(\"{\\n\\\"java.lang.String@0000000003\\\": {},\\n\\\"java.lang.String@0000000004\\\": \\\"java.lang.Class@0000000005\\\"\\n}\");\n String string0 = \"&<uWyN63)KiOjjs&n3\";\n JSONObject jSONObject4 = null;\n try {\n jSONObject4 = new JSONObject(\"&<uWyN63)KiOjjs&n3\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of &<uWyN63)KiOjjs&n3\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"public MatchStrength hasFormat(InputAccessor acc)\n/* */ throws IOException\n/* */ {\n/* 478 */ if (getClass() == JsonFactory.class) {\n/* 479 */ return hasJSONFormat(acc);\n/* */ }\n/* 481 */ return null;\n/* */ }",
"@Test(timeout = 4000)\n public void test101() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject(jSONObject0);\n assertEquals(1, jSONObject1.length());\n \n jSONObject0.toJSONArray((JSONArray) null);\n JSONObject jSONObject2 = jSONObject0.put(\"false\", (Object) \"false\");\n boolean boolean0 = jSONObject2.getBoolean(\"false\");\n assertFalse(boolean0);\n \n String string0 = JSONObject.quote(\"true\");\n assertEquals(\"\\\"true\\\"\", string0);\n }",
"@Test(timeout = 4000)\n public void test05() throws Throwable {\n HashMap<Object, Double> hashMap0 = new HashMap<Object, Double>(13);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n Float float0 = new Float(3525.726934349);\n Double double0 = new Double(Double.NaN);\n hashMap0.put(float0, double0);\n stringArray0[1] = \"Z\";\n stringArray0[2] = \"] is not a Boolean.\";\n jSONObject0.optBoolean(\"Expected a ',' or ']'\");\n stringArray0[3] = \"p0JV~u{VV\";\n stringArray0[4] = \"a>(3H]W1\";\n stringArray0[5] = \"4v)7wYwy@>>\";\n stringArray0[6] = \"`00MMvjO_a\";\n stringArray0[7] = \";Az%j \";\n stringArray0[8] = \"L;IoBM\";\n JSONObject jSONObject1 = new JSONObject(jSONObject0, stringArray0);\n JSONObject.testValidity(\";Az%j \");\n jSONObject1.optBoolean(\"`00MMvjO_a\");\n try { \n jSONObject1.getJSONArray((String) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"default boolean checkJsonResp(JsonElement response) {\n return false;\n }",
"@Test(timeout = 4000)\n public void test090() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject();\n jSONObject1.putOpt(\"\", jSONObject0);\n Byte.compare((byte)47, (byte)47);\n JSONObject.quote(\"\");\n JSONObject jSONObject2 = jSONObject1.optJSONObject(\"\");\n assertNotSame(jSONObject1, jSONObject2);\n }",
"@Test\n public void requestFormatIncreased() {\n assertOpenApiBackwardIncompatible(BASE, \"bc_request_schema_format_increased.yaml\");\n }",
"public void testClarificationJSON() throws Exception {\n\n IInternalContest contest = new UnitTestData().getContest();\n JSONTool jsonTool= new JSONTool(contest, null);\n\n Clarification[] clarifications = contest.getClarifications();\n Arrays.sort(clarifications, new ClarificationComparator());\n\n Clarification clarification = clarifications[4];\n ClarificationAnswer answer = null;\n String json = jsonTool.convertToJSON(clarification, answer ).toString();\n\n int problemNumber = JSONUtilities.getProblemIndex(contest, clarification.getProblemId());\n assertEquals(\"Expected problem number \", 1, problemNumber);\n\n// editFile(writeFile(new File(\"/tmp/stuf.\" + System.currentTimeMillis() + \".json\"), json));\n\n // System.out.println(\"debug clar json = \"+json);\n\n // debug json = {\"id\":\"5\", \"from_team_id\":\"5\", \"to_team_id\":\"5\", \"reply_to_id\": null, \"problem_id\":\"1\", \"text\":\"Why #2? from team5\", \"start_time\": null, \"start_contest_time\":\"0.000\"}\n\n asertEqualJSON(json, \"text\", \"Why #2? from team5\");\n asertEqualJSON(json, \"reply_to_id\", \"null\");\n asertEqualJSON(json, \"problem_id\", jsonTool.getProblemId(contest.getProblem(clarification.getProblemId())));\n\n// assertJSONStringValue(json, \"problem_id\", \"1\"); SOMEDAY\n assertJSONStringValue(json, \"problem_id\", jsonTool.getProblemId(contest.getProblem(clarification.getProblemId())));\n// assertJSONStringValue(json, \"id\", \"5\"); SOMEDAY\n assertJSONStringValue(json, \"id\", clarification.getElementId().toString());\n assertJSONStringValue(json, \"from_team_id\", \"5\" );\n assertJSONNullValue(json, \"to_team_id\");\n }",
"protected boolean isJSONValid(String callReoprtResponse2) {\n try {\n new JSONObject(callReoprtResponse2);\n } catch (JSONException ex) {\n // edited, to include @Arthur's comment\n // e.g. in case JSONArray is valid as well...\n try {\n new JSONArray(callReoprtResponse2);\n } catch (JSONException ex1) {\n return false;\n }\n }\n return true;\n }",
"@Test(timeout = 4000)\n public void test02() throws Throwable {\n float float0 = (-327.5252F);\n Float float1 = new Float((-327.5252F));\n Float.min(0.0F, 0.0F);\n JSONObject jSONObject0 = new JSONObject(float1);\n String string0 = \"{}\";\n JSONObject jSONObject1 = jSONObject0.put(\"{}\", 518.9508);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n jSONObject1.put(\"J,/Ph.9`e('Sb=@\", (Object) jSONArray0);\n try { \n jSONObject1.getBoolean(\"{}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{}\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Override\n public void compareJSON(final String prefix, final JSONObject expected, final JSONObject actual,\n final JSONCompareResult result) throws JSONException\n {\n checkJsonObjectKeysExpectedInActual(prefix, expected, actual, result);\n\n // If strict, check for vice-versa\n if (!this.mode.isExtensible())\n {\n checkJsonObjectKeysActualInExpected(prefix, expected, actual, result);\n }\n }",
"@Test(timeout = 4000)\n public void test20() throws Throwable {\n HashMap<Object, Double> hashMap0 = new HashMap<Object, Double>(13);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n Float float0 = new Float(3525.726934349);\n Double double0 = new Double(Double.NaN);\n hashMap0.put(float0, double0);\n stringArray0[1] = \"Z\";\n stringArray0[2] = \"\";\n jSONObject0.optBoolean(\"Expected a ',' or ']'\");\n JSONObject jSONObject1 = new JSONObject(jSONObject0, stringArray0);\n JSONObject.testValidity(jSONObject1);\n jSONObject0.optBoolean(\"Z\");\n try { \n jSONObject0.getJSONArray(\"A1 `'ski<ljrq9;O7L\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"A1 `'ski<ljrq9;O7L\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test11() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n byte byte1 = (byte)97;\n Byte.compare((byte)97, (byte) (-119));\n jSONObject0.isNull(\"(_&\");\n JSONObject.numberToString(byte0);\n JSONObject.quote(\"\");\n JSONObject.doubleToString((byte) (-119));\n Short short0 = new Short((byte)39);\n jSONObject0.putOpt(\"\\\"$c.1O[-X9i\", short0);\n JSONTokener jSONTokener0 = new JSONTokener(\"'m P|=\");\n JSONArray jSONArray0 = null;\n try {\n jSONArray0 = new JSONArray(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONArray text must start with '[' at character 1 of 'm P|=\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test049() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.put(\"MnMGL\", (Object) \"MnMGL\");\n jSONObject1.put(\"MnMGL\", 0.0);\n try { \n jSONObject1.getBoolean(\"MnMGL\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"MnMGL\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test024() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n String[] stringArray0 = new String[0];\n JSONObject jSONObject1 = new JSONObject(jSONObject0, stringArray0);\n assertFalse(jSONObject1.equals((Object)jSONObject0));\n }",
"public void testGetJSON() {\n\t}",
"@Test(timeout = 4000)\n public void test020() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.put(\"MnMG\", (Object) \"MnMG\");\n jSONObject1.optLong(\"|q\", 0L);\n try { \n jSONObject1.getBoolean(\"MnMG\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"MnMG\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test26() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n jSONObject0.optDouble(\"Ih?`q\", (double) (-821));\n Integer.remainderUnsigned((-821), (-821));\n StringWriter stringWriter0 = new StringWriter(1782);\n jSONObject0.write(stringWriter0);\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(\"Ih?`q\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of Ih?`q\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test047() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.put(\"MnMG\", (Object) \"MnMG\");\n jSONObject1.put(\"MnMG\", false);\n assertEquals(1, jSONObject0.length());\n \n jSONObject1.getBoolean(\"MnMG\");\n String string0 = JSONObject.valueToString(jSONObject0);\n String string1 = JSONObject.quote(\"wheel.json.JSONObject@0000000001\");\n assertFalse(string1.equals((Object)string0));\n }",
"@Override\n public boolean isMaybeStrJSON() {\n checkNotPolymorphicOrUnknown();\n return (flags & STR_JSON) != 0;\n }",
"@Test(timeout = 4000)\n public void test088() throws Throwable {\n Float float0 = new Float(0.0F);\n Float.max(0.0F, 3101.6F);\n JSONObject jSONObject0 = new JSONObject(float0);\n jSONObject0.append(\"isformat\", \"isformat\");\n String string0 = JSONObject.valueToString(jSONObject0, (-3535), (-3535));\n String string1 = JSONObject.numberToString(float0);\n assertFalse(string1.equals((Object)string0));\n }",
"public boolean supportsJsonType() {\n return false;\n }",
"@Test(timeout = 4000)\n public void test023() throws Throwable {\n JSONObject.quote(\"e(h'R;/n&72HYkju\");\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n jSONObject0.put(\"=,6\\\"jtG.eI\", (Collection) linkedList0);\n try { \n jSONObject0.getBoolean(\"\\\"e(h'R;/n&72HYk\\\\ju\\\"\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\\\\\"e(h'R;/n&72HYk\\\\\\\\ju\\\\\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test025() throws Throwable {\n JSONObject.testValidity((Object) null);\n }",
"@Test(timeout = 4000)\n public void test089() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n String string0 = \"Qn<G\";\n jSONObject0.put(\"Qn<G\", (Object) \"Qn<G\");\n try { \n jSONObject0.getJSONArray(\"Qn<G\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"Qn<G\\\"] is not a JSONArray.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test\n\tpublic void requestDataForCustomer12212_checkContentType_expectApplicationJson() {\n\n\t\tgiven().\n\t\t\tspec(requestSpec).\n\t\twhen().\n\t\tthen();\n\t}",
"@Test\n public void jsonTest() {\n // TODO: test json\n }",
"@Test(timeout = 4000)\n public void test075() throws Throwable {\n JSONTokener jSONTokener0 = new JSONTokener(\"{\");\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must end with '}' at character 1 of {\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"private static boolean m2252a(JsonValue jsonValue) {\n JsonValue jsonValue2 = jsonValue.f2957f;\n while (jsonValue2 != null) {\n if (jsonValue2.m2276k() || jsonValue2.m2275j()) {\n return false;\n }\n jsonValue2 = jsonValue2.f2958g;\n }\n return true;\n }",
"@Test(timeout = 4000)\n public void test027() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n String string0 = \"MnMG\";\n JSONObject jSONObject1 = jSONObject0.put(\"MnMG\", (Object) \"MnMG\");\n jSONObject0.optInt(\"MnMG\", (-646));\n try { \n jSONObject1.getBoolean(\"MnMG\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"MnMG\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test23() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"] is not a JSONArray.\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.optDouble(\"] is not a JSONArray.\", (-2064.666));\n jSONObject0.optBoolean(\"] is not a JSONArray.\");\n jSONObject0.put(\"wheel.json.JSONException\", (int) (byte)44);\n String string0 = null;\n JSONTokener jSONTokener0 = new JSONTokener(\"istoUnsignedLong\");\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of istoUnsignedLong\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"boolean hasJsonReqMsg();",
"@Test(timeout = 4000)\n public void test094() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n jSONObject1.put(\"su\", 4135.211029659);\n jSONObject1.getDouble(\"su\");\n try { \n jSONObject1.getBoolean(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@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 }",
"@Test(timeout = 4000)\n public void test018() throws Throwable {\n String string0 = JSONObject.quote(\"=H ^/$6U29)n\");\n assertEquals(\"\\\"=H ^/$6U29)n\\\"\", string0);\n \n JSONObject jSONObject0 = new JSONObject();\n boolean boolean0 = jSONObject0.optBoolean(\"\\\"=H ^/$6U29)n\\\"\", true);\n assertTrue(boolean0);\n \n String string1 = jSONObject0.toString(8192, 91);\n assertEquals(\"{}\", string1);\n }",
"@Test\n public void responseFormatDecreased() {\n assertOpenApiBackwardIncompatible(BASE, \"bc_response_schema_format_decreased.yaml\");\n }",
"@Test(timeout = 4000)\n public void test076() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n Integer integer0 = new Integer(55);\n JSONObject jSONObject1 = jSONObject0.append(\"Substring bounds error\", integer0);\n jSONObject1.getJSONArray(\"Substring bounds error\");\n jSONObject1.append(\"Bad value from toJSONString: \", integer0);\n String string0 = jSONObject1.optString(\"Substring bounds error\", \"num\");\n assertNotNull(string0);\n }",
"@Test(timeout = 4000)\n public void test12() throws Throwable {\n HashMap<Object, Double> hashMap0 = new HashMap<Object, Double>(13);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n Float float0 = new Float(3525.726934349);\n Double double0 = new Double(Double.NaN);\n hashMap0.put(float0, double0);\n stringArray0[1] = \"Z\";\n stringArray0[2] = \"] is not a Boolean.\";\n jSONObject0.optBoolean(\"Expected a ',' or ']'\");\n stringArray0[3] = \"p0JV~u{VV\";\n jSONObject0.optLong(\"wheel.json.JSONException\");\n jSONObject0.remove((String) null);\n jSONObject0.optString(\"is\");\n LinkedList<Short> linkedList0 = new LinkedList<Short>();\n jSONObject0.put(\"\\b\", (Collection) linkedList0);\n String string0 = \"-)#>`U+F=\";\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(\"JSON does not allow non-finite numbers.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of JSON does not allow non-finite numbers.\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test22() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n String string0 = \"53N/{T[\";\n JSONObject jSONObject1 = jSONObject0.put(\"53N/{T[\", (-1913.632));\n jSONObject1.toString((-821));\n jSONObject0.optString(\"53N/{T[\", \"53N/{T[\");\n jSONObject0.opt(\",2fHJL;.]tm*PJ9\");\n jSONObject0.optLong((String) null);\n jSONObject0.toString((-821));\n Byte byte0 = new Byte((byte)1);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONObject jSONObject2 = jSONObject1.put(\"|f}%!.^JO \", (Collection) linkedList0);\n JSONObject jSONObject3 = jSONObject2.accumulate(\"o%,g eOJ=9n\\\"\", \"java.lang.Double@0000000003\");\n try { \n jSONObject3.getJSONObject(\"{\\n\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003,\\n\\\"java.lang.String@0000000004\\\": \\\"java.lang.Class@0000000005\\\"\\n}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{\\\\n\\\\\\\"java.lang.String@0000000002\\\\\\\": java.lang.Double@0000000003,\\\\n\\\\\\\"java.lang.String@0000000004\\\\\\\": \\\\\\\"java.lang.Class@0000000005\\\\\\\"\\\\n}\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"private static boolean m2253b(JsonValue jsonValue) {\n for (JsonValue jsonValue2 = jsonValue.f2957f; jsonValue2 != null; jsonValue2 = jsonValue2.f2958g) {\n if (!jsonValue2.m2278m()) {\n return false;\n }\n }\n return true;\n }",
"@Test(timeout = 4000)\n public void test18() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n JSONObject jSONObject1 = jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n int int0 = new Byte((byte)97);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n jSONObject0.put(\"*bpp)j7=\", (Collection) linkedList0);\n jSONObject1.accumulate(\"] is not a JSONArray.\", linkedList0);\n try { \n jSONObject0.getJSONObject(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{\\\\\\\"java.lang.String@0000000002\\\\\\\": java.lang.Double@0000000003}\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test\n public void testReportProducesValidJson() throws Exception {\n testReportProducesCorrectOutput(\"json\");\n }",
"@Test\n public void testVisaCCPositive_JSON() {\n String visaCCNumber = UtilityParsers.jsonHelper(visaInputFilePathJSON);\n CreditCardValidator creditCardValidator = new VisaCCValidator(visaCCNumber);\n assertTrue(creditCardValidator.validateCreditCard());\n }",
"@Test(timeout = 4000)\n public void test019() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n jSONObject0.optBoolean(\",\\n\");\n JSONObject.doubleToString(0.0);\n Object object0 = JSONObject.NULL;\n jSONObject0.append(\"] is not a Boolean.\", object0);\n assertEquals(1, jSONObject0.length());\n }",
"@Test(timeout = 4000)\n public void test06() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n Byte.compare((byte)97, (byte) (-119));\n jSONObject0.isNull(\"(_&\");\n assertEquals(1, jSONObject0.length());\n \n JSONObject.numberToString(byte0);\n JSONObject.quote(\"\");\n JSONObject.doubleToString((byte) (-119));\n JSONObject.quote(\"wheel.json.JSONObject$1\");\n String string0 = JSONObject.doubleToString(216);\n assertEquals(\"216\", string0);\n }",
"@Test(timeout = 4000)\n public void test071() throws Throwable {\n JSONTokener jSONTokener0 = new JSONTokener(\"{o?Z\");\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Expected a ':' after a key at character 4 of {o?Z\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test011() throws Throwable {\n JSONObject.quote(\"e(h'R;/n&72HYkju\");\n HashMap<Object, String> hashMap0 = new HashMap<Object, String>();\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n try { \n jSONObject0.getBoolean((String) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test074() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n String string0 = \"MnMGL\";\n JSONObject jSONObject1 = jSONObject0.put(\"MnMGL\", (Object) \"MnMGL\");\n try { \n jSONObject1.append(\"MnMGL\", jSONObject0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[MnMGL] is not a JSONArray.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test19() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n double double0 = jSONObject0.optDouble(\"Ih?`q\", (double) (-821));\n assertEquals((-821.0), double0, 0.01);\n \n boolean boolean0 = jSONObject0.optBoolean(\"/W_,B?i~I:-MW8${,z\");\n assertFalse(boolean0);\n assertEquals(1, jSONObject0.length());\n }",
"@Test(timeout = 4000)\n public void test102() throws Throwable {\n String string0 = \"{+H1R$Cu|49H=>Jn\";\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(\"{+H1R$Cu|49H=>Jn\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Expected a ',' or '}' at character 16 of {+H1R$Cu|49H=>Jn\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test073() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n int int0 = (-29);\n int int1 = 22;\n HashMap<String, String> hashMap0 = new HashMap<String, String>();\n JSONObject jSONObject1 = new JSONObject((Map) hashMap0);\n JSONObject.valueToString(hashMap0, (-29), 22);\n LinkedList<Float> linkedList0 = new LinkedList<Float>();\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n jSONArray0.optInt((-65));\n try { \n Integer.valueOf(\"{}\");\n fail(\"Expecting exception: NumberFormatException\");\n \n } catch(NumberFormatException e) {\n //\n // For input string: \\\"{}\\\"\n //\n verifyException(\"java.lang.NumberFormatException\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test098() throws Throwable {\n String string0 = \"{3&b()u=\\\"9(/N;Cfw?\";\n JSONTokener jSONTokener0 = new JSONTokener(\"{3&b()u=\\\"9(/N;Cfw?\");\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Unterminated string at character 18 of {3&b()u=\\\"9(/N;Cfw?\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test063() throws Throwable {\n String string0 = JSONObject.quote(\"=H ^/$6YUz29)n\");\n JSONObject jSONObject0 = new JSONObject();\n String string1 = JSONObject.valueToString(jSONObject0);\n assertFalse(string1.equals((Object)string0));\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 }",
"@Test\n public void readSystemObjectClassDoctorFeedback() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"DoctorFeedback\");\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 DoctorFeedback properly\", object.getClass(), actual.getClass());\n }",
"@Test(timeout = 4000)\n public void test15() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n StringWriter stringWriter0 = new StringWriter(12);\n Double.sum(0.0, (-2252.167794836282));\n Double.isFinite((-710.25));\n JSONObject.getNames((Object) stringWriter0);\n String string0 = \"\";\n String string1 = \"RT8u3l.~].,i\";\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(\"RT8u3l.~].,i\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of RT8u3l.~].,i\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"boolean isValid(JsonMessage message);",
"@Test(timeout = 4000)\n public void test16() throws Throwable {\n HashMap<Float, Object> hashMap0 = new HashMap<Float, Object>();\n Float float0 = new Float(0.0F);\n Float.max(0.0F, 0.0F);\n hashMap0.put(float0, float0);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n hashMap0.remove((Object) jSONObject0);\n Long long0 = new Long((-1L));\n JSONObject.valueToString(long0);\n hashMap0.getOrDefault(jSONObject0, jSONObject0);\n JSONObject.valueToString(hashMap0, 8, 13);\n JSONObject.doubleToString(0.0);\n jSONObject0.keys();\n jSONObject0.toString(13);\n try { \n jSONObject0.getJSONArray(\";&7Li\\\"+g4z OK%1i76o\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\";&7Li\\\\\\\"+g4z OK%1i76o\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test public void get_card_ckeck_content_format_is_JSON_test() throws ClientProtocolException, IOException\n\t{\n\t\t\n\t\tSystem.out.println(\"\\n--------------------------------------------------\");\n\t\tSystem.out.println(\"Start test: \" + testName.getMethodName());\n\t\t\n\t\t//Given\n\t\t//Add a card to get card content\n\t\tString idList = testSuite.listId;\n\t\tString due = \"null\";\n\t\tString name = \"Card need to get content\";\n\t\tString desc = \"API test - create this card and need to get its content\";\n\t\t\n\t\tString createQuery = String.format(\"idList=%s&due=%s&name=%s&desc=%s&key=%s&token=%s\", \n\t\t\t\t\t\t\t\t\t\tURLEncoder.encode(idList, charset), \n\t\t\t\t\t\t\t\t\t\tURLEncoder.encode(due, charset),\n\t\t\t\t\t\t\t\t\t\tURLEncoder.encode(name, charset), \n\t\t\t\t\t\t\t\t\t\tURLEncoder.encode(desc, charset), \n\t\t\t\t\t\t\t\t\t\tURLEncoder.encode(key, charset), \n\t\t\t\t\t\t\t\t\t\tURLEncoder.encode(token, charset));\n\t\tCloseableHttpClient httpClient = HttpClients.createDefault();\n\t\tHttpPost postRequest = new HttpPost(cardUrl + \"?\" + createQuery);\n\t\tHttpResponse response = httpClient.execute(postRequest);\n\t\tif(response.getStatusLine().getStatusCode() == 200) \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Add test card successfully \n\t\t{\n\t\t\tJsonReader jsonReader = Json.createReader(response.getEntity().getContent());\n\t\t\tJsonObject cardJson = jsonReader.readObject();\n\t\t\tString cardId = cardJson.getString(\"id\");\n\t\t\tjsonReader.close();\n\t\t\tString query = String.format(\"key=%s&token=%s\",\n\t\t\t\t\tURLEncoder.encode(key, charset), \n\t\t\t\t\tURLEncoder.encode(token, charset));\n\t\t\t//When\n\t\t\tHttpGet getRequest = new HttpGet(cardUrl + cardId + \"?\" + query);\n\t\t\tHttpResponse getResponse = httpClient.execute(getRequest);\n\t\t\t//Then\n\t\t\t/*\n\t\t\t * Expect: /application/json - content format\n\t\t\t * */\n\t\t\tString type = getResponse.getEntity().getContentType().getValue().toString();\n\t\t\tassertThat(type, CoreMatchers.containsString(\"application/json\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfail(\"Adding card is wrong, cannot get card content format\");\n\t\t}\n\t\t//Tear down\n\t\thttpClient.close();\n\t\t\n\t\tSystem.out.println(\"Finish test: \" + testName.getMethodName());\n\t\tSystem.out.println(\"--------------------------------------------------\\n\");\n\t}",
"@Override\n\tpublic boolean willDecode(String jsonMessage) {\n\t\ttry {\n\t\t\t// Check if incoming message is valid JSON\n\t\t\tJson.createReader(new StringReader(jsonMessage)).readObject();\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test17() throws Throwable {\n JSONObject jSONObject0 = new JSONObject((Object) \"Unclosed comment\");\n JSONObject.quote(\"Unclosed comment\");\n int int0 = jSONObject0.optInt(\"%|bmZP$ms4*`Z\");\n assertEquals(0, int0);\n \n jSONObject0.optString(\"%|bmZP$ms4*`Z\", \"Unclosed comment\");\n jSONObject0.opt(\"Unclosed comment\");\n long long0 = jSONObject0.optLong(\"/5e}3okJ.YevT+~7u \");\n assertEquals(0L, long0);\n \n jSONObject0.toString((-2117));\n Byte.compare((byte)97, (byte)15);\n boolean boolean0 = jSONObject0.isNull(\"a2H;Fk;R703/.\");\n assertEquals(3, jSONObject0.length());\n assertTrue(boolean0);\n \n Double double0 = new Double(82);\n JSONObject.numberToString(double0);\n JSONObject.quote(\"PJRO[O\");\n JSONObject.doubleToString((-1447.539535));\n String string0 = JSONObject.quote(\"wheel.json.JSONObject$1\");\n assertEquals(\"\\\"wheel.json.JSONObject$1\\\"\", string0);\n \n String string1 = JSONObject.doubleToString(0);\n assertEquals(\"0\", string1);\n }",
"@Test(timeout = 4000)\n public void test035() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.put(\".\", 65);\n jSONObject1.optInt(\".\", 65);\n Double double0 = new Double((-1.0));\n JSONObject.testValidity(double0);\n }",
"@Test\n\t@Override\n\tpublic void testUpdateObjectOKJson() throws Exception {\n\t}",
"@Test\n public void testFromJSON() {\n System.out.println(\"fromJSON\");\n String json = \"\";\n Resource expResult = null;\n Resource result = Resource.fromJSON(json);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test(timeout = 4000)\n public void test082() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<JSONObject> linkedList0 = new LinkedList<JSONObject>();\n linkedList0.offerFirst(jSONObject0);\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n JSONArray jSONArray1 = jSONObject0.toJSONArray(jSONArray0);\n assertEquals(1, jSONArray1.length());\n assertNotNull(jSONArray1);\n assertNotSame(jSONArray1, jSONArray0);\n }",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(\"{+HgP:|4P2;HQ~Jn\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Expected a ':' after a key at character 16 of {+HgP:|4P2;HQ~Jn\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"private JSON() {\n\t}",
"@Test\n\tpublic void testJsonEncoding() throws IOException {\n\t\tvalidateEncodingHandling(\"UTF16BE.json\", Charsets.UTF_16BE, \"The\\uD801\\uDC37 Na\\uD834\\uDD1Em\\uD834\\uDD1Ee\\uD801\\uDC37\");\n\t\tvalidateEncodingHandling(\"ISO8859-1.json\", Charsets.ISO_8859_1, \"³ for ?, ¿ for ?\");\n\t\t// Reading ISO8859-1 as UTF8 will result in mapping errors. This is expected and can't be avoided if the wrong encoding has been specified.\n\t\tvalidateEncodingHandling(\"ISO8859-1.json\", Charsets.UTF_8, \"� for ?, � for ?\");\n\t}",
"boolean isJSON(Response response) {\n return response.getHeaderString(\"Content-Type\").equalsIgnoreCase(MediaType.APPLICATION_JSON);\n }",
"@Test(timeout = 4000)\n public void test07() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n int int0 = 12;\n StringWriter stringWriter0 = new StringWriter(12);\n Float float0 = new Float((float) 12);\n JSONObject.numberToString(float0);\n String string0 = \"\";\n try { \n jSONObject0.getInt(\"\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test24() throws Throwable {\n double double0 = 0.0;\n Double double1 = new Double(0.0);\n JSONObject jSONObject0 = new JSONObject(double1);\n long long0 = 0L;\n Long long1 = new Long(0L);\n String string0 = \"] is not a JSONArray.\";\n HashMap<Float, JSONArray> hashMap0 = new HashMap<Float, JSONArray>();\n jSONObject0.optJSONArray(\"] is not a JSONArray.\");\n JSONArray jSONArray0 = new JSONArray();\n jSONObject0.toJSONArray(jSONArray0);\n float float0 = (-2236.0F);\n Float float1 = new Float((float) 0L);\n Object object0 = JSONObject.NULL;\n JSONArray jSONArray1 = null;\n try {\n jSONArray1 = new JSONArray(object0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONArray initial value should be a string or collection or array.\n //\n verifyException(\"wheel.json.JSONArray\", e);\n }\n }",
"@Test\n @SmallTest\n public void testReadFromJsonString() throws Throwable {\n final String jsonObjectString =\n \"{'crash-local-id':'123456abc','crash-capture-time':1234567890,\"\n + \"'crash-keys':{'app-package-name':'org.test.package'}}\";\n\n CrashInfo parsed = CrashInfo.readFromJsonString(jsonObjectString);\n CrashInfo expected =\n createCrashInfo(\"123456abc\", 1234567890, null, -1, \"org.test.package\", null);\n Assert.assertThat(parsed, equalsTo(expected));\n }",
"@Test(timeout = 4000)\n public void test072() throws Throwable {\n String string0 = \"{*+HgP:6|49HQ~Jn\";\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(\"{*+HgP:6|49HQ~Jn\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Expected a ',' or '}' at character 16 of {*+HgP:6|49HQ~Jn\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test057() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.optJSONObject(\"v.W.y`~H9LS\");\n assertNull(jSONObject1);\n }",
"@Test(timeout = 4000)\n public void test03() throws Throwable {\n Long long0 = new Long((-2951L));\n String[] stringArray0 = new String[4];\n stringArray0[0] = \">!^kJ`3i:T9lAk6A\";\n stringArray0[1] = \"xk&AuY\";\n stringArray0[2] = \"\";\n stringArray0[3] = \"\";\n JSONObject jSONObject0 = new JSONObject(long0, stringArray0);\n boolean boolean0 = jSONObject0.has(\"\");\n assertFalse(boolean0);\n }",
"@Test(timeout = 4000)\n public void test069() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Float> linkedList0 = new LinkedList<Float>();\n HashMap<Boolean, Integer> hashMap0 = new HashMap<Boolean, Integer>();\n JSONObject jSONObject1 = new JSONObject((Map) hashMap0);\n JSONArray jSONArray0 = jSONObject1.toJSONArray((JSONArray) null);\n assertNull(jSONArray0);\n }",
"@Test(timeout = 4000)\n public void test062() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getLong(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@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 }",
"@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 }",
"@Override\n public final JSONCompareResult compareJSON(final JSONArray expected, final JSONArray actual)\n throws JSONException\n {\n final JSONCompareResult result = createResult();\n compareJSONArray(\"\", expected, actual, result);\n return result;\n }",
"@Test\n public void jsonTest(){\n }",
"static Boolean compareTdbInfoWithJsonInfo(String tdbIssn, List<String> jsonIssns) {\n\n Boolean issnInfoMatch = false;\n\n if (tdbIssn != null) {\n for (String issn : jsonIssns) {\n if (issn.equals(tdbIssn)) {\n issnInfoMatch = true;\n break;\n }\n }\n }\n\n return issnInfoMatch;\n }",
"@Test(timeout = 4000)\n public void test058() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n try { \n jSONObject1.getJSONObject(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a JSONObject.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test\n\tvoid testJSONObject1() {\n\t\tassertNotNull(r1.getOutput());\n\t}",
"@Test(timeout = 4000)\n public void test008() throws Throwable {\n JSONObject.quote(\"e(h'R;/n&72HYkju\");\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(\"W|u`$\\\"F}/\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of W|u`$\\\"F}/\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Override\n\tpublic void testCompatibility() {\n\t\tSystem.out.println(\"compatibility test success\");\n\t}",
"@Test\n public void validateWithSchema(){\n\n Schema schema = SchemaLoader.load(getSchemaJson());\n String jsonString=\"{bankInfo:{\\\"accountHolderName\\\":\\\"Way L\\\", \\\"institution\\\":\\\"TD\\\", \\\"transitNumber\\\":101, \\\"accountNumber\\\":123456789},\\\"email\\\":\\\"[email protected]\\\", \\\"phone\\\":\\\"416-336-6689\\\"}\";\n\n JSONObject json=null;\n try {\n json = new JSONObject(jsonString);\n }catch (Exception e){\n e.printStackTrace();\n }\n schema.validate(json);\n\n }",
"protected void verificarEstructuraJson(JSONObject node){\n Set<String> keys = node.keySet();\n \n for( String key : keys ){\n if( key.contentEquals(NODE_TYPE_STR) || key.contentEquals(REQUEST_SCOPE_STR) || key.contentEquals(REQUEST_IDENTITY_STR) ||\n key.contentEquals(REQUEST_META_STR) || key.contentEquals(REQUEST_ID_STR) || key.contentEquals(REQUEST_DATA_STR)){ \n }\n else{\n throw new RuntimeException(Mensajes.ERR_SIN_FORMATO_JSON);\n }\n }\n }",
"@Test\n public void readSystemObjectClassAppointment() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"Appointment\");\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 Appointment properly\", object.getClass(), actual.getClass());\n }",
"@Test(timeout = 4000)\n public void test046() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<JSONObject> linkedList0 = new LinkedList<JSONObject>();\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n JSONArray jSONArray1 = jSONObject0.toJSONArray(jSONArray0);\n assertNull(jSONArray1);\n }",
"@Test\n public void readSystemObjectClassAccDelRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AccountDeletionRequest\");\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 AccountDeletionRequest properly\", object.getClass(), actual.getClass());\n }",
"private void testJsonObject(String jsonString, Citation entity) {\n JSONObject testObject = new JSONObject(jsonString);\n\n String pid = testObject.getString(\"pid\");\n String url = testObject.getString(\"url\");\n String erc = testObject.getString(\"erc\");\n String who = testObject.getString(\"who\");\n String what = testObject.getString(\"what\");\n String time = testObject.getString(\"date\");\n\n Assert.assertEquals(entity.getPurl(), pid);\n Assert.assertEquals(entity.getUrl(), url);\n Assert.assertEquals(entity.getErc(), erc);\n Assert.assertEquals(entity.getWho(), who);\n Assert.assertEquals(entity.getWhat(), what);\n Assert.assertEquals(entity.getDate(), time);\n }"
]
| [
"0.7402474",
"0.6794995",
"0.6699718",
"0.65984404",
"0.65035206",
"0.6359658",
"0.63158345",
"0.6263387",
"0.62261933",
"0.6184613",
"0.615337",
"0.6147358",
"0.6145593",
"0.6117451",
"0.61060005",
"0.6102127",
"0.6065121",
"0.60536253",
"0.60286057",
"0.60066533",
"0.59979594",
"0.5970143",
"0.59027517",
"0.5900929",
"0.586035",
"0.5855391",
"0.58477354",
"0.5841242",
"0.5837985",
"0.58363706",
"0.5834854",
"0.5811344",
"0.5804759",
"0.5790818",
"0.5784996",
"0.5784878",
"0.5774012",
"0.57523525",
"0.5751992",
"0.57504797",
"0.57487035",
"0.57437855",
"0.57339126",
"0.57315844",
"0.5721979",
"0.57130927",
"0.5704005",
"0.56947905",
"0.5687454",
"0.568447",
"0.56710833",
"0.5666502",
"0.566544",
"0.5639687",
"0.56304574",
"0.5615685",
"0.55964214",
"0.5594749",
"0.55938077",
"0.5589713",
"0.5583095",
"0.557967",
"0.5572704",
"0.5566598",
"0.5560606",
"0.55529433",
"0.5548588",
"0.55313",
"0.5524763",
"0.55186105",
"0.550395",
"0.5500581",
"0.5492193",
"0.5490253",
"0.54898846",
"0.5488383",
"0.54852974",
"0.54845667",
"0.54742116",
"0.5462809",
"0.54613227",
"0.5449108",
"0.5445661",
"0.54404986",
"0.54331136",
"0.5431255",
"0.54303235",
"0.5428095",
"0.5426317",
"0.5426289",
"0.5425667",
"0.5422897",
"0.5414244",
"0.54039943",
"0.5402335",
"0.53936344",
"0.5384766",
"0.5383303",
"0.5382733",
"0.53827316"
]
| 0.53776866 | 100 |
Test compitability with old JSON format. | @Test
@SmallTest
public void testReadFromJsonString() throws Throwable {
final String jsonObjectString =
"{'crash-local-id':'123456abc','crash-capture-time':1234567890,"
+ "'crash-keys':{'app-package-name':'org.test.package'}}";
CrashInfo parsed = CrashInfo.readFromJsonString(jsonObjectString);
CrashInfo expected =
createCrashInfo("123456abc", 1234567890, null, -1, "org.test.package", null);
Assert.assertThat(parsed, equalsTo(expected));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected MatchStrength hasJSONFormat(InputAccessor acc)\n/* */ throws IOException\n/* */ {\n/* 507 */ return ByteSourceJsonBootstrapper.hasJSONFormat(acc);\n/* */ }",
"@Test\n void getAndFormatJson() {\n g.getJsonFromGitHub();\n String json = g.getJsonString();\n\n boolean isValid;\n try {\n new Gson().fromJson(json, Object.class);\n isValid = true;\n } catch(com.google.gson.JsonSyntaxException ex) {\n isValid = false;\n }\n assertTrue(isValid, \"Invalid JSON\");\n }",
"@Test\n public void verifyJsonBackWardCompatible() throws IOException, URISyntaxException, ParseException {\n\n ObjectMapper mapper = new ObjectMapper();\n\n String origJsonDataFile = UserTest.class.getSimpleName() + \"_noDesc.json\";\n String jsonData = ApiTestUtil.readJSONFile(origJsonDataFile);\n\n User u = mapper.readValue(jsonData, User.class);\n assertEquals( Integer.valueOf(56239), u.getId());\n\n String targetJson = mapper.writeValueAsString(u);\n JSONObject json = ApiTestUtil.convertJSONStr2Obj(targetJson);\n JSONObject expectedJson = ApiTestUtil.convertJSONStr2Obj(jsonData);\n\n ApiTestUtil.verifyJson((Map<String, Object>)json, (Map<String, Object>)expectedJson);\n\n }",
"@Test\n public void testWithNewWarnings() {\n String request = \"{\\\"canComputeNew\\\":{\\\"failedNewAll\\\":\\\"\\\",\\\"failedNewHigh\\\":\\\"1\\\",\\\"failedNewLow\\\":\\\"\\\",\\\"failedNewNormal\\\":\\\"\\\",\\\"unstableNewAll\\\":\\\"1\\\",\\\"unstableNewHigh\\\":\\\"\\\",\\\"unstableNewLow\\\":\\\"\\\",\\\"unstableNewNormal\\\":\\\"\\\",\\\"useDeltaValues\\\":false},\\\"canRunOnFailed\\\":false,\\\"defaultEncoding\\\":\\\"\\\",\\\"failedTotalAll\\\":\\\"\\\",\\\"failedTotalHigh\\\":\\\"\\\",\\\"failedTotalLow\\\":\\\"\\\",\\\"failedTotalNormal\\\":\\\"\\\",\\\"healthy\\\":\\\"0\\\",\\\"pattern\\\":\\\"\\\",\\\"shouldDetectModules\\\":false,\\\"thresholdLimit\\\":\\\"low\\\",\\\"unHealthy\\\":\\\"50\\\",\\\"unstableTotalAll\\\":\\\"\\\",\\\"unstableTotalHigh\\\":\\\"\\\",\\\"unstableTotalLow\\\":\\\"\\\",\\\"unstableTotalNormal\\\":\\\"\\\"}\";\n\n JSONObject input = JSONObject.fromObject(request);\n JSONObject output = PluginDescriptor.convertHierarchicalFormData(input);\n\n String expected = \"{\\\"canComputeNew\\\":true,\\\"failedNewAll\\\":\\\"\\\",\\\"failedNewHigh\\\":\\\"1\\\",\\\"failedNewLow\\\":\\\"\\\",\\\"failedNewNormal\\\":\\\"\\\",\\\"unstableNewAll\\\":\\\"1\\\",\\\"unstableNewHigh\\\":\\\"\\\",\\\"unstableNewLow\\\":\\\"\\\",\\\"unstableNewNormal\\\":\\\"\\\",\\\"useDeltaValues\\\":false,\\\"canRunOnFailed\\\":false,\\\"defaultEncoding\\\":\\\"\\\",\\\"failedTotalAll\\\":\\\"\\\",\\\"failedTotalHigh\\\":\\\"\\\",\\\"failedTotalLow\\\":\\\"\\\",\\\"failedTotalNormal\\\":\\\"\\\",\\\"healthy\\\":\\\"0\\\",\\\"pattern\\\":\\\"\\\",\\\"shouldDetectModules\\\":false,\\\"thresholdLimit\\\":\\\"low\\\",\\\"unHealthy\\\":\\\"50\\\",\\\"unstableTotalAll\\\":\\\"\\\",\\\"unstableTotalHigh\\\":\\\"\\\",\\\"unstableTotalLow\\\":\\\"\\\",\\\"unstableTotalNormal\\\":\\\"\\\"}\";\n assertEquals(\"Wrong JSON \", JSONObject.fromObject(expected), output);\n }",
"void validateJson();",
"private static boolean isJSONValid(String jsonInString){\n\n\t\ttry {\n\t\t\tfinal ObjectMapper mapper = new ObjectMapper();\n\t\t\tmapper.readTree(jsonInString);\n\t\t\treturn true;\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(\"INVALID JSON-LD SYNTAX\");\n\t\t\treturn false;\n\t\t}\n\n\t}",
"@Test\n public void testWithoutNewWarnings() {\n String request = \"{\\\"canRunOnFailed\\\":false,\\\"defaultEncoding\\\":\\\"\\\",\\\"failedTotalAll\\\":\\\"\\\",\\\"failedTotalHigh\\\":\\\"\\\",\\\"failedTotalLow\\\":\\\"\\\",\\\"failedTotalNormal\\\":\\\"\\\",\\\"healthy\\\":\\\"0\\\",\\\"pattern\\\":\\\"\\\",\\\"shouldDetectModules\\\":false,\\\"thresholdLimit\\\":\\\"low\\\",\\\"unHealthy\\\":\\\"50\\\",\\\"unstableTotalAll\\\":\\\"\\\",\\\"unstableTotalHigh\\\":\\\"\\\",\\\"unstableTotalLow\\\":\\\"\\\",\\\"unstableTotalNormal\\\":\\\"\\\"}\";\n\n JSONObject input = JSONObject.fromObject(request);\n JSONObject output = PluginDescriptor.convertHierarchicalFormData(input);\n\n assertEquals(\"Wrong JSON \", input, output);\n }",
"@Test(timeout = 4000)\n public void test079() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject((Object) \"gettoUpperCase\");\n jSONObject1.names();\n Integer integer0 = new Integer(92);\n JSONObject jSONObject2 = jSONObject0.append(\"gettoUpperCase\", integer0);\n jSONObject2.names();\n jSONObject0.optJSONArray(\"gettoUpperCase\");\n JSONObject.numberToString(integer0);\n Boolean boolean0 = new Boolean(true);\n JSONObject.testValidity(boolean0);\n }",
"@Test(timeout = 4000)\n public void test099() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject(jSONObject0);\n JSONObject jSONObject2 = jSONObject1.putOpt(\"\", jSONObject0);\n Byte.compare((byte)42, (byte)42);\n JSONObject.quote(\"\");\n Byte.toUnsignedInt((byte)42);\n JSONObject.valueToString(jSONObject2, (-1394), (-1394));\n JSONObject jSONObject3 = new JSONObject(\"{\\n\\\"java.lang.String@0000000003\\\": {},\\n\\\"java.lang.String@0000000004\\\": \\\"java.lang.Class@0000000005\\\"\\n}\");\n String string0 = \"&<uWyN63)KiOjjs&n3\";\n JSONObject jSONObject4 = null;\n try {\n jSONObject4 = new JSONObject(\"&<uWyN63)KiOjjs&n3\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of &<uWyN63)KiOjjs&n3\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"public MatchStrength hasFormat(InputAccessor acc)\n/* */ throws IOException\n/* */ {\n/* 478 */ if (getClass() == JsonFactory.class) {\n/* 479 */ return hasJSONFormat(acc);\n/* */ }\n/* 481 */ return null;\n/* */ }",
"@Test(timeout = 4000)\n public void test101() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject(jSONObject0);\n assertEquals(1, jSONObject1.length());\n \n jSONObject0.toJSONArray((JSONArray) null);\n JSONObject jSONObject2 = jSONObject0.put(\"false\", (Object) \"false\");\n boolean boolean0 = jSONObject2.getBoolean(\"false\");\n assertFalse(boolean0);\n \n String string0 = JSONObject.quote(\"true\");\n assertEquals(\"\\\"true\\\"\", string0);\n }",
"@Test(timeout = 4000)\n public void test05() throws Throwable {\n HashMap<Object, Double> hashMap0 = new HashMap<Object, Double>(13);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n Float float0 = new Float(3525.726934349);\n Double double0 = new Double(Double.NaN);\n hashMap0.put(float0, double0);\n stringArray0[1] = \"Z\";\n stringArray0[2] = \"] is not a Boolean.\";\n jSONObject0.optBoolean(\"Expected a ',' or ']'\");\n stringArray0[3] = \"p0JV~u{VV\";\n stringArray0[4] = \"a>(3H]W1\";\n stringArray0[5] = \"4v)7wYwy@>>\";\n stringArray0[6] = \"`00MMvjO_a\";\n stringArray0[7] = \";Az%j \";\n stringArray0[8] = \"L;IoBM\";\n JSONObject jSONObject1 = new JSONObject(jSONObject0, stringArray0);\n JSONObject.testValidity(\";Az%j \");\n jSONObject1.optBoolean(\"`00MMvjO_a\");\n try { \n jSONObject1.getJSONArray((String) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"default boolean checkJsonResp(JsonElement response) {\n return false;\n }",
"@Test(timeout = 4000)\n public void test090() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject();\n jSONObject1.putOpt(\"\", jSONObject0);\n Byte.compare((byte)47, (byte)47);\n JSONObject.quote(\"\");\n JSONObject jSONObject2 = jSONObject1.optJSONObject(\"\");\n assertNotSame(jSONObject1, jSONObject2);\n }",
"@Test\n public void requestFormatIncreased() {\n assertOpenApiBackwardIncompatible(BASE, \"bc_request_schema_format_increased.yaml\");\n }",
"public void testClarificationJSON() throws Exception {\n\n IInternalContest contest = new UnitTestData().getContest();\n JSONTool jsonTool= new JSONTool(contest, null);\n\n Clarification[] clarifications = contest.getClarifications();\n Arrays.sort(clarifications, new ClarificationComparator());\n\n Clarification clarification = clarifications[4];\n ClarificationAnswer answer = null;\n String json = jsonTool.convertToJSON(clarification, answer ).toString();\n\n int problemNumber = JSONUtilities.getProblemIndex(contest, clarification.getProblemId());\n assertEquals(\"Expected problem number \", 1, problemNumber);\n\n// editFile(writeFile(new File(\"/tmp/stuf.\" + System.currentTimeMillis() + \".json\"), json));\n\n // System.out.println(\"debug clar json = \"+json);\n\n // debug json = {\"id\":\"5\", \"from_team_id\":\"5\", \"to_team_id\":\"5\", \"reply_to_id\": null, \"problem_id\":\"1\", \"text\":\"Why #2? from team5\", \"start_time\": null, \"start_contest_time\":\"0.000\"}\n\n asertEqualJSON(json, \"text\", \"Why #2? from team5\");\n asertEqualJSON(json, \"reply_to_id\", \"null\");\n asertEqualJSON(json, \"problem_id\", jsonTool.getProblemId(contest.getProblem(clarification.getProblemId())));\n\n// assertJSONStringValue(json, \"problem_id\", \"1\"); SOMEDAY\n assertJSONStringValue(json, \"problem_id\", jsonTool.getProblemId(contest.getProblem(clarification.getProblemId())));\n// assertJSONStringValue(json, \"id\", \"5\"); SOMEDAY\n assertJSONStringValue(json, \"id\", clarification.getElementId().toString());\n assertJSONStringValue(json, \"from_team_id\", \"5\" );\n assertJSONNullValue(json, \"to_team_id\");\n }",
"protected boolean isJSONValid(String callReoprtResponse2) {\n try {\n new JSONObject(callReoprtResponse2);\n } catch (JSONException ex) {\n // edited, to include @Arthur's comment\n // e.g. in case JSONArray is valid as well...\n try {\n new JSONArray(callReoprtResponse2);\n } catch (JSONException ex1) {\n return false;\n }\n }\n return true;\n }",
"@Test(timeout = 4000)\n public void test02() throws Throwable {\n float float0 = (-327.5252F);\n Float float1 = new Float((-327.5252F));\n Float.min(0.0F, 0.0F);\n JSONObject jSONObject0 = new JSONObject(float1);\n String string0 = \"{}\";\n JSONObject jSONObject1 = jSONObject0.put(\"{}\", 518.9508);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n jSONObject1.put(\"J,/Ph.9`e('Sb=@\", (Object) jSONArray0);\n try { \n jSONObject1.getBoolean(\"{}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{}\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Override\n public void compareJSON(final String prefix, final JSONObject expected, final JSONObject actual,\n final JSONCompareResult result) throws JSONException\n {\n checkJsonObjectKeysExpectedInActual(prefix, expected, actual, result);\n\n // If strict, check for vice-versa\n if (!this.mode.isExtensible())\n {\n checkJsonObjectKeysActualInExpected(prefix, expected, actual, result);\n }\n }",
"@Test(timeout = 4000)\n public void test20() throws Throwable {\n HashMap<Object, Double> hashMap0 = new HashMap<Object, Double>(13);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n Float float0 = new Float(3525.726934349);\n Double double0 = new Double(Double.NaN);\n hashMap0.put(float0, double0);\n stringArray0[1] = \"Z\";\n stringArray0[2] = \"\";\n jSONObject0.optBoolean(\"Expected a ',' or ']'\");\n JSONObject jSONObject1 = new JSONObject(jSONObject0, stringArray0);\n JSONObject.testValidity(jSONObject1);\n jSONObject0.optBoolean(\"Z\");\n try { \n jSONObject0.getJSONArray(\"A1 `'ski<ljrq9;O7L\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"A1 `'ski<ljrq9;O7L\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test11() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n byte byte1 = (byte)97;\n Byte.compare((byte)97, (byte) (-119));\n jSONObject0.isNull(\"(_&\");\n JSONObject.numberToString(byte0);\n JSONObject.quote(\"\");\n JSONObject.doubleToString((byte) (-119));\n Short short0 = new Short((byte)39);\n jSONObject0.putOpt(\"\\\"$c.1O[-X9i\", short0);\n JSONTokener jSONTokener0 = new JSONTokener(\"'m P|=\");\n JSONArray jSONArray0 = null;\n try {\n jSONArray0 = new JSONArray(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONArray text must start with '[' at character 1 of 'm P|=\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test049() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.put(\"MnMGL\", (Object) \"MnMGL\");\n jSONObject1.put(\"MnMGL\", 0.0);\n try { \n jSONObject1.getBoolean(\"MnMGL\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"MnMGL\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test024() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n String[] stringArray0 = new String[0];\n JSONObject jSONObject1 = new JSONObject(jSONObject0, stringArray0);\n assertFalse(jSONObject1.equals((Object)jSONObject0));\n }",
"public void testGetJSON() {\n\t}",
"@Test(timeout = 4000)\n public void test020() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.put(\"MnMG\", (Object) \"MnMG\");\n jSONObject1.optLong(\"|q\", 0L);\n try { \n jSONObject1.getBoolean(\"MnMG\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"MnMG\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test26() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n jSONObject0.optDouble(\"Ih?`q\", (double) (-821));\n Integer.remainderUnsigned((-821), (-821));\n StringWriter stringWriter0 = new StringWriter(1782);\n jSONObject0.write(stringWriter0);\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(\"Ih?`q\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of Ih?`q\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test047() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.put(\"MnMG\", (Object) \"MnMG\");\n jSONObject1.put(\"MnMG\", false);\n assertEquals(1, jSONObject0.length());\n \n jSONObject1.getBoolean(\"MnMG\");\n String string0 = JSONObject.valueToString(jSONObject0);\n String string1 = JSONObject.quote(\"wheel.json.JSONObject@0000000001\");\n assertFalse(string1.equals((Object)string0));\n }",
"@Override\n public boolean isMaybeStrJSON() {\n checkNotPolymorphicOrUnknown();\n return (flags & STR_JSON) != 0;\n }",
"@Test(timeout = 4000)\n public void test088() throws Throwable {\n Float float0 = new Float(0.0F);\n Float.max(0.0F, 3101.6F);\n JSONObject jSONObject0 = new JSONObject(float0);\n jSONObject0.append(\"isformat\", \"isformat\");\n String string0 = JSONObject.valueToString(jSONObject0, (-3535), (-3535));\n String string1 = JSONObject.numberToString(float0);\n assertFalse(string1.equals((Object)string0));\n }",
"public boolean supportsJsonType() {\n return false;\n }",
"@Test(timeout = 4000)\n public void test023() throws Throwable {\n JSONObject.quote(\"e(h'R;/n&72HYkju\");\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n jSONObject0.put(\"=,6\\\"jtG.eI\", (Collection) linkedList0);\n try { \n jSONObject0.getBoolean(\"\\\"e(h'R;/n&72HYk\\\\ju\\\"\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\\\\\"e(h'R;/n&72HYk\\\\\\\\ju\\\\\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test025() throws Throwable {\n JSONObject.testValidity((Object) null);\n }",
"@Test(timeout = 4000)\n public void test089() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n String string0 = \"Qn<G\";\n jSONObject0.put(\"Qn<G\", (Object) \"Qn<G\");\n try { \n jSONObject0.getJSONArray(\"Qn<G\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"Qn<G\\\"] is not a JSONArray.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test\n\tpublic void requestDataForCustomer12212_checkContentType_expectApplicationJson() {\n\n\t\tgiven().\n\t\t\tspec(requestSpec).\n\t\twhen().\n\t\tthen();\n\t}",
"@Test\n public void jsonTest() {\n // TODO: test json\n }",
"@Test(timeout = 4000)\n public void test075() throws Throwable {\n JSONTokener jSONTokener0 = new JSONTokener(\"{\");\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must end with '}' at character 1 of {\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"private static boolean m2252a(JsonValue jsonValue) {\n JsonValue jsonValue2 = jsonValue.f2957f;\n while (jsonValue2 != null) {\n if (jsonValue2.m2276k() || jsonValue2.m2275j()) {\n return false;\n }\n jsonValue2 = jsonValue2.f2958g;\n }\n return true;\n }",
"@Test(timeout = 4000)\n public void test027() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n String string0 = \"MnMG\";\n JSONObject jSONObject1 = jSONObject0.put(\"MnMG\", (Object) \"MnMG\");\n jSONObject0.optInt(\"MnMG\", (-646));\n try { \n jSONObject1.getBoolean(\"MnMG\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"MnMG\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test23() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"] is not a JSONArray.\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.optDouble(\"] is not a JSONArray.\", (-2064.666));\n jSONObject0.optBoolean(\"] is not a JSONArray.\");\n jSONObject0.put(\"wheel.json.JSONException\", (int) (byte)44);\n String string0 = null;\n JSONTokener jSONTokener0 = new JSONTokener(\"istoUnsignedLong\");\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of istoUnsignedLong\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"boolean hasJsonReqMsg();",
"@Test(timeout = 4000)\n public void test094() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n jSONObject1.put(\"su\", 4135.211029659);\n jSONObject1.getDouble(\"su\");\n try { \n jSONObject1.getBoolean(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@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 }",
"@Test(timeout = 4000)\n public void test018() throws Throwable {\n String string0 = JSONObject.quote(\"=H ^/$6U29)n\");\n assertEquals(\"\\\"=H ^/$6U29)n\\\"\", string0);\n \n JSONObject jSONObject0 = new JSONObject();\n boolean boolean0 = jSONObject0.optBoolean(\"\\\"=H ^/$6U29)n\\\"\", true);\n assertTrue(boolean0);\n \n String string1 = jSONObject0.toString(8192, 91);\n assertEquals(\"{}\", string1);\n }",
"@Test\n public void responseFormatDecreased() {\n assertOpenApiBackwardIncompatible(BASE, \"bc_response_schema_format_decreased.yaml\");\n }",
"@Test(timeout = 4000)\n public void test076() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n Integer integer0 = new Integer(55);\n JSONObject jSONObject1 = jSONObject0.append(\"Substring bounds error\", integer0);\n jSONObject1.getJSONArray(\"Substring bounds error\");\n jSONObject1.append(\"Bad value from toJSONString: \", integer0);\n String string0 = jSONObject1.optString(\"Substring bounds error\", \"num\");\n assertNotNull(string0);\n }",
"@Test(timeout = 4000)\n public void test12() throws Throwable {\n HashMap<Object, Double> hashMap0 = new HashMap<Object, Double>(13);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n Float float0 = new Float(3525.726934349);\n Double double0 = new Double(Double.NaN);\n hashMap0.put(float0, double0);\n stringArray0[1] = \"Z\";\n stringArray0[2] = \"] is not a Boolean.\";\n jSONObject0.optBoolean(\"Expected a ',' or ']'\");\n stringArray0[3] = \"p0JV~u{VV\";\n jSONObject0.optLong(\"wheel.json.JSONException\");\n jSONObject0.remove((String) null);\n jSONObject0.optString(\"is\");\n LinkedList<Short> linkedList0 = new LinkedList<Short>();\n jSONObject0.put(\"\\b\", (Collection) linkedList0);\n String string0 = \"-)#>`U+F=\";\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(\"JSON does not allow non-finite numbers.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of JSON does not allow non-finite numbers.\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test22() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n String string0 = \"53N/{T[\";\n JSONObject jSONObject1 = jSONObject0.put(\"53N/{T[\", (-1913.632));\n jSONObject1.toString((-821));\n jSONObject0.optString(\"53N/{T[\", \"53N/{T[\");\n jSONObject0.opt(\",2fHJL;.]tm*PJ9\");\n jSONObject0.optLong((String) null);\n jSONObject0.toString((-821));\n Byte byte0 = new Byte((byte)1);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONObject jSONObject2 = jSONObject1.put(\"|f}%!.^JO \", (Collection) linkedList0);\n JSONObject jSONObject3 = jSONObject2.accumulate(\"o%,g eOJ=9n\\\"\", \"java.lang.Double@0000000003\");\n try { \n jSONObject3.getJSONObject(\"{\\n\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003,\\n\\\"java.lang.String@0000000004\\\": \\\"java.lang.Class@0000000005\\\"\\n}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{\\\\n\\\\\\\"java.lang.String@0000000002\\\\\\\": java.lang.Double@0000000003,\\\\n\\\\\\\"java.lang.String@0000000004\\\\\\\": \\\\\\\"java.lang.Class@0000000005\\\\\\\"\\\\n}\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"private static boolean m2253b(JsonValue jsonValue) {\n for (JsonValue jsonValue2 = jsonValue.f2957f; jsonValue2 != null; jsonValue2 = jsonValue2.f2958g) {\n if (!jsonValue2.m2278m()) {\n return false;\n }\n }\n return true;\n }",
"@Test(timeout = 4000)\n public void test18() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n JSONObject jSONObject1 = jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n int int0 = new Byte((byte)97);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n jSONObject0.put(\"*bpp)j7=\", (Collection) linkedList0);\n jSONObject1.accumulate(\"] is not a JSONArray.\", linkedList0);\n try { \n jSONObject0.getJSONObject(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{\\\\\\\"java.lang.String@0000000002\\\\\\\": java.lang.Double@0000000003}\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test\n public void testReportProducesValidJson() throws Exception {\n testReportProducesCorrectOutput(\"json\");\n }",
"@Test\n public void testVisaCCPositive_JSON() {\n String visaCCNumber = UtilityParsers.jsonHelper(visaInputFilePathJSON);\n CreditCardValidator creditCardValidator = new VisaCCValidator(visaCCNumber);\n assertTrue(creditCardValidator.validateCreditCard());\n }",
"@Test(timeout = 4000)\n public void test019() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n jSONObject0.optBoolean(\",\\n\");\n JSONObject.doubleToString(0.0);\n Object object0 = JSONObject.NULL;\n jSONObject0.append(\"] is not a Boolean.\", object0);\n assertEquals(1, jSONObject0.length());\n }",
"@Test(timeout = 4000)\n public void test06() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n Byte.compare((byte)97, (byte) (-119));\n jSONObject0.isNull(\"(_&\");\n assertEquals(1, jSONObject0.length());\n \n JSONObject.numberToString(byte0);\n JSONObject.quote(\"\");\n JSONObject.doubleToString((byte) (-119));\n JSONObject.quote(\"wheel.json.JSONObject$1\");\n String string0 = JSONObject.doubleToString(216);\n assertEquals(\"216\", string0);\n }",
"@Test(timeout = 4000)\n public void test071() throws Throwable {\n JSONTokener jSONTokener0 = new JSONTokener(\"{o?Z\");\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Expected a ':' after a key at character 4 of {o?Z\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test011() throws Throwable {\n JSONObject.quote(\"e(h'R;/n&72HYkju\");\n HashMap<Object, String> hashMap0 = new HashMap<Object, String>();\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n try { \n jSONObject0.getBoolean((String) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test074() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n String string0 = \"MnMGL\";\n JSONObject jSONObject1 = jSONObject0.put(\"MnMGL\", (Object) \"MnMGL\");\n try { \n jSONObject1.append(\"MnMGL\", jSONObject0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[MnMGL] is not a JSONArray.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test19() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n double double0 = jSONObject0.optDouble(\"Ih?`q\", (double) (-821));\n assertEquals((-821.0), double0, 0.01);\n \n boolean boolean0 = jSONObject0.optBoolean(\"/W_,B?i~I:-MW8${,z\");\n assertFalse(boolean0);\n assertEquals(1, jSONObject0.length());\n }",
"@Test(timeout = 4000)\n public void test102() throws Throwable {\n String string0 = \"{+H1R$Cu|49H=>Jn\";\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(\"{+H1R$Cu|49H=>Jn\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Expected a ',' or '}' at character 16 of {+H1R$Cu|49H=>Jn\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test073() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n int int0 = (-29);\n int int1 = 22;\n HashMap<String, String> hashMap0 = new HashMap<String, String>();\n JSONObject jSONObject1 = new JSONObject((Map) hashMap0);\n JSONObject.valueToString(hashMap0, (-29), 22);\n LinkedList<Float> linkedList0 = new LinkedList<Float>();\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n jSONArray0.optInt((-65));\n try { \n Integer.valueOf(\"{}\");\n fail(\"Expecting exception: NumberFormatException\");\n \n } catch(NumberFormatException e) {\n //\n // For input string: \\\"{}\\\"\n //\n verifyException(\"java.lang.NumberFormatException\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test098() throws Throwable {\n String string0 = \"{3&b()u=\\\"9(/N;Cfw?\";\n JSONTokener jSONTokener0 = new JSONTokener(\"{3&b()u=\\\"9(/N;Cfw?\");\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Unterminated string at character 18 of {3&b()u=\\\"9(/N;Cfw?\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test063() throws Throwable {\n String string0 = JSONObject.quote(\"=H ^/$6YUz29)n\");\n JSONObject jSONObject0 = new JSONObject();\n String string1 = JSONObject.valueToString(jSONObject0);\n assertFalse(string1.equals((Object)string0));\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 }",
"@Test\n public void readSystemObjectClassDoctorFeedback() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"DoctorFeedback\");\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 DoctorFeedback properly\", object.getClass(), actual.getClass());\n }",
"@Test(timeout = 4000)\n public void test15() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n StringWriter stringWriter0 = new StringWriter(12);\n Double.sum(0.0, (-2252.167794836282));\n Double.isFinite((-710.25));\n JSONObject.getNames((Object) stringWriter0);\n String string0 = \"\";\n String string1 = \"RT8u3l.~].,i\";\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(\"RT8u3l.~].,i\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of RT8u3l.~].,i\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"boolean isValid(JsonMessage message);",
"@Test(timeout = 4000)\n public void test16() throws Throwable {\n HashMap<Float, Object> hashMap0 = new HashMap<Float, Object>();\n Float float0 = new Float(0.0F);\n Float.max(0.0F, 0.0F);\n hashMap0.put(float0, float0);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n hashMap0.remove((Object) jSONObject0);\n Long long0 = new Long((-1L));\n JSONObject.valueToString(long0);\n hashMap0.getOrDefault(jSONObject0, jSONObject0);\n JSONObject.valueToString(hashMap0, 8, 13);\n JSONObject.doubleToString(0.0);\n jSONObject0.keys();\n jSONObject0.toString(13);\n try { \n jSONObject0.getJSONArray(\";&7Li\\\"+g4z OK%1i76o\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\";&7Li\\\\\\\"+g4z OK%1i76o\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test public void get_card_ckeck_content_format_is_JSON_test() throws ClientProtocolException, IOException\n\t{\n\t\t\n\t\tSystem.out.println(\"\\n--------------------------------------------------\");\n\t\tSystem.out.println(\"Start test: \" + testName.getMethodName());\n\t\t\n\t\t//Given\n\t\t//Add a card to get card content\n\t\tString idList = testSuite.listId;\n\t\tString due = \"null\";\n\t\tString name = \"Card need to get content\";\n\t\tString desc = \"API test - create this card and need to get its content\";\n\t\t\n\t\tString createQuery = String.format(\"idList=%s&due=%s&name=%s&desc=%s&key=%s&token=%s\", \n\t\t\t\t\t\t\t\t\t\tURLEncoder.encode(idList, charset), \n\t\t\t\t\t\t\t\t\t\tURLEncoder.encode(due, charset),\n\t\t\t\t\t\t\t\t\t\tURLEncoder.encode(name, charset), \n\t\t\t\t\t\t\t\t\t\tURLEncoder.encode(desc, charset), \n\t\t\t\t\t\t\t\t\t\tURLEncoder.encode(key, charset), \n\t\t\t\t\t\t\t\t\t\tURLEncoder.encode(token, charset));\n\t\tCloseableHttpClient httpClient = HttpClients.createDefault();\n\t\tHttpPost postRequest = new HttpPost(cardUrl + \"?\" + createQuery);\n\t\tHttpResponse response = httpClient.execute(postRequest);\n\t\tif(response.getStatusLine().getStatusCode() == 200) \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Add test card successfully \n\t\t{\n\t\t\tJsonReader jsonReader = Json.createReader(response.getEntity().getContent());\n\t\t\tJsonObject cardJson = jsonReader.readObject();\n\t\t\tString cardId = cardJson.getString(\"id\");\n\t\t\tjsonReader.close();\n\t\t\tString query = String.format(\"key=%s&token=%s\",\n\t\t\t\t\tURLEncoder.encode(key, charset), \n\t\t\t\t\tURLEncoder.encode(token, charset));\n\t\t\t//When\n\t\t\tHttpGet getRequest = new HttpGet(cardUrl + cardId + \"?\" + query);\n\t\t\tHttpResponse getResponse = httpClient.execute(getRequest);\n\t\t\t//Then\n\t\t\t/*\n\t\t\t * Expect: /application/json - content format\n\t\t\t * */\n\t\t\tString type = getResponse.getEntity().getContentType().getValue().toString();\n\t\t\tassertThat(type, CoreMatchers.containsString(\"application/json\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfail(\"Adding card is wrong, cannot get card content format\");\n\t\t}\n\t\t//Tear down\n\t\thttpClient.close();\n\t\t\n\t\tSystem.out.println(\"Finish test: \" + testName.getMethodName());\n\t\tSystem.out.println(\"--------------------------------------------------\\n\");\n\t}",
"@Override\n\tpublic boolean willDecode(String jsonMessage) {\n\t\ttry {\n\t\t\t// Check if incoming message is valid JSON\n\t\t\tJson.createReader(new StringReader(jsonMessage)).readObject();\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test17() throws Throwable {\n JSONObject jSONObject0 = new JSONObject((Object) \"Unclosed comment\");\n JSONObject.quote(\"Unclosed comment\");\n int int0 = jSONObject0.optInt(\"%|bmZP$ms4*`Z\");\n assertEquals(0, int0);\n \n jSONObject0.optString(\"%|bmZP$ms4*`Z\", \"Unclosed comment\");\n jSONObject0.opt(\"Unclosed comment\");\n long long0 = jSONObject0.optLong(\"/5e}3okJ.YevT+~7u \");\n assertEquals(0L, long0);\n \n jSONObject0.toString((-2117));\n Byte.compare((byte)97, (byte)15);\n boolean boolean0 = jSONObject0.isNull(\"a2H;Fk;R703/.\");\n assertEquals(3, jSONObject0.length());\n assertTrue(boolean0);\n \n Double double0 = new Double(82);\n JSONObject.numberToString(double0);\n JSONObject.quote(\"PJRO[O\");\n JSONObject.doubleToString((-1447.539535));\n String string0 = JSONObject.quote(\"wheel.json.JSONObject$1\");\n assertEquals(\"\\\"wheel.json.JSONObject$1\\\"\", string0);\n \n String string1 = JSONObject.doubleToString(0);\n assertEquals(\"0\", string1);\n }",
"@Test(timeout = 4000)\n public void test035() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.put(\".\", 65);\n jSONObject1.optInt(\".\", 65);\n Double double0 = new Double((-1.0));\n JSONObject.testValidity(double0);\n }",
"@Test\n\t@Override\n\tpublic void testUpdateObjectOKJson() throws Exception {\n\t}",
"@Test\n public void testFromJSON() {\n System.out.println(\"fromJSON\");\n String json = \"\";\n Resource expResult = null;\n Resource result = Resource.fromJSON(json);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test(timeout = 4000)\n public void test082() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<JSONObject> linkedList0 = new LinkedList<JSONObject>();\n linkedList0.offerFirst(jSONObject0);\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n JSONArray jSONArray1 = jSONObject0.toJSONArray(jSONArray0);\n assertEquals(1, jSONArray1.length());\n assertNotNull(jSONArray1);\n assertNotSame(jSONArray1, jSONArray0);\n }",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(\"{+HgP:|4P2;HQ~Jn\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Expected a ':' after a key at character 16 of {+HgP:|4P2;HQ~Jn\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"private JSON() {\n\t}",
"@Test\n\tpublic void testJsonEncoding() throws IOException {\n\t\tvalidateEncodingHandling(\"UTF16BE.json\", Charsets.UTF_16BE, \"The\\uD801\\uDC37 Na\\uD834\\uDD1Em\\uD834\\uDD1Ee\\uD801\\uDC37\");\n\t\tvalidateEncodingHandling(\"ISO8859-1.json\", Charsets.ISO_8859_1, \"³ for ?, ¿ for ?\");\n\t\t// Reading ISO8859-1 as UTF8 will result in mapping errors. This is expected and can't be avoided if the wrong encoding has been specified.\n\t\tvalidateEncodingHandling(\"ISO8859-1.json\", Charsets.UTF_8, \"� for ?, � for ?\");\n\t}",
"boolean isJSON(Response response) {\n return response.getHeaderString(\"Content-Type\").equalsIgnoreCase(MediaType.APPLICATION_JSON);\n }",
"@Test(timeout = 4000)\n public void test07() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n int int0 = 12;\n StringWriter stringWriter0 = new StringWriter(12);\n Float float0 = new Float((float) 12);\n JSONObject.numberToString(float0);\n String string0 = \"\";\n try { \n jSONObject0.getInt(\"\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test24() throws Throwable {\n double double0 = 0.0;\n Double double1 = new Double(0.0);\n JSONObject jSONObject0 = new JSONObject(double1);\n long long0 = 0L;\n Long long1 = new Long(0L);\n String string0 = \"] is not a JSONArray.\";\n HashMap<Float, JSONArray> hashMap0 = new HashMap<Float, JSONArray>();\n jSONObject0.optJSONArray(\"] is not a JSONArray.\");\n JSONArray jSONArray0 = new JSONArray();\n jSONObject0.toJSONArray(jSONArray0);\n float float0 = (-2236.0F);\n Float float1 = new Float((float) 0L);\n Object object0 = JSONObject.NULL;\n JSONArray jSONArray1 = null;\n try {\n jSONArray1 = new JSONArray(object0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONArray initial value should be a string or collection or array.\n //\n verifyException(\"wheel.json.JSONArray\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test072() throws Throwable {\n String string0 = \"{*+HgP:6|49HQ~Jn\";\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(\"{*+HgP:6|49HQ~Jn\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Expected a ',' or '}' at character 16 of {*+HgP:6|49HQ~Jn\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test057() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.optJSONObject(\"v.W.y`~H9LS\");\n assertNull(jSONObject1);\n }",
"@Test(timeout = 4000)\n public void test03() throws Throwable {\n Long long0 = new Long((-2951L));\n String[] stringArray0 = new String[4];\n stringArray0[0] = \">!^kJ`3i:T9lAk6A\";\n stringArray0[1] = \"xk&AuY\";\n stringArray0[2] = \"\";\n stringArray0[3] = \"\";\n JSONObject jSONObject0 = new JSONObject(long0, stringArray0);\n boolean boolean0 = jSONObject0.has(\"\");\n assertFalse(boolean0);\n }",
"@Test(timeout = 4000)\n public void test069() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Float> linkedList0 = new LinkedList<Float>();\n HashMap<Boolean, Integer> hashMap0 = new HashMap<Boolean, Integer>();\n JSONObject jSONObject1 = new JSONObject((Map) hashMap0);\n JSONArray jSONArray0 = jSONObject1.toJSONArray((JSONArray) null);\n assertNull(jSONArray0);\n }",
"@Test(timeout = 4000)\n public void test062() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getLong(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@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 }",
"@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 }",
"@Override\n public final JSONCompareResult compareJSON(final JSONArray expected, final JSONArray actual)\n throws JSONException\n {\n final JSONCompareResult result = createResult();\n compareJSONArray(\"\", expected, actual, result);\n return result;\n }",
"@Test\n public void jsonTest(){\n }",
"static Boolean compareTdbInfoWithJsonInfo(String tdbIssn, List<String> jsonIssns) {\n\n Boolean issnInfoMatch = false;\n\n if (tdbIssn != null) {\n for (String issn : jsonIssns) {\n if (issn.equals(tdbIssn)) {\n issnInfoMatch = true;\n break;\n }\n }\n }\n\n return issnInfoMatch;\n }",
"@Test(timeout = 4000)\n public void test058() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n try { \n jSONObject1.getJSONObject(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a JSONObject.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test\n\tvoid testJSONObject1() {\n\t\tassertNotNull(r1.getOutput());\n\t}",
"@Test(timeout = 4000)\n public void test008() throws Throwable {\n JSONObject.quote(\"e(h'R;/n&72HYkju\");\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(\"W|u`$\\\"F}/\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of W|u`$\\\"F}/\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Override\n\tpublic void testCompatibility() {\n\t\tSystem.out.println(\"compatibility test success\");\n\t}",
"@Test\n public void validateWithSchema(){\n\n Schema schema = SchemaLoader.load(getSchemaJson());\n String jsonString=\"{bankInfo:{\\\"accountHolderName\\\":\\\"Way L\\\", \\\"institution\\\":\\\"TD\\\", \\\"transitNumber\\\":101, \\\"accountNumber\\\":123456789},\\\"email\\\":\\\"[email protected]\\\", \\\"phone\\\":\\\"416-336-6689\\\"}\";\n\n JSONObject json=null;\n try {\n json = new JSONObject(jsonString);\n }catch (Exception e){\n e.printStackTrace();\n }\n schema.validate(json);\n\n }",
"protected void verificarEstructuraJson(JSONObject node){\n Set<String> keys = node.keySet();\n \n for( String key : keys ){\n if( key.contentEquals(NODE_TYPE_STR) || key.contentEquals(REQUEST_SCOPE_STR) || key.contentEquals(REQUEST_IDENTITY_STR) ||\n key.contentEquals(REQUEST_META_STR) || key.contentEquals(REQUEST_ID_STR) || key.contentEquals(REQUEST_DATA_STR)){ \n }\n else{\n throw new RuntimeException(Mensajes.ERR_SIN_FORMATO_JSON);\n }\n }\n }",
"@Test\n public void readSystemObjectClassAppointment() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"Appointment\");\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 Appointment properly\", object.getClass(), actual.getClass());\n }",
"@Test(timeout = 4000)\n public void test046() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<JSONObject> linkedList0 = new LinkedList<JSONObject>();\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n JSONArray jSONArray1 = jSONObject0.toJSONArray(jSONArray0);\n assertNull(jSONArray1);\n }",
"@Test\n public void readSystemObjectClassAccDelRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AccountDeletionRequest\");\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 AccountDeletionRequest properly\", object.getClass(), actual.getClass());\n }",
"private void testJsonObject(String jsonString, Citation entity) {\n JSONObject testObject = new JSONObject(jsonString);\n\n String pid = testObject.getString(\"pid\");\n String url = testObject.getString(\"url\");\n String erc = testObject.getString(\"erc\");\n String who = testObject.getString(\"who\");\n String what = testObject.getString(\"what\");\n String time = testObject.getString(\"date\");\n\n Assert.assertEquals(entity.getPurl(), pid);\n Assert.assertEquals(entity.getUrl(), url);\n Assert.assertEquals(entity.getErc(), erc);\n Assert.assertEquals(entity.getWho(), who);\n Assert.assertEquals(entity.getWhat(), what);\n Assert.assertEquals(entity.getDate(), time);\n }",
"@Test\n @SmallTest\n public void testSerializeToJson() throws Throwable {\n final String jsonObjectString =\n \"{'crash-local-id':'123456abc','crash-capture-time':1234567890,\"\n + \"'crash-is-hidden':false,\"\n + \"'crash-keys':{'app-package-name':'org.test.package'}}\";\n JSONObject expectedJsonObject = new JSONObject(jsonObjectString);\n\n CrashInfo c = createCrashInfo(\"123456abc\", 1234567890, null, -1, \"org.test.package\", null);\n Assert.assertEquals(c.serializeToJson(), expectedJsonObject.toString());\n }"
]
| [
"0.7402474",
"0.6794995",
"0.6699718",
"0.65984404",
"0.65035206",
"0.6359658",
"0.63158345",
"0.6263387",
"0.62261933",
"0.6184613",
"0.615337",
"0.6147358",
"0.6145593",
"0.6117451",
"0.61060005",
"0.6102127",
"0.6065121",
"0.60536253",
"0.60286057",
"0.60066533",
"0.59979594",
"0.5970143",
"0.59027517",
"0.5900929",
"0.586035",
"0.5855391",
"0.58477354",
"0.5841242",
"0.5837985",
"0.58363706",
"0.5834854",
"0.5811344",
"0.5804759",
"0.5790818",
"0.5784996",
"0.5784878",
"0.5774012",
"0.57523525",
"0.5751992",
"0.57504797",
"0.57487035",
"0.57437855",
"0.57339126",
"0.57315844",
"0.5721979",
"0.57130927",
"0.5704005",
"0.56947905",
"0.5687454",
"0.568447",
"0.56710833",
"0.5666502",
"0.566544",
"0.5639687",
"0.56304574",
"0.5615685",
"0.55964214",
"0.5594749",
"0.55938077",
"0.5589713",
"0.5583095",
"0.557967",
"0.5572704",
"0.5566598",
"0.5560606",
"0.55529433",
"0.5548588",
"0.55313",
"0.5524763",
"0.55186105",
"0.550395",
"0.5500581",
"0.5492193",
"0.5490253",
"0.54898846",
"0.5488383",
"0.54852974",
"0.54845667",
"0.54742116",
"0.54613227",
"0.5449108",
"0.5445661",
"0.54404986",
"0.54331136",
"0.5431255",
"0.54303235",
"0.5428095",
"0.5426317",
"0.5426289",
"0.5425667",
"0.5422897",
"0.5414244",
"0.54039943",
"0.5402335",
"0.53936344",
"0.5384766",
"0.5383303",
"0.5382733",
"0.53827316",
"0.53776866"
]
| 0.5462809 | 79 |
Agafa la mida de la pantalla del dispositiu. La idea es que pugui jugar amb la proporcionalitat segons diferents mides de pantalla. | private void getScreenSize() {
WindowManager wm = getWindowManager();
Display disp = wm.getDefaultDisplay();
Point size = new Point();
disp.getSize(size);
screenWidth = size.x;
screenHeight = size.y;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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}",
"@Override\n public void cantidad_Punteria(){\n punteria=69.5+05*nivel+aumentoP;\n }",
"@Override\r\n public void hallarPerimetro() {\r\n this.perimetro = this.ladoA*3;\r\n }",
"public int precioFinal(){\r\n int monto=super.PrecioFinal();\r\n\t \t \r\n\t if (pulgadas>40){\r\n\t monto+=precioBase*0.3;\r\n\t }\r\n\t if (sintonizador){\r\n\t monto+=50;\r\n\t }\r\n\t \r\n\t return monto;\r\n\t }",
"private void gerarLaudoPermanenciaMaior(MpmPrescricaoMedica prescricao,\r\n\t\t\tList<MpmLaudo> laudoList, FatConvenioSaudePlano convenioSaudePlano,\r\n\t\t\tAghParametros seqLaudoMaiorPermanencia) {\r\n\t\tMpmTipoLaudoConvenio tipoLaudoConvenio = this\r\n\t\t\t\t.getMpmTipoLaudoConvenioDAO()\r\n\t\t\t\t.obterTempoValidadeTipoLaudoPermanenciaMaior(\r\n\t\t\t\t\t\tseqLaudoMaiorPermanencia.getVlrNumerico().shortValue(),\r\n\t\t\t\t\t\tconvenioSaudePlano);\r\n\r\n\t\tif (tipoLaudoConvenio != null) {\r\n\r\n\t\t\tShort quantidadeDiasFaturamento = 0;\r\n\t\t\tShort diasPermanenciaMaior = 0;\r\n\r\n\t\t\tMpmTipoLaudo tipoLaudoMaiorPermanencia = this.getMpmTipoLaudoDAO()\r\n\t\t\t\t\t.obterPorChavePrimaria(\r\n\t\t\t\t\t\t\tseqLaudoMaiorPermanencia.getVlrNumerico()\r\n\t\t\t\t\t\t\t\t\t.shortValue());\r\n\r\n\t\t\tif (prescricao.getAtendimento().getInternacao() != null) {\r\n\t\t\t\tif (prescricao.getAtendimento()\r\n\t\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar() != null){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (prescricao.getAtendimento()\r\n\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar()\r\n\t\t\t\t\t.getQuantDiasFaturamento() != null){\r\n\t\t\t\t\t\tquantidadeDiasFaturamento = prescricao.getAtendimento()\r\n\t\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar()\r\n\t\t\t\t\t\t.getQuantDiasFaturamento();\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdiasPermanenciaMaior = prescricao.getAtendimento()\r\n\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar()\r\n\t\t\t\t\t.getDiasPermanenciaMaior();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (diasPermanenciaMaior == null || diasPermanenciaMaior > 0){\r\n\t\t\t\t\r\n\t\t\t\tInteger adicionalDias = 0;\r\n\t\t\t\tif (quantidadeDiasFaturamento != null) {\r\n\t\t\t\t\tadicionalDias = (quantidadeDiasFaturamento * 2) + 1;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (DateUtil.validaDataTruncadaMaiorIgual(new Date(), DateUtil\r\n\t\t\t\t\t\t.adicionaDias(prescricao.getAtendimento().getInternacao()\r\n\t\t\t\t\t\t\t\t.getDthrInternacao(), adicionalDias))) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (this.getMpmLaudoDAO()\r\n\t\t\t\t\t\t\t.obterCountLaudosPorTipoEAtendimento(\r\n\t\t\t\t\t\t\t\t\tprescricao.getAtendimento(),\r\n\t\t\t\t\t\t\t\t\ttipoLaudoMaiorPermanencia) <= 0) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tMpmLaudo laudo = new MpmLaudo();\r\n\t\t\t\t\t\tlaudo.setDthrInicioValidade(prescricao.getAtendimento()\r\n\t\t\t\t\t\t\t\t.getInternacao().getDthrInternacao());\r\n\t\t\t\t\t\tlaudo.setContaDesdobrada(false);\r\n\t\t\t\t\t\tlaudo.setImpresso(false);\r\n\t\t\t\t\t\tlaudo.setLaudoManual(false);\r\n\t\t\t\t\t\tlaudo.setAtendimento(prescricao.getAtendimento());\r\n\t\t\t\t\t\tlaudo.setTipoLaudo(tipoLaudoMaiorPermanencia);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tlaudoList.add(laudo);\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}",
"public void hallarPerimetroEscaleno() {\r\n this.perimetro = this.ladoA+this.ladoB+this.ladoC;\r\n }",
"public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}",
"public int getPantallaActual() {\r\n return this.iPantallaActual;\r\n }",
"@Override\n\tpublic void crearNuevaPoblacion() {\n\t\t/* Nos quedamos con los mejores individuos. Del resto, cruzamos la mitad, los mejores,\n\t\t * y el resto los borramos.*/\n\t\tList<IIndividuo> poblacion2 = new ArrayList<>();\n\t\tint numFijos = (int) (poblacion.size()/2);\n\t\t/* Incluimos el 50%, los mejores */\n\t\tpoblacion2.addAll(this.poblacion.subList(0, numFijos));\n\t\t\n\t\t/* De los mejores, mezclamos la primera mitad \n\t\t * con todos, juntandolos de forma aleatoria */\n\t\tList<IIndividuo> temp = poblacion.subList(0, numFijos+1);\n\t\tfor(int i = 0; i < temp.size()/2; i++) {\n\t\t\tint j;\n\t\t\tdo {\n\t\t\t\tj = Individuo.aleatNum(0, temp.size()-1);\n\t\t\t}while(j != i);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tpoblacion2.addAll(cruce(temp.get(i), temp.get(j)));\n\t\t\t} catch (CruceNuloException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//this.poblacion.clear();\n\t\tthis.poblacion = poblacion2;\n\t}",
"public void calculoPersonal(){\n ayudantes = getAyudantesNecesarios();\n responsables = getResponsablesNecesarios();\n \n //Calculo atencion al cliente (30% total trabajadores) y RRPP (10% total trabajadores):\n \n int total = ayudantes + responsables;\n \n atencion_al_cliente = (total * 30) / 100;\n \n RRPP = (total * 10) / 100;\n \n //Creamos los trabajadores\n \n gestor_trabajadores.crearTrabajadores(RRPP, ayudantes,responsables,atencion_al_cliente);\n \n }",
"public void hallarPerimetroIsosceles() {\r\n this.perimetro = 2*(this.ladoA+this.ladoB);\r\n }",
"public void precio4e(){\n precioHabitaciones = precioHabitaciones + (cantidadHabitaciones * numeroCamas);\n\n //Restaurante\n if(capacidadRestaurant < 30){\n precioHabitaciones = precioHabitaciones + 10;\n } else if (capacidadRestaurant > 29 && capacidadRestaurant < 51){\n precioHabitaciones = precioHabitaciones + 30;\n } else if (capacidadRestaurant > 50){\n precioHabitaciones = precioHabitaciones + 50;\n }\n\n //Gimnasio\n switch (gimnasio){\n case \"A\":\n precioHabitaciones = precioHabitaciones + 50;\n break;\n case \"B\":\n precioHabitaciones = precioHabitaciones + 30;\n break;\n }\n\n }",
"public String getMascara()\r\n/* 287: */ {\r\n/* 288:355 */ if (this.dimensionContable.getMascara() != null) {\r\n/* 289:356 */ if (this.dimensionContable.getDimensionPadre() != null) {\r\n/* 290:358 */ this.mascara = (this.dimensionContable.getDimensionPadre().getCodigo() + this.dimensionContable.getMascara().substring(this.dimensionContable.getDimensionPadre().getCodigo().length()));\r\n/* 291: */ } else {\r\n/* 292:360 */ this.mascara = this.dimensionContable.getMascara();\r\n/* 293: */ }\r\n/* 294: */ }\r\n/* 295:363 */ return this.mascara;\r\n/* 296: */ }",
"@Override public int conocerMonto(){\n\treturn 120;\n }",
"@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }",
"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}",
"private void Mueve() {\n\t\tpaleta1.Mueve_paletas();\n\t\tpaleta2.Mueve_paletas();\n\t\tpelota.Mueve_pelota();\n\t}",
"public int getDineroRecaudadoPorMaquina1()\n {\n return maquina1.getTotal();\n }",
"void establecerPuntoAM(int pos){\n this.emisoraAMActual = pos;\n }",
"public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}",
"public static PerPpal tomarPocion(PerPpal pj1, Pocion pocion1) {\n\t\tint vidaMax = 100;\n\t\tif (pj1.getVida() < vidaMax) {// si la vida no está al máximo entonces suma la poción\n\t\t\tpj1.setVida(pj1.getVida() + pocion1.getVida());\n\t\t\tif (pj1.getVida() > vidaMax) {// y si supera la vida máxima, setea a vida máxima, no más.\n\t\t\t\tpj1.setVida(vidaMax);\n\t\t\t}\n\t\t}\n\t\treturn pj1;\n\t}",
"@Override\n public void pintarPantalla(Graphics g) {\n //ESTABLECEMOS COLOR PARA FONDO DE LA PANTALLA\n g.setColor(colorInicio);\n g.fillRect(0, 0, p.getWidth(), p.getHeight());\n\n //ESTABLECEMOS COLOR Y POSICION PARA EL TITULO DEL JUEGO\n g.setColor(colorLetra);\n g.setFont(fuenteGrande);\n g.drawString(\"NAVES NODRIZAS\", (anchoPantalla / 2) - (p.getWidth() / 2), (altoPantalla / 2) - (p.getHeight() / 2));\n\n //ESTABLECEMOS COLOR Y POSICION PARA EL MENSAJE\n g.setColor(colorLetra);\n g.setFont(fuenteGrande);\n g.drawString(\"Haga clic para jugar\", 100, 200);\n }",
"private void aumentarPuntos() {\r\n this.puntos++;\r\n this.form.AumentarPuntos(this.puntos);\r\n }",
"public void abrirManoMaximo()\n {\n brazo.manoAbrirMaximo();\n }",
"private void actualizaPuntuacion() {\n if(cambiosFondo <= 10){\n puntos+= 1*0.03f;\n }\n if(cambiosFondo > 10 && cambiosFondo <= 20){\n puntos+= 1*0.04f;\n }\n if(cambiosFondo > 20 && cambiosFondo <= 30){\n puntos+= 1*0.05f;\n }\n if(cambiosFondo > 30 && cambiosFondo <= 40){\n puntos+= 1*0.07f;\n }\n if(cambiosFondo > 40 && cambiosFondo <= 50){\n puntos+= 1*0.1f;\n }\n if(cambiosFondo > 50) {\n puntos += 1 * 0.25f;\n }\n }",
"@Override\n public void cantidad_Defensa(){\n defensa=2+nivel+aumentoD;\n }",
"public String getPuissanceCampMechant(){ \n Integer total = 0;\n total+=bonusTemporaireMechant;\n for(Monstre p : CampMechant)\n total += p.getPuissance(); \n return total.toString();\n }",
"public Agnello mangiaPecora() {\n\t\tint indiceCasuale = (int) (Math.random() * pecore.size());\n\t\tAgnello pecoraMangiata = pecore.get(indiceCasuale);\n\t\tprelevaAnimale(pecoraMangiata.getTipo());\n\t\treturn pecoraMangiata;\n\t}",
"public static void miedo(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n aleatorio = (numeroAleatorio.nextInt(10-5+1)+5);\n \n if(oro>aleatorio){//condicion de finalizar battalla y sus acciones\n oroPerdido= (nivel*2)+aleatorio;\n oro= oro-oroPerdido;\n System.out.println(\"Huiste de la batalla!!!\");\n\t\t System.out.println(\"oro perdido:\"+oroPerdido);\n opcionMiedo=1; //finalizando battalla por huida del jugador \n }\n else{\n System.out.println(\"No pudes huir de la batalla\");\n } \n }",
"private void comerFantasma(Fantasma fantasma) {\n // TODO implement here\n }",
"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 float calcularPerimetro(){\n return baseMayor+baseMenor+(medidaLado*2);\n }",
"void verEnPantalla() {\r\n\t\tSystem.out.println( numEnPantalla );\r\n\t}",
"public int getPontosTimeMandante() {\r\n return pontosTimeMandante;\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 atacar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int ataqueJugador;\n //acciones de la funcion atacar sobre vida del enemigo\n aleatorio = (numeroAleatorio.nextInt(20-10+1)+10);\n ataqueJugador= ((nivel+1)*10)+aleatorio;\n puntosDeVidaEnemigo= puntosDeVidaEnemigo-ataqueJugador;\n \n }",
"public int contaPercorre() {\n\t\tint contaM = 0;\n\t\tCampusModel aux = inicio;\n\t\tString r = \" \";\n\t\twhile (aux != null) {\n\t\t\tr = r + \"\\n\" + aux.getNomeCampus();\n\t\t\taux = aux.getProx();\n\t\t\tcontaM++;\n\t\t}\n\t\treturn contaM;\n\t}",
"public void precioFinal(){\r\n if(getConsumoEnergetico() == Letra.A){\r\n precioBase = 100+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.B)){\r\n precioBase = 80+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.C){\r\n precioBase = 60+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.D)){\r\n precioBase = 50+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.E){\r\n precioBase = 30+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.F)){\r\n precioBase = 10+precioBase;\r\n }\r\n else{\r\n aux=1;\r\n System.out.println(\"...No existe...\");\r\n }\r\n if (aux==0){\r\n peso();\r\n }\r\n \r\n }",
"public Maquina() {\n savia = 0;\n reflejosLagrimas = 0;\n estado = false;\n }",
"public int getPantallaApunta() {\r\n return this.iPantallaApunta;\r\n }",
"public double getCustoAluguel(){\n return 2 * cilindradas;\n }",
"@Override public String getMasa(){\n return \"gruesa \";\n }",
"public void leerPacientes (int id_nutricionista);",
"@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 }",
"void establecerPuntoFM(int pos){\n this.emisoraFMActual = pos;\n }",
"public int obtenerMinuto() { return minuto; }",
"static String MostrarPergunta(int pergunta)\n {\n String montada = \"\";\n \n montada = montada + Perguntas(pergunta); //pega as perguntas na função de Perguntas, contatena com a String montada\n montada = montada + \"\\n\";\n \n String [] opcoes = Opcoes(pergunta); //pega as opções de acordo com a numeração da pergunta \n \n for (int i = 0; i < opcoes.length; i++) \n {\n montada = montada + (opcoes[i] + \"\\n\"); //monta as opções com as perguntas com as respectivas numeração \n }\n montada = montada + \"\\n\";\n montada = montada + \"\\n\";\n \n return montada;\n \n }",
"public void calcularIndicePlasticidad(){\r\n\t\tindicePlasticidad = limiteLiquido - limitePlastico;\r\n\t}",
"public String getPuntoEmision()\r\n/* 124: */ {\r\n/* 125:207 */ return this.puntoEmision;\r\n/* 126: */ }",
"private String formulerMonNom() {\n\t return \"Je m'appelle \" + this.nom; // appel de la propriété nom\n\t }",
"private void populaUnidadeMedida()\n {\n UnidadeMedida u = new UnidadeMedida(\"Gramas\", \"g\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Quilo\", \"kg\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Unidade\", \"unidade\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sopa\", \"col. sopa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Sobremesa\", \"col. sobremesa\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Colher de Chá\", \"col. chá\");\n unidadeMedidaDAO.insert(u);\n u = new UnidadeMedida(\"Copo\", \"copo\");\n unidadeMedidaDAO.insert(u);\n\n }",
"public int masVendido(int cantidad){\r\n \r\n return cantidad;\r\n }",
"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}",
"@Override\n public double perimetro() {\n return 4 * this.lado;\n }",
"public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}",
"double getPerimetro(){\n return 2 * 3.14 * raggio;\n }",
"public String getPuissanceCampGentil(){ \n Integer total = 0;\n total+=bonusTemporaireGentil;\n for(Personnage p : CampGentil)\n total += p.getPuissance(); \n return total.toString();\n }",
"@Override\n\tpublic double netoAnual(double precio) {\n\t\treturn this.precio * 12;\n\t}",
"private void asignaNombre() {\r\n\r\n\t\tswitch (this.getNumero()) {\r\n\r\n\t\tcase 1:\r\n\t\t\tthis.setNombre(\"As de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tthis.setNombre(\"Dos de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tthis.setNombre(\"Tres de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tthis.setNombre(\"Cuatro de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tthis.setNombre(\"Cinco de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tthis.setNombre(\"Seis de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tthis.setNombre(\"Siete de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tthis.setNombre(\"Diez de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tthis.setNombre(\"Once de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tthis.setNombre(\"Doce de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"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 int getPresencaPolicial() {\n return presencaPolicial;\n }",
"public String getMarca()\n {\n return \"\\nDispositivo Marca \" + Marca; \n }",
"@Override\n public void pp(){\n PP=3+2*nivel;\n }",
"@Override\n public String toString() {\n return \"Ultima Manutencao em: \"+this.ultimaManun+\" km's.\";\n }",
"public void consultaDinero(){\r\n System.out.println(this.getMonto());\r\n }",
"public int getMida() {\r\n\t\treturn mida;\r\n\t}",
"public void setPontosTimeMandante(int pontosTimeMandante) {\r\n this.pontosTimeMandante = pontosTimeMandante;\r\n }",
"public void moverPlataformas(){\n\t\tfor ( int x=0 ; x < 2; x++){\n\t\t\tquitarPoder(x);\n\t\t\tgame.moverPersonaje(x);\n\t\t}\n\t}",
"private void esvaziaMensageiro() {\n\t\tMensageiro.arquivo=null;\n\t\tMensageiro.lingua = linguas.indexOf(lingua);\n\t\tMensageiro.linguas=linguas;\n\t\tMensageiro.nomeArquivo=null;\n\t}",
"public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}",
"@Override\n public void imprimir() {\n System.out.println(\"Vehiculos ordenados por precio mayor a menor:\");\n if(a1.precio>a2.precio && a1.precio >m1.precio && a1.precio >m2.precio){\n System.out.println(a1.marca+\"\"+a1.modelo);\n if(a2.precio >m1.precio && a2.precio >m2.precio){\n System.out.println(a2.marca+\"\"+a2.modelo);\n if(m1.precio >m2.precio){\n System.out.println(m1.marca+\"\"+m1.modelo);\n System.out.println(m2.marca+\"\"+m2.modelo);\n }else{\n System.out.println(m2.marca+\"\"+m1.modelo);\n System.out.println(m1.marca+\"\"+m1.modelo);\n \n }\n }else{\n if(m1.precio >a2.precio && m1.precio >m2.precio){\n System.out.println(m1.marca+\"\"+m1.modelo);\n if(a2.precio >m2.precio){\n System.out.println(a2.marca+\"\"+a2.modelo);\n System.out.println(m2.marca+\"\"+m2.modelo);\n }else{\n System.out.println(m2.marca+\"\"+m2.modelo);\n System.out.println(a2.marca+\"\"+a2.modelo);\n \n }\n }else{\n if(m2.precio >a2.precio && m2.precio >m1.precio){\n System.out.println(m2.marca+\"\"+m2.modelo);\n if(m1.precio >a2.precio){\n System.out.println(m1.marca+\"\"+m1.modelo);\n System.out.println(a2.marca+\"\"+a2.modelo);\n }else{\n System.out.println(a2.marca+\"\"+a2.modelo);\n System.out.println(m1.marca+\"\"+m1.modelo);\n }\n }\n }\n }\n }else{\n if(a2.precio>a1.precio && a2.precio >m1.precio && a2.precio >m2.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n if(a1.precio >m1.precio && a1.precio >m2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n if(m1.precio >m2.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n \n }\n }else{\n if(m1.precio >a1.precio && m1.precio >m2.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n if(a1.precio >m2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n \n }\n }else{\n if(m2.precio >a1.precio && m2.precio >m1.precio){\n System.out.println(m2.marca+\" \"+m2.modelo);\n if(m1.precio >a1.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n }else{\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n }\n }\n }\n }\n }else{\n if(m1.precio>a2.precio && m1.precio >a1.precio && m1.precio >m2.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n if(a2.precio >a1.precio && a2.precio >m2.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n if(a1.precio >m2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n \n }\n }else{\n if(a1.precio >a2.precio && a1.precio >m2.precio){\n System.out.println(a1.marca+\"\"+a1.modelo);\n if(a2.precio >m2.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n \n }\n }else{\n if(m2.precio >a2.precio && m2.precio >a1.precio){\n System.out.println(m2.marca+\" \"+m2.modelo);\n if(a1.precio >a2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n }else{\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n }\n }\n }\n }\n }else{ \n if(m2.precio>a2.precio && m2.precio >a1.precio && m2.precio >m1.precio){\n System.out.println(m2.marca+\" \"+m2.modelo);\n if(a2.precio >a1.precio && a2.precio >m1.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n if(a1.precio >m1.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n }else{\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n \n }\n }else{\n if(a1.precio >a2.precio && a1.precio >m1.precio){\n System.out.println(a1.marca+\"\"+a1.modelo);\n if(a2.precio >m1.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n }else{\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n \n }\n }else{\n if(m1.precio >a2.precio && m1.precio >a1.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n if(a1.precio >a2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n }else{\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n }\n }\n }\n }\n } \n \n }\n\n }\n }\n }",
"@Override\r\n\tpublic float chekearDatos(){\r\n\t\t\r\n\t\tfloat monto = 0f;\r\n\t\tfloat montoPorMes = creditoSolicitado/plazoEnMeses;\r\n\t\tdouble porcentajeDeSusIngesosMensuales = (cliente.getIngresosMensuales()*0.7);\r\n\t\t\r\n\t\tif(cliente.getIngresoAnual()>=15000f && montoPorMes<=porcentajeDeSusIngesosMensuales){\r\n\t\t\t\r\n\t\t\tmonto = this.creditoSolicitado;\r\n\t\t\tsetEstadoDeSolicitud(true);\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\treturn monto;\r\n\t}",
"public void aggiungiPecoraCasualmente() {\n\t\tif (((int) (Math.random() * 3)) >= 1) {\n\t\t\tPecoraAdulta nuovaPecoraAdulta = new PecoraAdulta();\n\t\t\tpecore.add(nuovaPecoraAdulta);\n\t\t\tif (nuovaPecoraAdulta.isMaschio())\n\t\t\t\tnumMontoni++;\n\t\t\telse\n\t\t\t\tnumPecoreFemmine++;\n\t\t} else {\n\t\t\tpecore.add(new Agnello());\n\t\t\tnumeroAgelli++;\n\t\t}\n\t}",
"private static void atualizaContadorCodigos(ArrayList<Produto> produto) {\n int contadorAtual = produto.size() + 1;\n Produto.setContador(contadorAtual);\n }",
"private static void imprimirMensajeEnPantalla() {\n\tSystem.out.println(\"########### JUEGO EL AHORCADO ###########\");\n\timprimirAhorcado(intentosRestantes);\n\tSystem.out.println(\"\\nPALABRA ACTUAL: \" + getPalabraActualGuionBajo());\n\tSystem.out.println(\"INTENTOS RESTANTES: \" + intentosRestantes);\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 }",
"public void setPapeles(int avenida, int calle, int cant);",
"public void cambiarDificultad(){\r\n\t\tif (Menu.dificultad == \"facil\") {\r\n\t\t\tspeed = 10;\r\n\t\t\tspace = 350;\r\n\t\t}else if (Menu.dificultad == \"normal\") {\r\n\t\t\tspeed = 10;\r\n\t\t\tspace = 280;\r\n\t\t}else if (Menu.dificultad == \"dificil\") {\r\n\t\t\tspeed = 15 ;\r\n\t\t\tspace = 300;\r\n\t\t}else if (Menu.dificultad == \"Invertido\") {\r\n\t\t\tspeed = 10;\r\n\t\t\tspace = 280;\r\n\t\t}\r\n\t}",
"public void sueldo(){\n if(horas <= 40){\n sueldo = horas * cuota;\n }else {\n if (horas <= 50) {\n sueldo = (40 * cuota) + ((horas - 40) * (cuota * 2));\n } else {\n sueldo = ((40 * cuota) + (10 * cuota * 2)) + ((horas - 50) + (cuota * 3));\n }\n }\n\n }",
"private void atualizarPalitos() {\n Jogador jogador = servidor.getJogador(nomeJogador);\n LugarModelo lugarModelo = listaLugares.get(jogador.lugar - 1);\n lugarModelo.getMao().setText(jogador.quantidadePalitosApostados + \" Palitos\");\n lugarModelo.getQuantidadePalitosRestantes().setText(\"Palitos Restante: \" + jogador.quantidadePalitosRestantes + \"\");\n }",
"public GrapheIndicateursProjet (Projet p) {\n seuils = p.getSeuilFixes() ;\n \n // pour l'echelle, on determine les mesures max de toutes les iterations\n \n \n iterations = p.getListeIt() ; \n nbIt = iterations.size() ;\n \n // calcul des maximums\n Iteration tempIt = null ;\n IndicateursIteration tempIndIt = null ;\n for (int i = 0 ; i < nbIt ; i++)\n {\n if (iterations.get(i) instanceof Iteration)\n {\n tempIt = (Iteration)iterations.get(i) ;\n tempIndIt = tempIt.getIndicateursIteration() ;\n // charges\n if (tempIndIt.getTotalCharges() > chargesMax) { chargesMax = tempIndIt.getTotalCharges() ; }\n\t\tif (tempIndIt.getChargeMoyenneParticipants() > moyenneChargesMax) { moyenneChargesMax = tempIndIt.getChargeMoyenneParticipants() ; }\n\t\tif (tempIndIt.getNombreParticipants() > participantsMax) { participantsMax = tempIndIt.getNombreParticipants() ; }\n\t\tif (tempIndIt.getNombreTachesTerminees() > tachesTermineesMax) { tachesTermineesMax = tempIndIt.getNombreTachesTerminees() ; }\n\t\tif (tempIndIt.getNombreMoyenTachesParticipants() > tachesParticipantsMax) { tachesParticipantsMax = tempIndIt.getNombreMoyenTachesParticipants() ; }\n\t\tif (tempIndIt.getDureeMoyenneTaches() > dureeMoyenneTacheMax) { dureeMoyenneTacheMax = tempIndIt.getDureeMoyenneTaches() ; }\n }\n }\n setPreferredSize(new Dimension(ITERATION_WIDTH * nbIt,440));\n\t//setBorder(new TitledBorder(new EtchedBorder(), \"toto\", 5, TitledBorder.ABOVE_TOP)) ;\n }",
"public void mostrarAutomovil(){\r\n System.out.println(\"Marca: \" + automovil.getMarca());\r\n System.out.println(\"Modelo: \" + automovil.getModelo());\r\n System.out.println(\"Placa: \" + automovil.getPlaca());\r\n }",
"public void primerPunto() {\n\t\tp = new PuntoAltaPrecision(this.xCoord, this.yCoord);\n\t\t// Indicamos la trayectoria por la que va la pelota\n\t\tt = new TrayectoriaRecta(1.7f, p, false);\n\t}",
"private void populaParteCorpo()\n {\n ParteCorpo p1 = new ParteCorpo(\"Biceps\");\n parteCorpoDAO.insert(p1);\n ParteCorpo p2 = new ParteCorpo(\"Triceps\");\n parteCorpoDAO.insert(p2);\n ParteCorpo p3 = new ParteCorpo(\"Costas\");\n parteCorpoDAO.insert(p3);\n ParteCorpo p4 = new ParteCorpo(\"Lombar\");\n parteCorpoDAO.insert(p4);\n ParteCorpo p5 = new ParteCorpo(\"Peito\");\n parteCorpoDAO.insert(p5);\n ParteCorpo p6 = new ParteCorpo(\"Panturrilha\");\n parteCorpoDAO.insert(p6);\n ParteCorpo p7 = new ParteCorpo(\"Coxas\");\n parteCorpoDAO.insert(p7);\n ParteCorpo p8 = new ParteCorpo(\"Gluteos\");\n parteCorpoDAO.insert(p8);\n ParteCorpo p9 = new ParteCorpo(\"Abdomen\");\n parteCorpoDAO.insert(p9);\n ParteCorpo p10 = new ParteCorpo(\"Antebraço\");\n parteCorpoDAO.insert(p10);\n ParteCorpo p11 = new ParteCorpo(\"Trapezio\");\n parteCorpoDAO.insert(p11);\n ParteCorpo p12 = new ParteCorpo(\"Ombro\");\n parteCorpoDAO.insert(p12);\n }",
"public String getpMenor() {\r\n return pMenor;\r\n }",
"private void populaAlimento()\n {\n Alimento a = new Alimento(\"Arroz\", 100d, 5d, 0.4d, 30d, 100d, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n a = new Alimento(\"Abacaxi\", 96.2d, 1.2d, 2.3d, 6d, 100d, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n a = new Alimento(\"Carne moida - Acem\", 212.4d, 26.7d, 9.8d, 0d, 100, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n a = new Alimento(\"Pernil Assado\", 262.3d, 32.1d, 13.1d, 0, 100, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n a = new Alimento(\"Pao de forma integral\", 253.2d, 9.4d, 2.9d, 49, 100, new UnidadeMedida(1));\n alimentoDAO.insert(a);\n }",
"private void creaModuloMem() {\n /* variabili e costanti locali di lavoro */\n ArrayList<Campo> campi = new ArrayList<Campo>();\n ModuloRisultati modulo;\n Campo campo;\n\n try { // prova ad eseguire il codice\n\n campo = CampoFactory.intero(Campi.Ris.codicePiatto.getNome());\n campi.add(campo);\n\n campo = CampoFactory.testo(Campi.Ris.nomePiatto.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"piatto\");\n campo.setToolTipLista(\"nome del piatto\");\n campo.decora()\n .etichetta(\"nome del piatto\"); // le etichette servono per il dialogo ricerca\n campo.setLarghezza(250);\n campi.add(campo);\n\n campo = CampoFactory.testo(Campi.Ris.categoria.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"categoria\");\n campo.setToolTipLista(\"categoria del piatto\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quanteVolte.getNome());\n campo.setVisibileVistaDefault();\n campo.setLarghezza(80);\n campo.setTitoloColonna(\"quante volte\");\n campo.setToolTipLista(\n \"quante volte questo piatto è stato offerto nel periodo analizzato\");\n campo.decora().etichetta(\"quante volte\");\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quantiCoperti.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"coperti\");\n campo.setToolTipLista(\"numero di coperti che avrebbero potuto ordinare\");\n campo.decora().etichetta(\"n. coperti\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n campo = CampoFactory.intero(Campi.Ris.quanteComande.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"comande\");\n campo.setToolTipLista(\"numero di comande effettive\");\n campo.decora().etichetta(\"n. comande\");\n campo.setLarghezza(80);\n campo.setTotalizzabile(true);\n campi.add(campo);\n\n campo = CampoFactory.percentuale(Campi.Ris.gradimento.getNome());\n campo.setVisibileVistaDefault();\n campo.setTitoloColonna(\"gradimento\");\n campo.setToolTipLista(\n \"percentuale di gradimento (è il 100% se tutti i coperti potenziali lo hanno ordinato)\");\n campo.decora().etichetta(\"% gradimento\");\n campo.setLarghezza(80);\n campi.add(campo);\n\n modulo = new ModuloRisultati(campi);\n setModuloRisultati(modulo);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n\n }",
"@Override\n public ArrayList<Propiedad> getPrecioAgente(double pMenor, double pMayor, String pId) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE = '\" + pId + \"' AND \"\n + \"PRECIO >= \" + pMenor + \" AND PRECIO <= \" + pMayor);\n return resultado;\n }",
"public int cargarCombustible(){ //creamos metodo cargarCombustible\r\n return this.getNivel();//retornara el nivel de ese mecanico\r\n }",
"private void cruzarGenesMonopunto(Cromosoma padre, Cromosoma madre) {\n\t\t//obtenemos el punto de cruce\n\t\tint longCromosoma = this.poblacion[0].getLongitudCrom();\n\t\tint puntoCruce = (int) (Math.random() * longCromosoma) + 1;\n\t\t\n\t\tboolean[] infoPadre = padre.getCromosoma();\n\t\tboolean[] infoMadre = madre.getCromosoma();\n\t\tboolean aux;\n\t\tfor(int i = puntoCruce; i < longCromosoma; i++) {\n\t\t\t\n\t\t\taux = infoPadre[i];\n\t\t\tinfoPadre[i] = infoMadre[i];\n\t\t\tinfoMadre[i] = aux;\n\t\t\t\n\t\t}\n\t\tpadre.setCromosoma(infoPadre);\n\t\tmadre.setCromosoma(infoMadre);\n\t\t\n\t}",
"public static void dormir(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int restoDeMana; //variables locales a utilizar\n int restoDeVida;\n if(oro>=30){ //condicion de oro para recuperar vida y mana\n restoDeMana=10-puntosDeMana;\n puntosDeMana=puntosDeMana+restoDeMana;\n restoDeVida=150-puntosDeVida;\n puntosDeVida=puntosDeVida+restoDeVida;\n //descotando oro al jugador\n oro=oro-30;\n System.out.println(\"\\nrecuperacion satisfactoria\");\n }\n else{\n System.out.println(\"no cuentas con 'Oro' para recuperarte\");\n }\n }",
"@Override\n\tpublic double calculaImc() {\n\t\t imc = peso / (altura * altura);\n\t\treturn imc;\n\t}",
"public void cargarDimensionPadre()\r\n/* 230: */ {\r\n/* 231:296 */ if (getMascara(this.dimension).equals(this.dimensionContable.getMascara())) {\r\n/* 232:297 */ this.dimensionContable.setIndicadorMovimiento(true);\r\n/* 233: */ } else {\r\n/* 234:299 */ this.dimensionContable.setIndicadorMovimiento(false);\r\n/* 235: */ }\r\n/* 236:302 */ this.listaDimensionContablePadre = this.servicioDimensionContable.obtenerListaDimensionPadre(this.dimensionContable);\r\n/* 237: */ }",
"public int getTamanio(){\r\n return tamanio;\r\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 Contenedor getContenedorMaximo()\n {\n Contenedor maxCont = null;\n int maxPeso ;\n\n maxPeso = 0;\n\n for (Contenedor c : this.losContenedores){\n if (c.peso > maxPeso)\n {\n maxPeso = c.peso;\n maxCont = c;\n }\n }\n\n return maxCont;\n }",
"@Test\n\tpublic void testMonto1() {\n\n\t\tSystem.out.println(\" la cantidad introducida es menor de 1\"\n\t\t\t\t+ \"monto1: equivalencia: si el monto es menor de 1,ahora 0, el mensaje seria:\\n\");\n\t\tint cantidad = 0;\n\n\t\tString expResult = \"Error: La cantidad introducida es menor de 1\";\n\t\tString result = instance.ingreso(cantidad);\n\t\tassertEquals(expResult, result);\n\n\t}",
"private void dibujarMarcador() {\n\n\t\tText tituloMarcador = new Text(\"Marcador\");\n\t\ttituloMarcador.setFont(new Font(16));\n\n\t\tText tituloJuega = new Text(\"Juega\");\n\t\ttituloJuega.setFont(new Font(16));\n\t\t\n\t\tcantidadFichasNegras = new Label();\n\t\tcantidadFichasBlancas = new Label();\n\t\tjugadorActual = new Label();\n\n\t\tGridPane marcador = new GridPane();\n\t\tmarcador.setAlignment(Pos.TOP_CENTER);\n\t\tmarcador.setHgap(20);\n\t\tmarcador.setVgap(20);\n\t\tmarcador.setPadding(new Insets(20));\n\t\tmarcador.add(tituloMarcador, 0, 0, 2, 1);\n\t\tmarcador.add(new Label(\"Negras :\"), 0, 1);\n\t\tmarcador.add(cantidadFichasNegras, 1, 1);\n\t\tmarcador.add(new Label(\"Blancas :\"), 0, 2);\n\t\tmarcador.add(cantidadFichasBlancas, 1, 2);\n\t\tmarcador.add(tituloJuega, 0, 3, 2, 1);\n\t\tmarcador.add(jugadorActual, 0, 4, 2, 1);\n\n\t\tpanel.setPadding(new Insets(5));\n\t\tpanel.setRight(marcador);\n\t}",
"private void gerarLaudosProcedimentosMateriais(\r\n\t\t\tMpmPrescricaoMedica prescricao, List<MpmLaudo> laudoList) throws ApplicationBusinessException {\r\n\r\n\t\tMap<MpmPrescricaoProcedimento, FatProcedHospInternos> procedimentosMap = this\r\n\t\t\t\t.getConfirmarPrescricaoMedicaRN()\r\n\t\t\t\t.listarProcedimentosGeracaoLaudos(prescricao);\r\n\r\n\t\tMpmLaudo laudo = null;\r\n\r\n\t\tfor (MpmPrescricaoProcedimento procedimento : procedimentosMap.keySet()) {\r\n\t\t\tlaudo = new MpmLaudo();\r\n\t\t\tlaudo.setDthrInicioValidade(prescricao.getDthrInicio());\r\n\r\n\t\t\tDate dataFimValidade = prescricao.getDthrInicio();\r\n\t\t\tif (procedimento.getDuracaoTratamentoSolicitado() != null) {\r\n\t\t\t\tdataFimValidade = DateUtil.adicionaDias(dataFimValidade,\r\n\t\t\t\t\t\tprocedimento.getDuracaoTratamentoSolicitado()\r\n\t\t\t\t\t\t\t\t.intValue() - 1);\r\n\t\t\t}\r\n\t\t\tlaudo.setDthrFimValidade(dataFimValidade);\r\n\t\t\tlaudo.setDthrFimPrevisao(dataFimValidade);\r\n\r\n\t\t\tlaudo.setJustificativa(procedimento.getJustificativa());\r\n\t\t\tlaudo.setContaDesdobrada(false);\r\n\t\t\tlaudo.setImpresso(false);\r\n\t\t\tlaudo.setDuracaoTratSolicitado(procedimento\r\n\t\t\t\t\t.getDuracaoTratamentoSolicitado());\r\n\t\t\tlaudo.setLaudoManual(false);\r\n\t\t\tlaudo.setAtendimento(prescricao.getAtendimento());\r\n\t\t\tlaudo.setPrescricaoProcedimento(procedimento);\r\n\t\t\tlaudo.setProcedimentoHospitalarInterno(procedimentosMap\r\n\t\t\t\t\t.get(procedimento));\r\n\r\n\t\t\tthis.adicionarLaudoLista(laudoList, laudo);\r\n\r\n\t\t}\r\n\r\n\t}",
"public void VaciarPila()\n {\n this.tope = 0;\n }",
"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: */ }"
]
| [
"0.66162807",
"0.6493166",
"0.64308363",
"0.6421916",
"0.639725",
"0.6378337",
"0.63665664",
"0.6346575",
"0.6330071",
"0.6268453",
"0.6245375",
"0.62438625",
"0.6236527",
"0.6194757",
"0.61935914",
"0.6173337",
"0.61713016",
"0.6167189",
"0.61468",
"0.6138357",
"0.61204183",
"0.61102927",
"0.61004126",
"0.6061249",
"0.6052062",
"0.60423076",
"0.603138",
"0.60232997",
"0.60071903",
"0.599938",
"0.5996361",
"0.5990621",
"0.5989162",
"0.59770113",
"0.5970539",
"0.596071",
"0.5955916",
"0.5952857",
"0.59509206",
"0.5948123",
"0.59452426",
"0.59236676",
"0.5916588",
"0.58945525",
"0.5891181",
"0.5888392",
"0.5877759",
"0.58738196",
"0.58584046",
"0.58525467",
"0.5850148",
"0.5840861",
"0.58366525",
"0.5826583",
"0.58138144",
"0.5811898",
"0.58104736",
"0.58076936",
"0.57997495",
"0.57924014",
"0.57883537",
"0.5776998",
"0.5771009",
"0.576943",
"0.5768161",
"0.5765204",
"0.5754548",
"0.5752073",
"0.5750758",
"0.5748973",
"0.5745265",
"0.5745182",
"0.57415855",
"0.5739926",
"0.5739267",
"0.57355815",
"0.5733421",
"0.5732087",
"0.57312995",
"0.57301944",
"0.5721175",
"0.57177615",
"0.57163227",
"0.57112134",
"0.57014644",
"0.5698802",
"0.56967026",
"0.56965125",
"0.56928015",
"0.56888235",
"0.56886655",
"0.568864",
"0.56863135",
"0.5677477",
"0.5673564",
"0.56732",
"0.56666934",
"0.5664821",
"0.5664551",
"0.56643397",
"0.56619567"
]
| 0.0 | -1 |
Constructor called by the system to instantiate the task | public GetAddressTask(Context context) {
// Required by the semantics of AsyncTask
super();
// Set a Context for the background task
this.localContext = context;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Task() {\n\t}",
"public Task() {\r\n }",
"public Task() {\n }",
"public Task() { }",
"public Task(){\n super();\n }",
"public Task(){}",
"public Tasks() {\n }",
"public ServiceTask() {\n\t}",
"public StudentTask() {\n\t\tthis(\"student_task\", null);\n\t}",
"protected TaskFlow( ) { }",
"protected TaskChain() {\n\t}",
"public TaskCurrent() {\n\t}",
"public TaskList() {\n }",
"public Task(Task source) {\n if (source.Application != null) {\n this.Application = new Application(source.Application);\n }\n if (source.TaskName != null) {\n this.TaskName = new String(source.TaskName);\n }\n if (source.TaskInstanceNum != null) {\n this.TaskInstanceNum = new Long(source.TaskInstanceNum);\n }\n if (source.ComputeEnv != null) {\n this.ComputeEnv = new AnonymousComputeEnv(source.ComputeEnv);\n }\n if (source.EnvId != null) {\n this.EnvId = new String(source.EnvId);\n }\n if (source.RedirectInfo != null) {\n this.RedirectInfo = new RedirectInfo(source.RedirectInfo);\n }\n if (source.RedirectLocalInfo != null) {\n this.RedirectLocalInfo = new RedirectLocalInfo(source.RedirectLocalInfo);\n }\n if (source.InputMappings != null) {\n this.InputMappings = new InputMapping[source.InputMappings.length];\n for (int i = 0; i < source.InputMappings.length; i++) {\n this.InputMappings[i] = new InputMapping(source.InputMappings[i]);\n }\n }\n if (source.OutputMappings != null) {\n this.OutputMappings = new OutputMapping[source.OutputMappings.length];\n for (int i = 0; i < source.OutputMappings.length; i++) {\n this.OutputMappings[i] = new OutputMapping(source.OutputMappings[i]);\n }\n }\n if (source.OutputMappingConfigs != null) {\n this.OutputMappingConfigs = new OutputMappingConfig[source.OutputMappingConfigs.length];\n for (int i = 0; i < source.OutputMappingConfigs.length; i++) {\n this.OutputMappingConfigs[i] = new OutputMappingConfig(source.OutputMappingConfigs[i]);\n }\n }\n if (source.EnvVars != null) {\n this.EnvVars = new EnvVar[source.EnvVars.length];\n for (int i = 0; i < source.EnvVars.length; i++) {\n this.EnvVars[i] = new EnvVar(source.EnvVars[i]);\n }\n }\n if (source.Authentications != null) {\n this.Authentications = new Authentication[source.Authentications.length];\n for (int i = 0; i < source.Authentications.length; i++) {\n this.Authentications[i] = new Authentication(source.Authentications[i]);\n }\n }\n if (source.FailedAction != null) {\n this.FailedAction = new String(source.FailedAction);\n }\n if (source.MaxRetryCount != null) {\n this.MaxRetryCount = new Long(source.MaxRetryCount);\n }\n if (source.Timeout != null) {\n this.Timeout = new Long(source.Timeout);\n }\n if (source.MaxConcurrentNum != null) {\n this.MaxConcurrentNum = new Long(source.MaxConcurrentNum);\n }\n if (source.RestartComputeNode != null) {\n this.RestartComputeNode = new Boolean(source.RestartComputeNode);\n }\n if (source.ResourceMaxRetryCount != null) {\n this.ResourceMaxRetryCount = new Long(source.ResourceMaxRetryCount);\n }\n }",
"public XmlAdaptedTask() {\n\t}",
"public TaskGenerator() {\n if (taskNames == null) {\n setUpNameList();\n }\n }",
"private TaskItem()\n {\n }",
"public AnemoCheckTask() {\n }",
"public Task(String name) {\r\n this(name, false);\r\n }",
"public Task(String creator) {\r\n \t\tthis(creator, \"Untitled\", \"\", true, false);\r\n \t}",
"public TaskList(){}",
"public AddTasks() {\n }",
"@Override\n\tpublic Task constructInstance(Robot robot) {\n\t\treturn null;\n\t}",
"public Task(Task T){\n\n\t\tcmd = T.cmd;\n\t\ttasknum = T.tasknum;\n\t\tterminated = T.terminated;\n\t\tcycle_term = T.cycle_term;\n\t\taborted = T.aborted;\n\t\twaiting = T.waiting;\n\t\ttime_wait = T.time_wait;\n\t\trunning = T.running;\n\n\t\tfor (int i = 0; i < T.actions.size(); i++){\n\n\t\t\tactions.add(T.actions.get(i));\n\t\t\tres_needed.add(T.res_needed.get(i));\n\t\t\treq_num.add(T.req_num.get(i));\n\t\t}\n\n\t\tfor(int i = 0; i < T.claims.size(); i++){\n\n\t\t\tclaims.add(T.claims.get(i));\n\t\t\tallocation.add(T.allocation.get(i));\n\t\t}\n\n\t}",
"public Task(String name) {\n\t\tthis.name=name;\n\t}",
"public XmlAdaptedTask() {}",
"public XmlAdaptedTask() {}",
"public SftpDownloadTask() {\n\n\t}",
"public TaskServiceImpl() {}",
"public TaskDefinition() {\n\t\tthis.started = Boolean.FALSE; // default\n\t\tthis.startTime = new Date(); // makes it easier during task creation\n\t\t// as we have a default date populated\n\t\tthis.properties = new HashMap<>();\n\t}",
"public Task(String url) {\n this.url = url;\n logger.debug(\"Created task for \" + url);\n }",
"public Task(String taskDescription) {\n this.taskDescription = taskDescription;\n this.isDone = false;\n this.completed = \"0\";\n }",
"public Task(Task task) {\n id = task.id;\n taskType = task.taskType;\n title = task.title;\n period = task.period;\n deadline = task.deadline;\n wcet = task.wcet;\n //execTime = task.execTime;\n priority = task.priority;\n initialOffset = task.initialOffset;\n nextReleaseTime = task.nextReleaseTime;\n isSporadicTask = task.isSporadicTask;\n }",
"Task(String name) {\n this.name = name;\n }",
"public Task(String name, int number) {\r\n this.name = name;\r\n this.id = number;\r\n this.timer = new Timer();\r\n }",
"public Task(String description){\n this.description = description;\n this.isDone = false;\n }",
"public Task(String description){\n this.description = description;\n this.isDone = false;\n }",
"public Task(String original) {\n this(original, null);\n }",
"Task createTask();",
"Task createTask();",
"Task createTask();",
"public Todo(String task) {\n super(task);\n }",
"public TaskManager() {\n\t\tcompletedTasks = new ArrayList<Tasks>();\n\t}",
"public TaskList() {\n tasks = new ArrayList<>();\n }",
"public TaskList() {\n tasks = new ArrayList<>();\n }",
"public TaskList() {\n tasks = new ArrayList<>();\n }",
"public Task(String description) {\n\n this.description = description;\n this.isDone = false;\n taskCounter++;\n }",
"protected Task(String description) {\n this.description = description;\n this.isComplete = false;\n this.tags = new ArrayList<>();\n }",
"public LessCSSTask() {\n // empty\n }",
"public WatchListMonitorTask()\r\n {\r\n debug(\"WatchListMonitorTask() - Constructor \");\r\n }",
"public Task(String description) {\n this.description = description;\n this.isDone = false;\n this.logo = \"N\";\n }",
"public TaskProgram() {\n initComponents();\n list=new ArrayList();\n li=list.listIterator();\n curtask=0;\n tottask=0;\n }",
"public Task(String description) {\n this.description = description;\n this.isDone = false;\n this.taskType = \"\";\n }",
"public HomographyTask(){\n\n }",
"public Task(String taskDescription) {\n this.taskDescription = taskDescription;\n this.isDone = false;\n }",
"LogoTask()\n {\n //create instance of LogoTask()\n }",
"public static Object createTaskObject(){\n try {\n\n return taskModel.make()\n .load(ClassLoader.getSystemClassLoader(), ClassLoadingStrategy.Default.WRAPPER)\n .getLoaded()\n .newInstance();\n\n\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"public Task(String description) {\n this.description = description;\n this.isDone = false;\n this.tag = \"\";\n }",
"public Task(String msg) {\n this.msg = msg;\n completed = false;\n }",
"public TimedTask(String task) {\n this.task = task;\n timeStart = System.currentTimeMillis();\n }",
"public Task(String description) {\n this.description = description;\n this.isDone = false;\n }",
"public Task(String description) {\n this.description = description;\n this.isDone = false;\n }",
"public Task(String name) {\n this.name = name;\n this.isDone = false;\n }",
"public AutomaticJob() {\r\n \r\n }",
"public Job() {\n\t\t\t\n\t\t}",
"public Task(int taskNumber){\n instructionList = new ArrayList<>();\n this.taskNumber = taskNumber;\n this.resourceHoldings = new int [ResourceManager.numResources];\n this.claimsArr = new int [ResourceManager.numResources];\n }",
"protected abstract void createTasks();",
"public TaskList() {\n tasks = new ArrayList<>();\n cachedTasks = new Stack<>();\n }",
"public Task(Task task) {\r\n\t\tthis.id = task.id;\r\n\t\tthis.description = task.description;\r\n\t\tthis.processor = task.processor;\r\n\t\tthis.status = task.status;\r\n\r\n\t\tthis.dueDate = new GregorianCalendar(task.dueDate.get(GregorianCalendar.YEAR), \r\n\t\t\t\ttask.dueDate.get(GregorianCalendar.MONTH), \r\n\t\t\t\ttask.dueDate.get(GregorianCalendar.DAY_OF_MONTH));\r\n\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd.MM.yyyy\");\r\n\t\tthis.formatedDueDate = sdf.format(dueDate.getTime());\r\n\t\tthis.next = task.next;\r\n\t}",
"public Task(String creator, String name, String description,\r\n \t\t\tboolean requiresText, boolean requiresPhoto) {\r\n \r\n\t\t_creationDate = new SimpleDateFormat(\"MMM dd, yyyy | HH:mm\").format(Calendar\r\n \t\t\t\t.getInstance().getTime());\r\n\t\t\r\n\t\t// Store date as hex string with hex prefix.\r\n\t\t_dateHex = \"0x\" + Long.toHexString(Calendar.getInstance().getTimeInMillis());\r\n \r\n \t\t_creator = creator;\r\n \t\t_name = name;\r\n \t\t_requiresText = requiresText;\r\n \t\t_requiresPhoto = requiresPhoto;\r\n \t\t_fulfilled = false;\r\n \r\n \t\t_photos = new ArrayList<PhotoRequirement>();\r\n \t}",
"@Override\n public void init() {\n this.log.pri1(LoggingInterface.INIT_START, \"\");\n // Any task initialization code goes here.\n this.log.pri1(LoggingInterface.INIT_END, \"\");\n }",
"public ScheduledTask (Task task, int startTime, int processor) {\n\t\tthis.task = task;\n\t\tthis.startTime = startTime;\n\t\tthis.processor = processor;\n\t}",
"public CustomEntitiesTaskParameters() {}",
"public DemographicInfoTaskChecker() {\n }",
"public AddCommand(Task task){\r\n this.task = task;\r\n }",
"public void setUp() {\n instance = new Task();\n }",
"public Job() {\n }",
"public Job() {\n }",
"public JBombardierAntTask(Task owner) {\r\n bindToOwner(owner);\r\n }",
"public Ant(Task owner) {\n bindToOwner(owner);\n }",
"protected Task(String s) {\n title = s;\n status = \"\\u2717\"; // A cross symbol indicating the task has not been done.\n }",
"public schedulerJob() {\n }",
"public Task(String taskName, String dueDate)\r\n {\r\n this.dueDate=dueDate;\r\n this.taskName=taskName;\r\n }",
"public Executable(String taskType) {\n this.taskType = taskType;\n// nodeNameToPortName = new HashMap<String, String>();\n// inputPortToFileMap = new HashMap<InputPort, File>();\n// outputPortToFileMap = new HashMap<OutputPort, File>();\n\n executableNodes = new ArrayList<ExecutableNode>();\n }",
"private CollectTaskPool() {\n\t\tsuper();\n\t}",
"public Task(String description) {\n this.description = description.trim();\n this.isDone = false;\n }",
"public Duke() {\n try {\n taskList = new TaskList(storage);\n } catch (DukeException err) {\n System.out.println(err.getMessage());\n } catch (FileNotFoundException err) {\n System.out.println(\"File not found in filepath provided\");\n }\n }",
"private <E, F extends ITaskObject> IStatusTask createInitTask(F taskObject) {\n ITaskObjectManager<E, F> taskObjectManager = getTaskManagerConfiguration().getTaskObjectManagerRegistry().getTaskObjectManager(taskObject);\n Class<F> taskObjectClass = taskObjectManager.getTaskObjectClass();\n\n E currentStatus = taskObjectManager.getInitialStatus(taskObject);\n\n // Create a first task, it does nothing\n return getTaskManagerConfiguration().getTaskFactory().newStatusTask(null, taskObjectClass, currentStatus);\n }",
"public Task(String description) {\n this.description = description;\n this.isDone = false;\n this.tag = \"\";\n this.isTagged = false;\n }",
"public SwitchYardServiceTaskHandler() {\n }",
"@Override\n public void taskStarting() {\n\n }",
"public Job() {\r\n\t\tSystem.out.println(\"Constructor\");\r\n\t}",
"protected void setupTask(Task task) {\n }",
"public Scheduler()\n {\n this.id = \"\"+ hashCode();\n register();\n }",
"ADTVTaskManager(ADTVService s){\n\t\tservice = s;\n\t\ttaskLists = new ArrayList[ADTVTask.PRIO_COUNT];\n\n\t\tfor(int i=0; i<ADTVTask.PRIO_COUNT; i++){\n\t\t\ttaskLists[i] = new ArrayList<ADTVTask>();\n\t\t}\n\n\t\tthreads = new MyThread[THREAD_COUNT];\n\t\tfor(int i=0; i<THREAD_COUNT; i++){\n\t\t\tthreads[i] = new MyThread();\n\t\t\tthreads[i].start();\n\t\t}\n\t}",
"public TaskOverviewController(){\n }",
"public ServiceTaskExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"TaskList() {\r\n tasks = new ArrayList<>();\r\n }",
"public TaskList() {\n recordedTask = new ArrayList<>();\n }",
"@Override\n public void init() throws IOException {\n ToDoData.getInstance().loadTasks();\n }",
"public TaskList(List<Task> tl) {\n tasks = tl;\n }"
]
| [
"0.85529464",
"0.83794016",
"0.81787634",
"0.814815",
"0.812773",
"0.81229526",
"0.8094325",
"0.80654794",
"0.77682906",
"0.76523745",
"0.76395136",
"0.7543128",
"0.75299907",
"0.75232095",
"0.74985904",
"0.7412321",
"0.74108756",
"0.74081904",
"0.7403649",
"0.73733735",
"0.73315775",
"0.73252815",
"0.73212236",
"0.73032075",
"0.72750276",
"0.72432214",
"0.72432214",
"0.72288126",
"0.7203228",
"0.7186237",
"0.717905",
"0.7172991",
"0.7138961",
"0.7134905",
"0.7117035",
"0.7096735",
"0.7096735",
"0.7087042",
"0.7082145",
"0.7082145",
"0.7082145",
"0.70810777",
"0.7058629",
"0.70558184",
"0.70558184",
"0.70558184",
"0.7052175",
"0.7046139",
"0.7037317",
"0.7020168",
"0.7014313",
"0.70043564",
"0.6996443",
"0.6995315",
"0.69856614",
"0.6981521",
"0.6952871",
"0.6946433",
"0.69385445",
"0.69385433",
"0.6933566",
"0.6933566",
"0.69010943",
"0.6883021",
"0.68630534",
"0.68623453",
"0.6841809",
"0.68359053",
"0.68334526",
"0.68255466",
"0.67867976",
"0.67773694",
"0.6776931",
"0.67657524",
"0.67640275",
"0.67639935",
"0.67601436",
"0.67601436",
"0.67446774",
"0.6733248",
"0.6723421",
"0.67204154",
"0.6716792",
"0.67124987",
"0.66983396",
"0.66940486",
"0.6690369",
"0.6674985",
"0.6666211",
"0.66578096",
"0.6656965",
"0.6646753",
"0.66294503",
"0.662329",
"0.66191393",
"0.66048586",
"0.6592773",
"0.65878296",
"0.6572675",
"0.65670085",
"0.65645045"
]
| 0.0 | -1 |
Get a geocoding service instance, pass latitude and longitude to it, format the returned address, and return the address to the UI thread. | @Override
protected RiderLocation doInBackground(RiderLocation... params) {
/*
* Get a new geocoding service instance, set for localized addresses.
* This example uses android.location.Geocoder, but other geocoders that
* conform to address standards can also be used.
*/
Geocoder geocoder = new Geocoder(this.localContext, Locale.getDefault());
// Get the current location from the input parameter list
RiderLocation location = params[0];
// Create a list to contain the result address
List<Address> addresses = null;
// Try to get an address for the current location. Catch IO or network
// problems.
try {
/*
* Call the synchronous getFromLocation() method with the latitude
* and longitude of the current location. Return at most 1 address.
*/
addresses = geocoder.getFromLocation(location.getLatitude(),
location.getLongitude(), 1);
// Catch network or other I/O problems.
} catch (IOException exception1) {
// Log an error and return an error message
Log.e("GetAddressTask ", exception1.getMessage());
// print the stack trace
exception1.printStackTrace();
return null;
// Catch incorrect latitude or longitude values
} catch (IllegalArgumentException exception2) {
exception2.printStackTrace();
//
return null;
}
// If the reverse geocode returned an address if (addresses != null &&
// addresses.size() > 0) {
// Get the first address
Address address = addresses.get(0);
// com.ssinfo.corider.app.models.RiderLocation locationAddress = new com.ssinfo.corider.app.models.RiderLocation();
// locationAddress.setLatitude(location.getLatitude());
//locationAddress.setLongitude(location.getLongitude());
location.setAddress(address.getMaxAddressLineIndex() > 0 ? address.getAddressLine(0):"");
location.setCity(address.getSubAdminArea());
location.setCountry(address.getCountryName());
return location;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@SuppressLint(\"NewApi\")\n\tpublic void getAddress() {\n\n\t\t// In Gingerbread and later, use Geocoder.isPresent() to see if a geocoder is available.\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD && !Geocoder.isPresent()) {\n\t\t\t// No geocoder is present. Issue an error message\n\t\t\tToast.makeText(this, R.string.no_geocoder_available, Toast.LENGTH_LONG).show();\n\t\t\treturn;\n\t\t}\n\n\t\tif (servicesConnected()) {\n\n\t\t\t// Get the current location\n\t\t\tLocation currentLocation = mLocationClient.getLastLocation();\n\n\t\t\t// Turn the indefinite activity indicator on\n\t\t\tmActivityIndicator.setVisibility(View.VISIBLE);\n\n\t\t\t// Start the background task\n\t\t\t(new RequestActivity.GetAddressTask(this)).execute(currentLocation);\n\t\t}\n\t}",
"@Override\n\t\tprotected String doInBackground(Location... params) {\n\t\t\t/*\n\t\t\t * Get a new geocoding service instance, set for localized addresses. This example uses\n\t\t\t * android.location.Geocoder, but other geocoders that conform to address standards\n\t\t\t * can also be used.\n\t\t\t */\n\t\t\tGeocoder geocoder = new Geocoder(localContext, Locale.getDefault());\n\n\t\t\t// Get the current location from the input parameter list\n\t\t\tLocation location = params[0];\n\n\t\t\t// Create a list to contain the result address\n\t\t\tList <Address> addresses = null;\n\n\t\t\t// Try to get an address for the current location. Catch IO or network problems.\n\t\t\ttry {\n\n\t\t\t\t/*\n\t\t\t\t * Call the synchronous getFromLocation() method with the latitude and\n\t\t\t\t * longitude of the current location. Return at most 1 address.\n\t\t\t\t */\n\t\t\t\taddresses = geocoder.getFromLocation(location.getLatitude(),\n\t\t\t\t\t\tlocation.getLongitude(), 1\n\t\t\t\t\t\t);\n\n\t\t\t\t// Catch network or other I/O problems.\n\t\t\t} catch (IOException exception1) {\n\n\t\t\t\t// Log an error and return an error message\n\t\t\t\tLog.e(LocationUtils.APPTAG, getString(R.string.IO_Exception_getFromLocation));\n\n\t\t\t\t// print the stack trace\n\t\t\t\texception1.printStackTrace();\n\n\t\t\t\t// Return an error message\n\t\t\t\treturn (getString(R.string.IO_Exception_getFromLocation));\n\n\t\t\t\t// Catch incorrect latitude or longitude values\n\t\t\t} catch (IllegalArgumentException exception2) {\n\n\t\t\t\t// Construct a message containing the invalid arguments\n\t\t\t\tString errorString = getString(\n\t\t\t\t\t\tR.string.illegal_argument_exception,\n\t\t\t\t\t\tlocation.getLatitude(),\n\t\t\t\t\t\tlocation.getLongitude()\n\t\t\t\t\t\t);\n\t\t\t\t// Log the error and print the stack trace\n\t\t\t\tLog.e(LocationUtils.APPTAG, errorString);\n\t\t\t\texception2.printStackTrace();\n\n\t\t\t\t//\n\t\t\t\treturn errorString;\n\t\t\t}\n\t\t\t// If the reverse geocode returned an address\n\t\t\tif (addresses != null && addresses.size() > 0) {\n\n\t\t\t\t// Get the first address\n\t\t\t\tAddress address = addresses.get(0);\n\n\t\t\t\t// Format the first line of address\n\t\t\t\tString addressText = getString(R.string.address_output_string,\n\n\t\t\t\t\t\t// If there's a street address, add it\n\t\t\t\t\t\taddress.getMaxAddressLineIndex() > 0 ?\n\t\t\t\t\t\t\t\taddress.getAddressLine(0) : \"\",\n\n\t\t\t\t\t\t\t\t// Locality is usually a city\n\t\t\t\t\t\t\t\taddress.getLocality(),\n\n\t\t\t\t\t\t\t\t// The country of the address\n\t\t\t\t\t\t\t\taddress.getCountryName()\n\t\t\t\t\t\t);\n\n\t\t\t\t// Return the text\n\t\t\t\treturn addressText;\n\n\t\t\t\t// If there aren't any addresses, post a message\n\t\t\t} else {\n\t\t\t\treturn getString(R.string.no_address_found);\n\t\t\t}\n\t\t}",
"@Override\n protected String doInBackground(Location... params) {\n\n // Set up geocoder\n Geocoder geocoder = new Geocoder(context, Locale.getDefault());\n\n // Get current location from parameter list\n Location location = params[0];\n\n // Create a list to contain the result address\n List<Address> addresses = null;\n try {\n Log.w(GetAddressTask.class.toString(), \"Started getting address from server\");\n // Get a list of street addresses using the geocoder.\n addresses = geocoder.getFromLocation(location.getLatitude(),\n location.getLongitude(), 1);\n Settings.getSettings().setPickUpCoordinates(location.getLatitude(), location.getLongitude());\n Log.w(GetAddressTask.class.toString(), \"Finished getting address from server\");\n } catch (IOException e1) {\n Log.e(\"GetAddressTask\", \"IO Exception in getFromLocation\");\n e1.printStackTrace();\n } catch (IllegalArgumentException e2) {\n // Make error string\n String errorString = \"Illegal arguments \" + Double.toString(location.getLatitude()) + \" , \" +\n Double.toString(location.getLongitude()) + \" passed to address services\";\n Log.e(\"GetAddressTask\" , errorString);\n e2.printStackTrace();\n return errorString;\n } catch (NullPointerException e3){\n // Waiting for connection\n }\n\n // Check if geocode returned an address\n if (addresses != null && addresses.size() > 0 && (location.getAccuracy() < 100)) {\n // Get first address from list\n Address address = addresses.get(0);\n // Format the address.\n String addressText = String.format(\"%s, %s, %s\", address.getMaxAddressLineIndex() > 0 ?\n address.getAddressLine(0) : \"\", address.getLocality(), address.getCountryName());\n return addressText;\n } else if (location.getAccuracy() >= 100) {\n return \"Your location is not accurate enough\\nTap on the arrow to try again.\";\n } else {\n return \"No address found\\nTru using a different option\";\n }\n }",
"private void searchAddress() {\n CommomUtils.hideKeyboard(MainActivity.this, etAddress);\n\n //Check if the address was informed\n if (etAddress.getText().toString().equals(\"\")) {\n Toast.makeText(MainActivity.this, R.string.activity_main_search_address_validation, Toast.LENGTH_SHORT).show();\n return;\n }\n\n lvResult.setVisibility(View.GONE);\n showProgress();\n\n //Call the api for searching the address\n GoogleMapsService service = ServiceGenerator.createService(GoogleMapsService.class, getString(R.string.google_maps_api_base_url));\n service.getGeocoding(etAddress.getText().toString(), true, new Callback<GeocodingResult>() {\n @Override\n public void success(GeocodingResult googleGeocodingResult, Response response) {\n hideProgress();\n geocodingResult = googleGeocodingResult;\n\n if (geocodingResult.getResults().size() > 0) {\n loadResult();\n } else {\n Toast.makeText(MainActivity.this, R.string.activity_main_search_no_results_found, Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n hideProgress();\n Toast.makeText(MainActivity.this, error.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }",
"public static Location getLatLngFromAddress(final String address, final String API_KEY) {\n\n final Location location = new Location(LocationManager.NETWORK_PROVIDER);\n location.setLatitude(0.0);\n location.setLongitude(0.0);\n\n\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n\n URL url = new URL(\"https://maps.googleapis.com/maps/api/geocode/json?\" + \"address=\" + address + \"&key=\" + API_KEY);\n HttpHandler handler = new HttpHandler();\n String jsonStr = handler.makeServiceCall(String.valueOf(url));\n\n if (jsonStr != null) {\n JSONObject jsonObject = new JSONObject(jsonStr);\n JSONArray jsonArray = jsonObject.getJSONArray(\"results\");\n\n if (jsonArray != null && jsonArray.length() > 0) {\n JSONObject geometryObject = jsonArray.getJSONObject(2).getJSONObject(\"geometry\");\n\n if (geometryObject != null) {\n JSONObject locationObject = geometryObject.getJSONObject(\"location\");\n double lat = locationObject.getDouble(\"lat\");\n double lng = locationObject.getDouble(\"lng\");\n\n location.setLatitude(lat);\n location.setLongitude(lng);\n\n //String lat_lng = \"Lat: \" + lat + \"\\n\" + \"Long: \" + lng;\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n thread.start();\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return location;\n }",
"@Override\n protected Void doInBackground(Void... voids) {\n\n\n Geocoder gc = new Geocoder(MainActivity.this);\n\n Log.d(\"florianBurel\", \"gc - isPresent : \" + (gc.isPresent() ? \"YES\" : \"NO\"));\n\n try {\n List<Address> addresses = gc.getFromLocation(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude(), 1);\n\n Log.d(\"florianBurel\", addresses.size() + \" addresses found\");\n\n //city.setName(addresses.get(0).getLocality());\n\n } catch (IOException e) {\n city.setName(\"Unknown Location\");\n }\n\n\n\n\n return null;\n }",
"public String GetAddressFromLatLng(Double latitude,Double longitude)\n {\n //Geocoder geocoder = null;\n List<Address> addresses;\n String address = \"\";\n //Geocoder geocoder = new Geocoder(HomeMapsActivity.this, Locale.getDefault());\n\n// Geocoder geocoder = CustomApplication.geoCoder;\n try {\n addresses = CustomApplication.geoCoder.getFromLocation(latitude, longitude, 1); // Here 1 represent max location result to returned, by documents it recommended 1 to 5\n address = addresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex()\n String city = addresses.get(0).getLocality();\n String state = addresses.get(0).getAdminArea();\n String country = addresses.get(0).getCountryName();\n String postalCode = addresses.get(0).getPostalCode();\n String knownName = addresses.get(0).getFeatureName(); // Only if available else return NULL\n } catch (IOException e) {\n e.printStackTrace();\n }\n Log.i(TAG, \"GetAddressFromLatLng: \"+address);\n\n return address;\n }",
"public interface GeocodeService {\n\n /**\n * Gets a list of possible {@link org.gbif.geocode.api.model.Location}s for coordinates.\n *\n * @return a list of Locations that fit the provided coordinates in no particular order\n */\n public List<Location> get(Double latitude, Double longitude, Double uncertaintyDegrees, Double uncertaintyMeters);\n\n /**\n * Gets a list of possible {@link org.gbif.geocode.api.model.Location}s for coordinates.\n *\n * @return a list of Locations that fit the provided coordinates in no particular order\n */\n public List<Location> get(Double latitude, Double longitude, Double uncertaintyDegrees, Double uncertaintyMeters, List<String> layers);\n\n /**\n * Gets a PNG bitmap suitable for using as a client-side cache/lookup table.\n */\n public byte[] bitmap();\n}",
"public static String getLocationFromAddress(Context context, String strAddress) {\n\n Geocoder coder = new Geocoder(context);\n List<Address> address;\n String data = \"\";\n\n try {\n // address = coder.getFromLocationName(strAddress, 5);\n address = coder.getFromLocationName(strAddress, 15);\n if (address == null || address.size() <= 0) {\n return data;\n }\n Address location = address.get(0);\n\n System.out.println(\"============\" + location.getLatitude() + \"===================\" + location.getLongitude() + \"====================\");\n System.out.println(\"=====Local=======\" + location.getSubLocality());\n System.out.println(\"=====City=======\" + location.getLocality());\n System.out.println(\"=====State=======\" + location.getAdminArea());\n System.out.println(\"=====PinCode=======\" + location.getPostalCode());\n System.out.println(\"=====Country=======\" + location.getCountryName());\n\n data = location.getLatitude() + \",,,\" + location.getLongitude() + \",,,\" + location.getSubLocality() + \",,,\" + location.getLocality() + \",,,\" + location.getAdminArea() + \",,,\" +\n location.getPostalCode() + \",,,\" + location.getCountryName();\n\n\n } catch (Exception ex) {\n\n ex.printStackTrace();\n return data;\n }\n return data;\n\n }",
"protected LatLng getLatLng(String address) {\n String add = Uri.encode(address);\n String uri = \"https://maps.googleapis.com/maps/api/geocode/json?address=\"\n + add + \"&\" + \"key=AIzaSyCjSClgIE-DZ4BULjj9L_qu2hQ9Vzi8osg\";\n\n HttpGet httpGet = new HttpGet(uri);\n\n HttpClient client = new DefaultHttpClient();\n HttpResponse response;\n StringBuilder stringBuilder = new StringBuilder();\n\n try {\n response = client.execute(httpGet);\n HttpEntity entity = response.getEntity();\n\n InputStream stream = entity.getContent();\n\n int byteData;\n while ((byteData = stream.read()) != -1) {\n stringBuilder.append((char) byteData);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n double lat = 0.0, lng = 0.0;\n\n JSONObject jsonObject;\n try {\n jsonObject = new JSONObject(stringBuilder.toString());\n lat = ((JSONArray) jsonObject.get(\"results\")).getJSONObject(0)\n .getJSONObject(\"geometry\").getJSONObject(\"location\")\n .getDouble(\"lat\");\n lng = ((JSONArray) jsonObject.get(\"results\")).getJSONObject(0)\n .getJSONObject(\"geometry\").getJSONObject(\"location\")\n .getDouble(\"lng\");\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n LatLng latLngAddress = new LatLng(lat,lng);\n currentLocation = latLngAddress;\n return latLngAddress;\n }",
"public void getAddress() {\n if (mLocation != null) {\n mBusinessAddress = AppUtil.getAddress(getContext(), mLocation);\n } else {\n mLocation = null;\n if (ActivityCompat.checkSelfPermission(getContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), android.Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n LocationManager locationManager = (LocationManager) getActivity().getSystemService(LOCATION_SERVICE);\n Criteria criteria = new Criteria();\n Location currLocation = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));\n if (currLocation != null) {\n mBusinessAddress = AppUtil.getAddress(getContext(), new LatLng(currLocation.getLatitude(), currLocation.getLongitude()));\n } else {\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 5000, 5, this);\n if (mCurrLocation != null) {\n mBusinessAddress = AppUtil.getAddress(getContext(), new LatLng(mCurrLocation.getLatitude(), mCurrLocation.getLongitude()));\n } else {\n // Default location in case location search doesn't work on first try\n mBusinessAddress = DiscoverConstants.DEFAULT_LOCATION;\n }\n }\n } else {\n mBusinessAddress = null;\n }\n }\n }",
"private void getAddress(Location mLocation) {\n\t\tif (Build.VERSION.SDK_INT >=\n\t\t\t\tBuild.VERSION_CODES.GINGERBREAD\n\t\t\t\t&&\n\t\t\t\tGeocoder.isPresent()) {\n\t\t\t/*\n\t\t\t * Reverse geocoding is long-running and synchronous.\n\t\t\t * Run it on a background thread.\n\t\t\t * Pass the current location to the background task.\n\t\t\t * When the task finishes,\n\t\t\t * onPostExecute() displays the address.\n\t\t\t */\n\t\t\t(new GetAddressTask(this)).execute(mLocation);\n\t\t}\n\t}",
"@Override\n\t\tprotected String doInBackground(String... params) {\n\t\t\tgetLatLongFromAddress(from);\n\t\t\tgetLatLongToAddress(to);\n\t\t\treturn null;\n\t\t}",
"@Override\n\t\tprotected Void doInBackground(Void... params) {\n\t\t\tfetchData();\n\t\t\t// getLatLongFromAddress(from);\n\t\t\treturn null;\n\t\t}",
"@Override\n\t\t\tpublic void run() {\n\n\t\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\t\tHttpClient client = new DefaultHttpClient();\n\t\t\t\tString url = \"https://maps.googleapis.com/maps/api/place/autocomplete/json?input=\"\n\t\t\t\t\t\t+ search\n\t\t\t\t\t\t+ \"&types=geocode&key=AIzaSyCUykPstomDep6-PWmMenJ2rUccTsjUGak\";\n\t\t\t\tHttpGet httpGet = new HttpGet(url);\n\t\t\t\ttry {\n\t\t\t\t\tHttpResponse response = client.execute(httpGet);\n\t\t\t\t\tStatusLine statusLine = response.getStatusLine();\n\t\t\t\t\tint statusCode = statusLine.getStatusCode();\n\t\t\t\t\tif (statusCode == 200) {\n\t\t\t\t\t\tHttpEntity entity = response.getEntity();\n\t\t\t\t\t\tInputStream content = entity.getContent();\n\t\t\t\t\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\t\t\t\t\tnew InputStreamReader(content));\n\t\t\t\t\t\tString line;\n\t\t\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\t\t\tbuilder.append(line);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t}\n\t\t\t\t} catch (ClientProtocolException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tdecodeString(builder.toString());\n\t\t\t}",
"private void getLocationFromAddress(Context context, String address) {\n Geocoder coder = new Geocoder(context);\n List<Address> coderResults;\n\n LatLng result = null;\n try {\n coderResults = coder.getFromLocationName(address, 2);\n if (coderResults == null) {\n Log.d(TAG, \"Failed to convert address to LatLng.\");\n Log.d(TAG, \"Address: \" + address);\n return;\n }\n\n Address location = coderResults.get(0);\n initialiseMap(\n new LatLng(location.getLatitude(), location.getLongitude()),\n address\n );\n } catch (IOException e) {\n //\n }\n }",
"@Override\n protected List<Address> doInBackground(String... locationName) {\n Geocoder geocoder = new Geocoder(BookingActivity.this);\n List<Address> addresses = null;\n\n try {\n // Getting a maximum of 3 Address that matches the input text\n addresses = geocoder.getFromLocationName(locationName[0], 3);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return addresses;\n }",
"@Override\n protected List<Address> doInBackground(String... locationName) {\n Geocoder geocoder = new Geocoder(getBaseContext());\n List<Address> addresses = null;\n \n try {\n // Getting a maximum of 3 Address that matches the input text\n addresses = geocoder.getFromLocationName(locationName[0], 3);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return addresses;\n }",
"private void getAddress(Location location){\n List<Address> addresses = null;\n try {\n addresses = geocoder.getFromLocation(location.getLatitude(),location.getLongitude(),1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n yourAddress.setText(addresses.get(0).getAddressLine(0) + \"\\n\" + addresses.get(0).getLocality() + \"\\n\" +addresses.get(0).getAdminArea() + \"\\n\" + addresses.get(0).getCountryName());\n// String postalCode = addresses.get(0).getPostalCode();\n// String knownName = addresses.get(0).getFeatureName();\n }",
"public static String getAddressFromLatLng(final double latitude, final double longitude, final String API_KEY) {\n\n final List<Double> list = new ArrayList<>();\n\n final String[] formatted_address = new String[1];\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n\n URL url = new URL(\"https://maps.googleapis.com/maps/api/geocode/json?\" + \"latlng=\" + latitude + \",\" + longitude + \"&key=\" + API_KEY);\n HttpHandler handler = new HttpHandler();\n String jsonStr = handler.makeServiceCall(String.valueOf(url));\n\n if (jsonStr != null) {\n JSONObject jsonObject = new JSONObject(jsonStr);\n\n JSONArray latlngArray = jsonObject.getJSONArray(\"results\");\n if (latlngArray != null && latlngArray.length() > 0) {\n\n JSONObject addressObj = latlngArray.getJSONObject(1);\n formatted_address[0] = addressObj.getString(\"formatted_address\");\n }\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n thread.start();\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n String address = \"\";\n if (formatted_address[0] != null) {\n address = formatted_address[0];\n }\n return address;\n }",
"private String getCompleteAddressString(double LATITUDE, double LONGITUDE) {\n String strAdd = \"\";\n Geocoder geocoder = new Geocoder(getActivity(), Locale.getDefault());\n try {\n List<Address> addresses = geocoder.getFromLocation(LATITUDE, LONGITUDE, 1);\n if (addresses != null) {\n Address returnedAddress = addresses.get(0);\n StringBuilder strReturnedAddress = new StringBuilder(\"\");\n\n for (int i = 0; i <= returnedAddress.getMaxAddressLineIndex(); i++) {\n strReturnedAddress.append(returnedAddress.getAddressLine(i)).append(\"\\n\");\n }\n strAdd = strReturnedAddress.toString();\n } else {\n Log.e(\"Current loction address\", \"No Address returned!\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n Log.e(\"Current loction address\", \"Canont get Address!\");\n }\n return strAdd;\n }",
"public static String getGeoLocation(String address) {\n URL url = null;\n HttpURLConnection conn = null;\n String textResult = \"\";\n try {\n url = new URL(GEO_URI + address + \"&key=\" + KEY);\n // open the connection\n conn = (HttpURLConnection) url.openConnection();\n // set the time out\n conn.setReadTimeout(10000);\n conn.setConnectTimeout(15000);\n // set the connection method to GET\n conn.setRequestMethod(\"GET\");\n //add http headers to set your response type to json\n conn.setRequestProperty(\"Content-Type\", \"application/json\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n //Read the response\n Scanner inStream = new Scanner(conn.getInputStream());\n //read the input stream and store it as string\n while (inStream.hasNextLine()) {\n textResult += inStream.nextLine();\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n conn.disconnect();\n }\n\n return textResult;\n }",
"@Override\n protected List<Address> doInBackground(String... locationName) {\n Geocoder geocoder = new Geocoder(getBaseContext());\n List<Address> addresses = null;\n\n try {\n // Getting a maximum of 3 Address that matches the input text\n addresses = geocoder.getFromLocationName(locationName[0], 3);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return addresses;\n }",
"@Override\n protected String doInBackground(Void... params) {\n if (HelperRete.isNetworkAvailable(mMainActivity)) {\n\n String queryFormattata = mQueryGrezza.replaceAll(\" \", \"+\" + \"\");\n mQueryTitolo = mQueryGrezza.substring(0,1).toUpperCase() + mQueryGrezza.substring(1);\n\n // creazione url\n String url = \"https://maps.google.com/maps/api/geocode/json\" +\n \"?address=\" + queryFormattata + \"&key=\" + mMainActivity.getString(R.string.google_geoc_key);\n\n JSONObject response = HelperRete.volleySyncRequest(mMainActivity, url);\n\n // ottieni le coordinate dell'indirizzo tramite la risposta di GoogleApi\n try {\n if (response != null) {\n Log.i(\"jsonresp\", response.toString());\n\n double lng = ((JSONArray) response.get(\"results\")).getJSONObject(0)\n .getJSONObject(\"geometry\").getJSONObject(\"location\")\n .getDouble(\"lng\");\n\n double lat = ((JSONArray) response.get(\"results\")).getJSONObject(0)\n .getJSONObject(\"geometry\").getJSONObject(\"location\")\n .getDouble(\"lat\");\n\n mCoordinateCercate = new LatLng(lat, lng);\n\n return RICERCA_COMPLETATA;\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n } else {\n return NO_INTERNET;\n }\n\n return null;\n }",
"@Override\n protected List<Address> doInBackground(String... locationName) {\n Geocoder geocoder = new Geocoder(getBaseContext());\n List<Address> addresses = null;\n\n try {\n // Getting a maximum of 10 Address that matches the input text\n addresses = geocoder.getFromLocationName(locationName[0], 10);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n return addresses;\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n\n Geocoder gcd = new Geocoder(context, Locale.getDefault());\n List<Address> addresses = null;\n try {\n addresses = gcd.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n if (addresses.size() > 0) {\n\n city = addresses.get(0).getLocality();\n local.setText(city);\n local.setSelection(local.getText().length());\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n }",
"@Override\n\t\t\tpublic void onGetGeoCodeResult(GeoCodeResult geocode) {\n\t\t\t\tif (geocode.error == SearchResult.ERRORNO.NO_ERROR) {\n\t\t\t\t\tString coordType = \"bd09ll\";\n\t\t\t\t\tString address = geocode.getAddress();\n\t\t\t\t\tLatLng latLng = geocode.getLocation();\n\t\t\t\t\tString geoCode_F = \"{\" +\n\t\t\t\t\t\t\t\"long:%f\" +\n\t\t\t\t\t\t\t\",lat:%f\" +\n\t\t\t\t\t\t\t\",addr:'%s'\" +\n\t\t\t\t\t\t\t\",type:'%s'\" +\n\t\t\t\t\t\t\t\"}\";\n\t\t\t\t\tString geoCode = String.format(Locale.ENGLISH, geoCode_F, latLng.longitude, latLng.latitude, address, coordType);\n\t\t\t\t\tJSUtil.execCallback(webview, callBackId, geoCode, JSUtil.OK, true, false);\n\t\t\t\t} else if (geocode.error == SearchResult.ERRORNO.NETWORK_ERROR) { // 网络错误\n\t\t\t\t\tString error = DOMException.toJSON(DOMException.CODE_NETWORK_ERROR, DOMException.toString(geocode.error.toString(),\"Maps百度地图\", DOMException.MSG_NETWORK_ERROR, BaiduErrorLink.BaiduLink));\n\t\t\t\t\tJSUtil.execCallback(webview, callBackId, error, JSUtil.ERROR, true, false);\n\t\t\t\t} else {\n\t\t\t\t\tString error = DOMException.toJSON(DOMException.CODE_BUSINESS_INTERNAL_ERROR, DOMException.toString(geocode.error.toString(),\"Maps百度地图\", geocode.error.toString(), BaiduErrorLink.BaiduLink));\n\t\t\t\t\tJSUtil.execCallback(webview, callBackId, error, JSUtil.ERROR, true, false);\n\t\t\t\t}\n\t\t\t}",
"private void reverseGeocode(final LatLng latLng, final AsyncCallback callback) {\n GWT.log(\"reverseGeocode\");\n geocoder.getLocations(latLng, new LocationCallback() {\n public void onFailure(int statusCode) {\n getMessagePanel().displayError(\"Failed to geocode position \" + latLng.toString()\n + \". Status: \" + statusCode + \" \"\n + StatusCodes.getName(statusCode));\n if (callback != null) {\n callback.onFailure(null);\n }\n //but we can still set the location\n }\n\n public void onSuccess(JsArray<Placemark> locations) {\n GWT.log(\"reverseGeocode onSuccess \" + locations.length());\n // for (int i = 0; i < locations.length(); ++i) {\n //just need to get the very first location!\n Placemark placemark = locations.get(0);\n Location location = new Location();\n location.setLatitude(placemark.getPoint().getLatitude());\n location.setLongitude(placemark.getPoint().getLongitude());\n GWT.log(\"address is \" + placemark.getStreet());\n location.setAddress1(placemark.getStreet());\n location.setCity(placemark.getCity());\n location.setState(placemark.getState());\n location.setZipcode(placemark.getPostalCode());\n location.setCountryCode(placemark.getCountry());\n location.setGeocoded(true);\n //does not fetch data, but will update the top of the app\n mywebapp.setCurrentLocation(location);\n if (callback != null) {\n callback.onSuccess(null);\n }\n //we just reverse geocoded, not that we clicked on map\n // }\n }\n });\n }",
"@Override\n protected void onHandleIntent(Intent intent) {\n Geocoder geocoder = new Geocoder(this, Locale.getDefault());\n if (intent == null) {\n return;\n }\n String errorMessage = \"\";\n\n // Get the location passed to this service through\n Location location = intent.getParcelableExtra(\n Constants.LOCATION_DATA_EXTRA);\n //Get the receiver passed to this service through extra\n receiver = intent.getParcelableExtra(Constants.RECEIVER);\n\n List<Address> addresses = null;\n\n try {\n //Returns one address corresponding to this geographical location\n addresses = geocoder.getFromLocation(\n location.getLatitude(),\n location.getLongitude(),\n 1);\n } catch (IOException ioException) {\n // Catch network or other I/O problems.\n errorMessage = getString(R.string.service_not_available);\n Log.e(TAG, errorMessage, ioException);\n } catch (IllegalArgumentException illegalArgumentException) {\n // Catch invalid latitude or longitude values.\n errorMessage = getString(R.string.invalid_lat_long_used);\n Log.e(TAG, errorMessage + \". \" +\n \"Latitude = \" + location.getLatitude() +\n \", Longitude = \" +\n location.getLongitude(), illegalArgumentException);\n }\n\n // Handle case where no address was found.\n if (addresses == null || addresses.size() == 0) {\n if (errorMessage.isEmpty()) {\n errorMessage = getString(R.string.no_address_found);\n Log.e(TAG, errorMessage);\n }\n deliverResultToReceiver(Constants.FAILURE_RESULT, errorMessage);\n } else {\n Address address = addresses.get(0);\n ArrayList<String> addressFragments = new ArrayList<String>();\n\n // Fetch just the zipcode\n addressFragments.add(address.getPostalCode());\n\n Log.i(TAG, getString(R.string.address_found));\n //Sends results back to LocationActivity\n deliverResultToReceiver(Constants.SUCCESS_RESULT,\n TextUtils.join(System.getProperty(\"line.separator\"),\n addressFragments));\n }\n }",
"public List<Latlng_data> getLocationFromString(String address)\n {\n\n List<Latlng_data> Ldata = new ArrayList<Latlng_data>();\n\n try\n {\n String URL = \"http://maps.google.com/maps/api/geocode/json?address=\" + URLEncoder.encode(address, \"UTF-8\") + \"&en&sensor=false\";\n\n JSONObject jsonObject = new JSONObject(new WebServiceHelper().performGetCall(URL));\n\n JSONArray results = jsonObject.getJSONArray(\"results\");\n\n Latlng_data l;\n for (int j = 0; j < results.length(); j++)\n {\n\n l = new Latlng_data();\n\n double lng = results.getJSONObject(j).getJSONObject(\"geometry\").getJSONObject(\"location\").getDouble(\"lng\");\n\n double lat = results.getJSONObject(j).getJSONObject(\"geometry\").getJSONObject(\"location\").getDouble(\"lat\");\n String addrsssssName = results.getJSONObject(j).getString(\"formatted_address\");\n l.setAddress(addrsssssName != null ? addrsssssName : \"\");\n\n l.setLat(lng);\n l.setLng(lat);\n\n Ldata.add(l);\n }\n\n }\n catch (Exception e)\n {\n return Ldata;\n }\n catch (Error e)\n {\n return Ldata;\n }\n\n return Ldata;\n }",
"private void GetLocation(final String str) {\n AlertUtils.showCustomProgressDialog(LocationSearchActivityNew.this);\n String selectedPlaceKey = DataToPref.getSharedPreferanceData(LocationSearchActivityNew.this, LaoxiConstant.SELECTED_PLACE_ID, LaoxiConstant.SELECTED_PLACE_ID_KEY);\n\n CommonImplementation.getInstance().doGetLocation(null, \"https://maps.googleapis.com/maps/api/place/details/json?placeid=\" + selectedPlaceKey + \"&sensor=false&key=\" + getString(R.string.browser_key) + \"&language=\" + Locale.getDefault().getCountry(), new OnTaskComplete() {\n @Override\n public void onSuccess(Response data, boolean success) {\n AlertUtils.dismissDialog();\n if (data.code() == 200) {\n\n String LAT = \"\";\n String Long = \"\";\n String Location = \"\";\n String City = \"\";\n String State = \"\";\n String postal_code = \"\";\n String country = \"\";\n\n try {\n\n String response = data.body().string();\n JSONObject object = new JSONObject(response);\n\n String status = object.getString(\"status\").toString();\n\n if (object.has(\"result\")) {\n //JSONArray results = object.getJSONArray(\"results\");\n int i = 0;\n //Log.i(\"i\", i + \",\" + results.length());\n JSONObject r = object.getJSONObject(\"result\");\n JSONArray addressComponentsArray = r.getJSONArray(\"address_components\");\n do {\n\n JSONObject addressComponents = addressComponentsArray.getJSONObject(i);\n JSONArray typesArray = addressComponents.getJSONArray(\"types\");\n String types = typesArray.getString(0);\n\n if (types.equalsIgnoreCase(\"sublocality\")) {\n Location = addressComponents.getString(\"short_name\");\n Log.i(\"Locality\", Location);\n\n } else if (types.equalsIgnoreCase(\"locality\")) {\n City = addressComponents.getString(\"long_name\");\n Log.i(\"City\", City);\n\n } else if (types.equalsIgnoreCase(\"administrative_area_level_1\")) {\n State = addressComponents.getString(\"long_name\");\n Log.i(\"State\", State);\n\n } else if (types.equalsIgnoreCase(\"postal_code\")) {\n postal_code = addressComponents.getString(\"long_name\");\n Log.i(\"postal_code\", postal_code);\n } else if (types.equalsIgnoreCase(\"country\")) {\n country = addressComponents.getString(\"long_name\");\n Log.i(\"country\", country);\n }\n\n i++;\n } while (i < addressComponentsArray.length());\n\n\n JSONObject geometry = r.getJSONObject(\"geometry\");\n JSONObject location = geometry.getJSONObject(\"location\");\n\n LAT = location.getString(\"lat\");\n Long = location.getString(\"lng\");\n\n\n /* Log.i(\"JSON Geo Locatoin =>\", currentLocation);\n return currentLocation;*/\n\n String Data = LAT + \",,,\" + Long + \",,,\" + Location + \",,,\" + City + \",,,\" + State + \",,,\" +\n postal_code + \",,,\" + country;\n\n\n Intent returnIntent = new Intent();\n returnIntent.putExtra(\"result\", Data + \",,,\" + str);\n setResult(Activity.RESULT_OK, returnIntent);\n finish();\n }\n } catch (IOException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n } else if (data.code() == 404) {\n\n }\n }\n\n @Override\n public void onFailure() {\n AlertUtils.dismissDialog();\n }\n });\n }",
"public String getAddressFromLatLng(double latitude, double longitude) {\n\n String strAdd = \"\";\n Geocoder geocoder = new Geocoder(this, Locale.getDefault());\n try {\n List<Address> addresses = geocoder.getFromLocation(latitude, longitude, 1);\n if (addresses != null) {\n Address returnedAddress = addresses.get(0);\n StringBuilder strReturnedAddress = new StringBuilder(\"\");\n\n for (int i = 0; i <= returnedAddress.getMaxAddressLineIndex(); i++) {\n strReturnedAddress.append(returnedAddress.getAddressLine(i)).append(\"\\n\");\n }\n strAdd = strReturnedAddress.toString();\n Log.d(\"Address Log\", strReturnedAddress.toString());\n } else {\n Log.d(\"Address Log\", \"No Address returned!\");\n }\n } catch (Exception e) {\n FirebaseCrashlytics.getInstance().recordException(e);\n e.printStackTrace();\n Log.d(\"Address Log\", \"Cannot get Address!\");\n }\n return strAdd;\n }",
"@Override\n protected String doInBackground(String... place) {\n String data = \"\";\n\n // Obtain browser key from https://code.google.com/apis/console\n String key = \"key=AIzaSyCFGvOeMTe7h9ukQYAzMIDBmDs52SnuPb4\";\n\n String input = \"\";\n\n try {\n input = \"input=\" + URLEncoder.encode(place[0], \"utf-8\");\n } catch (UnsupportedEncodingException e1) {\n e1.printStackTrace();\n }\n\n // place type to be searched\n String types = \"types=geocode\";\n\n // Sensor enabled\n String sensor = \"sensor=false\";\n\n // Building the parameters to the web service\n String parameters = input + \"&\" + types + \"&\" + sensor + \"&\" + key;\n\n // Output format\n String output = \"json\";\n\n // Building the url to the web service\n String url = \"https://maps.googleapis.com/maps/api/place/autocomplete/\" + output + \"?\" + parameters;\n\n try {\n // Fetching the data from we service\n data = downloadUrl(url);\n } catch (Exception e) {\n Log.d(\"Background Task\", e.toString());\n }\n return data;\n }",
"@Override\r\n\t\t\tprotected List<Address> doInBackground(String... locationName) {\n\t\t\t\tGeocoder geocoder = new Geocoder(getBaseContext());\r\n\t\t\t\tList<Address> addresses = null;\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// Getting a maximum of 3 Address that matches the input text\r\n\t\t\t\t\taddresses = geocoder.getFromLocationName(locationName[0], 3);\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\treturn addresses;\r\n\t\t\t}",
"@Override\n protected String doInBackground(String... place) {\n String data = \"\";\n\n // Obtain browser key from https://code.google.com/apis/console\n String key = \"key=AIzaSyDxqQEvtdEtl6dDIvG7vcm6QTO45Si0FZs\";\n\n String input=\"\";\n\n try {\n input = \"input=\" + URLEncoder.encode(place[0], \"utf-8\");\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n // place type to be searched\n String types = \"types=geocode\";\n\n // Sensor enabled\n String sensor = \"sensor=false\";\n\n // Building the parameters to the web service\n String parameters = input+\"&\"+types+\"&\"+sensor+\"&\"+key;\n\n // Output format\n String output = \"json\";\n\n // Building the url to the web service\n String url = \"https://maps.googleapis.com/maps/api/place/autocomplete/\"+output+\"?\"+parameters;\n\n try{\n // Fetching the data from we service\n data = downloadUrl(url);\n }catch(Exception e){\n Log.d(\"Background Task\",e.toString());\n }\n return data;\n }",
"public GeocodingGoogle() throws Exception{\n //lisdataFileRead();\n //findLocationNameFromApi();\n lisdataDBReadToGoogleAPIAccess();\n }",
"@Override\n protected String doInBackground(String... place) {\n String data = \"\";\n\n // Obtain browser key from https://code.google.com/apis/console\n String key = \"AIzaSyCEcipQ-PTVVp3zdCrjem5DCPJkVMPGBXY\";\n\n String input=\"\";\n\n try {\n input = \"input=\" + URLEncoder.encode(place[0], \"utf-8\");\n } catch (UnsupportedEncodingException e1) {\n e1.printStackTrace();\n }\n\n // place type to be searched\n String types = \"types=geocode\";\n\n // Sensor enabled\n String sensor = \"sensor=false\";\n\n // Building the parameters to the web service\n String parameters = input+\"&\"+types+\"&\"+sensor+\"&key=\"+key;\n\n // Output format\n String output = \"json\";\n\n // Building the url to the web service\n String url = \"https://maps.googleapis.com/maps/api/place/autocomplete/\"+output+\"?\"+parameters;\n\n try{\n // Fetching the data from we service\n data = downloadUrl(url);\n }catch(Exception e){\n Log.d(\"Background Task\", e.toString());\n }\n return data;\n }",
"@Override\n public void onSuccess(Location location) {\n\n if (location != null) {\n // Logic to handle location object\n\n Geocoder gcd = new Geocoder(MainActivity.this, Locale.getDefault());\n List<Address> addresses = null;\n try {\n addresses = gcd.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (addresses.size() > 0) {\n System.out.println(addresses.get(0).getLocality());\n sp.set(SPConstants.location,addresses.get(0).getLocality()+\", \"+addresses.get(0).getCountryName());\n }\n else {\n sp.set(SPConstants.location,\"\");\n\n // do your stuff\n }\n\n }\n }",
"@Override\r\n\t\t\tprotected void onPostExecute(String result) {\r\n\r\n\t\t\t\t// Instantiating ParserTask which parses the json data from\r\n\t\t\t\t// Geocoding webservice\r\n\t\t\t\t// in a non-ui thread\r\n\t\t\t\tParserTask1 parserTask = new ParserTask1();\r\n\r\n\t\t\t\t// Start parsing the places in JSON format\r\n\t\t\t\t// Invokes the \"doInBackground()\" method of the class ParseTask\r\n\t\t\t\tparserTask.execute(result);\r\n\t\t\t}",
"private void getAddress(double lat, double longit) {\n\t\tLocationAddress.getAddressFromLocation(lat, longit, \n cont, new GeocoderHandler());\n// Log.d(\"address\", addr);\n\t\t\n\t}",
"@Override\n public void onLocationChanged(Location location) {\n\n try {\n Geocoder geocoder = new Geocoder(getActivity(), Locale.getDefault());\n List<Address> addresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n address.setText(address.getText() + \"\\n\"+addresses.get(0).getAddressLine(0));\n }catch(Exception e)\n {\n\n }\n\n }",
"@Override\n protected MarkerItem doInBackground(MarkerItem... locationName) {\n Geocoder geocoder = new Geocoder(getBaseContext());\n List<Address> addresses = null;\n MarkerItem name = locationName[0];\n try {\n // Getting a maximum of 1 Address that matches the input text\n addresses = geocoder.getFromLocationName(name.getAddress(), 1);\n if (addresses != null && addresses.size() >= 1) {\n name.setPlaceItem(addresses.get(0));\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n return name;\n }",
"public String myLocation(double latitude, double longitude){\n String myCity = \"\";\n Geocoder geocoder = new Geocoder(getActivity(), Locale.getDefault());\n List<Address> addressList ;\n try{\n addressList = geocoder.getFromLocation(latitude,longitude,1);\n\n if(addressList.size()>0){\n myCity = addressList.get(0).getLocality();\n }\n }catch (Exception e){\n e.printStackTrace();\n }\n return myCity;\n }",
"public void onSuccess(GGeocodeResult result);",
"public interface GeocodingService {\n\n @GET(\"maps/api/geocode/json\")\n Observable<GoogleMapAddress> getTrends(@Query(\"address\") String address, @Query(\"key\") String key);\n\n}",
"@Override\n\t\tprotected void onPostExecute(String address) {\n\t\t\tmAddress.setText(address);\n\t\t}",
"@GetMapping(path = \"geo\", produces = MediaType.APPLICATION_JSON_VALUE)\n public Geo geoGetRequest(@RequestParam(\"addr\") String address) {\n return getGeoForAddress(address);\n }",
"private void startAddressLookupService() {\n Intent intent = new Intent(mContext, AddressLookupService.class);\n intent.putExtra(AddressLookupService.CURRENT_LOCATION, mLastLocation);\n mContext.startService(intent);\n }",
"public static SolrGeocoder make_geocode(URL url, ObjectMapper json) throws Exception\n {\n SolrResponse rep = json.readValue(url, SolrResponse.class);\n return rep.response;\n }",
"private Geo getGeoForAddress(String address) {\n Address addr = daDataStandartization.cleanAddress(address);\n Geo geo = new Geo();\n geo.setLatitude(addr.getGeoLat());\n geo.setLongitude(addr.getGeoLon());\n return geo;\n }",
"private String parseAddress(LatLng location)\n\t{\n\t\ttry\n\t\t{\n\t\t\tGeocoder geocoder = new Geocoder(getApplicationContext(), Locale.US);\n\t\t\tAddress address = geocoder.getFromLocation(location.latitude, location.longitude,1).get(0);\n\t\t\t\n\t\t\tString output = address.getAddressLine(0);\n\t\t\tfor(int i = 1; i < address.getMaxAddressLineIndex(); ++i)\n\t\t\t{\n\t\t\t\toutput += \"\\n\" + address.getAddressLine(i);\n\t\t\t}\n\t\t\treturn output;\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tLog.e(\"EventDetail\", \"Parse Address: \" + e.toString());\n\t\t\tToast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\treturn \"Address not found\\nLat: \" + location.latitude + \", Log: \" + location.longitude;\n\t\t}\n\t}",
"public static List<Address> getAddressesFromGeoCoder(Context context,double latitude,double longitude,int addressesToReturn) {\n List<Address> listOfAddresses = null;\n Geocoder gc=new Geocoder(context);\n try {\n listOfAddresses = gc.getFromLocation(latitude, longitude, addressesToReturn);\n\n //This is a test of more than one zip code - will give us 10023 & 10024\n //listOfAddresses = gc.getFromLocation(40.782891, -73.983085, addressesToReturn);\n } catch (IOException e) {\n Log.e(new Object() { }.getClass().getEnclosingClass()+\">\",e.getMessage());\n }\n catch (IllegalArgumentException e) {\n Log.e(new Object() { }.getClass().getEnclosingClass()+\">\",e.getMessage());\n }\n //Could be empty or null - we don't want to return null\n if (listOfAddresses==null){\n listOfAddresses=new ArrayList<>();\n }\n return listOfAddresses;\n }",
"public void onSearch(View view){\n List<Address> addressList = null;\n EditText location_tf = (EditText) findViewById(R.id.TFaddress);\n String location = location_tf.getText().toString();\n if(location!=null || location.equals(\"\")){\n Geocoder geocoder = new Geocoder(this);\n try {\n addressList = geocoder.getFromLocationName(location, 1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n Address address = addressList.get(0);\n LatLng latLng = new LatLng(address.getLatitude(), address.getLongitude());\n marker = mMap.addMarker(new MarkerOptions().position(latLng).title(\"Marker\"));\n mMap.addMarker(new MarkerOptions().position(latLng).title(\"Marker\"));\n mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng,17));\n\n }\n\n }",
"public String geocode(ArrayList<String> places, boolean minified) throws Exception {\n\n \t\tString apiUrl = \"api/geocode.json?\";\n\n String minifiedString = minified == true ? \"true\" : \"false\";\n\n \t\tif (places != null) {\n \t\t\tString placeList = \"\";\n for (String place:places) {\n \tplaceList = placeList + \"'\" + place + \"',\";\n }\n placeList = \"[\" + placeList + \"]\";\n\n String data = \"{'places':\" + placeList + \"}\";\n apiUrl = apiUrl + \"data=\" + data;\n\n apiUrl = apiUrl + \"&minified=\" + minifiedString;\n \n String url = this.baseUrl + apiUrl;\n\n URL urlObj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) urlObj.openConnection();\n\n con.setRequestMethod(\"GET\");\n\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n int responseCode = con.getResponseCode();\n String response = \"\";\n\t\t\tif (responseCode == 200) {\n response = buildReponse(con);\n\t\t\t} else {\n\t\t response = \"{'error': 'Something went wrong, looks like the server is down.'}\";\n\t\t\t}\n\n\t\t\treturn response;\n \t\t} else {\n \t\t\treturn \"{'error': 'Please specify places.'}\";\n \t\t}\n \t}",
"java.lang.String getHotelAddress();",
"@Test\n void getGeoCodingInfoFromAddress() throws URISyntaxException, IOException {\n System.out.println(MapUtils.getGeoCodingInfoFromAddress(\"350 W 88th st, New York, NY\"));\n }",
"@Override\n\t\tprotected void onPostExecute(String address) {\n\n\t\t\t// Turn off the progress bar\n\t\t\tmActivityIndicator.setVisibility(View.GONE);\n\n\t\t\t// Set the address in the UI\n\t\t\tmAddress.setText(address);\n\t\t}",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n\n Intent intent = getIntent();\n String postCode = intent.getStringExtra(\"Postcode\");\n\n Geocoder geocoder1 = new Geocoder(this);\n // try {\n\n // List<Address> addresses1 = geocoder1.getFromLocationName(postCode, 1);\n // if (addresses1 != null && !addresses1.isEmpty()) {\n // Address address1 = addresses1.get(0);\n // Use the address as needed\n // latitude_start = address1.getLatitude();\n // longitude_start = address1.getLongitude();\n // String message = \"Latitude: \"+address1.getLatitude()+\", Longitude: \"+address1.getLongitude();\n // Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n//\n\n // } else {\n // Display appropriate message when Geocoder services are not available\n // Toast.makeText(this, \"Unable to geocode zipcode\", Toast.LENGTH_LONG).show();\n // latitude_start = 0;\n // longitude_start = 0;\n // }\n\n // LatLng latLng = new LatLng(latitude_start, longitude_start);\n\n // } catch (IOException e) {\n // // handle exception\n // }\n\n //mMap.addMarker(new MarkerOptions().position(new LatLng(currentLatitude, currentLongitude)).title(\"Current Location\"));\n // MarkerOptions options = new MarkerOptions()\n // .position(latLng)\n // .title(\"I am here!\");\n // mMap.addMarker(options);\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n\n // Moving Camera to a Location with animation\n\n // CameraPosition cameraPosition = new CameraPosition.Builder()\n // .target(latLng).zoom(12).build();\n\n // mMap.animateCamera(CameraUpdateFactory\n // .newCameraPosition(cameraPosition));\n\n\n }",
"@Override\n public void getLocation(String name) {\n mCityName = name;\n Geocoder geocoder = new Geocoder(this, Locale.getDefault());\n try {\n\n List<Address> addresses = geocoder.getFromLocationName(name, 1);\n Address obj = addresses.get(0);\n\n mLat = obj.getLatitude();\n mLng = obj.getLongitude();\n Log.d(\"LOCATION_OF_CITY\", \"\\n Address and data: \"\n + \"\\n Name: \" + name\n + \"\\n Latitude: \" + mLat\n + \"\\n Longitude: \" + mLng);\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n\n// SharedPreferences.Editor editor = mSharedPreferences.edit();\n// editor.putString(PREFERENCES_CITYNAME, name);\n// editor.putString(PREFERENCES_LONGITUDE, Double.toString(mLng));\n// editor.putString(PREFERENCES_LATITUDE, Double.toString(mLat));\n// editor.apply();\n\n //see city location on google map\n seeLocation();\n\n }",
"public void getLocation() {\n if (ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this, new String[]\n {Manifest.permission.ACCESS_FINE_LOCATION},\n REQUEST_LOCATION_PERMISSION);\n } else {\n mFusedLocationClient.getLastLocation().addOnSuccessListener(\n location -> {\n if (location != null) {\n // Start the reverse geocode AsyncTask\n new FetchAddressTask(DetailsTextActivity.this,\n DetailsTextActivity.this).execute(location);\n txtLocation.setText(getString(R.string.loading));\n Log.d(\"myTag\", \"have location\");\n } else {\n txtLocation.setText(R.string.no_location);\n }\n }\n );\n }\n }",
"@Override\n public void onClick(View v) {\n EditText etLocation = (EditText) findViewById(R.id.et_location);\n // Getting user input location\n String location = etLocation.getText().toString();\n if (location != null && !location.equals(\"\")) {\n new GeocoderTask().execute(location);\n }\n }",
"public void getCurrentAddress() {\n if (mGoogleApiClient.isConnected() && mLastLocation != null) {\n startIntentService();\n }\n // If GoogleApiClient isn't connected, we process the user's request by setting\n // mAddressRequested to true. Later, when GoogleApiClient connects, we launch the service to\n // fetch the address. As far as the user is concerned, pressing the Fetch Address button\n // immediately kicks off the process of getting the address.\n mAddressRequested = true;\n updateUIWidgets();\n }",
"@Override\n public void onLocationChanged(Location location) {\n latitude=String.valueOf(location.getLatitude());\n longitude= String.valueOf(location.getLongitude());\n\n System.out.println(\"asdfgh==\"+latitude);\n\n\n /* Geocoder geocoder;\n List<Address> addresses;\n geocoder = new Geocoder(SafetyActivity.this, Locale.getDefault());\n\n try {\n addresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n String address = addresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex()\n String city = addresses.get(0).getLocality();\n String state = addresses.get(0).getAdminArea();\n String country = addresses.get(0).getCountryName();\n String postalCode = addresses.get(0).getPostalCode();\n String knownName = addresses.get(0).getFeatureName();\n\n System.out.println(\"addresses==\"+address);\n // Here 1 represent max location result to returned, by documents it recommended 1 to 5\n } catch (IOException e) {\n e.printStackTrace();\n }*/\n }",
"String getAddress();",
"String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"public void makeLatLong(String address){\n try {\n JSONObject jsonObject = new JSONObject(address);\n JSONObject result = jsonObject.getJSONObject(\"result\");\n JSONArray addressMatches = result.getJSONArray(\"addressMatches\");\n JSONObject firstResult = addressMatches.getJSONObject(0);\n JSONObject coordinates = firstResult.getJSONObject(\"coordinates\");\n latitude = coordinates.getDouble(\"y\");\n longitude = coordinates.getDouble(\"x\");\n\n Log.i(\"CoY \", Double.toString(latitude));\n Log.i(\"CoX\", Double.toString(longitude));\n } catch (JSONException e) {\n Log.i(\"Error\", e.getMessage());\n e.printStackTrace();\n latitude = 39.7392;\n longitude = -104.9903;\n mainActivity.apiFailed(alarmName);\n }\n }",
"public Address validAddress(TextInputLayout tiAddress, EditText etAddress) {\n String addressString = etAddress.getText().toString().trim();\n Address address = null;\n\n if (addressString.length() == 0)\n tiAddress.setError(c.getString(R.string.required));\n else if (addressString.length() < ADDRESS_MIN_SIZE)\n tiAddress.setError(c.getString(R.string.minLength, Integer.toString(ADDRESS_MIN_SIZE)));\n else if (addressString.length() > ADDRESS_MAX_SIZE)\n tiAddress.setError(c.getString(R.string.maxLength, Integer.toString(ADDRESS_MAX_SIZE)));\n else {\n Geocoder geocoder = new Geocoder(c, Locale.getDefault());\n addressString += \", BC\";\n try {\n List<Address> addressList = geocoder.getFromLocationName(addressString, 1);\n if (addressList == null || addressList.size() == 0)\n tiAddress.setError(c.getString(R.string.invalid));\n else {\n tiAddress.setError(null);\n address = addressList.get(0);\n }\n } catch (Exception ex) {\n Log.d(TAG, ex.getMessage());\n tiAddress.setError(c.getString(R.string.checkInternet));\n }\n }\n\n return address;\n }",
"public String getCoordinates(String address){\n\t\ttry\n {\n String thisLine;\n String address1 = address;\n address1 = address1.replace(' ', '+');\n address1 = address1.replace(',', '+');\n System.out.println(\"address: \"+address1);\n URL u = new URL(\"http://maps.google.com/maps/geo?q=\\'\" + address1 + \"\\'&output=xml&key=AIzaSyDA6y535k8_IQu-3XLpVn865SiEkBLSQ74\");\n \n BufferedReader theHTML = new BufferedReader(new InputStreamReader(u.openStream()));\n \n FileWriter fstream = new FileWriter(\"url.xml\");\n BufferedWriter out = new BufferedWriter(fstream);\n while ((thisLine = theHTML.readLine()) != null)\n out.write(thisLine);\n out.close();\n File file = new File(\"url.xml\");\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db = dbf.newDocumentBuilder();\n Document doc = db.parse(file);\n doc.getDocumentElement().normalize();\n NodeList nl = doc.getElementsByTagName(\"code\");\n Element n = (Element)nl.item(0);\n String st = n.getFirstChild().getNodeValue();\n \n if (st.equals(\"200\"))\n {\n NodeList n2 = doc.getElementsByTagName(\"coordinates\");\n Element nn = (Element)n2.item(0);\n String st1 = nn.getFirstChild().getNodeValue();\n \n return st1;\n }\n else\n {\n \treturn null;\n }\n }\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Exception Occured\");\n return null;\n }\n\t}",
"@Override\r\n public void onMapClick(LatLng latLng) {\n geocoder1 = new Geocoder(getApplicationContext(), Locale.getDefault());\r\n String State = null;\r\n String City = null;\r\n String Country = null;\r\n try {\r\n\r\n List<Address> Addresses = geocoder1.getFromLocation(latLng.latitude, latLng.longitude, 1);\r\n if (Addresses != null && Addresses.size() > 0) {\r\n\r\n City = Addresses.get(0).getAddressLine(0);\r\n State = Addresses.get(0).getAddressLine(1);\r\n Country = Addresses.get(0).getAddressLine(2);\r\n\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n // Clears the previously touched position\r\n googleMap.clear();\r\n\r\n TextView tvLocation = (TextView) findViewById(R.id.tv_location);\r\n\r\n\r\n // Animating to the touched position\r\n googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 16.0f));\r\n\r\n // Placing a marker on the touched position\r\n googleMap.addMarker(new MarkerOptions().position(latLng).title(City + \",\" + State + \",\" + Country));\r\n\r\n tvLocation.setText(\"Latitude:\" + latitude + \", Longitude:\" + longitude + \"\\n\" + City + \",\" + State + \",\\n\" + Country);\r\n\r\n }",
"@PostMapping(path = \"geo\", produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.TEXT_PLAIN_VALUE)\n public Geo geoPostRequest(@RequestBody String address) {\n return getGeoForAddress(address);\n }",
"@Override\n\t\t\tpublic void onGetGeoCodeResult(GeoCodeResult arg0) {\n\t\t\t\tif(arg0==null||arg0.error!=SearchResult.ERRORNO.NO_ERROR||arg0.getLocation().latitude==0||arg0.getLocation().longitude==0)\n\t\t\t\t{\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\tToastUtil.shortToast(getApplicationContext(), \"百度地图出现错误了,请重写输入地址\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlatitude=arg0.getLocation().latitude;\n\t\t\t\tlongitude=arg0.getLocation().longitude;\n\t\t\t\tLog.e(\"llll2\", latitude+\"\");\n\t\t\t\tLog.e(\"11112\", longitude+\"\");\n\t\t\t\tsendEmptyUiMessage(MsgConstants.MSG_01);\n\t\t\t\t\n\t\t\t}",
"public void getLocation() {\n\t\tThread locationThread = new Thread(new Runnable(){\n\t\t\tpublic void run(){\n\t\t\t\ttry{\n\t\t\t\t\tURL url = new URL(\"http://ip-api.com/json\");\n\t\t\t\t\tURLConnection connection = url.openConnection();\n\t\t\t\t\n\t\t\t\t\tString line;\n\t\t\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n\t\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\t\tbuilder.append(line);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tJSONObject json = new JSONObject(builder.toString());\n\t\t\t\t\tString status = json.getString(\"status\");\n\t\t\t\t\tSystem.out.println(\"Location retrieval was: \" + status);\n\t\t\t\t\tif(status.equals(\"success\")){\n\t\t\t\t\t\tcity = json.getString(\"city\");\n\t\t\t\t\t\tzipCode = json.getString(\"zip\");\n\t\t\t\t\t\tcountryCode = json.getString(\"countryCode\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.println(\"Failed to retreive location\");\n\t\t\t\t\t}\n\t\t\t\t}catch(IOException e){\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tif(!locationThread.isAlive()){\n\t\t\tlocationThread.start();\n\t\t}else{\n\t\t\ttry {\n\t\t\t\tlocationThread.join();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tlocationThread.start();\n\t\t}\n\t}",
"@Test\n public void iPAddressGeolocateStreetAddressTest() throws Exception {\n String value = null;\n GeolocateStreetAddressResponse response = api.iPAddressGeolocateStreetAddress(value);\n\n // TODO: test validations\n }",
"public String getAddress();",
"@Override\n\t\t\tpublic void onGetReverseGeoCodeResult(ReverseGeoCodeResult reverseGeoCodeResult) {\n\t\t\t\tif (reverseGeoCodeResult.error == SearchResult.ERRORNO.NO_ERROR) {\n\t\t\t\t\tString coordType = \"bd09ll\";\n\t\t\t\t\tString address = reverseGeoCodeResult.getAddress();\n\t\t\t\t\tLatLng latLng = reverseGeoCodeResult.getLocation();\n\t\t\t\t\tString geoCode_F = \"{\" +\n\t\t\t\t\t\t\t\"long:%f\" +\n\t\t\t\t\t\t\t\",lat:%f\" +\n\t\t\t\t\t\t\t\",addr:'%s'\" +\n\t\t\t\t\t\t\t\",type:'%s'\" +\n\t\t\t\t\t\t\t\"}\";\n\t\t\t\t\tString geoCode = String.format(Locale.ENGLISH, geoCode_F, latLng.longitude, latLng.latitude, address, coordType);\n\t\t\t\t\tJSUtil.execCallback(webview, callBackId, geoCode, JSUtil.OK, true, false);\n\t\t\t\t} else if (reverseGeoCodeResult.error == SearchResult.ERRORNO.NETWORK_ERROR) { // 网络错误\n\t\t\t\t\tString error = DOMException.toJSON(DOMException.CODE_NETWORK_ERROR, DOMException.toString(reverseGeoCodeResult.error.toString(),\"Maps百度地图\", DOMException.MSG_NETWORK_ERROR, BaiduErrorLink.BaiduLink));\n\t\t\t\t\tJSUtil.execCallback(webview, callBackId, error, JSUtil.ERROR, true, false);\n\t\t\t\t} else {\n\t\t\t\t\tString error = DOMException.toJSON(DOMException.CODE_BUSINESS_INTERNAL_ERROR, DOMException.toString(reverseGeoCodeResult.error.toString(),\"Maps百度地图\", reverseGeoCodeResult.error.toString(), BaiduErrorLink.BaiduLink));\n\t\t\t\t\tJSUtil.execCallback(webview, callBackId, error, JSUtil.ERROR, true, false);\n\t\t\t\t}\n\t\t\t}",
"private static Address getOfficialByAddress(String address) throws Exception {\n\t\tString USER_AGENT = \"Mozilla/5.0\";\n\n\t\tString name = \"\", country = \"US\", zip = \"\", city = \"\", state = \"\", line1 = \"\", line2 = \"\";\n\t\tAddress to = null;\n\t\t// Replaces all strings with '%20' for URL completion\n\t\taddress = address.replace(\" \", \"%20\");\n\t\tString urlString = \"https://www.googleapis.com/civicinfo/v2/representatives?key=AIzaSyAEU9J6KzUL_gXPGi-4S6XekJuEC0JRWjA&address=\" + address;\n\t\tURL url = new URL(urlString);\n\t\tHttpURLConnection con = (HttpURLConnection) url.openConnection();\n\t\t// By default it is GET request\n\t\tcon.setRequestMethod(\"GET\");\n\t\t//add request header\n\t\tcon.setRequestProperty(\"User-Agent\", USER_AGENT);\n\t\t\n\t\t// Reading response from input Stream\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\t \n\t\tString output;\n\t\tStringBuffer response = new StringBuffer();\n\t\twhile ((output = in.readLine()) != null) {\n\t\t\tresponse.append(output);\t\n\t\t}\n\t\tin.close();\n\t\t\n\t\t// Constructs JSONOBject to parse the response\n\t\tJSONObject object = new JSONObject(response.toString());\n\t\tJSONArray addresses = object.getJSONArray(\"officials\");\n\t\t\n\t\t// Takes array of individuals response and selects last index of it by default (may be optimized for more specific selections)\n\t\tJSONObject person = addresses.getJSONObject(addresses.length()-1);\n\t\tJSONArray fields = person.getJSONArray(\"address\");\n\t\tJSONObject addressTo = fields.getJSONObject(0);\n\t\t\t\t\n\t\tif(person.has(\"name\"))\n\t\t\tname = person.getString(\"name\");\n\t\t\n\t\tif(addressTo.has(\"zip\"))\n\t\t\tzip = addressTo.getString(\"zip\");\n\t\t\n\t\tif(addressTo.has(\"city\"))\n\t\t\tcity = addressTo.getString(\"city\");\n\t\t\n\t\tif(addressTo.has(\"state\"))\n\t\t\tstate = addressTo.getString(\"state\");\n\t\t\n\t\tif(addressTo.has(\"line2\"))\n\t\t\tline2 = addressTo.getString(\"line2\");\n\t\t\n\t\tif(addressTo.has(\"line1\"))\n\t\t\t line1 = addressTo.getString(\"line1\");\n\t\t\n\t\tto = new Address(name, country, zip, city, state, line2, line1);\n\t\t\n\n\t\treturn to;\n\t\t\n\t \n\t }",
"public List<Address> getGeocoderAddress(Context context, double latitude, double longitude, int maxAddresses ) {\n if (location != null) {\n\n Geocoder geocoder = new Geocoder(context, Locale.ENGLISH);\n\n try {\n /**\n * Geocoder.getFromLocation - Returns an array of Addresses\n * that are known to describe the area immediately surrounding the given latitude and longitude.\n */\n List<Address> addresses = geocoder.getFromLocation(latitude, longitude, maxAddresses);\n\n return addresses;\n } catch (IOException e) {\n //e.printStackTrace();\n }\n }\n\n return null;\n }",
"@Override\n public void onLocationChanged(Location location) {\n Geocoder geocoder = new Geocoder(getApplicationContext(),Locale.getDefault());\n try {\n List<Address> direc = geocoder.getFromLocation(location.getLatitude(),location.getLongitude(),1);\n Coordenadas.setText(direc.get(0).getAddressLine(0) );\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n }",
"public LatLng getLatLngFromAddress(String address) {\n Geocoder geocoder = new Geocoder(Navigate.this);\n List<Address> addressList;\n\n try {\n addressList = geocoder.getFromLocationName(address, 1);\n if (addressList != null) {\n Address singleAddress = addressList.get(0);\n LatLng latLng = new LatLng(singleAddress.getLatitude(), singleAddress.getLongitude());\n return latLng;\n } else {\n return null;\n }\n\n } catch (Exception e) {\n FirebaseCrashlytics.getInstance().recordException(e);\n e.printStackTrace();\n return null;\n }\n }",
"protected void streetLoc(LatLng latLng) {\n if (latLng == null) {\n return;\n }\n TencentSearch tencentSearch = new TencentSearch(this);\n //还可以传入其他坐标系的坐标,不过需要用coord_type()指明所用类型\n //这里设置返回周边poi列表,可以在一定程度上满足用户获取指定坐标周边poi的需求\n Geo2AddressParam geo2AddressParam = new Geo2AddressParam(latLng).getPoi(true)\n .setPoiOptions(new Geo2AddressParam.PoiOptions()\n// .setRadius(1000).setCategorys(\"面包\")\n .setPolicy(Geo2AddressParam.PoiOptions.POLICY_O2O));\n tencentSearch.geo2address(geo2AddressParam, new HttpResponseListener<BaseObject>() {\n\n @Override\n public void onSuccess(int arg0, BaseObject arg1) {\n if (arg1 == null) {\n return;\n }\n Geo2AddressResultObject obj = (Geo2AddressResultObject)arg1;\n StringBuilder sb = new StringBuilder();\n sb.append(\"逆地址解析\");\n sb.append(\"\\n地址:\" + obj.result.address);\n sb.append(\"\\npois:\"+obj.result.address_component.province+obj.result.address_component.city+obj.result.address_component.district);\n// provinceMap.put()\n province1 = provinceMap.get(obj.result.address_component.province+obj.result.address_component.city+obj.result.address_component.district);\n if(province1 == null) {\n provinceMap.put(obj.result.address_component.province+obj.result.address_component.city+obj.result.address_component.district,obj.result.address_component.province+obj.result.address_component.city+obj.result.address_component.district);\n getStreet(obj.result.address_component.province, obj.result.address_component.city, obj.result.address_component.district);\n }\n\n// for (Poi poi : obj.result.pois) {\n// sb.append(\"\\n\\t\" + poi.title);\n// tencentMap.addMarker(new MarkerOptions()\n// .position(poi.latLng) //标注的位置\n// .title(poi.title) //标注的InfoWindow的标题\n// .snippet(poi.address) //标注的InfoWindow的内容\n// );\n// }\n// Log.e(\"test\", sb.toString());\n }\n\n @Override\n public void onFailure(int arg0, String arg1, Throwable arg2) {\n Log.e(\"test\", \"error code:\" + arg0 + \", msg:\" + arg1);\n }\n });\n }",
"public Address getAddress(double latitude, double longitude)\n {\n Geocoder geocoder;\n List<Address> addresses;\n geocoder = new Geocoder(context, Locale.getDefault());\n\n try {\n addresses = geocoder.getFromLocation(latitude,longitude, 1); // Here 1 represent max location result to returned, by documents it recommended 1 to 5\n return addresses.get(0);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n\n }",
"public CompletableFuture<String[]> getLatLongPositions(String address) {\n return CompletableFuture.supplyAsync(() -> {\n String pos[] = new String[2];\n try {\n int responseCode = 0;\n String api = \"http://maps.googleapis.com/maps/api/geocode/xml?address=\" + URLEncoder.encode(address, \"UTF-8\") + \"&sensor=true\";\n URL url = new URL(api);\n HttpURLConnection httpConnection = (HttpURLConnection) url.openConnection();\n httpConnection.connect();\n responseCode = httpConnection.getResponseCode();\n if (responseCode == 200) {\n DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\n ;\n Document document = builder.parse(httpConnection.getInputStream());\n XPathFactory xPathfactory = XPathFactory.newInstance();\n XPath xpath = xPathfactory.newXPath();\n XPathExpression expr = xpath.compile(\"/GeocodeResponse/status\");\n String status = (String) expr.evaluate(document, XPathConstants.STRING);\n if (status.equals(\"OK\")) {\n expr = xpath.compile(\"//geometry/location/lat\");\n String latitude = (String) expr.evaluate(document, XPathConstants.STRING);\n expr = xpath.compile(\"//geometry/location/lng\");\n String longitude = (String) expr.evaluate(document, XPathConstants.STRING);\n pos[0]=latitude;\n pos[1]=longitude;\n }\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return pos;\n });\n }",
"public String getAddress() {return address;}",
"protected void startFetchAddressIS() {\n Intent intent = new Intent(this, FetchAddressIntentService.class);\n addressResultReceiver = new AddressResultReceiver(new Handler());\n intent.putExtra(Constants.RECEIVER, addressResultReceiver);\n intent.putExtra(Constants.LOCATION_DATA_EXTRA, mCurrentLocation);\n startService(intent);\n }",
"public void search(String location){\n List<Address> addressList = null;\n if(location != null || !location.equals(\"\")){\n Geocoder geocoder = new Geocoder(this);\n try{\n addressList = geocoder.getFromLocationName(location,1);\n }\n catch (IOException e){}\n Address address =addressList.get(0);\n LatLng latlng = new LatLng(address.getLatitude(), address.getLongitude());\n mMap.addMarker(new MarkerOptions().position(latlng).title(location));\n mMap.animateCamera(CameraUpdateFactory.newLatLng(latlng));\n Toast.makeText(getApplication(), location, Toast.LENGTH_LONG).show();\n }\n }",
"private void onSearchClick(Location loc) {\n\r\n\r\n Log.d(TAG, \"IN ONSEARCHCLICK\");\r\n\r\n String url;\r\n\r\n\r\n url = \"https://geocode-maps.yandex.ru/a1.x/?format=json&geocode=\" + loc.getLongitude() + \",\" + loc.getLatitude();\r\n\r\n Log.d(TAG, url);\r\n RequestQueue queue = Volley.newRequestQueue(this);\r\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\r\n @Override\r\n public void onResponse(JSONObject response) {\r\n Log.d(TAG, response.toString());\r\n //JSONArray jsonArray = response.getJSONObject(\"results\").getString(\"formattedString\");\r\n //String formattedAdress = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderResponseMetaData\").getString(\"request\");\r\n JSONObject country = null;\r\n JSONObject area = null;\r\n JSONObject city = null;\r\n JSONObject street = null;\r\n JSONObject houseNumber = null;\r\n try {\r\n country = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\");\r\n } catch (JSONException e) {\r\n country = null;\r\n }\r\n try {\r\n area = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\").getJSONObject(\"AdministrativeArea\");\r\n } catch (JSONException e) {\r\n area = null;\r\n }\r\n try {\r\n city = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\").getJSONObject(\"AdministrativeArea\").getJSONObject(\"Locality\");\r\n } catch (JSONException e) {\r\n city = null;\r\n }\r\n try {\r\n street = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\").getJSONObject(\"AdministrativeArea\").getJSONObject(\"Locality\").getJSONObject(\"Thoroughfare\");\r\n } catch (JSONException e) {\r\n street = null;\r\n }\r\n try {\r\n houseNumber = response.getJSONObject(\"response\").getJSONObject(\"GeoObjectCollection\").getJSONArray(\"featureMember\").getJSONObject(0).getJSONObject(\"GeoObject\").getJSONObject(\"metaDataProperty\").getJSONObject(\"GeocoderMetaData\").getJSONObject(\"AddressDetails\").getJSONObject(\"Country\").getJSONObject(\"AdministrativeArea\").getJSONObject(\"Locality\").getJSONObject(\"Thoroughfare\").getJSONObject(\"Premise\");\r\n } catch (JSONException e) {\r\n houseNumber = null;\r\n }\r\n String text = \"\";\r\n if (country != null) {\r\n// try {\r\n// text += \"Country: \" + country.getString(\"CountryName\") + \"\\n\";\r\n// } catch (JSONException e) {\r\n// }\r\n\r\n// if (area != null) {\r\n// try {\r\n// text += \"Administrative Area: \" + area.getString(\"AdministrativeAreaName\") + \"\\n\";\r\n// } catch (JSONException e) {\r\n// }\r\n\r\n if (city != null) {\r\n try {\r\n text +=city.getString(\"LocalityName\") + \" \";\r\n } catch (JSONException e) {\r\n }\r\n\r\n if (street != null) {\r\n try {\r\n text +=street.getString(\"ThoroughfareName\") + \" \";\r\n } catch (JSONException e) {\r\n }\r\n\r\n if (houseNumber != null) {\r\n try {\r\n text +=houseNumber.getString(\"PremiseNumber\");\r\n } catch (JSONException e) {\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Log.d(TAG, country);\r\n\r\n addressEditText.setText(text);\r\n getPostCode();\r\n\r\n }\r\n }, new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n Log.d(TAG, error.getMessage() + \" ERROR!\");\r\n }\r\n });\r\n\r\n queue.add(request);\r\n\r\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_manually_address, container, false);\n editTextFirstName = view.findViewById(R.id.editTextFN);\n editTextLastName = view.findViewById(R.id.editTextLN);\n linearLayout = view.findViewById(R.id.addresscontainer);\n editTextStreetAddress = view.findViewById(R.id.editTextStreetAddress);\n editTextCity = view.findViewById(R.id.editTextCity);\n editTextState = view.findViewById(R.id.editTextState);\n editTextPhoneNumber = view.findViewById(R.id.editTextPN); // initialize views and classes\n editTextZIPCode = view.findViewById(R.id.editTextZIPCode);\n textInputLayoutFN = view.findViewById(R.id.textInputLayoutFN);\n textInputLayoutLN = view.findViewById(R.id.textInputLayoutLN);\n textInputLayoutCity = view.findViewById(R.id.textInputLayoutCity);\n textInputLayoutZIPCode = view.findViewById(R.id.textInputLayoutZIPCode);\n textInputLayoutSA = view.findViewById(R.id.textInputLayoutSA);\n textInputLayoutState = view.findViewById(R.id.textInputLayoutState);\n textInputLayoutPN = view.findViewById(R.id.textInputLayoutPN);\n saveAddressSwitch = view.findViewById(R.id.switchSaveAddress);\n scrollView = view.findViewById(R.id.containerScrollView);\n progressBarLocation = view.findViewById(R.id.progressBarLocation);\n textViewApproxLoc = view.findViewById(R.id.textViewApproxLoc);\n // scrollView.setVisibility(View.VISIBLE);\n Button button = view.findViewById(R.id.button);\n coder = new Geocoder(getContext());\n\n mHandler.postDelayed(runnable, 1000); // after 0.15 sec from entering the activity, retrieve user data\n button.setOnClickListener(new View.OnClickListener() { // on continue button click\n @Override\n public void onClick(View v) {\n if(fieldChecker() && checkForDigits() && checkForSpecialCharacters()) // check for empty fields first\n {\n\n\n String streetAddress = editTextStreetAddress.getText().toString();\n String city = editTextCity.getText().toString();\n String state = editTextState.getText().toString();\n String firstName = editTextFirstName.getText().toString();\n String lastName = editTextLastName.getText().toString(); // get the required info\n String phoneNumber = editTextPhoneNumber.getText().toString();\n String ZIPCode = editTextZIPCode.getText().toString(); // get the required info after checking empty fields\n\n if(checkPhoneNumber()) { // check for valid number\n\n Intent intent = new Intent(getContext(), GeocodingService.class);\n intent.putExtra(\"Receiver\", mResultReceiver);\n intent.putExtra(\"Address\", streetAddress+city+state);\n Log.e(TAG, \"Starting Service\");\n progressBarLocation.setVisibility(View.VISIBLE);\n textViewApproxLoc.setVisibility(View.VISIBLE);\n scrollView.setVisibility(View.INVISIBLE);\n getActivity().startService(intent);\n if(saveAddressSwitch.isChecked())\n {\n userSession.setFirstName(firstName);\n userSession.setLastName(lastName); // set the values in the user session\n userSession.setCityName(city);\n userSession.setState(state);\n userSession.setStreetAddress(streetAddress);\n userSession.setZipCode(ZIPCode);\n userSession.setPhoneNumber(phoneNumber);\n userSession.setIsSwitchIsOn(true); // set switch to on\n }\n else\n {\n userSession.setFirstName(null);\n userSession.setLastName(null);\n userSession.setCityName(null); // set session values to null\n userSession.setState(null);\n userSession.setStreetAddress(null);\n userSession.setZipCode(null);\n userSession.setPhoneNumber(null);\n userSession.setIsSwitchIsOn(false);\n }\n }\n }\n\n\n }\n });\n fieldWatcher(); // call method to listen to input data change\n\n saveAddressSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { // on switch changed\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\n if(isChecked) // if is switched on\n {\n if(fieldChecker() && checkPhoneNumber() && checkForDigits() && checkForSpecialCharacters()) { // check if fields are not empty and phone number is valid\n\n String streetAddress = editTextStreetAddress.getText().toString();\n String city = editTextCity.getText().toString();\n String state = editTextState.getText().toString();\n String firstName = editTextFirstName.getText().toString();\n String lastName = editTextLastName.getText().toString(); // get the required info\n String phoneNumber = editTextPhoneNumber.getText().toString();\n String ZIPCode = editTextZIPCode.getText().toString();\n userSession.setFirstName(firstName);\n userSession.setLastName(lastName); // set the values in the user session\n userSession.setCityName(city);\n userSession.setState(state);\n userSession.setStreetAddress(streetAddress);\n userSession.setZipCode(ZIPCode);\n userSession.setPhoneNumber(phoneNumber);\n userSession.setIsSwitchIsOn(true); // set switch to on\n }\n\n }\n else // if it is not on\n {\n editTextStreetAddress.setText(\"\");\n editTextCity.setText(\"\");\n editTextState.setText(\"\");\n editTextFirstName.setText(\"\");\n editTextLastName.setText(\"\");\n editTextPhoneNumber.setText(\"\");\n editTextZIPCode.setText(\"\");\n userSession.setFirstName(null);\n userSession.setLastName(null);\n userSession.setCityName(null); // set session values to null\n userSession.setState(null);\n userSession.setStreetAddress(null);\n userSession.setZipCode(null);\n userSession.setPhoneNumber(null);\n userSession.setIsSwitchIsOn(false);\n }\n }\n });\n\n return view;\n }",
"public GetAddressTask(Context context) {\r\n\r\n\t\t// Required by the semantics of AsyncTask\r\n\t\tsuper();\r\n\r\n\t\t// Set a Context for the background task\r\n\t\tthis.localContext = context;\r\n\t}",
"public String getAddress()\n{\n return this.address;\n}",
"public GetAddressTask(Context context) {\n\n\t\t\t// Required by the semantics of AsyncTask\n\t\t\tsuper();\n\n\t\t\t// Set a Context for the background task\n\t\t\tlocalContext = context;\n\t\t}",
"private static void testGetAddress(GeoCoderInterface geoCoder, Double latitude, Double longitude, String language){\n\t\tSystem.out.println(\"--From GPS:\");\n\t\tGeoCoderResult result = geoCoder.getAddress(latitude, longitude, language);\n\t\tprintGeoCoderResult(result);\n\t}",
"public String getFormattedAddress() {\n return formattedAddress;\n }",
"@Override\n protected void onPostExecute(String address) {\n // Call back Data and Display the current address in the UI\n activity.callBackDataFromAsyncTask(address);\n }",
"public void buscarLugar(){\n String lugar= tv_lugar.getText().toString().trim();\n ubicacionEncontrada=false;\n this.geocoder= new Geocoder(getActivity());\n this.lista = new ArrayList<>();\n\n try {\n lista =geocoder.getFromLocationName(lugar,1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n if(lista.size()>0){\n this.localizacion= lista.get(0);\n\n // Snackbar.make(myView,\"Error al crear la quedada\", Snackbar.LENGTH_SHORT).show();\n ubicacionEncontrada=true;\n Log.i(\"UBICACION A BUSCAR\", localizacion.toString());\n this.latLng = new LatLng(localizacion.getLatitude(), localizacion.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 12f));\n this.markerOptions = new MarkerOptions().position(latLng).title(localizacion.getAddressLine(0));\n\n mMap.addMarker(markerOptions);\n\n\n }\n\n }"
]
| [
"0.7106701",
"0.67066646",
"0.66682917",
"0.6523714",
"0.6433438",
"0.6364514",
"0.6330274",
"0.6297192",
"0.62200147",
"0.6206413",
"0.6172732",
"0.6132913",
"0.6059725",
"0.6045165",
"0.5989423",
"0.5984807",
"0.5958851",
"0.5929112",
"0.5922747",
"0.58950067",
"0.588047",
"0.5850259",
"0.58474755",
"0.5835048",
"0.58235395",
"0.57831216",
"0.57779044",
"0.57612854",
"0.5757992",
"0.5730837",
"0.5730573",
"0.57196695",
"0.571179",
"0.57117796",
"0.5708101",
"0.56953835",
"0.5693138",
"0.5666807",
"0.56403816",
"0.5582937",
"0.5563066",
"0.55477",
"0.5534476",
"0.5515608",
"0.5473309",
"0.5437547",
"0.54304117",
"0.542795",
"0.5426573",
"0.5410484",
"0.540689",
"0.53899074",
"0.5385324",
"0.5352217",
"0.5341577",
"0.53299063",
"0.5324654",
"0.5305864",
"0.52713466",
"0.5264493",
"0.5252063",
"0.5242907",
"0.521832",
"0.5209096",
"0.5209096",
"0.52013373",
"0.52013373",
"0.52013373",
"0.52013373",
"0.52013373",
"0.52013373",
"0.52007127",
"0.51946604",
"0.51942635",
"0.51927096",
"0.5179562",
"0.51772803",
"0.5165702",
"0.5165379",
"0.5160978",
"0.51567584",
"0.5156391",
"0.51510596",
"0.5144824",
"0.51401705",
"0.51321125",
"0.51313597",
"0.51287264",
"0.511994",
"0.5108861",
"0.51058316",
"0.5076672",
"0.50750047",
"0.50664496",
"0.5052662",
"0.5052242",
"0.504919",
"0.504793",
"0.50466704",
"0.50464946"
]
| 0.58679116 | 21 |
A method that's called once doInBackground() completes. Set the text of the UI element that displays the address. This method runs on the UI thread. | @Override
protected void onPostExecute(com.ssinfo.corider.app.models.RiderLocation address) {
if (address != null) {
mListener.onSuccess(address);
} else {
mListener.onFail("No address found");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\tprotected void onPostExecute(String address) {\n\t\t\tmAddress.setText(address);\n\t\t}",
"@Override\n\t\tprotected void onPostExecute(String address) {\n\n\t\t\t// Turn off the progress bar\n\t\t\tmActivityIndicator.setVisibility(View.GONE);\n\n\t\t\t// Set the address in the UI\n\t\t\tmAddress.setText(address);\n\t\t}",
"@Override\n protected void onPostExecute(String address) {\n // Call back Data and Display the current address in the UI\n activity.callBackDataFromAsyncTask(address);\n }",
"private void populateAddressInfo(){\n userNameLabel.setText(userAccount.getUsername());\n address1Label.setText(userAccount.getPerson().getAddress().getAddressLine1());\n address2Label.setText(userAccount.getPerson().getAddress().getAddressLine2());\n cityLabel.setText(userAccount.getPerson().getAddress().getCity());\n stateLabel.setText(userAccount.getPerson().getAddress().getState());\n nationLabel.setText(userAccount.getPerson().getAddress().getCountry());\n zipLabel.setText(userAccount.getPerson().getAddress().getZipcode());\n emailLabel.setText(userAccount.getPerson().getEmail());\n }",
"@Override\n protected void onPostExecute(String address) {\n Settings.getSettings().setPickUpLocation(address);\n HomeScreenActivity.setGpsFinished(true);\n }",
"@SuppressLint(\"NewApi\")\n\tpublic void getAddress() {\n\n\t\t// In Gingerbread and later, use Geocoder.isPresent() to see if a geocoder is available.\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD && !Geocoder.isPresent()) {\n\t\t\t// No geocoder is present. Issue an error message\n\t\t\tToast.makeText(this, R.string.no_geocoder_available, Toast.LENGTH_LONG).show();\n\t\t\treturn;\n\t\t}\n\n\t\tif (servicesConnected()) {\n\n\t\t\t// Get the current location\n\t\t\tLocation currentLocation = mLocationClient.getLastLocation();\n\n\t\t\t// Turn the indefinite activity indicator on\n\t\t\tmActivityIndicator.setVisibility(View.VISIBLE);\n\n\t\t\t// Start the background task\n\t\t\t(new RequestActivity.GetAddressTask(this)).execute(currentLocation);\n\t\t}\n\t}",
"@Override\n protected String doInBackground(Location... params) {\n\n // Set up geocoder\n Geocoder geocoder = new Geocoder(context, Locale.getDefault());\n\n // Get current location from parameter list\n Location location = params[0];\n\n // Create a list to contain the result address\n List<Address> addresses = null;\n try {\n Log.w(GetAddressTask.class.toString(), \"Started getting address from server\");\n // Get a list of street addresses using the geocoder.\n addresses = geocoder.getFromLocation(location.getLatitude(),\n location.getLongitude(), 1);\n Settings.getSettings().setPickUpCoordinates(location.getLatitude(), location.getLongitude());\n Log.w(GetAddressTask.class.toString(), \"Finished getting address from server\");\n } catch (IOException e1) {\n Log.e(\"GetAddressTask\", \"IO Exception in getFromLocation\");\n e1.printStackTrace();\n } catch (IllegalArgumentException e2) {\n // Make error string\n String errorString = \"Illegal arguments \" + Double.toString(location.getLatitude()) + \" , \" +\n Double.toString(location.getLongitude()) + \" passed to address services\";\n Log.e(\"GetAddressTask\" , errorString);\n e2.printStackTrace();\n return errorString;\n } catch (NullPointerException e3){\n // Waiting for connection\n }\n\n // Check if geocode returned an address\n if (addresses != null && addresses.size() > 0 && (location.getAccuracy() < 100)) {\n // Get first address from list\n Address address = addresses.get(0);\n // Format the address.\n String addressText = String.format(\"%s, %s, %s\", address.getMaxAddressLineIndex() > 0 ?\n address.getAddressLine(0) : \"\", address.getLocality(), address.getCountryName());\n return addressText;\n } else if (location.getAccuracy() >= 100) {\n return \"Your location is not accurate enough\\nTap on the arrow to try again.\";\n } else {\n return \"No address found\\nTru using a different option\";\n }\n }",
"@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tToast.makeText(x.app(), Constant.ADDRESS_LIST[index], Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\t\tpublic void callback(String addr) {\n\t\t\t\t\t\t\tsfdqet.setText(addr);\r\n\t\t\t\t\t\t}",
"private void setValueForEditAddrss() {\n ServiceCaller serviceCaller = new ServiceCaller(context);\n serviceCaller.callGetAllAddressByIdService(addressid, new IAsyncWorkCompletedCallback() {\n @Override\n public void onDone(String workName, boolean isComplete) {\n if (isComplete) {\n if (!workName.trim().equalsIgnoreCase(\"no\") && !workName.equalsIgnoreCase(\"\")) {\n ContentDataAsArray contentDataAsArray = new Gson().fromJson(workName, ContentDataAsArray.class);\n for (Data data : contentDataAsArray.getData()) {\n if (data != null) {\n edt_name.setText(data.getName());\n edt_phone.setText(data.getPhone());\n edt_landmark.setText(data.getLandmark());\n edt_address.setText(data.getAddress());\n edt_city.setText(data.getCity());\n edt_state.setText(data.getState());\n }\n }\n }\n }\n }\n });\n\n }",
"@FXML\n private void setAddressBox() throws SQLException {\n this.addressBox.setText(Address.toString(CurrentLogin.getInstance().getUserID()));\n }",
"@Override\n public void onLocationChanged(Location location) {\n\n try {\n Geocoder geocoder = new Geocoder(getActivity(), Locale.getDefault());\n List<Address> addresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n address.setText(address.getText() + \"\\n\"+addresses.get(0).getAddressLine(0));\n }catch(Exception e)\n {\n\n }\n\n }",
"@Override\n protected void onPostExecute(Boolean result) {\n if (name_valid) {\n hostname = tmp_hostname;\n System.out.println(\"Hostname was: \"+ hostname);\n // set the text element\n TextView hostname_text_view = (TextView) findViewById(R.id.hostname);\n hostname_text_view.setText(\"Host: \"+ hostname);\n //savePreferences(); this breaks out of thread and causes a networkonmainthreadException\n }\n }",
"@Override\n\t\tprotected String doInBackground(String... params) {\n\t\t\tgetLatLongFromAddress(from);\n\t\t\tgetLatLongToAddress(to);\n\t\t\treturn null;\n\t\t}",
"@Override\n\tprotected void onPostExecute(Void result) \n\t{\n\t\tif(geocodeActivity.getClass().toString().contains(\"MainActivity\"))\n\t\t\t((MainActivity)geocodeActivity).getAddress_CreateMail(strReturnedAddress);\n\t\telse if(geocodeActivity.getClass().toString().contains(\"MsgListActivity\"))\n\t\t\t((MsgListActivity)geocodeActivity).getAddress_CreateMail(strReturnedAddress);\n\t\t\n\t\tstatusDialog.dismiss();\n\t\t\n\t\tsuper.onPostExecute(result);\n\n\t}",
"@Override\r\n\t\t\tprotected void onPostExecute(String result) {\r\n\r\n\t\t\t\t// Instantiating ParserTask which parses the json data from\r\n\t\t\t\t// Geocoding webservice\r\n\t\t\t\t// in a non-ui thread\r\n\t\t\t\tParserTask1 parserTask = new ParserTask1();\r\n\r\n\t\t\t\t// Start parsing the places in JSON format\r\n\t\t\t\t// Invokes the \"doInBackground()\" method of the class ParseTask\r\n\t\t\t\tparserTask.execute(result);\r\n\t\t\t}",
"public void getCurrentAddress() {\n if (mGoogleApiClient.isConnected() && mLastLocation != null) {\n startIntentService();\n }\n // If GoogleApiClient isn't connected, we process the user's request by setting\n // mAddressRequested to true. Later, when GoogleApiClient connects, we launch the service to\n // fetch the address. As far as the user is concerned, pressing the Fetch Address button\n // immediately kicks off the process of getting the address.\n mAddressRequested = true;\n updateUIWidgets();\n }",
"@Override\n protected void onPostExecute(Void result)\n {\n NAME.setText(NameHolder);\n PHONE_NUMBER.setText(NumberHolder);\n CLASS.setText(ClassHolder);\n\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n\n Geocoder gcd = new Geocoder(context, Locale.getDefault());\n List<Address> addresses = null;\n try {\n addresses = gcd.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n if (addresses.size() > 0) {\n\n city = addresses.get(0).getLocality();\n local.setText(city);\n local.setSelection(local.getText().length());\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n }",
"private void searchAddress() {\n CommomUtils.hideKeyboard(MainActivity.this, etAddress);\n\n //Check if the address was informed\n if (etAddress.getText().toString().equals(\"\")) {\n Toast.makeText(MainActivity.this, R.string.activity_main_search_address_validation, Toast.LENGTH_SHORT).show();\n return;\n }\n\n lvResult.setVisibility(View.GONE);\n showProgress();\n\n //Call the api for searching the address\n GoogleMapsService service = ServiceGenerator.createService(GoogleMapsService.class, getString(R.string.google_maps_api_base_url));\n service.getGeocoding(etAddress.getText().toString(), true, new Callback<GeocodingResult>() {\n @Override\n public void success(GeocodingResult googleGeocodingResult, Response response) {\n hideProgress();\n geocodingResult = googleGeocodingResult;\n\n if (geocodingResult.getResults().size() > 0) {\n loadResult();\n } else {\n Toast.makeText(MainActivity.this, R.string.activity_main_search_no_results_found, Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n hideProgress();\n Toast.makeText(MainActivity.this, error.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }",
"@Override\n protected void onPostExecute(String s) {\n super.onPostExecute(s);\n\n if (s != null)\n tvName.setText(s);\n\n }",
"public void run() {\n barcodeInfo.setText( // Update the TextView\n barcodes.valueAt(0).displayValue\n );\n }",
"@Override\r\n public void onClick(View v) {\n String iptext = setIP.getText().toString();\r\n new Thread(new TestHandler(iptext)).start();\r\n }",
"private void updateLocationUI() {\n mCurrentLocationStr = mCurrentPlace.getAddress().toString();\n mCurrentLatLng = mCurrentPlace.getLatLng();\n if(mCurrentLocationStr.isEmpty())\n mCurrentLocationStr = String.format(\"(%.2f, %.2f)\",mCurrentLatLng.latitude, mCurrentLatLng.longitude);\n\n mAddLocation.setText(mCurrentLocationStr);\n mAddLocation.setTextColor(mSecondaryTextColor);\n mClearLocation.setVisibility(View.VISIBLE);\n }",
"@Override\n public void run() {\n tourName.setText(tour.getStr(Tour.name));\n tourDesc.setText(tour.getStr(Tour.description));\n price.setText((tour.getDbl(\"price\")).toString());\n language.setText(tour.getStr(\"language\"));\n additionalAccommodation.setText(tour.getStr(\"additional_accomadation\"));\n additionalFood.setText(tour.getStr(\"additional_food\"));\n additionalTransport.setText(tour.getStr(\"additional_transport\"));\n startDateText.setText(tour.getStr(\"firstStart_date\"));\n endDateText.setText(tour.getStr(\"firstEnd_date\"));\n // try {\n // location.setText(user.getStr(\"address:street\"));\n // } catch (Exception e) {\n // e.printStackTrace();\n //}\n }",
"@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttextView.setText(text);\n\t\t\t\t\t\t\t}",
"@Override\n\t\tprotected Void doInBackground(Void... params) {\n\t\t\tfetchData();\n\t\t\t// getLatLongFromAddress(from);\n\t\t\treturn null;\n\t\t}",
"@Override\n\t\tpublic void addressEdited() {\n\t\t\tokCallback();\n\t\t}",
"private void getAddress(Location mLocation) {\n\t\tif (Build.VERSION.SDK_INT >=\n\t\t\t\tBuild.VERSION_CODES.GINGERBREAD\n\t\t\t\t&&\n\t\t\t\tGeocoder.isPresent()) {\n\t\t\t/*\n\t\t\t * Reverse geocoding is long-running and synchronous.\n\t\t\t * Run it on a background thread.\n\t\t\t * Pass the current location to the background task.\n\t\t\t * When the task finishes,\n\t\t\t * onPostExecute() displays the address.\n\t\t\t */\n\t\t\t(new GetAddressTask(this)).execute(mLocation);\n\t\t}\n\t}",
"public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }",
"public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }",
"public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }",
"public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }",
"public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }",
"@Override \n\t\tpublic void run() {\n\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tIGPSService gpsService = gpsServiceConnection.getServiceIfBound();\n\t\t\t \tif (gpsService != null) {\n\t\t\t \t\ttry {\n\t\t\t \t\t\tmLastSuccess.setText(gpsService.getLastSuccessfulRequest());\n\t\t\t\t\t\t} catch (RemoteException e) {\n\t\t\t\t\t\t\tLog.d(LocationUtils.APPTAG, e.getLocalizedMessage());\n\t\t\t\t\t\t}\n\t\t\t \t}\n\t\t\t\t}\n\t\t\t});\n\t\t}",
"public static void inspectionBuildAddress(Inspections inspect, TextView textview, boolean useAbbreviatedBoro) {\n useAbbreviatedBoro = false;\n\n textview.setText(inspect.getBuilding() + \" \" + inspect.getStreet()\n + (inspect.getBoro() == null ? \"\" : \",\" + (useAbbreviatedBoro ? AppUtility.getAbbreviatedBoro(inspect.getBoro()) : inspect.getBoro()))\n + (inspect.getZipcode() == null ? \"\" : \",\" + inspect.getZipcode()));\n }",
"@Override\n\t\tprotected String doInBackground(Location... params) {\n\t\t\t/*\n\t\t\t * Get a new geocoding service instance, set for localized addresses. This example uses\n\t\t\t * android.location.Geocoder, but other geocoders that conform to address standards\n\t\t\t * can also be used.\n\t\t\t */\n\t\t\tGeocoder geocoder = new Geocoder(localContext, Locale.getDefault());\n\n\t\t\t// Get the current location from the input parameter list\n\t\t\tLocation location = params[0];\n\n\t\t\t// Create a list to contain the result address\n\t\t\tList <Address> addresses = null;\n\n\t\t\t// Try to get an address for the current location. Catch IO or network problems.\n\t\t\ttry {\n\n\t\t\t\t/*\n\t\t\t\t * Call the synchronous getFromLocation() method with the latitude and\n\t\t\t\t * longitude of the current location. Return at most 1 address.\n\t\t\t\t */\n\t\t\t\taddresses = geocoder.getFromLocation(location.getLatitude(),\n\t\t\t\t\t\tlocation.getLongitude(), 1\n\t\t\t\t\t\t);\n\n\t\t\t\t// Catch network or other I/O problems.\n\t\t\t} catch (IOException exception1) {\n\n\t\t\t\t// Log an error and return an error message\n\t\t\t\tLog.e(LocationUtils.APPTAG, getString(R.string.IO_Exception_getFromLocation));\n\n\t\t\t\t// print the stack trace\n\t\t\t\texception1.printStackTrace();\n\n\t\t\t\t// Return an error message\n\t\t\t\treturn (getString(R.string.IO_Exception_getFromLocation));\n\n\t\t\t\t// Catch incorrect latitude or longitude values\n\t\t\t} catch (IllegalArgumentException exception2) {\n\n\t\t\t\t// Construct a message containing the invalid arguments\n\t\t\t\tString errorString = getString(\n\t\t\t\t\t\tR.string.illegal_argument_exception,\n\t\t\t\t\t\tlocation.getLatitude(),\n\t\t\t\t\t\tlocation.getLongitude()\n\t\t\t\t\t\t);\n\t\t\t\t// Log the error and print the stack trace\n\t\t\t\tLog.e(LocationUtils.APPTAG, errorString);\n\t\t\t\texception2.printStackTrace();\n\n\t\t\t\t//\n\t\t\t\treturn errorString;\n\t\t\t}\n\t\t\t// If the reverse geocode returned an address\n\t\t\tif (addresses != null && addresses.size() > 0) {\n\n\t\t\t\t// Get the first address\n\t\t\t\tAddress address = addresses.get(0);\n\n\t\t\t\t// Format the first line of address\n\t\t\t\tString addressText = getString(R.string.address_output_string,\n\n\t\t\t\t\t\t// If there's a street address, add it\n\t\t\t\t\t\taddress.getMaxAddressLineIndex() > 0 ?\n\t\t\t\t\t\t\t\taddress.getAddressLine(0) : \"\",\n\n\t\t\t\t\t\t\t\t// Locality is usually a city\n\t\t\t\t\t\t\t\taddress.getLocality(),\n\n\t\t\t\t\t\t\t\t// The country of the address\n\t\t\t\t\t\t\t\taddress.getCountryName()\n\t\t\t\t\t\t);\n\n\t\t\t\t// Return the text\n\t\t\t\treturn addressText;\n\n\t\t\t\t// If there aren't any addresses, post a message\n\t\t\t} else {\n\t\t\t\treturn getString(R.string.no_address_found);\n\t\t\t}\n\t\t}",
"@Override\n\t\t\tpublic void run() {\n\n\t\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\t\tHttpClient client = new DefaultHttpClient();\n\t\t\t\tString url = \"https://maps.googleapis.com/maps/api/place/autocomplete/json?input=\"\n\t\t\t\t\t\t+ search\n\t\t\t\t\t\t+ \"&types=geocode&key=AIzaSyCUykPstomDep6-PWmMenJ2rUccTsjUGak\";\n\t\t\t\tHttpGet httpGet = new HttpGet(url);\n\t\t\t\ttry {\n\t\t\t\t\tHttpResponse response = client.execute(httpGet);\n\t\t\t\t\tStatusLine statusLine = response.getStatusLine();\n\t\t\t\t\tint statusCode = statusLine.getStatusCode();\n\t\t\t\t\tif (statusCode == 200) {\n\t\t\t\t\t\tHttpEntity entity = response.getEntity();\n\t\t\t\t\t\tInputStream content = entity.getContent();\n\t\t\t\t\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\t\t\t\t\tnew InputStreamReader(content));\n\t\t\t\t\t\tString line;\n\t\t\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\t\t\tbuilder.append(line);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t}\n\t\t\t\t} catch (ClientProtocolException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tdecodeString(builder.toString());\n\t\t\t}",
"@Override\n protected void onPostExecute(String result) {\n temptext.setText(result+data);\n }",
"private void getAddress(Location location){\n List<Address> addresses = null;\n try {\n addresses = geocoder.getFromLocation(location.getLatitude(),location.getLongitude(),1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n yourAddress.setText(addresses.get(0).getAddressLine(0) + \"\\n\" + addresses.get(0).getLocality() + \"\\n\" +addresses.get(0).getAdminArea() + \"\\n\" + addresses.get(0).getCountryName());\n// String postalCode = addresses.get(0).getPostalCode();\n// String knownName = addresses.get(0).getFeatureName();\n }",
"@Override\n protected List<Address> doInBackground(String... locationName) {\n Geocoder geocoder = new Geocoder(getBaseContext());\n List<Address> addresses = null;\n \n try {\n // Getting a maximum of 3 Address that matches the input text\n addresses = geocoder.getFromLocationName(locationName[0], 3);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return addresses;\n }",
"@Override\r\n\t\tprotected void onPostExecute(String result) {\n\t\t\tsuper.onPostExecute(result);\r\n\t\t\tshowtalk.setText(result);\r\n\t\t}",
"@Override\n protected List<Address> doInBackground(String... locationName) {\n Geocoder geocoder = new Geocoder(BookingActivity.this);\n List<Address> addresses = null;\n\n try {\n // Getting a maximum of 3 Address that matches the input text\n addresses = geocoder.getFromLocationName(locationName[0], 3);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return addresses;\n }",
"@Override\n protected Void doInBackground(Void... voids) {\n\n\n Geocoder gc = new Geocoder(MainActivity.this);\n\n Log.d(\"florianBurel\", \"gc - isPresent : \" + (gc.isPresent() ? \"YES\" : \"NO\"));\n\n try {\n List<Address> addresses = gc.getFromLocation(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude(), 1);\n\n Log.d(\"florianBurel\", addresses.size() + \" addresses found\");\n\n //city.setName(addresses.get(0).getLocality());\n\n } catch (IOException e) {\n city.setName(\"Unknown Location\");\n }\n\n\n\n\n return null;\n }",
"public void setAddress(String _address){\n address = _address;\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tPersonalInfoShow.tv_PIS_UserName.setText(Login.LOGIN_USERNAME);\n\t\t\t\tPersonalInfoShow.tv_PIS_PassWord.setText(PIS_Password);\n\t\t\t\tPersonalInfoShow.tv_PIS_Phone.setText(PIS_Phone);\n\t\t\t\tPersonalInfoShow.tv_PIS_Address.setText(PIS_Address);\n\t\t\t\tPersonalInfoShow.tv_PIS_Sex.setText(PIS_Sex);\n\t\t\t\tPersonalInfoShow.tv_PIS_Balances.setText(PIS_Balances);\n\n\t\t\t}",
"public void setAddress(String address);",
"public void setAddress(String address);",
"public void setAddress(String address);",
"public void setAddress(String address);",
"@Override\n protected void onPostExecute(String result){\n ParserTask parserTask = new ParserTask(viewHolder);\n\n // Start parsing the Google places in JSON format\n // Invokes the \"doInBackground()\" method of ParserTask\n parserTask.execute(result);\n }",
"@Override\n\t\tprotected void onPostExecute(String result) {\n\t\t\tif (null != pDialog && pDialog.isShowing()) {\n\t\t\t\tpDialog.dismiss();\n\t\t\t}\n\t\t\tif (result.equals(\"\"))\n\t\t\t\tclsUtility.msgBox(Outlet.this, \"Message\", \"No data received.\");\n\t\t\tlistTown.clear();\n\t\t\tAddDataArea(result, spTown, hmap_Town, listTown);\n\t\t\tspTown.setOnItemSelectedListener(\n\t\t\t\t\tnew OnItemSelectedListener() {\n\t\t\t\t\t\tpublic void onItemSelected(\n\t\t\t\t\t\t\t\tAdapterView<?> parent, View view, int position, long id) {\n\t\t\t\t\t\t\tif(spTown.getSelectedItem().equals(\".\")) {}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tString\tstrQuery = \"BindDRP.ashx?Type=party&Area=\" + AreaCode2+\"&Town=\"+hmap_Town1.get(parent.getItemAtPosition(position));\n\t\t\t\t\t\t\t\tnew HttpAsyncTaskParty().execute(Url + strQuery);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpublic void onNothingSelected(AdapterView<?> parent) {\n\t\t\t\t\t\t\t//Toast.makeText(getApplicationContext(),\"Spinner2: unselected\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t}",
"@Override\n public void run() { // This is running in the UI Thread so updating the label\n ourLabel.setText(\"We did something\");\n }",
"@Override\n protected void onPostExecute(String result) {\n // tvResult.setText(result);\n }",
"public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n address_ = value;\n onChanged();\n return this;\n }",
"@Override\n protected void onReceiveResult(int resultCode, Bundle resultData) {\n // Display the address string or an error message sent from the intent service.\n //.getString(Constants.ADDRESS_RESULT_KEY);\n // Address current_location = getIntent().getExtras().getParcelable(Constants.ADDRESS_RESULT_KEY);\n mAddress = resultData;\n updateUI();\n }",
"void retrieveServerIP(boolean flag) // flag is false when it is executed for first time, else label is updated\n {\n try\n {\n tempAddress = InetAddress.getLocalHost().toString().substring(InetAddress.getLocalHost().toString().lastIndexOf(\"/\")+1);\n }\n catch(Exception e)\n {\n JOptionPane.showMessageDialog(this,\"Unable to Retrieve System IP, Restart the Application and Retry\",\"Runtime Error !\",0); // EIWQ\n System.exit(0);\n }\n if(!(tempAddress.equals(serverAddress)))\n {\n serverAddress=tempAddress;\n if(flag)\n SwingUtilities.invokeLater(new Runnable()\n {\n public void run()\n {\n address.setText(\"Type this in client app : \"+serverAddress+\" \");\n }\n });\n }\n }",
"@Override\n protected Boolean doInBackground(String... params) {\n Boolean prepared;\n //progress.show();\n try {\n String str;\n HttpClient myClient = new DefaultHttpClient();\n HttpGet get = new HttpGet(params[0]);\n HttpResponse myResponse = myClient.execute(get);\n BufferedReader br = new BufferedReader(new InputStreamReader(myResponse.getEntity().getContent()));\n while ((str = br.readLine()) != null) {\n serverResponse = str;\n Log.d(\"Address Activity: \", str);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n prepared = true;\n return prepared;\n }",
"public void getAddress() {\n if (mLocation != null) {\n mBusinessAddress = AppUtil.getAddress(getContext(), mLocation);\n } else {\n mLocation = null;\n if (ActivityCompat.checkSelfPermission(getContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), android.Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n LocationManager locationManager = (LocationManager) getActivity().getSystemService(LOCATION_SERVICE);\n Criteria criteria = new Criteria();\n Location currLocation = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));\n if (currLocation != null) {\n mBusinessAddress = AppUtil.getAddress(getContext(), new LatLng(currLocation.getLatitude(), currLocation.getLongitude()));\n } else {\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 5000, 5, this);\n if (mCurrLocation != null) {\n mBusinessAddress = AppUtil.getAddress(getContext(), new LatLng(mCurrLocation.getLatitude(), mCurrLocation.getLongitude()));\n } else {\n // Default location in case location search doesn't work on first try\n mBusinessAddress = DiscoverConstants.DEFAULT_LOCATION;\n }\n }\n } else {\n mBusinessAddress = null;\n }\n }\n }",
"@Override\n protected List<Address> doInBackground(String... locationName) {\n Geocoder geocoder = new Geocoder(getBaseContext());\n List<Address> addresses = null;\n\n try {\n // Getting a maximum of 10 Address that matches the input text\n addresses = geocoder.getFromLocationName(locationName[0], 10);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n return addresses;\n }",
"@Override\n protected List<Address> doInBackground(String... locationName) {\n Geocoder geocoder = new Geocoder(getBaseContext());\n List<Address> addresses = null;\n\n try {\n // Getting a maximum of 3 Address that matches the input text\n addresses = geocoder.getFromLocationName(locationName[0], 3);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return addresses;\n }",
"@Override\n public void run() {\n receivedTextView1.setText(str);\n }",
"protected void done() {\n\t\ttry {\n\t\t\t// get the result of doInBackground and display it\n\t\t\tresultJLabel.setText(get().toString());\n\t\t} // end try\n\t\tcatch (InterruptedException ex) {\n\t\t\tresultJLabel.setText(\"Interrupted while waiting for results.\");\n\t\t} // end catch\n\t\tcatch (ExecutionException ex) {\n\t\t\tresultJLabel.setText(\"Error encountered while performing calculation.\");\n\t\t} // end catch\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_manually_address, container, false);\n editTextFirstName = view.findViewById(R.id.editTextFN);\n editTextLastName = view.findViewById(R.id.editTextLN);\n linearLayout = view.findViewById(R.id.addresscontainer);\n editTextStreetAddress = view.findViewById(R.id.editTextStreetAddress);\n editTextCity = view.findViewById(R.id.editTextCity);\n editTextState = view.findViewById(R.id.editTextState);\n editTextPhoneNumber = view.findViewById(R.id.editTextPN); // initialize views and classes\n editTextZIPCode = view.findViewById(R.id.editTextZIPCode);\n textInputLayoutFN = view.findViewById(R.id.textInputLayoutFN);\n textInputLayoutLN = view.findViewById(R.id.textInputLayoutLN);\n textInputLayoutCity = view.findViewById(R.id.textInputLayoutCity);\n textInputLayoutZIPCode = view.findViewById(R.id.textInputLayoutZIPCode);\n textInputLayoutSA = view.findViewById(R.id.textInputLayoutSA);\n textInputLayoutState = view.findViewById(R.id.textInputLayoutState);\n textInputLayoutPN = view.findViewById(R.id.textInputLayoutPN);\n saveAddressSwitch = view.findViewById(R.id.switchSaveAddress);\n scrollView = view.findViewById(R.id.containerScrollView);\n progressBarLocation = view.findViewById(R.id.progressBarLocation);\n textViewApproxLoc = view.findViewById(R.id.textViewApproxLoc);\n // scrollView.setVisibility(View.VISIBLE);\n Button button = view.findViewById(R.id.button);\n coder = new Geocoder(getContext());\n\n mHandler.postDelayed(runnable, 1000); // after 0.15 sec from entering the activity, retrieve user data\n button.setOnClickListener(new View.OnClickListener() { // on continue button click\n @Override\n public void onClick(View v) {\n if(fieldChecker() && checkForDigits() && checkForSpecialCharacters()) // check for empty fields first\n {\n\n\n String streetAddress = editTextStreetAddress.getText().toString();\n String city = editTextCity.getText().toString();\n String state = editTextState.getText().toString();\n String firstName = editTextFirstName.getText().toString();\n String lastName = editTextLastName.getText().toString(); // get the required info\n String phoneNumber = editTextPhoneNumber.getText().toString();\n String ZIPCode = editTextZIPCode.getText().toString(); // get the required info after checking empty fields\n\n if(checkPhoneNumber()) { // check for valid number\n\n Intent intent = new Intent(getContext(), GeocodingService.class);\n intent.putExtra(\"Receiver\", mResultReceiver);\n intent.putExtra(\"Address\", streetAddress+city+state);\n Log.e(TAG, \"Starting Service\");\n progressBarLocation.setVisibility(View.VISIBLE);\n textViewApproxLoc.setVisibility(View.VISIBLE);\n scrollView.setVisibility(View.INVISIBLE);\n getActivity().startService(intent);\n if(saveAddressSwitch.isChecked())\n {\n userSession.setFirstName(firstName);\n userSession.setLastName(lastName); // set the values in the user session\n userSession.setCityName(city);\n userSession.setState(state);\n userSession.setStreetAddress(streetAddress);\n userSession.setZipCode(ZIPCode);\n userSession.setPhoneNumber(phoneNumber);\n userSession.setIsSwitchIsOn(true); // set switch to on\n }\n else\n {\n userSession.setFirstName(null);\n userSession.setLastName(null);\n userSession.setCityName(null); // set session values to null\n userSession.setState(null);\n userSession.setStreetAddress(null);\n userSession.setZipCode(null);\n userSession.setPhoneNumber(null);\n userSession.setIsSwitchIsOn(false);\n }\n }\n }\n\n\n }\n });\n fieldWatcher(); // call method to listen to input data change\n\n saveAddressSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { // on switch changed\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\n if(isChecked) // if is switched on\n {\n if(fieldChecker() && checkPhoneNumber() && checkForDigits() && checkForSpecialCharacters()) { // check if fields are not empty and phone number is valid\n\n String streetAddress = editTextStreetAddress.getText().toString();\n String city = editTextCity.getText().toString();\n String state = editTextState.getText().toString();\n String firstName = editTextFirstName.getText().toString();\n String lastName = editTextLastName.getText().toString(); // get the required info\n String phoneNumber = editTextPhoneNumber.getText().toString();\n String ZIPCode = editTextZIPCode.getText().toString();\n userSession.setFirstName(firstName);\n userSession.setLastName(lastName); // set the values in the user session\n userSession.setCityName(city);\n userSession.setState(state);\n userSession.setStreetAddress(streetAddress);\n userSession.setZipCode(ZIPCode);\n userSession.setPhoneNumber(phoneNumber);\n userSession.setIsSwitchIsOn(true); // set switch to on\n }\n\n }\n else // if it is not on\n {\n editTextStreetAddress.setText(\"\");\n editTextCity.setText(\"\");\n editTextState.setText(\"\");\n editTextFirstName.setText(\"\");\n editTextLastName.setText(\"\");\n editTextPhoneNumber.setText(\"\");\n editTextZIPCode.setText(\"\");\n userSession.setFirstName(null);\n userSession.setLastName(null);\n userSession.setCityName(null); // set session values to null\n userSession.setState(null);\n userSession.setStreetAddress(null);\n userSession.setZipCode(null);\n userSession.setPhoneNumber(null);\n userSession.setIsSwitchIsOn(false);\n }\n }\n });\n\n return view;\n }",
"public Builder setAddress(com.google.protobuf.StringValue value) {\n if (addressBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n address_ = value;\n onChanged();\n } else {\n addressBuilder_.setMessage(value);\n }\n\n return this;\n }",
"public void setAddress(final String address){\n this.address=address;\n }",
"@Override\n public void onClick(View v) {\n EditText etLocation = (EditText) findViewById(R.id.et_location);\n // Getting user input location\n String location = etLocation.getText().toString();\n if (location != null && !location.equals(\"\")) {\n new GeocoderTask().execute(location);\n }\n }",
"@Override\r\n\t\t\tpublic void onSuccess(Object success) {\n\t\t\t\tList<Address> addresses = (List<Address>)success;\r\n\t\t\t\tview.setAddresss(addresses);\r\n\t\t\t\tview.setAdapter();\r\n\t\t\t}",
"@Override\n protected void onPostExecute(String retval) {\n super.onPostExecute(retval);\n\n etText.setValue(retval);\n butState.setValue(true);\n }",
"public void setAddress(String address) { this.address = address; }",
"@Override\r\n\tprotected RiderLocation doInBackground(RiderLocation... params) {\r\n\t\t/*\r\n\t\t * Get a new geocoding service instance, set for localized addresses.\r\n\t\t * This example uses android.location.Geocoder, but other geocoders that\r\n\t\t * conform to address standards can also be used.\r\n\t\t */\r\n\t\tGeocoder geocoder = new Geocoder(this.localContext, Locale.getDefault());\r\n\r\n\t\t// Get the current location from the input parameter list\r\n\t\tRiderLocation location = params[0];\r\n\r\n\t\t// Create a list to contain the result address\r\n\t\tList<Address> addresses = null;\r\n\r\n\t\t// Try to get an address for the current location. Catch IO or network\r\n\t\t// problems.\r\n\t\ttry {\r\n\r\n\t\t\t/*\r\n\t\t\t * Call the synchronous getFromLocation() method with the latitude\r\n\t\t\t * and longitude of the current location. Return at most 1 address.\r\n\t\t\t */\r\n\t\t\taddresses = geocoder.getFromLocation(location.getLatitude(),\r\n\t\t\t\t\tlocation.getLongitude(), 1);\r\n\r\n\t\t\t// Catch network or other I/O problems.\r\n\t\t} catch (IOException exception1) {\r\n\r\n\t\t\t// Log an error and return an error message\r\n\t\t\tLog.e(\"GetAddressTask \", exception1.getMessage());\r\n\r\n\t\t\t// print the stack trace\r\n\t\t\texception1.printStackTrace();\r\n\r\n\t\t\treturn null;\r\n\r\n\t\t\t// Catch incorrect latitude or longitude values\r\n\t\t} catch (IllegalArgumentException exception2) {\r\n\r\n\t\t\texception2.printStackTrace();\r\n\r\n\t\t\t//\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// If the reverse geocode returned an address if (addresses != null &&\r\n\t\t// addresses.size() > 0) {\r\n\r\n\t\t// Get the first address\r\n\t\tAddress address = addresses.get(0);\r\n // com.ssinfo.corider.app.models.RiderLocation locationAddress = new com.ssinfo.corider.app.models.RiderLocation();\r\n // locationAddress.setLatitude(location.getLatitude());\r\n //locationAddress.setLongitude(location.getLongitude());\r\n\t\tlocation.setAddress(address.getMaxAddressLineIndex() > 0 ? address.getAddressLine(0):\"\");\r\n\t\tlocation.setCity(address.getSubAdminArea());\r\n\t\tlocation.setCountry(address.getCountryName());\r\n\t\t\r\n return location;\r\n\t}",
"@Override\n\tprotected String doInBackground(String... params) {\n\t\tgetLocation();\n\t\treturn null;\n\t}",
"@Override\r\n\t\t\tprotected List<Address> doInBackground(String... locationName) {\n\t\t\t\tGeocoder geocoder = new Geocoder(getBaseContext());\r\n\t\t\t\tList<Address> addresses = null;\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// Getting a maximum of 3 Address that matches the input text\r\n\t\t\t\t\taddresses = geocoder.getFromLocationName(locationName[0], 3);\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\treturn addresses;\r\n\t\t\t}",
"public Builder setAddress(\n java.lang.String value) {\n if (value == null) { throw new NullPointerException(); }\n address_ = value;\n bitField0_ |= 0x00000020;\n onChanged();\n return this;\n }",
"private void updateText(final String info, final String caller) {\n\t\trunOnUiThread(new Runnable() {\n\t\t\tpublic void run() {\n\n\t\t\t\tinfoText.setText(info);\n\t\t\t\tcallerText.setText(caller);\n\t\t\t}\n\t\t});\n\t}",
"public void printAddress()\r\n {\r\n address.printAddress();\r\n }",
"public void printAddress()\r\n {\r\n address.printAddress();\r\n }",
"@Override\n protected void onPostExecute(String result) {\n ParserTask parserTask = new ParserTask();\n\n // Start parsing the Google places in JSON format\n // Invokes the \"doInBackground()\" method of the class ParseTask\n parserTask.execute(result);\n }",
"protected void onPostExecute(String page) {\n textView.setText(page);\n }",
"public void getLocation() {\n if (ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this, new String[]\n {Manifest.permission.ACCESS_FINE_LOCATION},\n REQUEST_LOCATION_PERMISSION);\n } else {\n mFusedLocationClient.getLastLocation().addOnSuccessListener(\n location -> {\n if (location != null) {\n // Start the reverse geocode AsyncTask\n new FetchAddressTask(DetailsTextActivity.this,\n DetailsTextActivity.this).execute(location);\n txtLocation.setText(getString(R.string.loading));\n Log.d(\"myTag\", \"have location\");\n } else {\n txtLocation.setText(R.string.no_location);\n }\n }\n );\n }\n }",
"@Override\n protected void onReceiveResult(int resultCode, Bundle resultData) {\n mAddressOutput = resultData.getParcelable(Constants.RESULT_DATA_KEY);\n String resultMessage;\n if (resultCode == Constants.FAILURE_RESULT) {\n resultMessage = resultData.getString(Constants.RESULT_DATA_MESSAGE);\n } else {\n resultMessage = getFormattedAddress(mAddressOutput);\n }\n mAddressResult = resultMessage;\n mView.setAddress(mAddressResult, getMarkerText(mAddressOutput));\n\n mAddressRequested = false;\n updateUIWidgets();\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"@Override\n public void onPlaceSelected(Place place) {\n Log.i(TAG, \"Place: \" + place.getName());\n editTextBusinessName.setText(place.getName());\n editTextLocation.setText(place.getAddress());\n editTextPhone.setText(place.getPhoneNumber());\n barCoordinates = place.getLatLng();\n //editTextBusinessDescription.setText(place.getAttributions());\n\n }",
"public void setAddress(String address) {\r\n this.address = address;\r\n }",
"public void setAddress(String address) {\r\n this.address = address;\r\n }",
"public void setAddress(String address) {\r\n this.address = address;\r\n }",
"@Override\n public void onClick(View v) {\n String location = etPlace.getText().toString();\n \n if(location==null || location.equals(\"\")){\n Toast.makeText(getBaseContext(), \"No Place is entered\", Toast.LENGTH_SHORT).show();\n return;\n }\n else if(location!=null && !location.equals(\"\")){\n new GeocoderTask().execute(location);\n }\n \n \n }",
"@Override\n\t\tprotected void onPostExecute(String result) {\n\t\t\tif (null != pDialog && pDialog.isShowing()) {\n\t\t\t\tpDialog.dismiss();\n\t\t\t}\n\t\t\tif (result.equals(\"\"))\n\t\t\t\tclsUtility.msgBox(Outlet.this, \"Message\", \"No data received.\");\n\t\t\tlistTown1.clear();\n\t\t\tAddDataArea(result, spTown1, hmap_Town1, listTown1);\n\t\t\tspTown1.setOnItemSelectedListener(\n\t\t\t\t\tnew OnItemSelectedListener() {\n\t\t\t\t\t\tpublic void onItemSelected(\n\t\t\t\t\t\t\t\tAdapterView<?> parent, View view, int position, long id) {\n\t\t\t\t\t\t\tif(spTown1.getSelectedItem().equals(\".\")) {}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tspTown.setSelection(position);\n\t\t\t\t\t\t\t\t//BindParty\n\t\t\t\t\t\t\t\tString strQuery=\"\";\n\t\t\t\t\t\t\t\tstrQuery = \"BindDRP.ashx?Type=party&Area=\" + AreaCode +\"&Town=\"+hmap_Town1.get(parent.getItemAtPosition(position));\n\t\t\t\t\t\t\t\tnew HttpAsyncTaskParty1().execute(Url + strQuery);\n\t\t\t\t\t\t\t\tLog.e(\"qqq : \",Url+strQuery);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpublic void onNothingSelected(AdapterView<?> parent) {\n\t\t\t\t\t\t\t//Toast.makeText(getApplicationContext(),\"Spinner2: unselected\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t}",
"private void setText(final String text) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n TextView textView = findViewById(R.id.loading_text);\n if (textView != null) {\n textView.setText(textView.getText() + \"\\n\" + formatDate(System.currentTimeMillis()) + \": \" + text);\n }\n }\n });\n }",
"@Test\n public void testifyAddress() throws InterruptedException {\n onView(withId(R.id.address)).check(matches(isDisplayed()));\n }",
"public void setAddress(String address)\n {\n this.address = address;\n }",
"@Override\n protected void onPostExecute(String result) {\n tvContenidoTarea.setText(result); // txt.setText(result);\n // might want to change \"executed\" for the returned string passed\n // into onPostExecute() but that is upto you\n }",
"public void updateViews() {\n textView.setText(contactName);\n\n }",
"public void addressChanged() {\n\t\t// the variable OSCPortOut tries to get an instance of OSCPortOut\n\t\t// at the address indicated by the addressWidget\n\t\ttry {\n\t\t\toscPort =\n\t\t\t\tnew OSCPortOut(InetAddress.getByName(addressWidget.getText()));\n\t\t\t// if the oscPort variable fails to be instantiated then sent\n\t\t\t// the error message\n\t\t} catch (final Exception ex) {\n\t\t\tshowError(\"Couldn't set address\");\n\t\t}\n\t}",
"public Builder setAddress(\n\t\t\t\t\t\tjava.lang.String value) {\n\t\t\t\t\tif (value == null) {\n\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t}\n\n\t\t\t\t\taddress_ = value;\n\t\t\t\t\tonChanged();\n\t\t\t\t\treturn this;\n\t\t\t\t}",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String address) {\n this.address = address;\n }",
"public void setAddress(String adrs) {\n address = adrs;\n }",
"private void showInfo(String message){ infoLabel.setText(message);}",
"public void setAddress(final URL value) {\n this.address = value;\n }"
]
| [
"0.8295673",
"0.8040278",
"0.7362113",
"0.67496264",
"0.65874106",
"0.6389558",
"0.6274084",
"0.61685765",
"0.6153634",
"0.6146904",
"0.6138239",
"0.59590214",
"0.5912226",
"0.5872984",
"0.5832186",
"0.577763",
"0.5761276",
"0.57556725",
"0.57489127",
"0.57023287",
"0.56840324",
"0.56832194",
"0.56744903",
"0.5667413",
"0.5642702",
"0.56233305",
"0.5600699",
"0.5600272",
"0.5582511",
"0.55815434",
"0.5579623",
"0.5579623",
"0.55646724",
"0.55646724",
"0.55644053",
"0.5543044",
"0.55427116",
"0.5506404",
"0.55015504",
"0.54921454",
"0.5491194",
"0.5478792",
"0.54775107",
"0.5473023",
"0.54576975",
"0.5453473",
"0.5441227",
"0.5441227",
"0.5441227",
"0.5441227",
"0.5426627",
"0.5419498",
"0.5419037",
"0.54137945",
"0.5393956",
"0.53924984",
"0.5390852",
"0.5389262",
"0.5388719",
"0.5377879",
"0.53731096",
"0.5369856",
"0.53665096",
"0.535777",
"0.5354763",
"0.53508323",
"0.53505117",
"0.5348905",
"0.53409624",
"0.53355587",
"0.53314984",
"0.53295046",
"0.53243864",
"0.5319223",
"0.53095156",
"0.528894",
"0.528894",
"0.5286282",
"0.5283167",
"0.5278803",
"0.5278093",
"0.52739376",
"0.5270941",
"0.526045",
"0.526045",
"0.526045",
"0.524431",
"0.5244271",
"0.52408737",
"0.5238817",
"0.523654",
"0.52337533",
"0.5233284",
"0.5223343",
"0.5215451",
"0.5205502",
"0.5205502",
"0.5201181",
"0.51972395",
"0.519683"
]
| 0.6411657 | 5 |
room status, roomNumber, price , type, hotel name. | @Override
public String toString() {
String s = "user's id=" + id +"hotel Name = " + hotelName +", RoomNumber" + roomNumber+" hotelPrice=" + price + ", roomType=" + type;
return s;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void displayroomsinfo(boolean reserved , int roomtype){\n String query = \" SELECT Roomno , RoomtypeID , Hotelid\"\n + \" FROM Rooms \"\n + \" WHERE Reserved = ? and RoomtypeID = ? \"; \n String status , Roomtype ;\n Room room ;\n if(reserved == true){status = \"Reserved\" ;}\n else{status = \"Empty\";}\n if(roomtype == 1){\n Roomtype = \"Single Room\" ;\n room = new singleRoom();\n }\n else{\n Roomtype = \"Double Room\";\n room = new doubleRoom();\n }\n try {\n PreparedStatement Query = conn.prepareStatement(query);\n Query.setBoolean(1 ,reserved);\n Query.setInt(2,roomtype);\n ResultSet rs = Query.executeQuery();\n \n List<String> lst = new ArrayList<>() ;\n while(rs.next()){ \n \n String str = \" RoomNo: \" + rs.getInt(\"Roomno\") + \" Status: \"+ status +\" RoomType: \"+ Roomtype + \" Hotel ID: \" + rs.getInt(\"Hotelid\") +\"\\n\"; \n lst.add(str);\n }\n room.setinfo(lst);\n \n \n \n \n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }",
"public void displayaroominfo(int roomno ){\n String query = \" SELECT Roomno, Reserved , RoomtypeID , Hotelid\"\n + \" FROM Rooms \"\n + \" WHERE Roomno = ? \"; \n String status , Roomtype ;\n \n \n try {\n PreparedStatement Query = conn.prepareStatement(query);\n Query.setInt(1 ,roomno);\n ResultSet rs = Query.executeQuery();\n Room room;\n while(rs.next()){\n if(rs.getInt(\"RoomtypeID\") == 1){Roomtype = \"Single Room\" ;}\n else{Roomtype = \"Double Room\";}\n if(rs.getBoolean(\"Reserved\") == true){status = \"Reserved\" ;}\n else{status = \"Empty\";}\n String str = \" RoomNo: \" + rs.getInt(\"Roomno\") + \" Status: \"+ status +\" RoomType: \"+ Roomtype + \" Hotel ID: \" + rs.getInt(\"Hotelid\");\n if(rs.getInt(\"RoomtypeID\") == 1){\n room = new singleRoom();\n }else{\n room = new doubleRoom();\n }\n room.setroominfo(str);\n \n }\n \n \n } catch (SQLException ex) {\n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }",
"RoomInfo room(String name);",
"public void bookRoom(int hotelId, String roomNumber, int people){\n\n\n\n }",
"public static void showAllRoom(){\n ArrayList<Room> roomList = getListFromCSV(FuncGeneric.EntityType.ROOM);\n displayList(roomList);\n showServices();\n }",
"public Hotel(ArrayList<Room> rooms) {\n this.rooms = rooms;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"HotelSearchRoomDetail [id=\" + id + \", search_key=\" + search_key + \", api_provider=\" + api_provider\n\t\t\t\t+ \", hotelsearch_cmd=\" + Arrays.toString(hotelsearch_cmd) + \", roomstay=\" + Arrays.toString(roomstay)\n\t\t\t\t+ \"]\";\n\t}",
"public static void addNewRoom() {\n Services room = new Room();\n room = addNewService(room);\n\n ((Room) room).setFreeService(FuncValidation.getValidFreeServices(ENTER_FREE_SERVICES,INVALID_FREE_SERVICE));\n\n //Get room list from CSV\n ArrayList<Room> roomList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.ROOM);\n\n //Add room to list\n roomList.add((Room) room);\n\n //Write room list to CSV\n FuncReadWriteCSV.writeRoomToFileCSV(roomList);\n System.out.println(\"----Room \"+room.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }",
"public void displayRoomByStatus(RoomStatus status) {\n\t\tSystem.out.println(status.toString().toUpperCase() + \" ROOMS\\n\");\n\t\trooms.forEach((key,value) -> {\n\t\t\tif(value.status == status) {\n\t\t\t\tSystem.out.println(value.getDetails());\n\t\t\t}\n\t\t});\n\t}",
"RoomInfo room(int id);",
"public void giveHotelRooms(Connection connection) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n Scanner choice = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"HOTEL\", null);\n\n // Must successfully locate HOTEL and HOTEL_ADDRESS before proceeding:\n if (rs.next()){\n\n System.out.print(\"Please provide an existing hotel name: \");\n setHotelName(scan.nextLine());\n\n System.out.print(\"Please provide the existing hotel branch ID: \");\n setBranchID(Integer.parseInt(scan.nextLine()));\n\n // Loop to create room types and link to Hotel:\n do {\n createRoom(connection, new Scanner(System.in));\n System.out.println(\"Would you like to add another room type to this hotel (Y, N): \");\n } while (choice.next().toUpperCase().equals(\"Y\"));\n }\n else {\n System.out.println(\"ERROR: Error loading HOTEL Table.\");\n }\n }",
"public SingleRoom(Hotel hotel, String nomor_kamar)\n {\n // initialise instance variables\n super(hotel,nomor_kamar);\n\n }",
"public void searchHotelRoomTypes(Connection connection, String hotel_name, int branch_ID) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT type, quantity FROM Hotel_Rooms WHERE hotel_name = ? AND branch_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setHotelName(hotel_name);\n pStmt.setString(1, getHotelName());\n setBranchID(branch_ID);\n pStmt.setInt(2, getBranchID());\n\n try {\n\n System.out.printf(\" Room types available at %S, branch ID (%d)\", getHotelName(), getBranchID());\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n if(rs != null) { rs.close(); }\n }\n }",
"public String getRoomtype() {\r\n\t\treturn roomtype;\r\n\t}",
"public Room(String roomType) {\n\t\tthis.type = roomType;\n\t\tif (roomType.equals(\"double\")) {\n\t\t\tprice = 90.0;\n\t\t}\n\t\telse if (roomType.equals(\"queen\")) {\n\t\t\tprice = 110.0;\n\t\t}\n\t\telse if(roomType.equals(\"king\")) {\n\t\t\tprice = 150.0;\n\t\t}\n\t\telse {\n\t\t\tthrow new IllegalArgumentException(\"Please input one of the following room types: double, queen, or king\");\n\t\t}\n\t\tavailability = true;\n\t}",
"public void test2() {\n\t\t\n\t\tArrayList<Hotel> h = Test();\n\t\t\n\t\tDirector dir = new Director();\n\t\tDate dateIn = new Date(29,1,10);\n\t\tDate dateOut = new Date(30,1,10);\n\t\t\n\t\tArrayList<TypeOfRoom> t = h.get(0).getRoomTypes();\n\t\t\n\t\tdir.bookRoom(h.get(0), t.get(0), dateIn, dateOut);\n\t}",
"public com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.hotel.v1.Hotel getHotelReq(Hotel hotel){com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.hotel.v1.Hotel hotelReq =\n\t\t\tnew com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.hotel.v1.Hotel();\n\t\t\n\t\t//set the hotelGdsCode\n\t\thotelReq.setGdsHotelCode(hotel.getGdsHotelCode());\n\t\thotelReq.setVendorHotelCode(hotel.getVendorHotelCode());\n\t\thotelReq.setHotelId( new Integer( hotel.getHotelId() ) );\n\t\thotelReq.setHotelCode( hotel.getHotelCode() );\n\t\thotelReq.setHotelChain( hotel.getHotelChain() );\n\t\thotelReq.setHotelName( hotel.getHotelName() );\n\t\thotelReq.setNoOfRooms( new Integer( hotel.getNoOfRooms() ) );\n\t\thotelReq.setAppleRating( hotel.getAppleRating() );\n\t\thotelReq.setHbsiPNRNo(hotel.getHbsiPNR());\n\t\thotelReq.setIsHBSi(hotel.isHBSI());\n\t\tif( hotel.getCheckInDate() != null ){\n\t\t\thotelReq.setCheckInDate( this.getDate( hotel.getCheckInDate() ) );\n\t\t}\n\t\tif( hotel.getCheckOutDate() != null ){\n\t\t\thotelReq.setCheckOutDate( this.getDate( hotel.getCheckOutDate() ) );\n\t\t}\n\t\thotelReq.setMinRate( new Double(hotel.getMinRate()) );\n\t\thotelReq.setCurrency( hotel.getCurrency() );\n\t\thotelReq.setHotelCityCode( hotel.getHotelCityCode() );\n\t\thotelReq.setOriginLocation( hotel.getOriginLocation() );\n\t\thotelReq.setRiskHotel( new Boolean( hotel.isRiskHotel() ) );\n\t\thotelReq.setNoOfNights( hotel.getNoOfNights() );\n\t\thotelReq.setAppleSpecialsAndSavers( new Boolean( hotel.isAppleSpecialsAndSavers() ) ); \n\t\thotelReq.setNoOfRequestedRooms( new Integer( hotel.getNoOfRequestedRooms() ) );\n\t\tif( hotel.getOccupancy() != null ){\n\t\t\thotelReq.setOccupancy( this.getOccupancyReq( hotel.getOccupancy() ) );\n\t\t}\n\t\tif( hotel.getResortArea() != null ){\n\t\t\thotelReq.setResortArea( this.getResortAreaReq( hotel.getResortArea() ) );\n\t\t}\n\t\tif( hotel.getDisplayRoomCategory() != null ){\n\t\t\thotelReq.setDisplayRoomCategory( this.getRoomCategoryReq( hotel.getDisplayRoomCategory() ));\n\t\t}\n\t\tif( (hotel.getSelectedRooms() != null) && (hotel.getSelectedRooms().size() > 0) ){\n\t\t\tfor(int i=0; i < hotel.getSelectedRooms().size(); i++){\n\t\t\t\thotelReq.getSelectedRooms().add( this.getRoomPriceReq( hotel.getSelectedRooms().get(i) ) );\n\t\t\t}\n\t\t}\n\t\tif( (hotel.getPreselectedRooms() != null) && (hotel.getPreselectedRooms().size() > 0) ){\n\t\t\tfor(int i=0; i < hotel.getPreselectedRooms().size(); i++){\n\t\t\t\thotelReq.getPreselectedRooms().add( this.getRoomPriceReq( hotel.getPreselectedRooms().get(i) ) );\n\t\t\t}\n\t\t}\n\t\tif( (hotel.getRoomCategories() != null) && (hotel.getRoomCategories().size() > 0) ){\n\t\t\tfor(int i=0; i < hotel.getRoomCategories().size(); i++){\n\t\t\t\thotelReq.getRoomCategories().add( this.getRoomCategoryReq( hotel.getRoomCategories().get(i) ) );\n\t\t\t}\n\t\t}\n\t\tif( (hotel.getVendorServices() != null) && (hotel.getVendorServices().size() > 0) ){\n\t\t\tfor(int i=0; i < hotel.getVendorServices().size(); i++){\n\t\t\t\thotelReq.getVendorServices().add( this.getVendorServiceReq( hotel.getVendorServices().get(i) ) );\n\t\t\t}\n\t\t}\n\t\tif( (hotel.getRequestedDatesForAvailabilities() != null) && (hotel.getRequestedDatesForAvailabilities().size() > 0) ){\n\t\t\tfor(int i=0; i < hotel.getRequestedDatesForAvailabilities().size(); i++){\n\t\t\t\thotelReq.getRequestedDatesForAvailabilities().add( \n\t\t\t\t\t\tthis.getRequestedDatesForAvailabilityReq( hotel.getRequestedDatesForAvailabilities().get(i) ) );\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (hotel.getVendor() != null) {\n//\t\t\thotelReq.getVendor().setCity(hotel.getVendor().getCity()); \n\t\t\thotelReq.setVendor(this.getVendorReq(hotel.getVendor()));\n\t\t}\n\t\t\n\t\t//setting search criteria\n\t\t\n\t\tif(hotel.getSearchCriteria()!=null)\n\t\t{\n\t\t\thotelReq.setSearchCriteria(this.getSearchCriteriaReq(hotel.getSearchCriteria()));\n\t\t}\n\t\t\n\t\t//Set the Cancellation Policy\n\t\t\n\t\tif(hotel.getCancellationPolicy()!=null)\n\t\t{\n\t\t\thotelReq.getCancellationPolicy().addAll(hotel.getCancellationPolicy());\n\t\t}\n\t\t\n\t\treturn hotelReq;\n\t}",
"public void addHotel(int hotelId, List<Hotel_Room_Detail> hotelRoomDetailList){\n\n }",
"public static void main(String[] args) {\n\t\tHotel h = new Hotel();\r\n\t\tRoom r = new Room();\r\n\t\tBed b = new Bed();\r\n\t\tint totalbeds = 0;\r\n\t\tList<Room> rooms = new ArrayList<Room>();\r\n\t\tList<Bed> beds = new ArrayList<Bed>();\r\n\t\tList<Integer> bedsperroom = new ArrayList<Integer>();\r\n\t\tHotelReport report = new HotelReport();\r\n\t\t//these are the values that can change, here they are hard coded in\r\n\t\tString hotelname=\"test\";\r\n\t\tint noofrooms=5;\r\n\t\t\r\n\t\th.setName(hotelname);\r\n\t\t//iterates through the number of rooms\r\n\t\tfor (int i = 1; i <= noofrooms; i++) {\r\n\t\t\t// here if the room is vacent or not has to be set for all rooms simultaneously,\r\n\t\t\t//in reality the user would be able to input different values for each room\r\n\t\t\tint roomfree=0;\r\n\t\t\th.gotVacencies(roomfree);\r\n\t\t\t// a new room object is created and added to the array list of rooms\r\n\t\t\tRoom e = new Room();\r\n\t\t\trooms.add(e);\r\n\t\t\t//again the number of beds in each room has to be the same for each room, \r\n\t\t\t//but in the proper system the user can input different numbers\r\n\t\t\tint bedsinroom=5;\r\n\t\t\t//checks to make sure the beds in room is a vaid number\r\n\t\t\tr.checkBeds(bedsinroom);\r\n\t\t\t//adds the beds in one room to an array list\r\n\t\t\tbedsperroom.add(bedsinroom);\r\n\t\t\t//iterates through the number of beds\r\n\t\t\tfor (int i2 = 1; i2 <= bedsinroom; i2++) {\r\n\t\t\t\t//a new bed object is created and added to the list of beds\r\n\t\t\t\tBed c = new Bed();\r\n\t\t\t\tbeds.add(c);\r\n\t\t\t\t//a bed type is set. as before, in the real system a different type \r\n\t\t\t\t//can be set for each bed\r\n\t\t\t\tint x = 1;\r\n\t\t\t\tc.setBedtype(x);\r\n\t\t\t\t//a running total of the max occupency is taken\r\n\t\t\t\ttotalbeds = totalbeds + x;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//the two arrays are set\r\n\t\th.setRooms(rooms);\r\n\t\tr.setBeds(beds);\r\n\t\t//all values are fed into the report class, which outputs a formatted report\r\n\t\treport.Report(h, bedsperroom, r, totalbeds);\t\r\n\t\t\t\t\r\n\t\t\r\n\r\n}",
"public static void main(String[] args){\r\n //Student Name:Chuanxi ZHENG\r\n //Student Number:260760794\r\n //Your code goes here. \r\n System.out.println(\"Please enter the name of your hotel:\");\r\n Scanner in = new Scanner(System.in);\r\n String name = in.nextLine();\r\n Room[] roomArray = new Room[getRandomNumberOfRooms()];\r\n for(int i = 0; i<roomArray.length;i++){\r\n roomArray[i] = new Room(getRandomType());\r\n }\r\n Hotel h = new Hotel(name,roomArray);\r\n System.out.println(\"Welcome! Please choose one of the following options\");\r\n System.out.println(\"1. Make a reservation\");\r\n System.out.println(\"2. Cancel a reservation\");\r\n System.out.println(\"3. See an invoice\");\r\n System.out.println(\"4. See the hotel info\");\r\n System.out.println(\"5. Exit the booking system\");\r\n \r\n Scanner input = new Scanner(System.in);\r\n while(!input.hasNextInt()){\r\n input = new Scanner(System.in);\r\n }\r\n int choice = input.nextInt();\r\n \r\n while(choice!=5){\r\n //make a reservation\r\n if(choice == 1){\r\n System.out.println(\"Please enter your name:\");\r\n input = new Scanner(System.in);\r\n String username = input.nextLine();\r\n System.out.println(\"What type of room would you like to reserve?\");\r\n input = new Scanner(System.in);\r\n String usertype = input.nextLine();\r\n h.createReservation(username,usertype);\r\n }\r\n //cancel a reservation\r\n if(choice == 2){\r\n System.out.println(\"Please enter your name:\");\r\n input = new Scanner(System.in);\r\n String username = input.nextLine();\r\n System.out.println(\"What type of room would you want to cancel?\");\r\n input = new Scanner(System.in);\r\n String usertype = input.nextLine();\r\n h.cancelReservation(username,usertype);\r\n }\r\n //see an invoice\r\n if(choice == 3){\r\n System.out.println(\"Please enter your name:\");\r\n input = new Scanner(System.in);\r\n String username = input.nextLine();\r\n h.printInvoice(username);\r\n }\r\n //see hotel information\r\n if(choice == 4){\r\n System.out.println(h.toString());\r\n }\r\n \r\n System.out.println(\"1. Make a reservation\");\r\n System.out.println(\"2. Cancel a reservation\");\r\n System.out.println(\"3. See an invoice\");\r\n System.out.println(\"4. See the hotel info\");\r\n System.out.println(\"5. Exit the booking system\");\r\n \r\n input = new Scanner(System.in);\r\n while(!input.hasNextInt()){\r\n input = new Scanner(System.in);\r\n }\r\n choice = input.nextInt();\r\n }\r\n \r\n //Exit the booking system\r\n if(choice == 5){\r\n System.out.println(\"It was a pleasure doing business with you!\");\r\n }\r\n }",
"public void setRoom(String room) {\n\t\tthis.room = room;\n\t}",
"public void gethotelinfo(){\n String query = \"SELECT Name , HID , Income \"\n + \"FROM Hotel \" ;\n \n String query2 = \"SELECT COUNT(*) AS rowcount\"\n + \" FROM Rooms \" ;\n try {\n PreparedStatement Query = conn.prepareStatement(query);\n PreparedStatement Query2 = conn.prepareStatement(query2);\n ResultSet rs = Query.executeQuery(query);\n ResultSet rs2 = Query2.executeQuery(query2);\n String name =\"\" ;\n int HotelID = 0 , NoOfrooms=0;\n double income = 0.0 ;\n while(rs.next() && rs2.next()){\n name = rs.getString(\"Name\");\n HotelID = rs.getInt(\"HID\");\n NoOfrooms = rs2.getInt(\"rowcount\");\n income = rs.getDouble(\"Income\");\n \n }\n hotel h = new hotel(name , HotelID , income , NoOfrooms);\n \n }\n catch (SQLException ex) {\n \n Logger.getLogger(sqlcommands.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n \n }",
"public String showRoomType()\r\n {\r\n return typeOfRoom + \"\\nAntall sengeplasser: \" + nrOfBedspaces + \"\\nSenger: \" + typeOfBeds;\r\n }",
"public void setRoomType (RoomType t) {\r\n\t\tthis.type = t;\r\n\t}",
"public static void main(String[] ar){\n Room living = new Room(\"Living\");\n Room kitchen = new Room(\"Kitchen\");\n Room bathroom = new Room(\"Bathroom\");\n Room garage = new Room(\"Garage\");\n \n Room bedroom1 = new Room(\"Bedroom1\");\n Room bedroom2 = new Room(\"Bedroom2\");\n Room bathroom1stf=new Room(\"Bathroom\");\n \n \n //Living\n living.addDevice(new Device(\"Aire acondicionado\", \"LG\", \"pm07sp\", true));\n living.addDevice(new Device(\"Luces\", \"Philips\", \"Hue\", true));\n //Kitchen\n kitchen.addDevice(new Device(\"luces\",\"Ahorradoras\",\"34234\", true));\n //Bathroom\n bathroom.addDevice(new Device(\"luce\",\"simple\",\"354676\", true));\n //Garage\n garage.addDevice(new Device(\"lightbulb\",\"the best\",\"X3000\",true));\n \n //Bedroom 1\n bedroom1.addDevice(new Device(\"Aire acondicionado\", \"Mabe\" , \"Mmt12cdbs3\", true));\n bedroom1.addDevice(new Device(\"Luces\",\"Philips\",\"EcoVantage\",true));\n \n //Bedroom 2\n bedroom2.addDevice(new Device(\"Aire acondicionado\", \"Hisense\" , \"AS-12CR5FVETD/1TR\", true));\n bedroom2.addDevice(new Device(\"Luces\",\"Ho Iluminacion\",\"A19 60W Claro\",true));\n \n //baño primer piso\n bathroom1stf.addDevice(new Device(\"Luces\",\"Alefco\",\"lw100\",true));\n \n \n \n Level groundFloor = new Level(\"Ground Floor\");\n Level firstFloor = new Level(\"First Floor\");\n \n \n groundFloor.addRoom(living);\n groundFloor.addRoom(kitchen);\n groundFloor.addRoom(bathroom);\n groundFloor.addRoom(garage);\n \n firstFloor.addRoom(bedroom1);\n firstFloor.addRoom(bedroom2);\n firstFloor.addRoom(bathroom1stf);\n \n\n House myhouse = new House(\"MyHome\");\n \n myhouse.addLevel(groundFloor);\n myhouse.addLevel(firstFloor);\n \n System.out.println(myhouse);\n \n \n /*\n room.addDevice(new Device(\"Reynaldo\", \"LG\", \"123456\", true));\n room.addDevice(new Device(\"Andrea\", \"Nokia\", \"Lumia-520\", true));\n room.addDevice(new Device(\"Karina\",\"Panasonic\",\"465464\", true));\n room.addDevice(new Device(\"Martin\", \"ZTE\", \"V7\",true));\n room.addDevice(new Device(\"Antonio\",\"Samsung\",\"J5\",true));\n room.addDevice(new Device(\"Roberto\",\"HP\",\"SpectreX360\",true));\n room.addDevice(new Device(\"Gabriel\",\"Linu\",\"Ilium_S106\",true));\n room.addDevice(new Device (\"Limberth\",\"LG\", \"lg-206\",true));\n room.addDevice(new Device(\"jesus\", \"hp\",\"2997\", true));\n room.addDevice(new Device(\"Rich\", \"Asus\",\"Zenfone_4_Max\",true));\n room.addDevice(new Device(\"Adrian\",\"Apple\",\"SE\",true));\n room.addDevice(new Device (\"Jonatan\",\"samsung\",\"J5\",true));\n room.addDevice(new Device(\"Jessica\", \"Huaweii\", \"P9LITE\", true));\n */\n \n \n \n \n \n }",
"public String getRoom() {\r\n return room;\r\n }",
"public String getName() {\n\t return roomType;\n }",
"public void updateAvailability(String type) {\n\t\tString title = \"\";\n\t\tif (startDate != null & endDate != null) {\n\t\t\ttitle = \"Available Rooms \" + formatDate(startDate) + \" - \" + formatDate(endDate);\n\t\t}\n\t\tavailabilityDisplay.setText(guestModel.getRooms(type));\n\n\t\tavailabilityLabel.setText(title);\n\t\tadd(availabilityLabel);\n\t}",
"public Bedroom(int number, int capacity , TypesOfBedrooms type, int nightlyrate) {\n super(capacity);\n this.number = number;\n this.type = type;\n this.nightlyrate = nightlyrate;\n this.guests = new ArrayList<Guest>();\n }",
"public void setRoomtype(String roomtype) {\r\n\t\tthis.roomtype = roomtype;\r\n\t}",
"Room getRoom();",
"Room getRoom();",
"public com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.roomprice.v1.RoomPrice getRoomPriceReq(RoomPrice roomPrice){com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.roomprice.v1.RoomPrice roomPriceReq =\n\t\t\tnew com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.roomprice.v1.RoomPrice();\n\t\t\n\t\t\t\t//Setting two more fields to hold transfer cost and hotel cost\n\t\t\troomPriceReq.setHotelCost(roomPrice.getHotelCost());\n\t\t\troomPriceReq.setTransferCost(roomPrice.getTransferCost());\n\t\n\t\n\t\n\t\troomPriceReq.setHotelId( new Integer( roomPrice.getHotelId() ) );\n\t\troomPriceReq.setRoomCategoryId( new Integer( roomPrice.getRoomCategoryId() ) );\n\t\troomPriceReq.setRoomId( new Byte( roomPrice.getRoomId() ) );\n\t\troomPriceReq.setTotalAmount( new Double( roomPrice.getTotalAmount() ) );\n\t\troomPriceReq.setTax( new Double( roomPrice.getTax() ) );\n\t\troomPriceReq.setCommissionAmount( new Double( roomPrice.getCommissionAmount() ) );\n\t\troomPriceReq.setCommissionPercent( new Double( roomPrice.getCommissionPercent() ) );\n\t\troomPriceReq.setLateFee( new Double( roomPrice.getLateFee() ) );\n\t\troomPriceReq.setFreeNights( new Integer( roomPrice.getFreeNights() ) );\n\t\troomPriceReq.setPromoSavingsAmount( new Double( roomPrice.getPromoSavingsAmount() ) );\n\t\troomPriceReq.setSavings( new Double( roomPrice.getSavings() ) );\n\t\troomPriceReq.setCurrency( roomPrice.getCurrency() );\n\t\troomPriceReq.setPriceChanged( new Boolean( roomPrice.isPriceChanged() ) );\n\t\troomPriceReq.setGuestAllocation( roomPrice.getGuestAllocation() );\n\t\troomPriceReq.setPackagePrice( new Double( roomPrice.getPackagePrice() ) );\n\t\troomPriceReq.setPerAdultBasePrice( new Double( roomPrice.getPerAdultBasePrice() ) );\n\t\troomPriceReq.setPerAdultBasePriceSavings( new Double( roomPrice.getPerAdultBasePriceSavings() ) );\n\t\tif( roomPrice.getPaxBasePrices() != null ){\n\t\t\troomPriceReq.setPaxBasePrices( this.getPaxTypeBasePricesReq( roomPrice.getPaxBasePrices() ) );\n\t\t}\n\t\tif( (roomPrice.getPaxTypePriceBreakups() != null) && (roomPrice.getPaxTypePriceBreakups().size() > 0) ){\n\t\t\tfor(int i=0; i < roomPrice.getPaxTypePriceBreakups().size(); i++){\n\t\t\t\troomPriceReq.getPaxTypePriceBreakups().add( this.getPaxTypePriceBreakupReq(roomPrice.getPaxTypePriceBreakups().get(i)) );\n\t\t\t}\n\t\t}\n\t\n\t\treturn roomPriceReq;\n\t}",
"public String getRoomTypeId() {\n return this.room_type_id;\n }",
"public RoomPrice getRoomPrice(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.roomprice.v1.RoomPrice res){\n\t\tRoomPrice roomPrice = new RoomPrice();\n\t\t\n\t\t//setting two more new fields to hold hotelCost and transfer cost\n\t\troomPrice.setHotelCost(res.getHotelCost());\n\t\troomPrice.setTransferCost(res.getTransferCost());\n\t\t\n\t\t\n\t\troomPrice.setCurrency( res.getCurrency() );\n\t\troomPrice.setGuestAllocation( res.getGuestAllocation() );\n\t\tif( res.getHotelId() != null ){\n\t\t\troomPrice.setHotelId( res.getHotelId() );\n\t\t}\n\t\tif( res.getRoomCategoryId() != null ){\n\t\t\troomPrice.setRoomCategoryId( res.getRoomCategoryId().intValue() );\n\t\t}\n\t\tif( res.getFreeNights() != null ){\n\t\t\troomPrice.setFreeNights( res.getFreeNights().intValue() );\n\t\t}\n\t\tif( res.getRoomId() != null ){\n\t\t\troomPrice.setRoomId( res.getRoomId().byteValue() );\n\t\t}\n\t\tif( res.isPriceChanged() != null ){\n\t\t\troomPrice.setPriceChanged( res.isPriceChanged().booleanValue() );\n\t\t}\n\t\tif( res.getPromoSavingsAmount() != null ){\n\t\t\troomPrice.setPromoSavingsAmount( res.getPromoSavingsAmount().doubleValue() );\n\t\t}\n\t\tif( res.getSavings() != null ){\n\t\t\troomPrice.setSavings( res.getSavings().doubleValue() );\n\t\t}\n\t\tif( res.getTotalAmount() != null ){\n\t\t\troomPrice.setTotalAmount( res.getTotalAmount().doubleValue() );\n\t\t}\n\t\tif( res.getTax() != null ){\n\t\t\troomPrice.setTax( res.getTax().doubleValue() );\n\t\t}\n\t\tif( res.getCommissionAmount() != null ){\n\t\t\troomPrice.setCommissionAmount( res.getCommissionAmount().doubleValue() );\n\t\t}\n\t\tif( res.getCommissionPercent() != null ){\n\t\t\troomPrice.setCommissionPercent( res.getCommissionPercent().doubleValue() );\n\t\t}\n\t\tif( res.getLateFee() != null ){\n\t\t\troomPrice.setLateFee( res.getLateFee().doubleValue() );\n\t\t}\n\t\tif( res.getPackagePrice() != null ){\n\t\t\troomPrice.setPackagePrice( res.getPackagePrice().doubleValue() );\n\t\t}\n\t\tif( res.getPerAdultBasePrice() != null ){\n\t\t\troomPrice.setPerAdultBasePrice( res.getPerAdultBasePrice().doubleValue() );\n\t\t}\n\t\tif( res.getPerAdultBasePriceSavings() != null ){\n\t\t\troomPrice.setPerAdultBasePriceSavings( res.getPerAdultBasePriceSavings().doubleValue() );\n\t\t}\n\t\tif( res.getPaxBasePrices() != null ){\n\t\t\troomPrice.setPaxBasePrices( this.getPaxTypeBasePrices( res.getPaxBasePrices() ) );\n\t\t}\n\t\tif( (res.getPaxTypePriceBreakups() != null) && (res.getPaxTypePriceBreakups().size() > 0) ){\n\t\t\tList<PaxTypePriceBreakup> paxTypePriceBreakups = new ArrayList<PaxTypePriceBreakup>();\n\t\t\tfor(int i=0; i < res.getPaxTypePriceBreakups().size(); i++){\n\t\t\t\tif( res.getPaxTypePriceBreakups().get(i) != null )\n\t\t\t\tpaxTypePriceBreakups.add( this.getPaxTypePriceBreakup( res.getPaxTypePriceBreakups().get(i) ) );\n\t\t\t}\n\t\t\troomPrice.setPaxTypePriceBreakups(paxTypePriceBreakups);\n\t\t}\n\t\tif(res.getInitialPrice()!=null)\n\t\t{\n\t\troomPrice.setInitialPrice(this.getInitialRoomPrice(res.getInitialPrice()) );\n\t\t}\n\t\t\n\t\treturn roomPrice;\n\t}",
"private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }",
"public void createRooms()\n {\n Room outside,bedroom, bathroom, hallway1, hallway2, spareroom, kitchen, fridge;\n\n // create the rooms\n bedroom = new Room(\"Bedroom\", \"your bedroom. A simple room with a little bit too much lego\");\n bathroom = new Room(\"Bathroom\", \"the bathroom where you take your business calls. Also plenty of toilet paper\");\n hallway1 = new Room(\"Hallway1\", \"the hallway outside your room, there is a dog here blocking your path. Youll need to USE something to distract him\");\n hallway2 = new Room(\"Hallway2\", \"the same hallway? This part leads to the spare room and kitchen\");\n spareroom = new Room(\"Spare room\", \"the spare room. This is for guests\");\n kitchen = new Room(\"Kitchen\", \"your kitchen. There is a bowl with cereal in it waiting for you,But its still missing some things\");\n fridge = new Room (\"Walk in Fridge\", \"a walkin fridge. Have you ever seen Ratatouille? Its like that\");\n outside = new Room(\"Outside\", \"the outside world, breathe it in\");\n \n \n Item toiletPaper, milk, spoon, poison;// creates the items and sets their room\n \n toiletPaper = new Item(\"Toilet-Paper\", hallway1);\n toiletPaper.setDescription(\"Just your standard bog roll. Dont let your dog get a hold of it\");\n bathroom.setItems(\"Toilet-Paper\",toiletPaper);\n \n milk = new Item(\"Milk\", kitchen);\n milk.setDescription(\"white and creamy, just like mama used to make\");\n fridge.setItems(\"Milk\", milk);\n \n spoon = new Item(\"Spoon\", kitchen);\n spoon.setDescription(\"Like a fork but for liquids\");\n spareroom.setItems(\"Spoon\", spoon);\n \n poison = new Item(\"Poison\", outside);\n poison.setDescription(\"This will probably drain all of your energy, dont USE it\");\n outside.setItems(\"Poison\", poison);\n \n // initialise room exits\n bedroom.setExit(\"east\", bathroom);\n bedroom.setExit(\"north\", hallway1);\n \n bathroom.setExit(\"west\", bedroom);\n \n hallway1.setExit(\"south\", bedroom);\n hallway1.setExit(\"north\", hallway2);\n \n hallway2.setExit(\"south\", hallway1);\n hallway2.setExit(\"west\", spareroom);\n hallway2.setExit(\"north\", kitchen);\n \n spareroom.setExit(\"east\", hallway2);\n \n kitchen.setExit(\"east\", outside);\n kitchen.setExit(\"west\", fridge);\n \n fridge.setExit(\"east\", kitchen);\n \n \n outside.setExit(\"west\", kitchen);\n \n\n this.currentRoom = bedroom; // start game in bedroom\n \n }",
"public void setRoomno(String roomno) {\n this.roomno = roomno;\n }",
"public int getRoom(){\n\t\treturn room;\n\t}",
"public String getRoomno() {\n return roomno;\n }",
"RoomInfo getRoomInfo(int roomId) throws IOException;",
"Room mo12151c();",
"public String getRoomStatus() {\n if (isOccupied()) {\r\n return \"Occupied\";\r\n } else {\r\n return \"Unoccupied\";\r\n }\r\n }",
"public String getRoomType() {\n\t\treturn \"class room\";\n\t}",
"public void createHotel(String name, int numberSingleRooms,int numberDoubleRooms, double priceSingleRooms,\r\n\t\t\tdouble priceDoubleRooms, int category, UUID userID, int postalCode, String adress) {\r\n\t\tif(session instanceof Hotelier) {\t\t// nur erlaubt für Hoteliers\r\n\t\t\tHotel hotel=new Hotel(name, numberSingleRooms, numberDoubleRooms, priceSingleRooms, \r\n\t\t\t\t\tpriceDoubleRooms, category, userID, postalCode, adress);\r\n\t\t\tfor (int i=0;i<numberDoubleRooms;i++) {\t\t\t// erstelllt und speichert die Zimmer des Hotels (param: HotelID, RoomType, bookedDates)\r\n\t\t\t\tcreateRoom(hotel.getHotelID(),0, new ArrayList <DateTime>());\r\n\t\t\t}\r\n\t\t\tfor (int i=0;i<numberSingleRooms;i++) {\r\n\t\t\t\tcreateRoom(hotel.getHotelID(),1, new ArrayList <DateTime>());\r\n\t\t\t}\t\t\r\n\t\t\thotelDAO.saveHotel(hotel);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnew IllegalArgumentException(\"Die Aktion 'createHotel' kann nur von einem Hotelier durchgeführt werden.\");\r\n\t\t}\r\n\t}",
"@Override\n\tpublic List<HotelroomPo> getHotelroomByroomType(String roomType) {\n\t\t\n\t\tList<HotelroomPo> hotelrooms = new ArrayList<HotelroomPo>();\n\t\tIterator<Entry<String, HotelroomPo>> iterator = map.entrySet().iterator();\n\t\twhile(iterator.hasNext()){\n\t\t\tEntry<String, HotelroomPo> entry = iterator.next();\n\t\t\tHotelroomPo hotelroomPo = entry.getValue();\n\t\t\t\n\t\t\tif(hotelroomPo.getRoomType().equals(roomType))\n\t\t\t\thotelrooms.add(hotelroomPo);\n\t\t}\n\t\treturn hotelrooms;\n\t}",
"public void setRoomstatusid(Integer roomstatusid) {\r\n this.roomstatusid = roomstatusid;\r\n }",
"public Hotel getHotel(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.hotel.v1.Hotel res ){\n\t\tHotel hotel = new Hotel();\n\t\t\n\t\t//set the gdsHotelCode\n\t\thotel.setGdsHotelCode(res.getGdsHotelCode());\n\t\thotel.setVendorHotelCode(res.getVendorHotelCode());\n\t\thotel.setHotelCode( res.getHotelCode() );\n\t\thotel.setHotelChain( res.getHotelChain() );\n\t\thotel.setHotelName( res.getHotelName() );\n\t\thotel.setAppleRating( res.getAppleRating() );\n\t\thotel.setCurrency( res.getCurrency() );\n\t\thotel.setHotelCityCode( res.getHotelCityCode() );\n\t\thotel.setOriginLocation( res.getOriginLocation() );\n\t\thotel.setNoOfNights( res.getNoOfNights() ); \n\t\thotel.setHbsiPNR(res.getHbsiPNRNo());\n\t\thotel.setHBSI(res.isIsHBSi()!=null?res.isIsHBSi():false);\n\n\t\tif( res.getHotelId() != null ){\n\t\t\thotel.setHotelId( res.getHotelId().intValue() );\n\t\t}\n\t\tif( res.getNoOfRequestedRooms() != null ){\n\t\t\thotel.setNoOfRequestedRooms( res.getNoOfRequestedRooms().intValue() );\n\t\t}\n\t\tif( res.getNoOfRooms() != null ){\n\t\t\thotel.setNoOfRooms( res.getNoOfRooms().intValue() );\n\t\t}\n\t\tif( res.getMinRate() != null ){\n\t\t\thotel.setMinRate( res.getMinRate().doubleValue() );\n\t\t}\n\t\tif( res.isAppleSpecialsAndSavers() != null ){\n\t\t\thotel.setAppleSpecialsAndSavers( res.isAppleSpecialsAndSavers().booleanValue() );\n\t\t}\n\t\tif( res.isRiskHotel() != null ){\n\t\t\thotel.setRiskHotel( res.isRiskHotel().booleanValue() );\n\t\t}\n\t\tif( res.getCheckInDate() != null ){\n\t\t\thotel.setCheckInDate( this.getDate( res.getCheckInDate() ) );\n\t\t}\n\t\tif( res.getCheckOutDate() != null ){\n\t\t\thotel.setCheckOutDate( this.getDate( res.getCheckOutDate() ) );\n\t\t}\n\t\tif( res.getVendor() != null ){\n\t\t\thotel.setVendor( this.getVendor( res.getVendor()) );\n\t\t}\n\t\tif( res.getOccupancy() != null ){\n\t\t\thotel.setOccupancy( this.getOccupancy( res.getOccupancy() ) );\n\t\t}\n\t\tif( res.getResortArea() != null ){\n\t\t\thotel.setResortArea( this.getResortArea( res.getResortArea() ) );\n\t\t}\n\t\tif( res.getDisplayRoomCategory() != null ){\n\t\t\thotel.setDisplayRoomCategory( this.getRoomCategory( res.getDisplayRoomCategory() ) );\n\t\t}\n\t\tif( (res.getPreselectedRooms() != null) && (res.getPreselectedRooms().size() > 0) ){\n\t\t\tList<RoomPrice> preselectedRooms = new ArrayList<RoomPrice>();\n\t\t\tfor(int i=0; i < res.getPreselectedRooms().size(); i++){\n\t\t\t\tif( res.getPreselectedRooms().get(i) != null ){\n\t\t\t\t\tpreselectedRooms.add( this.getRoomPrice( res.getPreselectedRooms().get(i) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\thotel.setPreselectedRooms(preselectedRooms);\n\t\t}\n\t\tif( (res.getSelectedRooms() != null) && (res.getSelectedRooms().size() > 0) ){\n\t\t\tList<RoomPrice> selectedRooms = new ArrayList<RoomPrice>();\n\t\t\tfor(int i=0; i < res.getSelectedRooms().size(); i++){\n\t\t\t\tif( res.getSelectedRooms().get(i) != null ){\n\t\t\t\t\tselectedRooms.add( this.getRoomPrice( res.getSelectedRooms().get(i) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\thotel.setSelectedRooms(selectedRooms);\n\t\t}\n\t\tif( (res.getRequestedDatesForAvailabilities() != null) && (res.getRequestedDatesForAvailabilities().size() > 0) ){\n\t\t\tList<RequestedDatesForAvailability> requestedDatesForAvailabilities = \n\t\t\t\t\t\t\tnew ArrayList<RequestedDatesForAvailability>();\n\t\t\tfor(int i=0; i < res.getRequestedDatesForAvailabilities().size(); i++){\n\t\t\t\tif( res.getRequestedDatesForAvailabilities().get(i) != null ){\n\t\t\t\t\trequestedDatesForAvailabilities.add( this.getRequestedDatesForAvailability( res.getRequestedDatesForAvailabilities().get(i) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\thotel.setRequestedDatesForAvailabilities(requestedDatesForAvailabilities);\n\t\t}\n\t\tif( (res.getRoomCategories() != null) && (res.getRoomCategories().size() > 0) ){\n\t\t\tList<RoomCategory> roomCategories = new ArrayList<RoomCategory>();\n\t\t\tfor(int i=0; i < res.getRoomCategories().size(); i++){\n\t\t\t\tif( res.getRoomCategories().get(i) != null ){\n\t\t\t\t\troomCategories.add( this.getRoomCategory( res.getRoomCategories().get(i) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\thotel.setRoomCategories(roomCategories);\n\t\t}\n\t\tif( (res.getVendorServices() != null) && (res.getVendorServices().size() > 0) ){\n\t\t\tList<VendorService> vendorServices = new ArrayList<VendorService>();\n\t\t\tfor(int i=0; i < res.getVendorServices().size(); i++){\n\t\t\t\tif( res.getVendorServices().get(i) != null ){\n\t\t\t\t\tvendorServices.add( this.getVendorService( res.getVendorServices().get(i) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\thotel.setVendorServices(vendorServices);\n\t\t}\n\t\t\n\t\t//set cancellation policy\n\t\t\n\t\tif(res.getCancellationPolicy()!=null && res.getCancellationPolicy().size()>0)\n\t\t//if(res.getCancellationPolicy()==null)\n\t\t{\n\t\t\t\n\t\t\thotel.setCancellationPolicy(res.getCancellationPolicy());\n\t\t\n\t\t}\n\t\t\n\t\treturn hotel;\n\t}",
"private static void initialise(Room[] hotel) {\n for (int x = 0; x < hotel.length; x++) {\n hotel[x].setName(\"Empty\");\n }\n }",
"public int get_booking_room_id() {\n return room_id;\n }",
"public RoomType getRoomType() {\r\n\t\treturn this.type;\r\n\t}",
"public void populateRooms(){\n }",
"@Override\r\n\tpublic ErrorCode reserveRoom(\r\n\t\t\tString guestID, String hotelName, RoomType roomType, SimpleDate checkInDate, SimpleDate checkOutDate,\r\n\t\t\tlong resID) {\n\t\tErrorAndLogMsg m = clientProxy.reserveHotel(\r\n\t\t\t\tguestID, hotelName, roomType, checkInDate, checkOutDate, \r\n\t\t\t\t(int)resID);\r\n\t\t\r\n\t\tSystem.out.print(\"RESERVE INFO:\");\r\n\t\tm.print(System.out);\r\n\t\tSystem.out.println(\"\");\r\n\t\t\r\n\t\treturn m.errorCode();\r\n\t}",
"public Room (String number, int seatingCapacity, String roomT){\r\n this.number = number;\r\n this.seatingCapacity = seatingCapacity;\r\n this.roomType= roomT;\r\n }",
"public String convertRoomType(){\r\n String str = null;\r\n if (this.roomType == Room.ROOM_TYPE_BASIC_ROOM){\r\n str = \"Basic Room\";\r\n }\r\n if (this.getRoomType() == Room.ROOM_TYPE_JUNIOR_SUITE) {\r\n str = \"Junior Suite\";\r\n }\r\n if (this.getRoomType() == Room.ROOM_TYPE_FULL_SUITE) {\r\n str = \"Full Suite\";\r\n }\r\n return str;\r\n }",
"@Override\n public String getRoomType()\n {\n return room.getRoomType() + \" + \" + service;\n }",
"public void setRoomtypeid(Integer roomtypeid) {\n this.roomtypeid = roomtypeid;\n }",
"private void printRoomInfo(Room room, List<String> retirevedInRoom, StringBuilder sb) {\n sb.append(room.getId());\n insertSpacing(sb, room.getId().toString());\n sb.append(room.getName());\n insertSpacing(sb, room.getName());\n if (CollectionUtils.isNotEmpty(retirevedInRoom)) {\n for (String obj : retirevedInRoom) {\n sb.append(obj);\n sb.append(\" \");\n }\n } else {\n sb.append(\"None\");\n }\n sb.append(NEWLINE);\n }",
"public List<TblReservationRoomTypeDetailRoomPriceDetail>getAllDataReservationRoomPriceDetailByIDReservation(long id);",
"SrHotelRoomInfo selectByPrimaryKey(Long id);",
"private static void viewRooms() \n {\n String option, roomCode;\n\n displayMyRooms(\" \");\n\n Scanner input = new Scanner(System.in);\n\n System.out.print(\"Type (v)iew [room code] or \"\n + \"(r)eservations [room code], or (q)uit to exit: \");\n \n option = input.next().toLowerCase();\n \n while (!option.equals(\"q\"))\n {\n if (option.equals(\"v\") || option.equals(\"r\"))\n {\n System.out.print(\"Enter a room code: \");\n roomCode = \" '\" + input.next().toUpperCase() + \"'\";\n\n if(option.equals(\"v\"))\n displayDetailedRooms(roomCode);\n else\n displayDetailedReservations(\"WHERE ro.RoomId = \" + roomCode);\n }\n\n System.out.print(\"Type (v)iew [room code] or \"\n + \"(r)eservations [room code], or (q)uit to exit: \");\n \n option = input.next().toLowerCase();\n }\n \n }",
"@RequestMapping(value = \"/room/{id_hotel}/{room_no}\", method = RequestMethod.GET)\n public Room getRoom(@PathVariable int id_hotel,\n @PathVariable String room_no){\n Room kamar = DatabaseRoom.getRoom(DatabaseHotel.getHotel(id_hotel), room_no);\n return kamar;\n }",
"public PremiumRoom(Hotel hotel, String nomor_kamar)\r\n {\r\n super(hotel, nomor_kamar);\r\n }",
"void updateRoomStatus(long roomId, int status);",
"public String getRoomnumber() {\r\n return roomnumber;\r\n }",
"@Override\n public String toString() {\n return \"Floor: \" + floor + \" Total Price: \" + price + \" Vehicle Type: \" + vehicleType + \" Hours: \" + hours; \n }",
"public void getAllSingleRoom() {\n\t\t for(SuiteRoom elem: suiteroom)\n\t {\n\t \t System.out.println (\"capacité : \" +elem.getCapacity());\n\t \t System.out.println (\"prix : \" +elem.getPrice());\n\t \t System.out.println (\"numéro : \" +elem.getIdRoom());\n\t \t System.out.println (\"nom : \" +elem.getName());\n\t \tSystem.out.println (\"-------------------\");\n\t \t \n\t }\n\t}",
"public String getRoom() {\n\t\treturn room;\n\t}",
"public String toString(){\n\t\t\tString x = (roomnumber + \" \" + nop + \" \" + equipment + \" \" + price + \" \" + priceoffer + \" \" + rating);\n\t\t\treturn x;\n\t\t}",
"private static void createRooms() {\n// Room airport, beach, jungle, mountain, cave, camp, raft, seaBottom;\n\n airport = new Room(\"airport\");\n beach = new Room(\"beach\");\n jungle = new Room(\"jungle\");\n mountain = new Room(\"mountain\");\n cave = new Room(\"cave\");\n camp = new Room(\"camp\");\n seaBottom = new Room(\"seabottom\");\n\n //Setting the the exits in different rooms\n beach.setExit(\"north\", jungle);\n beach.setExit(\"south\", seaBottom);\n beach.setExit(\"west\", camp);\n\n jungle.setExit(\"north\", mountain);\n jungle.setExit(\"east\", cave);\n jungle.setExit(\"south\", beach);\n\n mountain.setExit(\"south\", jungle);\n\n cave.setExit(\"west\", jungle);\n\n camp.setExit(\"east\", beach);\n\n seaBottom.setExit(\"north\", beach);\n\n // Starting room\n currentRoom = airport;\n }",
"public Integer getRoomtypeid()\n {\n return roomtypeid; \n }",
"private Room createRooms(){\n Room inicio, pasilloCeldas, celdaVacia1,celdaVacia2, pasilloExterior,vestuarioGuardias, \n comedorReclusos,enfermeria,ventanaAbierta,salidaEnfermeria,patioReclusos,tunelPatio,salidaPatio;\n\n Item mochila,medicamentos,comida,itemInutil,itemPesado;\n mochila = new Item(\"Mochila\",1,50,true,true);\n medicamentos = new Item(\"Medicamentos\",5,10,true,false);\n comida = new Item(\"Comida\",2,5,true,false);\n itemInutil = new Item(\"Inutil\",10,0,false,false);\n itemPesado = new Item(\"Pesas\",50,0,false,false);\n\n // create the rooms\n inicio = new Room(\"Tu celda de la prision\");\n pasilloCeldas = new Room(\"Pasillo donde se encuentan las celdas\");\n celdaVacia1 = new Room(\"Celda vacia enfrente de la tuya\");\n celdaVacia2 = new Room(\"Celda de tu compaņero, esta vacia\");\n pasilloExterior = new Room(\"Pasillo exterior separado de las celdas\");\n vestuarioGuardias = new Room(\"Vestuario de los guardias de la prision\");\n comedorReclusos = new Room(\"Comedor de reclusos\");\n enfermeria = new Room(\"Enfermeria de la prision\");\n ventanaAbierta = new Room(\"Saliente de ventana de la enfermeria\");\n salidaEnfermeria = new Room(\"Salida de la prision por la enfermeria\");\n patioReclusos = new Room(\"Patio exterior de los reclusos\");\n tunelPatio = new Room(\"Tunel escondido para escapar de la prision\");\n salidaPatio = new Room(\"Salida de la prision a traves del tunel del patio\");\n\n // initialise room items\n\n comedorReclusos.addItem(\"Comida\",comida);\n enfermeria.addItem(\"Medicamentos\",medicamentos);\n pasilloCeldas.addItem(\"Inutil\",itemInutil);\n patioReclusos.addItem(\"Pesas\",itemPesado);\n vestuarioGuardias.addItem(\"Mochila\",mochila);\n\n // initialise room exits\n\n inicio.setExits(\"east\", pasilloCeldas);\n pasilloCeldas.setExits(\"north\",pasilloExterior);\n pasilloCeldas.setExits(\"east\",celdaVacia1);\n pasilloCeldas.setExits(\"south\",patioReclusos);\n pasilloCeldas.setExits(\"west\",inicio);\n pasilloCeldas.setExits(\"suroeste\",celdaVacia2);\n celdaVacia1.setExits(\"west\", pasilloCeldas);\n pasilloExterior.setExits(\"north\",comedorReclusos);\n pasilloExterior.setExits(\"west\",enfermeria);\n pasilloExterior.setExits(\"east\",vestuarioGuardias);\n comedorReclusos.setExits(\"south\", pasilloExterior);\n enfermeria.setExits(\"east\",pasilloExterior);\n enfermeria.setExits(\"south\", ventanaAbierta);\n ventanaAbierta.setExits(\"north\",enfermeria);\n ventanaAbierta.setExits(\"south\", salidaEnfermeria);\n patioReclusos.setExits(\"north\", pasilloCeldas);\n patioReclusos.setExits(\"east\", tunelPatio);\n tunelPatio.setExits(\"east\",salidaPatio);\n tunelPatio.setExits(\"west\", patioReclusos);\n // casilla de salida\n\n return inicio;\n }",
"public void setHotel(Hotel hotel) {\n this.hotel = hotel;\n }",
"public void setHotel(Hotel hotel) {\n this.hotel = hotel;\n }",
"public Room(String roomName) {\n guests = new ArrayList<>();\n roomTier = null;\n this.roomName = roomName;\n this.roomId = RoomId.generate(roomName);\n }",
"void setRoomId(String roomId);",
"public void setRoom(Room room) {\r\n\t\tthis.room = room;\r\n\t}",
"private void createRoom(Connection connection, Scanner scan) throws SQLException {\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs1 = dmd.getTables(null, null, \"ROOM\", null);\n ResultSet rs2 = dmd.getTables(null, null, \"HOTEL_ROOMS\", null);\n\n if (rs1.next() && rs2.next()){\n\n String sql = \"INSERT INTO Room VALUES (?, ?, ?, ?)\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n pStmt.setString(1, getHotelName());\n pStmt.setInt(2, getBranchID());\n\n System.out.print(\"Please provide the room type a name: \");\n setType(scan.nextLine());\n pStmt.setString(3, getType());\n\n System.out.print(\"Please provide a guest capacity for this type: \"); // branch id, room type, capacity\n setCapacity(Integer.parseInt(scan.nextLine()));\n pStmt.setInt(4, getCapacity());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { e.printStackTrace(); }\n finally {\n pStmt.close();\n rs1.close();\n rs2.close();\n }\n\n linkHotelRoom(connection, scan);\n }\n else {\n System.out.println(\"ERROR: Error loading ROOM or HOTEL_ROOMS Table.\");\n }\n }",
"public void getHotelRoomData_DB() throws SQLException{\n \n myHotel = new Room[50]; // initialize size of array of hotel rooms\n roomCounter = 0;\n \n stmt = con.createStatement();\n\n rs = stmt.executeQuery(\"SELECT * FROM APP.HOTELROOMS\");\n \n while (rs.next()){\n int roomNum = rs.getInt(\"ROOMNUMBER\");\n String roomType = rs.getString(\"ROOMTYPE\");\n int bedsNum = rs.getInt(\"BEDS\");\n int roomPrice = rs.getInt(\"PRICE\");\n boolean roomAvailability = rs.getBoolean(\"ISAVAILABLE\");\n String currentGuest = rs.getString(\"OCCUPANT\");\n int currentGuestID = rs.getInt(\"GUESTID\");\n String roomStartDate = rs.getString(\"STARTDATE\");\n String roomEndDate = rs.getString(\"ENDDATE\");\n \n myHotel[roomCounter] = new Room();\n \n //this will set the values above to the array guest.\n myHotel[roomCounter].setHotelRoom(roomNum, roomType, bedsNum, \n roomPrice, roomAvailability, currentGuest, \n currentGuestID,roomStartDate,roomEndDate);\n \n roomCounter++;\n \n System.out.println(roomNum + \" \" + roomType + \" \" + bedsNum + \" \"\n + roomPrice + \" \" + roomAvailability + \" \" + currentGuest+ \" \" \n + currentGuestID + \" \" + roomStartDate + \" \" + roomEndDate );\n }\n stmt.close();\n }",
"public String getRoomTypeDescription() {\n return this.room_type_description;\n }",
"private static void demo2() throws RemoteException {\n\t\tCheckOutRoomService service = new CheckOutRoomServiceImpl();\r\n\t\tString clientID = \"0000001\";\r\n\t\tString hotelID = \"00001\";\r\n\t\t//System.out.println(service.checkOutRoom(clientID, hotelID));\r\n\t\tList<String> numbers = new ArrayList<String>();\r\n\t\t\r\n\t\tList<RoomVO> volist = service.getAllRooms(clientID, hotelID);\r\n\t\tfor(RoomVO vo:volist){\r\n\t\t\tshow(vo);\r\n\t\t\tnumbers.add(vo.getRoomNumber());\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(service.checkOutRoom(clientID, hotelID, \"102\"));\r\n\t}",
"public String getRoomName() {\n\treturn this.name;\n}",
"public Room getRoom(){\n\t\treturn this.room;\n\t}",
"private void createRooms()\n {\n // create the rooms\n prison = new Room(\"Prison\", \"Prison. You awake in a cold, dark cell. Luckily, the wall next to you has been blown open. \\nUnaware of your current circumstances, you press on... \\n\");\n promenade = new Room(\"Promenade\",\"Promenade. After stumbling upon a ladder, you decided to climb up. \\n\" + \n \"You appear outside a sprawling promenade. There appears to be something shiny stuck in the ground... \\n\");\n sewers = new Room(\"Sewers\",\"Sewers. It smells... interesting. As you dive deeper, you hear something creak\");\n ramparts = new Room(\"Ramparts\", \"Ramparts. You feel queasy as you peer down below. \\nAs you make your way along, you're greated by a wounded soldier.\" +\n \"\\nIn clear agony, he slowly closes his eyes as he says, 'the king... ki.. kil... kill the king..' \\n\");\n depths = new Room(\"Depths\", \"Depths. You can hardly see as to where you're going...\" + \"\\n\");\n ossuary = new Room(\"Ossuary\", \"Ossuary. A chill runs down your spine as you examine the skulls... \\n\" +\n \"but wait... is.. is one of them... moving? \\n\" +\"\\n\" + \"\\n\" + \"There seems to be a chest in this room!\" + \"\\n\");\n bridge = new Room(\"Bridge\", \"Bridge. A LOUD SHREIK RINGS OUT BEHIND YOU!!! \\n\");\n crypt = new Room(\"Crypt\", \"Crypt. An eerire feeling begins to set in. Something about this place doesn't seem quite right...\" + \"\\n\");\n graveyard = new Room(\"Graveyard\", \"Graveyard. The soil looks rather soft. \\n\" +\n \"As you being to dive deeper, you begin to hear moans coming from behind you...\");\n forest = new Room(\"Forest\", \"Forest. It used to be gorgeous, and gleaming with life; that is, until the king came...\" + \"\\n\" +\n \"there's quite a tall tower in front of you... if only you had something to climb it.\" + \"\\n\");\n tower = new Room(\"Tower\", \"Tower. As you look over the land, you're astounded by the ruin and destruction the malice and king have left behind. \\n\");\n castle = new Room(\"Castle\", \"Castle. Used to be the most elegant and awe-inspiring building in the land. \\n\" +\n \"That is, before the king showed up... \\n\" +\n \"wait... is that... is that a chest? \\n\");\n throneRoomEntrance = new Room(\"Throne Entrance\", \"You have made it to the throne room entrance. Press on, if you dare.\");\n throne = new Room(\"Throne Room\", \"You have entered the throne room. As you enter, the door slams shut behind you! \\n\" +\n \"Before you stands, the king of all malice and destruction, Mr. Rusch\" + \"\\n\");\n deathRoom1 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom2 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom3 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom4 = new Room(\"Death Room\", \"depths of the earth... well part of you at least.\" + \"\\n\" + \"You fell off the peaks of the castle to your untimely death\");\n \n // initialise room exits\n\n currentRoom = prison; // start game outside player.setRoom(currentRoom);\n player.setRoom(currentRoom);\n \n }",
"public interface RoomFactory\n{\n public Room createRoom(int floorNumber, Booking booking, RoomType roomType);\n}",
"public Room(int id, int roomNumber, int persons, int days){\n this.id = id;\n this.roomNumber = roomNumber;\n this.persons = persons;\n this.days = days;\n available = false; //default value, assignment not necessary\n }",
"public abstract String getRoomName();",
"public void check_in(String type) {\n int index=searchRoom(type);\n if (index<=0)\n {\n System.out.println(\"There is no available \"+type+\" room!\");\n }else\n {\n int roomNo=roomlist.get(index).getRoomid();\n /*New object is created and this object`s availability wiil be \"not available,statu will be \"check in\"*/\n Room room = new Room(type,roomNo,\"not available\",\"check in\",this,roomlist.get(index).getRoomcharge());\n changeList(room);\n System.out.println(toString());\n System.out.println(\"Checked in of the room \"+roomNo+\" .\");\n }\n }",
"public void setRoom(Room room) {\n this.selectedRoom = room;\n }",
"public RoomModel SelectRoomsById(int id)\r\n\t\t{\r\n\t\t\tRoomModel\trm\t\t\t\t=\tnew RoomModel();\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tp\t\t\t\t\t\t=\tcon.prepareStatement(\"select room.*,building.buil_id,building.buil_name,floor.floor_name,room_rent.rent,company_reg.comp_name from room inner join floor on floor.floor_id = room.floor_id inner join building on floor.buil_id=building.buil_id inner join room_rent on room.room_id=room_rent.room_id left join company_reg on company_reg.room_id = room.room_id where room.room_id = ? order by room.room_id asc\");\r\n\t\t\t\tp.setInt(1,id);\r\n\t\t\t\tResultSet\trs\t\t\t=\tp.executeQuery();\r\n\t\t\t\t//System.out.print(p);\r\n\t\t\t\twhile(rs.next())\r\n\t\t\t\t{\r\n\t\t\t\t\trm.setRoom_id(rs.getInt(1));\r\n\t\t\t\t\trm.setFloor_id(rs.getInt(2));\r\n\t\t\t\t\trm.setR_name(rs.getString(3));\r\n\t\t\t\t\trm.setS_feet(rs.getFloat(4));\r\n\t\t\t\t\trm.setStatus(rs.getString(6));\r\n\t\t\t\t\trm.setOccupied(rs.getInt(7));\r\n\t\t\t\t\trm.setDoor_num(rs.getString(8));\r\n\t\t\t\t\trm.setBuil_id(rs.getInt(9));\r\n\t\t\t\t\trm.setBuil_name(rs.getString(10));\r\n\t\t\t\t\trm.setFloor_name(rs.getString(11));\r\n\t\t\t\t\trm.setRent(rs.getFloat(12));\r\n\t\t\t\t\trm.setOccupied_name(rs.getString(13));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) \r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\treturn rm;\r\n\t\t}",
"public void createRooms()//Method was given\n { \n \n // create the rooms, format is name = new Room(\"description of the situation\"); ex. desc = 'in a small house' would print 'you are in a small house.'\n outside = new Room(\"outside\", \"outside of a small building with a door straight ahead. There is a welcome mat, a mailbox, and a man standing in front of the door.\", false);\n kitchen = new Room(\"kitchen\", \"in what appears to be a kitchen. There is a sink and some counters with an easter egg on top of the counter. There is a locked door straight ahead, and a man standing next to a potted plant. There is also a delicious looking chocolate bar sitting on the counter... how tempting\", true);\n poolRoom = new Room(\"pool room\", \"in a new room that appears much larger than the first room.You see a table with a flashlight, towel, and scissors on it. There is also a large swimming pool with what looks like a snorkel deep in the bottom of the pool. Straight ahead of you stands the same man as before.\", true);\n library = new Room(\"library\", \"facing east in a new, much smaller room than before. There are endless rows of bookshelves filling the room. All of the books have a black cover excpet for two: one red book and one blue book. The man stands in front of you, next to the first row of bookshelves\", true);\n exitRoom = new Room(\"exit\", \"outside of the building again. You have successfully escaped, congratulations! Celebrate with a non-poisonous chocolate bar\",true);\n \n // initialise room exits, goes (north, east, south, west)\n outside.setExits(kitchen, null, null, null);\n kitchen.setExits(poolRoom, null, outside, null);\n poolRoom.setExits(null, library, kitchen, null);\n library.setExits(null, null, exitRoom, poolRoom);\n exitRoom.setExits(null, null, null, null); \n \n currentRoom = outside; // start game outside\n }",
"private void createRooms()\n {\n Room outside, garden, kitchen, frontyard, garage, livingroom,\n upperhallway, downhallway, bedroom1, bedroom2, toilet,teleporter;\n\n // create the rooms\n outside = new Room(\"outside the house\",\"Outside\");\n garden = new Room(\"in the Garden\", \"Garden\");\n kitchen = new Room(\"in the Kitchen\",\"Kitchen\");\n frontyard = new Room(\"in the Frontyard of the house\", \"Frontyard\");\n garage = new Room(\"in the Garage\", \"Garage\");\n livingroom = new Room(\"in the Living room\", \"Living Room\");\n upperhallway = new Room(\"in the Upstairs Hallway\",\"Upstairs Hallway\");\n downhallway = new Room(\"in the Downstairs Hallway\", \"Downstairs Hallway\");\n bedroom1 = new Room(\"in one of the Bedrooms\", \"Bedroom\");\n bedroom2 = new Room(\"in the other Bedroom\", \"Bedroom\");\n toilet = new Room(\"in the Toilet upstairs\",\"Toilet\");\n teleporter = new Room(\"in the Warp Pipe\", \"Warp Pipe\");\n\n // initialise room exits\n outside.setExit(\"north\", garden);\n outside.setExit(\"east\", frontyard);\n\n garden.setExit(\"south\", outside);\n garden.setExit(\"east\", kitchen);\n\n kitchen.setExit(\"west\", garden);\n kitchen.setExit(\"north\", livingroom);\n kitchen.setExit(\"south\", downhallway);\n\n frontyard.setExit(\"west\", outside);\n frontyard.setExit(\"north\", downhallway);\n frontyard.setExit(\"east\", garage);\n\n garage.setExit(\"west\", frontyard);\n garage.setExit(\"north\", downhallway);\n\n livingroom.setExit(\"west\", kitchen);\n\n downhallway.setExit(\"north\",kitchen);\n downhallway.setExit(\"west\",frontyard);\n downhallway.setExit(\"south\",garage);\n downhallway.setExit(\"east\",upperhallway);\n\n upperhallway.setExit(\"north\", bedroom2);\n upperhallway.setExit(\"east\", bedroom1);\n upperhallway.setExit(\"south\", toilet);\n upperhallway.setExit(\"west\", downhallway);\n\n toilet.setExit(\"north\", upperhallway);\n\n bedroom1.setExit(\"west\",upperhallway);\n\n bedroom2.setExit(\"south\", upperhallway);\n\n rooms.add(outside);\n rooms.add(garden);\n rooms.add(kitchen);\n rooms.add(frontyard);\n rooms.add(garage);\n rooms.add(livingroom);\n rooms.add(upperhallway);\n rooms.add(downhallway);\n rooms.add(bedroom1);\n rooms.add(bedroom2);\n rooms.add(toilet);\n }",
"private ArrayList<Room> createRooms() {\n //Adding starting position, always rooms(index0)\n\n rooms.add(new Room(\n \"Du sidder på dit kontor. Du kigger på uret og opdager, at du er sent på den. WTF! FISKEDAG! Bare der er fiskefilet tilbage, når du når kantinen. Du må hellere finde en vej ud herfra og hen til kantinen.\",\n false,\n null,\n null\n ));\n\n //Adding offices to <>officerooms, randomly placed later \n officeRooms.add(new Room(\n \"Du bliver kort blændet af en kontorlampe, som peger lige mod døråbningen. Du ser en gammel dame.\",\n false,\n monsterList.getMonster(4),\n itemList.getItem(13)\n ));\n\n officeRooms.add(new Room(\n \"Der er ingen i rummet, men rodet afslører, at det nok er Phillipas kontor.\",\n false,\n null,\n itemList.getItem(15)\n ));\n\n officeRooms.add(new Room(\n \"Du vader ind i et lokale, som er dunkelt oplyst af små, blinkende lamper og har en stank, der siger så meget spar fem, at det kun kan være IT-lokalet. Du når lige at høre ordene \\\"Rick & Morty\\\".\",\n false,\n monsterList.getMonster(6),\n itemList.getItem(7)\n ));\n\n officeRooms.add(new Room(\n \"Det var ikke kantinen det her, men hvorfor er der så krummer på gulvet?\",\n false,\n null,\n itemList.getItem(1)\n ));\n\n officeRooms.add(new Room(\n \"Tine sidder ved sit skrivebord. Du kan se, at hun er ved at skrive en lang indkøbsseddel. Hun skal nok have gæster i aften.\",\n false,\n monsterList.getMonster(0),\n itemList.getItem(18)\n ));\n\n officeRooms.add(new Room(\n \"Du træder ind i det tekøkken, hvor Thomas plejer at opholde sig. Du ved, hvad det betyder!\",\n false,\n null,\n itemList.getItem(0)\n ));\n\n officeRooms.add(new Room(\n \"Du går ind i det nok mest intetsigende rum, som du nogensinde har set. Det er så intetsigende, at der faktisk ikke er mere at sige om det.\",\n false,\n monsterList.getMonster(1),\n itemList.getItem(9)\n ));\n\n //Adding copyrooms to <>copyrooms, randomly placed later \n copyRooms.add(new Room(\n \"Døren knirker, som du åbner den. Et kopirum! Det burde du have set komme. Især fordi det var en glasdør.\",\n false,\n null,\n itemList.getItem(19)\n ));\n\n copyRooms.add(new Room(\n \"Kopimaskinen summer stadig. Den er åbenbart lige blevet færdig. Du går nysgerrigt over og kigger på alle de udskrevne papirer.\",\n false,\n null,\n itemList.getItem(12)\n ));\n\n //Adding restrooms to <>restrooms, randomly placed later \n restRooms.add(new Room(\n \"Ups! Dametoilettet. Der hænger en klam stank i luften. Det må være Ruth, som har været i gang.\",\n false,\n null,\n itemList.getItem(5)\n ));\n\n restRooms.add(new Room(\n \"Pedersen er på vej ud fra toilettet. Han vasker ikke fingre! Slut med at give ham hånden.\",\n false,\n monsterList.getMonster(7),\n itemList.getItem(11)\n ));\n\n restRooms.add(new Room(\n \"Du kommer ind på herretoilettet. Du skal simpelthen tisse så meget, at fiskefileterne må vente lidt. Du åbner toiletdøren.\",\n false,\n monsterList.getMonster(2),\n null\n ));\n\n restRooms.add(new Room(\n \"Lisette står og pudrer næse på dametoilettet. Hvorfor gik du herud?\",\n false,\n monsterList.getMonster(8),\n itemList.getItem(14)\n ));\n\n //Adding meetingrooms to<>meetingrooms, randomly placed later\n meetingRooms.add(new Room(\n \"Du træder ind i et lokale, hvor et vigtigt møde med en potentiel kunde er i gang. Du bliver nødt til at lade som om, at du er en sekretær.\",\n false,\n monsterList.getMonster(9),\n itemList.getItem(6)\n ));\n\n meetingRooms.add(new Room(\n \"Mødelokalet er tomt, men der står kopper og service fra sidste møde. Sikke et rod!\",\n false,\n null,\n itemList.getItem(3)\n ));\n\n meetingRooms.add(new Room(\n \"Projektgruppen sidder i mødelokalet. Vil du forsøge at forsinke dem i at nå fiskefileterne i kantinen?\",\n false,\n monsterList.getMonster(10),\n itemList.getItem(2)\n ));\n\n //Adding specialrooms to<>specialrooms, randomly placed later\n specialRooms.add(new Room(\n \"Du vader ind på chefens kontor. På hans skrivebord sidder sekretæren Phillipa.\",\n false,\n monsterList.getMonster(5),\n itemList.getItem(8)\n ));\n\n specialRooms.add(new Room(\n \"Det her ligner øjensynligt det kosteskab, Harry Potter boede i.\",\n false,\n monsterList.getMonster(3),\n itemList.getItem(4)\n ));\n\n specialRooms.add(new Room(\n \"OMG! Hvad er det syn?! KANTINEN!! Du klarede det! Du skynder dig op i køen lige foran ham den arrogante fra din afdeling. Da du når frem til fadet er der kun 4 fiskefileter tilbage. Du snupper alle 4!\",\n true,\n null,\n null\n ));\n\n //Adding rooms(Inde1-5)\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addMeetingRoom(rooms, meetingRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n\n //Adding rooms(Inde6-10)\n addMeetingRoom(rooms, meetingRooms);\n addCopyRoom(rooms, copyRooms);\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n addCopyRoom(rooms, copyRooms);\n\n //Adding rooms(Inde11-15)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n\n //Adding rooms(Inde16-19)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addSpecialRoom(rooms, specialRooms);\n addMeetingRoom(rooms, meetingRooms);\n\n return rooms;\n }",
"public void setRoomid(Integer roomid) {\r\n this.roomid = roomid;\r\n }",
"java.lang.String getRoomName();",
"public Integer getRoomstatusid() {\r\n return roomstatusid;\r\n }",
"List<Room> selectRoomList(@Param(\"building\") String building);",
"void updateRoomStatus(String username, long roomId, int status);",
"public Room getRoom()\r\n {\r\n return room;\r\n }",
"public void setRoomId( String roomId ) {\n this.roomId = roomId;\n }"
]
| [
"0.6955946",
"0.65222114",
"0.63932997",
"0.63465595",
"0.6316795",
"0.6315938",
"0.6224931",
"0.6030927",
"0.6024881",
"0.60044044",
"0.6000156",
"0.59975886",
"0.5982456",
"0.5923983",
"0.59230125",
"0.58956915",
"0.5871447",
"0.587027",
"0.5856133",
"0.58335483",
"0.5819729",
"0.58111846",
"0.58047014",
"0.57890534",
"0.578854",
"0.5777496",
"0.57752645",
"0.57631433",
"0.57548624",
"0.5735275",
"0.57333726",
"0.57333726",
"0.5716975",
"0.57127947",
"0.57119745",
"0.57046366",
"0.57046247",
"0.5692664",
"0.5684",
"0.5675646",
"0.5672094",
"0.56664544",
"0.5655105",
"0.56466734",
"0.56310934",
"0.5626176",
"0.56259096",
"0.5617039",
"0.5612177",
"0.5597313",
"0.5596284",
"0.55944854",
"0.5585874",
"0.55850667",
"0.5582464",
"0.55808896",
"0.5580492",
"0.55678314",
"0.556137",
"0.5554382",
"0.55529743",
"0.5544739",
"0.5541595",
"0.5539327",
"0.5538607",
"0.55316377",
"0.5531598",
"0.55286026",
"0.5524484",
"0.5517497",
"0.55120045",
"0.5508955",
"0.5506529",
"0.5506529",
"0.55060554",
"0.5501681",
"0.54913634",
"0.54877776",
"0.54844373",
"0.5483246",
"0.5478623",
"0.5466988",
"0.54656136",
"0.5452298",
"0.5447222",
"0.544534",
"0.54431206",
"0.5442982",
"0.54422444",
"0.5436476",
"0.5423604",
"0.5422318",
"0.5414081",
"0.5413801",
"0.54130936",
"0.54064935",
"0.5403998",
"0.5402276",
"0.5401705",
"0.5390584"
]
| 0.651712 | 2 |
Service provider interface java.sql.Driver | public interface Provider {
//Connection connect(String url, java.util.Properties info)
Service newService();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.sql.Driver getDriver() throws SQLException\n\t{\n\t\tif (s_driver == null)\n\t\t{\n\t\t\ts_driver = new org.postgresql.Driver();\n\t\t\tDriverManager.registerDriver (s_driver);\n\t\t\tDriverManager.setLoginTimeout (Database.CONNECTION_TIMEOUT);\n\t\t}\n\t\treturn s_driver;\n\t}",
"public interface JdbcDrivers {\r\n\r\n\tpublic static final String DERBY_EMBEDDED = \"org.apache.derby.jdbc.EmbeddedDriver\";\r\n\tpublic static final String MYSQL = \"com.mysql.jdbc.Driver\";\r\n}",
"String getJdbcDriverClassName();",
"InstrumentedConnectionProvider getConnectionProvider();",
"public MyDriver() throws SQLException {\n }",
"public Driver() throws SQLException {\n // Required for Class.forName().newInstance()\n }",
"public String getJdbcDriver() {\n if(isJakartaNamespace()) {\n return \"jakarta.persistence.jdbc.driver\";\n }\n return \"javax.persistence.jdbc.driver\";\n }",
"public String getDriver() {\n return jdbcDriver;\n }",
"public interface Sql {\n public java.sql.Connection InitConnection() throws RmodelException.CommonException, RmodelException.SqlException;\n public void setConnection(Connection connection);\n public void CloseConnection() throws RmodelException.SqlException;\n public java.sql.Connection getSqlConnection() throws RmodelException.SqlException;\n}",
"Connection getConnection() throws SQLException;",
"Connection getConnection() throws SQLException;",
"public Driver getDriver() throws SQLException {\n\n if (!loaded) {\n synchronized (driverLoadLock) {\n try {\n loadDriver();\n } catch (SQLException sqle) {\n failure = sqle;\n } catch (Exception e) {\n failure = new SQLException(\"Unable to load driver\", e);\n }\n loaded = true;\n }\n }\n\n if (failure != null) {\n throw failure;\n }\n return driver;\n }",
"public interface Driver extends ExtensionModule, Serializable\r\n{\r\n // standard parameters\r\n /** The server name. */\r\n static final String SERVER_PARAM = \"SERVER\";\r\n \r\n /** The database name. */\r\n static final String DB_PARAM = \"DB\";\r\n \r\n /** The command line options. */\r\n static final String CMD_OPTIONS_PARAM = \"CMD_OPTIONS\";\r\n \r\n /** The BASE_CLASS_PATH. */\r\n static final String BASE_CLASS_PATH = \"com.toolsverse.etl.driver\";\r\n \r\n // types\r\n \r\n /** The procedure. */\r\n static String PROC_TYPE = \"procedure\";\r\n \r\n /** The function. */\r\n static String FUNC_TYPE = \"function\";\r\n \r\n /** The ddl. */\r\n static String DDL_TYPE = \"ddl\";\r\n \r\n /** The table. */\r\n static String TABLE_TYPE = \"table\";\r\n \r\n // defaults\r\n \r\n /** The ETL_CODE. */\r\n static final String ETL_CODE = \"{etl_code}\";\r\n \r\n /** The case sensitivity undefined. */\r\n static int CASE_SENSITIVE_UNDEFINED = 0;\r\n \r\n /** The lower case. */\r\n static int CASE_SENSITIVE_LOWER = 1;\r\n \r\n /** The upper case. */\r\n static int CASE_SENSITIVE_UPPER = 2;\r\n \r\n /** The lower case property. */\r\n static String CASE_SENSITIVE_LOWER_STR = \"lower\";\r\n \r\n /** The upper case property. */\r\n static String CASE_SENSITIVE_UPPER_STR = \"upper\";\r\n \r\n /**\r\n * Converts string so it can be used as s part of sql. Typically adds \"'\". Example abc -> 'abc'\r\n * \r\n * @param value\r\n * the value\r\n * \r\n * @return the string\r\n */\r\n String convertStringForStorage(String value);\r\n \r\n /**\r\n * Converts value to string depending on <code>fieldType</code> so it can be used as s part of sql. \r\n *\r\n * @param fieldValue the field value\r\n * @param fieldType the field type {@link java.sql.Types}}\r\n * @param isFromTable if true the value is coming from result set, otherwise - from the database cursor\r\n * @return the string\r\n */\r\n String convertValueForStorage(Object fieldValue, int fieldType,\r\n boolean isFromTable);\r\n \r\n /**\r\n * Deletes staging table.\r\n *\r\n * @param conn the connection\r\n * @param tableName the table name\r\n * @throws Exception in case of any error\r\n */\r\n void deleteStagingBinary(Connection conn, String tableName)\r\n throws Exception;\r\n \r\n /**\r\n * Filters string. Usually removes prohibited characters. \r\n * \r\n * @param value\r\n * the value\r\n * \r\n * @return the string\r\n */\r\n String filter(String value);\r\n \r\n /**\r\n * Gets the allowed identifier chars.\r\n *\r\n * @return the allowed identifier chars\r\n */\r\n Set<Character> getAllowedIdentifierChars();\r\n \r\n /**\r\n * Gets the \"begin\" sql statement.\r\n * \r\n * @return the \"begin\" sql statemnt\r\n * \r\n */\r\n String getBegin();\r\n \r\n /**\r\n * Gets the \"begin\" token for splited sql.\r\n * \r\n * @return the the \"begin\" token for the splited sql\r\n */\r\n String getBeginSplited();\r\n \r\n /**\r\n * Gets the blob from the result set.\r\n * \r\n * @param rs\r\n * the result set\r\n * @param pos\r\n * the position ofr the blob field\r\n * \r\n * @return the blob\r\n * \r\n * @throws Exception in case of any error\r\n */\r\n Object getBlob(ResultSet rs, int pos)\r\n throws Exception;\r\n \r\n /**\r\n * Gets the \"call\" sql. Example: \"test\" - > call test()\r\n * \r\n * @param name\r\n * the name of the procedure\r\n * \r\n * @return the \"call\" sql\r\n */\r\n String getCallSql(String name);\r\n \r\n /**\r\n * Gets the \"case sensitive\" flag. Possible values: CASE_SENSITIVE_UNDEFINED, CASE_SENSITIVE_LOWER, CASE_SENSITIVE_UPPER.\r\n * Depending on returning value driver will translate some types of identifiers to the lower case, UPPER case or leave it unchanged. \r\n * \r\n * @return the \"case sensitive\" flag. \r\n */\r\n int getCaseSensitive();\r\n \r\n /**\r\n * Gets the CLOB from the result set.\r\n * \r\n * @param rs\r\n * the result set\r\n * @param pos\r\n * the position of the clob field\r\n * \r\n * @return the clob\r\n * \r\n * @throws Exception in case of any error\r\n */\r\n Object getClob(ResultSet rs, int pos)\r\n throws Exception;\r\n \r\n /**\r\n * Gets the command line for the external tool.\r\n *\r\n * @param storage the object storage\r\n * @param alias the alias\r\n * @param sqlFile the sql file\r\n * @return the command line for the external tool\r\n * @see com.toolsverse.util.ObjectStorage\r\n */\r\n String getCmdForExternalTool(ObjectStorage storage, Alias alias,\r\n String sqlFile);\r\n \r\n /**\r\n * Gets the \"create table\" sql.\r\n *\r\n * @param name the table name\r\n * @param dataSet the data set\r\n * @param isTemporary if true the table is temporary\r\n * @param key the key field(s)\r\n * @param fieldsRepository the fields repository\r\n * @return the \"create table\" sql\r\n * @see com.toolsverse.etl.common.FieldsRepository\r\n */\r\n String getCreateTableSql(String name, DataSet dataSet, boolean isTemporary,\r\n String key, FieldsRepository fieldsRepository);\r\n \r\n /**\r\n * Gets the \"loop end\" sql for the cursor.\r\n * \r\n * @param name\r\n * the name of the cusror\r\n * @param dataSet\r\n * the data set\r\n * \r\n * @return the \"loop end\" sql for the cursor\r\n */\r\n String getCursorLoopEndSql(String name, DataSet dataSet);\r\n \r\n /**\r\n * Gets the \"loop start\" sql for the cursor.\r\n *\r\n * @param name the name of the cursor\r\n * @param cursorSql the cursor sql\r\n * @param dataSet the data set\r\n * @return the \"loop end\" sql for the cursor\r\n */\r\n String getCursorLoopStartSql(String name, String cursorSql, DataSet dataSet);\r\n \r\n /**\r\n * Gets the record access sql for the cursor.\r\n * \r\n * @param fieldName\r\n * the field name\r\n * \r\n * @return the record access sql for the cursor\r\n */\r\n String getCursorRecAccessSql(String fieldName);\r\n \r\n /**\r\n * Gets the \"declare\" sql.\r\n * \r\n * @return the \"declare\" sql\r\n */\r\n String getDeclare();\r\n \r\n /**\r\n * Gets the \"declare cursor end\" sql.\r\n * \r\n * @return the \"declare cursor end\" sql\r\n */\r\n String getDeclareCursorEndSql();\r\n \r\n /**\r\n * Gets the \"declare cursor\" sql.\r\n *\r\n * @param sql the sql\r\n * @param name the name of the cursor\r\n * @param cursorSql the cursor sql\r\n * @param dataSet the data set\r\n * @return the \"declare cursor\" sql\r\n */\r\n String getDeclareCursorSql(String sql, String name, String cursorSql,\r\n DataSet dataSet);\r\n \r\n /**\r\n * Gets the \"declare cursor variable\" sql.\r\n *\r\n * @param sql the sql\r\n * @param dataSet the data set\r\n * @param key the key field(s)\r\n * @param fieldsRepository the fields repository\r\n * @param variables the variables\r\n * @return the \"declare cursor variable\" sql\r\n * @see com.toolsverse.etl.common.FieldsRepository\r\n */\r\n String getDeclareCursorVarSql(String sql, DataSet dataSet, String key,\r\n FieldsRepository fieldsRepository, Set<String> variables);\r\n \r\n /**\r\n * Gets the default function class name.\r\n *\r\n * @return the default function class name\r\n * @see com.toolsverse.etl.common.Function\r\n */\r\n String getDefaultFunctionClass();\r\n \r\n /**\r\n * Gets the \"default null\" value. Some databases require default \"null\", \"not null\" attributes when creating tables.\r\n * \r\n * @return the \"default null\" attribute\r\n */\r\n String getDefaultNull();\r\n \r\n /**\r\n * Gets the default database type.\r\n * \r\n * @return the default database type\r\n */\r\n String getDefaultType();\r\n \r\n /**\r\n * Gets the delete statement.\r\n *\r\n * @param fieldsAndValues the fields and values\r\n * @param tableName the table name\r\n * @param key the key field(s)\r\n * @return the delete statement\r\n */\r\n String getDeleteStatement(\r\n TypedKeyValue<List<String>, List<String>> fieldsAndValues,\r\n String tableName, String key);\r\n \r\n /**\r\n * Gets the default delimiter.\r\n * \r\n * @return the delimiter\r\n */\r\n String getDelimiter();\r\n \r\n /**\r\n * Gets the destination name and exception handler type from the sql.\r\n * \r\n * @param sql\r\n * the sql\r\n * \r\n * @return the destination name and exception handler type\r\n */\r\n TypedKeyValue<String, Integer> getDestinationInfo(String sql);\r\n \r\n /**\r\n * Gets the \"drop\" sql.\r\n * \r\n * @param type\r\n * the object type. Possible values: PROC_TYPE, FUNC_TYPE, DDL_TYPE, TABLE_TYPE\r\n * @param name\r\n * the object name\r\n * \r\n * @return the drop sql\r\n */\r\n String getDropSql(String type, String name);\r\n \r\n /**\r\n * Gets the \"end\" sql.\r\n * \r\n * @return the \"end\" sql\r\n */\r\n String getEnd();\r\n \r\n /**\r\n * Gets the \"end\" token for the splited sql statement.\r\n * \r\n * @return the the \"end\" token for the splited sql statement\r\n */\r\n String getEndSplited();\r\n \r\n /**\r\n * Gets the \"error line\" pattern\". Used to parse exception and find actual error line.\r\n *\r\n * @return the \"error line\" pattern\r\n */\r\n String getErrorLinePattern();\r\n \r\n /**\r\n * Gets the explain plan for the sql.\r\n *\r\n * @param storage the object storage\r\n * @param connection the connection\r\n * @param alias the alias\r\n * @param sql the sql\r\n * @return the explain plan\r\n * @see com.toolsverse.util.ObjectStorage\r\n */\r\n Object getExplainPlan(ObjectStorage storage, Connection connection,\r\n Alias alias, String sql);\r\n \r\n /**\r\n * Gets the external tool name.\r\n *\r\n * @return the external tool name\r\n */\r\n String getExternalToolName();\r\n \r\n /**\r\n * Gets the home folder for the native database client.\r\n *\r\n * @param storage the object storage\r\n * @return the home folder\r\n * @see com.toolsverse.util.ObjectStorage\r\n */\r\n String getHome(ObjectStorage storage);\r\n \r\n /**\r\n * Gets the identifier name.\r\n *\r\n * @param name the original object name\r\n * @param type the type. Possible values: PROC_TYPE, FUNC_TYPE, DDL_TYPE, TABLE_TYPE\r\n * @return the identifier name\r\n */\r\n String getIdentifierName(String name, String type);\r\n \r\n /**\r\n * Gets the \"if\" token.\r\n * \r\n * @return the \"if\" token\r\n */\r\n String getIf();\r\n \r\n /**\r\n * Gets the \"if begin\" token.\r\n * \r\n * @return the \"if begin\" token\r\n */\r\n String getIfBegin();\r\n \r\n /**\r\n * Gets the \"if else\" token.\r\n * \r\n * @return the \"if else\" token\r\n */\r\n String getIfElse();\r\n \r\n /**\r\n * Gets the \"if end\" token.\r\n * \r\n * @return the \"if end\" token\r\n */\r\n String getIfEnd();\r\n \r\n /**\r\n * Gets the initialization sql. This sql is executed first for the etl scenario.\r\n * \r\n * @return the initialization sql\r\n */\r\n String getInitSql();\r\n \r\n /**\r\n * Gets the insert statement.\r\n *\r\n * @param fieldsAndValues the fields and values\r\n * @param tableName the table name\r\n * @return the insert statement\r\n */\r\n String getInsertStatement(\r\n TypedKeyValue<List<String>, List<String>> fieldsAndValues,\r\n String tableName);\r\n \r\n /**\r\n * Gets the jdbc driver class name.\r\n *\r\n * @return the jdbc driver class name\r\n */\r\n String getJdbcDriverClassName();\r\n \r\n /**\r\n * Gets the maximum number of lines in the sql block supported by database.\r\n * \r\n * @return the lines limit\r\n */\r\n int getLinesLimit();\r\n \r\n /**\r\n * Gets the maximum character size.\r\n * \r\n * @return the maximum character size\r\n */\r\n int getMaxCharSize();\r\n \r\n /**\r\n * Gets the maximum precision.\r\n * \r\n * @return the maximum precision\r\n */\r\n int getMaxPrecision();\r\n \r\n /**\r\n * Gets the maximum scale.\r\n * \r\n * @return the maximum scale\r\n */\r\n int getMaxScale();\r\n \r\n /**\r\n * Gets the maximum string literal size.\r\n * \r\n * @return the maximum string literal size\r\n */\r\n int getMaxStringLiteralSize();\r\n \r\n /**\r\n * Gets the maximum varchar size.\r\n * \r\n * @return the maximum varchar size\r\n */\r\n int getMaxVarcharSize();\r\n \r\n /**\r\n * Gets the merge statement.\r\n *\r\n * @param fieldsAndValues the fields and values\r\n * @param tableName the table name\r\n * @param key the key field(s)\r\n * @return the merge statement\r\n */\r\n String getMergeStatement(\r\n TypedKeyValue<List<String>, List<String>> fieldsAndValues,\r\n String tableName, String key);\r\n \r\n /**\r\n * Gets the metadata driver class name.\r\n *\r\n * @return the metadata driver class name\r\n */\r\n String getMetadataClassName();\r\n \r\n /**\r\n * Gets the metadata \"select\" clause.\r\n * \r\n * @return the metadata \"select\" clause\r\n */\r\n String getMetadataSelectClause();\r\n \r\n /**\r\n * Gets the metadata \"where\" clause.\r\n * \r\n * @return the metadata \"where\" clause\r\n */\r\n String getMetadataWhereClause();\r\n \r\n /**\r\n * Gets the name of the driver.\r\n *\r\n * @return the name of the driver\r\n */\r\n String getName();\r\n \r\n /**\r\n * Gets the object from result set.\r\n * \r\n * @param rs\r\n * the result set\r\n * @param index\r\n * the index of the field\r\n * @param fieldType\r\n * the field type {@link java.sql.Types}\r\n * \r\n * @return the object\r\n * \r\n * @throws Exception in case of any error\r\n */\r\n Object getObject(ResultSet rs, int index, int fieldType)\r\n throws Exception;\r\n \r\n /**\r\n * Gets the sql used to check if object exists.\r\n *\r\n * @param name the name\r\n * @return the sql\r\n */\r\n String getObjectCheckSql(String name);\r\n \r\n /**\r\n * Gets the \"on exception\" sql.\r\n *\r\n * @param onException the OnException\r\n * @return the \"on exception\" sql\r\n * @see com.toolsverse.etl.common.OnException\r\n */\r\n String getOnException(OnException onException);\r\n \r\n /**\r\n * Gets the \"on exception begin\" sql.\r\n *\r\n * @param onException the OnException\r\n * @param row the row\r\n * @return the \"on exception begin\" sql\r\n * @see com.toolsverse.etl.common.OnException\r\n */\r\n String getOnExceptionBegin(OnException onException, long row);\r\n \r\n /**\r\n * Gets the \"on exception end\" sql.\r\n * \r\n * @return the \"on exception end\" sql\r\n */\r\n String getOnExceptionEnd();\r\n \r\n /**\r\n * Gets the parameter type from the output variable type.\r\n *\r\n * @param type the output variable type\r\n * @return the parameter type\r\n */\r\n int getParamType(String type);\r\n \r\n /**\r\n * Gets the parent driver class name.\r\n * \r\n * @return the parent driver class name\r\n */\r\n String getParentDriverName();\r\n \r\n /**\r\n * This sql is added after all variables declared.\r\n * \r\n * @return sql\r\n */\r\n String getPostDeclareSql();\r\n \r\n /**\r\n * Gets the properties.\r\n *\r\n * @return the properties\r\n */\r\n String[] getProperties();\r\n \r\n /**\r\n * Gets the safe sql. Some databases (Oracle for example) require that sql is executed inside special construct in order to catch exception.\r\n * \r\n * <pre>\r\n * For example table abc does not exist\r\n * \r\n * delete from abc --> not safe\r\n * EXECUTE IMMEDIATE 'delete from abc' --> safe\r\n * </pre>\r\n *\r\n * @param name the name\r\n * @return the safe sql\r\n */\r\n String getSafeSql(String name);\r\n \r\n /**\r\n * Gets the sql for the explain plan.\r\n *\r\n * @param sql the original sql\r\n * @param parser the sql parser\r\n * @return the sql for the explain plan\r\n */\r\n String getSqlForExplainPlan(String sql, SqlParser parser);\r\n \r\n /**\r\n * Gets the sql for external tool.\r\n *\r\n * @param alias the alias\r\n * @param sql the original sql\r\n * @param parser the sql parser\r\n * @return the sql for the external tool\r\n */\r\n String getSqlForExternalTool(Alias alias, String sql, SqlParser parser);\r\n \r\n /**\r\n * Get start transaction sql.\r\n *\r\n * @return the start transaction sql\r\n */\r\n String getStartTransactionSql();\r\n \r\n /**\r\n * Gets the table name.\r\n * \r\n * @param name\r\n * the name\r\n * \r\n * @return the table name\r\n */\r\n String getTableName(String name);\r\n \r\n /**\r\n * Gets the temporary table name.\r\n * \r\n * @param name\r\n * the name\r\n * \r\n * @return the temporary table name\r\n */\r\n String getTempTableName(String name);\r\n \r\n /**\r\n * Gets the \"top select\" clause. Used to select first n rows.\r\n *\r\n * @param top the maximum number of rows to select\r\n * @return the \"top select\" clause\r\n */\r\n String getTopSelectClause(int top);\r\n \r\n /**\r\n * Gets the \"top trail\" clause. Used to select first n rows.\r\n *\r\n * @param top the maximum number of rows to select\r\n * @return the \"top trail\" clause\r\n */\r\n String getTopTrailClause(int top);\r\n \r\n /**\r\n * Gets the \"top where\" clause. Used to select first n rows.\r\n *\r\n * @param top the maximum number of rows to select\r\n * @return the \"top where\" clause\r\n */\r\n String getTopWhereClause(int top);\r\n \r\n /**\r\n * Gets the native field type.\r\n *\r\n * @param fieldDef the field definition\r\n * @param key the key field(s)\r\n * @param fieldsRepository the fields repository\r\n * @return the native field type\r\n */\r\n String getType(FieldDef fieldDef, String key,\r\n FieldsRepository fieldsRepository);\r\n \r\n /**\r\n * Gets the update statement.\r\n *\r\n * @param fieldsAndValues the fields and values\r\n * @param tableName the table name\r\n * @param key the key field(s)\r\n * @return the update statement\r\n */\r\n String getUpdateStatement(\r\n TypedKeyValue<List<String>, List<String>> fieldsAndValues,\r\n String tableName, String key);\r\n \r\n /**\r\n * Gets the jdbc driver url pattern.\r\n *\r\n * @return the jdbc driver url pattern\r\n */\r\n String getUrlPattern();\r\n \r\n /**\r\n * Gets the variable declare statement.\r\n *\r\n * @return the variable declare statement\r\n */\r\n String getVarDeclare();\r\n \r\n /**\r\n * Gets the variable name.\r\n * \r\n * @param name\r\n * the name\r\n * \r\n * @return the variable name\r\n */\r\n String getVarName(String name);\r\n \r\n /**\r\n * Gets the wrong scale. If it is not -1 and jdbc driver returns it the actual scale will be set to -1.\r\n *\r\n * @return the wrong precision\r\n */\r\n int getWrongScale();\r\n \r\n /**\r\n * The \"Ignore exceptions during initialization\" flag.\r\n * \r\n * @return true, if any exception thrown during execution of the init sql should be ignored\r\n */\r\n boolean ignoreExceptionsDuringInit();\r\n \r\n /**\r\n * Checks if \"merge\" statement can be not callable. Example: MERGRE INTO...\r\n *\r\n * @return true, if \"merge\" statement can be not callable\r\n */\r\n boolean isMergeInNonCallableSupported();\r\n \r\n /**\r\n * Check if driver requires separate connection for ddl statements.\r\n *\r\n * @return true, if driver requires separate connection for ddl statements\r\n */\r\n boolean needSeparateConnectionForDdl();\r\n \r\n /**\r\n * Replaces sql on exception.\r\n * \r\n * @param sql\r\n * the sql\r\n * \r\n * @return the string\r\n */\r\n String replaceOnException(String sql);\r\n \r\n /**\r\n * Returns true if database requires rollback after sql error. Example - PostgreSQL.\r\n * \r\n * @return true if database requires rollback after sql error\r\n */\r\n boolean requiresRollbackAfterSqlError();\r\n \r\n /**\r\n * Sets the blob field.\r\n *\r\n * @param pstmt the prepared statement\r\n * @param value the value\r\n * @param pos the position for the blob field\r\n * @throws Exception in case of any error\r\n */\r\n void setBlob(PreparedStatement pstmt, Object value, int pos)\r\n throws Exception;\r\n \r\n /**\r\n * Sets the case sensitive attribute.\r\n * \r\n * @param value\r\n * the new case sensitive attribute. Possible values: CASE_SENSITIVE_UNDEFINED, CASE_SENSITIVE_LOWER, CASE_SENSITIVE_UPPER\r\n */\r\n void setCaseSensitive(int value);\r\n \r\n /**\r\n * Sets the clob field.\r\n *\r\n * @param pstmt the prepared statement\r\n * @param value the value\r\n * @param pos the position of the clob field\r\n * @throws Exception in case of any error\r\n */\r\n void setClob(PreparedStatement pstmt, Object value, int pos)\r\n throws Exception;\r\n \r\n /**\r\n * Sets the initialization sql.\r\n * \r\n * @param value\r\n * the new initialization sql\r\n */\r\n void setInitSql(String value);\r\n \r\n /**\r\n * Sets the maximum number of lines in the sql block supported by database.\r\n * \r\n * @param value\r\n * the new lines limit\r\n */\r\n void setLinesLimit(int value);\r\n \r\n /**\r\n * Sets the maximum char size.\r\n * \r\n * @param value\r\n * the new maximum char size\r\n */\r\n void setMaxCharSize(int value);\r\n \r\n /**\r\n * Sets the maximum precision.\r\n * \r\n * @param value\r\n * the new maximum precision\r\n */\r\n void setMaxPrecision(int value);\r\n \r\n /**\r\n * Sets the maximum scale.\r\n * \r\n * @param value\r\n * the new maximum scale\r\n */\r\n void setMaxScale(int value);\r\n \r\n /**\r\n * Sets the maximum string literal size.\r\n * \r\n * @param value\r\n * the new maximum string literal size\r\n */\r\n void setMaxStringLiteralSize(int value);\r\n \r\n /**\r\n * Sets the maximum varchar size.\r\n * \r\n * @param value\r\n * the new maximum varchar size\r\n */\r\n void setMaxVarcharSize(int value);\r\n \r\n /**\r\n * Sets the parent driver class name.\r\n *\r\n * @param value the parent driver class name\r\n * @throws Exception in case of any error\r\n */\r\n void setParentDriverName(String value)\r\n throws Exception;\r\n \r\n /**\r\n * \"Supports anonymous blocks\" flag.\r\n * \r\n * @return true, if database supports anonymous sql blocks\r\n */\r\n boolean supportsAnonymousBlocks();\r\n \r\n /**\r\n * \"Supports binary data types in procedures\" flag.\r\n * \r\n * @return true, if database supports binary data types in procedures\r\n */\r\n boolean supportsBinaryInProc();\r\n \r\n /**\r\n * \"Supports callable statement\" flag.\r\n * \r\n * @return true, if database supports callable statements\r\n */\r\n boolean supportsCallableStatement();\r\n \r\n /**\r\n * \"Supports explain plan\" flag.\r\n *\r\n * @return true, if database supports explain plan\r\n */\r\n boolean supportsExplainPlan();\r\n \r\n /**\r\n * \"Supports external tool\" flag.\r\n *\r\n * @return true, if database supports external tool\r\n */\r\n boolean supportsExternalTool();\r\n \r\n /**\r\n * \"Supports inner functions\" flag. Inner function is a function inside anonymous sql block.\r\n * \r\n * @return true, if database supports inner functions\r\n */\r\n boolean supportsInnerFunctions();\r\n \r\n /**\r\n * Checks is driver supports not nullable collumns.\r\n *\r\n * @return true, if successful\r\n */\r\n boolean supportsNotNullable();\r\n \r\n /**\r\n * \"Supports parallel extract\" flag.\r\n *\r\n * @return true, if driver supports parallel extract\r\n */\r\n boolean supportsParallelExtract();\r\n \r\n /**\r\n * \"Supports parallel load\" flag.\r\n *\r\n * @return true, if driver supports parallel load\r\n */\r\n boolean supportsParallelLoad();\r\n \r\n /**\r\n * \"Supports parameters in anonymous blocks\" flag.\r\n *\r\n * @return true, if database supports parameters in anonymous blocks\r\n */\r\n boolean supportsParamsInAnonymousBlocks();\r\n \r\n /**\r\n * Used internally to make a disition is it possible to use a generic jdbc driver with a parent driver.\r\n *\r\n * @return true, if successful\r\n */\r\n boolean supportsParentDriver();\r\n \r\n /**\r\n * \"Supports rollback after ddl\" flag.\r\n * \r\n * @return true, if database supports rollback after ddl\r\n */\r\n boolean supportsRollbackAfterDDL();\r\n \r\n /**\r\n * If true the database supports extended sql, such as PLSQL, Transact SQL, etc. Used by UI to disable/enable menu items.\r\n * \r\n * @return true, if database database supports extended sql\r\n */\r\n \r\n boolean supportsScripts();\r\n \r\n /**\r\n * Converts table name to name.\r\n *\r\n * @param name the table name\r\n * @return the string\r\n */\r\n String tableName2Name(String name);\r\n \r\n /**\r\n * Returns <code>true</code> if <code>type</code> has size. For example: Types.VARCHAR has size, Types.INTEGER - doesn't.\r\n *\r\n * @param type the type {@link java.sql.Types}\r\n * @return true, if type has size\r\n */\r\n boolean typeHasSize(int type);\r\n \r\n /**\r\n * Updates staging blob.\r\n * \r\n * @param conn\r\n * the connection\r\n * @param var\r\n * the variable\r\n * @param pkValue\r\n * the primary key value\r\n * @param value\r\n * the value\r\n * \r\n * @throws Exception in case of any error\r\n */\r\n void updateStagingBlob(Connection conn, Variable var, String pkValue,\r\n Object value)\r\n throws Exception;\r\n \r\n /**\r\n * Updates staging clob.\r\n * \r\n * @param conn\r\n * the connection\r\n * @param var\r\n * the variable\r\n * @param pkValue\r\n * the primary key value\r\n * @param value\r\n * the value\r\n * \r\n * @throws Exception in case of any error\r\n */\r\n void updateStagingClob(Connection conn, Variable var, String pkValue,\r\n Object value)\r\n throws Exception;\r\n \r\n /**\r\n * Converts value for storage.\r\n *\r\n * @param fieldType the field type {@link java.sql.Types}\r\n * @param value the value\r\n * @param params the parameters\r\n * @return the object\r\n */\r\n Object value2StorageValue(int fieldType, Object value,\r\n Map<String, String> params);\r\n \r\n}",
"public String getJdbcDriver()\n {\n return getDriverDobj() == null ? \"\" : getDriverDobj().getDriver();\n }",
"public DbConnection() throws SQLException, ClassNotFoundException {\r\n\t\tClass.forName (DRIVER);\r\n\t\tconn = DriverManager.getConnection(CONNECTION, \"JavaDev\", \"password\");\r\n\t\tstmt = conn.createStatement();\r\n\t}",
"public static Connection loadDriver() throws SQLException {\r\n try {\r\n Class.forName(Driver);\r\n } catch (ClassNotFoundException ex) {\r\n System.out.println(ex.getMessage());\r\n }\r\n con = DriverManager.getConnection(ConnectionString, user, pwd);\r\n return con;\r\n }",
"private static void loadDriver() {\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void setDriverDobj(JdbcDriver driver)\n {\n _driver = driver;\n }",
"public interface DatabaseAccessor {\n\n Connection getConnection() throws SQLException;\n}",
"public interface GcJdbcConnectionProvider {\n\n /**\n * if the provider requires jdbc data in the subject.properties\n * @return true if provider requires data in subject.properties\n */\n public boolean requiresJdbcConfigInSourcesXml();\n \n /** \n * init the pool \n * @param properties \n * @param sourceId mainly for logging\n * @param driver driver\n * @param maxActive max active connection if pool\n * @param defaultMaxActive if max active is needed, and blank, then use this\n * @param maxIdle max idle connections if pool\n * @param defaultMaxIdle if max is needed, and blank, then use this\n * @param maxWaitSeconds max wait if pool empty in seconds. -1 means long time\n * @param defaultMaxWaitSeconds if max wait is needed, and blank, then use this, -1 mean long time\n * @param dbUrl jdbc url of the database\n * @param dbUser user to login to the database\n * @param dbPassword password for the database (unencrypted)\n * @param readOnly if conn should be readonly\n * @param readOnlyDefault default if not specified and needed\n * @param jdbcConfigId if blank or \"grouper\" then its the grouper database, otherwise its the configId\n * in the grouper-loader.properties database entry\n * @throws SourceUnavailableException if something is not right or not available\n */\n public void init(Properties properties, String sourceId, String driver, Integer maxActive, int defaultMaxActive, Integer maxIdle, int defaultMaxIdle,\n Integer maxWaitSeconds, int defaultMaxWaitSeconds, String dbUrl, String dbUser, \n String dbPassword, Boolean readOnly, boolean readOnlyDefault, String jdbcConfigId);\n \n /**\n * get a connection (dont close this when done, just call \"doneWithConnection()\"\n * @return the connection\n * @throws SQLException if there is a problem\n */\n public GcJdbcConnectionBean connectionBean() throws SQLException;\n \n}",
"public static Connection createConnection() throws SQLException {\n\t\t// DriverManager.setLogStream( System.out );\n\t\ttry {\n\t\t\tClass.forName(\"smallsql.jdbc.SSDriver\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn DriverManager.getConnection(JDBC_URL + \"?create=true;locale=en\");\n\t}",
"public HibernateJDBCServiceImpl() {\n // UNIMPLEMENTED\n }",
"public Connection getConnection() throws ClassNotFoundException, SQLException\n\t{\n\t /* Class.forName(\"org.postgresql.Driver\");*/\n\t\tcon=dataSource.getConnection();\n\t\treturn con;\t\n\t}",
"abstract Connection getConnection() throws SQLException;",
"private SQLConnector() throws IOException, SQLException {\n\t\tProperties props = readProperties();\n\t\tString drivers = props.getProperty(\"jdbc.drivers\");\n\t\tif (drivers != null) System.setProperty(\"jdbc.drivers\", drivers);\n\t\tString url = props.getProperty(\"jdbc.url\");\n\t\tString username = props.getProperty(\"jdbc.username\");\n\t\tString password = props.getProperty(\"jdbc.password\");\n\n\t\tconnection = DriverManager.getConnection( url, username, password);\n\t}",
"public abstract String getDriver() throws DataServiceException;",
"public GcJdbcConnectionBean connectionBean() throws SQLException;",
"public void selectDriver();",
"private static Connection connect() throws SQLException {\n\t\tConnection con = null;\r\n\t\ttry {\r\n\t\t\t \r\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\r\n\t\t\tcon = DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:xe\", \"system\", \"1234\");\r\n\t\t\treturn con;\r\n\t\t\r\n\t\t\t \r\n\t\t }\r\n\t catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\nreturn con;\r\n}",
"public Connection getConnection() {\r\n try {\r\n Class.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");\r\n String url = \"jdbc:sqlserver://localhost:1433;databaseName=NMCNPM;user=sa;password=12345\";\r\n// Class.forName(resourceBundle.getString(\"driverName\"));\r\n// String url = resourceBundle.getString(\"url\");\r\n Connection connection = DriverManager.getConnection(url);\r\n return connection;\r\n } catch (SQLException | ClassNotFoundException e) {\r\n return null;\r\n }\r\n }",
"public interface PreparedStatement extends Statement \n {\n /**\n 59: * This method executes a prepared SQL query and returns its ResultSet.\n 60: *\n 61: * @return The ResultSet of the SQL statement.\n 62: * @exception SQLException If an error occurs.\n 63: */\n ResultSet executeQuery() throws SQLException;\n \n /**\n 67: * This method executes an SQL INSERT, UPDATE or DELETE statement. SQL\n 68: * statements that return nothing such as SQL DDL statements can be executed.\n 69: *\n 70: * @return The result is either the row count for INSERT, UPDATE or DELETE\n 71: * statements; or 0 for SQL statements that return nothing.\n 72: * @exception SQLException If an error occurs.\n 73: */\n int executeUpdate() throws SQLException;\n \n /**\n 7: * This method populates the specified parameter with a SQL NULL value\n 78: * for the specified type.\n 79: *\n 80: * @param index The index of the parameter to set.\n 81: * @param sqlType The SQL type identifier of the parameter from \n 82: * <code>Types</code>\n 83: *\n 84: * @exception SQLException If an error occurs.\n 85: */\n void setNull(int index, int sqlType) throws SQLException;\n \n /**\n : * This method sets the specified parameter from the given Java\n 90: * <code>boolean</code> value.\n 91: *\n 92: * @param index The index of the parameter value to set.\n 93: * @param value The value of the parameter.\n 94: * @exception SQLException If an error occurs.\n 95: */\n void setBoolean(int index, boolean value) throws SQLException;\n \n /**\n : * This method sets the specified parameter from the given Java\n 100: * <code>byte</code> value.\n 101: *\n 102: * @param index The index of the parameter value to set.\n 103: * @param value The value of the parameter.\n 104: * @exception SQLException If an error occurs.\n 105: */\n void setByte(int index, byte value) throws SQLException;\n \n /**\n 109: * This method sets the specified parameter from the given Java\n 110: * <code>short</code> value.\n 111: *\n 112: * @param index The index of the parameter value to set.\n 113: * @param value The value of the parameter.\n 114: * @exception SQLException If an error occurs.\n 115: */\n void setShort(int index, short value) throws SQLException;\n \n /**\n 119: * This method sets the specified parameter from the given Java\n 120: * <code>int</code> value.\n 121: *\n 122: * @param index The index of the parameter value to set.\n 123: * @param value The value of the parameter.\n 124: * @exception SQLException If an error occurs.\n 125: */\n void setInt(int index, int value) throws SQLException;\n \n /**\n 129: * This method sets the specified parameter from the given Java\n 130: * <code>long</code> value.\n 131: *\n 132: * @param index The index of the parameter value to set.\n 133: * @param value The value of the parameter.\n 134: * @exception SQLException If an error occurs.\n 135: */\n void setLong(int index, long value) throws SQLException;\n \n /**\n 139: * This method sets the specified parameter from the given Java\n 140: * <code>float</code> value.\n 141: *\n 142: * @param index The index of the parameter value to set.\n 143: * @param value The value of the parameter.\n 144: * @exception SQLException If an error occurs.\n 145: */\n void setFloat(int index, float value) throws SQLException;\n \n /**\n 149: * This method sets the specified parameter from the given Java\n 150: * <code>double</code> value.\n 151: *\n 152: * @param index The index of the parameter value to set.\n 153: * @param value The value of the parameter.\n 154: * @exception SQLException If an error occurs.\n 155: */\n void setDouble(int index, double value) throws SQLException;\n \n /**\n 159: * This method sets the specified parameter from the given Java\n 160: * <code>java.math.BigDecimal</code> value.\n 161: *\n 162: * @param index The index of the parameter value to set.\n 163: * @param value The value of the parameter.\n 164: * @exception SQLException If an error occurs.\n 165: */\n void setBigDecimal(int index, BigDecimal value) throws\n SQLException;\n \n /**\n 170: * This method sets the specified parameter from the given Java\n 171: * <code>String</code> value.\n 172: *\n 173: * @param index The index of the parameter value to set.\n 174: * @param value The value of the parameter.\n 175: * @exception SQLException If an error occurs.\n 176: */\n void setString(int index, String value) throws SQLException;\n \n /**\n 180: * This method sets the specified parameter from the given Java\n 181: * <code>byte</code> array value.\n 182: *\n 183: * @param index The index of the parameter value to set.\n 184: * @param value The value of the parameter.\n 185: * @exception SQLException If an error occurs.\n 186: */\n void setBytes(int index, byte[] value) throws SQLException;\n \n /**\n 190: * This method sets the specified parameter from the given Java\n 191: * <code>java.sql.Date</code> value.\n 192: *\n 193: * @param index The index of the parameter value to set.\n 194: * @param value The value of the parameter.\n 195: * @exception SQLException If an error occurs.\n 196: */\n void setDate(int index, Date value) throws SQLException;\n \n /**\n 200: * This method sets the specified parameter from the given Java\n 201: * <code>java.sql.Time</code> value.\n 202: *\n 203: * @param index The index of the parameter value to set.\n 204: * @param value The value of the parameter.\n 205: * @exception SQLException If an error occurs.\n 206: */\n void setTime(int index, Time value) throws SQLException;\n \n /**\n 210: * This method sets the specified parameter from the given Java\n 211: * <code>java.sql.Timestamp</code> value.\n 212: *\n 213: * @param index The index of the parameter value to set.\n 214: * @param value The value of the parameter.\n 215: * @exception SQLException If an error occurs.\n 216: */\n void setTimestamp(int index, Timestamp value)\n throws SQLException;\n \n /**\n 221: * This method sets the specified parameter from the given Java\n 222: * ASCII <code>InputStream</code> value.\n 223: *\n 224: * @param index The index of the parameter value to set.\n 225: * @param stream The stream from which the parameter value is read.\n 226: * @param count The number of bytes in the stream.\n 227: * @exception SQLException If an error occurs.\n 228: */\n void setAsciiStream(int index, InputStream stream, int count)\n throws SQLException;\n \n /**\n 233: * This method sets the specified parameter from the given Java\n 234: * Unicode UTF-8 <code>InputStream</code> value.\n 235: *\n 236: * @param index The index of the parameter value to set.\n 237: * @param stream The stream from which the parameter value is read.\n 238: * @param count The number of bytes in the stream.\n 239: * @exception SQLException If an error occurs.\n 240: * @deprecated\n 241: */\n void setUnicodeStream(int index, InputStream stream, int count)\n throws SQLException;\n \n /**\n 246: * This method sets the specified parameter from the given Java\n 247: * binary <code>InputStream</code> value.\n 248: *\n 249: * @param index The index of the parameter value to set.\n 250: * @param stream The stream from which the parameter value is read.\n 251: * @param count The number of bytes in the stream.\n 252: * @exception SQLException If an error occurs.\n 253: */\n void setBinaryStream(int index, InputStream stream, int count)\n throws SQLException;\n \n /**\n 258: * This method clears all of the input parameter that have been\n 259: * set on this statement.\n 260: *\n 261: * @exception SQLException If an error occurs.\n 262: */\n void clearParameters() throws SQLException;\n \n /**\n 266: * This method sets the specified parameter from the given Java\n 267: * <code>Object</code> value. The specified SQL object type will be used.\n 268: *\n 269: * @param index The index of the parameter value to set.\n 270: * @param value The value of the parameter.\n 271: * @param sqlType The SQL type to use for the parameter, from \n 272: * <code>Types</code>\n 273: * @param scale The scale of the value, for numeric values only.\n 274: * @exception SQLException If an error occurs.\n 275: * @see Types\n 276: */\n void setObject(int index, Object value, int sqlType, int scale)\n throws SQLException;\n \n /**\n 281: * This method sets the specified parameter from the given Java\n 282: * <code>Object</code> value. The specified SQL object type will be used.\n 283: *\n 284: * @param index The index of the parameter value to set.\n 285: * @param value The value of the parameter.\n 286: * @param sqlType The SQL type to use for the parameter, from \n 287: * <code>Types</code>\n 288: * @exception SQLException If an error occurs.\n 289: * @see Types\n 290: */\n void setObject(int index, Object value, int sqlType)\n throws SQLException;\n \n /**\n 295: * This method sets the specified parameter from the given Java\n 296: * <code>Object</code> value. The default object type to SQL type mapping\n 297: * will be used.\n 298: *\n 299: * @param index The index of the parameter value to set.\n 300: * @param value The value of the parameter.\n 301: * @exception SQLException If an error occurs.\n 302: */\n void setObject(int index, Object value) throws SQLException;\n \n /**\n 306: * This method executes a prepared SQL query.\n 307: * Some prepared statements return multiple results; the execute method\n 308: * handles these complex statements as well as the simpler form of\n 309: * statements handled by executeQuery and executeUpdate.\n 310: *\n 311: * @return The result of the SQL statement.\n 312: * @exception SQLException If an error occurs.\n 313: */\n boolean execute() throws SQLException;\n \n /**\n 317: * This method adds a set of parameters to the batch for JDBC 2.0.\n 318: * @exception SQLException If an error occurs.\n 319: */\n void addBatch() throws SQLException;\n /**\n 323: * This method sets the specified parameter from the given Java\n 324: * character <code>Reader</code> value.\n 325: *\n 326: * @param index The index of the parameter value to set.\n 327: * @param reader The reader from which the parameter value is read.\n 328: * @param count The number of characters in the stream.\n 329: * @exception SQLException If an error occurs.\n 330: */\n void setCharacterStream(int index, Reader reader, int count)\n throws SQLException;\n \n /**\n 335: * This method sets the specified parameter from the given Java\n 336: * <code>Ref</code> value. The default object type to SQL type mapping\n 337: * will be used.\n 338: *\n 339: * @param index The index of the parameter value to set.\n 340: * @param value The <code>Ref</code> used to set the value of the parameter.\n 341: * @exception SQLException If an error occurs.\n 342: */\n void setRef(int index, Ref value) throws SQLException;\n \n /**\n 346: * This method sets the specified parameter from the given Java\n 347: * <code>Blob</code> value. The default object type to SQL type mapping\n 348: * will be used.\n 349: *\n 350: * @param index The index of the parameter value to set.\n 351: * @param value The <code>Blob</code> used to set the \n 352: * value of the parameter.\n 353: * @exception SQLException If an error occurs.\n 354: */\n void setBlob(int index, Blob value) throws SQLException;\n \n /**\n 358: * This method sets the specified parameter from the given Java\n 359: * <code>Clob</code> value. The default object type to SQL type mapping\n 360: * will be used.\n 361: *\n 362: * @param index The index of the parameter value to set.\n 363: * @param value The <code>Clob</code> used to set the\n 364: * value of the parameter.\n 365: * @exception SQLException If an error occurs.\n 366: */\n void setClob(int index, Clob value) throws SQLException;\n \n /**\n 370: * This method sets the specified parameter from the given Java\n 371: * <code>Array</code> value. The default object type to SQL type mapping\n 372: * will be used.\n 373: *\n 374: * @param index The index of the parameter value to set.\n 375: * @param value The value of the parameter.\n 376: * @exception SQLException If an error occurs.\n 377: */\n void setArray(int index, Array value) throws SQLException;\n \n /**\n 381: * This method returns meta data for the result set from this statement.\n 382: *\n 383: * @return Meta data for the result set from this statement.\n 384: * @exception SQLException If an error occurs.\n 385: */\n ResultSetMetaData getMetaData() throws SQLException;\n \n /**\n 389: * This method sets the specified parameter from the given Java\n 390: * <code>java.sql.Date</code> value.\n 391: *\n 392: * @param index The index of the parameter value to set.\n 393: * @param value The value of the parameter.\n 394: * @param cal The <code>Calendar</code> to use for timezone and locale.\n 395: * @exception SQLException If an error occurs.\n 396: */\n void setDate(int index, Date value, Calendar cal)\n throws SQLException;\n \n /**\n 401: * This method sets the specified parameter from the given Java\n 402: * <code>java.sql.Time</code> value.\n 403: *\n 404: * @param index The index of the parameter value to set.\n 405: * @param value The value of the parameter.\n 406: * @param cal The <code>Calendar</code> to use for timezone and locale.\n 407: * @exception SQLException If an error occurs.\n 408: */\n void setTime(int index, Time value, Calendar cal)\n throws SQLException;\n \n /**\n 413: * This method sets the specified parameter from the given Java\n 414: * <code>java.sql.Timestamp</code> value.\n 415: *\n 416: * @param index The index of the parameter value to set.\n 417: * @param value The value of the parameter.\n 418: * @param cal The <code>Calendar</code> to use for timezone and locale.\n 419: * @exception SQLException If an error occurs.\n 420: */\n void setTimestamp(int index, Timestamp value, Calendar cal)\n throws SQLException;\n \n /**\n 425: * This method populates the specified parameter with a SQL NULL value\n 426: * for the specified type.\n 427: *\n 428: * @param index The index of the parameter to set.\n 429: * @param sqlType The SQL type identifier of the parameter from\n 430: * <code>Types</code>\n 431: * @param typeName The name of the data type, for user defined types.\n 432: * @exception SQLException If an error occurs.\n 433: */\n void setNull(int index, int sqlType, String typeName)\n throws SQLException;\n \n /**\n 438: * This method sets the specified parameter from the given Java\n 439: * <code>java.net.URL</code> value.\n 440: * \n 441: * @param index The index of the parameter to set.\n 442: * @param value The value of the parameter.\n 443: * @exception SQLException If an error occurs.\n 444: * @since 1.4\n 445: */\n void setURL(int index, URL value) throws SQLException;\n \n /**\n 449: * Returns information about the parameters set on this \n 450: * <code>PreparedStatement</code> (see {@link ParameterMetaData} for a\n 451: * detailed description of the provided information).\n 452: * \n 453: * @return Meta data for the parameters of this statement.\n 454: * @see ParameterMetaData\n 455: * @since 1.4\n 456: */\n ParameterMetaData getParameterMetaData() throws SQLException;\n }",
"public interface FluentJdbc {\n /**\n * Creates a Query API on a connection provided by the ConnectionProvider. Fails if no ConnectionProvider is set.\n * @return Query API on a connection provided by the ConnectionProvider\n */\n Query query();\n\n /**\n * Creates a Query API using a given managed connection\n *\n * @param connection managed sql Connection\n * @return Query API for the given connection\n */\n Query queryOn(Connection connection);\n}",
"public interface Connection extends java.sql.Connection {\n\n\t/**\n\t * Get the database credentials required to gain access to the remote database server.\n\t *\n\t * @return A one way hash that includes this Connections database login details\n\t * as supplied when this Connection was created.\n\t */\n\tpublic String getCredentials();\n\n\t/**\n\t * Returns the database's numeric type as defined in this Connections Driver class.<br />\n\t * The numeric type is set based on the request url used to create this Connection.\n\t *\n\t * @return The numeric typeName for this Connection.\n\t */\n\tpublic int getDbType();\n\n\t/**\n\t * Gets the remote URL this Connection is connected to.\n\t *\n\t * @return The URL this Connection instance is using.\n\t */\n\tpublic String getUrl();\n\n\t/**\n\t *\n\t * @return this HttpClient\n\t */\n\tpublic HttpClient getClient();\n\n\t/**\n\t *\n\t * @return get the current timeout in ms\n\t */\n\tpublic int getTimeOut();\n\n\t/**\n\t *\n\t * @param timeOut the timeout period in ms\n\t */\n\tpublic void setTimeOut(int timeOut);\n\n\t/**\n\t *\n\t * @return current Session limit\n\t */\n\tpublic boolean getSessLimit();\n\n\t/**\n\t *\n\t * @param sessLimit\n\t */\n\tpublic void setSessLimit(boolean sessLimit);\n\n\t/**\n\t * Returns the name of the requested database that was used when this Connection was created.\n\t *\n\t * @return the active database's name that this Connection Object is using.\n\t */\n\tpublic String getDatabase();\n}",
"public interface IDataSourceConfiguration {\r\n\r\n\t/**\r\n\t * \r\n\t * @return Nombre del driver \r\n\t */\r\n\tpublic String getDriverName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param driverName Nombre del driver\r\n\t */\r\n\tpublic void setDriverName(String driverName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return User name de conexion\r\n\t */\r\n\tpublic String getUserName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param userName User name de conexion\r\n\t */\r\n\tpublic void setUserName(String userName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Password de conexion\r\n\t */\r\n\tpublic String getPassword();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param password Password de conexion\r\n\t */\r\n\tpublic void setPassword(String password);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return URL de conexion. Por ejemplo jdbc:postgresql://55.55.55.55:5432/ehcos\r\n\t */\r\n\tpublic String getUrl();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param url URL de conexion. Por ejemplo jdbc:postgresql://55.55.55.55:5432/ehcos\r\n\t */\r\n\tpublic void setUrl(String url);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Alternative User name de conexion\r\n\t */\r\n\tpublic String getAltUserName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param userName Alternative User name de conexion\r\n\t */\r\n\tpublic void setAltUserName(String altUserName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Password de conexion\r\n\t */\r\n\tpublic String getAltPassword();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param password Alternative Password de conexion\r\n\t */\r\n\tpublic void setAltPassword(String altPassword);\r\n\t\r\n}",
"public DatabaseDriver getDriver() {\r\n return driver;\r\n }",
"private void loadDriver() \n\t{\n\t\ttry \n\t\t{\n\t\t\t Class.forName(\"org.postgresql.Driver\");\n\t\t} \n\t\tcatch(ClassNotFoundException cnfe) \n\t\t{\n\t\t\tDBErrorHandler.handle(\"DriverLoad\");\n\t\t}\n\t}",
"public static Connection getConnection() throws SQLException {\n\t\tString url = ConnectionCredentials.link;\n\t\tString user = ConnectionCredentials.username;\n\t\tString pass = ConnectionCredentials.password;\n\t\t\n\t\t/*Class.forName(\"org.postgresql.Driver\");\n\t\t//Two lines of recommended code\n\t\tDriver PostgresDriver = new Driver();\n\t\tDriverManager.registerDriver(PostgresDriver);*/\n\t\t\n\t\treturn DriverManager.getConnection(url, user, pass);\n\t}",
"public abstract Connection getConnection(String user, String password) throws SQLException;",
"public static interface CreateStatementFn {\r\n PreparedStatement f(Connection c) throws SQLException;\r\n }",
"<P> ConnectionService<P> getConnectionService();",
"public interface JdbcFactory {\n\n void create();\n}",
"@Nonnull\n Connection getConnection() throws SQLException;",
"public interface DbConnectService {\r\n\t\r\n\tpublic void GetDbConnectSSO() throws Exception;\r\n\tpublic Connection getConnection();\r\n\tpublic boolean executeSqlBatch(List<String> sqlBatch);\r\n\tpublic boolean executeSql(String sqlBatch);\r\n\t\r\n\tpublic boolean GetDbConnectState();\r\n\t\r\n\tpublic List<ConnectorTable> getAllConnector();\r\n\tpublic PageInfo<ConnectorTable> findSqlPageFilter(int pageNum, int pageSize);\r\n\tpublic int addSelective(ConnectorTable connectorTable);\r\n\tpublic int editSelective(ConnectorTable connectorTable);\r\n\tpublic boolean deleteByConIds(List<String> dbIds);\r\n\r\n}",
"public DatabaseInterface(String url) throws SQLException {\n sql = DriverManager.getConnection(url);\n }",
"public static java.sql.Statement getConnectionStatement ( ) throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {\n\t\t/** Definition of mysql instance for JDBC **/\n\t\t// TODO: Remove Class.forName(\"com.mysql.cj.jdbc.Driver\").getDeclaredConstructor().newInstance();\n\t\t \n\t\t/** Database connection String **/\n\t\tConnection conn = DriverManager.getConnection ( \n\t\t\t\t \"jdbc:mysql://\" \n\t\t\t\t\t\t + settings.Config.DB_CONNECTION_SERVER + \"/\" \n\t\t\t\t\t\t + settings.Config.DB_CONNECTION_DBNAME \n\t\t\t\t\t\t + \"?useSSL=false\" \n\t\t\t\t\t\t + \"&user=\" + settings.Config.DB_CONNECTION_DBUSERNAME \n\t\t\t\t\t\t + \"&password=\" + settings.Config.DB_CONNECTION_DBPASSWORD \n\t\t\t\t\t\t );\n\t\t\n\t\treturn conn.createStatement ( );\n\t}",
"private static void loadDriver() {\n\t\ttry {\n\t\t\tClass.forName(\"org.postgresql.Driver\").newInstance();\n\t\t} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {\n\t\t\tSystem.err.println(\"Canít load driver. Verify CLASSPATH\");\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\n\t}",
"public static Connection createConnection() throws SQLException, ClassNotFoundException, NamingException {\n\n DriverManager.registerDriver (new oracle.jdbc.OracleDriver());\n //Class.forName(\"oracle.jdbc.driver.OracleDriver\");\n return DriverManager.getConnection(URL,USER_LOGIN,USER_PASS);\n\n }",
"public interface StatementHandler {\n void supplyToStatement(PreparedStatement statement);\n}",
"static Connection fetchDBConnection(String drvrClass,String url,String userName,String password) throws ClassNotFoundException,SQLException\n\t{\n\t\t//load Type IV JDBC driver\n\t\tClass.forName(drvrClass);\n\t\treturn DriverManager.getConnection(url, userName,password);\n\t}",
"Driver getDriver();",
"public interface TestableDatabase {\n\n\tString getJdbcUrl();\n\n\tString getUri();\n\n \t/**\n\t * @return the database scheme for the connection. Example: {@code mysql:}\n\t */\n\tdefault String getScheme() {\n\t\treturn dbType().name().toLowerCase() + \":\";\n\t}\n\n\tdefault String getNativeDatatypeQuery(String tableName, String columnName) {\n\t\treturn \"select data_type from information_schema.columns where table_name = '\" + tableName + \"' and column_name = '\" + columnName + \"'\";\n\t}\n\n\tString getExpectedNativeDatatype(Class<?> dataType);\n\n\tdefault String createJdbcUrl(String host, int port, String database, Map<String, String> params) {\n\t\tfinal StringBuilder paramsBuilder = new StringBuilder();\n\t\tif ( params != null && !params.isEmpty() ) {\n\t\t\tparams.forEach( (key, value) -> {\n\t\t\t\tparamsBuilder.append( jdbcParamDelimiter() );\n\t\t\t\tparamsBuilder.append( key );\n\t\t\t\tparamsBuilder.append( \"=\" );\n\t\t\t\tparamsBuilder.append( value );\n\t\t\t} );\n\t\t}\n\t\tString url = \"jdbc:\" + getScheme() + \"//\" + host;\n\t\tif ( port > -1 ) {\n\t\t\turl += \":\" + port;\n\t\t}\n\t\turl += \"/\";\n\t\tif ( database != null ) {\n\t\t\turl += database;\n\t\t}\n\t\tif ( paramsBuilder.length() > 0 ) {\n\t\t\turl += jdbcStartQuery() + paramsBuilder.substring( 1 );\n\t\t}\n\t\treturn url;\n\t}\n\n\tdefault String jdbcStartQuery() {\n\t\treturn \"?\";\n\t}\n\n\tdefault String jdbcParamDelimiter() {\n\t\treturn \"&\";\n\t}\n}",
"BSQL2Java2 createBSQL2Java2();",
"@Override\n\tpublic void connect() throws SQLException {\n if (jdbcConnection == null || jdbcConnection.isClosed()) {\n try {\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n } catch (ClassNotFoundException e) {\n throw new SQLException(e);\n }\n jdbcConnection = DriverManager.getConnection(\n jdbcURL, jdbcUsername, jdbcPassword);\n }\t\t \n\t\t\n\t}",
"public interface SqlServerIntegrationTest {\n}",
"protected abstract String getDriverClassName();",
"protected Connection getConnectionDrive() throws SQLException {\n\t\treturn DriverManager.getConnection(settings.sqlConnectionString, settings.userName, settings.password);\n\t}",
"public AccesoBD(String driver,String url, String user, String password) throws ClassNotFoundException, SQLException {\n //Class.forName(driver);\n conn = DriverManager.getConnection(url,user,password);\n stmt = conn.createStatement();\n }",
"public interface CompiereDatabase\n{\n\t/**\n\t * Get Database Name\n\t * @return database short name\n\t */\n\tpublic String getName();\n\n\t/**\n\t * Get Database Description\n\t * @return database long name and version\n\t */\n\tpublic String getDescription();\n\n\t/**\n\t * Get Database Driver\n\t * @return Driver\n\t */\n\tpublic Driver getDriver();\n\n\n\t/**\n\t * Get Standard JDBC Port\n\t * @return standard port\n\t */\n\tpublic int getStandardPort();\n\n\t/**\n\t * Get Database Connection String\n\t * @param connection Connection Descriptor\n\t * @return connection String\n\t */\n\tpublic String getConnectionURL (CConnection connection);\n\n\t/**\n\t * Supports BLOB\n\t * @return true if BLOB is supported\n\t */\n\tpublic boolean supportsBLOB();\n\n\t/**\n\t * String Representation\n\t * @return info\n\t */\n\tpublic String toString();\n\n\t/**************************************************************************\n\t * Convert an individual Oracle Style statements to target database statement syntax\n\t *\n\t * @param oraStatement oracle statement\n\t * @return converted Statement\n\t * @throws Exception\n\t */\n\tpublic String convertStatement (String oraStatement);\n\n\t/**************************************************************************\n\t * Set the RowID\n\t * @param pstmt prepared statement\n\t * @param pos position\n\t * @param rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic void setRowID (PreparedStatement pstmt, int pos, Object rowID) throws SQLException;\n\n\t/**\n\t * Get rhe RowID\n\t * @param rs result set\n\t * @param pos position\n\t * @return rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic Object getRowID (ResultSet rs, int pos) throws SQLException;\n\n\t/**\n\t * Get RowSet\n\t * \t@param rs result set\n\t * @return RowSet\n\t * @throws SQLException\n\t */\n\tpublic RowSet getRowSet (ResultSet rs) throws SQLException;\n\n\t/**\n\t * \tGet Cached Connection on Server\n\t *\t@param connection info\n\t *\t@return connection or null\n\t */\n\tpublic Connection getCachedConnection (CConnection connection);\n\n\t/**\n\t * \tCreate DataSource (Client)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic DataSource createDataSource(CConnection connection);\n\n\t/**\n\t * \tCreate Pooled DataSource (Server)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic ConnectionPoolDataSource createPoolDataSource(CConnection connection);\n\n}",
"public interface CompiereDatabase\n{\n\t/**\n\t * Get Database Name\n\t * @return database short name\n\t */\n\tpublic String getName();\n\n\t/**\n\t * Get Database Description\n\t * @return database long name and version\n\t */\n\tpublic String getDescription();\n\n\t/**\n\t * Get Database Driver\n\t * @return Driver\n\t */\n\tpublic Driver getDriver();\n\n\n\t/**\n\t * Get Standard JDBC Port\n\t * @return standard port\n\t */\n\tpublic int getStandardPort();\n\n\t/**\n\t * Get Database Connection String\n\t * @param connection Connection Descriptor\n\t * @return connection String\n\t */\n\tpublic String getConnectionURL (CConnection connection);\n\n\t/**\n\t * Supports BLOB\n\t * @return true if BLOB is supported\n\t */\n\tpublic boolean supportsBLOB();\n\n\t/**\n\t * String Representation\n\t * @return info\n\t */\n\tpublic String toString();\n\n\t/**************************************************************************\n\t * Convert an individual Oracle Style statements to target database statement syntax\n\t *\n\t * @param oraStatement oracle statement\n\t * @return converted Statement\n\t * @throws Exception\n\t */\n\tpublic String convertStatement (String oraStatement);\n\n\t/**************************************************************************\n\t * Set the RowID\n\t * @param pstmt prepared statement\n\t * @param pos position\n\t * @param rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic void setRowID (PreparedStatement pstmt, int pos, Object rowID) throws SQLException;\n\n\t/**\n\t * Get rhe RowID\n\t * @param rs result set\n\t * @param pos position\n\t * @return rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic Object getRowID (ResultSet rs, int pos) throws SQLException;\n\n\t/**\n\t * Get RowSet\n\t * \t@param rs result set\n\t * @return RowSet\n\t * @throws SQLException\n\t */\n\tpublic RowSet getRowSet (ResultSet rs) throws SQLException;\n\n\t/**\n\t * \tGet Cached Connection on Server\n\t *\t@param connection info\n\t *\t@return connection or null\n\t */\n\tpublic Connection getCachedConnection (CConnection connection);\n\n\t/**\n\t * \tCreate DataSource (Client)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic DataSource createDataSource(CConnection connection);\n\n\t/**\n\t * \tCreate Pooled DataSource (Server)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic ConnectionPoolDataSource createPoolDataSource(CConnection connection);\n\n}",
"public interface DBAccessInterface {\r\n\tpublic ConnectionPoolDataSource getDataSource () throws DBAccessException ;\r\n\t//public PooledConnection getDataSource () throws DBAccessException ;\r\n\tpublic Connection getConnection() throws DBAccessException;\r\n\tpublic void reconnect()throws DBAccessException;\r\n\tpublic void dbConnect()throws DBAccessException;\r\n\t\r\n}",
"public interface IAdaptor {\n\t/**\n\t * @param connectionString\n\t * @param user\n\t * @param pwd\n\t * @return\n\t * @throws SQLException\n\t */\n\tpublic boolean connect();\n}",
"public interface SQLConverter {\n String convert(Statement statement, Object params, String mapperId);\n}",
"private TestDriverImpl getTestDriver(VerboseStream stream)\n throws IOException, ClassNotFoundException, SQLException\n {\n if (null == _driver) {\n try {\n Class.forName(\"jdbc.db.TestDriverImpl\");\n }\n catch (ClassNotFoundException e) {\n stream.writeVerbose(\"Test driver class not found\");\n throw e;\n }\n \n try {\n _driver = (TestDriverImpl)DriverManager.getDriver(TestDriverImpl.TEST_URL_START);\n }\n catch (SQLException e)\n {\n stream.writeVerbose(\"Failed to get test driver\");\n throw e;\n }\n }\n\n return _driver;\n }",
"public interface DAOjdbc\n{\n Boolean admin_log(String u,String p) throws SQLException, ClassNotFoundException;\n Boolean add_topic(String l,String n,String r) throws SQLException, ClassNotFoundException;\n List<Topic> topic(String t) throws SQLException, ClassNotFoundException;\n List<Topic> Select_topic(String i) throws SQLException, ClassNotFoundException;\n Boolean add_tou(String p) throws SQLException, ClassNotFoundException;\n Boolean add_Info(String n,String c,String t,String m) throws SQLException, ClassNotFoundException;\n Boolean add_user(String n,String p,String pw,String t,String m) throws SQLException, ClassNotFoundException;\n User select_user(String u,String p) throws SQLException, ClassNotFoundException;\n}",
"public static Connection fetchDBConnection() throws ClassNotFoundException,SQLException\n\t{\n\t//load type IV MySql supplies JDBC driver class, under method area(meta space)\n\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\n\t\t//get the fix connection to DB\n\t\tString url=\"jdbc:mysql://localhost:3306/acts?useSSl=false\";\n\t\treturn DriverManager.getConnection(url, \"root\", \"manoj1997\");\n\t}",
"public interface LocalDatabase {\n void start();\n void stop();\n boolean isAvailable();\n\n String getUrl();\n String getDriver();\n String getUsername();\n String getPassword();\n String getDialect();\n}",
"private Connection getConnection() throws SQLException {\n return DriverManager.getConnection(\"jdbc:hsqldb:file:\" + this.path + \";shutdown=true\", \"SA\", \"\");\n }",
"public void connect() throws NamingException, SQLException {\n if (con != null) disconnect();\n try {\n \tString url = \"jdbc:postgresql://localhost/stocksim\";\n \tProperties props = new Properties();\n props.setProperty(\"user\", \"ubuntu\");\n props.setProperty(\"password\", \"reverse\");\n con = DriverManager.getConnection(url, props);\n \n // Prepare statements:\n for (PreparedStatementID i: PreparedStatementID.values()) {\n PreparedStatement preparedStatement = con.prepareStatement(i.sql);\n _preparedStatements.put(i, preparedStatement);\n }\n } catch (SQLException e) {\n if (con != null) disconnect();\n throw e;\n }\n }",
"public static Connection getConnection() throws ClassNotFoundException, SQLException {\r\n\t\tString username=\"root\";\r\n\t\tString password=\"123\";\r\n\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\r\n\t\tConnection connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3308/bkdb?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC\", username, password);\r\n\t\treturn connection;\r\n\t}",
"public static Connection getConnection() throws NamingException, SQLException {\n\n\n \n //System.out.println(\"Conector\");\n try {\n //System.out.println(\"Se procede a conectar\");\n Class.forName(driver).newInstance();\n Connection connection = DriverManager.getConnection(protocol1, usuario, password);\n //System.out.println(\"Se ha conectado\");\n return connection;\n } catch (InstantiationException ex) {\n System.out.println(\"error 1\");\n } catch (IllegalAccessException ex) {\n System.out.println(\"error 2\");\n } catch (ClassNotFoundException cnfe) {\n System.out.println(\"Excepcion Driver\");\n System.out.println(\"Error excepcion: \"+cnfe.getMessage());\n cnfe.printStackTrace();\n throw new SQLException(\"Driver <\" + driver + \"> not found in the classpath.\");\n }\n return null;\n\n }",
"public abstract SqlParameterSource getSqlParameterSource();",
"Connection getConnection(String database, String schema, String jdbcURL, String jdbcURLParameters, String user, String password, boolean createDB, boolean createSchema, boolean dropDBIfExist) throws Exception;",
"public interface PreparedSqlProvider {\r\n\r\n\t/**\r\n\t * This method distills the specified criteria of a query into a\r\n\t * SQL-specific object.\r\n\t * \r\n\t * @return a a SQL statement ready for processing.\r\n\t */\r\n\tpublic PreparedSql generatePreparedSql(String prefix);\r\n\r\n\t/**\r\n\t * This method distills the specified criteria of a query into a\r\n\t * SQL-specific object.\r\n\t * \r\n\t * @return a a SQL statement ready for processing.\r\n\t */\r\n\tpublic PreparedSql generatePreparedSql(BoundString prefix);\r\n\r\n}",
"public static String getDatabaseDriverName() throws SQLException {\n Connection connection = APIMgtDBUtil.getConnection();\n String databaseType;\n\n if (connection.getMetaData().getDriverName().contains(\"MySQL\")) {\n databaseType = \"MYSQL\";\n } else if (connection.getMetaData().getDriverName().contains(\"MS SQL\") || connection.getMetaData().getDriverName().contains(\"Microsoft\")) {\n databaseType = \"MSSQL\";\n } else if (connection.getMetaData().getDriverName().contains(\"H2\")) {\n databaseType = \"H2\";\n } else if (connection.getMetaData().getDriverName().contains(\"PostgreSQL\")) {\n databaseType = \"POSTGRESQL\";\n } else {\n databaseType = \"ORACLE\";\n }\n return databaseType;\n }",
"private String discoverDriverClassName(URLClassLoader urlClassLoader) throws IOException {\n String className = null;\n URL resource = urlClassLoader.findResource(\"META-INF/services/java.sql.Driver\");\n if (resource != null) {\n BufferedReader br = null;\n try {\n br = new BufferedReader(new InputStreamReader(resource.openStream()));\n className = br.readLine();\n } finally {\n if (br != null) {\n br.close();\n }\n }\n }\n return className;\n }",
"public interface IJDBCUtil {\n int insert(CarRequest car) throws SQLException;\n\n int insertList(List<CarRequest> list) throws SQLException;\n\n int delete() throws SQLException;\n}",
"@OnScheduled\n public void registerCalciteDriver() {\n try {\n DriverManager.registerDriver(new org.apache.calcite.jdbc.Driver());\n } catch (final SQLException e) {\n throw new ProcessException(\"Failed to load Calcite JDBC Driver\", e);\n }\n }",
"private void loadDriver() {\n /*\n * The JDBC driver is loaded by loading its class.\n * If you are using JDBC 4.0 (Java SE 6) or newer, JDBC drivers may\n * be automatically loaded, making this code optional.\n *\n * In an embedded environment, this will also start up the Derby\n * engine (though not any databases), since it is not already\n * running. In a client environment, the Derby engine is being run\n * by the network server framework.\n *\n * In an embedded environment, any static Derby system properties\n * must be set before loading the driver to take effect.\n */\n try {\n Class.forName(driver).newInstance();\n System.out.println(\"Loaded the appropriate driver\");\n } catch (ClassNotFoundException cnfe) {\n System.err.println(\"\\nUnable to load the JDBC driver \" + driver);\n System.err.println(\"Please check your CLASSPATH.\");\n cnfe.printStackTrace(System.err);\n } catch (InstantiationException ie) {\n System.err.println(\n \"\\nUnable to instantiate the JDBC driver \" + driver);\n ie.printStackTrace(System.err);\n } catch (IllegalAccessException iae) {\n System.err.println(\n \"\\nNot allowed to access the JDBC driver \" + driver);\n iae.printStackTrace(System.err);\n }\n }",
"protected abstract NativeSQLStatement createNativeSridStatement();",
"public static void loadDBDriver() {\r\n\t\ttry {\r\n\t\t\tClass.forName(\"org.postgresql.Driver\");\r\n\t\t\tSystem.out.println(\"Success loading Driver!\");\r\n\t\t} catch (Exception exception) {\r\n\t\t\tSystem.out.println(\"Fail loading Driver!\");\r\n\t\t\texception.printStackTrace();\r\n\t\t}\r\n\t}",
"private void baueVerbindung() throws SQLException, ClassNotFoundException\n\t{\n\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\n\t\tconnec = DriverManager.getConnection(url+datenbank,user,password);\n\t}",
"private void connect() throws SQLException, ClassNotFoundException,\n\t\t\tInstantiationException, IllegalAccessException {\n\t\tClass.forName(driver);\n\n\t\t// Setup the connection with the DB\n\t\tconnection = DriverManager.getConnection(url + dbName, userName,\n\t\t\t\tpassword);\n\t}",
"public Connection getConnection() throws ClassNotFoundException, SQLException {\n logger.info(\"Create DB connection\");\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n return DriverManager.getConnection(\n \"jdbc:mysql://localhost:3306/prod\",\"root\",\"rootroot\");\n }",
"@Override\n\tpublic Connection getConnection() throws SQLException {\n\t\tConnection conn;\n\t\tconn = ConnectionFactory.getInstance().getConnection();\n\t\treturn conn;\n\t}",
"@Override\n public Connection getConnection() throws SQLException {\n final Props info = new Props();\n if (this.user != null) {\n info.setProperty(\"user\", this.user);\n }\n if (this.pass != null) {\n info.setProperty(\"password\", this.pass);\n }\n\n // 其它参数\n final Properties connProps = this.connProps;\n if (MapUtil.isNotEmpty(connProps)) {\n info.putAll(connProps);\n }\n\n return DriverManager.getConnection(this.url, info);\n }",
"public static Connection getConnection() throws SQLException {\n\t\t// Create a connection reference var\n\t\tConnection con = null;\n\n\t\t// Int. driver obj from our dependency, connect w/ JDBC\n\t\tDriver postgresDriver = new Driver();\n\t\tDriverManager.registerDriver(postgresDriver);\n\n\t\t// Get database location/credentials from environmental variables\n\t\tString url = System.getenv(\"db_url\");\n\t\tString username = System.getenv(\"db_username\");\n\t\tString password = System.getenv(\"db_password\");\n\t\t\n\t\t// Connect to db and assign to con var.\n\t\tcon = DriverManager.getConnection(url, username, password);\n\n\t\t// Return con, allowing calling class/method etc to use the connection\n\t\treturn con;\n\t}",
"public interface JdbcProperties {\n\n /**\n * @return the database connection url\n */\n String getUrl();\n\n /**\n * @return the database user\n */\n String getUsername();\n\n /**\n * @return the database password\n */\n String getPassword();\n}",
"private DatabaseProvider getDatabaseProvider() {\n return new DatabaseProvider(\n System.getProperty(\"url\"),\n System.getProperty(\"user\"),\n System.getProperty(\"password\")\n );\n }",
"@Override\n public Connection getConnection() throws SQLException\n {\n return connection;\n }",
"public void setJDBCDriver(Driver jdbcDriver)\n throws SQLException\n {\n DriverConfig driver;\n \n if (_driverList.size() > 0)\n driver = _driverList.get(0);\n else\n driver = createDriver();\n \n driver.setDriver(jdbcDriver);\n }",
"@Override\n public boolean jdbcCompliant() {\n return true;\n }",
"private static void loadDriver() {\n try {\n Class.forName(\"org.h2.Driver\");\n } catch (ClassNotFoundException e) {\n Logger.getLogger(Model.class.getName()).log(Level.WARNING, \"Unable to load H2 driver\", e);\n }\n\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n } catch (ClassNotFoundException e) {\n Logger.getLogger(Model.class.getName()).log(Level.WARNING, \"Unable to load mysql driver\", e);\n }\n }",
"public static synchronized Connection getConnection() throws SQLException {\r\n if (driver == null) {\r\n try {\r\n Class jdbcDriverClass = Class.forName(DRIVER);\r\n driver = (Driver) jdbcDriverClass.newInstance();\r\n DriverManager.registerDriver(driver);\r\n } catch (Exception e) {\r\n System.out.println(\"Fallo en cargar el driver jdbc\");\r\n }\r\n }\r\n return DriverManager.getConnection(URL, USUARIO, PASS);\r\n }",
"private Connection getConnection() throws SQLException{\n return ds.getConnection();\n }",
"public static Connection getConnection() throws SQLException {\n Connection c = DriverManager.getConnection(\"jdbc:sqlserver://localhost:1433;Database=finaldb;integratedSecurity=true;\");\n return c;\n }",
"public interface TargetDAOListener {\n public void beforeOpenConnection() throws InterruptedException;\n\n public void beforeOpenPreparedStatement(Connection connection) throws InterruptedException;\n\n public void beforeExecuteSql(PreparedStatement preparedStatement) throws InterruptedException;\n\n public void afterExecuteSql(PreparedStatement preparedStatement) throws InterruptedException;\n \n public void afterClosePreparedStatement() throws InterruptedException;\n \n public void afterCloseConnection() throws InterruptedException;\n}",
"public interface IDbConnection extends IDisposable {\r\n\r\n // Gets or sets the string used to open a database.\r\n // Returns:\r\n // A string containing connection settings.\r\n //String connectionString; // { get; set; }\r\n public String getConnectionString();\r\n public void setConnectionString(String connectionString);\r\n\r\n // Gets the time to wait while trying to establish a connection before terminating\r\n // the attempt and generating an error.\r\n //\r\n // Returns:\r\n // The time (in seconds) to wait for a connection to open. The default value\r\n // is 15 seconds.\r\n //int connectionTimeout; // { get; }\r\n public int getConnectionTimeout();\r\n\r\n // Gets the name of the current database or the database to be used after a\r\n // connection is opened.\r\n //\r\n // Returns:\r\n // The name of the current database or the name of the database to be used once\r\n // a connection is open. The default value is an empty string.\r\n //String database; // { get; }\r\n public String getDatabase();\r\n\r\n // Gets the current state of the connection.\r\n //\r\n // Returns:\r\n // One of the System.Data.ConnectionState values.\r\n //ConnectionState state; // { get; }\r\n public ConnectionState getState();\r\n\r\n // Begins a database transaction.\r\n //\r\n // Returns:\r\n // An object representing the new transaction.\r\n IDbTransaction beginTransaction();\r\n\r\n // Begins a database transaction with the specified System.Data.IsolationLevel\r\n // value.\r\n //\r\n // Parameters:\r\n // il:\r\n // One of the System.Data.IsolationLevel values.\r\n //\r\n // Returns:\r\n // An object representing the new transaction.\r\n IDbTransaction beginTransaction(IsolationLevel il);\r\n\r\n // Changes the current database for an open Connection object.\r\n //\r\n // Parameters:\r\n // databaseName:\r\n // The name of the database to use in place of the current database.\r\n void changeDatabase(String databaseName);\r\n\r\n // Closes the connection to the database.\r\n void close();\r\n\r\n // Creates and returns a Command object associated with the connection.\r\n //\r\n // Returns:\r\n // A Command object associated with the connection.\r\n IDbCommand createCommand();\r\n\r\n // Opens a database connection with the settings specified by the ConnectionString\r\n // property of the provider-specific Connection object.\r\n void open();\r\n}",
"private Connection getConnection() throws SQLException, ClassNotFoundException {\n return connectionBuilder.getConnection();\n }",
"SqlPackage getSqlPackage();",
"public int getDbType();",
"public interface ConnectionFactory\r\n{\r\n /**\r\n * Create the ManagedConnection. \r\n * <b>Only used by ConnectionManager so do not call this.</b>\r\n * @param ec ExecutionContext that the connection is bound to during its lifecycle (if any)\r\n * @param transactionOptions the Transaction options this connection will be enlisted to, null if non existent\r\n * @return The ManagedConnection.\r\n */\r\n ManagedConnection createManagedConnection(ExecutionContext ec, Map<String, Object> transactionOptions);\r\n\r\n /**\r\n * Release any resources that have been allocated.\r\n */\r\n void close();\r\n\r\n /**\r\n * Type of resource that this ConnectionFactory represents. See ConnectionResourceType.\r\n * @return Resource type (\"JTA\", \"RESOURCE_LOCAL\")\r\n */\r\n String getResourceType();\r\n\r\n /**\r\n * Accessor for the resource name (e.g \"jdbc/tx\").\r\n * @return The resource name\r\n */\r\n String getResourceName();\r\n}"
]
| [
"0.69668186",
"0.6867033",
"0.6783177",
"0.6526146",
"0.6507796",
"0.6445688",
"0.6411342",
"0.6392175",
"0.6387207",
"0.6349789",
"0.6349789",
"0.6308156",
"0.61998767",
"0.6192739",
"0.6159956",
"0.61119574",
"0.6111751",
"0.6094269",
"0.60683316",
"0.604819",
"0.6026126",
"0.6015",
"0.6000276",
"0.5986225",
"0.595156",
"0.59398216",
"0.5936047",
"0.59300894",
"0.5930036",
"0.5916976",
"0.5903819",
"0.58985615",
"0.5889093",
"0.58870876",
"0.588615",
"0.5875578",
"0.5859659",
"0.5849943",
"0.58448374",
"0.5832686",
"0.582971",
"0.582613",
"0.58209217",
"0.5815189",
"0.57916445",
"0.5782651",
"0.5780813",
"0.57734716",
"0.5770751",
"0.5741235",
"0.57374686",
"0.5728232",
"0.5726834",
"0.5725403",
"0.5725153",
"0.57232827",
"0.571466",
"0.5709713",
"0.5709713",
"0.57041293",
"0.56988204",
"0.56962067",
"0.5691001",
"0.56740093",
"0.56529087",
"0.5633795",
"0.56329477",
"0.56261235",
"0.56150854",
"0.5611886",
"0.56058484",
"0.5600866",
"0.5597308",
"0.55928373",
"0.5589809",
"0.5564961",
"0.556367",
"0.55595994",
"0.5559096",
"0.5558427",
"0.5555873",
"0.55510294",
"0.5544215",
"0.55439717",
"0.55429506",
"0.5538241",
"0.5535997",
"0.5518088",
"0.5513311",
"0.551247",
"0.5505162",
"0.5503867",
"0.54968065",
"0.54962736",
"0.54953116",
"0.54928815",
"0.54755235",
"0.5474332",
"0.54722583",
"0.54684836",
"0.54651326"
]
| 0.0 | -1 |
Connection connect(String url, java.util.Properties info) | Service newService(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic Connection connect(String url, Properties info) throws SQLException\r\n\t{\r\n\t\tif (!acceptsURL(url))\r\n\t\t\treturn null;\r\n\t\t// Parse URL\r\n\t\tConnectionProperties properties = ConnectionProperties.parse(url);\r\n\t\t// Get connection properties from properties\r\n\t\tproperties.setAdditionalConnectionProperties(info);\r\n\r\n\t\tCloudSpannerDatabaseSpecification database = new CloudSpannerDatabaseSpecification(properties.project,\r\n\t\t\t\tproperties.instance, properties.database);\r\n\t\tCloudSpannerConnection connection = new CloudSpannerConnection(this, url, database, properties.keyFile,\r\n\t\t\t\tproperties.oauthToken, properties.allowExtendedMode, info);\r\n\t\tconnection.setSimulateProductName(properties.productName);\r\n\t\tregisterConnection(connection);\r\n\r\n\t\treturn connection;\r\n\t}",
"public String connect(String fullURL, String parameters) throws ConnectionException;",
"public static Connection createConnection(String urlAddition, Properties info) throws SQLException {\n\n\t\tif (urlAddition == null)\n\t\t\turlAddition = \"\";\n\t\tif (info == null)\n\t\t\tinfo = new Properties();\n\n\t\tString urlComplete = JDBC_URL + urlAddition;\n\t\ttry {\n\t\t\tClass.forName(\"smallsql.jdbc.SSDriver\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn DriverManager.getConnection(urlComplete, info);\n\t}",
"public boolean connect(String connectionInfo, String userName, String password);",
"@Override\n public Connection connect(String url, Properties properties) throws SQLException {\n if (url == null) {\n throw new SQLException(\"url is required\");\n }\n\n if( !acceptsURL(url) ) {\n return null;\n }\n\n // find the real driver for the URL\n Driver passThru = findPassthru(url);\n\n P6LogQuery.debug(\"this is \" + this + \" and passthru is \" + passThru);\n\n final long start = System.nanoTime();\n\n if (P6SpyDriver.jdbcEventListenerFactory == null) {\n P6SpyDriver.jdbcEventListenerFactory = JdbcEventListenerFactoryLoader.load();\n }\n final Connection conn;\n final JdbcEventListener jdbcEventListener = P6SpyDriver.jdbcEventListenerFactory.createJdbcEventListener();\n final ConnectionInformation connectionInformation = ConnectionInformation.fromDriver(passThru);\n connectionInformation.setUrl(url);\n jdbcEventListener.onBeforeGetConnection(connectionInformation);\n try {\n conn = passThru.connect(extractRealUrl(url), properties);\n connectionInformation.setConnection(conn);\n connectionInformation.setTimeToGetConnectionNs(System.nanoTime() - start);\n jdbcEventListener.onAfterGetConnection(connectionInformation, null);\n } catch (SQLException e) {\n connectionInformation.setTimeToGetConnectionNs(System.nanoTime() - start);\n jdbcEventListener.onAfterGetConnection(connectionInformation, e);\n throw e;\n }\n\n return ConnectionWrapper.wrap(conn, jdbcEventListener, connectionInformation);\n }",
"public UrlInfo(URL url) throws IOException {\n this.urlConnection = url.openConnection();\n }",
"public static void connectURL(String url) throws Exception {\n\t\tURL newurl = new URL(url);\n\t\tHttpURLConnection connection = (HttpURLConnection) newurl.openConnection();\n\t\tconnection.getContent();\n\t\t\n\t}",
"protected HTTPConnection getConnectionToURL(URL url) throws ProtocolNotSuppException\r\n {\r\n\r\n HTTPConnection con = new HTTPConnection(url);\r\n con.setDefaultHeaders(new NVPair[] { new NVPair(\"User-Agent\", \"Mozilla/4.5\")});\r\n con.setDefaultAllowUserInteraction(false);\r\n\r\n if (proxyRequired)\r\n {\r\n con.addBasicAuthorization(proxyRealm, proxyName, proxyPswd);\r\n }\r\n\r\n return (con);\r\n }",
"public abstract void connect(JMXServiceURL url, Map<String, Object> env) throws IOException;",
"public String getConnectionURL (CConnection connection);",
"public String getConnectionURL (CConnection connection);",
"public static String testConnection(String url) {\n LearnerInterface learner = new LearnerInterface(url);\n String jsonInfo = learner.getInfo();\n if (jsonInfo.equals(\"err\")) {\n System.out.println(\"Could not connect to server\");\n return null;\n }\n return jsonInfo;\n }",
"public SnowflakeConnectionV1(String url,\n Properties info)\n throws SQLException\n {\n logger.debug(\"Trying to establish session, JDBC driver version: {}\",\n SnowflakeDriver.implementVersion);\n TelemetryService.getInstance().updateContext(url, info);\n // open connection to GS\n sfSession = new SFSession();\n\n try\n {\n // pass the parameters to sfSession\n initSessionProperties(url, info);\n\n sfSession.open();\n\n // SNOW-18963: return database version\n databaseVersion = sfSession.getDatabaseVersion();\n databaseMajorVersion = sfSession.getDatabaseMajorVersion();\n databaseMinorVersion = sfSession.getDatabaseMinorVersion();\n newClientForUpdate = sfSession.getNewClientForUpdate();\n }\n catch (SFException ex)\n {\n throw new SnowflakeSQLException(ex.getCause(), ex.getSqlState(),\n ex.getVendorCode(), ex.getParams());\n }\n\n appendWarnings(sfSession.getSqlWarnings());\n\n isClosed = false;\n }",
"@Override\n public URLConnection openConnection(URL url) throws IOException {\n return openConnection(url, null);\n }",
"protected URLConnection createConnection(URL url) throws IOException\n {\n URLConnection con = url.openConnection();\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n return con;\n }",
"protected URLConnection openConnection(URL url)\r\n/* 29: */ throws IOException\r\n/* 30: */ {\r\n/* 31:27 */ System.out.println(\"In openConnection\");\r\n/* 32: */ \r\n/* 33:29 */ return new KentCryptURLConnection(url);\r\n/* 34: */ }",
"public HttpURLConnection createHttpURLConnection(String url) throws Exception {\n\t\tURL obj = new URL(url);\n\t\tHttpURLConnection conn = (HttpURLConnection)obj.openConnection();\n\t\tif (conn instanceof HttpsURLConnection && obj.getHost().equals(\"epilog.heapcraft.net\")) {\n\t\t\tHttpsURLConnection sslConn = (HttpsURLConnection)conn;\n\t\t\tsslConn.setSSLSocketFactory(getSSLSocketFactory(\"letsencryptauthorityx3.cer\"));\n\t\t}\n\t\treturn conn;\n\t}",
"public AboutURLConnection(URL url) {\n\t\tsuper(url);\n\t}",
"public static void establishConnection() {\n try {\n PropertiesLoader loader = new PropertiesLoader();\n String sshUser = loader.loadProperty().getProperty(\"sshUser\");\n String sshPassword = loader.loadProperty().getProperty(\"sshPassword\");\n String sshHost = loader.loadProperty().getProperty(\"sshHost\");\n int sshPort = Integer.parseInt(loader.loadProperty().getProperty(\"sshPort\"));\n String remoteHost = loader.loadProperty().getProperty(\"remoteHost\");\n int localPort = Integer.parseInt(loader.loadProperty().getProperty(\"localPort\"));\n int remotePort = Integer.parseInt(loader.loadProperty().getProperty(\"remotePort\"));\n\n String dbUrl = loader.loadProperty().getProperty(\"dbUrl\");\n String dbUser = loader.loadProperty().getProperty(\"dbUser\");\n String dbPassword = loader.loadProperty().getProperty(\"dbPassword\");\n\n DatabaseManager.doSshTunnel(sshUser, sshPassword, sshHost, sshPort, remoteHost, localPort, remotePort);\n connection = DriverManager.getConnection(dbUrl, dbUser, dbPassword);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"private static Connection connect(String url) throws SQLException {\n\ttry {\r\n\t\tDatabaseUtil.loadDatabaseDriver(url);\r\n\t} catch (ClassNotFoundException e) {\r\n\t\tlog.error(\"Could not find JDBC driver class.\", e);\r\n\t\tthrow (SQLException) e.fillInStackTrace();\r\n\t}\r\n\r\n\t// Step 2: Establish the connection to the database.\r\n\tString username = Context.getRuntimeProperties().getProperty(\r\n\t\"connection.username\");\r\n\tString password = Context.getRuntimeProperties().getProperty(\r\n\t\"connection.password\");\r\n\tlog.debug(\"connecting to DATABASE: \" + OpenmrsConstants.DATABASE_NAME\r\n\t\t\t+ \" USERNAME: \" + username + \" URL: \" + url);\r\n\treturn DriverManager.getConnection(url, username, password);\r\n}",
"@Override\n\tpublic URLConnection openConnection(URL url) throws IOException {\n\t\tif (url.getPath() == null || url.getPath().trim().length() == 0) {\n\t\t\tthrow new MalformedURLException(\"Path can not be null or empty. Syntax: \" + SYNTAX);\n\t\t}\n\t\treturn new MyURLConnection(url);\n\t}",
"@Override\r\n\tpublic void connect(URL url) throws RemoteException {\n\t\tclientPool=ClientPoolManager.INSTANCE.getClientPool(url);\r\n\r\n\t}",
"public boolean connect(String url) {\n return connect(url,null);\n }",
"private void setupAndConnect() {\n URL url = getUrl(this.endpointUrl);\n connection = null;\n try {\n connection = (HttpURLConnection) url.openConnection();\n HttpURLConnection.setFollowRedirects(true);\n } catch (IOException e) {\n LOG.severe(\"Error connecting to Url : \" + url);\n LOG.severe(e.toString());\n }\n }",
"public void connect()\n\t{\n try{\n \tClass.forName(\"com.mysql.jdbc.Driver\").newInstance();\n \tconn = DriverManager.getConnection(url,user,pwd);\n \tSystem.out.println(\"Connected...\");\n }\n \n catch(Exception se){\n \tse.printStackTrace();\n }\n\t}",
"@Override\n public URLConnection openConnection(URL url, Proxy proxy) throws IOException {\n if (url == null) {\n throw new IllegalArgumentException(\"url == null\");\n }\n String host = url.getHost();\n if (host == null || host.isEmpty() || host.equalsIgnoreCase(\"localhost\")) {\n return new FtpURLConnection(url);\n }\n // If a hostname is specified try to get the resource using FTP\n URL ftpURL = new URL(\"ftp\", host, url.getFile());\n return (proxy == null) ? ftpURL.openConnection() : ftpURL.openConnection(proxy);\n }",
"public TriasConnection() throws IOException {\n URL url = new URL(urlString);\n URLConnection con = url.openConnection();\n http = (HttpURLConnection) con;\n }",
"private Connection connect() {\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(urlPath);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }",
"public UrlInfo(String urlString) throws IOException {\n URL url = new URL(urlString);\n this.urlConnection = url.openConnection();\n }",
"private Connection connect(){\n Connection connection = null;\n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n connection = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n }\n catch (Exception e){\n System.out.print(e);\n }\n return connection;\n }",
"public static HttpURLConnection openConn(String url, String xKey) throws MalformedURLException, IOException\n\t{\n\t\t//Lancement de la connexion\n\t\tHttpURLConnection con = (HttpURLConnection)new URL(url).openConnection();\n\t\t\n\t\t//Mise en place du xKey et des options\n\t\tcon.setRequestProperty(\"X-Key\", xKey);\n\t\tcon.setRequestProperty(\"Content-Type\", \"application/json\");\n\t\treturn (con);\n\t}",
"public static HttpURLConnection connection(String url, String xKey, JSONObject jsonMessage, String method) throws IOException\n\t{\n\t\t//Lancement de la connexion pour remplir la requete\n\t\tHttpURLConnection con = openConn(url, xKey);\n\t\tcon.setRequestProperty(\"Content-Length\", Integer.toString(jsonMessage.length()));\n\t\tcon.setRequestMethod(method);\n\t\tcon.setDoOutput(true);\n\t\t\t\t \n\t\t//Envoie des informations dans la connexion\n\t\tOutputStreamWriter sendMessage = new OutputStreamWriter(con.getOutputStream());\n\t\tsendMessage.write(jsonMessage.toString());\n\t\tsendMessage.flush();\n\t\tsendMessage.close();\n\t\treturn (con);\n\t}",
"public HttpsConnection openConnection(final String url) throws BooruEngineConnectionException {\n try {\n return openConnection(new URL(url));\n } catch (MalformedURLException e) {\n throw new BooruEngineConnectionException(e);\n }\n }",
"private static HttpURLConnection createDefaultConnection(String url) throws IOException {\n HttpURLConnection connection = (HttpURLConnection) (new URL(url)).openConnection();\n connection.setReadTimeout(20000);\n connection.setConnectTimeout(20000);\n return connection;\n }",
"private Connection connect() {\n Connection c = null;\n try {\n Class.forName(\"org.sqlite.JDBC\"); //make sure jdbc exists and can be found\n c = DriverManager.getConnection(\"jdbc:sqlite:\" + url);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n return c;\n }",
"public void connect() {\n try {\n Class.forName(\"com.mysql.jdbc.Connection\");\n //characterEncoding=latin1&\n //Class.forName(\"org.apache.derby.jdbc.EmbeddedDriver\");\n //Connection conn = new Connection();\n url += \"?characterEncoding=latin1&useConfigs=maxPerformance&useSSL=false\";\n conn = DriverManager.getConnection(url, userName, password);\n if (conn != null) {\n System.out.println(\"Established connection to \"+url+\" Database\");\n }\n }\n catch(SQLException e) {\n throw new IllegalStateException(\"Cannot connect the database \"+url, e);\n }\n catch(ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n }",
"@Deprecated\n public URLConnection makeUrlConnection(URL url) throws IOException {\n URLConnection uc = url.openConnection();\n return addTraceHeaders(uc);\n }",
"private static DatabaseConnection getConnection (String url,\n\t\tString username, String password) \n\t\t\tthrows Exception\n\t{\n\t\tConnection c = DriverManager.getConnection(url, username, password);\n\t\tint i = url.lastIndexOf(\"/\");\n\t\tString name = url.substring(i+1);\n\t\treturn new DatabaseConnection(c, name);\n\t}",
"private static final HttpURLConnection createDefaultConn(final URL _url) throws IOException {\n\n\t\tfinal HttpURLConnection conn = (HttpURLConnection) _url.openConnection();\n\t\tconn.setConnectTimeout(Constants.CONN_TIMEOUT);\n\n\t\treturn conn;\n\t}",
"private HttpURLConnection createConnection(URL url, String resource,\n\t\t\tString method, String contentType, String xAuthToken)\n\t\t\tthrows IOException {\n\n\t\t// initialize the URL of the connection as the concatenation of\n\t\t// parameters url and resource.\n\t\tURL connectionURL = composeUrl(url.toString(), resource);\n\n\t\tlogger.debug(\"Connecting to: \" + connectionURL.toString());\n\n\t\t// initialize and configure the connection\n\t\tHttpURLConnection connection = (HttpURLConnection) connectionURL\n\t\t\t\t.openConnection();\n\n\t\t// enable both input and output for this connection\n\t\tconnection.setDoInput(true);\n\t\tconnection.setDoOutput(true);\n\n\t\t// configure other things\n\t\tconnection.setInstanceFollowRedirects(false);\n\t\tconnection.setRequestProperty(\"Content-Type\", contentType);\n\t\tconnection.setRequestProperty(\"Accept\", contentType);\n\t\tconnection.setRequestProperty(\"X-Auth-Token\", xAuthToken);\n\n\t\t// set connection timeout\n\t\tconnection.setConnectTimeout(CONNECTION_TIMEOUT);\n\n\t\t// set the request method to be used by the connection\n\t\tconnection.setRequestMethod(method);\n\n\t\t// finally return the nicely configured connection\n\t\treturn connection;\n\n\t}",
"public static URLConnection m17187a(URL url) {\n return url.openConnection();\n }",
"public String connectAndGetPage(String url) throws IOException {\n URL page = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) page.openConnection();\n conn.connect();\n InputStreamReader in = new InputStreamReader((InputStream) conn.getContent());\n BufferedReader buff = new BufferedReader(in);\n String line;\n StringBuilder sb = new StringBuilder(\"\");\n while ((line = buff.readLine()) != null) {\n sb.append(line).append(\"\\n\");\n }\n return sb.toString();\n }",
"protected URLConnection openConnection(URL u) throws IOException{\r\n\t\tURLConnection connection = new RSuiteConnection(u);\r\n\t\treturn connection;\r\n\t}",
"public HttpURLConnection createConnection(URL url) throws IOException {\n HttpsURLConnection httpsURLConnection = (HttpsURLConnection) super.createConnection(url);\n try {\n httpsURLConnection.setSSLSocketFactory(new TPVVSSLFactory());\n httpsURLConnection.setHostnameVerifier(HttpsURLConnection.getDefaultHostnameVerifier());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return httpsURLConnection;\n }",
"public abstract void connect() throws UnknownHostException, IOException;",
"private void getConnection() {\r\n\r\n\t\ttry {\r\n\t\t\tClass.forName(driver);\r\n\t\t\tconn = DriverManager.getConnection(url, id, pw);\r\n\t\t\tSystem.out.println(\"[접속성공]\");\r\n\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\tSystem.out.println(\"error: 드라이버 로딩 실패 -\" + e);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"error:\" + e);\r\n\t\t}\r\n\r\n\t}",
"public Connection connect() {\n\t\t\n\n\t\ttry {\n\t\t\tconnection = DriverManager.getConnection(URL, USERNAME, PASSWORD);\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\tSystem.out.println(\"Creating connection\");\n\t\treturn connection;\n\n\t}",
"ReaderHelper connectNet(final String host, final int port);",
"public Connection connect() {\n conn = null;\n try {\n conn = DriverManager.getConnection(url, user, password);\n System.out.println(\"Connected successfully.\");\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n \n return conn;\n }",
"String getConnection();",
"String getConnection();",
"String getConnection();",
"String getConnection();",
"public JDBCConnection(String databaseName, String connectionUrl, Properties properties) {\n this.databaseName = databaseName;\n this.connectionUrl = connectionUrl;\n this.properties = properties;\n }",
"public void connect( String id, String url ) throws MojoExecutionException\n {\n Repository repository = new Repository( id, url );\n\n try\n {\n m_wagon = m_wagonManager.getWagon( repository );\n }\n catch ( UnsupportedProtocolException e )\n {\n throw new MojoExecutionException( \"Unsupported protocol: '\" + repository.getProtocol() + \"'\", e );\n }\n catch ( WagonException e )\n {\n throw new MojoExecutionException( \"Unable to configure Wagon: '\" + repository.getProtocol() + \"'\", e );\n }\n\n try\n {\n ProxyInfo proxyInfo = getProxyInfo( m_settings );\n if ( proxyInfo != null )\n {\n m_wagon.connect( repository, m_wagonManager.getAuthenticationInfo( id ), proxyInfo );\n }\n else\n {\n m_wagon.connect( repository, m_wagonManager.getAuthenticationInfo( id ) );\n }\n }\n catch ( ConnectionException e )\n {\n throw new MojoExecutionException( \"Connection failed\", e );\n }\n catch ( AuthenticationException e )\n {\n throw new MojoExecutionException( \"Authentication failed\", e );\n }\n }",
"Connection createConnection();",
"private HttpURLConnection getConnection(String urlString, String... arguments)\n throws RedmineException\n {\n HttpURLConnection connection = null;\n\n try\n {\n if (serverUseSSL)\n {\n URL url = new URL(\"https://\"+serverName+\":\"+serverPort+urlString+\".xml\"+(((arguments != null) && (arguments.length > 0)) ? \"?\"+StringUtils.join(arguments,'&') : \"\"));\n HttpsURLConnection httpsConnection = (HttpsURLConnection)url.openConnection();\n httpsConnection.setHostnameVerifier(anyHostnameVerifier);\n connection = httpsConnection;\n }\n else\n {\n URL url = new URL(\"http://\"+serverName+\":\"+serverPort+urlString+\".xml\"+(((arguments != null) && (arguments.length > 0)) ? \"?\"+StringUtils.join(arguments,'&') : \"\"));\n HttpURLConnection httpConnection = (HttpURLConnection)url.openConnection();\n connection = httpConnection;\n }\n }\n catch (UnknownHostException exception)\n {\n throw new RedmineException(\"Unknown host '\"+serverName+\"'\");\n }\n catch (IOException exception)\n {\n throw new RedmineException(\"Connect to server fail\",exception);\n }\n\n return connection;\n }",
"protected Connection getConnectionFromDriverManager(String url, String username, String password) throws SQLException {\n return DriverManager.getConnection(this.url, username, password);\n }",
"private void initConnection() throws MalformedURLException, IOException {\n httpConnection = (HttpURLConnection) new URL(initUrlParameter())\n .openConnection();\n httpConnection.setDoOutput(true);\n httpConnection.setDoInput(true);\n httpConnection.setRequestMethod(\"GET\");\n httpConnection.setRequestProperty(\"Content-Type\", \"application/json\");\n httpConnection.setRequestProperty(\"Authorization\",\n authentificator.generateBasicAuthorization());\n\n }",
"public synchronized void openConnection() throws MalformedURLException,\n IOException, AuthenticationException {\n\n this.connector = createJMXConnector(connectionConfiguration);\n\n try {\n Activator.getDefault().info(\n \"Connecting to \" + connectionConfiguration);\n connector.connect();\n addConnectionNotificationListener();\n connectionAlreadyClosed = false;\n } catch (IllegalArgumentException ile) {\n Activator.getDefault().info(\"Authentication failed\", ile);\n throw new AuthenticationException();\n } catch (IOException ioe) {\n throw ioe;\n } catch (Throwable e) {\n Activator.getDefault().error(\n \"Unknown exception while opening connection \", e);\n throw new IOException(e.getCause());\n }\n }",
"public static void connection(URL theUrl)\n\t{\n\t\ttry\n\t\t{\n\t\t\tInputStream is = theUrl.openStream();\n\t\t\tInputStreamReader isr = new InputStreamReader(is);\n\t\t\tBufferedReader br = new BufferedReader(isr);\n\t\t\tString theLine;\n\t\t\twhile((theLine = br.readLine()) != null)\n\t\t\t{\n\t\t\t\tSystem.out.println(theLine);\n\t\t\t}\n\t\t}\n\t\tcatch(IOException ex)\n\t\t{\n\t\t\tSystem.err.println(ex);\n\t\t}\t\n\t}",
"public void open(String url) {\n try {\n s = new Socket(url, 21);\n\n reader = new BufferedReader(new InputStreamReader(s.getInputStream()));\n writer = new PrintWriter(s.getOutputStream());\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic Connection connect(String arg0, Properties arg1) throws SQLException {\n\t\t\n\t\treturn new connection(arg0,arg1);\n\t}",
"public Connection connect(String URL) throws InvalidGooglePlayGameUrlException, MalformedURLException, URISyntaxException {\n return connect(URL, Locale.getDefault().getLanguage(), Locale.getDefault().getCountry());\n }",
"private void CreateConnection()\n throws IOException {\n URL url = new URL(requestURL);\n //creates connection\n httpConn = (HttpURLConnection) url.openConnection();\n //sets headers\n Set<Map.Entry<String, String>> set = headers.entrySet();\n for (Map.Entry<String, String> me : set) {\n httpConn.setRequestProperty(me.getKey(), me.getValue());\n }\n //sets method\n httpConn.setRequestMethod(method);\n httpConn.setUseCaches(false);\n if (method == \"POST\") {\n httpConn.setDoOutput(true);\n httpConn.setDoInput(true);\n }\n\n }",
"public Session getConnection(String username, String password, Map<String,String> parameters);",
"public boolean connect(Properties props) {\n boolean con = false;\n Object obj = props.remove(URL_KEY);\n mRLIURL = (obj == null) ? null : (String) obj;\n\n if (mRLIURL == null) {\n //nothing to connect to.\n mLogger.log(\"The RLI url is not specified\",\n LogManager.ERROR_MESSAGE_LEVEL);\n return con;\n }\n\n //try to see if a proxy cert has been specified or not\n String proxy = props.getProperty(PROXY_KEY);\n mConnectProps = props;//??\n \n mLogger.log( \"[RLI-RC] Connection properties passed are \" + props,\n LogManager.DEBUG_MESSAGE_LEVEL );\n\n mLRCIgnoreList = this.getRLSLRCIgnoreURLs( props );\n mLRCRestrictList = this.getRLSLRCRestrictURLs( props );\n\n\n //determine timeout\n mTimeout = getTimeout(props);\n\n //set the batch size for queries\n setBatchSize(props);\n\n return connect(mRLIURL, proxy);\n }",
"public static boolean getConnection(String url, int vendor, String user,\n String password) throws ClassNotFoundException, Exception {\n return DBMSSocket.getConnection(url, vendor, user, password);\n }",
"private void connectServerSide( URL url ) throws IOException\n\t{\n\t\tString host = url.getHost();\n\t\tint port = url.getPort();\n\t\tif ( port == -1 )\n\t\t\tport = 554;\n\n\t\tlog.debug( \"Connecting to '\" + host + \"' \" + port );\n\n\t\t// Create TCP/IP connector.\n\t\tSocketConnector socketConnector = new SocketConnector();\n\t\tIoProtocolConnector connector = new IoProtocolConnector( socketConnector );\n\n\t\tServerSideProvider serverSideProvider = new ServerSideProvider();\n\n\t\tlog.debug( \"Created new serverSideProvider\" );\n\n\t\t// Start communication.\n\t\tlog.debug( \"Trying to connect.\" );\n\t\tserverSession = connector.connect( new InetSocketAddress( host, port ),\n\t\t\t\tserverSideProvider );\n\n\t\tlog.debug( \"Connected!\" );\n\n\t\t// Save current ProxyHandler into the ProtocolSession\n\t\tserverSession.setAttribute( \"proxySession\", this );\n\n\t\tSystem.out.println( \"Server session: \" + serverSession.getAttributeKeys() );\n\t}",
"public Connection connect() throws SQLException {\n\n return DriverManager.getConnection(URL);\n }",
"public static void connect()\n {\n conn = null;\n try {\n Class.forName(\"org.postgresql.Driver\");\n conn = DriverManager.getConnection(url, user, password);\n System.out.println(\"Connected to Server Successfully.\");\n }catch(Exception e) {\n System.out.println(e.getMessage());\n }\n }",
"ClientConnection connection();",
"@Override\n public Connection newConnection(String url, String login, String password) {\n Connection connection = null;\n cpds.setJdbcUrl(url);\n cpds.setUser(login);\n cpds.setPassword(password);\n //logger.debug(\"Connection params: JdbcUrl \" + url + \", Login \" + login + \", Password \" + password);\n\n\n try {\n //logger.debug(\"Try to create new C3P0 connection ...\");\n connection = cpds.getConnection();\n //logger.debug(\"New C3P0 connection created succesfully! \" + connection.toString());\n } catch (SQLException e) {\n //logger.warn(\"Creation of new C3P0 connection is failed!\", e);\n }\n\n return connection;\n }",
"public void connect(){\n if (connected) {\n // connection already established\n return;\n }\n // Create connection to Database\n Properties props = new Properties();\n props.setProperty(\"user\", DB_USER);\n props.setProperty(\"password\", DB_PASSWORD);\n //props.setProperty(\"ssl\", \"true\");\n //\"Connecting to database...\"\n try {\n Class.forName(\"org.postgresql.Driver\");\n String connection_string = generateURL();\n dbConnect = DriverManager.getConnection(connection_string, props);\n //\"Connection established\"\n status = \"Connection established\";\n connected = true;\n } catch (SQLException e) {\n //\"Connection failed: SQL error\"\n status = \"Connection failed: \" + e.getMessage();\n connected = false;\n } catch (Exception e) {\n //\"Connection failed: unknown error\"\n status = \"Connection failed: \" + e.getMessage();\n connected = false;\n }\n }",
"protected void connect(String url, String devKey) {\n // Open connection to TestLink\n testlink = new TestLinkSite(url, devKey);\n }",
"public static Connection getConnection(){\n try {\n connection = DriverManager.getConnection(URL,USERNAME,PASSWORD);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return connection;\n }",
"public void newConnection(String hostname, int port) throws Exception;",
"public static ProtocolConnection openConnection(String host, int port,String user, Properties info)\n\t\t\tthrows SSDBException {\n\n\t\tfor (int i = 0; i < versions.length; ++i) {\n//\t\t\tString versionProtoName = (String) versions[i][0];\n//\t\t\tif (protoName != null && !protoName.equals(versionProtoName))\n//\t\t\t\tcontinue;\n\n\t\t\tConnectionFactory factory = (ConnectionFactory) versions[i][1];\n\t\t\tProtocolConnection connection = factory.openConnectionImpl(host, port,\n\t\t\t\t\tuser, info);\n\t\t\tif (connection != null)\n\t\t\t\treturn connection;\n\t\t}\n\n\t\tthrow new SSDBException(\n\t\t\t\tGT.tr(\"A connection could not be made using the requested protocol\"));\n\t}",
"public void connect() {\n\n\t\ttry {\n\n\t\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException ex) {\n\t\t\tSystem.err.println(\"Unable to load MySQL Driver\");\n\t\t\t\n\t\t}\n\n\t\tString jdbcUrl = \"jdbc:mysql://localhost:3306/userinfo?useLegacyDatetimeCode=false&serverTimezone=UTC&useSSL=false\";\n\t\ttry {\n\t\t\t// DriverManager.registerDriver(new com.mysql.jdbc.Driver());\n\t\t\tConnection con = DriverManager.getConnection(jdbcUrl, \"root\", \"smmk143143\");\n\t\t\tconn = con;\n\t\t\t// Set auto commit as false.\n\t\t\tconn.setAutoCommit(false);\n\t\t\tSystem.out.println(\"接続済み/Connected\");\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"接続エラーが発生しました/Connection Error Occured\");\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\t}",
"@Override\n public DriverPropertyInfo[] getPropertyInfo( String url,\n Properties info ) throws SQLException {\n RepositoryDelegate repositoryDelegate = delegateFactory.createRepositoryDelegate(url, info, this.contextFactory);\n ConnectionInfo connectionInfo = repositoryDelegate.getConnectionInfo();\n return connectionInfo.getPropertyInfos();\n }",
"void createConnection();",
"public static Connection openConnection() {\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tClass.forName(DRIVER);\n\t\t\tconn = DriverManager.getConnection(URL, USER, PASS);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn conn;\n\t\t\n\t}",
"private Image establishConnection(String url) throws IOException {\n\n String imgUrl = url;\n URLConnection connection = new URL(imgUrl).openConnection();\n connection.addRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0\");\n Image image = new Image(connection.getInputStream());\n return image;\n }",
"@NonNull\n HttpURLConnection openConnection(@NonNull Uri uri) throws IOException;",
"public static Connection getConnection() {\r\n\t\tString DRIVER_CLASS = \"com.mysql.cj.jdbc.Driver\";\r\n\t\ttry {\r\n\t\t\tClass.forName(DRIVER_CLASS).getDeclaredConstructor().newInstance();\r\n\t\t} catch(Exception e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t\tjava.sql.Connection conn = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tconn = DriverManager.getConnection(DatabaseInfo.url, DatabaseInfo.username, DatabaseInfo.password);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t\treturn conn;\r\n\t}",
"public static ConnectInfo fromURL(final URL authConfig) {\n\t\tif(authConfig==null) throw new IllegalArgumentException(\"The passed authConfig was null\");\n\t\tfinal String text = URLHelper.getTextFromURL(authConfig);\n\t\ttry {\n\t\t\treturn fromJSON(new JSONObject(text));\n\t\t} catch (JSONException ex) {\n\t\t\ttry {\t\t\t\t\n\t\t\t\treturn fromProperties(text);\n\t\t\t} catch (Exception ex2) {\n\t\t\t\tthrow new RuntimeException(ex2);\n\t\t\t}\t\t\t\t\t\n\t\t}\t\t\n\t}",
"private Connection getConnection(Connection connection) {\n try {\n Class.forName(properties.getProperty(\"db.driver\"));\n\n connection = DriverManager.getConnection(\n properties.getProperty(\"db.url\"),\n properties.getProperty(\"db.username\"),\n properties.getProperty(\"db.password\"));\n } catch (ClassNotFoundException classNotFound) {\n classNotFound.printStackTrace();\n } catch (SQLException sqlException) {\n sqlException.printStackTrace();\n } catch (Exception exception) {\n System.err.println(\"General Error\");\n exception.printStackTrace();\n }\n return connection;\n }",
"@Override\n public Connection getConnection() throws SQLException {\n final Props info = new Props();\n if (this.user != null) {\n info.setProperty(\"user\", this.user);\n }\n if (this.pass != null) {\n info.setProperty(\"password\", this.pass);\n }\n\n // 其它参数\n final Properties connProps = this.connProps;\n if (MapUtil.isNotEmpty(connProps)) {\n info.putAll(connProps);\n }\n\n return DriverManager.getConnection(this.url, info);\n }",
"public boolean connect(){\n try{\n conn = DriverManager.getConnection(uri, user, password);\n }catch (SQLException sqle){\n DLException dle = new DLException(sqle, \"Unable to conclude this operation\");\n return false;\n }\n return true;\n }",
"public boolean connect(String sURL, String sUser, String sPassword) throws JiBXException, IOException {\r\n\r\n\tCalendarResponse oResponse = CalendarResponse.get(sURL+\"?command=connect&user=\"+sUser+\"&password=\"+sPassword);\r\n \r\n iErrCode = oResponse.code;\r\n sErrMsg = oResponse.error;\r\n\r\n if (iErrCode==0) {\r\n sBaseURL = sURL;\r\n sSecurityToken = oResponse.value;\r\n return true;\r\n } else {\r\n sBaseURL = null;\r\n sSecurityToken = null;\r\n return false;\r\n }\r\n }",
"public HttpURLConnection openConnection(String path) throws IOException {\n\t\tHttpURLConnection co = (HttpURLConnection) getURL(path).openConnection();\n\t\tconfigureConnection(co);\n\t\tconfigureSession(co);\n\t\treturn co;\n\t}",
"public static void setConnection(String url, String user, String password) {\n Database.url = url;\n Database.user = user;\n Database.password = password;\n }",
"public Connection getConnection();",
"public Connection getConnection();",
"public Connection getConnection();",
"public boolean connectDB(String URL, String username, String password){\r\n try\r\n {\r\n connection = DriverManager.getConnection(URL,username,password);\r\n return true;\r\n }\r\n catch(SQLException se)\r\n {\r\n System.err.println(\"SQL Exception.\" + \"<Message>: \" + se.getMessage());\r\n return false;\r\n }\r\n }",
"public static Connection getConnection() throws Exception{\r\n\t\ttry{\r\n\t\t\tString driver = \"com.mysql.jdbc.Driver\";\r\n\t\t\tString url = \"jdbc:mysql://localhost:3306/informationretrival?autoReconnect=true&useSSL=false\";\r\n\t\t\tString username = \"root\";\r\n\t\t\tString password = \"951753leon\";\r\n\t\t\tClass.forName(driver);\r\n\t\t\t\r\n\t\t\tConnection conn = DriverManager.getConnection(url,username,password);\r\n\t\t\tSystem.out.println(\"Connected\");\r\n\t\t\treturn conn;\r\n\t\t} catch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static Connection getConnection()\n throws SQLException, IOException\n { \n Properties props = new Properties();\n FileInputStream in = new FileInputStream(\"database.properties\");\n props.load(in);\n in.close();\n\n String drivers = props.getProperty(\"jdbc.drivers\");\n if (drivers != null) System.setProperty(\"jdbc.drivers\", drivers);\n String url = props.getProperty(\"jdbc.url\");\n String username = props.getProperty(\"jdbc.username\");\n String password = props.getProperty(\"jdbc.password\");\n\n return DriverManager.getConnection(url, username, password);\n }",
"public Connect(LibraryConfiguration config, String username, String password) throws Exception {\n\n /* this is the xml and xpath stuff */\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n this.db = dbf.newDocumentBuilder();\n this.xPath = XPathFactory.newInstance().newXPath();\n /* create the target host */\n this.config = config;\n this.client = new HttpClient(username, password, false);\n }",
"static Map<String, Object> mergeProperties(String url, Properties info)\n {\n final Map<String, Object> properties = new HashMap<>();\n\n // first deal with url\n int queryParamsIndex = url.indexOf(\"?\");\n\n String serverUrl = queryParamsIndex > 0 ? url.substring(0, queryParamsIndex)\n : url;\n String queryParams = queryParamsIndex > 0 ? url.substring(queryParamsIndex + 1)\n : null;\n\n if (queryParams != null && !queryParams.isEmpty())\n {\n String[] entries = queryParams.split(\"&\");\n\n for (String entry : entries)\n {\n int sep = entry.indexOf(\"=\");\n if (sep > 0)\n {\n String key = entry.substring(0, sep).toUpperCase();\n properties.put(key, entry.substring(sep + 1));\n }\n }\n }\n\n for (Map.Entry<Object, Object> entry : info.entrySet())\n {\n properties.put(entry.getKey().toString().toUpperCase(), entry.getValue());\n }\n\n boolean sslOn = getBooleanTrueByDefault(properties.get(\"SSL\"));\n\n serverUrl = serverUrl.replace(JDBC_PROTOCOL_PREFIX,\n sslOn ? SSL_NATIVE_PROTOCOL : NATIVE_PROTOCOL);\n\n properties.put(\"SERVERURL\", serverUrl);\n properties.remove(\"SSL\");\n\n if (properties.get(\"ACCOUNT\") == null && serverUrl != null &&\n serverUrl.indexOf(\".\") > 0 &&\n serverUrl.indexOf(\"://\") > 0)\n {\n String accountName = serverUrl.substring(serverUrl.indexOf(\"://\") + 3,\n serverUrl.indexOf(\".\"));\n\n logger.debug(\"set account name to {}\", accountName);\n properties.put(\"ACCOUNT\", accountName);\n }\n\n return properties;\n }",
"private static void testConnection(Properties properties) throws ClassNotFoundException {\n Optional.ofNullable(properties.getProperty(\"oracle.net.tns_admin\"))\n .ifPresent(v -> System.setProperty(\"oracle.net.tns_admin\", v));\n String dbURL = Optional.ofNullable(properties.getProperty(\"url\"))\n .orElseThrow(() -> new IllegalArgumentException(\"missing url property\"));\n\n Class.forName(\"oracle.jdbc.OracleDriver\");\n\n Connection conn = null;\n Statement stmt = null;\n\n try {\n conn = establishConnection(properties, dbURL);\n\n stmt = conn.createStatement();\n\n Stopwatch stmtWatch = Stopwatch.createStarted();\n ResultSet rs = stmt.executeQuery(properties.getProperty(\"query\"));\n System.out.println(\"Executed statement took : \" + stmtWatch.stop());\n\n if (rs.next()) {\n System.out.println(rs.getString(1));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n finally {\n if (stmt != null) try { stmt.close(); } catch (Exception e) {}\n if (conn != null) try { conn.close(); } catch (Exception e) {}\n }\n }"
]
| [
"0.780799",
"0.7094537",
"0.6918724",
"0.6828274",
"0.67494977",
"0.65633804",
"0.65309435",
"0.65252775",
"0.64110005",
"0.6352146",
"0.6352146",
"0.6331489",
"0.6282896",
"0.62604696",
"0.62445676",
"0.6177716",
"0.61319107",
"0.61260366",
"0.6105028",
"0.60991764",
"0.60943645",
"0.60801655",
"0.6074943",
"0.6071437",
"0.60583234",
"0.60557795",
"0.6047758",
"0.59958017",
"0.598413",
"0.59761226",
"0.59713537",
"0.5959668",
"0.59437925",
"0.59332097",
"0.59004885",
"0.5889901",
"0.58789164",
"0.5856837",
"0.58554006",
"0.58458346",
"0.58443207",
"0.58395773",
"0.58364666",
"0.57990664",
"0.5782384",
"0.5760121",
"0.5752605",
"0.57471895",
"0.573601",
"0.5719416",
"0.5719416",
"0.5719416",
"0.5719416",
"0.57001126",
"0.569906",
"0.5679136",
"0.56721985",
"0.5669935",
"0.5647553",
"0.56258166",
"0.56257766",
"0.562531",
"0.56243974",
"0.56202537",
"0.56079435",
"0.5596512",
"0.55913544",
"0.55864567",
"0.558097",
"0.5578725",
"0.5575888",
"0.55753744",
"0.5562148",
"0.5550815",
"0.554046",
"0.5531799",
"0.5526033",
"0.5525199",
"0.55191106",
"0.549765",
"0.54936653",
"0.5493286",
"0.5492428",
"0.5436526",
"0.5430047",
"0.542009",
"0.54096615",
"0.54093534",
"0.5405166",
"0.53922176",
"0.539131",
"0.53910387",
"0.5388637",
"0.5388637",
"0.5388637",
"0.53775305",
"0.53772324",
"0.5375291",
"0.53712255",
"0.53708434",
"0.5367697"
]
| 0.0 | -1 |
Add method to calculate balance amount after withdrawal | public Integer withdraw(Integer amount) {
if (balance < amount) {
throw new NotEnoughFundsException(amount, balance);
}
balance -= amount;
return balance;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Money getTotalBalance();",
"public static void deposit(){\n TOTALCMONEY = TOTALCMONEY + BALANCEDEPOSIT; //the cashier money equals the cashier money plus the amount that is being deposited\r\n BALANCE = BALANCE + BALANCEDEPOSIT; //the user balance equals the user balance plus the amount that is being deposited\r\n }",
"public abstract String withdrawAmount(double amountToBeWithdrawn);",
"double getBalance();",
"double getBalance();",
"public void deposit(double value){\r\n balance += value;\r\n}",
"@Override\n\tvoid withdraw(double amount) {\n\t\tsuper.balance -= amount - 20;\n\t}",
"public void withdraw(double amount)\n {\n startingBalance -= amount;\n }",
"public void withdrawFromBalance(double withdrawBalanceAmount) \n\t{\n\t\taccountBalance -= withdrawBalanceAmount;\n\t}",
"public double withdrawFrom(double amount)\r\n {\r\n _balance -= amount;\r\n\r\n return _balance;\r\n }",
"public void withdrawMoney(double amount) {\n\t\tbalance = balance - amount;\n\t}",
"public void withdraw(double amount) {\n this.balance -= amount;\n }",
"@Override\r\n\tpublic double withdrawlDao(double money) throws EwalletException {\n\t\tif(money<temp.getCustBal()) {\r\n\t\t\ttemp.setCustBal(temp.getCustBal()-money);\r\n\t\t\ttry {\r\n\t\t\t\ttemp.settDetails(\"Date :\"+tDate+\" Amount Withdrawn :\"+money+\" Total Balance :\"+temp.getCustBal());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tdao.updatedetails(temp.getAccNum(),temp);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\" Low Balance :( \");\r\n\t\t\treturn temp.getCustBal();\r\n\t}",
"public void withdraw(double amount)\n {\n if (amount <= balance) {\n balance = balance - amount;\n }\n else {\n System.err.println(\"Transaction Declined\");\n remainder = balance - amount;\n System.out.println(\"Your balance would have been \" + remainder);\n }\n }",
"public void withdraw(double amount){\n\t\tbalance -= amount;\n\t}",
"public void deposit(BigDecimal deposit){\n balance = balance.add(deposit);\n }",
"@Override\n protected void withdraw(int request, boolean isOverdraft){\n if(request>0){\n request += SERVICE_FEE;\n }\n //need to change both balances just in case there was a LARGE_DEPOSIT \n //making it so that the 2 balance values differ\n setBalance(getBalance() - request);\n setBalanceAvailable(getBalanceAvailable() - request);\n }",
"public String myAfterBalanceAmount() {\r\n\t\tint count=0;\r\n\t\tList<SavingAccount> acc = null;\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Before Repeat\");\r\n\t\t\tacc = getSavingAccountList();\r\n\r\n\t\t\tfor (SavingAccount savingAcc : acc) {\r\n\t\t\t\tif (!(\"0\".equals(savingAcc.getState()))) {\r\n\t\t\t\t\tif (savingAcc.getState().equals(\"active\")) {\r\n\t\t\t\t\t\tint maxRepeat = Integer.parseInt(savingAcc\r\n\t\t\t\t\t\t\t\t.getRepeatable());\r\n\r\n\t\t\t\t\t\tDate date = new Date();\r\n\t\t\t\t\t\tDate systemDate = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAccSer\r\n\t\t\t\t\t\t\t\t\t\t.convertDateToStringDDmmYYYY(date));\r\n\r\n\t\t\t\t\t\tDate dateEnd = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t.getDateEnd());\r\n\r\n\t\t\t\t\t\tif (systemDate.getTime() == dateEnd.getTime()) {\r\n\t\t\t\t\t\t\tDate newEndDate = DateUtils.addMonths(systemDate,\r\n\t\t\t\t\t\t\t\t\tsavingAcc.getInterestRateId().getMonth());\r\n\r\n\t\t\t\t\t\t\tfloat balance = savingAcc.getBalanceAmount();\r\n\t\t\t\t\t\t\tfloat interest = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getInterestRate();\r\n\r\n\t\t\t\t\t\t\tint month = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getMonth();\r\n\t\t\t\t\t\t\tint days = Days\r\n\t\t\t\t\t\t\t\t\t.daysBetween(\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateStart())),\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateEnd())))\r\n\t\t\t\t\t\t\t\t\t.getDays();\r\n\t\t\t\t\t\t\tfloat amountAll = balance\r\n\t\t\t\t\t\t\t\t\t+ (balance * ((interest / (100)) / 360) * days);\r\n\t\t\t\t\t\t\tsavingAcc.setDateStart(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(systemDate));\r\n\t\t\t\t\t\t\tsavingAcc.setDateEnd(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(newEndDate));\r\n\t\t\t\t\t\t\tsavingAcc.setBalanceAmount(amountAll);\r\n\t\t\t\t\t\t\tsavingAcc.setRepeatable(\"\" + (maxRepeat + 1));\r\n\t\t\t\t\t\t\tupdateSavingAccount(savingAcc);\r\n\t\t\t\t\t\t\tcount+=1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"Successfully!! \"+ count +\" Saving Account has been updated. Minh Map!!!\");\r\n\t\t\t\r\n\t\t\treturn \"success\";\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Exception\");\r\n\r\n\t\t}\r\n\t\treturn \"Fail\";\r\n\t}",
"@Override\n\tpublic void calculateAndUpdateBalance() {\n\n\t\tbalance -= fee;\n\n\t}",
"void deposit(int value)//To deposit money from the account\n {\n balance += value;\n }",
"public double withdraw(double withdrawalAmount) {\n\t\tdouble savingsBalance = getBalance();\n\t\tif ((savingsBalance - withdrawalAmount) >= overdraft) { // Check if balance is less than overdraft limit.\n\t\t\tsuper.withdraw(withdrawalAmount);\n\t\t}\n\t\tif ((savingsBalance - withdrawalAmount) < overdraft) {\n\t\t\tSystem.out.print(\"Cannot execute withdraw action: greater than savings withdraw limit.\\n\");\n\t\t}\n\t\treturn getBalance();\n\t}",
"void deposit(double Cash){\r\n\t\tbalance=balance+Cash;\r\n\t}",
"public void withdraw(BigDecimal amount) {\n this.setBalance(this.getBalance().subtract(amount));\n }",
"void addBalance(double amount) {\n\t\tbalance += amount;\n\t}",
"@Override\n\tvoid deposit(double amount) {\n\t\tsuper.balance += amount - 20;\n\t}",
"public Double withdrawAndReportBalance(Double withdrawnAmount, AccountRule rule) \n \t\tthrows IllegalBalanceException \n {\n return null;\n }",
"public int withdraw() {\n\t\tif ((acc.getBalance() - keyboard.getAmt()) > acc.getMinimumBalace()) {\r\n\t\t\tif (casher.withdraw(keyboard.getAmt()) == 1) {\r\n\t\t\t\tsetNewBalance();\r\n\t\t\t\t\r\n\t\t\t\treciept.printer(acc.getAccountNumber(), acc.getBalance(), keyboard.getAmt());\r\n\t\t\t\treturn 1;\r\n\t\t\t} else\r\n\t\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn 0;\r\n\r\n\t}",
"public void withdraw(double amount){\n accTransactions.add(new Transaction('W', amount, balance, \"withdraw\"));\n balance -= amount;\n }",
"protected double getTotalBalance()\r\n {\r\n return totalBalance;\r\n }",
"public void withdraw(double amount)\n\t{\n\t\tbalance -= amount;\n\t}",
"@Override //nadpisanie - adnotacja, wskazówka\n public int withdraw(int cash) {\n super.balance -=cash;\n return cash;\n }",
"public void withdraw(int amount)\n {\n setBalance(getBalance()-amount);\n }",
"@Override\n\tpublic int withdraw(double amount) throws RaiseException {\n\t\tValidator.validateWithdraw(this.getBalance(), amount);\n\t\tif(amount <= this.getBalance()) {\n\t\t\tthis.setBalance(this.getBalance() - amount);\n\t\t\t\n\t\t\t//create a transaction and adding it to the list of transactions of this account \n\t\t\tTransaction tmpTransaction = new Transaction(amount, EnumTypeTransaction.withdraw);\n\t\t\tthis.addTransaction(tmpTransaction);\n\t\t\t\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}",
"public int withdraw(int amount) {\n\n this.balance -= amount;\n if (balance < 0) {\n\n this.balance = 0;\n System.out.println(\"--------------------------------------------\\n\" +\n \"* Your new balance is \" + this.balance + \" *\\n\" +\n \"--------------------------------------------\\n\");\n return this.balance;\n\n } else {\n System.out.println(\"--------------------------------------------\\n\" +\n \"* Your new balance is \" + this.balance + \" *\\n\" +\n \"--------------------------------------------\\n\");\n return balance;\n }\n }",
"BigDecimal getClosingDebitBalance();",
"public void withdraw (double amount)\n {\n super.withdraw (amount);\n imposeTransactionFee ();\n }",
"public void withdraw (int amount) {\n if (amount >= 0) {\n balance = balance - amount;\n valueWithdrawals = valueWithdrawals + amount;\n if (balance < minimumBalance){\n minimumBalance = balance;\n }\n }\n }",
"@Override\n public void withdraw(double amount) //Overridden method\n {\n elapsedPeriods++;\n \n if(elapsedPeriods<maturityPeriods)\n {\n double fees = getBalance()*(interestPenaltyRate/100)*elapsedPeriods;\n super.withdraw(fees);//withdraw the penalty\n super.withdraw(amount);//withdraw the actual amount\n \n }\n \n }",
"@Override\r\n\tpublic boolean withdraw(double amount) {\n\t\ttry {\r\n\t\t\tif (accountStatus.equals(AccountStatus.ACTIVE)) {\r\n\t\t\t\tif (balance > amount) {\r\n\t\t\t\t\tbalance = (float) (balance - amount);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new InsufficientBalanceException(\"You'er Balance is insufficient to make this transation !\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tthrow new AccountInactiveException(\"You'er Account is not Active !\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private double getBalance() { return balance; }",
"@Override\r\n\tpublic double getBalance() {\n\t\treturn (super.getBalance()+cashcredit);\r\n\t}",
"public void withdraw(double amount) {\n\t\tbalance -= amount;\n\t}",
"public void subtractCreditTransaction(double withdrawAmount){\n if(!checkAccountOpen()){\n System.out.println(\"Your credit transaction in the amount of -$\" + withdrawAmount +\" has been declined\");\n }\n else {\n this.currentBalance = this.currentBalance - withdrawAmount;\n if(this.currentBalance<0){\n System.out.println(\"Appropriate funds not found. Please check your current balance.\");\n this.currentBalance = this.currentBalance + withdrawAmount;\n }\n else {\n System.out.println(\"Your credit transaction has been approved!\");\n System.out.println(\"Your current balance is: $\" + currentBalance);\n }\n }\n\n }",
"BigDecimal getOpeningDebitBalance();",
"BigDecimal getOpeningDebitBalance();",
"public void withdraw(long amount) {\n\t\n\tif(canWithdraw == true) {\n\t\tSystem.out.println(\"before \"+balance);\n\t\tbalance\t-= amount;\n\t\tSystem.out.println(\"after \"+balance);\n\t\t//add to log\n\t\tlog += \"Withdraw made to this account in the ammount of \"+amount+\" on \"+date+\"\\n\";\n\t\tlog += log += \" Current balance is \"+balance+\" \\n\"+date;\n\t\tupdate();\n\t}else {\n\t\tlog += \"Overdraft account on \"+date+\" \\n\";\n\t\tSystem.out.println(\"Insufficients funds to complete tranaction!\");\n\t\t}//end else statement\n}",
"public void withdraw(double withdrawalAmount) {\n if (withdrawalAmount < 0) throw new IllegalArgumentException(\"Withdrawal amount cannot be negative\");\n if (balance - withdrawalAmount < 0) throw new IllegalArgumentException(\"Cannot withdraw more than account balance\");\n balance -= withdrawalAmount;\n numWithdrawals++;\n }",
"public void withdraw(float amount) {}",
"public void withdraw(float amount) {}",
"public Double getBalance(){\n Double sum = 0.0;\n // Mencari balance dompet dari transaksi dengan cara menghitung total transaksi\n for (Transaction transaction : transactions) {\n sum += transaction.getAmount().doubleValue();\n }\n return sum;\n }",
"public double getBal() {\n\t\t return balance;\r\n\t }",
"public void deposit(double amount)\n {\n balance = balance + amount;\n }",
"public void recordPurchase(double amount)\n {\n balance = balance - amount;\n // your code here\n \n }",
"public double depositInto(double amount)\r\n {\r\n _balance += amount;\r\n\r\n return _balance;\r\n }",
"void withdraw() {\n System.out.println(\"Enter the amount to withdraw : \");\n int withdraw = scan.nextInt();\n balance -= withdraw;\n }",
"void withdraw(double amount){\r\n\t\t//subtract to the current balance the amount\r\n\t\tsetBalance(getBalance() - amount);\r\n\t\t\r\n\t\t//alert the user that his bank account is in the red if the balance lower than 0\r\n\t\tif(getBalance()<0){\r\n\t\t\tSystem.out.println(\"Your bank account is in the red.\");\r\n\t\t}\r\n\t}",
"public void showAccountBalance(){\n balance();\n\n }",
"public int getBalance() {\n return total_bal;\n }",
"@Override\r\n\tpublic double deductAccountMaintenanceFee() {\n\t\tif (this.getBalance() < 250.0)\r\n\t\t\treturn super.withdraw(250.0);\r\n\t\telse \r\n\t\t\treturn this.getBalance();\r\n\t\t\r\n\t}",
"public double getBalance()\n \n {\n \n return balance;\n \n }",
"@Test\n\tpublic void testWithdraw(){\n\t\t\n\t\t// Arrange\n\t\tBigDecimal amountToWithdraw = new BigDecimal(10.00);\n\t\tBigDecimal expectedBalance = new BigDecimal(110.5);\n\t\tdouble delta = 1e-3;\n\t\t// Act\n\t\tcurrentAccount.withdraw(amountToWithdraw);\n\t\tBalance actualBalance = currentAccount.checkBalance();\n\t\t\n\t\t// Assert\n\t\tassertEquals(expectedBalance.doubleValue(), actualBalance.getAmount().doubleValue(), delta);\n\t}",
"protected void deposit(double amount)\n\t{\n\t\tacc_balance+=amount;\n\t}",
"public void withdraw(double amount) throws InsufficientFundsException {\n if (amount <= balance) {\n balance -= amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo= '\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n } //end if\n else {\n throw new InsufficientFundsException(amount);\n } //end else\n }",
"public void deposit(double amount)\n {\n startingBalance += amount;\n }",
"public int deposit(int amount) {\n\n balance += amount;\n System.out.println(\"--------------------------------------------\\n\" +\n \"* Your new balance is \" + this.balance + \" *\\n\" +\n \"--------------------------------------------\\n\");\n return balance;\n\n }",
"public void changeBalance (int amount){\n balance += amount;\n }",
"public void addBalance(float deposit) {\r\n\t\tthis.balance += deposit;\r\n\t}",
"public long withdraw(long amount) {\n if (amount > balance) {\n long tmp = balance;\n balance = 0;\n return tmp;\n } else {\n balance -= amount;\n return amount;\n }\n }",
"public double withdraw(double withAmnt){\n try {\n String queryStr = \"update dummybank set amount = ? where accountNo = ?\";\n ps = con.prepareStatement(queryStr);\n ps.setDouble(1,this.amnt - withAmnt );\n ps.setString(2, accNo);\n ps.executeUpdate();\n } catch (SQLException ex) {\n Logger.getLogger(BankDBConnector.class.getName()).log(Level.SEVERE, null, ex);\n }\n return this.amnt - withAmnt;\n }",
"public double deposit(double amount){\n double total=amount;\n if(type.equals(\"TMB\"));total=-0.5;\n currentBalance+=total;\n return currentBalance;\n }",
"public void deposit(double amount) {\n this.balance += amount;\n }",
"@Override\n\tpublic void withdraw(int money) {\n\t\t\n\t}",
"public void deposit(double amount) {\n balance = balance + amount + 10;\n }",
"public double getBalance(){\r\n\t\treturn balance;\r\n\t}",
"public void withdraw( double amount ) throws Exception\n\t{\n\t\tif(amount >= 0.0 && amount <= balance)\n\t\t\tbalance -= amount;\n\t\t\n\t\telse\n\t\t\tthrow new Exception(\"Insufficient Balance\");\n\t}",
"private static void withdraw(double amount) {\n double resultWithdraw = balance - amount;\r\n if (resultWithdraw < 0 || amount > 2000) {\r\n System.out.println(\"Withdrawal cannot exceed $2000. Balance cannot be reduced below $0.\");\r\n } else {\r\n System.out.println(amount + \" has been withdrawn from your bank account.\\nCurrent balance \" + resultWithdraw + \".\");\r\n }\r\n }",
"@Override\r\n\tpublic void operateAmount(String AccountID, BigDecimal amount) {\n\r\n\t}",
"@Override\n public boolean withdrawAmount(TransactionDTO transaction) {\n CustomerDetails customerDetails=this.viewAccount(transaction.getUserName()); \n if(customerDetails.getAccountBalance()>=transaction.getAmount()){\n customerDetails.setAccountBalance(customerDetails.getAccountBalance()-transaction.getAmount());\n customerRepository.save(customerDetails);\n return true;\n }\n else{\n return false;\n }\n }",
"public static double withdraw(double[] amount, double balance) {\n\t\tif(amount > balance) {\n\t\t\tSystem.out.println(\"The amount is greater than the current balance, and we cannot withdraw.\");\n\t\t\treturn balance;\n\t\t} else {\n\t\t\tbalance -= amount;\n\t\t\tSystem.out.println(\"Your new balance is $\" + balance);\n\t\t\treturn balance - amount;\n\t\t}\n\t}",
"@Override\r\n\tpublic boolean withdraw(WithdrawBean wb, double amount) throws WalletException {\n\t\tboolean isValid = true;\r\n\t\tfor (CustomerBean cb : customerList) {\r\n\t\t\tif(cb.getPhoneNum()==wb.getPhoneNum()) {\r\n\t\t\t\tif(wb.getBalance()>amount) {\r\n\t\t\t\twb.setBalance(wb.getBalance()-amount);\r\n\t\t\t\twb.setDate(LocalDateTime.now());\r\n\t\t\t\tisValid = true;\r\n\t\t\t\tWalletTransactions transac = new WalletTransactions();\r\n\t\t\t\ttransac.setAmount(amount);\r\n\t\t\t\ttransac.setBalance(wb.getBalance());\r\n\t\t\t\ttransac.setDate(wb.getDate());\r\n\t\t\t\ttransac.setPhoneNum(wb.getPhoneNum());\r\n\t\t\t\ttransac.setType(\"withdraw\");\r\n\t\t\t\ttransacList.add(transac);\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthrow new WalletException();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn isValid;\r\n\t}",
"public abstract void withdraw(float amount);",
"public void deposit (double amount) \r\n {\r\n\r\n balance += amount;\r\n System.out.println (\"Deposit into account shs: \" + account);\r\n System.out.println (\"Standing Amount: \" + amount);\r\n System.out.println (\"Current balance: \" + balance);\r\n System.out.println ();\r\n\r\n }",
"public double getBalance(){\n return balance;\n }",
"public double getBalance(){\n return balance;\r\n }",
"public void deposit(double amount){\n\t\tbalance += amount;\n\t}",
"public BigDecimal getWithdrawMoney() {\n return withdrawMoney;\n }",
"public BigDecimal getBalance() {\n return balance;\n }",
"public BigDecimal getBalance() {\n return balance;\n }",
"void updateBalance(int amount){ \n\t\tbalance = amount;\n\t}",
"public double getBalance()\n {\n return balance;\n }",
"@Override\r\n\tpublic double depositDao(double money) throws EwalletException {\n\t\ttemp.setCustBal(temp.getCustBal()+money);\r\n\t\ttry {\r\n\t\t\ttemp.settDetails(\"Date :\"+tDate+\" Depsoited Amount :\"+money+\" Total Balance :\"+temp.getCustBal());\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tdao.updatedetails(temp.getAccNum(),temp);\r\n\t\treturn temp.getCustBal();\r\n\t\t\r\n\t}",
"private void withdraw() {\n userInput = 0;\n while (userInput <= 0) {\n System.out.printf(\"Din nuværende balance er: %.2f DKK\\n\" +\n \"Indtast ønsket beløb at hæve: \", balanceConverted);\n\n textMenuKey(false, \"\");\n\n if (userInput <= 0) {\n System.out.println(\"Indtast et gyldigt beløb\");\n }\n }\n\n if ((userInput * 100) <= balance) {\n moneyController(-userInput);\n mysql.transactionUpdate(customerNumber, customerName, balance, userInput, \"Withdraw\");\n } else {\n System.out.println(\"Utilstrækkelig balance på kontien\");\n }\n }",
"public boolean withdrawal (double amount) \r\n {\r\n\r\n boolean result = false;\r\n\r\n if ( ! super.withdrawal (amount) ) \r\n {\r\n System.out.println (\"Using overdraft...\");\r\n if ( ! overdraft.withdrawal (amount-balance) )\r\n System.out.println (\"Overdraft source insufficient.\");\r\n else {\r\n balance = 0;\r\n System.out.println (\"Current Balance on account \" + account + \": \" + balance);\r\n result = true;\r\n }\r\n }\r\n System.out.println ();\r\n\r\n return result;\r\n\r\n }",
"public void applyInterest()\n {\n deposit( (getBalance()* getInterestRate()) /12);\n }",
"public int getBalance()\n {\n return balance;\n }",
"@Override\n public void deposit(double amount) {\n double balance = getBalance();\n setBalance(balance+amount);\n }",
"public void withdrawMoney(double amount) {\n\t\tif (amount>=0){\n\t\t\tsetBalance(this.balance - amount);\n\t\t}else{\n\t\t\tSystem.out.println(\"You can not withdraw a negative value!\");\n\t\t}\n\t\t\t\t\n\t}",
"public double getBalance() {\n\n double balance = 0;\n balance = overDraftLimit;\n return balance;\n\n }",
"public void addToBalance(double depositBalanceAmount) \n\t{\n\t\taccountBalance += depositBalanceAmount;\n\t}",
"public double withdraw(double amount, boolean branch) {\n if ((amount > 25) && !branch) {\n throw new IllegalArgumentException();\n }\n balance -= amount;\n return balance;\n }"
]
| [
"0.7614133",
"0.75253576",
"0.7446546",
"0.7365001",
"0.7365001",
"0.73170036",
"0.7290856",
"0.7278717",
"0.7266078",
"0.7253747",
"0.72410125",
"0.7217467",
"0.72145885",
"0.7214168",
"0.7209632",
"0.7186415",
"0.7178457",
"0.7176555",
"0.71704143",
"0.7166304",
"0.7145142",
"0.7132911",
"0.7131807",
"0.7116787",
"0.7116111",
"0.7114235",
"0.7112011",
"0.7108807",
"0.7105389",
"0.70824516",
"0.7082003",
"0.7075979",
"0.70731264",
"0.70638394",
"0.70634556",
"0.7050834",
"0.70473737",
"0.70343554",
"0.7031266",
"0.70183307",
"0.6998733",
"0.6993716",
"0.69930696",
"0.6992476",
"0.6992476",
"0.69848305",
"0.6970064",
"0.69694674",
"0.69694674",
"0.69597906",
"0.6958754",
"0.69576657",
"0.6933516",
"0.69254845",
"0.691476",
"0.69127697",
"0.688976",
"0.6886485",
"0.6875961",
"0.687078",
"0.68601644",
"0.6859154",
"0.68574846",
"0.6847908",
"0.684593",
"0.6840655",
"0.68374735",
"0.683554",
"0.68322456",
"0.6814042",
"0.68051934",
"0.6794293",
"0.67743695",
"0.67738426",
"0.67726225",
"0.6767085",
"0.6764307",
"0.6764179",
"0.67631507",
"0.6738346",
"0.6735941",
"0.6735809",
"0.67314714",
"0.67285615",
"0.6723365",
"0.6723246",
"0.6722488",
"0.6722488",
"0.67213726",
"0.6708996",
"0.6697546",
"0.66951025",
"0.6692063",
"0.66911906",
"0.66882485",
"0.6686043",
"0.6679056",
"0.66722935",
"0.6671327",
"0.6664684"
]
| 0.70813864 | 31 |
Create an object for BankAccount class | @Test
void notEnoughFunds() {
BankAccount account = new BankAccount(9);
// Assertion for exception
assertThrows(NotEnoughFundsException.class, () -> account.withdraw(10),
"Balance must be greater than amount of withdrawal");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BankAccount() {\t\n\t\tthis.accountNumber = UUID.randomUUID().toString().substring(0, 6);\n\t\tthis.balance = 0;\n\t\tthis.accountType = \"Bank account\";\n\t}",
"public ProfileBankAccount() {\r\n }",
"public BankAccount(int balance) {\n\n this.balance = balance;\n\n }",
"public BankAccount() {\n this(12346, 5.00, \"Default Name\", \"Default Address\", \"default phone\");\n }",
"public BankAccount()\n {\n \t//intializing instance variables\n \t//at the time object creation constuctor executes \n \t\n \taccountHolderName=\"unknow\";\n \taccountBalance=0;\n \t\n }",
"Account create();",
"public Bank() {\n\n }",
"BankAccount(){\n\t\tSystem.out.println(\"NEW ACCOUNT CREATED\");\t\n\t}",
"private Account createAccount(byte[] address) {\n return new Account(address);\n }",
"public BankAccount() {\n\t\tthis.money = 0;\n\t}",
"Account() { }",
"public BankAccount() {\r\n\t\tbalance=0;\r\n\t\t\r\n\t}",
"public BankAccount(int accountNum, String customerName, double balance){\n this.accountNum = accountNum;\n this. customerName = customerName;\n this.balance = balance;\n }",
"BankAccount(String accountType){\n\t\tSystem.out.println(\"NEW ACCOUNT: \" + accountType);\n\t\tthis.accountType = accountType; \n\t}",
"public Bank() {\n\t\tsuper();\n\t}",
"public BankModel() {\n accounts = new ArrayList<AccountModel>();\n\n // Master account inbedded into system for easy access to test features.\n accounts.add(new AccountModel(\"c\", \"123\", 500));\n }",
"public GlAccountBank () {\n\t\tsuper();\n\t}",
"public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}",
"public Account() {\n\n }",
"public Bank() {\n\t\tnamesTree = new BankAccountsBinarySearchTree(new AccountComparatorByName());\n\t\taccountNumbersTree = new BankAccountsBinarySearchTree(new AccountComparatorByNumber());\n\t}",
"public BankAccount() {\n numberOfAccounts++;\n this.accountNumber = accountNumberGenerator(); \n }",
"public Account(String currency) {\n //numAccount += 1;\n incrementNumAccount();\n this.accountID = numAccount;\n this.dateOfCreation = LocalDate.now();\n\n setPrimaryCurrency(currency);\n this.currencyBalance = Money.of(0, this.primaryCurrency);\n ownerID = new ArrayList<>();\n }",
"public BankImpl() {\n accounts = new HashMap<Integer,Account>();\n }",
"public Account() {\n\n\t}",
"public Account() {\n }",
"public Account() {\n }",
"public Bank(){\n this(\"Seneca@York\", 0);\n }",
"Account(int account_number,double balance) //pramiterized constrector\n {\n this.account_number=account_number;\n this.balance=balance;\n }",
"public Account() {\n\t}",
"private Account createAccount8() {\n Account account = new Account(\"123456008\", \"Jean Sans Enfant\",\n new SimpleDate(4, 23, 1976).asDate(), \"[email protected]\", true, false, new CreditCard(\"4320123412340008\"));\n\n return account;\n }",
"public Account() {\n }",
"public BankAccount(int accountNum, String customerName){\n this.accountNum = accountNum;\n this.customerName = customerName;\n balance = 0;\n }",
"public Account() {\r\n\t\tthis(\"[email protected]\", \"Account\");\r\n\t}",
"public Bank(BankDisplay bankDisplay) {\n this(\"bank\", \"localhost\", 1234, bankDisplay);\n }",
"public Account() {\n super();\n }",
"public SavingsAccount() {\n\t}",
"public void createAccount(double balance) {\r\n\t\tAccount account = new Account(balance);\r\n\t\tsetPlayerAccount(account);\r\n\t}",
"public Account(int id, double balance) {\n this();\n this.name = \"Account\";\n this.id = id;\n this.balance = balance;\n }",
"BankDetail() {\n this.isValid = new Boolean(false);\n this.bankAccountNo = new String();\n this.bankAccountHolderName = new String();\n this.bankCountry = new String();\n this.IFSC = new String();\n }",
"@Override\n\tpublic void createAccount(String username, Bank bank) {\n\t\ttry {\n\t\tAccount newAccount = new Account(username, bank.getBankID(), bank.getNumOfAccounts()+1);\n\t\tbank.setNumOfAccounts(bank.getNumOfAccounts()+1);\n\t\taddAccount(bank, newAccount);\n\t\t}catch(NullPointerException e) {\n\t\t\tSystem.out.println(\"Could not find bank\");\n\t\t}\n\t\t\n\t}",
"public BankAccount(String holderName, String number, float balance){\r\n\t\tthis.holderName = holderName;\r\n\t\tthis.number = number;\r\n\t\tthis.balance = balance;\r\n\t}",
"public Bank() {\n accounts = new Account[2];\n numOfAccounts = 0;\n }",
"public account(){\n this.accNo = 000;\n this.id = 000;\n this.atype = \"\";\n this.abal = 0.00;\n }",
"public UserAccount() {\n\n\t}",
"private Account createAccount4() {\n Account account = new Account(\"123456004\", \"Chad I. Cobbs\",\n new SimpleDate(4, 23, 1976).asDate(), \"[email protected]\", true, false,\n new CreditCard(\"1234123412340004\"), new CreditCard(\"4320123412340005\"));\n\n final Percentage percent50 = new Percentage(0.5);\n final Percentage percent25 = new Percentage(0.25);\n account.addBeneficiary(\"Jane\", percent25);\n account.addBeneficiary(\"Amy\", percent25);\n account.addBeneficiary(\"Susan\", percent50);\n return account;\n }",
"public UserAccount() {\n }",
"public Bank() {\n\n\t\tcustomerList = new ArrayList<Customer>();\n\t\tCustomer C = new Customer(\"madison\", \"bynum\", \"madb\", \"123\");\n\t\tcustomerList.add(C);\n\t\temployeeList = new ArrayList<Employee>();\n\t\tEmployee E = new Employee(\"madi\", \"by\", \"madib\", \"1234\");\n\t\temployeeList.add(E);\n\t\tadminList = new ArrayList<Admin>();\n\t\tAdmin A = new Admin(\"amber\", \"stone\", \"amberstone195\", \"12345\");\n\t\tadminList.add(A);\n\t\tsbank.writeSerializeMyBank();\n\t\tsbank.loadSerializeMyBank();\n\t}",
"public static ATMAccount createAccount() {\r\n\t\tString userName;\r\n\t\tdouble userBalance;\r\n\t\tint digit = -1;\r\n\r\n\t\tSystem.out.println(\"Please enter a name for the account: \");\r\n\t\tuserInput.nextLine();\r\n\t\tuserName = userInput.nextLine();\r\n\r\n\t\t//Requests digits 1 by 1 for the pin number\r\n\t\tString accPin = \"\";\r\n\t\tfor (int i = 1; i < 5; i++) {\r\n\t\t\tdigit = -1;\r\n\t\t\tSystem.out.println(\"Please enter digit #\" + i + \" of\" + \"your pin.\");\r\n\t\t\tdo {\r\n\t\t\t\tdigit = userInput.nextInt();\r\n\t\t\t} while (digit < 0 || digit > 9);\r\n\t\t\taccPin += digit;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Please put the amount of money you would like to \" + \"initially deposit into the account: \");\r\n\t\tuserBalance = userInput.nextDouble();\r\n\t\tRandom accountIDGenerator = new Random();\r\n\t\tint userID = accountIDGenerator.nextInt(2147483647);\r\n\t\tATMAccount account = new ATMAccount(userID, userName, Integer.parseInt(accPin), userBalance);\r\n\t\tSystem.out.println(\"Acount Information: \\n\"+account.toString());\r\n\t\treturn account;\r\n\t}",
"public Account(){\n this.id = 0;\n this.balance = 0;\n this.annualInterestRate = 0;\n this.dateCreated = new Date();\n }",
"public SavingsAccount() {\n super();\n }",
"public GlAccountBank (\n\t\t\tLong in_id\n ) {\n\t\tthis.setId(in_id);\n }",
"public AccountManager(){\r\n allAccounts.put(\"CreditCard\",credits);\r\n allAccounts.put(\"LineOfCredit\",lineOfCredits);\r\n allAccounts.put(\"Chequing\",chequing);\r\n allAccounts.put(\"Saving\",saving);\r\n createAccount(\"3\", 0);\r\n primaryAccount = chequing[0];\r\n }",
"private Bank() {\r\n\t\tsuper();\r\n\t\tlogService = new Logger(\"driverName\");\r\n\t\tlogger = new Logger(\"driverName\");\r\n\t\tthis.balance = balance;\r\n\t\tthis.clients = new Client[100];\r\n\t}",
"@Override\n\tpublic void createBank(String bankName) {\n\t\tBank newBank = new Bank(bankName, new HashSet<Account>());\n\t\tcache.addToCache(newBank);\n\t\t\n\t}",
"public FeeAccount ()\n {\n }",
"int createAccount(Account account);",
"public Account() //default constructor \n {\n this.balance = 0;\n this.account_number = 0;\n }",
"@Test\n public void accountCustomConstructor_isCorrect() throws Exception {\n\n int accountId = 100;\n int userId = 101;\n String accountName = \"account Test Name\";\n double balance = 1000.00;\n\n // Create custom account\n Account account = new Account(accountId, userId, accountName, balance);\n\n // Verify values\n assertEquals(accountId, account.getAccountId());\n assertEquals(userId, account.getUserId());\n assertEquals(accountName, account.getAccountName());\n assertEquals(balance, account.getBalance(), 0);\n }",
"public Account(){\r\n this.id = 0;\r\n this.saldo = 0.0;\r\n }",
"public InvoiceBalance()\n {\n }",
"protected Account(String n, float b) {\n this(n); \n balance = b;\n }",
"public Account(Holder holder, int balance) {\n this.holder = holder;\n this.balance = balance;\n }",
"public BankAccount(String accountName, int balance) {\n this.accountName = accountName;\n this.balance = balance;\n this.valueDeposits = balance;\n this.valueWithdrawals = 0;\n this.maximumBalance = balance;\n this.minimumBalance = balance;\n }",
"public UserAcct() {\r\n }",
"UserAccount createUserAccount(User user, double amount);",
"public Account(double balance) {\n\t\tthis.balance = balance;\n\t}",
"public BankAccount(double basicMoney) {\n\t\tthis.money = basicMoney;\n\t}",
"public static void main(String[] args) {\n BankAccount bankAccount = new BankAccount(11211, 0, \"adam smith\", \"[email protected]\", \"9090980980\");\n BankAccount tim = new BankAccount(\"tim\", \"[email protected]\", \"9090980980\");\n System.out.println(\"Account Number = \" + tim.getAccountNumber());\n System.out.println(\"Balance = \"+ tim.getBalance());\n System.out.println(\"Customer Name = \" + bankAccount.getCustomerName());\n System.out.println(\"Email = \" + bankAccount.getEmailAddress());\n System.out.println(\"Phone Number = \" + bankAccount.getPhoneNumber());\n System.out.println(\"deposit = \"+ bankAccount.getDeposit(90));\n System.out.println(\"new balance = \"+ bankAccount.getWithdrawal(200));\n }",
"public BankAccountKey() {\n\tsuper();\n}",
"public Account() {\n\t\t//starting amount is 1500\n\t\tmoney = 1500;\n\t}",
"public BankAccount(double initialBalance) {\r\n\t\tbalance=initialBalance;\r\n\t}",
"Account(){\r\n\t\t//id, balance and annualInterestRate are set to 0, the dateCreated is set to the current date and time\r\n\t\t setId(0);\r\n\t\t setBalance(0);\r\n\t\t setAnnualInterestRate(0);\r\n\t\t this.dateCreated = new Date(System.currentTimeMillis());\r\n\t }",
"public Account(int id, String name, double balance){\n this(id, balance);\n this.name = name;\n }",
"public account(int acc,int Id,String Atype,double bal ){\n this.accNo = acc;\n this.id = Id;\n this.atype = Atype;\n this.abal = bal;\n }",
"public _AccountStub ()\n {\n super ();\n }",
"public BankAccount(String holderName, String number){\r\n\t\tthis.holderName = holderName;\r\n\t\tthis.number = number;\r\n\t\tthis.balance = 0;\r\n\t}",
"public void TestAccount1() {\n\n AccountCreator account = new AccountCreator();\n account.setFirstName(\"Bob\");\n account.setLastName(\"Smith\");\n account.setAddress(\"5 Rain Road\");\n account.setPIN();\n account.setTestBalance(300);\n accountList.add(account);\n\n }",
"public BankAccount(int accountNo, String name, double balance) {\n this.accountNo = accountNo;\n this.name = name;\n if(balance > 0.0)\n this.balance = balance;\n }",
"public Bank(long accNumber, float accBalance) {\n\t\tsuper();\n\t\tthis.accNumber = accNumber;\n\t\tthis.accBalance = accBalance;\n\t}",
"public BankDataBase()\n {\n accounts = new Account[ 2 ];\n accounts[ 0 ] = new Account( 12345, 54321, 1000.0, 1200.0 );\n accounts[ 1 ] = new Account( 98765, 56789, 200.0, 200.0 );\n }",
"public ControlBank(Bank bank) {\r\n\t\tthis.bank = bank;\r\n\t}",
"public BankAcc(int accNum, double bal, String name, String email, String phone){\r\n System.out.println(\"DONE\");\r\n //can do some validation in the other functions\r\n //not nessacary\r\n setAccNum(accNum);\r\n this.bal=bal;\r\n this.name=name;\r\n this.email=email;\r\n this.phone=phone;\r\n\r\n }",
"public SavingsAccount(double balance)\n {\n startingBalance = balance;\n }",
"public Bank() throws Exception\r\n\t{\r\n\t\tScanner fileScan = new Scanner(new File(\"C:\\\\Users\\\\jason\\\\workspace\\\\proj1fa14\\\\bankdata.txt\"));\r\n\t\taccounts = new Account[10];\r\n\t\tnumAccounts = 0;\r\n\t\tCustomer customer;\r\n\t\tAccount account;\r\n\t\tfor(int i = 0; i<9; i++)\r\n\t\t{\r\n\t\t\tString first = fileScan.next();\r\n\t\t\t//System.out.println(first);\r\n\t\t\tString last = fileScan.next();\r\n\t\t\t//System.out.println(last);\r\n\t\t\tint age = fileScan.nextInt();\r\n\t\t\tString pN = fileScan.next();\r\n\t\t\tint ba = fileScan.nextInt();\r\n\t\t\tint ch = fileScan.nextInt();\r\n\t\t\tString accNum = fileScan.next();\r\n\t\t\tcustomer = new Customer(first,last,age,pN);\r\n\t\t\taccount = new Account(customer,ba,ch, accNum);\r\n\t\t\taccounts[i] = account;\r\n\t\t\tnumAccounts++;\r\n\t\t}\r\n\t\tfileScan.close();\r\n\t}",
"public Account(int id, double balance) {\n this();\n this.id = id;\n this.balance = balance;\n }",
"public interface AccountFactory {\n Account create();\n}",
"public Bank(double cash, double interest)\r\n {\r\n super(cash);\r\n this.interest = interest;\r\n }",
"public Account() {\n this(DSL.name(\"account\"), null);\n }",
"public static Bank getBank() {\n return Bank;\n }",
"public AccountTypeEntity() { }",
"public Account()\n {\n id = UUID.randomUUID();\n }",
"public BankDatabase() {\r\n accounts = new Account[3];\r\n Connection c = null;\r\n Statement stmt = null;\r\n try {\r\n Class.forName(\"org.postgresql.Driver\");\r\n c = DriverManager\r\n .getConnection(\"jdbc:postgresql://localhost:5432/ATM\",\r\n \"postgres\", \"0000\");\r\n c.setAutoCommit(false);\r\n stmt = c.createStatement();\r\n ResultSet rs = stmt.executeQuery( \"SELECT * FROM accounts;\" );\r\n var i = 0;\r\n while ( rs.next() ) {\r\n int theAccountNumber = rs.getInt(\"accountnumber\");\r\n int thePin = rs.getInt(\"pin\");\r\n double theAvailiableBalance = rs.getDouble(\"availiablebalance\");\r\n double theTotalBalance = rs.getDouble(\"totalbalance\");\r\n accounts[i] = new Account( theAccountNumber, thePin, theAvailiableBalance, theTotalBalance);\r\n i++;\r\n }\r\n rs.close();\r\n stmt.close();\r\n c.close();\r\n } catch ( Exception e ) {\r\n System.err.println( e.getClass().getName()+\": \"+ e.getMessage() );\r\n System.exit(0);\r\n }\r\n\r\n\r\n// accounts = new Account[2]; // just 2 accounts for testing\r\n// accounts[0] = new Account(12345, 54321, 1000.0, 1200.0);\r\n// accounts[1] = new Account(98765, 56789, 200.0, 200.0);\r\n }",
"public SavingsAccount(String n) {\n super(n); \n balance = 0;\n }",
"public static void main(String[] args) {\n\n BankAccount rustemAccount=new BankAccount(\"Rustem\",\"Erdem\");\n\n System.out.println(\"rustemAccount.firstName = \" + rustemAccount.firstName);\n System.out.println(\"rustemAccount.getAccountHolder() = \" + rustemAccount.getAccountHolder());\n\n\n System.out.println(\"getBalance() = \" + rustemAccount.getBalance());\n\n rustemAccount.setBalance(150);\n System.out.println(\"getBalance() = \"+rustemAccount.getBalance());\n\n rustemAccount.deposit(150);\n rustemAccount.avaliableBalance();\n rustemAccount.withdraw(100);\n rustemAccount.avaliableBalance();\n\n\n rustemAccount.setAccountNumber(23112432);\n System.out.println(\"rustemAccount.getAccountNumber() = \" + rustemAccount.getAccountNumber());\n\n\n System.out.println(rustemAccount);\n }",
"public Bank(String name, int accs){\n bankAccounts = new Account[accs];\n bankName = name;\n maxAccounts = accs;\n currAccounts = 0; //empty\n }",
"public BankAccount(Customer customer) {\r\n\t\tthis.customer = customer;\r\n\t\tcustomerBankAccountList.add(customer);\r\n\t\t\r\n\t\tCustomerController.addBankAccountList(this);\r\n\t\t\r\n\t\tsilverState = new SilverLevel(this);\r\n\t\tgoldState = new GoldLevel(this);\r\n\t\tplatinumState = new PlatinumLevel(this);\r\n\t\t\r\n\t\tlevelState = silverState;\r\n\t\t\r\n\t}",
"public void createAccount(String accountType, double balance){\r\n // check what is the type of the account being created\r\n /* update the list each time an account is being created and then put it into the hashtable. Then increase the\r\n counter do this for each of the following accounts each time an account is created*/\r\n switch (accountType){\r\n case \"1\":\r\n credits[creditCounter]= new CreditCardAccount(balance);\r\n allAccounts.replace(\"CreditCard\",credits);\r\n creditCounter++;\r\n break;\r\n case \"2\":\r\n lineOfCredits[lineOfCreditCounter] = new LineOfCreditAccount(balance);\r\n allAccounts.replace(\"LineOfCredit\",lineOfCredits);\r\n lineOfCreditCounter++;\r\n break;\r\n case \"3\":\r\n chequing[chequingCounter] = new ChequingAccount(balance);\r\n allAccounts.replace(\"Chequing\",chequing);\r\n chequingCounter++;\r\n break;\r\n case \"4\":\r\n saving[savingCounter] = new SavingsAccount(balance);\r\n allAccounts.replace(\"Saving\",saving);\r\n savingCounter++;\r\n break;\r\n default:\r\n System.out.println(\"ERROR IN CREATE ACCOUNT\");\r\n break;\r\n }\r\n }",
"public Account(String firstName, String lastName, String SSN,\n String email, String password, String cardNum, String accId,\n double gpa, String schoolName, HashMap<String, Transaction> pendingTransactions,\n HashMap<String, Transaction> completedTransactions) {\n //Map<String, Transaction> dailyTransactions) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.SSN = SSN;\n this.cardNum = cardNum;\n this.email = email;\n this.password = password;\n this.accId = accId;\n dailyLimit = 50.00;\n accCreditLimit = 1000.00;\n creditUsed = getCreditUsed();\n this.gpa = gpa;\n cashBackRate = gpa / 2;\n this.schoolName = schoolName;\n this.pendingTransactions = pendingTransactions;\n this.completedTransactions = completedTransactions;\n this.cashBackToDate = 0.0;\n //this.dailyTransactions = dailyTransactions;\n }",
"public Bank ()\n {\n super (\"Bank\", defaults, trans, sharedQueue);\n customer = new Source (0, defaults [0], \"Bank$Customer\", customer_es, sharedQueue);\n teller = new Facility (1, defaults [1], new LinkedList<Coroutine> (), teller_es, sharedQueue);\n exit = new Sink (2, defaults [2], null, sharedQueue);\n initModel (new DynamicNode [] { customer, teller, exit });\n \n }",
"public ExternallyOwnedAccount() {}",
"@Test\n\tpublic void createAccountCashTest() {\n\t\tsetChequingRadioDefaultOff();\n\t\trdbtnCash.setSelected(true);\n\t\tdata.setRdbtnCash(rdbtnCash);\n\t\tAccount account = data.createNewAccount();\n\t\taccountTest = new Account(TEST_ACCOUNT_NAME, bankTest,\n\t\t\t\tAccount.Types.CASH.getAccountType());\n\t\tassertEquals(accountTest, account);\n\n\t}"
]
| [
"0.7987622",
"0.7898718",
"0.7679211",
"0.76787907",
"0.74386126",
"0.73289806",
"0.73276246",
"0.73276216",
"0.7241608",
"0.7190564",
"0.7161511",
"0.7157209",
"0.7152136",
"0.71513736",
"0.71337765",
"0.7129209",
"0.70765084",
"0.707076",
"0.704791",
"0.70475066",
"0.70390004",
"0.69973326",
"0.69961536",
"0.69908744",
"0.69788796",
"0.69788796",
"0.6970424",
"0.6967551",
"0.6964088",
"0.6902125",
"0.6897786",
"0.6894574",
"0.6834049",
"0.68004817",
"0.679167",
"0.6774249",
"0.67346454",
"0.6733452",
"0.6728412",
"0.67278457",
"0.67157876",
"0.6705667",
"0.6701638",
"0.6690647",
"0.66900283",
"0.6689316",
"0.6672924",
"0.6668493",
"0.66586703",
"0.6657865",
"0.6651154",
"0.66430694",
"0.6642309",
"0.6611061",
"0.6574716",
"0.65738344",
"0.6563926",
"0.6555521",
"0.65291876",
"0.65156126",
"0.6501363",
"0.6476778",
"0.6473798",
"0.64714366",
"0.6463578",
"0.6459343",
"0.6458555",
"0.64545417",
"0.64525646",
"0.64385194",
"0.6433475",
"0.6424268",
"0.64213043",
"0.6417708",
"0.6415369",
"0.64063627",
"0.6404234",
"0.6397713",
"0.63919646",
"0.6388776",
"0.6388296",
"0.63871986",
"0.6384157",
"0.6382915",
"0.636081",
"0.63471955",
"0.63468957",
"0.63427436",
"0.63385034",
"0.6332617",
"0.632237",
"0.6315573",
"0.63144577",
"0.63141924",
"0.63115567",
"0.63102937",
"0.6305902",
"0.629869",
"0.62782085",
"0.6274998",
"0.6271605"
]
| 0.0 | -1 |
Create an object for BankAccount class | @Test
void enoughFunds() {
BankAccount account = new BankAccount(100);
// Assertion for no exceptions
assertDoesNotThrow(() -> account.withdraw(100));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BankAccount() {\t\n\t\tthis.accountNumber = UUID.randomUUID().toString().substring(0, 6);\n\t\tthis.balance = 0;\n\t\tthis.accountType = \"Bank account\";\n\t}",
"public ProfileBankAccount() {\r\n }",
"public BankAccount(int balance) {\n\n this.balance = balance;\n\n }",
"public BankAccount() {\n this(12346, 5.00, \"Default Name\", \"Default Address\", \"default phone\");\n }",
"public BankAccount()\n {\n \t//intializing instance variables\n \t//at the time object creation constuctor executes \n \t\n \taccountHolderName=\"unknow\";\n \taccountBalance=0;\n \t\n }",
"Account create();",
"public Bank() {\n\n }",
"BankAccount(){\n\t\tSystem.out.println(\"NEW ACCOUNT CREATED\");\t\n\t}",
"private Account createAccount(byte[] address) {\n return new Account(address);\n }",
"public BankAccount() {\n\t\tthis.money = 0;\n\t}",
"Account() { }",
"public BankAccount() {\r\n\t\tbalance=0;\r\n\t\t\r\n\t}",
"public BankAccount(int accountNum, String customerName, double balance){\n this.accountNum = accountNum;\n this. customerName = customerName;\n this.balance = balance;\n }",
"BankAccount(String accountType){\n\t\tSystem.out.println(\"NEW ACCOUNT: \" + accountType);\n\t\tthis.accountType = accountType; \n\t}",
"public Bank() {\n\t\tsuper();\n\t}",
"public BankModel() {\n accounts = new ArrayList<AccountModel>();\n\n // Master account inbedded into system for easy access to test features.\n accounts.add(new AccountModel(\"c\", \"123\", 500));\n }",
"public GlAccountBank () {\n\t\tsuper();\n\t}",
"public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}",
"public Account() {\n\n }",
"public Bank() {\n\t\tnamesTree = new BankAccountsBinarySearchTree(new AccountComparatorByName());\n\t\taccountNumbersTree = new BankAccountsBinarySearchTree(new AccountComparatorByNumber());\n\t}",
"public BankAccount() {\n numberOfAccounts++;\n this.accountNumber = accountNumberGenerator(); \n }",
"public Account(String currency) {\n //numAccount += 1;\n incrementNumAccount();\n this.accountID = numAccount;\n this.dateOfCreation = LocalDate.now();\n\n setPrimaryCurrency(currency);\n this.currencyBalance = Money.of(0, this.primaryCurrency);\n ownerID = new ArrayList<>();\n }",
"public BankImpl() {\n accounts = new HashMap<Integer,Account>();\n }",
"public Account() {\n\n\t}",
"public Account() {\n }",
"public Account() {\n }",
"public Bank(){\n this(\"Seneca@York\", 0);\n }",
"Account(int account_number,double balance) //pramiterized constrector\n {\n this.account_number=account_number;\n this.balance=balance;\n }",
"public Account() {\n\t}",
"private Account createAccount8() {\n Account account = new Account(\"123456008\", \"Jean Sans Enfant\",\n new SimpleDate(4, 23, 1976).asDate(), \"[email protected]\", true, false, new CreditCard(\"4320123412340008\"));\n\n return account;\n }",
"public Account() {\n }",
"public BankAccount(int accountNum, String customerName){\n this.accountNum = accountNum;\n this.customerName = customerName;\n balance = 0;\n }",
"public Account() {\r\n\t\tthis(\"[email protected]\", \"Account\");\r\n\t}",
"public Bank(BankDisplay bankDisplay) {\n this(\"bank\", \"localhost\", 1234, bankDisplay);\n }",
"public Account() {\n super();\n }",
"public SavingsAccount() {\n\t}",
"public void createAccount(double balance) {\r\n\t\tAccount account = new Account(balance);\r\n\t\tsetPlayerAccount(account);\r\n\t}",
"public Account(int id, double balance) {\n this();\n this.name = \"Account\";\n this.id = id;\n this.balance = balance;\n }",
"BankDetail() {\n this.isValid = new Boolean(false);\n this.bankAccountNo = new String();\n this.bankAccountHolderName = new String();\n this.bankCountry = new String();\n this.IFSC = new String();\n }",
"@Override\n\tpublic void createAccount(String username, Bank bank) {\n\t\ttry {\n\t\tAccount newAccount = new Account(username, bank.getBankID(), bank.getNumOfAccounts()+1);\n\t\tbank.setNumOfAccounts(bank.getNumOfAccounts()+1);\n\t\taddAccount(bank, newAccount);\n\t\t}catch(NullPointerException e) {\n\t\t\tSystem.out.println(\"Could not find bank\");\n\t\t}\n\t\t\n\t}",
"public BankAccount(String holderName, String number, float balance){\r\n\t\tthis.holderName = holderName;\r\n\t\tthis.number = number;\r\n\t\tthis.balance = balance;\r\n\t}",
"public Bank() {\n accounts = new Account[2];\n numOfAccounts = 0;\n }",
"public account(){\n this.accNo = 000;\n this.id = 000;\n this.atype = \"\";\n this.abal = 0.00;\n }",
"public UserAccount() {\n\n\t}",
"private Account createAccount4() {\n Account account = new Account(\"123456004\", \"Chad I. Cobbs\",\n new SimpleDate(4, 23, 1976).asDate(), \"[email protected]\", true, false,\n new CreditCard(\"1234123412340004\"), new CreditCard(\"4320123412340005\"));\n\n final Percentage percent50 = new Percentage(0.5);\n final Percentage percent25 = new Percentage(0.25);\n account.addBeneficiary(\"Jane\", percent25);\n account.addBeneficiary(\"Amy\", percent25);\n account.addBeneficiary(\"Susan\", percent50);\n return account;\n }",
"public UserAccount() {\n }",
"public Bank() {\n\n\t\tcustomerList = new ArrayList<Customer>();\n\t\tCustomer C = new Customer(\"madison\", \"bynum\", \"madb\", \"123\");\n\t\tcustomerList.add(C);\n\t\temployeeList = new ArrayList<Employee>();\n\t\tEmployee E = new Employee(\"madi\", \"by\", \"madib\", \"1234\");\n\t\temployeeList.add(E);\n\t\tadminList = new ArrayList<Admin>();\n\t\tAdmin A = new Admin(\"amber\", \"stone\", \"amberstone195\", \"12345\");\n\t\tadminList.add(A);\n\t\tsbank.writeSerializeMyBank();\n\t\tsbank.loadSerializeMyBank();\n\t}",
"public static ATMAccount createAccount() {\r\n\t\tString userName;\r\n\t\tdouble userBalance;\r\n\t\tint digit = -1;\r\n\r\n\t\tSystem.out.println(\"Please enter a name for the account: \");\r\n\t\tuserInput.nextLine();\r\n\t\tuserName = userInput.nextLine();\r\n\r\n\t\t//Requests digits 1 by 1 for the pin number\r\n\t\tString accPin = \"\";\r\n\t\tfor (int i = 1; i < 5; i++) {\r\n\t\t\tdigit = -1;\r\n\t\t\tSystem.out.println(\"Please enter digit #\" + i + \" of\" + \"your pin.\");\r\n\t\t\tdo {\r\n\t\t\t\tdigit = userInput.nextInt();\r\n\t\t\t} while (digit < 0 || digit > 9);\r\n\t\t\taccPin += digit;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Please put the amount of money you would like to \" + \"initially deposit into the account: \");\r\n\t\tuserBalance = userInput.nextDouble();\r\n\t\tRandom accountIDGenerator = new Random();\r\n\t\tint userID = accountIDGenerator.nextInt(2147483647);\r\n\t\tATMAccount account = new ATMAccount(userID, userName, Integer.parseInt(accPin), userBalance);\r\n\t\tSystem.out.println(\"Acount Information: \\n\"+account.toString());\r\n\t\treturn account;\r\n\t}",
"public Account(){\n this.id = 0;\n this.balance = 0;\n this.annualInterestRate = 0;\n this.dateCreated = new Date();\n }",
"public SavingsAccount() {\n super();\n }",
"public GlAccountBank (\n\t\t\tLong in_id\n ) {\n\t\tthis.setId(in_id);\n }",
"public AccountManager(){\r\n allAccounts.put(\"CreditCard\",credits);\r\n allAccounts.put(\"LineOfCredit\",lineOfCredits);\r\n allAccounts.put(\"Chequing\",chequing);\r\n allAccounts.put(\"Saving\",saving);\r\n createAccount(\"3\", 0);\r\n primaryAccount = chequing[0];\r\n }",
"private Bank() {\r\n\t\tsuper();\r\n\t\tlogService = new Logger(\"driverName\");\r\n\t\tlogger = new Logger(\"driverName\");\r\n\t\tthis.balance = balance;\r\n\t\tthis.clients = new Client[100];\r\n\t}",
"@Override\n\tpublic void createBank(String bankName) {\n\t\tBank newBank = new Bank(bankName, new HashSet<Account>());\n\t\tcache.addToCache(newBank);\n\t\t\n\t}",
"public FeeAccount ()\n {\n }",
"int createAccount(Account account);",
"public Account() //default constructor \n {\n this.balance = 0;\n this.account_number = 0;\n }",
"@Test\n public void accountCustomConstructor_isCorrect() throws Exception {\n\n int accountId = 100;\n int userId = 101;\n String accountName = \"account Test Name\";\n double balance = 1000.00;\n\n // Create custom account\n Account account = new Account(accountId, userId, accountName, balance);\n\n // Verify values\n assertEquals(accountId, account.getAccountId());\n assertEquals(userId, account.getUserId());\n assertEquals(accountName, account.getAccountName());\n assertEquals(balance, account.getBalance(), 0);\n }",
"public Account(){\r\n this.id = 0;\r\n this.saldo = 0.0;\r\n }",
"public InvoiceBalance()\n {\n }",
"protected Account(String n, float b) {\n this(n); \n balance = b;\n }",
"public Account(Holder holder, int balance) {\n this.holder = holder;\n this.balance = balance;\n }",
"public BankAccount(String accountName, int balance) {\n this.accountName = accountName;\n this.balance = balance;\n this.valueDeposits = balance;\n this.valueWithdrawals = 0;\n this.maximumBalance = balance;\n this.minimumBalance = balance;\n }",
"public UserAcct() {\r\n }",
"UserAccount createUserAccount(User user, double amount);",
"public Account(double balance) {\n\t\tthis.balance = balance;\n\t}",
"public BankAccount(double basicMoney) {\n\t\tthis.money = basicMoney;\n\t}",
"public static void main(String[] args) {\n BankAccount bankAccount = new BankAccount(11211, 0, \"adam smith\", \"[email protected]\", \"9090980980\");\n BankAccount tim = new BankAccount(\"tim\", \"[email protected]\", \"9090980980\");\n System.out.println(\"Account Number = \" + tim.getAccountNumber());\n System.out.println(\"Balance = \"+ tim.getBalance());\n System.out.println(\"Customer Name = \" + bankAccount.getCustomerName());\n System.out.println(\"Email = \" + bankAccount.getEmailAddress());\n System.out.println(\"Phone Number = \" + bankAccount.getPhoneNumber());\n System.out.println(\"deposit = \"+ bankAccount.getDeposit(90));\n System.out.println(\"new balance = \"+ bankAccount.getWithdrawal(200));\n }",
"public BankAccountKey() {\n\tsuper();\n}",
"public Account() {\n\t\t//starting amount is 1500\n\t\tmoney = 1500;\n\t}",
"public BankAccount(double initialBalance) {\r\n\t\tbalance=initialBalance;\r\n\t}",
"Account(){\r\n\t\t//id, balance and annualInterestRate are set to 0, the dateCreated is set to the current date and time\r\n\t\t setId(0);\r\n\t\t setBalance(0);\r\n\t\t setAnnualInterestRate(0);\r\n\t\t this.dateCreated = new Date(System.currentTimeMillis());\r\n\t }",
"public Account(int id, String name, double balance){\n this(id, balance);\n this.name = name;\n }",
"public account(int acc,int Id,String Atype,double bal ){\n this.accNo = acc;\n this.id = Id;\n this.atype = Atype;\n this.abal = bal;\n }",
"public _AccountStub ()\n {\n super ();\n }",
"public BankAccount(String holderName, String number){\r\n\t\tthis.holderName = holderName;\r\n\t\tthis.number = number;\r\n\t\tthis.balance = 0;\r\n\t}",
"public void TestAccount1() {\n\n AccountCreator account = new AccountCreator();\n account.setFirstName(\"Bob\");\n account.setLastName(\"Smith\");\n account.setAddress(\"5 Rain Road\");\n account.setPIN();\n account.setTestBalance(300);\n accountList.add(account);\n\n }",
"public BankAccount(int accountNo, String name, double balance) {\n this.accountNo = accountNo;\n this.name = name;\n if(balance > 0.0)\n this.balance = balance;\n }",
"public Bank(long accNumber, float accBalance) {\n\t\tsuper();\n\t\tthis.accNumber = accNumber;\n\t\tthis.accBalance = accBalance;\n\t}",
"public BankDataBase()\n {\n accounts = new Account[ 2 ];\n accounts[ 0 ] = new Account( 12345, 54321, 1000.0, 1200.0 );\n accounts[ 1 ] = new Account( 98765, 56789, 200.0, 200.0 );\n }",
"public ControlBank(Bank bank) {\r\n\t\tthis.bank = bank;\r\n\t}",
"public BankAcc(int accNum, double bal, String name, String email, String phone){\r\n System.out.println(\"DONE\");\r\n //can do some validation in the other functions\r\n //not nessacary\r\n setAccNum(accNum);\r\n this.bal=bal;\r\n this.name=name;\r\n this.email=email;\r\n this.phone=phone;\r\n\r\n }",
"public SavingsAccount(double balance)\n {\n startingBalance = balance;\n }",
"public Bank() throws Exception\r\n\t{\r\n\t\tScanner fileScan = new Scanner(new File(\"C:\\\\Users\\\\jason\\\\workspace\\\\proj1fa14\\\\bankdata.txt\"));\r\n\t\taccounts = new Account[10];\r\n\t\tnumAccounts = 0;\r\n\t\tCustomer customer;\r\n\t\tAccount account;\r\n\t\tfor(int i = 0; i<9; i++)\r\n\t\t{\r\n\t\t\tString first = fileScan.next();\r\n\t\t\t//System.out.println(first);\r\n\t\t\tString last = fileScan.next();\r\n\t\t\t//System.out.println(last);\r\n\t\t\tint age = fileScan.nextInt();\r\n\t\t\tString pN = fileScan.next();\r\n\t\t\tint ba = fileScan.nextInt();\r\n\t\t\tint ch = fileScan.nextInt();\r\n\t\t\tString accNum = fileScan.next();\r\n\t\t\tcustomer = new Customer(first,last,age,pN);\r\n\t\t\taccount = new Account(customer,ba,ch, accNum);\r\n\t\t\taccounts[i] = account;\r\n\t\t\tnumAccounts++;\r\n\t\t}\r\n\t\tfileScan.close();\r\n\t}",
"public Account(int id, double balance) {\n this();\n this.id = id;\n this.balance = balance;\n }",
"public interface AccountFactory {\n Account create();\n}",
"public Bank(double cash, double interest)\r\n {\r\n super(cash);\r\n this.interest = interest;\r\n }",
"public Account() {\n this(DSL.name(\"account\"), null);\n }",
"public static Bank getBank() {\n return Bank;\n }",
"public AccountTypeEntity() { }",
"public Account()\n {\n id = UUID.randomUUID();\n }",
"public BankDatabase() {\r\n accounts = new Account[3];\r\n Connection c = null;\r\n Statement stmt = null;\r\n try {\r\n Class.forName(\"org.postgresql.Driver\");\r\n c = DriverManager\r\n .getConnection(\"jdbc:postgresql://localhost:5432/ATM\",\r\n \"postgres\", \"0000\");\r\n c.setAutoCommit(false);\r\n stmt = c.createStatement();\r\n ResultSet rs = stmt.executeQuery( \"SELECT * FROM accounts;\" );\r\n var i = 0;\r\n while ( rs.next() ) {\r\n int theAccountNumber = rs.getInt(\"accountnumber\");\r\n int thePin = rs.getInt(\"pin\");\r\n double theAvailiableBalance = rs.getDouble(\"availiablebalance\");\r\n double theTotalBalance = rs.getDouble(\"totalbalance\");\r\n accounts[i] = new Account( theAccountNumber, thePin, theAvailiableBalance, theTotalBalance);\r\n i++;\r\n }\r\n rs.close();\r\n stmt.close();\r\n c.close();\r\n } catch ( Exception e ) {\r\n System.err.println( e.getClass().getName()+\": \"+ e.getMessage() );\r\n System.exit(0);\r\n }\r\n\r\n\r\n// accounts = new Account[2]; // just 2 accounts for testing\r\n// accounts[0] = new Account(12345, 54321, 1000.0, 1200.0);\r\n// accounts[1] = new Account(98765, 56789, 200.0, 200.0);\r\n }",
"public SavingsAccount(String n) {\n super(n); \n balance = 0;\n }",
"public static void main(String[] args) {\n\n BankAccount rustemAccount=new BankAccount(\"Rustem\",\"Erdem\");\n\n System.out.println(\"rustemAccount.firstName = \" + rustemAccount.firstName);\n System.out.println(\"rustemAccount.getAccountHolder() = \" + rustemAccount.getAccountHolder());\n\n\n System.out.println(\"getBalance() = \" + rustemAccount.getBalance());\n\n rustemAccount.setBalance(150);\n System.out.println(\"getBalance() = \"+rustemAccount.getBalance());\n\n rustemAccount.deposit(150);\n rustemAccount.avaliableBalance();\n rustemAccount.withdraw(100);\n rustemAccount.avaliableBalance();\n\n\n rustemAccount.setAccountNumber(23112432);\n System.out.println(\"rustemAccount.getAccountNumber() = \" + rustemAccount.getAccountNumber());\n\n\n System.out.println(rustemAccount);\n }",
"public Bank(String name, int accs){\n bankAccounts = new Account[accs];\n bankName = name;\n maxAccounts = accs;\n currAccounts = 0; //empty\n }",
"public BankAccount(Customer customer) {\r\n\t\tthis.customer = customer;\r\n\t\tcustomerBankAccountList.add(customer);\r\n\t\t\r\n\t\tCustomerController.addBankAccountList(this);\r\n\t\t\r\n\t\tsilverState = new SilverLevel(this);\r\n\t\tgoldState = new GoldLevel(this);\r\n\t\tplatinumState = new PlatinumLevel(this);\r\n\t\t\r\n\t\tlevelState = silverState;\r\n\t\t\r\n\t}",
"public void createAccount(String accountType, double balance){\r\n // check what is the type of the account being created\r\n /* update the list each time an account is being created and then put it into the hashtable. Then increase the\r\n counter do this for each of the following accounts each time an account is created*/\r\n switch (accountType){\r\n case \"1\":\r\n credits[creditCounter]= new CreditCardAccount(balance);\r\n allAccounts.replace(\"CreditCard\",credits);\r\n creditCounter++;\r\n break;\r\n case \"2\":\r\n lineOfCredits[lineOfCreditCounter] = new LineOfCreditAccount(balance);\r\n allAccounts.replace(\"LineOfCredit\",lineOfCredits);\r\n lineOfCreditCounter++;\r\n break;\r\n case \"3\":\r\n chequing[chequingCounter] = new ChequingAccount(balance);\r\n allAccounts.replace(\"Chequing\",chequing);\r\n chequingCounter++;\r\n break;\r\n case \"4\":\r\n saving[savingCounter] = new SavingsAccount(balance);\r\n allAccounts.replace(\"Saving\",saving);\r\n savingCounter++;\r\n break;\r\n default:\r\n System.out.println(\"ERROR IN CREATE ACCOUNT\");\r\n break;\r\n }\r\n }",
"public Account(String firstName, String lastName, String SSN,\n String email, String password, String cardNum, String accId,\n double gpa, String schoolName, HashMap<String, Transaction> pendingTransactions,\n HashMap<String, Transaction> completedTransactions) {\n //Map<String, Transaction> dailyTransactions) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.SSN = SSN;\n this.cardNum = cardNum;\n this.email = email;\n this.password = password;\n this.accId = accId;\n dailyLimit = 50.00;\n accCreditLimit = 1000.00;\n creditUsed = getCreditUsed();\n this.gpa = gpa;\n cashBackRate = gpa / 2;\n this.schoolName = schoolName;\n this.pendingTransactions = pendingTransactions;\n this.completedTransactions = completedTransactions;\n this.cashBackToDate = 0.0;\n //this.dailyTransactions = dailyTransactions;\n }",
"public Bank ()\n {\n super (\"Bank\", defaults, trans, sharedQueue);\n customer = new Source (0, defaults [0], \"Bank$Customer\", customer_es, sharedQueue);\n teller = new Facility (1, defaults [1], new LinkedList<Coroutine> (), teller_es, sharedQueue);\n exit = new Sink (2, defaults [2], null, sharedQueue);\n initModel (new DynamicNode [] { customer, teller, exit });\n \n }",
"public ExternallyOwnedAccount() {}",
"@Test\n\tpublic void createAccountCashTest() {\n\t\tsetChequingRadioDefaultOff();\n\t\trdbtnCash.setSelected(true);\n\t\tdata.setRdbtnCash(rdbtnCash);\n\t\tAccount account = data.createNewAccount();\n\t\taccountTest = new Account(TEST_ACCOUNT_NAME, bankTest,\n\t\t\t\tAccount.Types.CASH.getAccountType());\n\t\tassertEquals(accountTest, account);\n\n\t}"
]
| [
"0.7987622",
"0.7898718",
"0.7679211",
"0.76787907",
"0.74386126",
"0.73289806",
"0.73276246",
"0.73276216",
"0.7241608",
"0.7190564",
"0.7161511",
"0.7157209",
"0.7152136",
"0.71513736",
"0.71337765",
"0.7129209",
"0.70765084",
"0.707076",
"0.704791",
"0.70475066",
"0.70390004",
"0.69973326",
"0.69961536",
"0.69908744",
"0.69788796",
"0.69788796",
"0.6970424",
"0.6967551",
"0.6964088",
"0.6902125",
"0.6897786",
"0.6894574",
"0.6834049",
"0.68004817",
"0.679167",
"0.6774249",
"0.67346454",
"0.6733452",
"0.6728412",
"0.67278457",
"0.67157876",
"0.6705667",
"0.6701638",
"0.6690647",
"0.66900283",
"0.6689316",
"0.6672924",
"0.6668493",
"0.66586703",
"0.6657865",
"0.6651154",
"0.66430694",
"0.6642309",
"0.6611061",
"0.6574716",
"0.65738344",
"0.6563926",
"0.6555521",
"0.65291876",
"0.65156126",
"0.6501363",
"0.6476778",
"0.6473798",
"0.64714366",
"0.6463578",
"0.6459343",
"0.6458555",
"0.64545417",
"0.64525646",
"0.64385194",
"0.6433475",
"0.6424268",
"0.64213043",
"0.6417708",
"0.6415369",
"0.64063627",
"0.6404234",
"0.6397713",
"0.63919646",
"0.6388776",
"0.6388296",
"0.63871986",
"0.6384157",
"0.6382915",
"0.636081",
"0.63471955",
"0.63468957",
"0.63427436",
"0.63385034",
"0.6332617",
"0.632237",
"0.6315573",
"0.63144577",
"0.63141924",
"0.63115567",
"0.63102937",
"0.6305902",
"0.629869",
"0.62782085",
"0.6274998",
"0.6271605"
]
| 0.0 | -1 |
visitor pattern accept method | public void accept(ProcessEngine engine,ProcessInstance instance) throws Exception
{
engine.process(this, instance);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract void accept(Visitor visitor);",
"public abstract void accept(Visitor v);",
"public abstract void visit();",
"public Object accept(Visitor v, Object params);",
"public void accept(Visitor visitor);",
"void accept(Visitor visitor);",
"void accept(Visitor<V> visitor);",
"@Override\n\tpublic void accept(Visitor visitor) {\n\t\t\n\t}",
"public void accept(IVisitor visitor);",
"void visit(Visitor visitor);",
"@Override\r\n\tpublic void accept(Visitor v) {\r\n\t\tv.visit(this);\t\r\n\t}",
"public abstract <E, F, D, I> E accept(ReturnVisitor<E, F, D, I> visitor);",
"public interface Visitor {\n\t/* METHODS */\n\t/**\n\t * Visits a Liquor.\n\t * @param liquor The Liquor to visit.\n\t */\n\tvoid visit(Liquor liquor);\n\t\n\t/**\n\t * Visits a Tobacco.\n\t * @param tobacco The Tobacco to visit.\n\t */\n\tvoid visit(Tobacco tobacco);\n\t\n\t/**\n\t * Visits a Necessity.\n\t * @param necessity The Necessity to visit.\n\t */\n\tvoid visit(Necessity necessity);\n}",
"@Override\n\tpublic void accept(Visitor visitor) {\n\t\tvisitor.visit(this);\n\t}",
"@Override\r\n\tpublic void accept(Visitor visitor) {\r\n\t\tvisitor.visit(this);\r\n\t}",
"@Override\n public void accept(Visitor visitor) {\n visitor.visit(this);\n }",
"@Override\n public void accept(Visitor visitor) {\n visitor.visit(this);\n }",
"@Override\n\tpublic Object accept(Visitor visitor) {\n\t\treturn visitor.visit(this);\n\t}",
"public abstract void accept(GameObjectVisitor v);",
"public abstract void visit(V v) throws VisitorException;",
"public interface Visitable {\n public boolean accept(Visitor v);\n}",
"interface VisitorAccept {\n\t/**\n\t * Methode permettant d'accepter le visiteur.\n\t * \n\t * @param visitor\n\t * ; MessageVisitor\n\t */\n\tpublic void accept(MessageVisitor visitor);\n}",
"@Override\n\tpublic void accept(Visitor v) {\n\t\tv.visit(this);\n\t}",
"public abstract void accept(CodeVisitor v);",
"@Override\n public <T> T accept(Visitor<T> v) {\n return v.visit(this);\n }",
"@Override\r\n \tpublic final void accept(IASTNeoVisitor visitor) {\r\n \t\tassertNotNull(visitor);\r\n \t\t\r\n \t\t// begin with the generic pre-visit\r\n \t\tif(visitor.preVisit(this)) {\r\n \t\t\t// dynamic dispatch to internal method for type-specific visit/endVisit\r\n \t\t\taccept0(visitor);\r\n \t\t}\r\n \t\t// end with the generic post-visit\r\n \t\tvisitor.postVisit(this);\r\n \t}",
"interface MessageVisitor {\n\t/**\n\t * Methode de visite du Message\n\t * \n\t * @param message\n\t * : Message\n\t */\n\tpublic void visit(Message message);\n\n\t/**\n\t * Methode de visite du BitField\n\t * \n\t * @param bf\n\t * : BitField\n\t */\n\tpublic void visit(BitField bf);\n\n\t/**\n\t * Methode de visite du Choke\n\t * \n\t * @param c\n\t * ; Choke\n\t */\n\tpublic void visit(Choke c);\n\n\t/**\n\t * Methode de visite du Have\n\t * \n\t * @param h\n\t * : Have\n\t */\n\tpublic void visit(Have h);\n\n\t/**\n\t * Methode de visite du Interested\n\t * \n\t * @param i\n\t * : Interested\n\t */\n\tpublic void visit(Interested i);\n\n\t/**\n\t * Methode de visite du KeepAlive\n\t * \n\t * @param ka\n\t * : KeepAlive\n\t */\n\tpublic void visit(KeepAlive ka);\n\n\t/**\n\t * Methode de visite du NotInterested\n\t * \n\t * @param ni\n\t * : NotInterested\n\t */\n\tpublic void visit(NotInterested ni);\n\n\t/**\n\t * Methode de visite du Request\n\t * \n\t * @param r\n\t * : Request\n\t */\n\tpublic void visit(Request r);\n\n\t/**\n\t * Methode de visite du SendBlock\n\t * \n\t * @param sb\n\t * : SendBlock\n\t */\n\tpublic void visit(SendBlock sb);\n\n\t/**\n\t * Methode de visite du Unchoke\n\t * \n\t * @param uc\n\t * : Unchoke\n\t */\n\tpublic void visit(Unchoke uc);\n\t\n\tpublic void visit(SendRSAKey srsak);\n\t\n\tpublic void visit(SendSymmetricKey ssyk);\n}",
"<R> R accept(ValueVisitor<R> visitor);",
"@Override\r\n\tpublic void visit() {\n\r\n\t}",
"@Override\n public void accept(TreeVisitor visitor) {\n }",
"public interface Visitor {\n //----------------------------------------------------------------------------------- \n\n /**\n * Visit method to handle <code>Assignment</code> elements.\n * \n * @param assignment Assignment object to be handled.\n */\n void visit(final Assignment assignment);\n\n /**\n * Visit method to handle <code>Delete</code> elements.\n * \n * @param delete Delete object to be handled.\n */\n void visit(final Delete delete);\n\n /**\n * Visit method to handle <code>Insert</code> elements.\n * \n * @param insert Insert object to be handled.\n */\n void visit(final Insert insert);\n\n /**\n * Visit method to handle <code>Join</code> elements.\n * \n * @param join Join object to be handled\n */\n void visit(final Join join);\n\n /**\n * Visit method to handle select elements.\n * \n * @param select Select object to be handled.\n */\n void visit(final Select select);\n\n /**\n * Visit method to handle <code>Table</code> elements.\n * \n * @param table Table object to be handled.\n */\n void visit(final Table table);\n\n /**\n * Visit method to handle <code>TableAlias</code> elements.\n * \n * @param tableAlias TableAlias object to be handled.\n */\n void visit(final TableAlias tableAlias);\n\n /**\n * Visit method to handle update elements.\n * \n * @param update Update object to be handled.\n */\n void visit(final Update update);\n\n /**\n * Visit method to handle <code>AndCondition</code> elements.\n * \n * @param andCondition AndCondition object to be handled.\n */\n void visit(final AndCondition andCondition);\n\n /**\n * Visit method to handle <code>Compare</code> elements.\n * \n * @param compare Compare object to be handled.\n */\n void visit(final Compare compare);\n\n /**\n * Visit method to handle <code>IsNullPredicate</code> elements.\n * \n * @param isNullPredicate IsNullPredicate object to be handled.\n */\n void visit(final IsNullPredicate isNullPredicate);\n\n /**\n * Visit method to handle <code>OrCondition</code> elements.\n * \n * @param orCondition OrCondition object to be handled.\n */\n void visit(final OrCondition orCondition);\n\n /**\n * Visit method to handle <code>Column</code> elements.\n * \n * @param column Column object to be handled.\n */\n void visit(final Column column);\n\n /**\n * Visit method to handle <code>NextVal</code> elements.\n * \n * @param nextVal NextVal object to be handled.\n */\n void visit(final NextVal nextVal);\n\n /**\n * Visit method to handle <code>Parameter</code> elements.\n * \n * @param parameter Parameter object to be handled.\n */\n void visit(final Parameter parameter);\n\n //-----------------------------------------------------------------------------------\n\n /**\n * Method returning constructed String.\n * \n * @return Constructed query string.\n */\n String toString();\n\n //----------------------------------------------------------------------------------- \n}",
"@Override\n\tpublic void accept(TreeVisitor visitor) {\n\n\t}",
"@Override\n\tpublic void accept(NodeVisitor visitor) {\n\t\tvisitor.visit(this);\n\t}",
"public Object accept (Visitor v) {\n return v.visit(this);\n }",
"public interface Visitor {\n void accept(Element element);\n}",
"<R,D> R accept(TreeVisitor<R,D> visitor, D data);",
"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 void accept(MessageVisitor visitor);",
"public interface ShoppingCartVisitor {\n\n double visit(Book book);\n double visit(DVD dvd);\n}",
"public void accept(ExpressionNodeVisitor visitor);",
"public abstract void accept0(IASTNeoVisitor visitor);",
"public static MethodCallExpression accept(ExpressionVisitor visitor) { throw Extensions.todo(); }",
"public void accept(Visitor visitor) {\n\t\tvisitor.visit(this);\n\t}",
"public interface Visitable {\n\n\tpublic double accept(Visitor visitor);\n}",
"@Override\r\n\tpublic Relation accept(Visitor v)\t\t{ return v.visit(this);\t\t\t\t\t\t\t}",
"public abstract void accept(PhysicalPlanVisitor visitor);",
"@Override\n public void visit(NodeVisitor v){\n v.visit(this);\n }",
"public interface Visitor {\n public void visit(RoundHouse house);\n public void visit(SquareHouse house);\n}",
"@Override\n\tpublic void visit(Function arg0) {\n\t\t\n\t}",
"public void visit(Choke c);",
"@Override\n\tpublic void visit(Function arg0) {\n\n\t}",
"public interface RegionVisitor {\n public void visitLandRegion(LandRegion landRegion);\n public void visitRiverRegion(RiverRegion riverRegion);\n public void visitSeaRegion(SeaRegion seaRegion);\n}",
"public interface FlowerElement {\n public void accept(Visitor visitor);\n}",
"void accept(TmxElementVisitor visitor);",
"public void accept(Visitor v) {\n\t\tv.visit(this);\n\t}",
"public Object accept(ExpressionNodeVisitor visitor) {\n\t\t\n\t\treturn visitor.visit(this);\n\t\t\n\t}",
"Object visitorResponse();",
"@Override\n\tpublic <T> T accept(ASTVisitor<T> v) {\n\t\treturn v.visit(this);\n\t}",
"boolean accept(GenericVisitor<Boolean> visitor);",
"@Override\n public void accept(IPropertyValueVisitor visitor) {\n // attributes\n _acceptSingleAttribute(java.lang.String.class, ch.actifsource.core.CorePackage.NamedResource_name, visitor);\n // relations\n _acceptList(com.actifsource.simpleservice.generic.javamodel.IMyParameter.class, com.actifsource.simpleservice.generic.GenericPackage.myCall_parameter, visitor);\n _acceptSingle(com.actifsource.simpleservice.generic.javamodel.IMyType.class, com.actifsource.simpleservice.generic.GenericPackage.myCall_returnType, visitor);\n _acceptSingle(ch.actifsource.core.javamodel.IClass.class, ch.actifsource.core.CorePackage.Resource_typeOf, visitor);\n }",
"@SuppressWarnings(\"unused\")\npublic interface Visitor {\n /**\n * <p>\n * Visits the given <code>Document</code>\n * </p>\n * \n * @param document\n * is the <code>Document</code> node to visit.\n */\n void visit(Document document);\n\n /**\n * <p>\n * Visits the given <code>DocumentType</code>\n * </p>\n * \n * @param documentType\n * is the <code>DocumentType</code> node to visit.\n */\n void visit(DocumentType documentType);\n\n /**\n * <p>\n * Visits the given <code>Element</code>\n * </p>\n * \n * @param node\n * is the <code>Element</code> node to visit.\n */\n void visit(Element node);\n\n /**\n * <p>\n * Visits the given <code>Attribute</code>\n * </p>\n * \n * @param node\n * is the <code>Attribute</code> node to visit.\n */\n void visit(Attribute node);\n\n /**\n * <p>\n * Visits the given <code>CDATA</code>\n * </p>\n * \n * @param node\n * is the <code>CDATA</code> node to visit.\n */\n void visit(CDATA node);\n\n /**\n * <p>\n * Visits the given <code>Comment</code>\n * </p>\n * \n * @param node\n * is the <code>Comment</code> node to visit.\n */\n void visit(Comment node);\n\n /**\n * <p>\n * Visits the given <code>Entity</code>\n * </p>\n * \n * @param node\n * is the <code>Entity</code> node to visit.\n */\n void visit(Entity node);\n\n /**\n * <p>\n * Visits the given <code>Namespace</code>\n * </p>\n * \n * @param namespace\n * is the <code>Namespace</code> node to visit.\n */\n void visit(Namespace namespace);\n\n /**\n * <p>\n * Visits the given <code>ProcessingInstruction</code>\n * </p>\n * \n * @param node\n * is the <code>ProcessingInstruction</code> node to visit.\n */\n void visit(ProcessingInstruction node);\n\n /**\n * <p>\n * Visits the given <code>Text</code>\n * </p>\n * \n * @param node\n * is the <code>Text</code> node to visit.\n */\n void visit(Text node);\n}",
"public VariType visit(MessageSend n, Table argu) {\n\t VariType _ret=null;\n\t VariType t0 = n.f0.accept(this, argu);\n\t n.f1.accept(this, argu);\n\t n.f2.accept(this, argu);\n\t if(t0.type != \"Object\") {\n\t \t PrintError.errorexist = true;\n\t \t String emsg = \"not a class object, cannot use function call\";\n\t \t PrintError.print(emsg, n.f1.beginLine, n.f1.beginColumn, 1); \n\t \t return t0;\n\t }\n\t ClassTable classtable = ((MethodTable)argu).classtable.toptable.getclasstable(t0.name);\n\t MethodTable methodtable = classtable.getmethodtable(n.f2.f0.tokenImage);\n\t if(methodtable == null) {\n\t \t PrintError.errorexist = true;\n\t \t String emsg = \"undefined method \\\"\"+n.f2.f0.tokenImage+\"\\\"\";\n\t \t PrintError.print(emsg, n.f2.f0.beginLine, n.f2.f0.beginColumn, 1);\n\t \t return t0;\n\t }\n\t MethodParam methodparam = new MethodParam();\n\t methodparam.methodtable = (MethodTable)argu;\n\t n.f3.accept(this, argu);\n\t n.f4.accept(this, methodparam);\n\t n.f5.accept(this, argu);\n\t if(methodtable.paramnum != methodparam.paramnum) {\n\t \t PrintError.errorexist = true;\n\t \t String emsg = \"number of function parameters does not match, expect \"+methodtable.paramnum+\" parameters\";\n\t \t PrintError.print(emsg, n.f3.beginLine, n.f3.beginColumn, 1);\n\t \t _ret = methodtable.returntype;\n\t \t return _ret;\n\t }\n\t VariType t1, t2;\n\t TopTable toptable = ((MethodTable)argu).toptable;\n\t for(int i = 0; i < methodtable.paramtype.size(); i++) {\n\t \t t1 = methodtable.paramtype.get(i);\n\t \t t2 = methodparam.paramtype.get(i);\n\t \t if(VariType.isTheSameType(toptable, t1, t2) == false) {\n\t \t\t PrintError.errorexist = true;\n\t \t\t String emsg=\"type of function parameters does not match\";\n\t \t\t PrintError.print(emsg, n.f3.beginLine, n.f3.beginColumn, 1);\n\t \t }\n\t }\n\t _ret = methodtable.returntype;\n\t return _ret;\n\t }",
"public abstract int visit(SpatialVisitor visitor);",
"void visit(User user);",
"interface CarElement {\n // the element being visited accepts the visitor\n void accept(final CarElementVisitor visitor);\n}",
"int apply(MethodVisitor methodVisitor, Method method);",
"@Override\n\tpublic Void visit(MethodCall method) {\n\t\tprintIndent(\".\");\n\t\tindent++;\n\t\tmethod.caller.accept(this);\n\t\tmethod.type.accept(this);\n\t\tmethod.methodName.accept(this);\n\t\tfor (var v : method.args) \n\t\t\tv.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}",
"public Visitor visitor(Visitor v) \n { \n return visitor = v; \n }",
"public interface ItemElement {\n int accept(ShoppingCartVisitor visitor);\n}",
"void accept(Visitor visitor, BufferedImage im);",
"public interface Visitor {\n\n void visit(Home home);\n}",
"public interface Visitor {\n\n /**\n * please refer to the java doc inside the implementation classes\n * @param user\n */\n void visit(User user);\n\n /**\n * please refer to the java doc inside the implementation classes\n * @param entitlement\n */\n void visit(Entitlement entitlement);\n\n /**\n * please refer to the java doc inside the implementation classes\n * @param authToken\n */\n void visit(AuthToken authToken);\n\n /**\n * please refer to the java doc inside the implementation classes\n * @param resource\n */\n void visit(Resource resource);\n\n /**\n * please refer to the java doc inside the implementation classes\n * @return\n */\n boolean isValidStatus();\n\n /**\n * please refer to the java doc inside the implementation classes\n * @return\n */\n boolean isValidExpTime();\n\n /**\n * please refer to the java doc inside the implementation classes\n * @return\n */\n boolean isHasPermissions();\n\n /**\n * please refer to the java doc inside the implementation classes\n * @return\n */\n boolean isHasResources();\n\n /**\n * please refer to the java doc inside the implementation classes\n * @return\n */\n User getUserUnderValidation();\n\n}",
"public void visit(Have h);",
"@Override\n public synchronized void accept(ClassVisitor cv) {\n super.accept(cv);\n }",
"@Override public <T> T apply(TreeVisitor<T> visitor)\n {\n return visitor.visit(this);\n }",
"void accept(Article article);",
"public abstract double accept(TopologyVisitor visitor);",
"@Override\n\tpublic void visitarObjeto(Objeto o) {\n\t\t\n\t}",
"public <C> void accept(Visitor<B> visitor, Class<C> clz);",
"public void visit(Instanceof i) {}",
"public interface FlightSupplierResponse {\r\n\r\n <T> T accept(FlightSupplierResponseVisitor<T> visitor);\r\n}",
"@Override public <T> T apply(TreeVisitor<T> visitor)\n {\n return visitor.visit(this);\n }",
"public interface Visitor<R> {\n\n //Lists\n public <T extends IRNode> R visit(List<T> ns);\n\n //IRStms\n public R visit(CJUMP n);\n\n public R visit(CMOVE n);\n\n public R visit(EXP n);\n\n public R visit(JUMP n);\n\n public R visit(LABEL n);\n\n public R visit(MOVE n);\n\n public R visit(SEQ n);\n\n //Types\n public R visit(BINOP n);\n\n public R visit(CALL n);\n\n public R visit(CONST n);\n\n public R visit(ESEQ n);\n\n //Statements\n public R visit(MEM n);\n\n public R visit(NAME n);\n\n public R visit(TEMP n);\n}",
"@Override\r\n\tpublic void visitar(jugador jugador) {\n\t\t\r\n\t}",
"public interface FilterVisitor<R> {\r\n\r\n /**\r\n * A FilterVistor must visit all these methods below, per visitor design pattern. \r\n * And a FilterExpression just need implements an accept() method.\r\n */\r\n\r\n <T extends Comparable<T>> R visit(Eq<T> eq);\r\n\r\n <T extends Comparable<T>> R visit(NotEq<T> notEq);\r\n\r\n <T extends Comparable<T>> R visit(LtEq<T> ltEq);\r\n\r\n <T extends Comparable<T>> R visit(GtEq<T> gtEq);\r\n\r\n R visit(Not not);\r\n\r\n R visit(And and);\r\n\r\n R visit(Or or);\r\n\r\n}",
"void visit(Liquor liquor);",
"public void visit(Message message);",
"void accept(A a, B b, C c);",
"public interface Visitor {\n\tpublic void visit(WordTreeI wt);\n}",
"public void visit(Call call) {}",
"@Override\n\tpublic Void visit(Method method) {\n\t\tprintIndent(\"method\");\n\t\tindent++;\n\t\tmethod.id.accept(this);\n\t\tfor (var v : method.formals)\n\t\t\tv.accept(this);\n\t\tmethod.type.accept(this);\n\t\tmethod.body.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}",
"public interface IEventBFormatterVisitable {\n\n String accept(EventBFormatter visitor);\n\n}",
"public interface Visitable {\n\tvoid accept(ModelVisitor visitor);\n}",
"void accept(T value);",
"public interface MethodVisitor\n{\n\n\tpublic abstract void visitInsn(int i);\n\n\tpublic abstract void visitIntInsn(int i, int j);\n\n\tpublic abstract void visitVarInsn(int i, int j);\n\n\tpublic abstract void visitTypeInsn(int i, String s);\n\n\tpublic abstract void visitFieldInsn(int i, String s, String s1, String s2);\n\n\tpublic abstract void visitMethodInsn(int i, String s, String s1, String s2);\n\n\tpublic abstract void visitJumpInsn(int i, Label label);\n\n\tpublic abstract void visitLabel(Label label);\n\n\tpublic abstract void visitLdcInsn(Object obj);\n\n\tpublic abstract void visitIincInsn(int i, int j);\n\n\tpublic abstract void visitMaxs(int i, int j);\n\n\tpublic abstract void visitEnd();\n}",
"public interface Item {\r\n\r\n\tpublic double accept(ShoppingCartVisitor visitor);\r\n}",
"public interface ComputerPartVisitor\n{\n public void visit(Computer computer);\n\n public void visit(Mouse mouse);\n\n public void visit(Keyboard keyboard);\n\n public void visit(Monitor monitor);\n}",
"void accept(final CarElementVisitor visitor);",
"public void visit(Operand operand);",
"void accept(T param);",
"public interface EntityVisitor<T> {\n T visit(DefinedVariable definedVariable);\n\n T visit(UndefinedVariable undefinedVariable);\n\n T visit(DefinedFunction definedFunction);\n\n T visit(UndefinedFunction undefinedFunction);\n\n T visit(Constant constant);\n}"
]
| [
"0.7932193",
"0.7798181",
"0.7685794",
"0.7598962",
"0.7557328",
"0.7419082",
"0.7305987",
"0.72771525",
"0.7217442",
"0.7161726",
"0.71250665",
"0.70852804",
"0.69485617",
"0.69324285",
"0.6930472",
"0.6925446",
"0.6925446",
"0.6924585",
"0.69063175",
"0.69056785",
"0.6896841",
"0.68409646",
"0.68344414",
"0.682698",
"0.6790642",
"0.67431283",
"0.6741976",
"0.6740303",
"0.6729412",
"0.6729342",
"0.6716152",
"0.66862994",
"0.6659511",
"0.66523105",
"0.6651397",
"0.66332424",
"0.658698",
"0.65854615",
"0.6584571",
"0.65800977",
"0.6576311",
"0.6535122",
"0.6530984",
"0.6497059",
"0.6487239",
"0.6477288",
"0.64754105",
"0.6470321",
"0.64079565",
"0.64016956",
"0.640067",
"0.6351398",
"0.63503146",
"0.6340253",
"0.632092",
"0.6314547",
"0.62892205",
"0.62880147",
"0.6277031",
"0.62752986",
"0.62713116",
"0.62711513",
"0.62682533",
"0.62595534",
"0.62588775",
"0.6251113",
"0.62426925",
"0.62423986",
"0.62419826",
"0.6239823",
"0.62369037",
"0.6218096",
"0.61966825",
"0.6194799",
"0.6194484",
"0.6192106",
"0.6188806",
"0.6177024",
"0.6174026",
"0.61655647",
"0.6165097",
"0.61543065",
"0.614654",
"0.61414576",
"0.6140715",
"0.6138331",
"0.6118351",
"0.6098185",
"0.60926855",
"0.60892713",
"0.608413",
"0.6074837",
"0.60501677",
"0.6042464",
"0.60394603",
"0.6034276",
"0.6024789",
"0.60162365",
"0.6015622",
"0.6008507",
"0.5992974"
]
| 0.0 | -1 |
fill It should fill all the aircraft with ammo and subtract the needed ammo from the ammo storage If there is not enough ammo then it should start to fill the aircrafts with priority first If there is no ammo when this method is called, it should throw an exception | public void fill() throws NoAmmoException {
if (this.ammoStorage <= 0) {
throw new NoAmmoException();
} else {
int ammoNeeded = overallAmmoNeeded();
if (this.ammoStorage < ammoNeeded) {
// fill priority jets
for (Jet jet : this.aircrafts) {
if (jet.isPriority() && jet.needsAmmo()) {
this.ammoStorage = jet.refillAmmo(this.ammoStorage);
}
}
// fill non-priority jets
// if still has ammo
if (this.ammoStorage > 0) {
for (Jet jet : this.aircrafts) {
if (jet.needsAmmo()) {
this.ammoStorage = jet.refillAmmo(this.ammoStorage);
}
}
}
} else {
for (Jet jet : this.aircrafts) {
if (jet.needsAmmo()) {
this.ammoStorage = jet.refillAmmo(this.ammoStorage);
}
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void reload() {\n\t\tammo = AMMO_CAPACITY;\n\t}",
"public List<CardPower> pickUpAmmo()throws NoCardAmmoAvailableException {\n List<CardPower> powerups = new ArrayList<>();\n if (position.getCardAmmo() == null){\n throw new NoCardAmmoAvailableException();\n }\n if(position.getCardAmmo()!=null){\n List<Color> ammos = position.getCardAmmo().getAmmo();\n ammos = controlGrabAmmo(ammos);\n ammo.addAll(ammos);\n if(position.getCardAmmo().getCardPower() > 0){\n powerups = new ArrayList<>();\n for(int i=0; i<position.getCardAmmo().getCardPower() && cardPower.size() + i + 1 <= 3; i++)\n powerups.add(game.drawPowerUp());\n cardPower.addAll(powerups);\n }\n game.notifyGrabCardAmmo(this,ammos);\n position.setCardAmmo(null);\n }\n return powerups;\n }",
"@Test\r\n\tpublic void testFillChargingNonlinear_EmptyCar_ExhaustiveDesiredCapacity() {\n\t\tSimulation.verbosity = 0;\r\n\t\tint startTimeSeconds = 0;\r\n\t\t\r\n\t\tdouble desiredCapacityInterval = 1; \r\n\t\t\r\n\t\tdouble desiredCapacity = desiredCapacityInterval;\r\n\t\twhile (desiredCapacity <= car.getMaxCapacity()) {\r\n\t\t\t\r\n\t\t\t//System.out.println(\"desiredCapacity=\" + desiredCapacity);\r\n\t\t\tcar.setCurrentPlan(new double[96]);\r\n\t\t\tschedulerNonlinear.fillChargingPlan(car, chargingStation, desiredCapacity, \r\n\t\t\t\t\tTimeslotSorter.getSortedTimeslots(null, 0, 96, TimeslotSortingCriteria.INDEX), \r\n\t\t\t\t\tstartTimeSeconds);\r\n\t\t\t\r\n\t\t\tassertEquals(desiredCapacity, schedulerNonlinear.getPlannedCapacity(chargingStation, car, startTimeSeconds), 1e-2);\r\n\t\t\tdesiredCapacity += desiredCapacityInterval;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"public void pay(List<Color> ammoToPay, List<CardPower> powerUp) throws InsufficientAmmoException {\n List <Color> tmp = null;\n List <CardPower> tmpPU = null;\n if(ammoToPay != null && !ammoToPay.isEmpty() && ammoToPay.get(0)!=Color.ANY) {\n tmp = new ArrayList<>(ammoToPay);\n tmpPU = new ArrayList<>();\n if (powerUp != null && !powerUp.isEmpty())\n for (int i = 0; i < powerUp.size(); i++) {\n if (tmp.contains(powerUp.get(i).getColor())) {\n tmp.remove(powerUp.get(i).getColor());\n tmpPU.add(powerUp.get(i));\n }\n }\n if (!ammo.containsAll(tmp)) throw new InsufficientAmmoException();\n else {\n for (Color ammor : tmp) {\n ammo.remove(ammor);\n }\n for (CardPower cp : tmpPU) {\n cardPower.remove(cp);\n }\n }\n }\n else if(!ammoToPay.isEmpty() && ammoToPay.get(0) == Color.ANY && powerUp != null && !powerUp.isEmpty())\n cardPower.remove(powerUp.get(0));\n\n }",
"public void resupply()\n {\n fuel = model.maxFuel;\n ammo = model.maxAmmo;\n }",
"@Test\n void fillWater() {\n machine.setCurrentWater(0);\n Assertions.assertEquals(machine.getCurrentWater(), 0);\n\n //ensure, water fills up to maximum\n machine.fillWater();\n Assertions.assertEquals(machine.maxWater, machine.getCurrentWater());\n }",
"public void reload()\n\t{\n\t\tammo = maxAmmo;\n\t}",
"public void allocateWeapons() {\n Collections.shuffle(this.getWeaponPieces());\n List<Room> rooms = this.board.getRooms();\n Collections.shuffle(rooms);\n int roomIndex = 0;\n for (WeaponPiece weapon : this.getWeaponPieces()) {\n Room room = rooms.get(roomIndex);\n if (room.getWeaponPiece() == null) {\n room.setWeaponPiece(weapon);\n roomIndex += 1;\n }\n }\n }",
"@Test\r\n\tpublic void testFillChargingNonlinear_HighInitialSoC_ExhaustiveDesiredCapacity() {\n\t\tSimulation.verbosity = 0;\r\n\t\tint startTimeSeconds = 0;\r\n\t\t\r\n\t\t// Charge until soc=0.9\r\n\t\tdouble initialSoC = 0.9;\r\n\t\twhile (car.carBattery.getSoC() < initialSoC) {\r\n\t\t\tcar.addChargedCapacity(1, 32);\r\n\t\t}\r\n\t\t\r\n\t\tdouble desiredCapacity = 0.1;\r\n\t\twhile (desiredCapacity <= car.getMissingCapacity()) {\r\n\t\t\t\r\n\t\t\tcar.setCurrentPlan(new double[96]);\r\n\t\t\tschedulerNonlinear.fillChargingPlan(car, chargingStation, desiredCapacity, \r\n\t\t\t\t\tTimeslotSorter.getSortedTimeslots(null, 0, 96, TimeslotSortingCriteria.INDEX), \r\n\t\t\t\t\tstartTimeSeconds);\r\n\t\t\t\r\n\r\n\t\t\tdouble plannedCapacity = schedulerNonlinear.getPlannedCapacity(chargingStation, car, startTimeSeconds);\r\n\t\t\t//System.out.println(\"desiredCapacity=\" + desiredCapacity + \"Ah, plannedCapacity=\" + plannedCapacity);\r\n\t\t\t\r\n\t\t\tassertEquals(desiredCapacity, plannedCapacity, 1e-2);\r\n\t\t\tdesiredCapacity+=0.1;\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n public int fillInternal(FluidStack resource, boolean doFill)\n {\n if (resource == null || resource.amount <= 0)\n {\n return 0;\n }\n\n if (!doFill)\n {\n if (fluid == null)\n {\n return Math.min(capacity, resource.amount);\n }\n\n if (!fluid.isFluidEqual(resource))\n {\n return 0;\n }\n\n return Math.min(capacity - fluid.amount, resource.amount);\n }\n\n if (fluid == null)\n {\n fluid = new FluidStack(resource, Math.min(capacity, resource.amount));\n\n onContentsChanged();\n\n if (tile != null)\n {\n FluidEvent.fireEvent(new FluidEvent.FluidFillingEvent(fluid, tile.getWorld(), tile.getPos(), this, fluid.amount));\n }\n return fluid.amount;\n }\n\n if (!fluid.isFluidEqual(resource))\n {\n return 0;\n }\n int filled = capacity - fluid.amount;\n\n if (resource.amount < filled)\n {\n fluid.amount += resource.amount;\n filled = resource.amount;\n }\n else\n {\n fluid.amount = capacity;\n }\n \n if (filled>0) {\n \tonContentsChanged();\n }\n \n if (tile != null)\n {\n FluidEvent.fireEvent(new FluidEvent.FluidFillingEvent(fluid, tile.getWorld(), tile.getPos(), this, filled));\n }\n return filled;\n }",
"public void fillChest(Inventory inv);",
"public void refill() {\n\t\tfor(int i = 0; i < chests.size(); i++)\r\n\t\t\tchests.get(i).refill();\r\n\t}",
"public void setAmmo(int ammo) {\n\t\tthis.ammo = ammo;\n\t}",
"public void setAmmo(final boolean x) {\n int ammodif = 0;\n switch (Engine.currentWeapon) {\n\n case 2:\n ammodif = maxshotgunAmmo - shotgunAmmo;\n if (x) {\n if (ammodif < 10) {\n shotgunAmmo += ammodif;\n } else {\n shotgunAmmo += 10;\n }\n } else {\n shotgunAmmo--;\n if (shotgunAmmo == 0) {\n shotgunAmmo = 0;\n }\n\n }\n\n break;\n case 3:\n ammodif = maxrifleAmmo - rifleAmmo;\n if (x) {\n if (ammodif < 20) {\n rifleAmmo += ammodif;\n } else {\n rifleAmmo += 20;\n }\n } else {\n rifleAmmo--;\n if (rifleAmmo == 0) {\n rifleAmmo = 0;\n }\n }\n\n break;\n case 4:\n ammodif = maxgranadelauncherAmmo - granadeLauncherAmmo;\n if (x) {\n if (ammodif < 10) {\n granadeLauncherAmmo += ammodif;\n } else {\n granadeLauncherAmmo += 10;\n }\n } else {\n granadeLauncherAmmo--;\n if (granadeLauncherAmmo == 0) {\n granadeLauncherAmmo = 0;\n }\n }\n\n break;\n }\n }",
"@Test\n void fillBeans() {\n machine.setCurrentBeans(0);\n Assertions.assertEquals(machine.getCurrentBeans(), 0);\n\n //ensure, water fills up to maximum\n machine.fillBeans();\n Assertions.assertEquals(machine.maxBeans, machine.getCurrentBeans());\n }",
"private void setArmor() {\n\n if (VersionChecker.currentVersionIsUnder(12, 2)) return;\n if (!ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_ARMOR)) return;\n\n eliteMob.getEquipment().setItemInMainHandDropChance(0);\n eliteMob.getEquipment().setHelmetDropChance(0);\n eliteMob.getEquipment().setChestplateDropChance(0);\n eliteMob.getEquipment().setLeggingsDropChance(0);\n eliteMob.getEquipment().setBootsDropChance(0);\n\n if (hasCustomArmor) return;\n\n if (!(eliteMob instanceof Zombie || eliteMob instanceof PigZombie ||\n eliteMob instanceof Skeleton || eliteMob instanceof WitherSkeleton)) return;\n\n eliteMob.getEquipment().setBoots(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.AIR));\n\n if (eliteMobLevel >= 12)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.LEATHER_HELMET));\n\n if (eliteMobLevel >= 14)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.LEATHER_BOOTS));\n\n if (eliteMobLevel >= 16)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.LEATHER_LEGGINGS));\n\n if (eliteMobLevel >= 18)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.LEATHER_CHESTPLATE));\n\n if (eliteMobLevel >= 20)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.CHAINMAIL_HELMET));\n\n if (eliteMobLevel >= 22)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.CHAINMAIL_BOOTS));\n\n if (eliteMobLevel >= 24)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.CHAINMAIL_LEGGINGS));\n\n if (eliteMobLevel >= 26)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.CHAINMAIL_CHESTPLATE));\n\n if (eliteMobLevel >= 28)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.IRON_HELMET));\n\n if (eliteMobLevel >= 30)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.IRON_BOOTS));\n\n if (eliteMobLevel >= 32)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.IRON_LEGGINGS));\n\n if (eliteMobLevel >= 34)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.IRON_CHESTPLATE));\n\n if (eliteMobLevel >= 36)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.DIAMOND_BOOTS));\n\n if (eliteMobLevel >= 38)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.DIAMOND_HELMET));\n\n if (eliteMobLevel >= 40)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));\n\n if (eliteMobLevel >= 42)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));\n\n }",
"@Test\r\n\tpublic void testFillChargingPlan_Linear_HighInitialSoC() {\n\t\tdouble initialSoC = 0.9;\r\n\t\tint startTimeSeconds = 0;\r\n\t\t\r\n\t\twhile (car.carBattery.getSoC() < initialSoC) {\r\n\t\t\tcar.addChargedCapacity(1, 32);\r\n\t\t}\r\n\t\tdouble desiredCapacity = car.getMissingCapacity();\r\n\t\t\r\n\t\t// Linear\r\n\t\tcar.setCurrentPlan(new double[96]);\r\n\t\tschedulerLinear.fillChargingPlan(car, chargingStation, desiredCapacity, \r\n\t\t\t\tTimeslotSorter.getSortedTimeslots(null, 0, 95, TimeslotSortingCriteria.INDEX), \r\n\t\t\t\tstartTimeSeconds);\r\n\t\t\r\n\t\t\r\n\t\t//System.out.println(\"DesiredCapactiy: \" + desiredCapacity);\r\n\t\t//System.out.println(\"Planned capacity: \" + schedulerLinear.getPlannedCapacity(chargingStation, car, startTimeSeconds));\r\n\t\t//System.out.println(Arrays.toString(car.getCurrentPlan()));\r\n\t\t\r\n\r\n\t\tassertTrue(car.getCurrentPlan()[0] > 0);\r\n\t\tassertEquals(car.getMissingCapacity(), schedulerLinear.getPlannedCapacity(chargingStation, car, startTimeSeconds), 1e-6);\r\n\t}",
"private void fillAll() {\n this.fill_M0();\n this.fill_W();\n this.fill_C();\n }",
"public void charge() {\r\n capacity = Math.min(capacity += originalCapacity, originalCapacity);\r\n }",
"@Override\n void setRoute() throws ItemTooHeavyException {\n deliveryItem = tube.pop();\n if (deliveryItem.weight > itemWeightLimit) throw new ItemTooHeavyException();\n // Set the destination floor\n destination_floor = deliveryItem.getDestFloor();\n }",
"@Test\r\n\tpublic void testFillChargingPlan_Nonlinear_HighInitialSoC() {\n\t\tdouble initialSoC = 0.99;\r\n\t\tint startTimeSeconds = 0;\r\n\t\twhile (car.carBattery.getSoC() < initialSoC) {\r\n\t\t\tcar.addChargedCapacity(1, 32);\r\n\t\t}\r\n\t\tdouble desiredCapacity = car.getMissingCapacity();\r\n\t\t\r\n\t\t\r\n\t\t// Nonlinear\r\n\t\tcar.setCurrentPlan(new double[96]);\r\n\t\tschedulerNonlinear.fillChargingPlan(car, chargingStation, desiredCapacity, \r\n\t\t\t\tTimeslotSorter.getSortedTimeslots(null, 0, 95, TimeslotSortingCriteria.INDEX), \r\n\t\t\t\tstartTimeSeconds);\r\n\t\t\r\n\t\t//System.out.println(Arrays.toString(car.getCurrentPlan()));\r\n\t\t//System.out.println(schedulerNonlinear.getPlannedCapacity(chargingStation, car, startTimeSeconds));\r\n\t\t\r\n\t\tassertEquals(car.getMissingCapacity(), schedulerNonlinear.getPlannedCapacity(chargingStation, car, startTimeSeconds), 1e-8);\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void setBuildOrder() {\n\t\tqueueBuild(false, UpgradeType.Protoss_Ground_Armor);\r\n\t}",
"public void populate1()\r\n\t{\r\n\t\tRandom gen=new Random();\r\n\t\tint add=(gen.nextInt(8)+5);\r\n\t\twhile (add>0)\r\n\t\t{\r\n\t\t\t/**If the max capacity is reach, will break out to prevent further car instantiation*/\r\n\t\t\tif (carNum==LIMIT)\r\n\t\t\t{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tboolean straight;\r\n\t\t\tint straightNum=gen.nextInt(2);\r\n\t\t\tif (straightNum==0)\r\n\t\t\t\tstraight=true;\r\n\t\t\telse\r\n\t\t\t\tstraight=false;\r\n\t\t\tint directionNumber=gen.nextInt(4);\r\n\t\t\tDirection direction=null;\r\n\t\t\tStreet street=null;\r\n\t\t\tswitch (directionNumber)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tdirection=Direction.N;\r\n\t\t\t\t\tstreet=Street.CHURCH;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tdirection=Direction.S;\r\n\t\t\t\t\tstreet=Street.CHURCH;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tdirection=Direction.E;\r\n\t\t\t\t\tstreet=Street.MAIN;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tdirection=Direction.W;\r\n\t\t\t\t\tstreet=Street.MAIN;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tSystem.out.println(\"There was an error with your direction. Please look into this problem.\");\r\n\t\t\t}\r\n\t\t\tVehicle car=new Vehicle(carNum, time, direction, street, straight);\r\n\t\t\tcarNum++;\r\n\t\t\tif (car.getStraight())\r\n\t\t\t{\r\n\t\t\t\tswitch (car.getDirection())\r\n\t\t\t\t{\r\n\t\t\t\t\tcase N:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in North straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchNorthStraight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase S:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in South straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchSouthStraight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase W:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in West straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainWestStraight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase E:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in East straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainEastStraight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tSystem.out.println(\"There wan an error enquing cars in the pre propulate method. You should look into this.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tswitch (car.getDirection())\r\n\t\t\t\t{\r\n\t\t\t\t\tcase N:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in North Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchNorthRight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase S:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in South Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchSouthRight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase W:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in West Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainWestRight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase E:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in East Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainEastRight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tSystem.out.println(\"There wan an error enquing cars in the pre propulate method. You should look into this.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tadd--;\t\r\n\t\t}\t\r\n\t}",
"private void consumeResources(){\n\n Main.gang.setFood(Main.gang.getFood() - (Main.gang.getGangMembers().size() * Main.gang.getFoodIntake()));\n Main.gang.setWater(Main.gang.getWater() - (Main.gang.getGangMembers().size() * Main.gang.getFoodIntake()));\n }",
"@Test\n void checkAmmoResources() {\n ArrayList<Player> array = new ArrayList<>();\n AlphaGame game = new AlphaGame(1, array, false, 5);\n RealPlayer rp = new RealPlayer('b', \"rp\");\n rp.setPlayerPosition(Board.getSpawnpoint('b'));\n array.add(rp);\n char[] cost = new char[3];\n cost[0] = 'b';\n cost[1] = 'r';\n\n assertTrue(rp.checkAmmoResources(cost));\n\n cost[0] = 'b';\n cost[1] = 'b';\n\n assertFalse(rp.checkAmmoResources(cost));\n }",
"public void repair(){\n if(health < 9) {\n this.health++;\n }\n }",
"private void refillMap()\n {\n List<Block> blocks = map.getAllBlocks();\n blocks.forEach(block ->\n {\n if(block.isSpawnPoint())\n {\n while(!block.isAllWeaponsPresent() && !weaponCardDeck.isEmpty())\n {\n block.addWeaponCard(weaponCardDeck.getFirstCard());\n }\n }\n else\n {\n if(!block.isAmmoCardPresent())block.setAmmoCard(ammoCardDeck.getFirstCard());\n }\n });\n }",
"public void fillMachine() throws InvalidValueException{\n TypeConverter converter = new TypeConverter();\n // TODO: 19-Oct-16 make factory\n if (this.coffeeMachine.getIngredientSet().isEmpty()) {\n initIngredientSet();\n }\n int chosenFiller = converter.getInt(\"Input number\");\n switch (chosenFiller){\n case 1:\n fillCoffee();\n break;\n case 2:\n fillSugar();\n break;\n case 3:\n fillMilk();\n break;\n case 4:\n fillCoffee();\n fillSugar();\n fillMilk();\n }\n\n System.out.println(\"CoffeeMachine was refilled.\");\n }",
"private void setAllAvailable() {\r\n for (int large = 0; large < 9; large++) {\r\n for (int small = 0; small < 9; small++) {\r\n Tile tile = mSmallTiles[large][small];\r\n if (tile.getOwner() == Tile.Owner.NEITHER)\r\n addAvailable(tile);\r\n }\r\n }\r\n }",
"public void refuel() {\n fuelAmount = type.fuelCapacity;\n }",
"public void autosimulateCombat() {\n\n int monstersRemainingHealth = monster.getHealth() - player.getPower();\n int playersRemainingHealth = player.getHealth() - monster.getPower();\n\n while (player.getHealth() > 0 && monster.getHealth() > 0) {\n\n monster.setHealth(monstersRemainingHealth);\n monstersRemainingHealth = monster.getHealth() - player.getPower();\n\n\n player.setHealth(playersRemainingHealth);\n playersRemainingHealth = player.getHealth() - monster.getPower();\n\n }\n isPlayerDefeated();\n return;\n }",
"public void fill() \n\t{\n\t\tfilled++; //increment load factor\n\t\tloadFactor = ((double)filled / (double)length);\n\t\tif (loadFactor > minLoadFactor) { //if load factor surpass a predetermined threshold\n\t\t\tdoubleTable(); //double the table\n\t\t}\t\n\t}",
"public void initItems() {\n List<Integer> emptySlots = NimbleServer.enchantmentConfig.getEmptySlots();\n for (int i = 0; i < getSize(); i++) {\n if(!(emptySlots.contains(i))) {\n getInventory().setItem(i, getFiller());\n }\n }\n }",
"public void fillGrid() {\r\n\t\ttimer.startAlgorithm(\"ChronalCharger.fillGrid()\");\r\n\t\t// From top to bottom...\r\n\t\tfor (int i=0; i<powerGrid.length; i++) {\r\n\t\t\t// ...and from left to right...\r\n\t\t\tfor (int j=0; j<powerGrid[0].length; j++) {\r\n\t\t\t\t// ...calculate each cell's power level.\r\n\t\t\t\tpowerGrid[i][j] = calculateCellPower(j, i);\r\n\t\t\t}\r\n\t\t}\r\n\t\ttimer.stopAlgorithm();\r\n\t}",
"private void setAvailableFromLastMove(int large, int smallx) {\n clearAvailable();\n // Make all the tiles at the destination available\n if (large != -1) {\n\n\n for (int i = 0; i < 9; i++) {\n for (int dest = 0; dest < 9; dest++) {\n if (!phaseTwo) {\n if (!done) {\n if (i == large) {\n TileAssignment5 tile = mSmallTiles[large][dest];\n if ((tile.getOwner() == TileAssignment5.Owner.NOTCLICKED))\n addAvailable(tile);\n\n switch (smallx) {\n case 0:\n int a[] = adjacencyList.get(0);\n\n for (int x : a) {\n TileAssignment5 tile1 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n //}\n }\n break;\n case 1:\n int a1[] = adjacencyList.get(1);\n\n for (int x : a1) {\n TileAssignment5 tile2 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n //}\n }\n break;\n case 2:\n int a2[] = adjacencyList.get(2);\n for (int x : a2) {\n TileAssignment5 tile3 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile3)) {\n mAvailable.remove(tile3);\n // }\n }\n break;\n case 3:\n int a3[] = adjacencyList.get(3);\n for (int x : a3) {\n TileAssignment5 tile4 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile4)) {\n mAvailable.remove(tile4);\n // }\n }\n break;\n case 4:\n int a4[] = adjacencyList.get(4);\n for (int x : a4) {\n TileAssignment5 tile5 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile5)) {\n mAvailable.remove(tile5);//}\n\n }\n break;\n case 5:\n int a5[] = adjacencyList.get(5);\n for (int x : a5) {\n TileAssignment5 tile6 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile6)) {\n mAvailable.remove(tile6);//}\n\n }\n break;\n case 6:\n int a6[] = adjacencyList.get(6);\n for (int x : a6) {\n TileAssignment5 tile7 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile7)) {\n mAvailable.remove(tile7);//}\n\n }\n break;\n case 7:\n int a7[] = adjacencyList.get(7);\n for (int x : a7) {\n TileAssignment5 tile8 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile8)) {\n mAvailable.remove(tile8);//}\n\n }\n break;\n case 8:\n int a8[] = adjacencyList.get(8);\n for (int x : a8) {\n TileAssignment5 tile9 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile9)) {\n mAvailable.remove(tile9);//}\n\n }\n break;\n }\n\n } else {\n if (DoneTiles.contains(i)) {\n continue;\n }\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.FREEZED);\n tile.updateDrawableState('a', 0);\n }\n } else { //OnDOnePressed\n if (DoneTiles.contains(i)) {\n continue;\n }\n\n // Log.d(\"Comes \", \"Hereeee\");\n if (i != large) {//Correct answer\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.NOTCLICKED);\n addAvailable(tile);\n tile.updateDrawableState('a', 0);\n //done =false;\n }\n }\n\n\n }else {\n/*\n ileAssignment5 thistile = mSmallTiles[i][dest];\n if(((Button)thistile.getView()).getText().charAt(0)==' '){\n mAvailable.remove(thistile);\n thistile.updateDrawableState('a', 0);\n }\n*/\n\n\n if (i == large) {\n if (dest == smallx) {\n TileAssignment5 tile1 = mSmallTiles[large][dest];\n tile1.setOwner(TileAssignment5.Owner.CLICKED);\n if (mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n }\n tile1.updateDrawableState('a', 0);\n\n } else {\n TileAssignment5 tile2 = mSmallTiles[large][dest];\n if (!(tile2.getOwner() == TileAssignment5.Owner.CLICKED)) {\n\n tile2.setOwner(TileAssignment5.Owner.FREEZED);\n }\n if (mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n }\n tile2.updateDrawableState('a', 0);\n }\n\n\n } else {\n\n\n TileAssignment5 tile3 = mSmallTiles[i][dest];\n if (!(tile3.getOwner() == TileAssignment5.Owner.CLICKED)) {\n tile3.setOwner(TileAssignment5.Owner.NOTCLICKED);\n }\n // if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n\n if ((!mAvailable.contains(tile3))&&(tile3.getView().toString().charAt(0)!=' ')){\n mAvailable.add(tile3);\n }\n\n\n tile3.updateDrawableState('a', 0);\n\n\n\n TileAssignment5 tile = mSmallTiles[i][dest];\n if(((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' '){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }\n\n\n\n\n\n\n\n\n\n /*\n\n\n\n\n\n\n ileAssignment5 tile = mSmallTiles[i][dest];\n ileAssignment5 tile = mSmallTiles[i][dest];\n try{\n if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }}catch (ArrayIndexOutOfBoundsException e){\n\n\n }catch ( StringIndexOutOfBoundsException e){\n\n }\n\n*/\n }\n\n }\n }\n }\n }\n // If there were none available, make all squares available\n if (mAvailable.isEmpty()&&large==-1) {\n setAllAvailable();\n }\n }",
"@Override\r\n\tpublic void reset() {\r\n\t\tairCrafts.clear();\r\n\t}",
"private void plant(int l) {\n if (l >= empties.size()) {\n if (currentMines > bestMines) {\n copyField(current, best);\n bestMines = currentMines;\n }\n //geval 2: we zijn nog niet alle lege vakjes afgegaan, en we kunnen misschien nog beter doen dan de huidige oplossing\n } else if(currentMines + (empties.size() - l) > bestMines ) {\n //recursief verder uitwerken, met eerst de berekening van welk vakje we na (i,j) zullen behandelen\n int i = empties.get(l).getI();\n int j = empties.get(l).getJ();\n\n //probeer een mijn te leggen op positie i,j\n if (canPlace(i,j)) {\n placeMine(i, j);\n currentMines++;\n\n\n //recursie\n plant(l + 1);\n\n //hersteloperatie\n removeMine(i, j);\n currentMines--;\n\n }\n //recursief verder werken zonder mijn op positie i,j\n plant(l +1);\n }\n }",
"public void clear() {\n for (int i = 0; i < if_you_items.length; i++) {\n if_you_items[i].setEnabled(true);\n }\n for (int i = 0; i < then_we_items.length; i++) {\n then_we_items[i].setEnabled(true);\n }\n non_promised_ministries.clear();\n non_promised_ministries.addAll(all_ministries);\n // if not at war, can't ask/offer peace\n if (game.getDiplomacy().getDiplomaticState(game.getTurn(), faction) != C.DS_WAR) {\n if_you_items[IfYouWill.PEACE.ordinal()].setEnabled(false);\n then_we_items[ThenWeWill.PEACE.ordinal()].setEnabled(false);\n }\n if (faction > C.HOUSE5) { // non-house\n non_promised_ministries.clear();\n if_you_items[IfYouWill.TECH.ordinal()].setEnabled(false);\n then_we_items[ThenWeWill.TECH.ordinal()].setEnabled(false);\n if_you_items[IfYouWill.VOTES.ordinal()].setEnabled(false);\n then_we_items[ThenWeWill.VOTES.ordinal()].setEnabled(false);\n return;\n }\n // search for promised votes and ministries in pending contracts of sender\n for (Contract con : game.getDiplomacy().getSentContracts()) {\n for (Term term : con.getTerms()) {\n if (term.getDonor() == game.getTurn()) {\n switch (term.getType()) {\n case VOTES:\n System.out.println(\"DBG no votes\");\n then_we_items[ThenWeWill.VOTES.ordinal()].setEnabled(false);\n break;\n case MINISTRY:\n non_promised_ministries.remove(new Integer(term.getAmount()));\n break;\n case MONEY:\n break;\n case STATE:\n break;\n case TECH:\n break;\n default:\n throw new AssertionError();\n }\n }\n if (term.getDonor() == faction) {\n switch (term.getType()) {\n case VOTES:\n System.out.println(\"DBG no votes\");\n if_you_items[IfYouWill.VOTES.ordinal()].setEnabled(false);\n break;\n case MINISTRY:\n non_promised_ministries.remove(new Integer(term.getAmount()));\n break;\n case MONEY:\n break;\n case STATE:\n break;\n case TECH:\n break;\n default:\n throw new AssertionError();\n }\n }\n }\n }\n // search for promised votes and ministries for sender and for receiver\n // those that are made with sender\n if (game.getRegency().getVotes()[game.getTurn()][Regency.CANDIDATE_IDX] > -1\n || game.getRegency().getVotes()[faction][Regency.CANDIDATE_IDX] == game.getTurn()) {\n then_we_items[ThenWeWill.VOTES.ordinal()].setEnabled(false);\n if_you_items[IfYouWill.VOTES.ordinal()].setEnabled(false);\n }\n int[] promises = game.getDiplomacy().getMinistryPromises(game.getTurn());\n for (int i = 0; i < promises.length; i++) {\n if (promises[i] > -1) {\n non_promised_ministries.remove(new Integer(promises[i]));\n }\n }\n promises = game.getDiplomacy().getMinistryPromises(faction);\n for (int i = 0; i < promises.length; i++) {\n if (promises[i] == game.getTurn()) {\n non_promised_ministries.remove(new Integer(promises[i]));\n }\n }\n if (non_promised_ministries.isEmpty()) {\n then_we_items[ThenWeWill.MINISTRY.ordinal()].setEnabled(false);\n if_you_items[IfYouWill.MINISTRY.ordinal()].setEnabled(false);\n }\n }",
"@Test\n void checkAmmoPowerupResources() {\n ArrayList<Player> array = new ArrayList<>();\n AlphaGame game = new AlphaGame(1, array, false, 5);\n RealPlayer rp = new RealPlayer('b', \"rp\");\n rp.setPlayerPosition(Board.getSpawnpoint('b'));\n array.add(rp);\n char[] cost = new char[3];\n cost[0] = 'b';\n cost[1] = 'r';\n\n assertFalse(rp.checkAmmoPowerupResources(cost));\n\n Powerup p = new Powerup(\"tagback grenade\", 'b', false, false, false, false, null, null, null);\n Powerup p1 = new Powerup(\"tagback grenade\", 'r', false, false, false, false, null, null, null);\n Powerup p2 = new Powerup(\"tagback grenade\", 'y', false, false, false, false, null, null, null);\n rp.getPh().getPowerupDeck().addPowerup(p);\n rp.getPh().getPowerupDeck().addPowerup(p1);\n rp.getPh().getPowerupDeck().addPowerup(p2);\n\n assertTrue(rp.checkAmmoPowerupResources(cost));\n\n cost[0] = 'b';\n cost[1] = 'b';\n\n assertTrue(rp.checkAmmoPowerupResources(cost));\n }",
"@Override\r\n \tprotected void startProcess() {\n \t\tfor(int i = 0; i < inventoryStacks.length - 1; i++) {\r\n \t\t\tif(inventoryStacks[i] != null) {\r\n \t\t\t\tticksToProcess = (int)(TileEntityFurnace.getItemBurnTime(inventoryStacks[i]) * GENERATOR_TO_FURNACE_TICK_RATIO);\r\n \t\t\t\tdecrStackSize(i, 1);\r\n \t\t\t\tburning = true;\r\n \t\t\t}\r\n \t\t}\r\n \t}",
"private void consumeEnergyIfExist() {\n\n\t\tif (newPlayerCell.isHasEnergy()) {\n\t\t\tGame.getPlayer().getExperience().addStars(1);\n\t\t\tnewPlayerCell.setHasEnergy(false);\n\t\t\tnewPlayerCell.setType(RealmCellType.EMPTY);\n\t\t}\n\t}",
"private void reapDeadRabbits() {\n for (int i = (rabbitList.size() - 1); i >= 0; i--) {\n RabbitsGrassSimulationAgent rabbit = rabbitList.get(i);\n if (rabbit.getEnergy() <= 0) {\n space.removeRabbitAt(rabbit.getX(), rabbit.getY());\n rabbitList.remove(i);\n }\n }\n }",
"public void fillGarage() {\n\t\n\t\tfor (int i = 0; i < 10; i++) { // 10 cars\n\t\t\taddVehicle(new Car(\"Silver\", \"Audi\", \"petrol\", 250, 4, 40000));\n\t\t}\n\t\tfor (int i = 0; i < 20; i++) { // 20 motorcycles\n\t\t\taddVehicle(new Motorcycle(\"Red\", \"Suzuki\", \"petrol\", 300, 2, 80000));\n\t\t}\n\t\tfor (int i = 0; i < 3; i++) { // 3 buses \n\t\t\taddVehicle(new Bus(\"White\", \"Volvo\", \"diesel\", 140, 4, 100000));\n\t\t}\n\t\t\n\t}",
"public void updatAttackArmies(){\n\t\t\n\t\tfinal String s = attackToComboBox.getSelectedItem().toString();\n\t\tCountry country = MainPlayScreen.this.game.getBoard().getCountryByName(s);\n\t\t\t\n\t\tfinal int armies = MainPlayScreen.this.game.countryArmies.get(country);\n\t\tSystem.out.println(s + \" Defender Armies: \" + armies);\n\t\t\n\t\tif( armies == 1){\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t}// end of if statement\n\t\t\n\t\telse if( armies == 2){\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t\tnumberOfArmies[5].addItem(2);\n\t\t\t\n\t\t} // end of else if statement\n\t\t\n\t\telse{\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t\tnumberOfArmies[5].addItem(2);\n\t\t\tnumberOfArmies[5].addItem(3);\n\t\t\t\n\t\t}// end of else statement\n\t\tnumberOfArmies[5].repaint();\n\t}",
"public void baptism() {\n for (Card targetCard : Battle.getInstance().getActiveAccount().getActiveCardsOnGround().values()) {\n if (targetCard instanceof Minion) {\n targetCard.setHolyBuff(2, 1);\n }\n }\n }",
"private static Population getBestPossibleParettoOfAGS(){\n int numberOfRounds = 10;\n Population allFrontsMembers = new Population();\n\n NSGAII nsgaii = new NSGAII();\n SPEA2 spea2 = new SPEA2();\n AEMMT aemmt = new AEMMT();\n AEMMD aemmd = new AEMMD();\n MOEAD moead = new MOEAD();\n\n ProblemKnapsackFromFile problem = new ProblemKnapsackFromFile(macPathGetProblemFrom);\n progressBar = new ProgressBar((double) numberOfRounds);\n\n for (int i = 0; i < numberOfRounds; i++) {\n\n Parameters.NUMBER_OF_GENERATIONS = problem.items.size() < 100? 100 : 200;\n\n System.out.println(\"NSGAII\");\n nsgaii.runAlgorithm(problem);\n allFrontsMembers.population.addAll(nsgaii.paretto.membersAtThisFront);\n\n System.out.println(\"SPEA2\");\n spea2.runAlgorithm(problem);\n allFrontsMembers.population.addAll(spea2.paretto.membersAtThisFront);\n\n //moead.runAlgorithm(problem);\n //allFrontsMembers.population.addAll( moead.pareto.membersAtThisFront);\n\n Parameters.NUMBER_OF_GENERATIONS = 15000;\n System.out.println(\"AEMMT\");\n aemmt.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmt.paretto.membersAtThisFront);\n\n System.out.println(\"AEMMD\");\n aemmd.runAlgorithm(problem);\n allFrontsMembers.population.addAll(aemmd.paretto.membersAtThisFront);\n\n progressBar.addJobDone();\n\n allFrontsMembers.fastNonDominatedSort();\n Problem.removeSimilar(allFrontsMembers.fronts.allFronts.get(0),problem);\n allFrontsMembers.population = allFrontsMembers.fronts.allFronts.get(0).membersAtThisFront;\n }\n\n problem.printResolutionMessage();\n //Printer.printBinaryMembers(allFrontsMembers);\n System.out.println(\"ALL FRONTS SIZE: \"+allFrontsMembers.population.size());\n\n return allFrontsMembers;\n }",
"private void reapDeadRabbits() {\n\t\tfor (int i = (rabbitList.size() - 1); i >= 0; i--) {\n\t\t\tRabbitsGrassSimulationAgent rabbit = rabbitList.get(i);\n\t\t\tif (rabbit.getEnergy() < 1) {\n\t\t\t\trabbitSpace.removeRabbitAt(rabbit.getX(), rabbit.getY());\n\t\t\t\trabbitList.remove(i);\n\t\t\t}\n\t\t}\n\t}",
"private void useInventoryByAI() {\n\t\tChampion AI = currentTask.getCurrentChamp();\n\t\tArrayList<Collectible> inventory = ((Wizard)AI).getInventory();\n\t\tif(inventory.size()>0){\n\t\t\tint randomPotion = (int)(Math.random()*inventory.size());\n\t\t\tcurrentTask.usePotion((Potion)inventory.get(randomPotion));\n\t\t}\n\n\t\t\n\t}",
"@Test\n\tpublic void freeCellInitiallyHoldTest() {\n\t\tFreeCell obj = new FreeCell();\n\t\t// Assert homeCell pile1 initially holds 0 cards\n\t\tassertEquals(0, obj.getHomeCellPile(1).getSize());\n\t\t// Assert homeCell pile2 initially holds 0 cards\n\t\tassertEquals(0, obj.getHomeCellPile(2).getSize());\n\t\t// Assert homeCell pile3 initially holds 0 cards\n\t\tassertEquals(0, obj.getHomeCellPile(3).getSize());\n\t\t\n\t}",
"public void resetPlateau(){\n\t\tEnvironnementController.getInstance().initlistHexagons();\n plateau.clear();\n getFreeSlots().clear();\n Hexagon base = new Hexagon(0,0,0,Enums.Color.NON,new DefaultImprovement());\n base.setIrrigated(false);\n plateau.put(makeKey(base), base);\n /*after initialization all neighbours slots of 0,0,0 are free*/\n getFreeSlots().addAll(plateau.get(makeKeyFromCoords(0,0,0)).getNeighbours());\n }",
"public void update() {\r\n\r\n\t\tfor(int p=0;p<200;p++) {\r\n\t\t\tfor(int k=0;k<200;k++) {\r\n\r\n\t\t\t\tif(tileMap[p][k].getBuilding()!=null) {\r\n\t\t\t\t\tBuilding m=tileMap[p][k].getBuilding();\r\n\t\t\t\t\t//update the buildings\r\n\t\t\t\t\ttileMap[p][k].getBuilding().update();\r\n\r\n\t\t\t\t\t//Check if battery is giving off power\r\n\t\t\t\t\tif( (m instanceof LowTierBattery) || (m instanceof LargeBattery) || (m instanceof IndustrialGradeBattery) ) {\r\n\r\n\t\t\t\t\t\t//If it's a Battery\r\n\t\t\t\t\t\tLowTierBattery f =(LowTierBattery) tileMap[p][k].getBuilding();\t\r\n\r\n\t\t\t\t\t\t//Check if its getting power and charging\r\n\t\t\t\t\t\tif(checkPowerLine(p,k,3)) {\r\n\t\t\t\t\t\t\tpowerSwitcher(p,k,2,true); //If it is then give off power\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tpowerSwitcher(p,k,2,f.getCapacity()>0); ///if it isnt then only give power if there is capacity\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//If a building is generating power add power to tiles;\r\n\t\t\t\t\t}else if( (m instanceof SteamEngine) || (m instanceof HandCrankGenerator) || (m instanceof SteamTurbine) || (m instanceof WindTurbine) ) {\r\n\r\n\t\t\t\t\t\tpowerSwitcher(p,k,3,((PoweredBuilding) m).getPower()); //Adds power or remove power based on the status of the generators\r\n\r\n\t\t\t\t\t\t//Powerline only get power from other powerline or buildings\r\n\t\t\t\t\t}else if(m instanceof PowerLine) {\r\n\r\n\t\t\t\t\t\tpowerSwitcher(p,k,5,checkPowerLine(p,k,5)); //Checks if the powerline is powered by other buildings then give it to powerSwitch method\r\n\r\n\t\t\t\t\t}else if(m instanceof LargePowerLine) {\r\n\t\t\t\t\t\tpowerSwitcher(p,k,10,checkPowerLine(p,k,10)); //Checks if the powerline is powered by other buildings then give it to powerSwitch method\r\n\r\n\t\t\t\t\t\t//If its just a powered building enable it if the tile under it is powered;\r\n\t\t\t\t\t}else if((m instanceof PoweredBuilding)) {\r\n\t\t\t\t\t\t((PoweredBuilding) tileMap[p][k].getBuilding()).setPower(tileMap[p][k].getPowered());\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t//Pipe movement\r\n\t\t\t\t\tif(m instanceof Pipe ) {\r\n\t\t\t\t\t\tpipeCheck(p,k,m);\r\n\t\t\t\t\t}else if(m.getOutputInventorySize()>0) {\r\n\t\t\t\t\t\tbuildingPipeCheck(p,k,m);\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void re_GiveMaterials() {\n\t\tString buildingType = gc.getBuildingType();\n\t\t// wood, brick, grain, wool, ore\n\t\tString[] materialCodes = {\"h\", \"b\", \"g\", \"w\", \"e\"};\n\t\tint[] materials = new int[AMOUNT_OF_MATERIALS];\n\n\t\tswitch (buildingType) {\n\n\t\tcase VILLAGE_TYPE:\n\t\t\tmaterials = VILLAGE_ARRAY;\n\t\t\tbreak;\n\n\t\tcase CITY_TYPE:\n\t\t\tmaterials = CITY_ARRAY;\n\t\t\tbreak;\n\t\t\t\n\t\tcase STREET_TYPE:\n\t\t\tmaterials = STREET_ARRAY;\n\t\t\tbreak;\n\t\t}\n\t\t// Check if player is not in first round\n\t\tif(!pTM.inFirstRound(gameID)) {\n\t\t\tbbm.returnMaterials(materialCodes, materials);\n\t\t\t\n\t\t\t//Reset build value\n\t\t\tgc.placeBuilding(\"\");\n\t\t}\n\t\t\n\t\t\n\t\t\n\n\n\t}",
"private void fillBoard() {\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\tboard[i] = ' ';\n\t\t}\n\t\tfor (int i = 0; i < isFree.length; i++) {\n\t\t\tisFree[i] = true;\n\t\t}\n\t}",
"public void fillBasket(_essentialGift[] esGifts, _utilityGift[] uGifts, _luxuryGift[] lGifts) {\r\n \r\n this.gbasket = new _giftBasket();\r\n esGifts = _staticFunctions.sortByCost(esGifts);\r\n uGifts = _staticFunctions.sortByCost(uGifts);\r\n lGifts = _staticFunctions.sortByCost(lGifts);\r\n \r\n int grlBudget = 0;\r\n \r\n switch(this.grlType){\r\n case \"The Chosy\":\r\n grlBudget = this.chGrlfrnd.Budget;\r\n break;\r\n case \"The Normal\":\r\n grlBudget = this.nGrlfrnd.Budget;\r\n break;\r\n case \"The Desperate\":\r\n grlBudget = this.dsGrlfrnd.Budget;\r\n break;\r\n }\r\n \r\n double prc = 0;\r\n int esIdx = 0;\r\n int uIdx = 0;\r\n int lIdx = 0;\r\n int eItIdx = 0;\r\n int uItIdx = 0;\r\n int lItIdx = 0;\r\n \r\n \r\n while(prc < grlBudget && (esIdx < _staticFunctions.length(esGifts) || uIdx < _staticFunctions.length(uGifts))){\r\n if((esIdx < _staticFunctions.length(esGifts) && uIdx >= _staticFunctions.length(uGifts))||\r\n (esIdx < _staticFunctions.length(esGifts) && uIdx < _staticFunctions.length(uGifts) && esGifts[esIdx].price/esGifts[esIdx].value < uGifts[uIdx].price/uGifts[uIdx].value)){\r\n this.gbasket.eItems[eItIdx] = esGifts[esIdx];\r\n prc += esGifts[esIdx].price;\r\n eItIdx++;\r\n esIdx++;\r\n }\r\n \r\n else if(uIdx < _staticFunctions.length(uGifts)){\r\n this.gbasket.uItems[uItIdx] = uGifts[uIdx];\r\n prc += uGifts[uIdx].price;\r\n uItIdx++;\r\n uIdx++;\r\n }\r\n \r\n }\r\n\r\n while(lIdx < _staticFunctions.length(lGifts) && prc < grlBudget){\r\n this.gbasket.lItems[lItIdx] = lGifts[lIdx];\r\n prc += lGifts[lIdx].price;\r\n lIdx++;\r\n lItIdx++;\r\n } \r\n \r\n if(lItIdx == 0 && ( lGifts[0].price <= (this.Budget - prc) ) ){\r\n this.gbasket.lItems[lItIdx] = lGifts[0]; \r\n }\r\n \r\n }",
"public void act()\n\t{\n\t\tif(getFirstDriver().isAtPump())\n\t\t{\n\t\t\tif(!getFirstDriver().isDoneRefilling())\n\t\t\t{\n\t\t\t\tgetFirstDriver().act(priceOfFuel);\n\t\t\t}\n\t\t}\n\t\telse if(getFirstDriver().isDone())\n\t\t{\n\t\t\tremoveDriver();\n\t\t}\n\t}",
"public void repeat() {\n\t\t// TODO: Implement\n\t\t//System.out.println(\"size remainingBeans: \" + remainingBeans.size());\n\t\t//System.out.println(\"getallbeans: \" + this.getSumOfSlotCount());\n\t\t//System.out.println(\"size of inflight: \" + inFlightBeans.size());\n\n\t\tfor (int i = 0; i < this.getSlotCount(); i++) {\n\t\t\tif (slotBean.isEmpty())\n\t\t\t\tbreak;\n\t\t\tfor(int k=0; k < slotBean.get(i).size(); k++)\n\t\t\t{\n\t\t\t\tif(slotBean.get(i).get(k) != null)\n\t\t\t\t\tthis.remainingBeans.add(slotBean.get(i).get(k));\n\t\t\t}\n\t\t\t//this.remainingBeans\n\t\t\t\t\t//.addAll(this.slotBean.get(i).stream().filter(x -> x != null).collect(Collectors.toList()));\n\t\t\tif(this.inFlightBeans.get(i) != null)\n\t\t\t\tthis.remainingBeans.add(this.inFlightBeans.get(i));\n\t\t}\n\t\tinFlightBeans.clear();\t\t\n\t\tthis.slotBean.clear();\n\t\tfor(int i=0; i < getSlotCount(); i++)\n\t\t{\n\t\t\tArrayList<Bean> e = new ArrayList<>();\n\t\t\tslotBean.add(e);\n\t\t\tinFlightBeans.add(null);\n\t\t}\n\t\tinsertBean();\n\t\tif(inFlightBeans.get(0) != null) inFlightBeans.get(0).reset();\n\t}",
"void fill()\n\t{\n\t\tif(!mySeq.isEmpty())\n\t\t{\t\n\t\t\tPair temp = mySeq.removeFirst();\t\t\n\t\t\tthis.nextPos = temp.getSecond();\n\t\t\tthis.myTurn = temp.getFirst();\n\t\t}\n\t}",
"public Fortress(int waterCapacityInitial, Vector2 position) {\r\n\t\tthis.position =position;\r\n\t\tthis.waterCapacity = waterCapacityInitial; \r\n\t\tthis.waterLevel = 0;\r\n\t\tthis.level = 1;\r\n\t\tthis.pumpSpeed = 1; \r\n\t\t//this.weapon = new Weapon();\r\n\t}",
"private void endFight(int i, int round) {\n\t\tcalcAndApplyDebrisfield();\t\n\t\tif(i == 0) { // Vicory for att\n\t\t\tdef_pb = getPb(defPlanetId);\n\t\t\tresDiff();\n\t\t\t\n\t\t\tint cargoSpace = getCargoSpace();\n\t\t\tlong maxMetal = (long)(def_pg.getMetal()/2);\n\t\t\tlong maxCrystal = (long)(def_pg.getCrystal()/2);\n\t\t\tlong maxDeut = (long)(def_pg.getDeut()/2);\n\t\t\tif((maxMetal+maxCrystal+maxDeut) <= cargoSpace) {\n\t\t\t\tbooty[0] = maxMetal;\n\t\t\t\tbooty[1] = maxCrystal;\n\t\t\t\tbooty[2] = maxDeut;\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlong min = Math.min(maxMetal, Math.min(maxCrystal, maxDeut));\n\t\t\t\tif(min*3 <= cargoSpace) {\n\t\t\t\t\tbooty[0] = min;\n\t\t\t\t\tbooty[1] = min;\n\t\t\t\t\tbooty[2] = min;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tbooty[0] = cargoSpace/3;\n\t\t\t\t\tbooty[1] = cargoSpace/3;\n\t\t\t\t\tbooty[2] = cargoSpace/3;\n\t\t\t\t}\n\t\t\t\twhile((booty[0]+booty[1]+booty[2])<cargoSpace) {\n\t\t\t\t\tbooty[0] = booty[0] < maxMetal ? ++booty[0] : booty[0];\n\t\t\t\t\tbooty[1] = booty[1] < maxCrystal ? ++booty[1] : booty[1];\n\t\t\t\t\tbooty[2] = booty[2] < maxDeut ? ++booty[2] : booty[2];\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\tdef_pg.setMetal(def_pg.getMetal()-booty[0]);\n\t\t\tdef_pg.setCrystal(def_pg.getCrystal()-booty[1]);\n\t\t\tdef_pg.setDeut(def_pg.getDeut()-booty[2]);\n\t\t\t\n\t\t\twriteLog(true,true);\n\t\t\twriteLog(false,false);\n\t\t}\n\t\telse if(i == 1) { // Victory for def\n\t\t\twriteLog(false,true);\n\t\t\twriteLog(true,false);\n\t\t}\n\t\telse {// Draw\n\t\t\twriteLog(false,true);\n\t\t\twriteLog(false,false);\n\t\t}\n\t\trepairDef();\n\t\tapplyBattleResults();\t\t\n\t\tsaveDefDataset();\n\t}",
"@Override\n public void reset() {\n Material[] materials = sortBlockValues();\n for(int y = getMinY(); y <= getMaxY(); y++){\n for(int z = getMinZ(); z <= getMaxZ(); z++){\n for(int x = getMinX(); x <= getMaxX(); x++){\n for(Material mat : materials){\n int percent = blockValues.get(mat);\n if(random.nextInt(100) + 1 <= percent){\n final int xf = x;\n final int yf = y;\n final int zf = z;\n Bukkit.getScheduler().scheduleSyncDelayedTask(QuadPrison.getInstance(), ()->\n getWorld().getBlockAt(xf,yf,zf).setType(mat)\n );\n }\n }\n }\n }\n }\n for(Player player : Bukkit.getOnlinePlayers()){\n if(isInsideRegion(player.getLocation())) {\n Location loc = player.getLocation();\n loc.setY(getMaxY() + 1);\n player.teleport(loc);\n player.sendMessage(ChatColor.AQUA + \"The mine reset! You were teleported to the top!\");\n }\n }\n }",
"public void merge() {\n\t\tfor(int i = 1;i<crystalQuantity.length;i++) {\n\t\t\tif (crystalQuantity[i] >= 2) { \n\t\t\t\tcrystalQuantity[i] -= 2; // remove two of the current tier\n\t\t\t\tcrystalQuantity[i+1] += 1; // add one of the new tier\n\t\t\t}\n\t\t}\n\t\tfor(int i = 1;i<dustQuantity.length;i++) {\n\t\t\tif (dustQuantity[i] >= 2) { \n\t\t\t\tdustQuantity[i] -= 2; // remove two of the current tier\n\t\t\t\tcrystalQuantity[i+1] += 1; // add one of the new tier\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tif(!automerge) {\n\t\t\tcollection();\n\t\t}\n\t\t\n\t}",
"public static void populate() throws IOException, Exception {\n\n EntityManager em = emf.createEntityManager();\n facade.fillingUpDBWithEquipments(facade.getEquipmentDTOsFromAPI(jsonReader));\n Player player1 = new Player(\"Nikolaj\", \"Hamster16\");\n Player DM = new Player(\"Cathrine\", \"Portraet11\");\n Player player2 = new Player(\"Jens\", \"Skeletor69\");\n AbillityScores abiSco11 = new AbillityScores(18, 8, 14, 12, 14, 10);\n AbillityScores abiSco12 = new AbillityScores(18, 8, 14, 12, 14, 10);\n AbillityScores abiSco13 = new AbillityScores(18, 8, 14, 12, 14, 10);\n Random randi = new Random(0);\n Skills skils1 = new Skills(randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5));\n Skills skils2 = new Skills(randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5));\n Skills skils3 = new Skills(randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5), randi.nextInt(5));\n Character ch1 = new Character(5, 150, 85, 10, 30, \"Damascus\", \"He was a valiant paladin.\", \"orc\", \"paladin\", abiSco11, skils1);\n Character ch2 = new Character(5, 104, 85, 17, 60, \"Heidi\", \"He was a valiant druid.\", \"human\", \"druid\", abiSco12, skils2);\n Character ch3 = new Character(5, 160, 85, 17, 30, \"Varanoth\", \"He was a valiant fighter.\", \"orc\", \"fighter\", abiSco13, skils3);\n Equipment e1 = em.find(Equipment.class, \"club\");\n Equipment e2 = em.find(Equipment.class, \"candle\");\n Equipment e3 = em.find(Equipment.class, \"camel\");\n Equipment e4 = em.find(Equipment.class, \"bucket\");\n ch1.addInventory(new Inventory(e1, 1));\n ch2.addInventory(new Inventory(e2, 1));\n ch2.addInventory(new Inventory(e3, 1));\n ch3.addInventory(new Inventory(e4, 1));\n e1.addInventory(ch1.getInventories().get(0));\n e2.addInventory(ch2.getInventories().get(0));\n e3.addInventory(ch2.getInventories().get(1));\n e4.addInventory(ch3.getInventories().get(0));\n //ch1.getInventory().addEquipmentAndQty(equipment, 1);\n try {\n em.getTransaction().begin();\n Role playerRole = new Role(\"player\");\n Role DMRole = new Role(\"dungeonmaster\");\n player1.addRole(playerRole);\n DM.addRole(DMRole);\n player2.addRole(playerRole);\n //both.addRole(DMRole); // MAN KAN GODT HAVE BEGGE ROLLER CATHRINE !!!\n em.persist(playerRole);\n em.persist(DMRole);\n //em.persist(equipment);\n player1.addCharacter(ch1);\n player1.addCharacter(ch2);\n player2.addCharacter(ch3);\n //em.persist(ch1);\n em.persist(player1);\n em.persist(DM);\n em.persist(player2);\n em.getTransaction().commit();\n System.out.println(\"\");\n } finally {\n em.close();\n }\n }",
"public void fullyHeal() {\n removeStatus();\n getActualMoves().restoreAllPP();\n healHealthFraction(1);\n }",
"public void startOrder() {\n\t\tDeck tempDeck = new Deck();\n\t\tArrayList<Player> highPlayerList = new ArrayList<Player>();\n\t\tStrategy3 testPlayer = new Strategy3();\n\t\tint temp = 0;\n\t\tfor (Player p : this.playerList) {\n\t\t\ttemp++;\n\t\t\tp.hand.add(tempDeck.dealTile());\n\t\t}\n\t\t\n\t\twhile (playerList.isEmpty() == false) {\t\n\t\t\tPlayer min = playerList.get(0);\n\t\t\tfor(Player i : playerList) {\n\t\t\t\tif (i.getHandValue() > min.getHandValue()) {min = i;}\n\t\t\t}\n\t\t\thighPlayerList.add(min);\n\t\t\tplayerList.remove(min);\n\t\t}\n\t\tthis.playerList = highPlayerList;\t\n\t\ttemp = 0; \n\t\tfor(Player p : this.playerList) {\n\t\t\ttemp++;\n\t\t}\n\t\t\n\t\tfor (Player p : playerList) {\n\t\t\tp.hand.clear();\n\t\t}\t\t\n\t}",
"private void fillData() {\n timer = null;\n timer2 = null;\n timer = new Timer();\n timer2 = new Timer();\n\n ActivityManager.MemoryInfo mi = new ActivityManager.MemoryInfo();\n ActivityManager activityManager = (ActivityManager) getActivity().getSystemService(ACTIVITY_SERVICE);\n activityManager.getMemoryInfo(mi);\n double availableMegs = mi.availMem / 0x100000L;\n double percentAvail = mi.availMem / (double)mi.totalMem * 100.0;\n\n\n// long l = AppUtil.getAvailMemory(mContext);\n// long y = AppUtil.getTotalMemory(mContext);\n// final double x = (((y - l) / (double) y) * 100);\n// // arcProcess.setProgress((int) x);\n final double x = 100 - percentAvail;\n arcProcess.setProgress(0);\n timer.schedule(new TimerTask() {\n @Override\n public void run() {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n\n if (arcProcess.getProgress() >= (int) x) {\n timer.cancel();\n } else {\n arcProcess.setProgress(arcProcess.getProgress() + 1);\n }\n\n }\n });\n }\n }, 50, 20);\n\n SDCardInfo mSDCardInfo = StorageUtil.getSDCardInfo();\n SDCardInfo mSystemInfo = StorageUtil.getSystemSpaceInfo(mContext);\n\n long nAvailaBlock;\n long TotalBlocks;\n if (mSDCardInfo != null) {\n nAvailaBlock = mSDCardInfo.free + mSystemInfo.free;\n TotalBlocks = mSDCardInfo.total + mSystemInfo.total;\n } else {\n nAvailaBlock = mSystemInfo.free;\n TotalBlocks = mSystemInfo.total;\n }\n\n final double percentStore = (((TotalBlocks - nAvailaBlock) / (double) TotalBlocks) * 100);\n\n capacity.setText(StorageUtil.convertStorage(TotalBlocks - nAvailaBlock) + \"/\" + StorageUtil.convertStorage(TotalBlocks));\n arcStore.setProgress(0);\n\n timer2.schedule(new TimerTask() {\n @Override\n public void run() {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n\n if (arcStore.getProgress() >= (int) percentStore) {\n timer2.cancel();\n } else {\n arcStore.setProgress(arcStore.getProgress() + 1);\n }\n\n }\n });\n }\n }, 50, 20);\n\n\n }",
"public void breakApart(final Asteroids asteroids)\n {\n Double2D location = asteroids.field.getObjectLocation(this);\n int[] sizes = breakMap[size][asteroids.random.nextInt(breakMap[size].length)];\n \n if (sizes.length > 0)\n {\n // break into asteroids\n int sum = 0;\n for(int i = 0; i < sizes.length; i++)\n sum += sizes[i];\n \n // compute velocities\n double explosionForce = asteroids.random.nextDouble() * (MAXIMUM_EXPLOSION_FORCE - MINIMUM_EXPLOSION_FORCE) + MINIMUM_EXPLOSION_FORCE;\n double sumForceX = 0;\n double sumForceY = 0;\n for(int i = 0; i < sizes.length; i++)\n {\n double angle = asteroids.random.nextDouble() * Math.PI * 2;\n double force = explosionForce / sizes.length;\n double forceX = force * Math.cos(angle);\n double forceY = force * Math.sin(angle);\n if (i == sizes.length - 1)\n { forceX = -sumForceX; forceY = -sumForceY; } // last one ought to balance out the others. It's best if it's the biggest one, hence why we list smaller asteroids first\n else { sumForceX += forceX; sumForceY += forceY; }\n // yes, this is a dead store\n Asteroid a = new Asteroid(asteroids, sizes[i], new MutableDouble2D(velocity.x + forceX, velocity.y + forceY), location);\n }\n }\n else\n {\n breakIntoShards(asteroids);\n }\n end(asteroids);\n asteroids.asteroidCount--;\n if (asteroids.asteroidCount <= 0)\n {\n asteroids.schedule.scheduleOnceIn(asteroids.WAIT_PERIOD, new Steppable()\n {\n public void step(SimState state)\n {\n asteroids.createAsteroids();\n }\n });\n }\n }",
"public void reproduce() {\n if (getSelfCount() >= getMinMates() && getLocation()\n .getEmptyCount() >= getMinEmpty()\n && getFoodCount() >= getMinFood() && dayCountDown != 0) {\n int index = RandomGenerator.nextNumber(getLocation()\n .getEmptyCount());\n Cell selectedCell = getLocation().getEmptyArray().get(index);\n createLife(selectedCell).init();\n \n }\n \n }",
"public void clear() {\n\t\tallItems.clear();\n\t\tminimums.clear();\n\t}",
"private void fillMas() { //the method created\r\n\r\n for (int i = 0; i < mas.length; i++) {\r\n mas[i] = (int) (Math.random() * 100); //massive filled with random numbers\r\n System.out.print(mas[i] + \" \"); //massive elements printed\r\n }\r\n System.out.print(\"- this is unsorted massive\");\r\n }",
"public void bake() {\n baked = true;\n\n this.registerItemsEffective();\n\n // Remove capability constructors for capabilities that are not initialized.\n removeNullCapabilities(capabilityConstructorsTile, capabilityConstructorsTileSuper, null);\n removeNullCapabilities(capabilityConstructorsEntity, capabilityConstructorsEntitySuper, null);\n removeNullCapabilities(capabilityConstructorsItem, capabilityConstructorsItemSuper, capabilityConstructorsItemInstance);\n\n // Bake all collections\n capabilityConstructorsTileSuper = ImmutableList.copyOf(capabilityConstructorsTileSuper);\n capabilityConstructorsEntitySuper = ImmutableList.copyOf(capabilityConstructorsEntitySuper);\n capabilityConstructorsItemSuper = ImmutableList.copyOf(capabilityConstructorsItemSuper);\n\n }",
"public void GiveBackAp(String faction)\r\n/* 273: */ {\r\n/* 274:308 */ for (AgentModel model : this.agentModels.values()) {\r\n/* 275:310 */ if (model.getFaction().equals(faction)) {\r\n/* 276:312 */ model.setAp(model.getMaxAP());\r\n/* 277: */ }\r\n/* 278: */ }\r\n/* 279: */ }",
"@Test\n void grab() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n Square s = new Square(0, 4, false, true, false, true, false, 'b');\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(s);\n p.getPh().getPowerupDeck().getPowerups().clear();\n p.setTurn(true);\n AmmoTile a = new AmmoTile();\n PowerupDeck pud = new PowerupDeck();\n int[] cubes = new int[3];\n cubes[0] = 2;\n cubes[2] = 1;\n char[] c1 = {'b', 'b', 'b'};\n char[] c2 = {'r', 'r', 'r'};\n char[] c3 = {'y', 'y', 'y'};\n p.getPb().payAmmo(c1);\n p.getPb().payAmmo(c2);\n p.getPb().payAmmo(c3);\n a.setCubes(cubes);\n a.setPowerup(false);\n s.setAmmo(a);\n try{\n p.grab(p.getPlayerPosition(), pud);\n }catch (WrongSquareException e){}\n }",
"public void fillPlayerQueue() {\r\n for (Player p : this.players) {\r\n if (p.getLife() > 0) {\r\n this.ordering.add(p);\r\n }\r\n }\r\n }",
"@Test\n void checkPowerupResources() {\n ArrayList<Player> array = new ArrayList<>();\n AlphaGame game = new AlphaGame(1, array, false, 5);\n RealPlayer rp = new RealPlayer('b', \"rp\");\n rp.setPlayerPosition(Board.getSpawnpoint('b'));\n array.add(rp);\n char[] cost = new char[3];\n cost[0] = 'b';\n cost[1] = 'r';\n Powerup p = new Powerup(\"tagback grenade\", 'b', false, false, false, false, null, null, null);\n Powerup p1 = new Powerup(\"tagback grenade\", 'r', false, false, false, false, null, null, null);\n Powerup p2 = new Powerup(\"tagback grenade\", 'y', false, false, false, false, null, null, null);\n rp.getPh().getPowerupDeck().addPowerup(p);\n rp.getPh().getPowerupDeck().addPowerup(p1);\n rp.getPh().getPowerupDeck().addPowerup(p2);\n\n assertTrue(rp.checkAmmoResources(cost));\n\n cost[0] = 'b';\n cost[1] = 'b';\n\n assertFalse(rp.checkAmmoResources(cost));\n\n }",
"private void loadStartingInventory(){\n this.shelfList = floor.getShelf();\n Iterator<String> i = items.iterator();\n for (Shelf s : shelfList){\n while (s.hasFreeSpace()){\n s.addItem(i.next(), 1);\n }\n }\n }",
"private void actualizarEnemigosItems() {\n if(estadoMapa== EstadoMapa.RURAL || estadoMapa== EstadoMapa.RURALURBANO ){\n moverCamionetas();\n moverAves();\n }\n if(estadoMapa== EstadoMapa.URBANO || estadoMapa == EstadoMapa.URBANOUNIVERSIDAD){\n moverCarroLujo();\n moverAves();\n }\n if(estadoMapa== EstadoMapa.UNIVERSIDAD){\n moverCarritoGolf();\n moverAves();\n }\n if (estadoMapa == EstadoMapa.SALONES){\n moverLamparas();\n moverSillas();\n }\n actualizaPuntuacion();\n moverTareas();\n moverItemCorazon();\n verificarColisiones();\n verificarMuerte();\n moverItemRayo();\n /*\n IMPLEMENTAR\n\n //moverPajaro();\n //etc\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 }",
"@Override\n public void fill(ArrayList<Package> warehousePackages) {\n int diffCounter = 0;\n int checkOnce = -1;\n boolean checkTwice = false;\n boolean sameI = false;\n int overWeight = 0;\n while (!isFull() && (warehousePackages.size() - overWeight) > 0) {\n for (int i = 0; i < warehousePackages.size(); i++) {\n sameI = false;\n int destination = warehousePackages.get(i).getDestination().getZipCode();\n int difference = Math.abs(destination - this.getZipDest());\n if (difference <= diffCounter + 10 && difference >= diffCounter) {\n if (!(warehousePackages.get(i).getWeight() +\n getCurrentWeight() > getMaxWeight())) {\n addPackage(warehousePackages.get(i));\n setCurrentWeight(getCurrentWeight() + warehousePackages.get(i).getWeight());\n warehousePackages.remove(i);\n sameI = true;\n break;\n } else {\n overWeight += 1;\n }\n }\n }\n if (!sameI) {\n diffCounter += 10;\n }\n }\n\n\n }",
"public void startAi(int num){\n int times = num;\n int test = 0;\n while(test < times){\n\n if (currentRoom.containsEnemy())\n {\n int eHealth = currentRoom.getEnemyHealth();\n int pHealth = player.getHealth();\n int pAD = player.getAttackDamage();\n int eAD = currentRoom.getEnemyDamage();\n ai.fightMath(eHealth, pHealth, pAD, eAD);\n player.setHealthExact(ai.getHealth());\n if (player.getHealth() > 0)\n {\n currentRoom.removeEnemy();\n System.out.println(\"\\n\" + \"AI defeated an enemy. Current health: \" + player.getHealth() + \"\\n\");\n }\n else{\n times = 0;\n }\n\n }\n \n else if(currentRoom.equals(prison))\n {\n ai.scheduleCommand(\"go\", \"up\", null);\n processCommand(command); \n test++;\n }\n\n else if(currentRoom.equals(promenade)){\n currentRoom = promenade;\n player.setRoom(currentRoom);\n ai.scheduleCommand(\"take\", \"wood\", \"sword\");\n processCommand(command);\n ai.scheduleCommand(\"take\", \"rope\", null);\n processCommand(command);\n ai.scheduleCommand(\"go\", \"up\", \"sword\"); \n processCommand(command);\n test++; \n } \n \n else if(currentRoom.equals(ossuary)){\n currentRoom = ossuary;\n player.setRoom(currentRoom);\n ai.scheduleCommand(\"open\", \"chest\", null);\n processCommand(command);\n ai.scheduleCommand(\"drop\", \"wood\", \"sword\");\n player.dropWeapon(command);\n ai.scheduleCommand(\"take\", \"silver\", \"sword\");\n processCommand(command);\n ai.scheduleCommand(\"take\", \"potion\", null);\n processCommand(command); \n ai.scheduleCommand(\"go\", \"straight\", null);\n processCommand(command);\n test++;\n\n }\n else if(currentRoom.equals(crypt))\n {\n currentRoom = crypt;\n player.setRoom(currentRoom);\n ai.scheduleCommand(\"take\", \"shovel\", null);\n processCommand(command); \n ai.scheduleCommand(\"go\", \"up\", null);\n processCommand(command);\n test++;\n }\n else if(currentRoom.equals(graveyard))\n {\n currentRoom = graveyard;\n player.setRoom(currentRoom);\n ai.scheduleCommand(\"go\", \"right\", null);\n processCommand(command);\n test++;\n }\n else if(currentRoom.equals(forest))\n {\n currentRoom = forest;\n player.setRoom(currentRoom);\n ai.runRope(player.getInventory());\n processCommand(command);\n ai.setCommand(\"go\", \"up\", null);\n processCommand(command);\n ai.potionCheck(player.getHealth());\n processCommand(command);\n test++;\n\n\n }\n \n else if(currentRoom.equals(tower))\n {\n currentRoom = tower;\n player.setRoom(currentRoom);\n ai.setCommand(\"take\", \"potion\", null);\n processCommand(command);\n ai.potionCheck(player.getHealth());\n processCommand(command);\n ai.setCommand(\"go\", \"straight\", null);\n processCommand(command);\n }\n else if(currentRoom.equals(ramparts))\n {\n currentRoom = ramparts;\n player.setRoom(currentRoom);\n ai.potionCheck(player.getHealth());\n processCommand(command);\n ai.setCommand(\"go\", \"straight\", null);\n processCommand(command);\n\n\n }\n else if(currentRoom.equals(castle))\n {\n currentRoom = castle;\n player.setRoom(currentRoom);\n ai.potionCheck(player.getHealth());\n processCommand(command);\n ai.setCommand(\"open\", \"chest\", null);\n processCommand(command);\n ai.setCommand(\"take\", \"potion\", null);\n processCommand(command);\n \n\n\n }\n\n else if(currentRoom.equals(throne))\n {\n currentRoom = throne;\n player.setRoom(currentRoom);\n ai.potionCheck(player.getHealth());\n processCommand(command);\n }\n\n else if(currentRoom.equals(sewers))\n {\n currentRoom = sewers;\n player.setRoom(currentRoom);\n ai.potionCheck(player.getHealth());\n processCommand(command);\n ai.setCommand(\"go\", \"down\", null);\n processCommand(command);\n\n }\n else if(currentRoom.equals(depths))\n {\n currentRoom = depths;\n player.setRoom(currentRoom);\n ai.setCommand(\"go\", \"right\", null);\n processCommand(command);\n }\n else if(currentRoom.equals(crypt))\n {\n currentRoom = crypt;\n player.setRoom(currentRoom);\n ai.setCommand(\"go\", \"up\", null);\n processCommand(command);\n\n }\n else if(currentRoom.equals(graveyard))\n {\n currentRoom = graveyard;\n player.setRoom(currentRoom);\n ai.setCommand(\"go\", \"straight\", null);\n processCommand(command);\n }\n else if(currentRoom.equals(bridge))\n {\n currentRoom = bridge;\n player.setRoom(currentRoom);\n ai.setCommand(\"go\", \"up\", null);\n processCommand(command);\n }\n\n \n } \n }",
"public Battery(double initialCapacity) {\r\n capacity = initialCapacity;\r\n originalCapacity = initialCapacity;\r\n }",
"public void fill() {\n throw null;\n }",
"public void Restock() {\n for (Ingredient ingredient : stock.keySet()) {\n stock.put(ingredient, inventoryMax);\n }\n }",
"public void preInit() {\n \tfor(int i=1;i<ItemAmmo.AMMO_TYPES.length;i++){\n \t\tif(i!=10 && i !=12){\n \t\tModelLoader.setCustomModelResourceLocation(TF2weapons.itemAmmo, i, new ModelResourceLocation(TF2weapons.MOD_ID+\":ammo_\"+ItemAmmo.AMMO_TYPES[i], \"inventory\"));\n \t\t}\n \t}\n \t\n \t//ModelLoader.registerItemVariants(TF2weapons.itemTF2, new ModelResourceLocation(TF2weapons.MOD_ID+\":copper_ingot\", \"inventory\"),new ModelResourceLocation(TF2weapons.MOD_ID+\":lead_ingot\", \"inventory\"));\n \tModelLoader.setCustomModelResourceLocation(TF2weapons.itemAmmoFire, 0, new ModelResourceLocation(TF2weapons.MOD_ID+\":ammo_fire\", \"inventory\"));\n \tModelLoader.setCustomModelResourceLocation(TF2weapons.itemChocolate, 0, new ModelResourceLocation(TF2weapons.MOD_ID+\":chocolate\", \"inventory\"));\n \tModelLoader.setCustomModelResourceLocation(TF2weapons.itemHorn, 0, new ModelResourceLocation(TF2weapons.MOD_ID+\":horn\", \"inventory\"));\n \tModelLoader.setCustomModelResourceLocation(TF2weapons.itemMantreads, 0, new ModelResourceLocation(TF2weapons.MOD_ID+\":mantreads\", \"inventory\"));\n \tModelLoader.setCustomModelResourceLocation(TF2weapons.itemScoutBoots, 0, new ModelResourceLocation(TF2weapons.MOD_ID+\":scout_shoes\", \"inventory\"));\n \tModelLoader.setCustomModelResourceLocation(TF2weapons.itemAmmoMedigun, 0, new ModelResourceLocation(TF2weapons.MOD_ID+\":ammo_medigun\", \"inventory\"));\n \tModelLoader.setCustomModelResourceLocation(TF2weapons.itemTF2, 0, new ModelResourceLocation(TF2weapons.MOD_ID+\":copper_ingot\", \"inventory\"));\n \tModelLoader.setCustomModelResourceLocation(TF2weapons.itemTF2, 1, new ModelResourceLocation(TF2weapons.MOD_ID+\":lead_ingot\", \"inventory\"));\n \tModelLoader.setCustomModelResourceLocation(TF2weapons.itemTF2, 2, new ModelResourceLocation(TF2weapons.MOD_ID+\":australium_ingot\", \"inventory\"));\n \tModelLoader.setCustomModelResourceLocation(TF2weapons.itemTF2, 3, new ModelResourceLocation(TF2weapons.MOD_ID+\":scrap_metal\", \"inventory\"));\n \tModelLoader.setCustomModelResourceLocation(TF2weapons.itemTF2, 4, new ModelResourceLocation(TF2weapons.MOD_ID+\":reclaimed_metal\", \"inventory\"));\n \tModelLoader.setCustomModelResourceLocation(TF2weapons.itemTF2, 5, new ModelResourceLocation(TF2weapons.MOD_ID+\":refined_metal\", \"inventory\"));\n \tModelLoader.setCustomModelResourceLocation(TF2weapons.itemTF2, 6, new ModelResourceLocation(TF2weapons.MOD_ID+\":australium_nugget\", \"inventory\"));\n \tModelLoader.setCustomModelResourceLocation(TF2weapons.itemTF2, 7, new ModelResourceLocation(TF2weapons.MOD_ID+\":key\", \"inventory\"));\n \tModelLoader.setCustomModelResourceLocation(TF2weapons.itemTF2, 8, new ModelResourceLocation(TF2weapons.MOD_ID+\":crate\", \"inventory\"));\n \tModelLoader.setCustomModelResourceLocation(TF2weapons.itemTF2, 9, new ModelResourceLocation(TF2weapons.MOD_ID+\":random_weapon\", \"inventory\"));\n \tModelLoader.setCustomModelResourceLocation(TF2weapons.itemTF2, 10, new ModelResourceLocation(TF2weapons.MOD_ID+\":random_hat\", \"inventory\"));\n \t\n \tRenderingRegistry.registerEntityRenderingHandler(EntityTF2Character.class, new IRenderFactory<EntityTF2Character>(){\n\t\t\t@Override\n\t\t\tpublic Render<EntityTF2Character> createRenderFor(RenderManager manager) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn new RenderTF2Character(manager);\n\t\t\t}\n \t});\n \t/*RenderingRegistry.registerEntityRenderingHandler(EntityProjectileBase.class, new IRenderFactory<Entity>(){\n\t\t\t@Override\n\t\t\tpublic Render<Entity> createRenderFor(RenderManager manager) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn new RenderEntity(manager);\n\t\t\t}\n \t});*/\n \tRenderingRegistry.registerEntityRenderingHandler(EntityRocket.class, new IRenderFactory<EntityRocket>(){\n\t\t\t@Override\n\t\t\tpublic Render<EntityRocket> createRenderFor(RenderManager manager) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn new RenderRocket(manager);\n\t\t\t}\n \t});\n \t/*RenderingRegistry.registerEntityRenderingHandler(EntityFlame.class, new IRenderFactory<EntityFlame>(){\n\t\t\t@Override\n\t\t\tpublic Render<EntityFlame> createRenderFor(RenderManager manager) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn (Render<EntityFlame>) new RenderEntity();\n\t\t\t}\n \t});*/\n \tRenderingRegistry.registerEntityRenderingHandler(EntityGrenade.class, new IRenderFactory<EntityGrenade>(){\n\t\t\t@Override\n\t\t\tpublic Render<EntityGrenade> createRenderFor(RenderManager manager) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn new RenderGrenade(manager);\n\t\t\t}\n \t});\n \tRenderingRegistry.registerEntityRenderingHandler(EntityStickybomb.class, new IRenderFactory<EntityStickybomb>(){\n\t\t\t@Override\n\t\t\tpublic Render<EntityStickybomb> createRenderFor(RenderManager manager) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn new RenderStickybomb(manager);\n\t\t\t}\n \t});\n \tRenderingRegistry.registerEntityRenderingHandler(EntitySyringe.class, new IRenderFactory<EntitySyringe>(){\n\t\t\t@Override\n\t\t\tpublic Render<EntitySyringe> createRenderFor(RenderManager manager) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn new RenderSyringe(manager);\n\t\t\t}\n \t});\n \tRenderingRegistry.registerEntityRenderingHandler(EntityBall.class, new IRenderFactory<EntityBall>(){\n\t\t\t@Override\n\t\t\tpublic Render<EntityBall> createRenderFor(RenderManager manager) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn new RenderBall(manager);\n\t\t\t}\n \t});\n \tRenderingRegistry.registerEntityRenderingHandler(EntityFlare.class, new IRenderFactory<EntityFlare>(){\n\t\t\t@Override\n\t\t\tpublic Render<EntityFlare> createRenderFor(RenderManager manager) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn new RenderFlare(manager);\n\t\t\t}\n \t});\n \tRenderingRegistry.registerEntityRenderingHandler(EntityJar.class, new IRenderFactory<EntityJar>(){\n\t\t\t@Override\n\t\t\tpublic Render<EntityJar> createRenderFor(RenderManager manager) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn new RenderJar(manager);\n\t\t\t}\n \t});\n \tRenderingRegistry.registerEntityRenderingHandler(EntitySentry.class, new IRenderFactory<EntitySentry>(){\n\t\t\t@Override\n\t\t\tpublic Render<EntitySentry> createRenderFor(RenderManager manager) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn new RenderSentry(manager);\n\t\t\t}\n \t});\n \tRenderingRegistry.registerEntityRenderingHandler(EntityDispenser.class, new IRenderFactory<EntityDispenser>(){\n\t\t\t@Override\n\t\t\tpublic Render<EntityDispenser> createRenderFor(RenderManager manager) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn new RenderDispenser(manager);\n\t\t\t}\n \t});\n \tRenderingRegistry.registerEntityRenderingHandler(EntityTeleporter.class, new IRenderFactory<EntityTeleporter>(){\n\t\t\t@Override\n\t\t\tpublic Render<EntityTeleporter> createRenderFor(RenderManager manager) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn new RenderTeleporter(manager);\n\t\t\t}\n \t});\n \tRenderingRegistry.registerEntityRenderingHandler(EntityStatue.class, new IRenderFactory<EntityStatue>(){\n\t\t\t@Override\n\t\t\tpublic Render<EntityStatue> createRenderFor(RenderManager manager) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn new RenderStatue(manager);\n\t\t\t}\n \t});\n \tRenderingRegistry.registerEntityRenderingHandler(EntitySaxtonHale.class, new IRenderFactory<EntitySaxtonHale>(){\n\t\t\t@Override\n\t\t\tpublic Render<EntitySaxtonHale> createRenderFor(RenderManager manager) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\treturn new RenderBiped<EntitySaxtonHale>(manager, new ModelBiped(), 0.5F, 1.0F){\n\t\t\t\t\tprivate final ResourceLocation TEXTURE=new ResourceLocation(TF2weapons.MOD_ID,\"textures/entity/tf2/SaxtonHale.png\");\n\t\t\t\t\tprotected ResourceLocation getEntityTexture(EntitySaxtonHale entity)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn TEXTURE;\n\t\t\t\t }\n\t\t\t\t};\n\t\t\t}\n \t});\n\t}",
"@Test\n\tpublic void landingPreventedWhenFull() throws Exception {\n\t\tException e = new Exception();\n\n\t\ttry {\n\t\t\theathrow.landing(tap);\n\t\t\theathrow.landing(ba);\n\t\t} catch (Exception exception) {\n\t\t\te = exception;\n\t\t}\n\n\t\tassertEquals(\"Airport is full\", e.getMessage());\n\n\t\tassertEquals(heathrow.capacity, heathrow.hangar.size());\n\t\tassertEquals(1, heathrow.hangar.size());\n\t\tassertEquals(-1, heathrow.hangar.indexOf(ba));\n\t}",
"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}",
"public void resetgamestate() {\n \tthis.gold = STARTING_GOLD;\n \tthis.crew = STARTING_FOOD;\n \tthis.points = 0;\n \tthis.masterVolume = 0.1f;\n this.soundVolume = 0.5f;\n this.musicVolume = 0.5f;\n \n this.ComputerScience = new Department(COMP_SCI_WEPS.getWeaponList(), COMP_SCI_UPGRADES.getRoomUpgradeList(), this);\n this.LawAndManagement = new Department(LMB_WEPS.getWeaponList(), LMB_UPGRADES.getRoomUpgradeList(), this);\n this.Physics = new Department(PHYS_WEPS.getWeaponList(), PHYS_UPGRADES.getRoomUpgradeList(), this);\n \n this.playerShip = STARTER_SHIP.getShip();\n this.playerShip.setBaseHullHP(700);\n this.playerShip.repairHull(700);\n this.combatPlayer = new CombatPlayer(playerShip);\n }",
"@Override\n @Test\n public void equipTest() {\n Axe axes;\n Sword sword;\n Staff staff;\n Spear spear;\n Luz luz;\n Oscuridad oscuridad;\n Anima anima;\n Bow bow;\n axes = new Axe(\"Axe\", 20, 1, 2);\n sword = new Sword(\"Sword\", 20, 1, 2);\n spear = new Spear(\"Spear\", 20, 1, 2);\n staff = new Staff(\"Staff\", 20, 1, 2);\n bow = new Bow(\"Bow\", 20, 2, 3);\n anima = new Anima(\"Anima\", 20, 1, 2);\n luz = new Luz(\"Luz\", 20, 1, 2);\n oscuridad = new Oscuridad(\"Oscuridad\", 20, 1, 2);\n sorcererAnima.addItem(axes);\n sorcererAnima.equipItem(axes);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(axes);\n sorcererAnima.addItem(sword);\n sorcererAnima.equipItem(sword);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(sword);\n sorcererAnima.addItem(spear);\n sorcererAnima.equipItem(spear);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(spear);\n sorcererAnima.addItem(staff);\n sorcererAnima.equipItem(staff);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(staff);\n sorcererAnima.addItem(bow);\n sorcererAnima.equipItem(bow);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(bow);}",
"@Override\n public void llenardeposito(){\n this.setCombustible(getTankfuel());\n }",
"private void functionalInterface1() {\n\t\tcharmander.heal();\n\n\t\tPokedex.printData(Arrays.asList(charmander));\n\n\t\tguilherme.powerUp(charmander, new BigDecimal(\"-10\"), psMinimalDamage); // -10\n\n\t\tPokedex.printData(Arrays.asList(charmander));\n\n\t\tguilherme.powerUp(charmander, new BigDecimal(\"-10\"), psHugeDamage); // -20\n\n\t\tPokedex.printData(Arrays.asList(charmander));\n\t}",
"public void fillHeuristicData(){\n int[] temp;\n initHeuristic();\n for(int i = 0; i< variableLength; i++){\n temp=variables.clone();\n temp[i]=0;\n validateClauses(i,temp);\n temp[i]=1;\n validateClauses(i,temp);\n }\n }",
"private void updateEnergyToShip(Toroidal2DPhysics space) {\n\t\tList<Beacon> finishedEnergy = new ArrayList<Beacon>();\n\t\tShip ship;\n\t\tBeacon beacon;\n\n\t\tfor (UUID beaconID : energyToShip.keySet()) {\n\t\t\tbeacon = (Beacon) space.getObjectById(beaconID);\n\t\t\tship = (Ship) space.getObjectById(energyToShip.get(beaconID).getId());\n\t\t\tif (beacon == null || !(beacon.isAlive()) || ship.getEnergy() > WorldKnowledge.ENERGY_THRESHOLD || !(ship.isAlive())\n\t\t\t\t\t|| (shipToNavigator.get(ship.getId()).getGoalObjectUUID() == null && !(beaconID.equals(shipToNavigator.\n\t\t\t\t\t\t\tget(ship.getId()).getGoalObjectUUID())))) {\n\t\t\t\tfinishedEnergy.add(beacon);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (Beacon beaconElement : finishedEnergy) { // Delete beacon from map\n\t\t\tif(energyToShip.containsKey(beaconElement.getId()))\n\t\t\t\tenergyToShip.remove(beaconElement.getId());\n\t\t}\n\t}",
"@BeforeEach\n public void setup() throws Exception {\n String[] cidades = {\"Aveiro\",\"Madrid\",\"Porto\",\"Lille\",\"Barcelona\",\"Roma\"};\n for (String city : cidades)\n cidadesdisponiveis.add(city);\n\n\n miss = 5;\n hit = 10;\n\n\n HashMap<String,HashMap<String,Float>> dados = new HashMap<>();\n\n HashMap<String,Float> co = new HashMap<>();\n HashMap<String,Float> pm25 = new HashMap<>();\n\n co.put(\"v\", (float) 2.0);\n pm25.put(\"v\", (float) 17.4);\n\n dados.put(\"co\",co);\n dados.put(\"pm25\",pm25);\n\n Dados info = new Dados(20,dados);\n\n\n long timestamp = new Timestamp(System.currentTimeMillis()).getTime();\n\n\n airquality = new AirQuality(\"ok\",info,timestamp);\n\n //Mockito\n Mockito.when(cache.getCitiesAvailable()).thenReturn(cidadesdisponiveis);\n Mockito.when(cache.getHitAndMiss()).thenReturn(hit+miss);\n\n for(int i=0;i<cidadesdisponiveis.size();i++){\n Mockito.when(cache.isValid(cidadesdisponiveis.get(i))).thenReturn(true);\n Mockito.when(cache.getAirQualityByCity(cidadesdisponiveis.get(i))).thenReturn(airquality);\n }\n\n Mockito.when(cache.getAirQualityByCity(\"Vigo\")).thenReturn(null);\n Mockito.when(cache.isValid(\"Esgueira\")).thenReturn(false);\n\n }",
"public void upgradeCapacity()\r\n\t{\r\n\t\tcapacity++;\r\n\t}",
"void FlowMaintain() {\n newFlowCap[0] = Integer.MAX_VALUE; // initial value\n\n // check the smallest in the edgesInPath, if edgesInPath is empty ==> new flow is INF\n for (Edge<E> edge : edgesInPath) {\n if (edge.getCapability() < newFlowCap[0]) {\n newFlowCap[0] = edge.getCapability();\n }\n }\n }",
"public void fillBoard() {\n List<Integer> fifteen = ArrayUtils.intArrayToList(SOLVED_BOARD);\n Collections.shuffle(fifteen, this.random);\n this.emptyTileIndex = fifteen.indexOf(0);\n this.matrix = fifteen.stream().mapToInt(i -> i).toArray();\n }",
"private void optimiseWaterHeatProfileWithSpreading()\n\t{\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"== OptimiseWaterHeatProfile for a \" + this.owner.getAgentID() + \" ==\");\n\t\t}\n\n\t\tdouble[] baseArray = ArrayUtils.multiply(this.hotWaterVolumeDemandProfile, Consts.WATER_SPECIFIC_HEAT_CAPACITY\n\t\t\t\t/ Consts.KWH_TO_JOULE_CONVERSION_FACTOR * (this.owner.waterSetPoint - ArrayUtils.min(Consts.MONTHLY_MAINS_WATER_TEMP))\n\t\t\t\t/ Consts.DOMESTIC_HEAT_PUMP_WATER_COP);\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"hotWaterVolumeDemandProfile: \" + Arrays.toString(this.hotWaterVolumeDemandProfile));\n\t\t}\n\n\t\tthis.waterHeatDemandProfile = Arrays.copyOf(baseArray, baseArray.length);\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"waterHeatDemandProfile: \" + Arrays.toString(this.waterHeatDemandProfile));\n\t\t}\n\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"spreadWaterDemand(baseArray) : \" + Arrays.toString(this.spreadWaterDemand(baseArray)));\n\t\t}\n\n\t\tdouble[] totalHeatDemand = ArrayUtils.add(this.heatPumpDemandProfile, this.spreadWaterDemand(baseArray));\n\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"totalHeatDemand: \" + Arrays.toString(totalHeatDemand));\n\t\t}\n\n\t\tdouble currCost = this.evaluateCost(totalHeatDemand);\n\t\tdouble[] tempArray = Arrays.copyOf(baseArray, baseArray.length);\n\n\t\tfor (int i = 0; i < baseArray.length; i++)\n\t\t{\n\t\t\tif (baseArray[i] > 0)\n\t\t\t{\n\t\t\t\tdouble extraHeatRequired = 0;\n\t\t\t\tfor (int j = i - 1; j >= 0; j--)\n\t\t\t\t{\n\t\t\t\t\t//TODO - this needs a better (exponential) model, temp loss per second should be improved.\n\t\t\t\t\textraHeatRequired += (Consts.WATER_TEMP_LOSS_PER_SECOND * ((double) Consts.SECONDS_PER_DAY / this.ticksPerDay))\n\t\t\t\t\t\t\t* this.hotWaterVolumeDemandProfile[i]\n\t\t\t\t\t\t\t* (Consts.WATER_SPECIFIC_HEAT_CAPACITY / Consts.KWH_TO_JOULE_CONVERSION_FACTOR)\n\t\t\t\t\t\t\t/ Consts.DOMESTIC_HEAT_PUMP_WATER_COP;\n\t\t\t\t\ttempArray[j] += baseArray[i] + extraHeatRequired;\n\t\t\t\t\ttempArray[j + 1] = 0;\n\t\t\t\t\ttotalHeatDemand = ArrayUtils.add(this.heatPumpDemandProfile, this.spreadWaterDemand(tempArray));\n\t\t\t\t\tdouble newCost = this.evaluateCost(totalHeatDemand);\n\t\t\t\t\tif (newCost < currCost)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.waterHeatDemandProfile = ArrayUtils.add(totalHeatDemand, ArrayUtils.negate(this.heatPumpDemandProfile));\n\t\t\t\t\t\tcurrCost = newCost;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void addAmmo (double amount) {\n\t\t\n\t\tcurrentAmmo = Math.min(maxAmmo, currentAmmo + amount);\n\t}",
"public void takeItemsFromChest() {\r\n currentRoom = player.getCurrentRoom();\r\n for (int i = 0; i < currentRoom.getChest().size(); i++) {\r\n player.addToInventory(currentRoom.getChest().get(i));\r\n currentRoom.getChest().remove(i);\r\n }\r\n\r\n }",
"public void act()\n {\n // if (claimer ==null){\n // this.setClaim(false);\n //}\n if(claimer == null){\n setClaim(false);\n }\n if (energy>0){\n \n removeEnergy(decayRate);\n\n }\n else {\n // getWorld().removeObject(this);\n\n }\n \n //check the energy decay\n //change size and weight\n //\n }",
"public int fill(ForgeDirection from, FluidStack resource, boolean doFill)\n {\n \tVirtualSmartTank tank = getOrCreateTankForFluid(resource);\n \tint filled = tank.fill(resource, doFill);\n \treturn filled;\n }"
]
| [
"0.62392795",
"0.6041887",
"0.58210933",
"0.57940066",
"0.57619786",
"0.5756513",
"0.57374203",
"0.5652437",
"0.5621497",
"0.55936635",
"0.5569342",
"0.5561314",
"0.55017006",
"0.5445579",
"0.54400086",
"0.5438644",
"0.53940654",
"0.5387988",
"0.5385591",
"0.5355717",
"0.53406703",
"0.5332876",
"0.5274705",
"0.5273724",
"0.52702236",
"0.52660125",
"0.5258817",
"0.52486247",
"0.5230156",
"0.52222735",
"0.52058995",
"0.5202025",
"0.52017426",
"0.5200196",
"0.51942945",
"0.51942295",
"0.5178417",
"0.51738054",
"0.51727176",
"0.51323336",
"0.5125812",
"0.5118123",
"0.51171887",
"0.5111206",
"0.50878334",
"0.50853616",
"0.50808716",
"0.5079321",
"0.50744647",
"0.50466067",
"0.5038413",
"0.50316495",
"0.5029696",
"0.5025113",
"0.5021285",
"0.5011724",
"0.500977",
"0.50090957",
"0.50038034",
"0.4999615",
"0.4993263",
"0.4985197",
"0.4981433",
"0.49810636",
"0.49787477",
"0.4978509",
"0.4976124",
"0.49725506",
"0.49721813",
"0.49604598",
"0.49566174",
"0.49559143",
"0.4955053",
"0.49503556",
"0.4946196",
"0.49390566",
"0.49220362",
"0.49176925",
"0.49150944",
"0.49141693",
"0.48990914",
"0.488598",
"0.48846945",
"0.48794204",
"0.48793513",
"0.48771784",
"0.4876257",
"0.48746955",
"0.48718223",
"0.48676065",
"0.48661172",
"0.48599455",
"0.48406002",
"0.48291758",
"0.48242736",
"0.48230055",
"0.48211998",
"0.48209527",
"0.48156333",
"0.4812384"
]
| 0.83887476 | 0 |
fight It should take another carrier as a reference parameter and fire all the ammo from the aircrafts to it, then subtract all the damage from its health points | public void fight(Carrier enemyCarrier) {
for (Jet jet : this.aircrafts) {
enemyCarrier.setHealth(enemyCarrier.getHealth() - jet.fight());
if (enemyCarrier.getHealth() <= 0) {
enemyCarrier.setHealth(0);
break;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void fire(WarParticipant target, WarParticipant attacker, int noOfShooters);",
"public int fight(HW10Monster a, HW10Monster b,HW10Trainer a1,HW10Trainer b1 )\n\t{\n\t\t\n\t\tif(a.type.equals(\"earth\") && b.type.equals(\"fire\"))//determines which case the pokemon will have a stronger or weaker type attack power\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage + (.30*a.damage));//sets the first trainers pokemon attack to be extra strong against the seconds trainer pokemon\n\t\t\t\tb.damage=(int)(b.damage - (.30*b.damage));\n\t\t\t}\n\t\telse if(a.type.equals(\"earth\") && b.type.equals(\"water\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage - (.30*a.damage));\n\t\t\t\tb.damage=(int)(b.damage + (.30*b.damage));\n\t\t\t}\n\t\telse if(a.type.equals(\"water\") && b.type.equals(\"earth\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage + (a.damage*.30));\n\t\t\t\tb.damage=(int)(b.damage - (b.damage*.30));\n\t\t\t}\n\t\telse if(a.type.equals(\"water\") && b.type.equals(\"fire\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage - (a.damage*.30));\n\t\t\t\tb.damage=(int)(b.damage + (b.damage*.30));\n\t\t\t}\n\t\telse if(a.type.equals(\"fire\") && b.type.equals(\"earth\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage - (a.damage*.30));\n\t\t\t\tb.damage=(int)(b.damage + (b.damage*.30));\n\t\t\t}\n\t\telse if(a.type.equals(\"fire\") && b.type.equals(\"water\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage + (a.damage*.30));\n\t\t\t\tb.damage=(int)(b.damage - (b.damage*.30));\n\t\t\t}\n\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\twhile(a.hp>0 && b.hp>0)//while both pokemon are still above zero continue to take away hp\n\t\t\t{\n\t\t\t\ta.hp=a.hp - b.damage;\n\t\t\t\tb.hp=b.hp - a.damage;\n\t\t\n\t\t\t\n\t\t\t if(a.hp<1 && b.hp<1)//if pokemon are below 1 \n\t\t\t \t{\n\t\t\n\t\t\t\treturn 3;\n\t\t\t\t}\n\t\t\telse if(a.hp>1 && b.hp<1) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t else if (a.hp<1 && b.hp>1)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\treturn 2;\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t}\n\t\n\t\t\treturn 5;\n\t}",
"public void fight() {\n\t\tif(roamingAstronauts <= 0 || roamingAliens <= 0){\n\t\t\tSystem.out.println(\"Error: Need at least 1 astronaut & alien to fight.\");\n\t\t\treturn;\n\t\t}\n\t\tAstronaut a = getRandomAstronaut();\n\t\ta.damage();\n\t\tSystem.out.println(\"The astronaut fought the alien & the alien won.\\nAstronaut takes 1 point of damage.\");\n\t}",
"public void fight();",
"void defendAttack(IUnit attacker, int incomingDamage);",
"public void incrementAttack(Fighter f1, Fighter f2)\r\n {\r\n if(f1.getAttacking() == 1) //if the fighter is attacking\r\n {\r\n if(f1.getAttackT() == 5) //if 5 frames have passed\r\n {\r\n int[] i = new int[4]; \r\n i = attackHitBox(f1); //gets the x,y, height, and width of the attack\r\n \r\n //if the attack position overlapps the other fighter's position and the other fighter isn't blocking\r\n if (i[0] <= f2.getPos()[0] + f2.getSize() && i[0] + i[2] >= f2.getPos()[0] && i[1] <= f2.getPos()[1] + f2.getSize() && i[1] + i[3] >= f2.getPos()[1] && f2.getBlocking() != 1)\r\n {\r\n f2.setHealth(f2.getHealth() - f1.getAttack().getDamage()); //deal damage to the fighter\r\n if(f1.getRight() == true){ \r\n f2.setKnockBackVel(f1.getAttack().getKnockBack()[0],f1.getAttack().getKnockBack()[1]); //apply knockback going right\r\n }else\r\n {\r\n f2.setKnockBackVel(-f1.getAttack().getKnockBack()[0],f1.getAttack().getKnockBack()[1]); //apply knockback going left\r\n }\r\n }\r\n f1.setAttackT(0); //reset attack timer\r\n f1.setAttacking(2); //sets the fighter to cooldown\r\n }else\r\n {\r\n f1.setAttackT(f1.getAttackT() + 1); //increments timer\r\n }\r\n }\r\n\r\n if(f1.getAttacking() == 2) //if fighter is in cooldown\r\n {\r\n if(f1.getAttackT() == f1.getAttack().getTime()) //if the timer has waited the cooldown of the last attack\r\n {\r\n f1.setAttackT(0); //resets the timer\r\n f1.setAttacking(0); //sets the fighter to \"can attack\"\r\n }\r\n else\r\n {\r\n f1.setAttackT(f1.getAttackT() + 1); //increment timer\r\n }\r\n }\r\n }",
"public void damage(Hero other) {\n this.weapon.knockBack(other, this.state, this.dir);\n }",
"public void fire() {\n\t\t// Has player waited cooldown before trying to fire again?\n\t\tif (System.currentTimeMillis() - this.lastFired > Config.WEAPON_COOLDOWN_TIME * 1000) {\n\t\t\t\n\t\t\t// Can this airship drop bombs?\n\t\t\tif (this.properties.FIRES_TNT) {\n\t\t\t\tBlock[] cannons = getCannons();\n\t\t\t\tint numfiredcannons = 0;\n\t\t\t\tfor (int i = 0; i < cannons.length; i++) {\n\t\t\t\t\tif (cannons[i] != null && cannonHasTnt(cannons[i], Config.NUM_TNT_TO_FIRE_NORMAL)) {\n\t\t\t\t\t\tdouble dist = 0.4;\n\t\t\t\t\t\tBlockFace face = ((Directional) cannons[i].getState().getData()).getFacing();\n\t\t\t\t\t\tint x = face.getModX();\n\t\t\t\t\t\tint z = face.getModZ();\n\t\t\t\t\t\tdist *= getCannonLength(cannons[i], -x, -z);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (cannons[i].getRelative(x, 0, z).getType().equals(Material.AIR)) {\n\t\t\t\t\t\t\tif (numfiredcannons < this.properties.MAX_NUMBER_OF_CANNONS) {\n\t\t\t\t\t\t\t\tnumfiredcannons++;\n\t\t\t\t\t\t\t\tlastFired = System.currentTimeMillis();\n\t\t\t\t\t\t\t\twithdrawTnt(cannons[i], Config.NUM_TNT_TO_FIRE_NORMAL);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// Spawn primed tnt firing in the direction of the dispenser TODO: maybe add sound effects for tnt firing? :P\n\t\t\t\t\t\t\t\tTNTPrimed tnt = cannons[i].getWorld().spawn(cannons[i].getLocation().clone().add(x, 0, z), TNTPrimed.class);\n\t\t\t\t\t\t\t\ttnt.setVelocity(new Vector(x * dist, 0.5, z * dist));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// More cannons on ship than allowed. Not all fired - can break out of loop now.\n\t\t\t\t\t\t\t\tplayer.sendMessage(ChatColor.AQUA + \"Some cannons did not fire. Max cannon limit is \" + ChatColor.GOLD + this.properties.MAX_NUMBER_OF_CANNONS);\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}\n\t\t\t} else\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + this.properties.SHIP_TYPE + \" CANNOT FIRE TNT\");\n\t\t} else\n\t\t\tplayer.sendMessage(ChatColor.GOLD + \"COOLING DOWN FOR \" + ChatColor.AQUA + (int)(Math.round(6 - (System.currentTimeMillis() - this.lastFired) / 1000)) + ChatColor.GOLD + \" MORE SECONDS\");\n\t}",
"public double castFireball(){\n this.mana -= fireball.manaCost;\n return fireball.hit();\n }",
"public void fight(UpdateHealthData data) {\n\t\tgetGameMap().fight(data);\n\t}",
"@Override\r\n\tpublic int monsterFight(IFighter attacker, IFighter defencer, ISkill skill) {\n\t\t\r\n\t\tSkillTemplatePojo stPojo = skill.getSkillTemplatePojo();\r\n\t\tfor (SkillUnitPojo hurtPojo : stPojo.getSkillUnitPojo()) {\r\n\t\t\tBattleHurtUpdateResponse.Builder hurtBuilder = createBattleHurtUpdateResponse();\r\n\t\t\thurtBuilder.setAttackerId(attacker.getId());\r\n\t\t\thurtBuilder.setAttackerType(PbAoiEntityType.valueOf(attacker.getType()));\r\n\t\t\thurtBuilder.setSkillUnitId(hurtPojo.getId());\r\n\t\t\thurtBuilder.setSkillId(stPojo.getId());\r\n\t\t\t\r\n\t\t\t// 选 择目标\r\n\t\t\tList<IFighter> targetList = fightAoe.selectTarget(attacker, defencer, hurtPojo, stPojo);\r\n\t\t\tif (targetList.size() <= 0) {\r\n\t\t\t\ttargetList.add(defencer);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor (IFighter attacted : targetList) {\r\n\t\t\t\tif (!attacted.isDie()) {\r\n\t\t\t\t\tfight(attacted, attacker, hurtPojo, hurtBuilder);\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\tif (hurtPojo.getAttakerMove() > 0) {\r\n\t\t\t\tPosition3D hitback = fightCalculate.calHitMove(attacker, hurtPojo.getAttakerMove(), defencer);\r\n\t\t\t\tif (hitback != null) {\r\n\t\t\t\t\tattacker.setX(hitback.getX());\r\n\t\t\t\t\tattacker.setY(hitback.getY());\r\n\t\t\t\t\tattacker.setZ(hitback.getZ());\r\n\t\t\t\t\tSystem.err.println(attacker.getName() + \"战斗::\" + hitback.getX() + \":::\" + hitback.getZ());\r\n\t\t\t\t\t\r\n\t\t\t\t\tPbPosition3D pbPos = PbPosition3D.newBuilder().setX(hitback.getX()).setY(hitback.getY()).setZ(hitback.getZ()).build();\r\n\t\t\t\t\thurtBuilder.setAttackerMovePos(pbPos);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.sendHurtMsg(hurtBuilder.build(), attacker);\r\n\t\t\tthis.sendUpdateHp(targetList);\r\n\t\t\t\r\n\t\t\t// System.err.println(\"当前打斗时间::\"+(System.currentTimeMillis() - fighTime));\r\n\t\t\tfighTime = System.currentTimeMillis();\r\n\t\t}\r\n\t\treturn 0;\r\n\t}",
"public void act()\n\t{\n\t\tif(getFirstDriver().isAtPump())\n\t\t{\n\t\t\tif(!getFirstDriver().isDoneRefilling())\n\t\t\t{\n\t\t\t\tgetFirstDriver().act(priceOfFuel);\n\t\t\t}\n\t\t}\n\t\telse if(getFirstDriver().isDone())\n\t\t{\n\t\t\tremoveDriver();\n\t\t}\n\t}",
"@Test\n void doEffectheatseeker() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"heatseeker\");\n Weapon w4 = new Weapon(\"heatseeker\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.addWeapon(w4);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w4);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w4.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(10));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n try{\n p.getPh().getWeaponDeck().getWeapon(w4.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3);\n }",
"void evadeAttack(IUnit attacker, int incomingDamage);",
"public void fight(String enemy)\n\t{\n\t\tScanner kbAlpha = new Scanner(System.in);\n\t\t\n\t\tString strInput;\t\t\t\t\t\t//player input\n\t\tchar cAttack;\t\t\t\t\t\t\t//player input attack button\n\t\trandom = new Random();\n\t\t\n\t\tcAttack = 'x';\n\t\t\n\t\tif (strEquippedWeapon.equals(\"Dagger\"))\n\t\t{\n\t\t\tthis.iMaxDmg = 5; \t\t\t\t\t//exclusive\n\t\t\tthis.iMinDmg = 2;\t\t\t\t\t//inclusive\n\t\t}\n\t\telse if (strEquippedWeapon.equals(\"Steampunk 4-Barrel Pistol\"))\n\t\t{\n\t\t\tthis.iMaxDmg = 8; \t\t\t\t\t//exclusive\n\t\t\tthis.iMinDmg = 3;\t\t\t\t\t//inclusive\t\t\t\n\t\t}\n\t\telse if (strEquippedWeapon.equals(\"Steampunk Mach. II Riflesword\"))\n\t\t{\n\t\t\tthis.iMaxDmg = 16; \t\t\t\t\t//exclusive\n\t\t\tthis.iMinDmg = 6;\t\t\t\t\t//inclusive\n\t\t}\n\t\t\n\t\tif (enemy.equals(\"alien1\"))\n\t\t{\n\t\t\tthis.iAlienHP = 15;\n\t\t\tthis.iAlienMaxDmg = 3;\t\t\t\t//exclusive\n\t\t\tthis.iAlienMinDmg = 1;\t\t\t\t//inclusive\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if (this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.inventory.add(\"Steampunk 4-Barrel Pistol\");\n\t\t\t\t\tsetEquippedWeapon(\"Steampunk 4-Barrel Pistol\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \", but you have killed\"\n\t\t\t\t\t\t+ \" the alien!\\nThe alien dropped his \" +\n\t\t\t\t\t\t\"weapon! You pick it up an examine it. It looks like\\nit is a \" +\n\t\t\t\t\t\t\"Steampunk 4-Barrel Pistol. This might be a better option than \" +\n\t\t\t\t\t\t\"the\\n\" + getEquippedWeapon() + \". You equip it.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you have killed\"\n\t\t\t\t\t\t\t+ \" the alien!\\nThe alien dropped his \" +\n\t\t\t\t\t\t\t\"weapon! You pick it up an examine it. It looks like\\nit is a \" +\n\t\t\t\t\t\t\t\"Steampunk 4-Barrel Pistol. This might be a better option than \" +\n\t\t\t\t\t\t\t\"the\\n\" + getEquippedWeapon() + \". You equip it.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"alien2\"))\n\t\t{\n\t\t\tthis.iAlienHP = 18;\n\t\t\tthis.iAlienMaxDmg = 5;\t\t\t\t//exclusive\n\t\t\tthis.iAlienMinDmg = 1;\t\t\t\t//inclusive\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.iHP += 10;\n\t\t\t\t\tthis.inventory.add(\"Manhole Cover Shield\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damge, but you \" +\n\t\t\t\t\t\t\"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. \" +\n\t\t\t\t\t\t\"Fantastic!\\nSearching the alien's corpse, you find a Manhole Cover\"\n\t\t\t\t\t\t+ \" Shield! This will\\nprotect you from some damage.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \"\n\t\t\t\t\t\t\t+ \"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. \" +\n\t\t\t\t\t\t\t\"Fantastic!\\nSearching the alien's corpse, you find a Manhole Cover\"\n\t\t\t\t\t\t\t+ \" Shield! This will\\nprotect you from some damage.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"alien3\"))\n\t\t{\n\t\t\tif (evaluateInventory(\"Manhole Cover Shield\"))\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 22;\n\t\t\t\tthis.iAlienMaxDmg = 7;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 2;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 22;\n\t\t\t\tthis.iAlienMaxDmg = 9;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 3;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.iHP += 15;\n\t\t\t\t\tthis.inventory.add(\"Edison Grenade\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \" +\n\t\t\t\t\t\t\"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t+ \"you find a health pack that increases your health by 15. The \"\n\t\t\t\t\t\t+ \"alien also\\ndropped an Edison Grenade! It looks like a bulb but \"\n\t\t\t\t\t\t+ \"probably does more\\nthan light up a room!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \" +\n\t\t\t\t\t\t\t\"killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t\t+ \"you find a health pack that increases your health by 15. The \"\n\t\t\t\t\t\t\t+ \"alien also\\ndropped an Edison Grenade! It looks like a bulb but \"\n\t\t\t\t\t\t\t+ \"probably does more\\nthan light up a room!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"alien4\"))\n\t\t{\n\t\t\tif(evaluateInventory(\"Manhole Cover Shield\"))\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 18;\n\t\t\t\tthis.iAlienMaxDmg = 6;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 1;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 18;\n\t\t\t\tthis.iAlienMaxDmg = 8;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 2;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.iHP += 10;\n\t\t\t\t\tthis.inventory.add(\"Steampunk Mach. II Riflesword\");\n\t\t\t\t\tsetEquippedWeapon(\"Steampunk Mach. II Riflesword\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you\"\n\t\t\t\t\t\t+ \" killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. The \"\n\t\t\t\t\t\t+ \"alien also\\ndropped a Steampunk Mach. II Riflesword! This weapon\"\n\t\t\t\t\t\t+ \" looks quite menacing.\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you\"\n\t\t\t\t\t\t\t+ \" killed the alien! Looking around on the floor,\\n\"\n\t\t\t\t\t\t\t+ \"you find a health pack that increases your health by 10. The \"\n\t\t\t\t\t\t\t+ \"alien also\\ndropped a Steampunk Mach. II Riflesword! This weapon\"\n\t\t\t\t\t\t\t+ \" looks quite menacing.\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Continue\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nAlien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (enemy.equals(\"boss\"))\n\t\t{\n\t\t\tif(evaluateInventory(\"Manhole Cover Shield\"))\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 50;\n\t\t\t\tthis.iAlienMaxDmg = 10;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 2;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthis.iAlienHP = 50;\n\t\t\t\tthis.iAlienMaxDmg = 12;\t\t\t\t//exclusive\n\t\t\t\tthis.iAlienMinDmg = 4;\t\t\t\t//inclusive\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\n\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You have entered the fight! Attack!\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t}\n\t\t\t\n\t\t\tif (evaluateInventory(\"Edison Grenade\"))\n\t\t\t{\n\t\t\t\tthis.inventory.remove(\"Edison Grenade\");\n\t\t\t\tthis.iAlienHP -= 20;\n\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"You lob the Edison Grenade to start the battle and hide \"\n\t\t\t\t\t+ \"behind a cluster\\nof stalagmite. A few seconds later, the grenade\"\n\t\t\t\t\t+ \" explodes dealing 20\\ndamage to the boss alien!\\n\\nBoss Alien HP \" +\n\t\t\t\t\t\"left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You lob the Edison Grenade to start the battle and hide \"\n\t\t\t\t\t\t+ \"behind a cluster\\nof stalagmite. A few seconds later, the grenade\"\n\t\t\t\t\t\t+ \" explodes dealing 20 damage to the boss alien!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t\t\t+ \"______________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\twhile (this.iHP > 0 && this.iAlienHP > 0)\n\t\t\t{\n\t\t\t\tthis.iDmgDealt = random.nextInt(this.iMaxDmg - this.iMinDmg) + \n\t\t\t\t\tthis.iMinDmg;\n\t\t\t\tthis.iAlienHP -= this.iDmgDealt;\n\t\t\t\t\n\t\t\t\tthis.iDmgTaken = random.nextInt(this.iAlienMaxDmg - this.iAlienMinDmg) +\n\t\t\t\t\tthis.iAlienMinDmg;\n\t\t\t\tthis.iHP -= this.iDmgTaken;\n\t\t\t\t\n\t\t\t\tif (this.iHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tsetPlayerState(false);\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Oh no! You took \" + this.iDmgTaken + \" damage and died! \" +\n\t\t\t\t\t\t\"It looks like the aliens got the best\\nof you and humanity \" + \n\t\t\t\t\t\t\"is\\ndoomed... better luck next time!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(this.iAlienHP <= 0)\n\t\t\t\t{\n\t\t\t\t\tthis.inventory.add(\"Platinum Key\");\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \"\n\t\t\t\t\t\t+ \"have killed the boss alien! He drops the\\n\" +\n\t\t\t\t\t\t\"Platinum Key!\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Pick up Platinum Key\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You took \" + this.iDmgTaken + \" damage, but you \"\n\t\t\t\t\t\t\t+ \"have killed the boss alien! He drops the\\n\" +\n\t\t\t\t\t\t\t\"Platinum Key!\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Pick up Platinum Key\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nBoss Alien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t\n\t\t\t\t\twhile (cAttack != 'a' && cAttack != 'A')\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.print(\"\\nInvalid choice.\\n\");\n\t\t\t\t\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"You inflict \" + this.iDmgDealt + \" damage. You take \" + \n\t\t\t\t\t\t\tthis.iDmgTaken + \" damage!\\n\\nBoss Alien HP left: \" + this.iAlienHP + \"\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"[A] Attack\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"HP: \" + getHP() + \"\\nWeapon: \" + getEquippedWeapon());\n\t\t\t\t\t\tSystem.out.print(\"\\n__________________________________________________________\"\n\t\t\t\t\t\t\t+ \"________________\\n\\n\");\n\t\t\t\t\t\tSystem.out.print(\"Action: \");\n\t\t\t\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\t\t\t\tcAttack = strInput.charAt(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"@Override\n\tpublic int fight(Enemy e1) {\n\t\tint damage = 0;\n\t\tRandom randomNum = new Random();\n\t\tdamage = 6 + randomNum.nextInt(4);\n\t\ttry {\n\t\t\te1.takeDamage(damage);\n\t\t} catch (InvalidDamageException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn damage;\n\t}",
"public static void damageStep () {\r\n // rough plan:\r\n // #1: flip defending monster, if face down -> see flipMonster(...);\r\n // #2: Ask CPU and player for possible effect negation! (For an attack negation it is too late!) -> see below in this method\r\n // #3: calculate damage, kill monsters, if needed\r\n // (consider also banishing and immunity, also copied passive effect of (Holy) Lance)\r\n // -> see makeDamageCalculation(...);\r\n // #4: decrease life points, if needed -> see isDealingBattleDamageAndContinuingGame(...);\r\n // #5: consider passive (also copied) trap monster effects -> see possibleSuicideEffect(...);\r\n // #6: display Win/Lose dialog and end match, if needed -> see Game.over(...);\r\n // #7: finally end the attack (consider the effects that happen afterwards), thus allowing the next attack -> endDamageStep(...);\r\n \r\n // about #1:\r\n if (Game.ActiveGuardingMonster.isFaceDown) {flipMonster(Game.ActiveGuardingMonster);}\r\n // about #2:\r\n if (Game.ActiveAttackingMonster.canBeNegated() || Game.ActiveGuardingMonster.canBeNegated()) {\r\n AIinterrupts.cpuIsUsingEffectNegateDuringBattlePhase(); // ask CPU to negate effects first\r\n // ask player to negate effect here\r\n boolean isCanceling = false;\r\n boolean hasEffectNegateHandTrap = Hand.lookForEffectNegateOnHand(true);\r\n boolean hasEffectNegateOnField = Hand.lookForEffectNegateOnField(true);\r\n if (hasEffectNegateHandTrap || hasEffectNegateOnField) {\r\n if (hasEffectNegateHandTrap && !hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (!hasEffectNegateHandTrap && hasEffectNegateOnField) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n else {\r\n int intDialogResult = YuGiOhJi.multipleChoiceDialog(\"Do you want to negate effects on the field?\", \"You can negate passive effects.\", new String[]{\"yes, by discarding Neutraliser\", \"yes, by paying the cost worth 1 card\", \"no (default)\"}, \"no (default)\");\r\n if (intDialogResult==0) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, true);\r\n }\r\n else if (intDialogResult==1) {\r\n isCanceling = PlayerInterrupts.playerMayNegateEffect(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster, false);\r\n }\r\n }\r\n }\r\n if (!isCanceling) {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n }\r\n else {\r\n makeDamageCalculation(Game.ActiveAttackingMonster, Game.ActiveGuardingMonster); // whole rest of battle\r\n }\r\n \r\n }",
"private static void attack(RobotInfo target) throws GameActionException {\n if (SOLDIER_DEBUG) {\n System.out.println(\"attacking\");\n }\n BulletInfo[] bullets = rc.senseNearbyBullets(EvasiveSoldier.BULLET_DETECT_RADIUS);\n RobotInfo[] robots = rc.senseNearbyRobots(EvasiveSoldier.ENEMY_DETECT_RADIUS);\n MapLocation targetLocation = target.getLocation();\n move(bullets, robots, targetLocation);\n //RobotUtils.tryMoveDestination(targetLocation);\n if (TargetingUtils.clearShot(here, target) || (rc.getType() == RobotType.GARDENER && rc.getOpponentVictoryPoints() > 10)) {\n if (SOLDIER_DEBUG) {\n System.out.println(\"clearShot to target\");\n }\n Direction towardsEnemy = here.directionTo(targetLocation);\n float distanceEnemy = here.distanceTo(targetLocation);\n if (distanceEnemy <= 3.5 && rc.canFirePentadShot() && rc.getTeamBullets() > 200) {\n rc.firePentadShot(towardsEnemy);\n }\n else {\n if (rc.canFireTriadShot() && rc.getTeamBullets() > 50) {\n rc.fireTriadShot(towardsEnemy);\n }\n else if (rc.canFireSingleShot()) {\n rc.fireSingleShot(towardsEnemy);\n }\n }\n }\n }",
"public void doAction(SpaceWars game) {\r\n this.shieldIsOn = false;\r\n SpaceShipPhysics thisShip = this.getPhysics();\r\n SpaceShipPhysics otherShip = game.getClosestShipTo(this).getPhysics();\r\n makeMove(thisShip, otherShip);\r\n if (this.gunDisabled){this.updateGunCooldownStatus();}\r\n if (isFireNecessary(thisShip,otherShip)){\r\n this.fire(game);}\r\n this.chargeEnergy();\r\n }",
"public void attack(Player player) {\n this.damage = 18 - player.getfPoint(); // the higher the Fighter skill,\n // the lower the damage. change the math.\n int newHealth = player.getShip().getHealth() - damage;\n player.getShip().setHealth(newHealth);\n }",
"@Test\n void doEffectflamethrower() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"flamethrower\");\n Weapon w7 = new Weapon(\"flamethrower\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.addWeapon(w7);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w7.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(1));\n Terminator t = new Terminator('e', Board.getSpawnpoint('b'));\n t.setOwnerColor(victim.getColor());\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(t);\n try{\n p.getPh().getWeaponDeck().getWeapon(w7.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 1 && t.getPb().countDamages() == 1);\n\n players.get(1).setPlayerPosition(Board.getSquare(5));\n try{\n p.getPh().getWeaponDeck().getWeapon(w7.getName()).doEffect(\"base\", null, null, p, players, null); //\"A choice of yours is wrong\"\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 1 && t.getPb().countDamages() == 1);\n\n players.remove(1);\n\n try {\n p.getPh().getWeaponDeck().getWeapon(w7.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(1));\n t = new Terminator('e', Board.getSpawnpoint('b'));\n t.setOwnerColor(victim.getColor());\n RealPlayer p2 = new RealPlayer('v', \"ciccia\");\n p2.setPlayerPosition(Board.getSquare(1));\n ArrayList<GenericSquare> s = new ArrayList<>();\n s.clear();\n s.add(victim.getPlayerPosition());\n s.add(t.getPlayerPosition());\n\n try {\n p.getPh().getWeaponDeck().getWeapon(w7.getName()).doEffect(\"alt\", null, null, p, null, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && p2.getPb().countDamages() == 2 && t.getPb().countDamages() == 1);\n }",
"public abstract int doDamage(int time, GenericMovableUnit unit, Unit target);",
"@Override\n\tpublic boolean fight(PWindow window, Arena arena, WindowThread thread, Healer healer) throws LogoutException, HaltThread\n\t{\n\t\tboolean hasFought = false;\n\t\tHealWaiter waiter = null;\n\t\tint numAttacks = 0;\t//Number of attacks in this fighting sequence\n\t\twhile(true) //if in combat, keep fighting\n\t\t{\n\t\t\thealer.checkHealth();\n\t\t\tmana(window); //won't do anything if character doesn't have mana\n\t\t\tthread.checkHalt();\n\t\t\tHealthBarFinder hpBars = new HealthBarFinder(window);\n\t\t\tArrayList<Point> bars = hpBars.getHealthBars();\n\t\t\tif(keepFighting(window, numAttacks, bars.size()))\n\t\t\t{\n\t\t\t\tdouble a = hpBars.getShootingAngle(); //gets the optimal shooting angle from method in HealthBarFinder\n\t\t\t\tPoint p = new Point();\n\t\t\t\tp.x = (int) (FIRE_DIST * Math.cos(a));\n\t\t\t\tp.y = (int) (FIRE_DIST * Math.sin(a));\n\t\t\t\tif(waiter!=null)\n\t\t\t\t{\n\t\t\t\t\twaiter.waitFully();\n\t\t\t\t}\n\t\t\t\twaiter = new HealWaiter(attack(window, CoordToolkit.toUncentered(p, PWindow.getWidth(), PWindow.getHeight()), numAttacks, bars.size()) * 1000d, healer);\n\t\t\t\thasFought = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnumAttacks ++; \n\t\t}\n\t\tif(numAttacks > LONG_COMBAT) //combat lasted long enough\n\t\t{\n\t\t\twindow.getProfile().usePotion(window, Potion.QUICKSILVER);\n\t\t}\n\t\treturn hasFought;\n\t}",
"public void fight(Team otherteam) {\n\t\tString aTeamCaptainName = this.captain.getName();\t//호출한 메서드\n\t\tString bTeamCaptainName = otherteam.captain.getName();\n\t\tSystem.out.println(aTeamCaptainName+\"과 \"+ bTeamCaptainName+\"이 싸운다\");\n\t\t\n\t}",
"@Override\n\tpublic void damage(float f) {\n\t\t\n\t}",
"public void attack(){\n activity = CreatureActivity.ATTACK;\n createWeapon();\n endAttack = new CountDown(20); //100\n endAnimationAttack = new CountDown(100);\n }",
"@Override\n\t\tpublic void hit(Npc attacker, Mob defender, Hit hit) {\n\t\t}",
"public void fireScourge() {\n\t\t// Has player waited cooldown before trying to fire again?\t\tCHANGED to 10000\n\t\tif (System.currentTimeMillis() - this.lastFired > Config.WEAPON_COOLDOWN_TIME * 10000) {\n\t\t\tSystem.out.println(player.getDisplayName() + \" is attempting to launch napalm\");\n\t\t\t// Can this airship drop scourge?\n\t\t\tif (this.properties.FIRES_SCOURGE) {\n\t\t\t\tBlock[] cannons = getCannons();\n\t\t\t\tint numfiredcannons = 0;\n\t\t\t\tfor (int i = 0; i < cannons.length; i++) {\n\t\t\t\t\tif (cannons[i] != null && cannons[i].getRelative(0, -1, 0).getType().equals(Material.AIR) && cannonHasTnt(cannons[i], Config.NUM_TNT_TO_DROP_NAPALM)) {\n\t\t\t\t\t\tboolean missingMaterial = false;\n\t\t\t\t\t\tfor (int id : Config.MATERIALS_NEEDED_FOR_SCOURGE) {\n\t\t\t\t\t\t\tif (!cannonHasItem(cannons[i], id, 1))\n\t\t\t\t\t\t\t\tmissingMaterial = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!missingMaterial && numfiredcannons < this.properties.MAX_NUMBER_OF_CANNONS) {\n\t\t\t\t\t\t\tnumfiredcannons++;\n\t\t\t\t\t\t\tlastFired = System.currentTimeMillis();\n\t\t\t\t\t\t\twithdrawTnt(cannons[i], Config.NUM_TNT_TO_DROP_SCOURGE);\n\t\t\t\t\t\t\tfor (int id : Config.MATERIALS_NEEDED_FOR_SCOURGE) {\n\t\t\t\t\t\t\t\twithdrawItem(cannons[i], id, 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Fire some scourge TODO: maybe add sound effects for scourge dropping? :P\n\t\t\t\t\t\t\tnew Scourge(cannons[i]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// More cannons on ship than allowed. Not all fired - can break out of loop now.\n\t\t\t\t\t\t\t//player.sendMessage(ChatColor.AQUA + \"Some purifiers did not fire. Max cannon limit is \" + ChatColor.GOLD + this.properties.MAX_NUMBER_OF_CANNONS);\n\t\t\t\t\t\t\tplayer.sendMessage(ChatColor.AQUA + \"Some purifiers did not fire. item check = \" + ChatColor.GOLD + missingMaterial);\n\t\t\t\t\t\t\tplayer.sendMessage(ChatColor.AQUA + \"numFiredCannons = \" + ChatColor.GOLD + numfiredcannons);\n\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + this.properties.SHIP_TYPE + \" CANNOT DROP NAPALM\");\n\t\t} else\n\t\t\tplayer.sendMessage(ChatColor.GOLD + \"COOLING DOWN FOR \" + ChatColor.AQUA + (int)(Math.round(6 - (System.currentTimeMillis() - this.lastFired) / 1000)) + ChatColor.GOLD + \" MORE SECONDS\");\n\t}",
"public void attack() {\n if (activeWeapon == null) {\n return;\n }\n attacking = true;\n }",
"private void functionalInterface1() {\n\t\tcharmander.heal();\n\n\t\tPokedex.printData(Arrays.asList(charmander));\n\n\t\tguilherme.powerUp(charmander, new BigDecimal(\"-10\"), psMinimalDamage); // -10\n\n\t\tPokedex.printData(Arrays.asList(charmander));\n\n\t\tguilherme.powerUp(charmander, new BigDecimal(\"-10\"), psHugeDamage); // -20\n\n\t\tPokedex.printData(Arrays.asList(charmander));\n\t}",
"@Test\n void doEffectfurnace() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"furnace\");\n Weapon w3 = new Weapon(\"furnace\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.addWeapon(w3);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w3.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('r'));\n Terminator t = new Terminator('g', Board.getSquare(5));\n t.setOwnerColor(victim.getColor());\n ArrayList<GenericSquare> s = new ArrayList<>();\n s.add(victim.getPlayerPosition());\n try{\n p.getPh().getWeaponDeck().getWeapon(w3.getName()).doEffect(\"base\", null, null, p, null, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 1 && t.getPb().countDamages() == 1);\n\n p.setPlayerPosition(Board.getSquare(0));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('r'));\n t = new Terminator('g', Board.getSpawnpoint('r'));\n t.setOwnerColor(victim.getColor());\n s.clear();\n s.add(Board.getSpawnpoint('r'));\n try{\n p.getPh().getWeaponDeck().getWeapon(w3.getName()).doEffect(\"alt\", null, null, p, null, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 1 && victim.getPb().getMarkedDamages('b')==1 && t.getPb().countDamages() == 1 && t.getPb().getMarkedDamages('b')==1);\n\n }",
"private void fight(int playerNo, int fighter, int challenger)\r\n {\r\n LaughButton lt = new LaughButton();\r\n if(playerNo == 1)\r\n {\r\n int attack = worldPanel.player1.units[fighter].getAttack();\r\n int defence = worldPanel.player2.units[challenger].getDefence();\r\n double attack1 = Math.random() * attack;\r\n double defence1 = Math.random() * defence;\r\n if(attack1 >= defence1)//player1 wins\r\n worldPanel.player2.removeUnit(challenger);\r\n else\r\n {\r\n worldPanel.player1.removeUnit(fighter);\r\n worldPanel.setCurrentUnit(1);\r\n }\r\n }//end if\r\n\r\n if(playerNo == 2)\r\n {\r\n int attack = worldPanel.player2.units[fighter].getAttack();\r\n int defence = worldPanel.player1.units[challenger].getDefence();\r\n double attack1 = Math.random() * attack;\r\n double defence1 = Math.random() * defence;\r\n if(attack1 >= defence1)//player2 wins\r\n worldPanel.player1.removeUnit(challenger);\r\n else\r\n {\r\n worldPanel.player2.removeUnit(fighter);\r\n worldPanel.setCurrentUnit(1);\r\n }\r\n }//end if\r\n setMapPos();\r\n setInfoPanel();\r\n }",
"public void performFly(){\n fb.fly();\n }",
"public void baptism() {\n for (Card targetCard : Battle.getInstance().getActiveAccount().getActiveCardsOnGround().values()) {\n if (targetCard instanceof Minion) {\n targetCard.setHolyBuff(2, 1);\n }\n }\n }",
"@Override\n\tpublic void reduceCurrentHp(final double damage, final L2Character attacker, final boolean awake)\n\t{\n\t\t/*\n\t\t * if ((this instanceof L2SiegeGuardInstance) && (attacker instanceof L2SiegeGuardInstance)) //if((this.getEffect(L2Effect.EffectType.CONFUSION)!=null) && (attacker.getEffect(L2Effect.EffectType.CONFUSION)!=null)) return; if ((this instanceof L2MonsterInstance)&&(attacker instanceof\n\t\t * L2MonsterInstance)) if((this.getEffect(L2Effect.EffectType.CONFUSION)!=null) && (attacker.getEffect(L2Effect.EffectType.CONFUSION)!=null)) return;\n\t\t */\n\t\t\n\t\tif (isRaid() && attacker != null && attacker.getParty() != null && attacker.getParty().isInCommandChannel() && attacker.getParty().getCommandChannel().meetRaidWarCondition(this))\n\t\t{\n\t\t\tif (firstCommandChannelAttacked == null) // looting right isn't set\n\t\t\t{\n\t\t\t\tsynchronized (this)\n\t\t\t\t{\n\t\t\t\t\tif (firstCommandChannelAttacked == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tfirstCommandChannelAttacked = attacker.getParty().getCommandChannel();\n\t\t\t\t\t\tif (firstCommandChannelAttacked != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcommandChannelTimer = new CommandChannelTimer(this);\n\t\t\t\t\t\t\tcommandChannelLastAttack = System.currentTimeMillis();\n\t\t\t\t\t\t\tThreadPoolManager.getInstance().scheduleGeneral(commandChannelTimer, 10000); // check for last attack\n\t\t\t\t\t\t\tfirstCommandChannelAttacked.broadcastToChannelMembers(new CreatureSay(0, Say2.PARTYROOM_ALL, \"\", \"You have looting rights!\")); // TODO: retail msg\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\telse if (attacker.getParty().getCommandChannel().equals(firstCommandChannelAttacked)) // is in same channel\n\t\t\t{\n\t\t\t\tcommandChannelLastAttack = System.currentTimeMillis(); // update last attack time\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t * // CommandChannel if(commandChannelTimer == null && isRaid() && attacker != null) { if(attacker.isInParty() && attacker.getParty().isInCommandChannel() && attacker.getParty().getCommandChannel().meetRaidWarCondition(this)) { firstCommandChannelAttacked = attacker.getParty().getCommandChannel();\n\t\t * commandChannelTimer = new CommandChannelTimer(this, attacker.getParty().getCommandChannel()); ThreadPoolManager.getInstance().scheduleGeneral(_commandChannelTimer, 300000); // 5 min firstCommandChannelAttacked.broadcastToChannelMembers(new CreatureSay(0, Say2.PARTYROOM_ALL, \"\",\n\t\t * \"You have looting rights!\")); } }\n\t\t */\n\t\tif (isEventMob)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Add damage and hate to the attacker AggroInfo of the L2Attackable aggroList\n\t\tif (attacker != null)\n\t\t{\n\t\t\taddDamage(attacker, (int) damage);\n\t\t}\n\t\t\n\t\t// If this L2Attackable is a L2MonsterInstance and it has spawned minions, call its minions to battle\n\t\tif (this instanceof L2MonsterInstance)\n\t\t{\n\t\t\tL2MonsterInstance master = (L2MonsterInstance) this;\n\t\t\t\n\t\t\tif (this instanceof L2MinionInstance)\n\t\t\t{\n\t\t\t\tmaster = ((L2MinionInstance) this).getLeader();\n\t\t\t\t\n\t\t\t\tif (!master.isInCombat() && !master.isDead())\n\t\t\t\t{\n\t\t\t\t\tmaster.addDamage(attacker, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (master.hasMinions())\n\t\t\t{\n\t\t\t\tmaster.callMinionsToAssist(attacker);\n\t\t\t}\n\t\t\t\n\t\t\tmaster = null;\n\t\t}\n\t\t\n\t\t// Reduce the current HP of the L2Attackable and launch the doDie Task if necessary\n\t\tsuper.reduceCurrentHp(damage, attacker, awake);\n\t}",
"void doEffect(Skill castSkill, double power, Creature performer, Item target) {\n/* 87 */ if ((!target.isMailBox() && !target.isSpringFilled() && !target.isPuppet() && \n/* 88 */ !target.isUnenchantedTurret() && !target.isEnchantedTurret()) || (target\n/* 89 */ .hasDarkMessenger() && !target.isEnchantedTurret())) {\n/* */ \n/* 91 */ performer.getCommunicator().sendNormalServerMessage(\"The spell fizzles.\", (byte)3);\n/* */ return;\n/* */ } \n/* 94 */ if (target.isUnenchantedTurret() || target.isEnchantedTurret()) {\n/* */ \n/* 96 */ int spirit = Zones.getSpiritsForTile(performer.getTileX(), performer.getTileY(), performer.isOnSurface());\n/* 97 */ String sname = \"no spirits\";\n/* 98 */ int templateId = 934;\n/* 99 */ if (spirit == 4) {\n/* */ \n/* 101 */ templateId = 942;\n/* 102 */ sname = \"There are plenty of air spirits at this height.\";\n/* */ } \n/* 104 */ if (spirit == 2) {\n/* */ \n/* 106 */ templateId = 968;\n/* 107 */ sname = \"Some water spirits were closeby.\";\n/* */ } \n/* 109 */ if (spirit == 3) {\n/* */ \n/* 111 */ templateId = 940;\n/* 112 */ sname = \"Earth spirits are everywhere below ground.\";\n/* */ } \n/* 114 */ if (spirit == 1) {\n/* */ \n/* 116 */ sname = \"Some nearby fire spirits are drawn to your contraption.\";\n/* 117 */ templateId = 941;\n/* */ } \n/* 119 */ if (templateId == 934) {\n/* */ \n/* 121 */ performer.getCommunicator().sendAlertServerMessage(\"There are no spirits nearby. Nothing happens.\", (byte)3);\n/* */ \n/* */ return;\n/* */ } \n/* 125 */ if (target.isUnenchantedTurret()) {\n/* */ \n/* 127 */ performer.getCommunicator().sendSafeServerMessage(sname);\n/* 128 */ target.setTemplateId(templateId);\n/* 129 */ target.setAuxData(performer.getKingdomId());\n/* */ }\n/* 131 */ else if (target.isEnchantedTurret()) {\n/* */ \n/* 133 */ if (target.getTemplateId() != templateId) {\n/* */ \n/* 135 */ performer.getCommunicator().sendAlertServerMessage(\"The nearby spirits ignore your contraption. Nothing happens.\", (byte)3);\n/* */ \n/* */ return;\n/* */ } \n/* */ \n/* 140 */ performer.getCommunicator().sendSafeServerMessage(sname);\n/* */ } \n/* */ } \n/* */ \n/* 144 */ ItemSpellEffects effs = target.getSpellEffects();\n/* 145 */ if (effs == null)\n/* 146 */ effs = new ItemSpellEffects(target.getWurmId()); \n/* 147 */ SpellEffect eff = effs.getSpellEffect(this.enchantment);\n/* 148 */ if (eff == null) {\n/* */ \n/* 150 */ performer.getCommunicator().sendNormalServerMessage(\"You summon nearby spirits into the \" + target\n/* 151 */ .getName() + \".\", (byte)2);\n/* */ \n/* 153 */ eff = new SpellEffect(target.getWurmId(), this.enchantment, (float)power, 20000000);\n/* 154 */ effs.addSpellEffect(eff);\n/* 155 */ Server.getInstance().broadCastAction(performer\n/* 156 */ .getName() + \" looks pleased as \" + performer.getHeSheItString() + \" summons some spirits into the \" + target\n/* 157 */ .getName() + \".\", performer, 5);\n/* 158 */ if (!target.isEnchantedTurret()) {\n/* 159 */ target.setHasCourier(true);\n/* */ \n/* */ }\n/* */ }\n/* 163 */ else if (eff.getPower() > power) {\n/* */ \n/* 165 */ performer.getCommunicator().sendNormalServerMessage(\"You frown as you fail to summon more spirits into the \" + target\n/* 166 */ .getName() + \".\", (byte)3);\n/* */ \n/* 168 */ Server.getInstance().broadCastAction(performer.getName() + \" frowns.\", performer, 5);\n/* */ }\n/* */ else {\n/* */ \n/* 172 */ performer.getCommunicator().sendNormalServerMessage(\"You succeed in summoning more spirits into the \" + this.name + \".\", (byte)2);\n/* */ \n/* */ \n/* 175 */ eff.improvePower(performer, (float)power);\n/* 176 */ if (!target.isEnchantedTurret())\n/* 177 */ target.setHasCourier(true); \n/* 178 */ Server.getInstance().broadCastAction(performer\n/* 179 */ .getName() + \" looks pleased as \" + performer.getHeSheItString() + \" summons some spirits into the \" + target\n/* 180 */ .getName() + \".\", performer, 5);\n/* */ } \n/* */ }",
"@Override\n\tpublic int fireWeapon(int distance) throws NegativeDistanceException\n\t{\n\t\tif (distance >= 0)\n\t\t{\n\t\t\tint damage = (int)(this.myWeapon.fireWeapon(distance) * (1 + ((double)this.myWeapon.getRemainingAmmo()/(double)this.myWeapon.getMaxAmmo())));\n\t\t\treturn damage;\n\t\t} else\n\t\t{\n\t\t\tthrow new NegativeDistanceException();\n\t\t}\n\t}",
"public void run() \n\t\t\t{\n\t\t\t\tif (Math.abs(player.getLocation().getX() - playerLoc.getX()) > 1\n\t\t\t\t\t\t|| Math.abs(player.getLocation().getY() - playerLoc.getY()) > 1\n\t\t\t\t\t\t|| Math.abs(player.getLocation().getZ() - playerLoc.getZ()) > 1)\n\t\t\t\t{\n\t\t\t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You cannot move while bandaging!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString name = player.getCustomName();\n\t\t\t\tif (name == null)\n\t\t\t\t\tname = player.getName();\n\t\t\t\t\n\t\t\t\t//Check that the recipient is still in roughly the same location\n\t\t\t\t//Skip if self-heal\n\t\t\t\tif (!player.equals(recipient))\n\t\t\t\t\tif (Math.abs(recipient.getLocation().getX() - recipientLoc.getX()) > 1\n\t\t\t\t\t\t|| Math.abs(recipient.getLocation().getY() - recipientLoc.getY()) > 1\n\t\t\t\t\t\t|| Math.abs(recipient.getLocation().getZ() - recipientLoc.getZ()) > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You cannot bandage your patient while they are moving!\");\n\t\t\t\t\t\trecipient.sendMessage(ChatColor.YELLOW + name + \" cannot bandage you while you are moving!\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Remove item from player's inventory.\n\t \t\tplayer.getInventory().removeItem(new ItemStack(Material.getMaterial(item.toUpperCase()), 1));\n\t \t\tplayer.updateInventory();\n\t \t\t\t\n\t \t\t//Heal the other player.\n\t \t\trecipient.setHealth(recipient.getHealth() + amountToHeal);\n\n\t \t\t//Award experience.\n\t \t\tProfessionStats prof = new ProfessionStats(perms, data, config, player.getUniqueId());\n\t \t\t\n\t \t\tif (!prof.isPracticeFatigued(profession))\n\t \t\t\taddExperience(player, profession, config.getInt(\"healing.\" + item + \".exp\"));\n\t \t\t\t\n\t \t\t//Notify both parties.\n\t \t\tif (!player.equals(recipient))\n\t \t\t{\t \t\t\n\t \t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You bandaged \" + recipient.getName() + \"'s wounds.\");\n\t \t\t\trecipient.sendMessage(ChatColor.YELLOW + player.getName() + \" bandaged your wounds.\");\n\t \t\t}\n\t \t\telse\n\t \t\t\tplayer.sendMessage(ChatColor.YELLOW + \"You bandaged your wounds.\");\n\t\t\t }",
"private void shoot(float angle) {\n\t\tfloat arc = FIRING_ARC;\n\t\tif (weapon instanceof BanditTripleShot)\n\t\t\tarc *= 2;\n\t\t\t\n\t\tif (angle < FIRING_ARC && angle > - FIRING_ARC) {\n\t\t\t//System.out.println(\"BANDIT: shooting\");\n\t\t\tweapon.shoot();\n\t\t}\n\t}",
"@Test\n void doEffectgrenadelauncher() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"grenade launcher\");\n Weapon w18 = new Weapon(\"grenade launcher\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w18);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w18.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n s.add(Board.getSquare(10));\n try {\n p.getPh().getWeaponDeck().getWeapon(w18.getName()).doEffect(\"base\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 1 && victim.getPlayerPosition() == Board.getSquare(10));\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n try {\n p.getPh().getWeaponDeck().getWeapon(w18.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 1 && victim.getPlayerPosition() == Board.getSpawnpoint('y'));\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(10));\n RealPlayer victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSquare(10));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(10));\n try {\n p.getPh().getWeaponDeck().getWeapon(w18.getName()).doEffect(\"base\", \"opt1\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 1 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(10));\n victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSquare(10));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(10));\n s.add(Board.getSquare(10));\n try {\n p.getPh().getWeaponDeck().getWeapon(w18.getName()).doEffect(\"base\", \"opt1\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(10));\n victim2 = new RealPlayer('v', \"ciccia1\");\n victim2.setPlayerPosition(Board.getSquare(10));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(10));\n s.add(Board.getSpawnpoint('y'));\n try {\n p.getPh().getWeaponDeck().getWeapon(w18.getName()).doEffect(\"opt1\", \"base\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { System.out.println(\"ERROR\");}\n\n assertTrue(victim.getPb().countDamages() == 2 && victim.getPlayerPosition() == Board.getSpawnpoint('y') && victim2.getPb().countDamages() == 1);\n }",
"public void fireTurret() {\n\t\tif(!getCreator().hasEffect(\"TurretEffect\")) {\n\t\t\treturn;\n\t\t}\n\t\t//Fire based on what is ordained within the hero's current TurretEffect\n\t\tTurretEffect tE = (TurretEffect)getCreator().getEffect(\"TurretEffect\");\n\t\tTurretFireWrapper fW = tE.getFireFunctionWrapper();\n\t\tif(fW == null) {\n\t\t\treturn; //No active mode selected, so we just exit out. Note that this means that turrets will always fire based on the last active effect\n\t\t}\n\t\tfW.fire(getCreator(), getLoc(),range);\n\t\treturn;\n\t}",
"@Override\n\tpublic int fire(double distance) throws WeaponException {\n\t\tdouble stabilizerDamage = base.fire(distance)*1.25; \n\t\t\n\t\tif (base.getCurrentAmmo() == 0)\n\t\t{\n\t\t\tbase.reload();\n\t\t}\n\t\treturn (int)stabilizerDamage;\n\t}",
"@Test\n void doEffectlockrifle() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl, false, 8);\n setPlayers(pl);\n WeaponFactory wf = new WeaponFactory(\"lock rifle\");\n Weapon w = new Weapon(\"lock rifle\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.getWeapons().add(w);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n RealPlayer victim1 = new RealPlayer('y', \"ciccia1\");\n victim.setPlayerPosition(Board.getSpawnpoint('b'));\n victim1.setPlayerPosition(Board.getSpawnpoint('b'));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(victim1);\n try{\n p.getPh().getWeaponDeck().getWeapon(w.getName()).doEffect(\"base\", \"opt1\", null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n assertTrue(victim.getPb().countDamages() == 2 && victim.getPb().getMarkedDamages('b') == 1 && victim1.getPb().countDamages() == 0 && victim1.getPb().getMarkedDamages('b') == 1 );\n }",
"public void fight(House house) {\n System.out.println(this.name + \" is fighting \" + house.name);\n }",
"public void act() \n {\n World w = getWorld();\n int height = w.getHeight();\n \n setLocation(getX(),getY()+1);\n if (getY() <=0 || getY() >= height || getX() <= 0) // off the world\n {\n w.removeObject(this);\n return;\n }\n \n \n SaboWorld thisWorld = (SaboWorld) getWorld();\n Turret turret = thisWorld.getTurret();\n Actor turretActor = getOneIntersectingObject(Turret.class);\n Actor bullet = getOneIntersectingObject(Projectile.class);\n \n if (turretActor!=null && bullet==null) // hit the turret!\n {\n \n turret.bombed(); //Turret loses health\n explode();\n w.removeObject(this);\n } else if (turret==null && bullet!=null) //hit by a bullet!\n {\n explode();\n w.removeObject(this);\n }\n \n }",
"public void processFights() {\n\n\t\tfor (int row = 0; row < battlefield.length; row++) {\n\t\t\tfor (int column = 0; column < battlefield[row].length; column++) {\n\t\t\t\tbattlefield[row][column].fight();\n\t\t\t}\n\t\t}\n\t}",
"@Test\n void doEffectcyberblade(){\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"cyberblade\");\n Weapon w20 = new Weapon(\"cyberblade\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w20);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w20.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt1\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"opt1\", \"base\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt1\", \"opt2\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"base\", \"opt2\", \"opt1\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w20.getName()).doEffect(\"opt1\", \"base\", \"opt2\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages()==2 && victim2.getPb().countDamages()==2 && p.getPlayerPosition()==Board.getSquare(7));\n }",
"private void enemyturn() {\n if (enemy.getHealth() == 0) { // check if the enemy is still alive\n enemy.setAlive(false);\n }\n\n if (enemy.getAlive()) { // if he is alive\n // time to fuck the players day up\n System.out.println(\"\");//formatting\n System.out.println(enemy.getName() + \" attacks you!\");\n\n // calculate the damage this enemy will do\n int differenceHit = enemy.getMaxHit() - enemy.getMinHit(); // difference will be 0-3. But plus 1 (as the result will ALWAYS be +1 in the randomizer so a \"0\" will not happen.\n int minimumDamage = randomize.getRandomDamage(differenceHit); // for example, will return 0-4 if the min and max hit was 4-7. Then do a -1. Making it a 0-3 chance.\n int damage = differenceHit + minimumDamage; // add the minimum damage, to random hit damage.\n\n // calculate the players armor\n damage = damage - player.getPlayerArmorRating();\n if (damage <= 0){\n System.out.println(\"... but you dont take any damage because of your armor!\");\n } else {\n\n System.out.println(\"You take \" + damage + \" damage!\");\n player.removeHealth(damage);\n }\n\n } else { // when ded\n System.out.println(\"The enemy has no chance to fight back. As your final blow killed the enemy.\");\n }\n }",
"@Override\n\tprotected void fireAddEnemyMissile(String launcherId, String destination,\n\t\t\tint damage, int flyTime){\n\t\t\n\t}",
"public void applyEffects(Enemy user, Hero hero, ArrayList<Enemy> team) {\n\t\tfor (int i=0; i<getAttackNbr(); i++) {\n\t\t\tapplyEffectHero(user, hero);\n\t\t}\n\t\tapplyDebuffHero(user, hero);\n\t\tapplyEffectUser(user);\n\t\t\n\t\tif (invoke != null) { // ajout sbires\n\t\t\tfor (int i=0; i<nbrInvoke; i++) {\n\t\t\t\tteam.add(Datas.getEnemy(invoke));\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (disappear) {\n\t\t\tteam.remove(user);\n\t\t}\n\t\t\n\t\tArrayList<Enemy> allies = new ArrayList<>(team);\n\t\tallies.remove(user);\n\t\tif (allies.size() > 0) {\n\t\t\tEnemy allyToBuff = allies.get(random.nextInt(allies.size()));\n\t\t\tallyToBuff.addBlock(protect);\n\t\t}\n\t}",
"public void fire(SpaceWars game) {\r\n\t\tif (physics.angleTo(closestShipPhysics) < MIN_ANGLE){\r\n\t\t\tsuper.fire(game);\r\n\t\t}\t\r\n\t}",
"public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }",
"public void resolve(){\n logger.log(Level.FINE,attacker.getName()+\" withering attacked \"+defender.getName());\n AttackState state=new AttackState();\n state.weaponDamage=weapon.getDamage();\n state.initialAttackpool=baseAttackdice+baseAccuracy-woundpenalty;\n attacker.declareWitheringAttack(state); // If the attacker wants to change the pool, he modifies the state accordingly.\n defender.declareWitheringDV(state); // Defender declares their dv against this specific attack. This sets both initialdv and changedDv\n state.initialAttackRoll= new DiceThrow(state.changedAttackpool);\n attacker.modifyWitheringAttackRollAttacker(state); //This sets stuff like modifiedAttackRollAttacker and AttackerRollValuation\n defender.modifyWitheringAttackRollDefender(state); //This sets defender modifiedAttackRollDefender\n state.attackRollSuccesses=state.modifiedAttackRollDefender.evaluateResults(state.AttackRollValuationAttacker);\n state.threshholdSuccesses=state.attackRollSuccesses-state.changedDv;\n logger.log(Level.FINE,attacker.getName()+\" rolled \"+state.changedAttackpool+\" dice against \"+defender.getName()+\"'s dv of \"+state.changedDv+\" and gained \"+state.attackRollSuccesses+\" successes.\");\n attacker.changeWitheringThreshholdAttacker(state); //This sets thresholdModifiedAttacker\n defender.changeWitheringThreshholdDefender(state); //This sets thresholdModifiedDefender\n if(state.thresholdModifiedDefender>=0) {\n logger.log(Level.FINE,attacker.getName()+\" hit \"+defender.getName()+\" with \"+state.thresholdModifiedDefender+\" threshhold successes.\");\n attacker.modifyWitheringRawDamageAttacker(state); //Sets normal raw damageType, based on strength and weapon damageType, and then sets rawDamagemModifiedAttacker\n defender.modifyWitheringRawDamageDefender(state); //this sets rawDamageModifiedDefender, and sets up the various soak values, so natural soak and armor soak.\n logger.log(Level.FINE, \"The raw damage of the attack is: \"+state.rawDamageModifiedDefender);\n state.totalSoak = Math.max(state.defenderArmorSoak - ignoredArmorSoak, 0) + state.defenderNaturalSoak; //\n attacker.modifyTotalSoakAttacker(state); //This sets totalSoakmodifiedAttacker. Don't think this actually has support in the solar charmset, but giving opportunities to work with.\n defender.modifyTotalSoakDefender(state); // This sets totalSoakmodifiedDefender.\n state.postSoakSuccesses=Math.max(state.rawDamageModifiedDefender-state.totalSoakModifiedDefender,weapon.getOverwhelming());\n logger.log(Level.FINE,state.totalSoakModifiedDefender+\" damage is soaked, leading to post soak dice of \"+state.postSoakSuccesses);\n attacker.declarePostSoakAttacker(state); //sets postSoakSuccessesModifiedAttacker\n defender.declarePostSoakDefender(state); //sets postSoakSuccessesModifiedDefender\n DiceThrow droll=new DiceThrow(state.postSoakSuccessesModifiedDefender);\n state.damageRoll=droll;\n attacker.modifyWitheringDamageRollAttacker(state); //sets damageRollmodifiedAttacker and damageRollvValuation\n defender.modifyWitheringDamageRollDefender(state); //sets damageRollmodifiedDefender\n state.initiativeDamageDone=state.damageRollModifiedDefender.evaluateResults(state.damageRollValuation);\n logger.log(Level.FINE,attacker.getName()+\" rolls \"+state.postSoakSuccessesModifiedDefender+\" dice and achieves \"+state.initiativeDamageDone+\" successes.\");\n attacker.modifyInitiativeDamageAttacker(state);\n defender.modifyInitiativeDamageDefender(state); //Since this is the last change of initiative, we can check whether the defender was crashed here.\n attacker.updateInitiativeAttacker(state);\n defender.updateInitiativeDefender(state);//Here we should handle all the initiative changes respectively, with checking if people are crashed etc.\n }\n else{\n attacker.failedWitheringAttackAttacker(state);\n defender.failedWitheringAttackDefender(state);\n }\n\n }",
"public abstract void fight(Individual otherIndividual);",
"@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tfor (Damage damage : actionAttack.damages) {\r\n\t\t\t\t\t\t\t\tBattlerSprite attacked = damage.target.getTag();\r\n\t\t\t\t\t\t\t\tattacked.takeHit(damage.damage);\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}",
"@Test\n void doEffecttractorbeam() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n setPlayers(pl);\n WeaponFactory wf = new WeaponFactory(\"tractor beam\");\n Weapon w2 = new Weapon(\"tractor beam\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.getWeapons().add(w2);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w2.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n s.add(Board.getSpawnpoint('b'));\n try {\n p.getPh().getWeaponDeck().getWeapon(w2.getName()).doEffect(\"base\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n assertTrue(players.get(0).getPb().countDamages() == 1 && players.get(0).getPlayerPosition() == Board.getSpawnpoint('b'));\n\n players.get(0).setPlayerPosition(Board.getSquare(1));\n s.clear();\n\n try{\n p.getPh().getWeaponDeck().getWeapon(w2.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(players.get(0).getPb().countDamages() == 4 && players.get(0).getPlayerPosition() == p.getPlayerPosition());\n }",
"public void takeDamage(int damage);",
"public void act()\n {\n // if (claimer ==null){\n // this.setClaim(false);\n //}\n if(claimer == null){\n setClaim(false);\n }\n if (energy>0){\n \n removeEnergy(decayRate);\n\n }\n else {\n // getWorld().removeObject(this);\n\n }\n \n //check the energy decay\n //change size and weight\n //\n }",
"@Override\r\n\tpublic void damage(float amount) {\n\t\t\r\n\t}",
"public Fighter[] update(Fighter[] fs, Platform plat, boolean[][] inputs)\r\n {\r\n //check if the player is starting a block\r\n setBlocking(fs[0],inputs[0]);\r\n setBlocking(fs[1],inputs[1]);\r\n\r\n //increase the timers and change the state of the block\r\n incrementBlock(fs[0]);\r\n incrementBlock(fs[1]);\r\n\r\n //check if the player is starting an attack and set the attack\r\n setAttacking(fs[0],plat,inputs[0]);\r\n setAttacking(fs[1],plat,inputs[1]);\r\n\r\n //increase the timers, change the state of the attack, and deal damage/knockback to the other fighter\r\n incrementAttack(fs[0],fs[1]);\r\n incrementAttack(fs[1],fs[0]);\r\n \r\n //if they aren't currently attacking, change their velocity and move the fighter\r\n if(fs[0].getAttacking() != 1)\r\n {\r\n setVels(fs[0],inputs[0],plat);\r\n }\r\n if(fs[1].getAttacking() != 1)\r\n {\r\n setVels(fs[1],inputs[1],plat);\r\n }\r\n\r\n //moves them based on knockback\r\n fs[0].setPos(fs[0].getPos()[0] + fs[0].getKnockBackVel()[0],fs[0].getPos()[1] + fs[0].getKnockBackVel()[1]);\r\n fs[1].setPos(fs[1].getPos()[0] + fs[1].getKnockBackVel()[0],fs[1].getPos()[1] + fs[1].getKnockBackVel()[1]);\r\n\r\n //decreases knockback\r\n fs[0].setKnockBackVel(fs[0].getKnockBackVel()[0]/kf, fs[0].getKnockBackVel()[1]/kf);\r\n fs[1].setKnockBackVel(fs[1].getKnockBackVel()[0]/kf, fs[1].getKnockBackVel()[1]/kf);\r\n\r\n //brings the fighters above the platform\r\n bringAbove(fs[0], plat);\r\n bringAbove(fs[1], plat);\r\n\r\n //brings the fighters back onto the screen\r\n bringBack(fs[0]);\r\n bringBack(fs[1]);\r\n \r\n return fs; \r\n }",
"public void attack() { \n db.attack(creatures.get(creatureId), players.get(playerId));\n creatures.set(creatureId, db.getCreature(creatures.get(creatureId).getId()));\n players.set(playerId, db.getPlayer(players.get(playerId).getId()));\n setTextFields();\n }",
"public void consumeFuel(double amount);",
"void takeDamage(HeroDamage enemy1, HeroDamage enemy2);",
"@Test\n void doEffectrailgun() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"railgun\");\n Weapon w11 = new Weapon(\"railgun\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w11);\n p.setPlayerPosition(Board.getSpawnpoint('r'));\n p.getPh().drawWeapon(wd, w11.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n try {\n p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n players.clear();\n players.add(victim);\n try{\n p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(6));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(7));\n players.clear();\n players.add(victim);\n players.add(victim2);\n s.clear();\n try {\n p.getPh().getWeaponDeck().getWeapon(w11.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 2);\n }",
"public void attack(Entity entity, boolean aoe) {\n if(aoe) entity.damaged((int) (this.damage*0.6));\n else entity.damaged(this.damage);\n if(entity.isDead()){\n incExp(entity.getLevel()*9);\n if(entity instanceof Boss) {\n this.bossesDefeated++;\n }\n }\n }",
"@Override\n\tpublic boolean fight(String opponent) {\n\t\tif (getEnergy() > (Params.start_energy/2) && (!opponent.equals(\"Critter3\"))) {\n\t\t\treturn true;\n\t\t}\n\t\tint check = this.getX() + 1 ;\n\t\tif(check > (Params.world_width-1)) {\n\t\t\tcheck = 0;\n\t\t}\n\t\tif((this.moveFlag == false) && (myWorld.world[this.getY()][check].isEmpty())){\n\t\t\twalk(0);\n\t\t\tthis.moveFlag = true;\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tthis.setEnergy(this.getEnergy() - Params.walk_energy_cost);\n\t\t\treturn false;\n\t\t}\n\t}",
"public void attack(ItemWeapon w, Monster target) {\n\t\ttarget.takeDamage(w.getDamage()+level*20);\n\t}",
"@Test\n void doEffectPlasmaGun() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"plasma gun\");\n Weapon w17 = new Weapon(\"plasma gun\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w17);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w17.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2);\n\n p.setPlayerPosition(Board.getSpawnpoint(2));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(6));\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"opt1\", \"base\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && p.getPlayerPosition() == Board.getSquare(6));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(1));\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"base\", \"opt1\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && p.getPlayerPosition() == Board.getSquare(1));\n\n p.setPlayerPosition(Board.getSpawnpoint(2));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(6));\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"opt1\", \"base\", \"opt2\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3 && p.getPlayerPosition() == Board.getSquare(6));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSpawnpoint('b'));\n try {\n p.getPh().getWeaponDeck().getWeapon(w17.getName()).doEffect(\"base\", \"opt2\", \"opt1\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3 && p.getPlayerPosition() == Board.getSpawnpoint('b'));\n }",
"@Test\n void doEffectrocketlauncher() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"rocket launcher\");\n Weapon w19 = new Weapon(\"rocket launcher\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w19);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w19.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n ArrayList<Player> players = new ArrayList<>();\n ArrayList<GenericSquare> s = new ArrayList<>();\n players.add(victim);\n s.add(Board.getSquare(10));\n try {\n p.getPh().getWeaponDeck().getWeapon(w19.getName()).doEffect(\"base\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim.getPlayerPosition() == Board.getSquare(10));\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(7));\n s.add(Board.getSquare(10));\n try {\n p.getPh().getWeaponDeck().getWeapon(w19.getName()).doEffect(\"opt1\", \"base\", null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim.getPlayerPosition() == Board.getSquare(10) && p.getPlayerPosition() == Board.getSquare(7));\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSpawnpoint('y'));\n RealPlayer victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(7));\n s.add(Board.getSquare(10));\n try {\n p.getPh().getWeaponDeck().getWeapon(w19.getName()).doEffect(\"opt1\", \"base\", \"opt2\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3 && victim.getPlayerPosition() == Board.getSquare(10) && p.getPlayerPosition() == Board.getSquare(7) && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1);\n\n p.setPlayerPosition(Board.getSquare(6));\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSpawnpoint('y'));\n victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n s.clear();\n s.add(Board.getSquare(10));\n s.add(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w19.getName()).doEffect(\"base\", \"opt2\", \"opt1\", p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3 && victim.getPlayerPosition() == Board.getSquare(10) && p.getPlayerPosition() == Board.getSquare(7) && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1);\n }",
"void fightAll(List<Creature> creatures) {\n List<FightPair> fightPairs = generatePairsForFight(creatures);\n\n for (FightPair fightPair : fightPairs) {\n // TODO defense copying or cloning?\n\n //TODO returns fight result\n fight(fightPair.getCreature1(), fightPair.getCreature2());\n }\n }",
"private void fight()\n {\n boolean fighting = true;\n int turn = 1;\n while(fighting)\n {\n //System.out.println(\"Just started\");\n \n switch(turn)\n {\n case 1:\n Collections.shuffle(army1);\n Collections.shuffle(army2);\n if(army1.size() > 0 && army2.size() > 0)\n {\n army2.get(0).takeDamage(army1.get(0).damage());\n if(army2.get(0).isDead())\n {\n army2.remove(0);\n }\n turn = 2;\n }\n else\n {\n turn = 3;\n }\n \n break;\n case 2:\n Collections.shuffle(army1);\n Collections.shuffle(army2);\n if (army2.size() > 0 && army1.size() > 0)\n {\n army1.get(0).takeDamage(army2.get(0).damage());\n if(army1.get(0).isDead())\n {\n army1.remove(0);\n }\n turn = 1;\n }\n else\n {\n turn = 3;\n }\n \n break;\n default:\n fighting = false;\n if(army2.size() > 0 && army1.size() <= 0)\n System.out.println(\"army2 wins\");\n if(army2.size() <= 0 && army1.size() > 0)\n System.out.println(\"army1 wins\");\n break; \n }\n \n \n \n \n }\n \n }",
"public static boolean addFireWound(@Nullable Creature performer, @Nonnull Creature defender, int pos, double damage, float armourMod, float infection, float poison, boolean noMinimumDamage, boolean spell) {\n/* 1798 */ if (performer != null && performer.getTemplate().getCreatureAI() != null)\n/* */ {\n/* 1800 */ damage = performer.getTemplate().getCreatureAI().causedWound(performer, defender, (byte)4, pos, armourMod, damage);\n/* */ }\n/* */ \n/* 1803 */ if (defender.getTemplate().getCreatureAI() != null)\n/* */ {\n/* 1805 */ damage = defender.getTemplate().getCreatureAI().receivedWound(defender, performer, (byte)4, pos, armourMod, damage);\n/* */ }\n/* */ \n/* 1808 */ if (defender.getCultist() != null && defender.getCultist().hasNoElementalDamage())\n/* 1809 */ return false; \n/* 1810 */ boolean dead = false;\n/* 1811 */ if (damage * armourMod > 500.0D || noMinimumDamage) {\n/* */ DbWound dbWound;\n/* 1813 */ if (defender.hasSpellEffect((byte)68)) {\n/* */ \n/* 1815 */ defender.reduceStoneSkin();\n/* 1816 */ return false;\n/* */ } \n/* 1818 */ Wound wound = null;\n/* 1819 */ boolean foundWound = false;\n/* 1820 */ if (performer != null) {\n/* */ \n/* 1822 */ ArrayList<MulticolorLineSegment> segments = new ArrayList<>();\n/* 1823 */ segments.add(new MulticolorLineSegment(\"Your weapon\", (byte)3));\n/* 1824 */ segments.add(new MulticolorLineSegment(\" burns \", (byte)3));\n/* 1825 */ segments.add(new CreatureLineSegment(defender));\n/* 1826 */ segments.add(new MulticolorLineSegment(\".\", (byte)3));\n/* */ \n/* 1828 */ performer.getCommunicator().sendColoredMessageCombat(segments);\n/* */ \n/* 1830 */ segments.set(0, new CreatureLineSegment(performer));\n/* 1831 */ for (MulticolorLineSegment s : segments) {\n/* 1832 */ s.setColor((byte)7);\n/* */ }\n/* 1834 */ defender.getCommunicator().sendColoredMessageCombat(segments);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* 1840 */ if (defender.getBody().getWounds() != null) {\n/* */ \n/* 1842 */ wound = defender.getBody().getWounds().getWoundTypeAtLocation((byte)pos, (byte)4);\n/* 1843 */ if (wound != null)\n/* */ {\n/* 1845 */ if (wound.getType() == 4) {\n/* */ \n/* 1847 */ defender.setWounded();\n/* 1848 */ wound.setBandaged(false);\n/* 1849 */ dead = wound.modifySeverity((int)(damage * armourMod), (performer != null && performer.isPlayer()), spell);\n/* 1850 */ foundWound = true;\n/* */ } else {\n/* */ \n/* 1853 */ wound = null;\n/* */ } } \n/* */ } \n/* 1856 */ if (wound == null)\n/* */ {\n/* 1858 */ if (WurmId.getType(defender.getWurmId()) == 1) {\n/* 1859 */ TempWound tempWound = new TempWound((byte)4, (byte)pos, (float)damage * armourMod, defender.getWurmId(), poison, infection, spell);\n/* */ } else {\n/* */ \n/* 1862 */ dbWound = new DbWound((byte)4, (byte)pos, (float)damage * armourMod, defender.getWurmId(), poison, infection, (performer != null && performer.isPlayer()), spell);\n/* */ } \n/* */ }\n/* 1865 */ if (!foundWound)\n/* 1866 */ dead = defender.getBody().addWound((Wound)dbWound); \n/* */ } \n/* 1868 */ return dead;\n/* */ }",
"public void attackEntity(Entity entityToHit) {\n ItemStack item = tinkerProjectile.getItemStack();\n ItemStack launcher = tinkerProjectile.getLaunchingStack();\n\n // deal damage if we have everything\n if(item.getItem() instanceof ToolCore && this.attacker != null) {\n EntityLivingBase attacker = (EntityLivingBase) this.attacker;\n //EntityLivingBase target = (EntityLivingBase) raytraceResult.entityHit;\n\n // find the actual itemstack in the players inventory\n ItemStack inventoryItem = AmmoHelper.getMatchingItemstackFromInventory(tinkerProjectile.getItemStack(), attacker, false);\n if(inventoryItem.isEmpty() || inventoryItem.getItem() != item.getItem()) {\n // backup, use saved itemstack\n inventoryItem = item;\n }\n\n // for the sake of dealing damage we always ensure that the impact itemstack has the correct broken state\n // since the ammo stack can break while the arrow travels/if it's the last arrow\n boolean brokenStateDiffers = ToolHelper.isBroken(inventoryItem) != ToolHelper.isBroken(item);\n if(brokenStateDiffers) {\n toggleBroken(inventoryItem);\n }\n\n Multimap<String, AttributeModifier> projectileAttributes = null;\n // remove stats from held items\n if(!world.isRemote) {\n unequip(attacker, EntityEquipmentSlot.OFFHAND);\n unequip(attacker, EntityEquipmentSlot.MAINHAND);\n\n // apply stats from projectile\n if(item.getItem() instanceof IProjectile) {\n projectileAttributes = ((IProjectile) item.getItem()).getProjectileAttributeModifier(inventoryItem);\n\n if(launcher.getItem() instanceof ILauncher) {\n ((ILauncher) launcher.getItem()).modifyProjectileAttributes(projectileAttributes, tinkerProjectile.getLaunchingStack(), tinkerProjectile.getItemStack(), tinkerProjectile.getPower());\n }\n\n // factor in power\n projectileAttributes.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(),\n new AttributeModifier(PROJECTILE_POWER_MODIFIER, \"Weapon damage multiplier\", tinkerProjectile.getPower() - 1f, 2));\n\n attacker.getAttributeMap().applyAttributeModifiers(projectileAttributes);\n }\n // deal the damage\n// ToolHelper.attackEntity(item, (ToolCore) item.getItem(), attacker, entityToHit, null);\n// float speed = MathHelper.sqrt(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);\n\n boolean attack = ToolHelper.attackEntity(item, (ToolCore) item.getItem(), attacker, entityToHit, null);\n// if(attack) {\n//// for(IProjectileTrait trait : tinkerProjectile.getProjectileTraits()) {\n//// trait.afterHit(tinkerProjectile.get, this.world, inventoryItem, attacker, entityToHit, (double) 0.0);\n//// }\n//\n// // if on fire, set the entity on fire, like vanilla arrows\n//// if (this.isBurning() && !(entityToHit instanceof EntityEnderman)) {\n//// entityToHit.setFire(5);\n//// }\n// }\n if(brokenStateDiffers) {\n toggleBroken(inventoryItem);\n }\n\n // remove stats from projectile\n // apply stats from projectile\n if(item.getItem() instanceof IProjectile) {\n assert projectileAttributes != null;\n attacker.getAttributeMap().removeAttributeModifiers(projectileAttributes);\n }\n\n // readd stats from held items\n equip(attacker, EntityEquipmentSlot.MAINHAND);\n equip(attacker, EntityEquipmentSlot.OFFHAND);\n }\n }else {\n System.out.println(\"something failed with attacking.\");\n }\n }",
"public void act() \n {\n checkCollision();\n KeyMovements(); \n attackWeapon();\n //stopGame();\n \n }",
"public void OnDamage(AI ai, int aTK, float f) {\n\tif(DamagedTimer < 0.8f)\n\t\treturn;\n\tvel.x = f;\n\tvel.y = 3;\n\tDamagedTimer = 0;\n\tgrounded = false;\n\taTK -= (getDEF()*0.8f);\n\tif(aTK <= 0)\n\t\taTK = 1;\n\tHP -= aTK;\n\tInventory.CurrentInventory.dmgTxts.add(new dmgText(pos.x, pos.y+1, aTK));\n\t\n\tSoundManager.PlaySound(\"playerHurt\",3);\n\t\n\t\n}",
"@Test\n void doEffectelectroscythe() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n setPlayers(pl);\n WeaponFactory wf = new WeaponFactory(\"electroscythe\");\n Weapon w1 = new Weapon(\"electroscythe\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.getWeapons().add(w1);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w1.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(0));\n Terminator t = new Terminator('y', Board.getSquare(0));\n t.setOwnerColor(victim.getColor());\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(t);\n try{\n p.getPh().getWeaponDeck().getWeapon(w1.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && t.getPb().countDamages() == 2);\n\n try{\n p.getPh().getWeaponDeck().getWeapon(w1.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3 && t.getPb().countDamages() == 3);\n }",
"public boolean causeFallDamage(float debug1, float debug2) {\n/* 1669 */ if (this.abilities.mayfly) {\n/* 1670 */ return false;\n/* */ }\n/* */ \n/* 1673 */ if (debug1 >= 2.0F) {\n/* 1674 */ awardStat(Stats.FALL_ONE_CM, (int)Math.round(debug1 * 100.0D));\n/* */ }\n/* 1676 */ return super.causeFallDamage(debug1, debug2);\n/* */ }",
"public void takeDamage(double damage){\n damage -= this.armor;\n this.health -= damage;\n }",
"public void Beginattack(HW10Trainer[] people, int numTrainer,Scanner scan)\n{\nString name1, name2;\nname1=scan.next();//reads the first part and sets it as a string \nname2=scan.next();//reads the second part and sets it as a string \nscan.nextLine();\nHW10Trainer a = new HW10Trainer();//pre set\nHW10Trainer b= new HW10Trainer(); \n\nfor (int i =0; i<numTrainer; i++)///matches the trainer with there name\n{\n\tif(name1.equals(people[i].getName()))//determines which trainer in the array goes with this name\n\t{\n\t\ta=people[i];\n\t}\n\tif(name2.equals(people[i].getName()))\n\t{\n\t\tb=people[i];\n\t}\n}\nint max1,max2;\nmax1=a.getNumMonsters();//gets the total amount of pokemen for that trainer\nmax2=b.getNumMonsters();\nint curr1,curr2; //acts as the index place value for the array \ncurr1=0;//starts the array at poistion 0\ncurr2=0;\nHW10Monster side1,side2;//sets the side for the battle \nside1= a.getMonster(curr1);//sets side one for all of the first trainers monsters\nside2=b.getMonster(curr2);//side two = all seconds trainers monsters\nSystem.out.println(a.getName() + \" is fighting \" + b.getName());\nSystem.out.println(\"Starting battle is \" + side1.name + \" versus \" + side2.name);\nwhile(curr1 < max1 && curr2<=max2)//if curr1 is less then max and curr2 is less then max2 then run\n{\n\t\n\tint result = fight(side1,side2,a,b);//sends the fight method the pokemon information and the Trainers information\nif(result==1)\n{\n\tSystem.out.println(b.getName() +\"'s \" + side2.name + \" lost\");\n\tcurr2++;//if side 2 is losing / below 1 then call next monster\n\tif(curr2<max2)\n\t\tside2=b.getMonster(curr2);\n\tSystem.out.println(b.getName() + \" is bringing out \" + side2.name);\n}\n else if(result == 2)\n{\n\tSystem.out.println(a.getName() +\"'s \" + side1.name + \" lost\");\n\tcurr1++;//if side 1 is losing/ below 1 the call next monster\n\tif(curr1<max1)\n\t\tside1=a.getMonster(curr1);\n\tSystem.out.println(a.getName() + \" is bringing out \" + side1.name);\n}\n else if(result == 3)\n{\n\tSystem.out.println(\"*Draw*\");\n\tSystem.out.println(a.getName() +\"'s \" + side1.name + \" lost\");\n\tcurr1++;//if side 1 is losing/ below 1 the call next monster\n\tif(curr1<max1)\n\t\tside1=a.getMonster(curr1);\n\t\n\tSystem.out.println(a.getName() + \" is bringing out \" + side1.name);\n\tSystem.out.println(b.getName() +\"'s \" + side2.name + \" lost\");\n\tcurr2++;//if side 2 is losing / below 1 then call next monster\n\t\n\tif(curr2 < max2)\n\t\tside2=b.getMonster(curr2);\n\tSystem.out.println(b.getName() + \" is bringing out \" + side2.name);\n\tSystem.out.println(\"* End Draw *\");\n}\n\n\n\t\n}\n\tif( curr1<max1 && curr2>max2)//if the first trainer still has pokemon and the second does not\n\t{\n\t\tSystem.out.println(a.getName() + \" won the match\");\n\t}\n\telse if (curr2<max2 && curr1>max1)//if the second trainer still has pokemon and the first does not\n\t{\n\t\t\n\t\tSystem.out.println(b.getName() + \" won the match\");\n\t}\n\telse if(curr2<max2 && curr1<max1)//if both sides dont have any pokemon left\n\t\tSystem.out.println(\"Battle is a draw\");\n\n}",
"@Test\n void doEffecthellion() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"hellion\");\n Weapon w5 = new Weapon(\"hellion\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.addWeapon(w5);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w5);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w5.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('b'));\n Terminator t = new Terminator('e', Board.getSpawnpoint('b'));\n t.setOwnerColor(victim.getColor());\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(t);\n try{\n p.getPh().getWeaponDeck().getWeapon(w5.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().getMarkedDamages('b') == 1 && victim.getPb().countDamages() == 1 && t.getPb().getMarkedDamages('b') == 1);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('b'));\n t = new Terminator('e', Board.getSpawnpoint('b'));\n t.setOwnerColor(victim.getColor());\n players.clear();\n players.add(victim);\n players.add(t);\n\n try{\n p.getPh().getWeaponDeck().getWeapon(w5.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().getMarkedDamages('b') == 2 && victim.getPb().countDamages() == 1 && t.getPb().getMarkedDamages('b') == 2);\n }",
"public void update(float delta) {\n\t\tfor(DefenseTower tower : world.getDefenseTowers()) {\n\t\t for(Enemy enemy : world.getEnemies()) {\n\t\t\t if(tower.isPowered() == true && tower.inRange(enemy)) {\n\t\t\t\t\ttower.fireBullets(enemy, delta);\n\t\t\t\t\t//enemy.takeHit(tower.POWER*delta);\n\t\t\t\t\tif(!enemy.isAlive()) {\n\t\t\t\t\t world.getEnemies().removeValue(enemy, false);\n\t\t\t\t\t}\n\t\t\t } \n\t\t\t}\n\t\t}\n\t\n\t\t// Towncentre actions goes here. It shoots enemies here.\n\t\tTownCentre tCentre = world.getTownCentre();\n\t for(Enemy enemy : world.getEnemies()) {\n\t\t if(tCentre.inRange(enemy)) {\n\t\t\t\ttCentre.fireBullets(enemy, delta);\n\t\t\t\t//enemy.takeHit(tCentre.POWER*delta);\n\t\t\t\tif(!enemy.isAlive()) {\n\t\t\t\t world.getEnemies().removeValue(enemy, false);\n\t\t\t\t}\n\t\t } \n\t\t}\n\t \n\t // Soldiers attack enemies here.\n\t for(Soldier s: InstanceManager.getInstance().getSoldiers()) {\n\t \t//s.attackEveryEnemy(delta, InstanceManager.getInstance().getDefenseTowers());\n\t }\n\t\n\t /*for(Enemy enemy : world.getEnemies()) {\n\t\t\tfor(Tower tower : world.getTowers()) {\n\t\t\t if(enemy.inRange(tower)) {\n\t\t\t\t tower.takeHit(enemy.STRENGTH*delta);\n\t\t\t\t //System.out.println(\"tower \" + tower.UID + \"strength is \" + tower.STRENGTH);\n\t\t\t\t if(!tower.isAlive) {\n\t\t\t\t\t \tif(world.getTowers().indexOf(tower, false) !=-1)\n\t\t\t\t\t \t\tactiveTower=-1;\n\t\t\t\t\t world.getTowers().removeValue(tower, false);\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t}\n\t\t\t// This makes townCentre take the hit.\n\t\t\tif(enemy.inRange(tCentre) && tCentre.isAlive) {\n\t\t\t\ttCentre.takeHit(enemy.STRENGTH*delta);\n\t\t\t\t //System.out.println(\"TownCenter \" + tCentre.UID + \"strength is \" + tCentre.STRENGTH);\n\t\t\t}\n\t }*/\n\t\t\n\t // Steams attackers attack towers and links here\n\t sAttackers.AttackTowersAndLinks(delta);\n\t\t\n\t\tfor(Tower tower : world.getTowers()) {\n\t\t tower.update(delta);\n\t\t}\n\t\t\n\t\tfor(Enemy enemy : world.getEnemies()) {\n\t\t enemy.update(delta);\n\t\t if(enemy.getPosition().x > 21 && enemy.getPosition().y > 14)\n\t\t \tworld.getEnemies().removeValue(enemy, false);\n\t\t}\n\t\t\n\t\tfor(Person p: InstanceManager.getInstance().getPeople()) {\n\t\t\tp.update(delta);\n\t\t}\n\t\t\n\t\tfor(Soldier s : InstanceManager.getInstance().getSoldiers()) {\n\t\t\ts.update(delta);\n\t\t}\n\t\t\n\t\t// A lot happens here.\n\t\tInstanceManager.getInstance().update(delta);\n\t\t\n\t\tfor(DefenseTower tower : world.getDefenseTowers()) {\n\t\t\ttower.update(delta);\n\t\t}\n\t\t// If game slows down you can limit updation timing here.\n\t\ttCentre.update(delta);\n\t\tgManager.update(delta);\n\t\tworld.update(delta);\n\t\tsController.update();\n\t\t\n }",
"private void fuck(int x, int y) {\n\t\tFish son = new Fish(x, y, this.environment, this.appConfig, this.scheduler);\n\t\tson.color = Color.YELLOW; // yellow when fish is a newborn\n\t\tthis.environment.addAgent(son, x, y);\n\t\tthis.scheduler.birth(son);\n\t\tthis.breedTime = this.appConfig.getFishBreedTime(); // reset breed time\n\t}",
"public void act()\r\n {\n if (Greenfoot.getRandomNumber(1000)< flyRate)\r\n {\r\n addObject(new Fly(), getWidth(), Greenfoot.getRandomNumber(300));\r\n //flyRate++;\r\n }\r\n }",
"public void trackAndFire() {\n \t \tdouble theta;\n double distanciaObjetivo = myPos.distance(objetivo.pos);\n //Hallar el proximo punto en un perímetro definido\n \t\t//(30,30) elimina bordes y despues el -60 para la longitud de los dados\n Rectangle2D.Double perimetro = new Rectangle2D.Double(30, 30, getBattleFieldWidth() - 60, getBattleFieldHeight() - 60);\n \n \n \n //if my cannon is locked and ready and i got some energy left fire with\n //appropiate energy to not get stuck, fire in the execute rather than now\n \n if(getGunTurnRemaining() == 0 && myEnergy > 1) {\n setFire( Math.min(Math.min(myEnergy/6.0, 1000/distanciaObjetivo), objetivo.energy/3.0) );\n }\n \n //any other case, ill get aim lock with this function\n //normalize sets between pi -pi\n setTurnGunRightRadians(Utils.normalRelativeAngle(angulo(objetivo.pos, myPos) - getGunHeadingRadians()));\n \n\n double distNextPunto = myPos.distance(futurePos);\n \n \n if(distNextPunto > 20) {\n \t//aun estamos lejos\n \n \t\t\n \t\t//theta es el angulo que hemos de cortar para ponernos \"encarando\" bien\n theta = angulo(futurePos, myPos) - getHeadingRadians();\n \n \n double sentido = 1;\n \n if(Math.cos(theta) < 0) {\n theta += Math.PI;\n sentido = -1;\n }\n \n setAhead(distNextPunto * sentido);\n theta = Utils.normalRelativeAngle(theta);\n setTurnRightRadians(theta);\n \n if(theta > 1)setMaxVelocity(0.0);\n else setMaxVelocity(8.0); // max\n \n \t\n \n } else {\n \t //ENTRO AQUI SI ME QUEDA POCO PARA LLEGAR, SMOOTH CORNERING\n\n \t\t\n //probar 1000 coordenadas\n int iterNum = 1000;\n Point2D.Double cand;\n for(int i =0; i < iterNum; i++){\n \n //i dont want it to be close to another bot, thats the meaning of distanciaObjetivo*0.8\n cand = hallarPunto(myPos, Math.min(distanciaObjetivo*0.8, 100 + iterNum*Math.random()), 2*Math.PI*Math.random());\n if(perimetro.contains(cand) && evalHeuristic(cand) < evalHeuristic(futurePos)) {\n futurePos = cand;\n }\n \n \n } \n \n prevPos = myPos;\n \n }\n }",
"public void fireTorpedo() {\n\t\t// Has player waited cooldown before trying to fire again?\n\t\tif (System.currentTimeMillis() - this.lastFired > Config.WEAPON_COOLDOWN_TIME * 1000) {\n\t\t\tSystem.out.println(player.getDisplayName() + \" is attempting to fire a torpedo\");\n\t\t\t// Can this airship fire torpedoes?\n\t\t\tif (this.properties.FIRES_TORPEDO) {\n\t\t\t\tBlock[] cannons = getCannons();\n\t\t\t\tint numfiredcannons = 0;\n\t\t\t\tfor (int i = 0; i < cannons.length; i++) {\n\t\t\t\t\tif (cannons[i] != null && cannonHasTnt(cannons[i], Config.NUM_TNT_TO_FIRE_TORPEDO)) {\n\t\t\t\t\t\tBlockFace face = ((Directional) cannons[i].getState().getData()).getFacing();\n\t\t\t\t\t\tboolean missingMaterial = false;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int id : Config.MATERIALS_NEEDED_FOR_TORPEDO) {\n\t\t\t\t\t\t\tif (!cannonHasItem(cannons[i], id, 1)) {\n\t\t\t\t\t\t\t\tmissingMaterial = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!cannons[i].getRelative(face.getModX(), 0, face.getModZ()).getType().equals(Material.AIR) || missingMaterial)\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (numfiredcannons < this.properties.MAX_NUMBER_OF_CANNONS) {\n\t\t\t\t\t\t\tnumfiredcannons++;\n\t\t\t\t\t\t\tlastFired = System.currentTimeMillis();\n\t\t\t\t\t\t\twithdrawTnt(cannons[i], Config.NUM_TNT_TO_FIRE_TORPEDO);\n\t\t\t\t\t\t\tfor (int id : Config.MATERIALS_NEEDED_FOR_TORPEDO) {\n\t\t\t\t\t\t\t\twithdrawItem(cannons[i], id, 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Fire some torpedoes TODO: maybe add sound effects for tnt firing? :P\n\t\t\t\t\t\t\tnew Torpedo(cannons[i], face);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// More cannons on ship than allowed. Not all fired - can break out of loop now.\n\t\t\t\t\t\t\t//player.sendMessage(ChatColor.AQUA + \"Some cannons did not fire. Max cannon limit is \" + ChatColor.GOLD + this.properties.MAX_NUMBER_OF_CANNONS);\n\t\t\t\t\t\t\tplayer.sendMessage(ChatColor.AQUA + \"Some missiles did not fire. item check = \" + ChatColor.GOLD + missingMaterial);\n\t\t\t\t\t\t\tplayer.sendMessage(ChatColor.AQUA + \"numFiredCannons = \" + ChatColor.GOLD + numfiredcannons);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\tplayer.sendMessage(ChatColor.GOLD + this.properties.SHIP_TYPE + \" CANNOT FIRE TORPEDO\");\n\t\t} else\n\t\t\tplayer.sendMessage(ChatColor.GOLD + \"COOLING DOWN FOR \" + ChatColor.AQUA + (int)(Math.round(6 - (System.currentTimeMillis() - this.lastFired) / 1000)) + ChatColor.GOLD + \" MORE SECONDS\");\n\t}",
"@Override\n public void applyEffect(Battle battle, Cell cell, Account player, int activeTime) {\n /* if (activeTime != -1)\n return;\n ManaItemBuff manaItemBuff = new ManaItemBuff(player, 1);\n manaItemBuff.setTurnCounter(-5);\n manaItemBuff.castBuff();\n player.getOwnBuffs().add(manaItemBuff);*/\n }",
"@Test\n void doEffectshockwave() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n RealPlayer b = new RealPlayer('b', \"blue\");\n RealPlayer e = new RealPlayer('e', \"emerald\");\n RealPlayer gr = new RealPlayer('g', \"grey\");\n RealPlayer v = new RealPlayer('v', \"violet\");\n RealPlayer y = new RealPlayer('y', \"yellow\");\n AlphaGame.getPlayers().add(b);\n AlphaGame.getPlayers().add(e);\n AlphaGame.getPlayers().add(gr);\n AlphaGame.getPlayers().add(v);\n AlphaGame.getPlayers().add(y);\n WeaponFactory wf = new WeaponFactory(\"shockwave\");\n Weapon w12 = new Weapon(\"shockwave\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w12);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w12.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(5));\n RealPlayer victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSquare(10));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(victim2);\n players.add(victim3);\n try{\n p.getPh().getWeaponDeck().getWeapon(w12.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException ex) { }\n\n assertTrue(victim.getPb().countDamages() == 1 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1);\n\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(5));\n victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSquare(10));\n players.clear();\n players.add(victim2);\n players.add(victim3);\n try{\n p.getPh().getWeaponDeck().getWeapon(w12.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException ex) { }\n\n assertTrue(victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(5));\n victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSquare(10));\n RealPlayer victim4 = new RealPlayer('b', \"ciccia\");\n RealPlayer victim5 = new RealPlayer('p', \"ciccia\");\n victim4.setPlayerPosition(Board.getSquare(1));\n victim5.setPlayerPosition(Board.getSquare(0));\n players.clear();\n try {\n p.getPh().getWeaponDeck().getWeapon(w12.getName()).doEffect(\"alt\", null, null, p, null, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException ex) { }\n\n assertTrue(victim.getPb().countDamages() == 1 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 1 && victim4.getPb().countDamages() == 0 && victim5.getPb().countDamages() == 0);\n }",
"public void shootGun() {\n\t\tammo--;\n\t}",
"protected void attackEntity(Entity par1Entity, float par2) {\n/* 310 */ if (this.attackTime <= 0 && par2 < 3.0F && (par1Entity.func_174813_aQ()).field_72337_e > (func_174813_aQ()).field_72338_b && (par1Entity.func_174813_aQ()).field_72338_b < (func_174813_aQ()).field_72337_e) {\n/* */ \n/* 312 */ if (getIsSummoned()) {\n/* 313 */ ((EntityLivingBase)par1Entity).field_70718_bc = 100;\n/* */ }\n/* */ \n/* 316 */ this.attackTime = 15 + this.field_70146_Z.nextInt(10);\n/* */ \n/* 318 */ double mx = par1Entity.field_70159_w;\n/* 319 */ double my = par1Entity.field_70181_x;\n/* 320 */ double mz = par1Entity.field_70179_y;\n/* 321 */ if (func_70652_k(par1Entity) && \n/* 322 */ !this.field_70170_p.field_72995_K && par1Entity instanceof EntityLivingBase) {\n/* 323 */ ((EntityLivingBase)par1Entity).func_70690_d(new PotionEffect(MobEffects.field_76437_t, 100, 0));\n/* */ }\n/* */ \n/* 326 */ par1Entity.field_70160_al = false;\n/* 327 */ par1Entity.field_70159_w = mx;\n/* 328 */ par1Entity.field_70181_x = my;\n/* 329 */ par1Entity.field_70179_y = mz;\n/* */ \n/* 331 */ func_184185_a(SoundsTC.swarmattack, 0.3F, 0.9F + this.field_70170_p.field_73012_v.nextFloat() * 0.2F);\n/* */ } \n/* */ }",
"public void actionCombat(Party p1) {\n System.out.println(\"______________________________________________________________________________\\n\");\n System.out.println(this.Name + \" is attacking ...\");\n int choice = (int)(Math.random() * p1.getTeam().size());\n Character target = p1.getTeam().get(choice);\n System.out.println(this.Name + \" attacks \" + target.getName() + \"!\");\n\n if (this.SPEED - target.getSPEED() < 5) {\n int damage = Math.max(this.ATK - target.getDEF(), 0);\n System.out.println(this.Name + \" has inflicted \" + damage + \" damages to \" + target.getName() + \"!\");\n target.setActualHP(Math.max(0, target.getActualHP() - damage));\n if (target.getActualHP() == 0) {\n System.out.println(\"\\n\" + target.getName() + \" is down!\\n\");\n target.setIsDead(true);\n }\n }\n else {\n int n = 0;\n while ((target.actualHP != 0) && (n < 2)) {\n if (n == 1) {\n choice = (int)(Math.random() * p1.getTeam().size() + 1);\n target = p1.getTeam().get(choice);\n System.out.println(this.Name + \" attacks \" + target.getName() + \"!\");\n }\n int damage = Math.max(this.ATK - target.getDEF(), 0);\n System.out.println(this.Name + \" has inflicted \" + damage + \" damages to \" + target.getName() + \"!\");\n target.setActualHP(Math.max(0, target.getActualHP() - damage));\n if (target.getActualHP() == 0) {\n System.out.println(\"\\n\" + target.getName() + \" is down!\\n\");\n target.setIsDead(true);\n }\n if (n == 0) System.out.println(this.Name + \" attacks again ...\");\n n++;\n }\n }\n }",
"public void startFCombat() {\n\t\ttry { \n\t\t\tenemyName = Monster.getFBossName();\n\t\t\tSystem.out.println(\"\\t!#> \" + enemyName + \" has appeared! <#! \");\n\t\t\tenemyNewHealth = Monster.getFBossHealth();\n\n\t\t\t// While enemy is alive\n\t\t\tCOMBAT_START: while (enemyNewHealth > 0) {\n\t\t\t\tSystem.out.println(Player.getPlayerName() + \"\\n HP: \" + playerNewHealth + \" Stamina: \"\n\t\t\t\t\t\t+ Player.getPlayerStamina());\n\t\t\t\tSystem.out.println(\"----------------------------\");\n\t\t\t\tSystem.out.println(enemyName + \" HP: \" + enemyNewHealth);\n\n\t\t\t\tScanner in = new Scanner(System.in);\n\t\t\t\tSystem.out.println(\"\\n\\t # ACTIONS # \");\n\t\t\t\tSystem.out.println(\"\\t1.) Attack!\");\n\t\t\t\tSystem.out.println(\"\\t2.) Block!\");\n\t\t\t\tSystem.out.println(\"\\t3.) Run!\\n\");\n\t\t\t\tSystem.out.println(\"What are you going to do?\");\n\t\t\t\tint input = in.nextInt();\n\t\t\t\t// conditonal preventing other input\n\t\t\t\tif (input == 1 || input == 2 || input == 3) {\n\t\t\t\t\t// Attack\n\t\t\t\t\tif (input == 1) {\n\t\t\t\t\t\tenemySwing = rand.nextInt(Monster.getFBossAttack()+1);\n\t\t\t\t\t\thit = rand.nextInt(Player.Attack()+1);\n\t\t\t\t\t\tSystem.out.println(\"You lunge forward and strike the \" + enemyName + \"!!\");\n\t\t\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\t\t\t\t\t\tSystem.out.println(\"You dealt \" + hit + \" damage!\");\t\t\n\t\t\t\t\t\tSystem.out.println(enemyName + \" dealt \" + enemySwing + \" Damage!\");\n\t\t\t\t\t\tenemyNewHealth = enemyNewHealth - hit;\n\t\t\t\t\t\tplayerNewHealth = playerNewHealth - enemySwing;\n\t\t\t\t\t\tif (playerNewHealth <= 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"\\t!@#$%^ GAME OVER ^%$#@!\");\n\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (enemyNewHealth <= 0) {\n\t\t\t\t\t\t\tenemyNewHealth = 0;\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"The \" + enemyName + \" has \" + enemyNewHealth + \" health left!\");\n\t\t\t\t\t\t\tcontinue COMBAT_START;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Block\n\t\t\t\t\tif (input == 2) {\n\t\t\t\t\t\tenemySwing = rand.nextInt(Monster.Attack());\n\t\t\t\t\t\tSystem.out.println(\"You attempt to cower behind your shield!\");\n\t\t\t\t\t\t// Block\n\t\t\t\t\t\tif (Player.Block() == true) {\n\t\t\t\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\n\t\t\t\t\t\t\tSystem.out.println(\"\\tBlock Successful!\");\n\t\t\t\t\t\t\tSystem.out.println(enemyName + \" trys to deal \" + enemySwing + \" damage!\");\n\t\t\t\t\t\t\t// how much is blocked\n\t\t\t\t\t\t\tenemySwing = enemySwing - rand.nextInt(Player.getPlayerMaxBlock());\n\t\t\t\t\t\t\t// if how much is blocked results neg make it 0\n\t\t\t\t\t\t\tif (enemySwing <= 0) {\n\t\t\t\t\t\t\t\tenemySwing = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// output results\n\t\t\t\t\t\t\tSystem.out.println(\"You took \" + enemySwing + \" damage\");\n\t\t\t\t\t\t\t// adjust health value\n\t\t\t\t\t\t\tplayerNewHealth = playerNewHealth - enemySwing;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(enemyName + \" dealt \" + enemySwing + \" damage!\");\n\t\t\t\t\t\t\tplayerNewHealth = playerNewHealth - enemySwing;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (playerNewHealth <= 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"\\t!@#$%^ GAME OVER ^%$#@!\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue COMBAT_START;\n\n\t\t\t\t\t}\n\t\t\t\t\t// Run chance\n\t\t\t\t\tif (input == 3) {\n\t\t\t\t\t\tSystem.out.println(\"You attempt to flee!\");\n\t\t\t\t\t\t// roll to see if flee\n\t\t\t\t\t\tif (Player.Run() == true) {\n\t\t\t\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\t\t\t\t\t\t\tSystem.out.println(\"you've run away from the \" + enemyName + \"!\");\n\t\t\t\t\t\t\tbreak COMBAT_START;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tenemySwing = rand.nextInt(Monster.Attack());\n\t\t\t\t\t\t\tSystem.out.println(enemyName + \" dealt \" + enemySwing + \" Damage!\");\n\t\t\t\t\t\t\tplayerNewHealth = playerNewHealth - enemySwing;\n\t\t\t\t\t\t\tcontinue COMBAT_START;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"\\t!!!Invalid Input!!!\");\n\t\t\t\t\tSystem.out.println(\"\\tPlease try Again.\");\n\t\t\t\t}\n\n\t\t\t\t// When Enemy Dies.\n\t\t\t\t//TODO: add timeunit here\n\t\t\t\tif (enemyNewHealth <= 0) {\n\t\t\t\t\tSystem.out.println(\"You have defeated \" + enemyName + \"!!\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tYou have beaten my FIRST game ever.\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tThank you so fuckin' much for playing.\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tit means the W O R L D to me :)\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tIf you want to see more of my work,\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tfollow me on Twitter @Simons_saysNull\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\t\t\t\t\tSystem.out.println(\"\\tThanks again for playing my game. - Robb Simons\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tcontinue COMBAT_START;\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\r\n\tpublic void visit(Fighter fighter)\r\n\t{\n\t\t\r\n\t}",
"@Test\n void doEffectthor() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"t.h.o.r.\");\n Weapon w15 = new Weapon(\"t.h.o.r.\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w15);\n p.setPlayerPosition(Board.getSquare(6));\n p.getPh().drawWeapon(wd, w15.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n RealPlayer victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(10));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n players.add(victim2);\n try {\n p.getPh().getWeaponDeck().getWeapon(w15.getName()).doEffect(\"base\", \"opt1\", null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(7));\n victim2 = new RealPlayer('v', \"ciccia\");\n victim2.setPlayerPosition(Board.getSquare(10));\n RealPlayer victim3 = new RealPlayer('g', \"ciccia\");\n victim3.setPlayerPosition(Board.getSpawnpoint('y'));\n players.clear();\n players.add(victim);\n players.add(victim2);\n players.add(victim3);\n try {\n p.getPh().getWeaponDeck().getWeapon(w15.getName()).doEffect(\"base\", \"opt1\", \"opt2\", p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2 && victim2.getPb().countDamages() == 1 && victim3.getPb().countDamages() == 2);\n }",
"public Player fight() {\n if (player1.getCurrentFighter()==null && player2.getCurrentFighter()==null)\n throw new IllegalArgumentException(\"Both of the players have no fighters !\");\n\n if (player2.getCurrentFighter()==null || player2.getCurrentFighter().getOriginalHealth()<=0)\n return player1;\n else if (player1.getCurrentFighter()==null || player1.getCurrentFighter().getOriginalHealth()<=0)\n return player2;\n\n\n while (player1.getCurrentFighter().isAlive() && player2.getCurrentFighter().isAlive()) {\n boolean turn = random.nextBoolean();\n\n if (turn) { // Fighter1 attack first\n player2.getCurrentFighter().takeDamage(player1.getCurrentFighter().getAttack());\n\n if (player2.getCurrentFighter().isAlive())\n player1.getCurrentFighter().takeDamage(player2.getCurrentFighter().getAttack());\n }\n else { // Fighter2 attack first\n player1.getCurrentFighter().takeDamage(player2.getCurrentFighter().getAttack());\n\n if (player1.getCurrentFighter().isAlive())\n player2.getCurrentFighter().takeDamage(player1.getCurrentFighter().getAttack());\n }\n }\n\n if (!player1.getCurrentFighter().isAlive())\n return player2;\n else\n return player1;\n\n }",
"public void fly(float fly){\n\t}",
"@Test\n void doEffectshotgun() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"shotgun\");\n Weapon w9 = new Weapon(\"shotgun\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n wd.addWeapon(w9);\n p.setPlayerPosition(Board.getSquare(0));\n p.getPh().drawWeapon(wd, w9.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(0));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n ArrayList<GenericSquare> s = new ArrayList<>();\n try{\n p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 3 && victim.getPlayerPosition() == Board.getSquare(0));\n\n s.add(Board.getSquare(1));\n try{\n p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect(\"base\", null, null, p, players, s);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 6 && victim.getPlayerPosition() == Board.getSquare(1));\n\n s.clear();\n s.add(Board.getSpawnpoint('b'));\n try {\n p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect(\"base\", null, null, p, players, s); //A choice of yours is yours\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSquare(1));\n players.clear();\n players.add(victim);\n s.clear();\n try {\n p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect(\"alt\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().countDamages() == 2);\n\n victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('b'));\n players.clear();\n players.add(victim);\n s.clear();\n try{\n p.getPh().getWeaponDeck().getWeapon(w9.getName()).doEffect(\"alt\", null, null, p, players, null); //A choice of yours is wrong\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n }",
"@Test\n void doEffectwhisper() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n WeaponFactory wf = new WeaponFactory(\"whisper\");\n Weapon w6 = new Weapon(\"whisper\", wf.getBooleans(), wf.getCosts(), wf.getRequestedNum(), wf.getApplier(), wf.getEffects(), wf.getDescriptions());\n WeaponDeck wd = new WeaponDeck();\n wd.addWeapon(w6);\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(Board.getSpawnpoint(2));\n p.getPh().drawWeapon(wd, w6.getName());\n RealPlayer victim = new RealPlayer('y', \"ciccia\");\n victim.setPlayerPosition(Board.getSpawnpoint('y'));\n ArrayList<Player> players = new ArrayList<>();\n players.add(victim);\n\n try{\n p.getPh().getWeaponDeck().getWeapon(w6.getName()).doEffect(\"base\", null, null, p, players, null);\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n\n assertTrue(victim.getPb().getMarkedDamages('b') == 1 && victim.getPb().countDamages() == 3);\n\n players.get(0).setPlayerPosition(Board.getSquare(7));\n try {\n p.getPh().getWeaponDeck().getWeapon(w6.getName()).doEffect(\"base\", null, null, p, players, null); //\"A choice of yours is wrong\"\n }catch (WrongValueException | WrongPlayerException | WrongSquareException e) { }\n }",
"public void act() \n {\n movegas();\n \n atingido2(); \n \n }",
"void playSoldierCard(int victimIndex, HexLocation location);",
"public void applyDamage(int damage)\r\n\t{\r\n\r\n\t}"
]
| [
"0.70332944",
"0.6915375",
"0.6717499",
"0.670231",
"0.6503022",
"0.639227",
"0.63733095",
"0.6356985",
"0.6323361",
"0.6311389",
"0.62951213",
"0.6262465",
"0.6228494",
"0.6196285",
"0.61775744",
"0.61428237",
"0.6121477",
"0.6081307",
"0.6061666",
"0.60309273",
"0.5979883",
"0.5960644",
"0.59576607",
"0.59470505",
"0.59444386",
"0.59258807",
"0.5924414",
"0.59192824",
"0.5919121",
"0.5917546",
"0.5917055",
"0.59143126",
"0.59066564",
"0.58881325",
"0.5879964",
"0.58788174",
"0.58752245",
"0.5871277",
"0.58633363",
"0.5862551",
"0.5861004",
"0.5859252",
"0.5839829",
"0.58388436",
"0.5837968",
"0.583757",
"0.58168083",
"0.5804199",
"0.58030313",
"0.58022684",
"0.5800257",
"0.5794357",
"0.5793166",
"0.57921076",
"0.57860434",
"0.577279",
"0.5772222",
"0.57669514",
"0.57643557",
"0.57605255",
"0.5759978",
"0.5759573",
"0.5756917",
"0.575687",
"0.57550985",
"0.5753658",
"0.57500875",
"0.57500726",
"0.57497233",
"0.5747556",
"0.574613",
"0.5744618",
"0.5744388",
"0.5741587",
"0.5733835",
"0.57294816",
"0.57279205",
"0.5719254",
"0.5719051",
"0.57116127",
"0.5708293",
"0.5697144",
"0.5692862",
"0.5676766",
"0.56746835",
"0.5672472",
"0.56701195",
"0.5668752",
"0.56675094",
"0.5667023",
"0.56666845",
"0.5660458",
"0.56399566",
"0.56364864",
"0.5631126",
"0.5629557",
"0.5620812",
"0.5619412",
"0.56176275",
"0.5615556"
]
| 0.7194813 | 0 |
getStatus It should return a string about itself and all of its aircrafts' statuses in the following format: ```text HP: 5000, Aircraft count: 5, Ammo Storage: 2300, Total damage: 2280 Aircrafts: Type F35, Ammo: 12, Base Damage: 50, All Damage: 600 Type F35, Ammo: 12, Base Damage: 50, All Damage: 600 Type F35, Ammo: 12, Base Damage: 50, All Damage: 600 Type F16, Ammo: 8, Base Damage: 30, All Damage: 240 Type F16, Ammo: 8, Base Damage: 30, All Damage: 240 ``` If the health points are 0 then it should return: `It's dead Jim :(` | public String getStatus() {
if (this.health > 0) {
StringBuilder stringBuilder = new StringBuilder();
String[] carrierSelfStatus = {
"HP: " + this.health,
"Aircraft count: " + this.aircrafts.size(),
"Ammo Storage: " + this.ammoStorage,
"Total damage: " + this.getAllDamageDone(),
};
stringBuilder.append(String.join(", ", carrierSelfStatus));
stringBuilder.append("\nAircrafts:");
List<String> jetStatus = new ArrayList<>();
for (Jet jet : this.aircrafts) {
jetStatus.add("\n");
jetStatus.add(jet.getStatus());
}
stringBuilder.append(String.join("", jetStatus));
return stringBuilder.toString();
} else {
return "It's dead Jim :(";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getStatus(int status) {\n switch (status) {\n case 0:\n return \"FREE\";\n case 1:\n return \"IN_TRANSIT\";\n case 2:\n return \"WAITING_TO_LAND\";\n case 3:\n return \"GROUND_CLEARANCE_GRANTED\";\n case 4:\n return \"LANDING\";\n case 5:\n return \"LANDED\";\n case 6:\n return \"TAXING\";\n case 7:\n return \"UNLOADING\";\n case 8:\n return \"READY_CLEAN_AND_MAINT\";\n case 9:\n return \"FAULTY_AWAIT_CLEAN\";\n case 10:\n return \"CLEAN_AWAIT_MAINT\";\n case 11:\n return \"OK_AWAIT_CLEAN\";\n case 12:\n return \"AWAIT_REPAIR\";\n case 13:\n return \"READY_REFUEL\";\n case 14:\n return \"READY_PASSENGERS\";\n case 15:\n return \"READY_DEPART\";\n case 16:\n return \"AWAITING_TAXI\";\n case 17:\n return \"AWAITING_TAKEOFF\";\n case 18:\n return \"DEPARTING_THROUGH_LOCAL_AIRSPACE\";\n default:\n return \"UNKNOWN\";\n }//END SWITCH\n }",
"java.lang.String getStatus();",
"java.lang.String getStatus();",
"java.lang.String getStatus();",
"java.lang.String getStatus();",
"public void getStatus()\r\n {\r\n //if this person has no weapon or armor, these values are kept\r\n String weaponName = \"bare hands\";\r\n String armorName = \"none\";\r\n int weaponAtk = 0;\r\n int armorDef = 0;\r\n \r\n if (weapon!=null)\r\n {\r\n weaponName = weapon.getName();\r\n weaponAtk = weapon.getRating();\r\n }\r\n if (armor!=null)\r\n {\r\n armorName = armor.getName();\r\n armorDef = armor.getRating();\r\n }\r\n \r\n String itemList = \"\";\r\n for (Thing t : items)\r\n itemList += t.getName() + \", \";\r\n \r\n System.out.println(\"Health: \" + health + \"/\" + maxHealth + \"\\n\" +\r\n \"ATK: \" + attack + \"\\n\" +\r\n \"DEF: \" + defense + \"\\n\" +\r\n \"Weapon: \" + weaponName + \" (\" + weaponAtk + \" ATK\" + \")\" + \"\\n\" +\r\n \"Armor: \" + armorName + \" (\" + armorDef + \" DEF\" + \")\");\r\n }",
"String getStatus();",
"String getStatus();",
"String getStatus();",
"String getStatus();",
"String getStatus();",
"private String getShipsStatus() {\n //the basic strings which will hold the info\n String playerStatusBarBase = \"PLAYER STATUS: H: S: M: E%: \";\n String enemyStatusBarBase = \" ENEMY STATUS: H: S: M: E%: \";\n\n //converts the strings above to character arrays\n char[] playerStatusBarBaseToChar = playerStatusBarBase.toCharArray();\n char[] enemyStatusBarBaseToChar = enemyStatusBarBase.toCharArray();\n\n //makes a string from the players health, then converts to character array\n String playerHealth;\n if(this.playerShipHealth < 10) {\n playerHealth = \"0\" + this.playerShipHealth;\n }\n else {\n playerHealth = \"\" + this.playerShipHealth;\n }\n char[] playerHealthToChar = playerHealth.toCharArray();\n\n //makes a string from the enemy's health, then converts to character array\n String enemyHealth;\n if(this.enemyShipHealth < 10) {\n enemyHealth = \"0\" + this.enemyShipHealth;\n }\n else {\n enemyHealth = \"\" + this.enemyShipHealth;\n }\n char[] enemyHealthToChar = enemyHealth.toCharArray();\n\n //makes a string from the players shield, then converts to character array\n String playerShield = \"\" + this.playerShield;\n char[] playerShieldToChar = playerShield.toCharArray();\n\n //makes a string from the enemy's shield, then converts to character array\n String enemyShield = \"\" + this.enemyShield;\n char[] enemyShieldToChar = enemyShield.toCharArray();\n\n //makes a string from the players missile count, then converts to character array\n String playerMissile;\n if(this.playerMissile < 10) {\n playerMissile = \"0\" + this.playerMissile;\n }\n else {\n playerMissile = \"\" + this.playerMissile;\n }\n char[] playerMissileToChar = playerMissile.toCharArray();\n\n //makes a string from the enemy's missile count, then converts to character array\n String enemyMissile;\n if(this.enemyMissile < 10) {\n enemyMissile = \"0\" + this.enemyMissile;\n }\n else {\n enemyMissile = \"\" + this.enemyMissile;\n }\n char[] enemyMissileToChar = enemyMissile.toCharArray();\n\n //makes a string from the players evasion percent\n String playerEvasion;\n if(this.playerEvasionPercent * 100 < 10) {\n playerEvasion = \"00\" + (this.playerEvasionPercent * 100);\n }\n else if(this.playerEvasionPercent * 100 < 100) {\n playerEvasion = \"0\" + (this.playerEvasionPercent * 100);\n }\n else {\n playerEvasion = \"\" + this.playerEvasionPercent;\n }\n char[] playerEvasionToChar = playerEvasion.toCharArray();\n\n //makes a string from the enemy's evasion percent\n String enemyEvasion;\n if(this.enemyEvasionPercent * 100 < 10) {\n enemyEvasion = \"00\" + (this.enemyEvasionPercent * 100);\n }\n else if(this.enemyEvasionPercent * 100 < 100) {\n enemyEvasion = \"0\" + (this.enemyEvasionPercent *100);\n }\n else {\n enemyEvasion = \"\" + this.enemyEvasionPercent;\n }\n char[] enemyEvasionToChar = enemyEvasion.toCharArray();\n\n //sets parts of base array to the players values\n playerStatusBarBaseToChar[17] = playerHealthToChar[0];\n playerStatusBarBaseToChar[18] = playerHealthToChar[1];\n playerStatusBarBaseToChar[22] = playerShieldToChar[0];\n playerStatusBarBaseToChar[26] = playerMissileToChar[0];\n playerStatusBarBaseToChar[27] = playerMissileToChar[1];\n playerStatusBarBaseToChar[32] = playerEvasionToChar[0];\n playerStatusBarBaseToChar[33] = playerEvasionToChar[1];\n playerStatusBarBaseToChar[34] = playerEvasionToChar[2];\n\n //sets parts of base array to the enemy's values\n enemyStatusBarBaseToChar[17] = enemyHealthToChar[0];\n enemyStatusBarBaseToChar[18] = enemyHealthToChar[1];\n enemyStatusBarBaseToChar[22] = enemyShieldToChar[0];\n enemyStatusBarBaseToChar[26] = enemyMissileToChar[0];\n enemyStatusBarBaseToChar[27] = enemyMissileToChar[1];\n enemyStatusBarBaseToChar[32] = enemyEvasionToChar[0];\n enemyStatusBarBaseToChar[33] = enemyEvasionToChar[1];\n enemyStatusBarBaseToChar[34] = enemyEvasionToChar[2];\n\n //converts the character arrays above into strings\n String playerStatusBarFinal = new String(playerStatusBarBaseToChar);\n String enemyStatusBarFinal = new String(enemyStatusBarBaseToChar);\n\n //returns the new string with both ships values\n return playerStatusBarFinal + enemyStatusBarFinal;\n }",
"public String getStatus() {\n\t\tString result = getName() + \"\\n-----------------------------\\n\\n\";\n\t\tfor(int i = 0; i < lines.size(); i++) {\n\t\t\tresult = result + lines.get(i).getStatus() + \"\\n\";\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public String getStatus() {\n\t\t\n\t\tif(status.equals(\"receptor\")) {\n\t\t\treturn status.substring(0,1).toUpperCase().concat(status.substring(1));\n\t\t}\n\t\treturn status;\n\t}",
"@GET\n\t@Path(\"/status\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic String getStatus() {\n\t\treturn new JSONObject().put(\"currFloor\", Constants.currFloor).put(\"movingState\", Constants.movingState).toString();\n\t}",
"public java.lang.CharSequence getStatus() {\n return status;\n }",
"public String getStatus()\r\n {\n return (\"1\".equals(getField(\"ApprovalStatus\")) && \"100\".equals(getField(\"HostRespCode\")) ? \"Approved\" : \"Declined\");\r\n }",
"public String getStatus() { return status; }",
"public String getStatus() {\n return status.toString();\n }",
"public java.lang.CharSequence getStatus() {\n return status;\n }",
"public Status getStatus();",
"public java.lang.String getStatus() {\r\n return status;\r\n }",
"public String getStatus(){\n\n //returns the value of the status field\n return this.status;\n }",
"public String getStatusString() {\n return status.toString();\n }",
"public java.lang.String getStatus() {\n return status;\n }",
"public java.lang.String getStatus() {\n return status;\n }",
"public java.lang.String getStatus() {\n java.lang.Object ref = status_;\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 status_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getStatus() {\n java.lang.Object ref = status_;\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 status_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getStatus () {\r\n\t\treturn status;\r\n\t}",
"public String getPlayersStatus(){\n\t\tString pStatus = \"\";\n\t\tPlayer player;\n\t\tfor(int i = 0; i < this.players.size(); i++){\n\t\t\tplayer = this.players.get(i);\n\t\t\tpStatus += \"[\" +player.getName() + \": \";\n\t\t\tpStatus += Integer.toString(player.numCards()) + \"] \";\n\t\t} \n\t\t\n\t\treturn pStatus;\n\t}",
"public java.lang.String getStatus() {\n java.lang.Object ref = status_;\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 status_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"String status();",
"String status();",
"public String getStatus(){\r\n\t\treturn status;\r\n\t}",
"public java.lang.String getStatus() {\n java.lang.Object ref = status_;\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 status_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getStatus() {\n java.lang.Object ref = status_;\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 status_ = s;\n }\n return s;\n }\n }",
"public String getStatus () {\r\n return status;\r\n }",
"public java.lang.String getStatus () {\n\t\treturn status;\n\t}",
"public java.lang.String getStatus () {\n\t\treturn status;\n\t}",
"public java.lang.String getStatus () {\n\t\treturn status;\n\t}",
"public java.lang.String getStatus () {\n\t\treturn status;\n\t}",
"public java.lang.String getStatus () {\n\t\treturn status;\n\t}",
"public String getStatus()\n {\n\n return status;\n }",
"public java.lang.String getStatus() {\n java.lang.Object ref = status_;\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 status_ = s;\n return s;\n }\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus() {\r\n return status;\r\n }",
"public String getStatus()\n \t{\n \t\treturn m_strStatus;\n \t}",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public String getStatus() {\n return status;\n }",
"public java.lang.String getStatus() {\n\t\treturn status;\n\t}",
"public java.lang.String getStatus() {\n\t\treturn status;\n\t}",
"public String getStatus(){\n int chosen;\n System.out.println(\"Choose a Shipment Status ?\");\n System.out.println(\"[1] Pending \");\n System.out.println(\"[2] Picked Up\");\n System.out.println(\"[3] In transit to destination.\");\n System.out.println(\"[4] Delivered.\");\n System.out.println(\"[5] Out of Delivery.\");\n System.out.print( \"Answer: \");\n chosen = GetChoiceFromUser.getSubChoice(5);\n switch (chosen){\n case 1 :\n return \"Pending\";\n case 2:\n return \"Picked Up\";\n case 3 :\n return \"In transit to destination.\";\n case 4:\n return \"Delivered\";\n case 5:\n return \"Out of Delivery.\";\n default:\n return \"No info\";\n }\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public static String getStatus(Connection conn)\n {\n String status = \"Current Status\\n---------------\\nRooms: \";\n if(RoomDB.exist(conn) == -1)\n {\n status += \"No Database\\n\";\n }\n else if(RoomDB.exist(conn) == 0)\n {\n status += \"Empty\\n\";\n }\n else\n {\n status += \"Full\\n\";\n }\n status += \"Reservations: \";\n if(ResDB.exist(conn) == -1)\n {\n status += \"No Database\\n\";\n }\n else if(ResDB.exist(conn) == 0)\n {\n status += \"Empty\\n\";\n }\n else\n {\n status += \"Full\\n\";\n }\n \n return status;\n }",
"public String getStatus() {\n return status;\n }",
"private String getStatusDescription(String vStatus) {\r\n\r\n\t\tString result = \"\";\r\n\t\tif (vStatus != null && !vStatus.equals(\"\")) {\r\n\r\n\t\t\tif (vStatus.equalsIgnoreCase(\"Unsupported\") || vStatus.equals(\"No Value Returned\")) {\r\n\t\t\t\tresult = \"3DS not supported or there was no 3DS data provided\";\r\n\t\t\t} else {\r\n\r\n\t\t\t\t// Java cannot switch on a string so turn everything to a\r\n\t\t\t\t// character\r\n\t\t\t\tchar input = vStatus.charAt(0);\r\n\r\n\t\t\t\tswitch (input) {\r\n\t\t\t\tcase 'Y':\r\n\t\t\t\t\tresult = \"The cardholder was successfully authenticated.\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'E':\r\n\t\t\t\t\tresult = \"The cardholder is not enrolled.\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'N':\r\n\t\t\t\t\tresult = \"The cardholder was not verified.\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'U':\r\n\t\t\t\t\tresult = \"The cardholder's Issuer was unable to authenticate due to some system error at the Issuer.\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'F':\r\n\t\t\t\t\tresult = \"There was an error in the format of the request from the merchant.\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'A':\r\n\t\t\t\t\tresult = \"Authentication of your Merchant ID and Password to the ACS Directory Failed.\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'D':\r\n\t\t\t\t\tresult = \"Error communicating with the Directory Server.\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'C':\r\n\t\t\t\t\tresult = \"The card type is not supported for authentication.\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'S':\r\n\t\t\t\t\tresult = \"The signature on the response received from the Issuer could not be validated.\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'P':\r\n\t\t\t\t\tresult = \"Error parsing input from Issuer.\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'I':\r\n\t\t\t\t\tresult = \"Internal Payment Server system error.\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresult = \"Unable to be determined\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tresult = \"null response\";\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"private String evaluateStatus(Status status) {\n switch (status) {\n case PENDING:\n return \"color: blue !important;\";// blue\n case DECLINED:\n return \"color: #DC143C !important;\";// red\n case CANCELED:\n return \"color: purple !important;\";// purple\n case RUNNING:\n return \"color: darkcyan !important;\";// cyan\n case COMPLETE:\n return \"color: #449d44 !important;\";// lime\n default:\n return \"\";\n }\n }",
"public int getStatus();",
"public int getStatus();",
"public int getStatus();",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }",
"public String getStatus() {\n return this.status;\n }"
]
| [
"0.71572864",
"0.70844686",
"0.70844686",
"0.70844686",
"0.70844686",
"0.6989509",
"0.68663347",
"0.68663347",
"0.68663347",
"0.68663347",
"0.68663347",
"0.6505167",
"0.64108574",
"0.635809",
"0.62945044",
"0.6261732",
"0.6261497",
"0.62459344",
"0.624381",
"0.62363124",
"0.62250936",
"0.62203246",
"0.6216011",
"0.6204592",
"0.61987066",
"0.61987066",
"0.61916465",
"0.61916465",
"0.6183835",
"0.61388725",
"0.6135064",
"0.61260504",
"0.61260504",
"0.6124329",
"0.61198354",
"0.61198354",
"0.61185294",
"0.61082155",
"0.61082155",
"0.61082155",
"0.61082155",
"0.61082155",
"0.60942465",
"0.60878235",
"0.6086548",
"0.6086548",
"0.6086548",
"0.6077296",
"0.6077296",
"0.606159",
"0.606159",
"0.606159",
"0.606159",
"0.606159",
"0.6041961",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6039277",
"0.6038761",
"0.6038761",
"0.6027634",
"0.6025004",
"0.6025004",
"0.6025004",
"0.6023661",
"0.6018486",
"0.60160965",
"0.60042334",
"0.6000426",
"0.6000426",
"0.6000426",
"0.5993887",
"0.5993887",
"0.5993887"
]
| 0.7731666 | 0 |
short circuit if same object | @Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
// instanceof handles nulls
if (!(other instanceof DeleteTagCommand)) {
return false;
}
// state check
DeleteTagCommand e = (DeleteTagCommand) other;
return index.equals(e.index)
&& deletedTag.equals(e.deletedTag);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasSameAs();",
"public static boolean isSameObject(Object a, Object b) {\n return Builtins.isSameObject(a, b);\n }",
"private static boolean m4280b(Object obj, Object obj2) {\n if (obj != obj2) {\n if (obj == null || obj.equals(obj2) == null) {\n return null;\n }\n }\n return true;\n }",
"public final void testSameObjectEquals() {\n final Transaction copy = testTransaction1;\n assertTrue(testTransaction1.equals(copy)); // pmd doesn't like either\n // way\n\n }",
"@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return false;\n }",
"default boolean isSameStateAs(ReadOnlyTask other) {\n return other == this // short circuit if same object\n || (other != null // this is first to avoid NPE below\n && other.getContent().equals(this.getContent())); // state checks here onwards\n //&& other.getDate().equals(this.getDate())\n //&& other.getTime().equals(this.getTime()));\n }",
"public boolean isIdentical(Remote obj1, Remote obj2)\n {\n\torg.omg.CORBA.Object corbaObj1 = (org.omg.CORBA.Object)obj1;\n\torg.omg.CORBA.Object corbaObj2 = (org.omg.CORBA.Object)obj2;\n\n\treturn corbaObj1._is_equivalent(corbaObj2);\n }",
"private boolean oneEquals(AccessPath that) {\n //if (this._n != that._n) return false;\n if (this._field != that._field) return false;\n if (this._last != that._last) return false;\n if (this.succ.size() != that.succ.size()) return false;\n return true;\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Tmproyecto)) {\n return false;\n }\n Tmproyecto other = (Tmproyecto) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"public final boolean tryOwn() {\n return own(this) == this;\n }",
"@Override\n public boolean isSame(Item other) {\n return this.equals(other);\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Reprocessing)) {\n return false;\n }\n Reprocessing other = (Reprocessing) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean equals(Object obj) {\n StorePairGeneric<E> o = (StorePairGeneric<E>) obj;\n return this.first.equals(o.first);\n \n // or boolean ans = this.first(temp.first);\n // return ans;\n }",
"@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return a.equals(b);\n }",
"protected boolean safeEquals(Object one, Object two) {\r\n\t\treturn one == null ? two == null : one.equals(two);\r\n\t}",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Shares)) {\r\n return false;\r\n }\r\n Shares other = (Shares) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"@Override\n public boolean equals(Object obj) {\n return this == obj;\n }",
"private static final boolean equal(Object a, Object b) {\n if (a == b)\n return true;\n if (a == null)\n return false;\n if (b == null)\n return false;\n return a.equals(b);\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof MejObra)) {\n return false;\n }\n MejObra other = (MejObra) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Surenchere)) {\r\n return false;\r\n }\r\n Surenchere other = (Surenchere) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"@Override\n public boolean equals(Object o) {\n return this == o;\n }",
"protected boolean isEqual( Object lhs, Object rhs ){\r\n\t\tboolean x = lhs==null;\r\n\t\tboolean y = rhs == null;\r\n\t\t//XOR OPERATOR, only one is null\r\n\t\tif ((x || y) && !(x && y))\r\n\t\t\treturn false;\r\n\t\tif (lhs.equals(rhs))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Song)) {\n return false;\n }\n Song other = (Song) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean equals(Object obj) {\n return this == obj;\n }",
"@Test\n public void testEqualsReturnsTrueOnSelfArg() {\n boolean equals = record.equals(record);\n\n assertThat(equals, is(true));\n }",
"static public boolean areEqual(Object aThis, Object aThat) {\r\n // System.out.println(\"Object\");\r\n return aThis == null ? aThat == null : aThis.equals(aThat);\r\n }",
"@Override\n\tpublic boolean equals(Object arg0) {\n\t\tproduit p = (produit) arg0;\n\t\treturn this.reference.equals(p.reference);\n\t}",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Sacrificio)) {\n return false;\n }\n Sacrificio other = (Sacrificio) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"@Override\n protected boolean doEquals(Object obj) {\n if (obj instanceof BsUserInfo) {\n BsUserInfo other = (BsUserInfo)obj;\n if (!xSV(_id, other._id)) { return false; }\n return true;\n } else {\n return false;\n }\n }",
"@Override\n protected boolean doEquals(Object obj) {\n if (obj instanceof BsAccessResultDiff) {\n BsAccessResultDiff other = (BsAccessResultDiff)obj;\n if (!xSV(_id, other._id)) { return false; }\n if (!xSV(_sessionId, other._sessionId)) { return false; }\n if (!xSV(_ruleId, other._ruleId)) { return false; }\n if (!xSV(_url, other._url)) { return false; }\n if (!xSV(_parentUrl, other._parentUrl)) { return false; }\n if (!xSV(_status, other._status)) { return false; }\n if (!xSV(_httpStatusCode, other._httpStatusCode)) { return false; }\n if (!xSV(_method, other._method)) { return false; }\n if (!xSV(_mimeType, other._mimeType)) { return false; }\n if (!xSV(_contentLength, other._contentLength)) { return false; }\n if (!xSV(_executionTime, other._executionTime)) { return false; }\n if (!xSV(_createTime, other._createTime)) { return false; }\n return true;\n } else {\n return false;\n }\n }",
"@Override\n public boolean equals(Object o) {\n return (o!=null && o.getClass().equals(this.getClass()));\n }",
"@Override\n public boolean equals(Object o) {\n return (o!=null && o.getClass().equals(this.getClass()));\n }",
"@Override\n public boolean equals(Object o) {\n return (o!=null && o.getClass().equals(this.getClass()));\n }",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Thjerreza)) {\r\n return false;\r\n }\r\n Thjerreza other = (Thjerreza) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof FastTrans)) {\n return false;\n }\n FastTrans other = (FastTrans) object;\n if ((this.tranferIdTransfer == null && other.tranferIdTransfer != null) || (this.tranferIdTransfer != null && !this.tranferIdTransfer.equals(other.tranferIdTransfer))) {\n return false;\n }\n return true;\n }",
"protected boolean isDuplicate(ELesxUseCase useCase) {\n return false;\n }",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof FluxoCaixa)) {\r\n return false;\r\n }\r\n FluxoCaixa other = (FluxoCaixa) object;\r\n return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id));\r\n }",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof FatRecurso)) {\r\n return false;\r\n }\r\n FatRecurso other = (FatRecurso) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"boolean canEqual(Object obj);",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Lit)) {\n return false;\n }\n Lit other = (Lit) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"private static boolean equiv(VObject src, VObject dst)\n {\n return ((src.getId() != null && src.getId().equals(dst.getId()))\n || (src.getSid() != null && src.getSid().equals(dst.getSid())) \n || (src.getName() != null && src.getName().equals(dst.getName())));\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Rolistafit)) {\n return false;\n }\n Rolistafit other = (Rolistafit) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"public static boolean equalQuick(final Object a, final Object b) {\n \treturn a == b || ((a != null & b != null) && a.equals(b));\n }",
"public boolean realEquals(Object o){\n\t\treturn keywords.equals(o);\n\t}",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Fornecedor)) {\r\n return false;\r\n }\r\n Fornecedor other = (Fornecedor) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"@Override\n public abstract boolean equals(Object obj);",
"public T caseOperation_Equals(Operation_Equals object)\r\n {\r\n return null;\r\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Clothing)) {\n return false;\n }\n Clothing other = (Clothing) object;\n if ((this.idclothing == null && other.idclothing != null) || (this.idclothing != null && !this.idclothing.equals(other.idclothing))) {\n return false;\n }\n return true;\n }",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Jscmisto)) {\r\n return false;\r\n }\r\n Jscmisto other = (Jscmisto) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Puntori)) {\n return false;\n }\n Puntori other = (Puntori) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean isSame(Bike other) {\n if (other == this) {\n return true;\n }\n\n return other != null\n && other.getName().equals(this.getName());\n }",
"@Override\r\n\t\tpublic boolean equals(Object obj) {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.equals(obj);\r\n\t\t\t}\r\n\t\t}",
"@Override\n protected boolean doEquals(Object obj) {\n if (obj instanceof BsMemberFollowing) {\n BsMemberFollowing other = (BsMemberFollowing)obj;\n if (!xSV(_memberFollowingId, other._memberFollowingId)) { return false; }\n return true;\n } else {\n return false;\n }\n }",
"public Object _duplicate() {\n throw new NO_IMPLEMENT(reason);\n }",
"public abstract boolean equals(Object o);",
"@Override\n\tpublic boolean equal() {\n\t\treturn false;\n\t}",
"public boolean isIdentical(Object o) {\n if (equals(o)) {\n Contact contact = (Contact) o;\n return firstName.equals(contact.firstName)\n && lastName.equals(contact.lastName)\n && phone.equals(contact.phone)\n && email.equals(contact.email)\n && dateOfBirth.equals(contact.dateOfBirth)\n && notes.equals(contact.notes);\n }\n\n return false;\n }",
"boolean equalTo(ObjectPassDemo o) {\n return (o.a == a && o.b == b);\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Abstract)) {\n return false;\n }\n Abstract other = (Abstract) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Kanri)) {\n return false;\n }\n Kanri other = (Kanri) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"@NeededForTesting\n public static boolean areObjectsEqual(Object a, Object b) {\n return a == b || (a != null && a.equals(b));\n }",
"@Override\n public boolean equals(Object other) {\n if (other.getClass() == getClass()) {\n return hashCode() == other.hashCode();\n }\n\n return false;\n }",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Lektor)) {\r\n return false;\r\n }\r\n Lektor other = (Lektor) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"@Override\n public boolean equals(Object object) {\n if ( !getClass().isInstance(object)) {\n return false;\n }\n\n DocumentBase other = (DocumentBase)object;\n if (this.getId() != other.getId() && (this.getId() == null || !this.getId().equals(other.getId()))) return false;\n return true;\n }",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn EqualsBuilder.reflectionEquals(this, obj);\n\t}",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Membre)) {\n return false;\n }\n Membre other = (Membre) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"public boolean equals(Object obj) {\n // we must deproxy objects before comparison, because hibernate proxy could be received here\n AbstractEntity<ID> thisEntity = HibernateUtils.deproxy(this);\n Object otherEntity = HibernateUtils.deproxy(obj);\n\n ID id = thisEntity.getId();\n\n if (id != null && otherEntity != null && otherEntity.getClass().getName().equals(getClass().getName())) {\n return id.equals(((AbstractEntity) otherEntity).getId());\n }\n\n // fallback to reference equality, original object instance should be used there\n return super.equals(obj);\n }",
"@Override\n public boolean equals(Object o1) {\n return super.equals(o1);\n }",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Operation)) {\r\n return false;\r\n }\r\n Operation other = (Operation) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"public void testObjEqual()\n {\n assertEquals( true, Util.objEqual(null,null) );\n assertEquals( false,Util.objEqual(this,null) );\n assertEquals( false,Util.objEqual(null,this) );\n assertEquals( true, Util.objEqual(this,this) );\n assertEquals( true, Util.objEqual(\"12\",\"12\") );\n }",
"void addSameAs(Object newSameAs);",
"public abstract boolean equals(Object other);",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Photo)) {\n return false;\n }\n Photo other = (Photo) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"public boolean equals(Object object) {\n/* 4770 */ if (this == object)\n/* */ {\n/* 4772 */ return true;\n/* */ }\n/* 4774 */ if (object != null && object.getClass() == getClass()) {\n/* */ \n/* 4776 */ VolaTile tile = (VolaTile)object;\n/* 4777 */ return (tile.getTileX() == this.tilex && tile.getTileY() == this.tiley && tile.surfaced == this.surfaced);\n/* */ } \n/* 4779 */ return false;\n/* */ }",
"@Override\n public final boolean equals(final Object other) {\n return super.equals(other);\n }",
"public boolean equals(Object object) {\n/* 326 */ if (object == null) {\n/* 327 */ return false;\n/* */ }\n/* 329 */ if (object == this) {\n/* 330 */ return true;\n/* */ }\n/* 332 */ if (object instanceof DefaultTimeline) {\n/* 333 */ return true;\n/* */ }\n/* 335 */ return false;\n/* */ }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Tarjeta)) {\n return false;\n }\n Tarjeta other = (Tarjeta) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Transfer)) {\n return false;\n }\n Transfer other = (Transfer) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean equals(Object arg0) {\n\t\treturn false;\n\t}",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof TransferItem)) {\r\n return false;\r\n }\r\n TransferItem other = (TransferItem) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof WorkShift)) {\r\n return false;\r\n }\r\n WorkShift other = (WorkShift) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"@Override\n public boolean equals(Object other) {\n return false;\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Car)) {\n return false;\n }\n Car other = (Car) object;\n return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id));\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Doktori)) {\n return false;\n }\n Doktori other = (Doktori) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Dia3)) {\n return false;\n }\n Dia3 other = (Dia3) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Matiere)) {\n return false;\n }\n Matiere other = (Matiere) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }",
"@Test\n public void equals_DifferentObjects_Test() {\n Assert.assertFalse(bq1.equals(ONE));\n }",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof OrdenMedica)) {\r\n return false;\r\n }\r\n OrdenMedica other = (OrdenMedica) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Acarsdata)) {\r\n return false;\r\n }\r\n Acarsdata other = (Acarsdata) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"@Override\r\n\tpublic boolean equals(Object arg0) {\n\t\treturn super.equals(arg0);\r\n\t}",
"@Override\n public boolean equals(Object obj) {\n return super.equals(obj);\n }",
"public boolean sameAs(UserBaseModel u){\n\t\treturn u.getId() == this.getId();\n\t}",
"@Override\n public boolean equals(\n Object object\n ){\n \tif(this == object) {\n \t\treturn true;\n \t}\n \tif(object instanceof Path) {\n \t\tPath that = (Path) object;\n \t\tif(this.size == that.size) {\n \t\t\tif(this.size == 0) {\n \t\t\t\treturn true;\n \t\t\t}\n \t\t\tif(this.base.equals(that.base)) {\n \t\t\t return \n \t\t\t this.parent == that.parent ||\n \t\t\t this.parent.equals(that.parent);\n \t\t\t}\n \t\t}\n \t}\n\t\treturn false;\n }",
"public boolean betterEquals(Object obj)\n\t{\n\t\tif (obj instanceof Player)\n\t\t{\n\t\t\tPlayer other = (Player) obj;\n\t\t\treturn this.name.equals(other.name) && this.pawn == other.pawn;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n public boolean equals(Object obj) {\n \n //TODO: Complete Method\n \n return true;\n }",
"@Override\n public boolean equals(Object other) {\n return this == other;\n }"
]
| [
"0.6489606",
"0.63602835",
"0.6288568",
"0.62819123",
"0.6275834",
"0.6242893",
"0.6216622",
"0.6197218",
"0.61651564",
"0.612932",
"0.61013114",
"0.6062789",
"0.6060119",
"0.60575795",
"0.59936875",
"0.5965463",
"0.5942526",
"0.59319985",
"0.5913784",
"0.59096235",
"0.58853114",
"0.58821213",
"0.5878632",
"0.58782935",
"0.5862503",
"0.5861596",
"0.5852738",
"0.5850146",
"0.584376",
"0.5840173",
"0.5838933",
"0.5838933",
"0.5838933",
"0.5817336",
"0.5815133",
"0.5810537",
"0.58101207",
"0.5807868",
"0.57943636",
"0.57907397",
"0.5784105",
"0.5780058",
"0.57788724",
"0.57749873",
"0.57711613",
"0.57711613",
"0.576677",
"0.5765733",
"0.57654744",
"0.5758016",
"0.5757545",
"0.5754233",
"0.5753893",
"0.57533073",
"0.57475305",
"0.57446873",
"0.57433516",
"0.57429266",
"0.57357603",
"0.5731435",
"0.5726037",
"0.5723702",
"0.57203805",
"0.5718323",
"0.5717728",
"0.57171685",
"0.5714377",
"0.571337",
"0.57113945",
"0.57072616",
"0.57030857",
"0.5701886",
"0.5695094",
"0.5693997",
"0.56929016",
"0.5690498",
"0.5686202",
"0.56702226",
"0.56683004",
"0.5666488",
"0.5663137",
"0.5663137",
"0.5663137",
"0.5663137",
"0.5662278",
"0.5661855",
"0.56616783",
"0.5660328",
"0.56552625",
"0.5655178",
"0.5655135",
"0.56523937",
"0.5652283",
"0.56505847",
"0.56498605",
"0.5647254",
"0.5645428",
"0.56441426",
"0.5643788",
"0.5642503",
"0.56408715"
]
| 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }"
]
| [
"0.79041183",
"0.7805934",
"0.77659106",
"0.7727251",
"0.7631684",
"0.7621701",
"0.75839096",
"0.75300384",
"0.74873656",
"0.7458051",
"0.7458051",
"0.7438486",
"0.742157",
"0.7403794",
"0.7391802",
"0.73870087",
"0.7379108",
"0.7370295",
"0.7362194",
"0.7355759",
"0.73454577",
"0.734109",
"0.73295504",
"0.7327726",
"0.73259085",
"0.73188347",
"0.731648",
"0.73134047",
"0.7303978",
"0.7303978",
"0.7301588",
"0.7298084",
"0.72932935",
"0.7286338",
"0.7283324",
"0.72808945",
"0.72785115",
"0.72597474",
"0.72597474",
"0.72597474",
"0.725962",
"0.7259136",
"0.7249966",
"0.7224023",
"0.721937",
"0.7216621",
"0.72045326",
"0.7200649",
"0.71991026",
"0.71923256",
"0.71851367",
"0.7176769",
"0.7168457",
"0.71675026",
"0.7153402",
"0.71533287",
"0.71352696",
"0.71350807",
"0.71350807",
"0.7129153",
"0.7128639",
"0.7124181",
"0.7123387",
"0.7122983",
"0.71220255",
"0.711715",
"0.711715",
"0.711715",
"0.711715",
"0.7117043",
"0.71169263",
"0.7116624",
"0.71149373",
"0.71123946",
"0.7109806",
"0.7108778",
"0.710536",
"0.7098968",
"0.70981944",
"0.7095771",
"0.7093572",
"0.7093572",
"0.70862055",
"0.7082207",
"0.70808214",
"0.7080366",
"0.7073644",
"0.7068183",
"0.706161",
"0.7060019",
"0.70598614",
"0.7051272",
"0.70374316",
"0.70374316",
"0.7035865",
"0.70352185",
"0.70352185",
"0.7031749",
"0.703084",
"0.7029517",
"0.7018633"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(DialogInterface dialog, int which) {
dialog.cancel();
if(which == 0) {
removeAllUploadTask();
} else if(which == 1) {
task.execute();
} else if(which == 2) {
VxploApplication.getInstance().getPref("mobile_ignore").edit().putBoolean("ignored", true).commit();
task.execute();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
]
| 0.0 | -1 |
TODO Autogenerated constructor documentation | @Autowired
public AbstractItemJsonController(Service service) {
this.service = service;
// LOG.info("Instanciando el controlador: " + this.getClass().getName());
entityClass = (Class<Entity>) ((ParameterizedType) getClass().getGenericSuperclass())
.getActualTypeArguments()[0];
// LOG.debug("entityClass: " + entityClass.getName());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Constructor() {\r\n\t\t \r\n\t }",
"public Constructor(){\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public PSRelation()\n {\n }",
"public Clade() {}",
"@Override\n public void init() {}",
"@Override\r\n\tpublic void init() {}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"public Pitonyak_09_02() {\r\n }",
"public CyanSus() {\n\n }",
"@Override\n void init() {\n }",
"@Override\n public void init() {\n }",
"private TMCourse() {\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void init() {\n\n }",
"public Coche() {\n super();\n }",
"@Override\n protected void init() {\n }",
"public SgaexpedbultoImpl()\n {\n }",
"private Rekenhulp()\n\t{\n\t}",
"public Orbiter() {\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public Data() {}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n public void init() {\n }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"public Pojo1110110(){\r\n\t}",
"public Rol() {}",
"private Converter()\n\t{\n\t\tsuper();\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"public _355() {\n\n }",
"public Phl() {\n }",
"public Property() {\n this(0, 0, 0, 0);\n }",
"@Override\n protected void initialize() \n {\n \n }",
"public Reference() {\n super();\n }",
"public JSFOla() {\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void initialize() {\n \n }",
"public Data() {\n \n }",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override public void init()\n\t\t{\n\t\t}",
"public Lanceur() {\n\t}",
"public Anschrift() {\r\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\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}",
"private Sequence() {\n this(\"<Sequence>\", null, null);\n }",
"public Cohete() {\n\n\t}",
"public CSSTidier() {\n\t}",
"Composite() {\n\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"public RngObject() {\n\t\t\n\t}",
"private Solution() {\n /**.\n * { constructor }\n */\n }",
"protected GeometricObject() \n\t{\n\t\tdateCreated = new java.util.Date();\n\t}",
"public Resource() {\n }",
"public Resource() {\n }",
"public Husdjurshotell(){}",
"@Override\n\t\tprotected void initialise() {\n\n\t\t}",
"private Value() {\n\t}",
"@Override\n public void initialize() { \n }",
"public Chauffeur() {\r\n\t}",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"public Data() {\n }",
"public Data() {\n }",
"public Mannschaft() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"private Node() {\n\n }",
"public Aanbieder() {\r\n\t\t}",
"@Override\n\tpublic void init() {\n\t}",
"public Chick() {\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"protected SourceDocumentInformation() {\n }",
"public mapper3c() { super(); }",
"@Override\n public void construct() throws IOException {\n \n }",
"private IndexBitmapObject() {\n\t}"
]
| [
"0.7486039",
"0.7027553",
"0.68112004",
"0.6759856",
"0.6741966",
"0.6702469",
"0.66600704",
"0.6652799",
"0.6639362",
"0.66103894",
"0.6584318",
"0.65763193",
"0.65735817",
"0.656134",
"0.656134",
"0.656134",
"0.656134",
"0.656134",
"0.656134",
"0.6493124",
"0.6493124",
"0.6493124",
"0.64769673",
"0.6471533",
"0.6469659",
"0.64670724",
"0.64651567",
"0.6428381",
"0.6424205",
"0.64182276",
"0.6414551",
"0.6414551",
"0.6405033",
"0.6395505",
"0.6395505",
"0.6395505",
"0.6384211",
"0.6374613",
"0.6373483",
"0.6371248",
"0.6371248",
"0.6371248",
"0.6371248",
"0.6371248",
"0.63503814",
"0.633982",
"0.6339727",
"0.6330402",
"0.6328075",
"0.63263386",
"0.63262826",
"0.63262826",
"0.6317764",
"0.6316796",
"0.63144195",
"0.63144195",
"0.6308884",
"0.63000304",
"0.6299914",
"0.6295392",
"0.6295392",
"0.6295392",
"0.6295392",
"0.6295392",
"0.6295392",
"0.6295392",
"0.6295392",
"0.6295392",
"0.6295392",
"0.6293834",
"0.6293834",
"0.6293834",
"0.62923175",
"0.6290013",
"0.62890565",
"0.6287653",
"0.62846124",
"0.6284155",
"0.62806463",
"0.6265942",
"0.6261353",
"0.6261353",
"0.6259835",
"0.62591",
"0.62587076",
"0.62548697",
"0.6254034",
"0.62530637",
"0.6250825",
"0.6250825",
"0.6242677",
"0.62418437",
"0.62403446",
"0.624012",
"0.6240092",
"0.6237764",
"0.6237597",
"0.6236867",
"0.6228576",
"0.62283945",
"0.62272817"
]
| 0.0 | -1 |
TODO Autogenerated method documentation | @ModelAttribute
public Entity getEntity(@PathVariable("entity") Long id) {
Entity entity = service.findOne(id);
if (entity == null) {
throw new NotFoundException(String.format("Entity with identifier '%s' not found", id));
}
return entity;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@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\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"private stendhal() {\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public void mo38117a() {\n }",
"@Override public int describeContents() { return 0; }",
"@Override\n\tprotected void getData() {\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\tpublic void emprestimo() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n\t\t\tpublic int describeContents() {\n\t\t\t\treturn 0;\n\t\t\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\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public int getSize() {\n return 1;\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private void m50366E() {\n }",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"public void mo6081a() {\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"public void mo55254a() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"@Override\r\n\tpublic void billGenerate() {\n\t\t\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"protected void mo6255a() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void getStatus() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\t\tpublic void rest() {\n\t\t\t\n\t\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void init() {\n\n }",
"@Override\n protected void prot() {\n }",
"@Override\n public int getSize() {return 0;}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void mo21793R() {\n }",
"@Override\n\tpublic void debite() {\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\r\n\tpublic void just() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }"
]
| [
"0.64016664",
"0.6138185",
"0.613507",
"0.611465",
"0.6085438",
"0.6017817",
"0.59878755",
"0.59689856",
"0.5968348",
"0.5965449",
"0.59311014",
"0.59311014",
"0.5913574",
"0.59061414",
"0.59017813",
"0.58970773",
"0.58761966",
"0.58761966",
"0.58751035",
"0.5820303",
"0.5817753",
"0.5815277",
"0.57315403",
"0.5720066",
"0.5702294",
"0.5686533",
"0.5658574",
"0.5646627",
"0.56451285",
"0.56282026",
"0.56282026",
"0.56282026",
"0.56282026",
"0.56282026",
"0.56282026",
"0.56282026",
"0.5626998",
"0.5609645",
"0.558133",
"0.55785614",
"0.55724275",
"0.5554704",
"0.5554704",
"0.5554704",
"0.5554704",
"0.5554704",
"0.5554704",
"0.55535007",
"0.5551652",
"0.55501175",
"0.5542177",
"0.5538441",
"0.55382526",
"0.5535728",
"0.5534903",
"0.5531513",
"0.5531362",
"0.55229807",
"0.55184543",
"0.55150616",
"0.5514867",
"0.5511573",
"0.5501792",
"0.54905105",
"0.5489397",
"0.5483419",
"0.5481526",
"0.5481526",
"0.5475467",
"0.5474774",
"0.54718983",
"0.547177",
"0.5469168",
"0.54683065",
"0.54672545",
"0.54630446",
"0.54579645",
"0.5449089",
"0.54400146",
"0.54350764",
"0.54246575",
"0.5424032",
"0.54076564",
"0.5406685",
"0.5404923",
"0.5400598",
"0.5400598",
"0.54005355",
"0.5392041",
"0.5390741",
"0.5387172",
"0.53842765",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123"
]
| 0.0 | -1 |
TODO Autogenerated method documentation | @GetMapping(name = "show")
public ResponseEntity<?> show(@ModelAttribute Entity entity) {
return ResponseEntity.ok(entity);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@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\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"private stendhal() {\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public void mo38117a() {\n }",
"@Override public int describeContents() { return 0; }",
"@Override\n\tprotected void getData() {\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\tpublic void emprestimo() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n\t\t\tpublic int describeContents() {\n\t\t\t\treturn 0;\n\t\t\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\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public int getSize() {\n return 1;\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private void m50366E() {\n }",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"public void mo6081a() {\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"public void mo55254a() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"@Override\r\n\tpublic void billGenerate() {\n\t\t\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"protected void mo6255a() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void getStatus() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\t\tpublic void rest() {\n\t\t\t\n\t\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void init() {\n\n }",
"@Override\n protected void prot() {\n }",
"@Override\n public int getSize() {return 0;}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void mo21793R() {\n }",
"@Override\n\tpublic void debite() {\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\r\n\tpublic void just() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }"
]
| [
"0.64016664",
"0.6138185",
"0.613507",
"0.611465",
"0.6085438",
"0.6017817",
"0.59878755",
"0.59689856",
"0.5968348",
"0.5965449",
"0.59311014",
"0.59311014",
"0.5913574",
"0.59061414",
"0.59017813",
"0.58970773",
"0.58761966",
"0.58761966",
"0.58751035",
"0.5820303",
"0.5817753",
"0.5815277",
"0.57315403",
"0.5720066",
"0.5702294",
"0.5686533",
"0.5658574",
"0.5646627",
"0.56451285",
"0.56282026",
"0.56282026",
"0.56282026",
"0.56282026",
"0.56282026",
"0.56282026",
"0.56282026",
"0.5626998",
"0.5609645",
"0.558133",
"0.55785614",
"0.55724275",
"0.5554704",
"0.5554704",
"0.5554704",
"0.5554704",
"0.5554704",
"0.5554704",
"0.55535007",
"0.5551652",
"0.55501175",
"0.5542177",
"0.5538441",
"0.55382526",
"0.5535728",
"0.5534903",
"0.5531513",
"0.5531362",
"0.55229807",
"0.55184543",
"0.55150616",
"0.5514867",
"0.5511573",
"0.5501792",
"0.54905105",
"0.5489397",
"0.5483419",
"0.5481526",
"0.5481526",
"0.5475467",
"0.5474774",
"0.54718983",
"0.547177",
"0.5469168",
"0.54683065",
"0.54672545",
"0.54630446",
"0.54579645",
"0.5449089",
"0.54400146",
"0.54350764",
"0.54246575",
"0.5424032",
"0.54076564",
"0.5406685",
"0.5404923",
"0.5400598",
"0.5400598",
"0.54005355",
"0.5392041",
"0.5390741",
"0.5387172",
"0.53842765",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123"
]
| 0.0 | -1 |
TODO Autogenerated method documentation | public
// static
UriComponents showURI(Entity entity) {
return MvcUriComponentsBuilder
.fromMethodCall(MvcUriComponentsBuilder.on(AbstractItemJsonController.class).show(entity))
.buildAndExpand(entity.getId()).encode();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@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\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"private stendhal() {\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public void mo38117a() {\n }",
"@Override public int describeContents() { return 0; }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"@Override\n\tpublic void emprestimo() {\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 nghe() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n\t\t\tpublic int describeContents() {\n\t\t\t\treturn 0;\n\t\t\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\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public int getSize() {\n return 1;\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private void m50366E() {\n }",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"public void mo6081a() {\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"public void mo55254a() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"@Override\r\n\tpublic void billGenerate() {\n\t\t\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"protected void mo6255a() {\n }",
"@Override\n\tpublic void getStatus() {\n\t\t\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\t\tpublic void rest() {\n\t\t\t\n\t\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void init() {\n\n }",
"@Override\n protected void prot() {\n }",
"@Override\n public int getSize() {return 0;}",
"public void mo21793R() {\n }",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\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\r\n\tpublic void just() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }"
]
| [
"0.6404244",
"0.6140437",
"0.61380076",
"0.6117207",
"0.6087624",
"0.602105",
"0.5990689",
"0.59705734",
"0.5970112",
"0.5967838",
"0.59332395",
"0.59332395",
"0.5915592",
"0.5909275",
"0.5904789",
"0.58996826",
"0.5879197",
"0.5879197",
"0.58774817",
"0.5822945",
"0.581956",
"0.58172333",
"0.573446",
"0.57222676",
"0.57046103",
"0.5688791",
"0.56602526",
"0.56481093",
"0.56472707",
"0.5630393",
"0.5629026",
"0.5629026",
"0.5629026",
"0.5629026",
"0.5629026",
"0.5629026",
"0.5629026",
"0.5612499",
"0.5583843",
"0.55787635",
"0.5572791",
"0.55566025",
"0.55566025",
"0.55566025",
"0.55566025",
"0.55566025",
"0.55566025",
"0.5555725",
"0.55550325",
"0.5551654",
"0.55440694",
"0.55412954",
"0.5540911",
"0.5538033",
"0.55369306",
"0.553433",
"0.55339926",
"0.55255765",
"0.5520486",
"0.55174613",
"0.55168676",
"0.55129445",
"0.55031437",
"0.54916453",
"0.549067",
"0.54862046",
"0.5483428",
"0.5483428",
"0.5478164",
"0.5476345",
"0.5475282",
"0.5473077",
"0.5471041",
"0.5470732",
"0.5469003",
"0.5464761",
"0.5458939",
"0.5451293",
"0.54413325",
"0.5437739",
"0.5426917",
"0.54266095",
"0.54085326",
"0.5408528",
"0.54074776",
"0.5403288",
"0.5403288",
"0.54028183",
"0.53946877",
"0.53933674",
"0.53895754",
"0.53876036",
"0.5384768",
"0.5384768",
"0.5384768",
"0.5384768",
"0.5384768",
"0.5384768",
"0.5384768",
"0.5384768",
"0.5384768"
]
| 0.0 | -1 |
TODO Autogenerated method documentation | @PutMapping(name = "update")
public ResponseEntity<?> update(@ModelAttribute Entity storedEntity, @Valid @RequestBody Entity entity,
BindingResult result) {
if (result.hasErrors()) {
return ResponseEntity.status(HttpStatus.CONFLICT).body(result);
}
entity.setId(storedEntity.getId());
getService().save(entity);
return ResponseEntity.ok().build();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@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\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"private stendhal() {\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public void mo38117a() {\n }",
"@Override public int describeContents() { return 0; }",
"@Override\n\tprotected void getData() {\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\tpublic void emprestimo() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n\t\t\tpublic int describeContents() {\n\t\t\t\treturn 0;\n\t\t\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\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public int getSize() {\n return 1;\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private void m50366E() {\n }",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"public void mo6081a() {\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"public void mo55254a() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"@Override\r\n\tpublic void billGenerate() {\n\t\t\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"protected void mo6255a() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void getStatus() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\t\tpublic void rest() {\n\t\t\t\n\t\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void init() {\n\n }",
"@Override\n protected void prot() {\n }",
"@Override\n public int getSize() {return 0;}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void mo21793R() {\n }",
"@Override\n\tpublic void debite() {\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\r\n\tpublic void just() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }"
]
| [
"0.64016664",
"0.6138185",
"0.613507",
"0.611465",
"0.6085438",
"0.6017817",
"0.59878755",
"0.59689856",
"0.5968348",
"0.5965449",
"0.59311014",
"0.59311014",
"0.5913574",
"0.59061414",
"0.59017813",
"0.58970773",
"0.58761966",
"0.58761966",
"0.58751035",
"0.5820303",
"0.5817753",
"0.5815277",
"0.57315403",
"0.5720066",
"0.5702294",
"0.5686533",
"0.5658574",
"0.5646627",
"0.56451285",
"0.56282026",
"0.56282026",
"0.56282026",
"0.56282026",
"0.56282026",
"0.56282026",
"0.56282026",
"0.5626998",
"0.5609645",
"0.558133",
"0.55785614",
"0.55724275",
"0.5554704",
"0.5554704",
"0.5554704",
"0.5554704",
"0.5554704",
"0.5554704",
"0.55535007",
"0.5551652",
"0.55501175",
"0.5542177",
"0.5538441",
"0.55382526",
"0.5535728",
"0.5534903",
"0.5531513",
"0.5531362",
"0.55229807",
"0.55184543",
"0.55150616",
"0.5514867",
"0.5511573",
"0.5501792",
"0.54905105",
"0.5489397",
"0.5483419",
"0.5481526",
"0.5481526",
"0.5475467",
"0.5474774",
"0.54718983",
"0.547177",
"0.5469168",
"0.54683065",
"0.54672545",
"0.54630446",
"0.54579645",
"0.5449089",
"0.54400146",
"0.54350764",
"0.54246575",
"0.5424032",
"0.54076564",
"0.5406685",
"0.5404923",
"0.5400598",
"0.5400598",
"0.54005355",
"0.5392041",
"0.5390741",
"0.5387172",
"0.53842765",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123"
]
| 0.0 | -1 |
TODO Autogenerated method documentation | @DeleteMapping(name = "delete")
public ResponseEntity<?> delete(@ModelAttribute Entity entity) {
getService().delete(entity);
return ResponseEntity.ok().build();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@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\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"private stendhal() {\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public void mo38117a() {\n }",
"@Override public int describeContents() { return 0; }",
"@Override\n\tprotected void getData() {\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\tpublic void emprestimo() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n\t\t\tpublic int describeContents() {\n\t\t\t\treturn 0;\n\t\t\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\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public int getSize() {\n return 1;\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private void m50366E() {\n }",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"public void mo6081a() {\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"public void mo55254a() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"@Override\r\n\tpublic void billGenerate() {\n\t\t\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"protected void mo6255a() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void getStatus() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\t\tpublic void rest() {\n\t\t\t\n\t\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void init() {\n\n }",
"@Override\n protected void prot() {\n }",
"@Override\n public int getSize() {return 0;}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void mo21793R() {\n }",
"@Override\n\tpublic void debite() {\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\r\n\tpublic void just() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }"
]
| [
"0.64016664",
"0.6138185",
"0.613507",
"0.611465",
"0.6085438",
"0.6017817",
"0.59878755",
"0.59689856",
"0.5968348",
"0.5965449",
"0.59311014",
"0.59311014",
"0.5913574",
"0.59061414",
"0.59017813",
"0.58970773",
"0.58761966",
"0.58761966",
"0.58751035",
"0.5820303",
"0.5817753",
"0.5815277",
"0.57315403",
"0.5720066",
"0.5702294",
"0.5686533",
"0.5658574",
"0.5646627",
"0.56451285",
"0.56282026",
"0.56282026",
"0.56282026",
"0.56282026",
"0.56282026",
"0.56282026",
"0.56282026",
"0.5626998",
"0.5609645",
"0.558133",
"0.55785614",
"0.55724275",
"0.5554704",
"0.5554704",
"0.5554704",
"0.5554704",
"0.5554704",
"0.5554704",
"0.55535007",
"0.5551652",
"0.55501175",
"0.5542177",
"0.5538441",
"0.55382526",
"0.5535728",
"0.5534903",
"0.5531513",
"0.5531362",
"0.55229807",
"0.55184543",
"0.55150616",
"0.5514867",
"0.5511573",
"0.5501792",
"0.54905105",
"0.5489397",
"0.5483419",
"0.5481526",
"0.5481526",
"0.5475467",
"0.5474774",
"0.54718983",
"0.547177",
"0.5469168",
"0.54683065",
"0.54672545",
"0.54630446",
"0.54579645",
"0.5449089",
"0.54400146",
"0.54350764",
"0.54246575",
"0.5424032",
"0.54076564",
"0.5406685",
"0.5404923",
"0.5400598",
"0.5400598",
"0.54005355",
"0.5392041",
"0.5390741",
"0.5387172",
"0.53842765",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123",
"0.5383123"
]
| 0.0 | -1 |
constructor: User is instantiate by its name, its id, its position, and the velib card he has. x: the first coordinate of its position y: the second coordinate of its position card: velib card | public User(String name, int id, double x, double y, Card card){
this.name = name;
this.id = id;
this.position = new double[]{x,y};
this.card = card;
this.bicycle = null;
this.last_routine = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public AppointmentCard(User user) {\n this.stage = new Stage();\n this.userId = user.getId();\n System.out.println(\"constructor1: \" + userId);\n }",
"public Card(User user) {\n\t\tsuper();\n\t\tthis.user=user;\n\t\tuser.setCard(this);\n\t}",
"public UserCard() {\n this(DSL.name(\"b2c_user_card\"), null);\n }",
"public User() {\n this.inv = new Inventory();\n this.fl = new FriendList();\n this.tradesList = new TradesList();\n this.tradeCount = 0;\n this.downloadsEnabled = true;\n }",
"public User(String username,\n String firstname,\n String lastname) {\n //create userId\n int newID = numOfObjects + 1;\n String userId = username + \"_\" + newID;\n\n this.userId = userId;\n this.username = username;\n this.firstname = firstname;\n this.lastname = lastname;\n this.calendarsOwned = new ArrayList<Calendar_>();\n this.eventsOwned = new ArrayList<Event>();\n\n //update object counter\n numOfObjects++;\n }",
"public User(int user_id, String full_name, String address, String postal_code, int mobile_no,\n String snow_zone, String garbage_day, String password){\n this.user_id = user_id;\n this.full_name = full_name;\n this.address = address;\n this.postal_code = postal_code;\n this.mobile_no = mobile_no;\n this.snow_zone = snow_zone;\n this.garbage_day = garbage_day;\n this.password = password;\n\n }",
"public User(String uid) {\n this.uid = uid;\n }",
"public User() {\n uid= 0;\n username = \"\";\n password = \"\";\n role = \"user\";\n status = false;\n updatedTime = new Timestamp(0);\n }",
"public User(){\n nomorAkun = 0;\n pin = 0;\n saldo = 0;\n }",
"public User(String n) { // constructor\r\n name = n;\r\n }",
"public UserFrame(User user) {\n this.user = user;\n initComponents();\n fetchInfo();\n fetchBillInfo();\n }",
"public GameUser() {\n\t}",
"public User(String name) {\n\t\tthis.name = name;\n\t\tpassword = 1234;\n\t\thealth = 100;\n\t\tmana = 100;\n\t\tlevel = 1.0;\n\t\twepInvo = new ArrayList<Weapon>();\n\t\tscore = 0;\n\t\tend = false;\n\t\trightHand = null;\n\t\tleftHand = null;\n\t\tfeet = new Armor(\"Boots\", \"feet\", 0, 1);\n\t\tlegs = new Armor(\"Rags\", \"legs\", 0, 1);\n\t\ttorso = null;\n\t\thead = null;\n\t\tback = null;\n\t}",
"public UserPlayer(){\n this.playerNum = 0;\n this.isLead = false;\n this.playerHand = new Hand();\n this.suitUserChose = null;\n }",
"public User() {\n this.id = 0;\n this.username = \"gfisher\";\n this.password = \"password\";\n this.email = \"[email protected]\";\n this.firstname = \"Gene\";\n this.lastname = \"Fisher\";\n this.type = new UserPermission(true, true, true, true);\n }",
"public AppointmentCard(AppointmentsTable appointmentsTable, User user) {\n this.appointmentsTable = appointmentsTable;\n this.stage = new Stage();\n this.userId = user.getId();\n System.out.println(\"constructor2: \" + userId);\n }",
"public User()\r\n\t{\r\n\t\tthis.userId = 0;\r\n\t\tthis.userName = \"\";\r\n\t\tthis.role = \"\";\r\n\t\tthis.firstName = \"\";\r\n\t\tthis.lastName = \"\";\r\n\t\tthis.emailAddress = \"\";\r\n\t\tthis.streetAddress = \"\";\r\n\t\tthis.city = \"\";\r\n\t\tthis.state = \"\";\r\n\t\tthis.zip = 0;\r\n\t\tthis.country = \"\";\r\n\t}",
"public UserCard(Name alias) {\n this(alias, USER_CARD);\n }",
"User()\n\t{\n\n\t}",
"public User() {\n this.firstName = \"Lorenzo\";\n this.lastName = \"Malferrari\";\n this.username = \"[email protected]\";\n this.email = \"[email protected]\";\n this.password = \"123456\";\n this.city = \"Bologna\";\n this.country = \"Italia\";\n this.gender = \"Maschio\";\n this.birthdate = new Date();\n this.age = 21;\n this.imgUser = 1;\n this.last_access = new Date();\n this.registration_date = new Date();\n }",
"public User(\n int user_id,\n String phone_number,\n String email_address,\n String first_name,\n String last_name,\n String middle_initial,\n String job_title,\n String freelancer_address,\n String twitter_address,\n String facebook_address,\n String linkedin_address,\n String resume_import_path,\n String user_image_path) {\n this.var_user_id = user_id;\n this.var_email_address = email_address;\n this.var_first_name = first_name;\n this.var_last_name = last_name;\n this.var_middle_initial = middle_initial;\n this.var_job_title = job_title;\n this.var_phone_number = phone_number;\n this.var_freelancer_address = freelancer_address;\n this.var_twitter_address = twitter_address;\n this.var_facebook_address = facebook_address;\n this.var_linkedin_address = linkedin_address;\n this.var_resume_import_path = resume_import_path;\n this.var_user_image_path = user_image_path;\n }",
"public User(String n, int a) { // constructor\r\n name = n;\r\n age = a;\r\n }",
"public JSONUser(User user){\n\t\tid = user.getId();\n\t\tname = user.getName();\n\t}",
"public User(long id, String username, String email, String password) {\n this.id = id;\n this.username = username;\n this.email = email;\n this.password = password;\n}",
"public User(long userId) {\n this.id = userId;\n }",
"public Person(User user) {\n this.username = user.getUsername();\n this.email = user.getEmail();\n this.firstname = user.getFirstname();\n this.lastname = user.getLastname();\n }",
"public CustomerUser(String email, String password,String userName, String address, String name, String surname ) {\n super(email, password, userName);\n this.email = email;\n this.userName = userName;\n this.address = address;\n this.surname = surname;\n this.name = name;\n currentItems = new ArrayList<Item>();\n idCount++;\n id = CustomerUser.idCount;\n }",
"public ChatUserCard(ChatUser user, Component parent) {\n\t\tthis.parent = parent;\n\t\tthis.theUser = user;\n\t\tinitComponents();\n\t\tthis.nicknameLabel.setText(user.nickname());\n\t\ttry {\n\t\t\tthis.photoLabel.setIcon(scaledImageIcon(Converter.getImage(user.\n\t\t\t\ticon())));\n\t\t} catch (IOException ex) {\n\t\t\tLogger.getLogger(ChatUserCard.class.getName()).\n\t\t\t\tlog(Level.SEVERE, null, ex);\n\t\t}\n\n\t}",
"public User(String name, int age, int userid,int wheels) {\n\t\t\n\t\tthis.name = name;\n\t\tthis.age = age;\n\t\tthis.userid = userid;\n\t\tthis.wheels= wheels;\n\t}",
"public User(long id, String fistname, String secondname, String username, String password, String mail){\n this.id = id;\n this.firstname = fistname;\n this.secondname = secondname;\n this.username = username;\n this.password = password;\n this.email = mail;\n }",
"public UserEntity() {\n\t\tsuper();\n\t}",
"public User(Context context) {\n\t\tthis.name = \"Pingu\";\n\t\tthis.profile_picture = BitmapFactory.decodeResource(context.getResources(), R.drawable.pinguin);\n\t\tthis.personal_message = \"Ok, for now I'm just a baby, but one day I wanna be a majestic creature !\";\n\t\tthis.social_points = 0;\n\t\tthis.interests = new String []{\n\t\t\t\t\"Sports\",\n\t\t\t\t\"Party\",\n\t\t\t\t\"Music\",\n\t\t\t\t\"Food\",\n\t\t\t\t\"Flirt\",\n\t\t\t\t\"Languages\"\n\t\t\t};\n\t\t\n\t\tthis.phone=\"01747603793\";\n this.age = 15;\n this.gender = \"Mercury\";\n this.mail = \"[email protected]\";\n\t}",
"@Test\n public void userCustomConstructor_isCorrect() throws Exception {\n\n int id = 123456;\n int pin_hash = 98745;\n int pin = 9876;\n String salt = \"test salt\";\n String username = \"testUsername\";\n int firstTime = 0;\n String budget = \"test\";\n int hasPin = 1;\n\n //Create empty user\n User user = new User(id, username, pin_hash, pin, salt, firstTime, budget, hasPin);\n\n // Verify Values\n assertEquals(id, user.getId());\n assertEquals(pin_hash, user.getPin_hash());\n assertEquals(pin, user.getPin());\n assertEquals(salt, user.getSalt());\n assertEquals(username, user.getUsername());\n assertEquals(firstTime, user.getFirstTime());\n assertEquals(budget, user.getBudget());\n assertEquals(hasPin, user.getHasPin());\n }",
"public User(Long id,com.institucion.fm.security.model.User user){\n\t\tthis.id=id;\n\t\tthis.user=user;\n\t}",
"public User(String name){\n this.name = name;\n }",
"public User() {\n\t\tsuper(AppEntityCodes.USER);\n\t}",
"public UserRecord(Integer idUser, String name, String surname, String title, LocalDateTime dateBirth, LocalDateTime dateCreate, LocalDateTime dateUpdate, LocalDateTime dateDelete, String govId, String username, String password, String email, String gender, String status) {\n super(User.USER);\n\n set(0, idUser);\n set(1, name);\n set(2, surname);\n set(3, title);\n set(4, dateBirth);\n set(5, dateCreate);\n set(6, dateUpdate);\n set(7, dateDelete);\n set(8, govId);\n set(9, username);\n set(10, password);\n set(11, email);\n set(12, gender);\n set(13, status);\n }",
"public User(int aId, String aFirstName, String aLastName){\r\n this.id = aId;\r\n this.firstName = aFirstName;\r\n this.lastName = aLastName;\r\n }",
"public User(){\r\n this.id = 0;\r\n this.firstName = null;\r\n this.lastName = null;\r\n }",
"public User() {\r\n \r\n }",
"public User(int id) {\n\t\tthis.id = id;\n\t\tratings = new HashMap<Movie, Rating>();\n\t\tavgR = new Genre[19];\n\t\tfor(int i = 0; i < avgR.length; i++) {\n\t\t\tavgR[i] = new Genre(Genre.AVAILGENRES[i]);\n\t\t}\n\t}",
"private User(String username){\n this.username = username;\n this.games = new ArrayList<>();\n }",
"public UserCard(String alias) {\n this(DSL.name(alias), USER_CARD);\n }",
"public User(String username, int colour){\n this.userName = username;\n this.colour = colour;\n }",
"public User(int contextId, String name, int id) {\n super();\n this.id = id;\n if (this.id >= ID_SOURCE) ID_SOURCE = this.id + 1;\n this.contextId = contextId;\n this.name = name;\n }",
"public User(String username, String password) {\n this.userID = UUID.randomUUID();\n this.username = username;\n this.password = password;\n this.isTechAgent = false;\n }",
"public User(String userId) {\n\t\t\n\t\tthis.name= null;\n\t\tthis.userId= userId;\n\t\tthis.height= 0;\n\t\tthis.gymFrequency= 0;\n\t\tthis.loseGainPerWeek= 0;\n\t\tthis.age= 0;\n\t\tthis.waterReminder= 0;\n\t\tthis.weight= 0;\n\t\tthis.gender= null;\n//\t\tthis.goal= goal;\n\t\tthis.restrictions=\"none\";\n\t}",
"public User(Long id) {\n\t\tsuper(id, AppEntityCodes.USER);\n\t}",
"public User() {\n setName(\"\");\n setBirthdate(\"\");\n setCity(\"\");\n setIsSingle(true);\n setPartnerName(\"\");\n setPartnerGender(\"\");\n setMonthsUntilDeath(0);\n }",
"public UserMember() {\r\n //this.email = \"[email protected]\";\r\n this.email = \"\";\r\n this.firstName = \"\";\r\n this.lastName = \"\";\r\n this.username = \"\";\r\n this.password = \"\";\r\n this.memberId = 0;\r\n }",
"public UserObject() {\n command = \"\";\n lastCommand = \"\";\n response = \"\";\n }",
"public User() {\n\t\tsuper();\n\t}",
"public User() {\n\t\tsuper();\n\t}",
"public User() {\n\t\tsuper();\n\t}",
"User(String userID, String password, String firstName, String lastName) {\n this.userID = userID;\n this.password = password;\n this.firstName = firstName;\n this.lastName = lastName;\n }",
"public User(){\n this(null, null);\n }",
"public User(String name) {\r\n this.setName(name);\r\n this.id = ++count;\r\n\r\n }",
"public User(String uid, String name) {\n displayName = name;\n this.uid = uid;\n }",
"public User(String id, String name, String surname) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t\tthis.surname = surname;\n\t}",
"public User(int id, String username, int flag) {\n\t\tsetId(id);\n\t\tsetUsername(username);\n\t\tsetSellerFlag(flag);\n\t}",
"public User() {\n this.username = \"test\";\n }",
"public User(int userID, String name, String password) {\n this.userID = userID;\n this.name = name;\n this.password = password;\n }",
"public User(int userId, String email, String password, String nickName,\r\n\t\t\tint money, String avatar, int userChar) {\r\n\t\tthis.userId = userId;\r\n\t\tthis.email = email;\r\n\t\tthis.password = password;\r\n\t\tthis.nickName = nickName;\r\n\t\tthis.money = money; \r\n\t\tthis.avatar = avatar;\r\n\t\tthis.characterId = userChar;\r\n\t}",
"public User()\n\t{\n\t\tfirstName = \"\";\n\t\tlastName = \"\";\n\t\tusername = \"\";\n\t\tpassword = \"\";\n\t}",
"user(String username, int herotype) {\r\n this.username = username;\r\n this.herotype = herotype;\r\n }",
"public UserRecord(Long id, String nickName, Sex sex, Prefecture prefectureId, String email, String memo, LocalDateTime createAt, LocalDateTime updateAt) {\n super(User.USER);\n\n set(0, id);\n set(1, nickName);\n set(2, sex);\n set(3, prefectureId);\n set(4, email);\n set(5, memo);\n set(6, createAt);\n set(7, updateAt);\n }",
"public User(UUID id, String name, String password, Instant creation, boolean isAdmin) {\n\n this.id = id;\n this.name = name;\n this.password = password;\n this.about = \"Hi! I'm \" + name + \"!\";\n this.allowMessageDel = true;\n this.messagesSent = 0; \n this.creation = creation;\n this.showAllConversations = false;\n this.isAdmin = isAdmin;\n this.profilePictureBytes = new byte[0];\n this.conversationVisibilities = new HashMap();\n }",
"public User() {\r\n\r\n\t}",
"public User(int contextId, String name) {\n super();\n this.id = ID_SOURCE++;\n this.contextId = contextId;\n this.name = name;\n }",
"public User(Parcel in){\n String[] data = new String[4];\n\n in.readStringArray(data);\n // the order needs to be the same as in writeToParcel() method\n // Converts from string\n this.name = data[0];\n this.description = data[1];\n this.id = Integer.parseInt(data[2]);\n this.followed = Boolean.parseBoolean(data[3]);\n }",
"GameObject(int x, int y){\n loadSprite();\n this.x = x;\n this.y = y;\n }",
"public User(int id, String name, String surname, String mail, String phone, String avatar, Role role) {\n this.id = id;\n this.name = name;\n this.surname = surname;\n this.mail = mail;\n this.phone = phone;\n this.avatar = avatar;\n this.role = role;\n }",
"public User() {\n super();\n }",
"public User() {\n super();\n }",
"public User(int id, String name, int cash) {\n DoubleProperty[] doubles = new DoubleProperty[4];\n Arrays.fill(doubles,new SimpleDoubleProperty(0));\n skills = Arrays.asList(doubles);\n \n DoubleProperty[] doubles2 = new DoubleProperty[4];\n Arrays.fill(doubles2,new SimpleDoubleProperty(1));\n potions = Arrays.asList(doubles2);\n \n this.id = id;\n this.name = name;\n this.cash.setValue(String.valueOf(cash));\n }",
"public Card(int x) {\n\t\tid = x;\n\t}",
"public User() {\n\n\t}",
"public User(String name) {\r\n\t\tthis.name = name;\r\n\t}",
"public User(String username , String password)\n {\n this.userID++;\n this.username = username;\n this.password = password;\n }",
"public CreateUser(int age, String name){ // constructor\n userAge = age;\n userName = name;\n }",
"public Player(String displayName, int userId) {\n this.displayName = displayName;\n this.userId = userId;\n inventory = new PlayerInventory();\n toSkip = 0;\n }",
"public User() {\r\n\t}",
"public User() {\n }",
"public Entity( int x, int y){\n this.x = x;\n this.y = y;\n }",
"private void initUserInstance(User user){\n Fridge fridge = DatabaseHelper.getDatabaseInstance().takeFridgeOfUser(user);\n //print the printable\n Log.i(\"login_fridge\", fridge.toString());\n //assign fridge to user\n user.setFridge(fridge);\n\n //populate Instance class with current user\n Instance.getSingletonInstance().setCurrentUser(user);\n }",
"public User() {\r\n }",
"public Entity(float x, float y) {\n this.position = new Point(0,0);\n realX = x;\n realY = y;\n determinePosition();\n }",
"public User() {\n name = \"\";\n }",
"public User(String name) {\n\t\tthis.name = name;\n\t\tthis.score = 0;\n\t\tthis.levelReached = 0;\n\t}",
"public AppointmentCard(User user, LocalDate date) {\n this.stage = new Stage();\n this.userId = user.getId();\n this.datePicker.setValue(date);\n System.out.println(\"constructor3: \" + userId);\n }",
"public User()\n\t{\n\t}",
"public User(){\n\n }",
"public UserInfo(String name, long mobileNumber, String address) {\n\t\t\t\tsuper(name, mobileNumber);//super kullaniyoruz cunku test sinifindan verilen datalar su an icinde bulundugumuz\n\t\t\t\t//constructra veriliyor. Parent class'taki constructor'a tasimak icin \"super\" kullaniyoruz. \n\t\t\t\tthis.address=address;\n\t\t\t}",
"public User(){\n }",
"public User(Long id, String username, String email, String firstName, String lastName, String password, String image, Date creationDate) {\n this.id = id;\n this.username = username;\n this.email = email;\n this.firstName = firstName;\n this.lastName = lastName;\n this.password = password;\n this.image = image;\n this.creationDate = creationDate;\n this.active = true;\n }",
"public User(String username , String password , int rating , int wins , int losses)\n {\n if (wins < 0 || losses < 0 || rating < 0)\n {\n throw new IllegalArgumentException(\"You can't have a negative win,loss or rating.\");\n }\n this.userID++;\n this.username = username;\n this.password = password;\n this.rating = rating;\n this.wins = wins;\n this.losses = losses;\n this.currentLobby = null;\n }",
"public User() {\n\t}",
"public User(String uid, String nom, String prenom, String email) {\n this.uid = uid;\n mNom = nom;\n mPrenom = prenom;\n mEmail = email;\n }",
"public User(int id,String firstName, String lastName, String username, String email, String password, String city, String country, String gender, Date birthdate, int age, int imgUser, Date last_access, Date registration_date) {\n this.id = id;\n this.firstName = firstName;\n this.lastName = lastName;\n this.username = username;\n this.email = email;\n this.password = password;\n this.city = city;\n this.country = country;\n this.gender = gender;\n this.birthdate = birthdate;\n this.age = age;\n this.imgUser = imgUser;\n this.last_access = last_access;\n this.registration_date = registration_date;\n }",
"public void populateUserInformation()\n {\n ViewInformationUser viewInformationUser = new ViewFXInformationUser();\n\n viewInformationUser.buildViewProfileInformation(clientToRegisteredClient((Client) user), nameLabel, surnameLabel, phoneLabel, emailLabel, addressVbox);\n }"
]
| [
"0.69038403",
"0.6637793",
"0.6529976",
"0.64858204",
"0.6424413",
"0.64064485",
"0.63549167",
"0.6321687",
"0.6305717",
"0.6269279",
"0.6266854",
"0.6262217",
"0.622297",
"0.61994636",
"0.61688083",
"0.6166072",
"0.6147384",
"0.6132442",
"0.6117446",
"0.6110653",
"0.61087775",
"0.6085564",
"0.60817206",
"0.60761386",
"0.60682017",
"0.6051761",
"0.6031945",
"0.60237336",
"0.6017544",
"0.601255",
"0.59979224",
"0.59965503",
"0.597057",
"0.59646064",
"0.5949876",
"0.5948471",
"0.59283143",
"0.59282684",
"0.5921047",
"0.59187734",
"0.59109807",
"0.589906",
"0.5895922",
"0.58761615",
"0.58670855",
"0.5864149",
"0.5862153",
"0.5857685",
"0.58562976",
"0.5849071",
"0.58395916",
"0.5819598",
"0.5819598",
"0.5819598",
"0.5816969",
"0.5812225",
"0.58044636",
"0.5803516",
"0.58011645",
"0.5795455",
"0.5792964",
"0.5791364",
"0.57903236",
"0.5779346",
"0.57791555",
"0.5767002",
"0.57653064",
"0.57642823",
"0.5756051",
"0.57555753",
"0.5753874",
"0.5749982",
"0.5748645",
"0.5748645",
"0.5746839",
"0.5743984",
"0.5731588",
"0.5731249",
"0.5726778",
"0.57267314",
"0.572639",
"0.57217807",
"0.57150114",
"0.5714682",
"0.57141024",
"0.5712825",
"0.5710674",
"0.5703181",
"0.5698023",
"0.5696561",
"0.56890696",
"0.5686323",
"0.5685486",
"0.5685039",
"0.5677196",
"0.5663171",
"0.565869",
"0.5657204",
"0.5654004",
"0.5649581"
]
| 0.84852374 | 0 |
the function count_walk_time is used to calculate the time spent on walking between the current position of the user and the chosen location. x: the first coordinate of the chosen location y: the second coordinate of the chosen location | public double count_walk_time(double x, double y){
return Math.sqrt(Math.pow(x-this.getPosition()[0],2) + Math.pow(y-this.getPosition()[1],2)) / this.WALK_SPEED;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void move()\n\t{\n time++;\n\t\tif (time % 10 == 0)\n\t\t{\n\t\t\thistogramFrame.clearData();\n\t\t}\n\t\tfor (int i = 0; i < nwalkers; i++)\n\t\t{\n\t\t\tdouble r = random.nextDouble();\n\t\t\tif (r <= pRight)\n\t\t\t{\n\t\t\t\txpositions[i] = xpositions[i] + 1;\n\t\t\t}\n\t\t\telse if (r < pRight + pLeft)\n\t\t\t{\n\t\t\t\txpositions[i] = xpositions[i] - 1;\n\t\t\t}\n\t\t\telse if (r < pRight + pLeft + pDown)\n\t\t\t{\n\t\t\t\typositions[i] = ypositions[i] - 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\typositions[i] = ypositions[i] + 1;\n\t\t\t}\n\t\t\tif (time % 10 == 0)\n\t\t\t{\n\t\t\t\thistogramFrame.append(Math.sqrt(xpositions[i] * xpositions[i]\n\t\t\t\t\t\t+ ypositions[i] * ypositions[i]));\n\t\t\t}\n\t\t\txmax = Math.max(xpositions[i], xmax);\n\t\t\tymax = Math.max(ypositions[i], ymax);\n\t\t\txmin = Math.min(xpositions[i], xmin);\n\t\t\tymin = Math.min(ypositions[i], ymin);\n\t\t}\n\t}",
"protected final void walk(int direction) {\n\t\tint temp_x = x_coord;\n\t\tint temp_y = y_coord;\n\t//Update location\t\n\t\tif (!hasMoved) {\n\t\t\ttemp_x += x_directions[direction];\n\t\t\ttemp_x += Params.world_width;\n\t\t\ttemp_x %= Params.world_width;\n\t\t\ttemp_y += y_directions[direction];\n\t\t\ttemp_y += Params.world_height;\n\t\t\ttemp_y %= Params.world_height;\n\t\t}\t\n\t//Specific to walking during fight\n\t\tif (fightMode) {\n\t\t\tboolean critterInLocation = false;\n\t\t\tfor (Critter c: population) {\n\t\t\t\tif ((c.x_coord == temp_x) && (c.y_coord == temp_y)) {\n\t\t\t\t\tcritterInLocation = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!critterInLocation) {\n\t\t\t\tx_coord = temp_x;\n\t\t\t\ty_coord = temp_y;\n\t\t\t}\n\t\t}\n\t\telse {\t\t\t\t\t//Specific to walking in time step\n\t\t\tx_coord = temp_x;\n\t\t\ty_coord = temp_y;\n\t\t}\n\t//Update energy\n\t\tenergy -= Params.walk_energy_cost;\n\t//Update hasMoved\n\t\thasMoved = true;\n\t}",
"public int calcTravelTime(Request request) {\r\n\t\tNdPoint currentLocation = space.getLocation(this);\r\n\t\tNdPoint s1location = request.getOrigin();\r\n\t\tNdPoint s2location = request.getDestination();\r\n\r\n\t\t// Calc time between current position and first source\r\n\t\tdouble distance1 = this.space.getDistance(currentLocation, s1location);\r\n\t\t// Calc time between first source and second source\r\n\t\tdouble distance2 = this.space.getDistance(s1location, s2location);\r\n\t\t// Added times\r\n\t\tdouble totaldistance = distance1 + distance2;\r\n\t\tint totaltime = (int) (totaldistance / (this.speed * 0.5));\r\n\r\n\t\treturn totaltime;\r\n\t}",
"@Override\n public void onLocationChanged(Location location) {\n count++;\n }",
"public void timePassed() {\n this.moveOneStep();\n }",
"public String computeWalkingTime (double distLewisWatney, String table, int row) {\n\t\t\n\t\t//TODO: Traverse the table to get the correct row's string. (Hint: look at the \n\t\t//starter code for the interpretHexadecimal method to see a cool trick for stepping\n\t\t//through a String and breaking it apart using a certain character.) \n\t\tString mySplitResult = table.split(\"\\n\")[row];\n\t\t\n\t\t//TODO: Extract from that row the needed distance. \n\t\tScanner s = new Scanner(mySplitResult).useDelimiter(\"[^0-9]+\");\n\t\ts.nextInt();\n\t\ts.nextInt();\n\t\tint lewisToHab = s.nextInt();\n\t\tint watneyToHab = s.nextInt();\n\t\t\n\t\t//TODO: Compute the walking time for Watney and Lewis to the ship. \n\t\t//Watney is injured so his walking pace is 0.9 meters per second. \n\t\t//Lewis' walking pace is 1.7 meters per second.\n\t\tint watneyWalkingTime = (int)Math.round(watneyToHab/0.9);\n\t\tint lewisWalkingTime = (int)Math.round(lewisToHab/1.7);\n\t\t\n\t\ts.close();\n\t\t\n\t\treturn \"Watney walking time to ship: \" + watneyWalkingTime + \" seconds\" + \"\\n\" +\n\t\t \"Lewis walking time to ship: \" + lewisWalkingTime + \" seconds\" + \"\\n\";\n\n\t}",
"public void walking(final Player p){\n timerListener = new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n //test to see if the player is currently jumping\n if(jumpState != 2){\n //if the player is not jumping this if else statement will\n //change the character from leg out to leg in position\n if(jumpState == 1){\n //sets the image to have the leg in\n jumpState = 0;\n }\n else{\n //sets the image to have the leg out\n jumpState = 1;\n }\n\n }\n\n }\n };\n //creates the timer for continous animation of walkListener\n walker = new Timer(getWalkSpeed(), timerListener);\n //starts timer for walk animation\n walker.start();\n ActionListener walkIncListener = new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n if (getWalkSpeed() > WALK_SPEED_MIN)\n {\n System.out.println(\"1\");\n walker.stop();\n incWalkSpeed(getWalkSpeedInc());\n walker = new Timer(getWalkSpeed(), timerListener);\n walker.start();\n }\n else\n {\n walkInc.stop();\n System.out.println(\"2\");\n }\n\n }\n };\n walkInc = new Timer(WALK_SPEED, walkIncListener);\n //starts timer for walk animation\n walker.start();\n ActionListener dead = new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n if(p.isAlive() == false){\n walker.stop();\n }\n }\n };\n Timer kill = new Timer(100, dead);\n kill.start();\n\n }",
"public void update(float deltaTime) {\n\n\n xpos += xspeed * (deltaTime / 1000.0);\n walkingTime += deltaTime;\n }",
"public void incWalkSpeed(int n)\n{\n walkSpeed = walkSpeed - n;\n}",
"protected long travel() {\n\n return Math.round(((1 / Factory.VERTEX_PER_METER_RATIO) / (this.speed / 3.6)) * 1000);\n }",
"@Override\n public void onLocationChanged(Location location) {\n counter++;\n lat = Double.toString(location.getLatitude());\n lon = Double.toString(location.getLongitude());\n TextView tv5 = (TextView) ((Activity)context).findViewById(R.id.textView2);\n tv5.setText(\"Your Location: Lat \" +lat.substring(0,6)+\" Long \"+lon.substring(0,6));\n\n if (idtv.equals(\"A\") && flag==1) {\n collected++;\n TextView tv2 = (TextView) ((Activity) context).findViewById(R.id.textView5);\n tv2.setText(\"Collected : \"+collected);\n }\n else if (idtv.equals(\"B\") && flag==1) {\n collected++;\n TextView tv3 = (TextView) ((Activity) context).findViewById(R.id.textView6);\n tv3.setText(\"Collected : \"+collected);\n }\n else if (idtv.equals(\"C\") && flag==1) {\n collected++;\n TextView tv4 = (TextView) ((Activity) context).findViewById(R.id.textView7);\n tv4.setText(\"Collected : \"+collected);\n }\n\n call(lat, lon);\n\n }",
"public void randomWalk() {\n if (getX() % GameUtility.GameUtility.TILE_SIZE < 5 && getY() % GameUtility.GameUtility.TILE_SIZE < 5) {\n if (canChangeDirection) {\n direction = (int) (Math.random() * 3);\n direction += 1;\n direction *= 3;\n canChangeDirection = false;\n }\n }\n move(direction);\n if (timer >= timeTillChanngeDirection) {\n canChangeDirection = true;\n timer = 0;\n }\n\n if (lastLocation.x == this.getLocation().x && lastLocation.y == this.getLocation().y) {\n direction = (direction + 3) % 15;\n canChangeDirection = false;\n\n }\n lastLocation = this.getLocation();\n\n }",
"public void passTime(){\n growPop();\n growGdp();\n growSocial();\n growLiving();\n }",
"public void PointCount(int timeremain)\n\t{\n\n\t\tLog.e(\"Time\",\"\"+timeremain);\n\n\t\tif(timeremain<29 && timeremain>=25)\n\t\t{\n\t\t\tpoints=5;\n\t\t\ttxtpoint.setText(\"\" + points);\n\t\t\tdb.AddtoFavorite(new Pojo(allArrayQid[currentPosition], String.valueOf(points),Constant.ADD_LEVEL_IDD));\n\t\t}\n\t\telse if(timeremain<25 && timeremain>=20)\n\t\t{\n\t\t\tpoints=3;\n\t\t\ttxtpoint.setText(\"\" + points);\n\t\t\tdb.AddtoFavorite(new Pojo(allArrayQid[currentPosition], String.valueOf(points),Constant.ADD_LEVEL_IDD));\n\t\t}\n\n\t\telse if(timeremain<20 && timeremain>=1)\n\t\t{\n\t\t\tpoints=1;\n\t\t\ttxtpoint.setText(\"\" + points);\n\t\t\tdb.AddtoFavorite(new Pojo(allArrayQid[currentPosition], String.valueOf(points),Constant.ADD_LEVEL_IDD));\n\t\t}\n\t}",
"public void calculateShooterInfo(double distance) {\n }",
"@Override\n\tpublic boolean drive2Exit() throws Exception {\n\t\tint[][] timesVisited = new int[width][height];\n\t\tfor (int i = 0; i < timesVisited.length; i++) {\n\t\t\tfor (int j = 0; j < timesVisited[0].length; j++) {\n\t\t\t\ttimesVisited[i][j] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\twhile (robot.isAtExit() == false) {\n\t\t\t/* start a list of potential positions to move to. */\n\t\t\tLinkedList<CardinalDirectionNumVisitsPair> possibleDirections = new LinkedList<CardinalDirectionNumVisitsPair>();\n\t\t\t\n\t\t\t/* get the directions and number of visits to all accessible adjacent spaces. */\n\t\t\tint robotX = robot.getCurrentPosition()[0];\n\t\t\tint robotY = robot.getCurrentPosition()[1];\n\t\t\taddCardinalDirectionNumVisitsPairIfValid(robotX + 1, robotY, CardinalDirection.East, possibleDirections, timesVisited);\n\t\t\taddCardinalDirectionNumVisitsPairIfValid(robotX - 1, robotY, CardinalDirection.West, possibleDirections, timesVisited);\n\t\t\taddCardinalDirectionNumVisitsPairIfValid(robotX, robotY + 1, CardinalDirection.North, possibleDirections, timesVisited);\n\t\t\taddCardinalDirectionNumVisitsPairIfValid(robotX, robotY - 1, CardinalDirection.South, possibleDirections, timesVisited);\n\t\t\t\n\t\t\t/* find the minimum number of visits. */\n\t\t\tint minVisits = Integer.MAX_VALUE;\n\t\t\tfor (CardinalDirectionNumVisitsPair pair : possibleDirections) {\n\t\t\t\tif (pair.numVisits < minVisits) {\n\t\t\t\t\tminVisits = pair.numVisits;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* remove all pairs that do NOT have minVisits visits from the list. */\n\t\t\tfor (Iterator<CardinalDirectionNumVisitsPair> iterator = possibleDirections.listIterator(); iterator.hasNext(); ) {\n\t\t\t CardinalDirectionNumVisitsPair pair = iterator.next();\n\t\t\t if (pair.numVisits != minVisits) {\n\t\t\t iterator.remove();\n\t\t\t }\n\t\t\t}\n\t\t\t\n\t\t\t/* the list now contains only spaces that have the minimum number of visits. */\n\t\t\t/* pick randomly from the list. */\n\t\t\tint randomIndex = (int) Math.floor(Math.random() * possibleDirections.size());\n\t\t\tCardinalDirectionNumVisitsPair randomPair = possibleDirections.get(randomIndex);\n\t\t\t\n\t\t\t/* turn to face that direction. */\n\t\t\trobot.turnToDirection(randomPair.cardinalDirection);\n\t\t\t\n\t\t\t/* move. */\n\t\t\trobot.move(1, false);\n\t\t\t\n\t\t\t/* update the numVisits array. */\n\t\t\ttimesVisited[robot.getCurrentPosition()[0]][robot.getCurrentPosition()[1]]++;\n\t\t}\n\t\t\n\t\treturn robot.stepOutOfExit();\n\t}",
"public void caltotaltraveltime()\n {\n \t\n \t switch(this.mLegs.size())\n \t {\n \t case 0:\n \t {\n \t\t this.mTravelTime=0;\n \t\t break;\n \t }\n \t case 1:\n \t { \n \t\t this.mTravelTime=this.mLegs.get(0).flighttime();\n \t\t break;\n \t }\n \t case 2:\n \t {\n \t\t Date arrivalt = this.mLegs.get(1).arrivaldate();\n \t\t Date departt = this.mLegs.get(0).departuredate();\n \t\t long diff = (arrivalt.getTime() - departt.getTime())/60000;\n \t\t this.mTravelTime=diff;\n \t\t break;\n \t }\n \t case 3:\n \t {\n \t Date arrivalt = this.mLegs.get(2).arrivaldate();\n \t Date departt = this.mLegs.get(0).departuredate();\n \t long diff = (arrivalt.getTime() - departt.getTime())/60000;\n \t this.mTravelTime=diff;\n \t break;\n \t }\n \t }\n }",
"public void timePassed() {\n if (keyboard.isPressed(KeyboardSensor.LEFT_KEY) && keyboard.isPressed(KeyboardSensor.RIGHT_KEY)) {\n return;\n } else if (keyboard.isPressed(KeyboardSensor.LEFT_KEY)) {\n moveLeft();\n\n } else if (keyboard.isPressed(KeyboardSensor.RIGHT_KEY)) {\n moveRight();\n }\n }",
"@Override\r\n\tpublic void doTimeStep() {\n\t\tdir = Critter.getRandomInt(8);\r\n\t\t\r\n\t\tnumSteps = Critter.getRandomInt(maxStep) + 1;\r\n\t\t\r\n\t\t//go a random number of steps in that direction\r\n\t\tfor(int i = 0; i < numSteps; i++) {\r\n\t\t\twalk(dir);\r\n\t\t}\t\t\r\n\t}",
"public int getRideTime() {\r\n\r\n\t\treturn client_p.getManhattanDistanceTo(destination);\r\n\r\n\r\n\t}",
"public int getTurnaround (){\n return finishingTime-arrival_time;\n }",
"public void idle(double deltaTime) {\n\n\n float distance = distanceCalc();\n if (distance < 10000) {\n homing();\n } else {\n idleMovement -= deltaTime;\n\n Random rand = new Random();\n int directionNum = rand.nextInt((4 - 1) + 1) + 1;\n\n if (directionNum == 1) {\n yPos -= speed * deltaTime;\n idleMovement = idleRate;\n }\n if (directionNum == 2) {\n yPos += speed * deltaTime;\n idleMovement = idleRate;\n }\n if (directionNum == 3) {\n xPos -= speed * deltaTime;\n idleMovement = idleRate;\n }\n if (directionNum == 4) {\n xPos += speed * deltaTime;\n idleMovement = idleRate;\n }\n }\n }",
"CalculationResult goMovetime(int movetime);",
"public int calculateTime(int hospX, int hospY, int speed){\n\n\t\tdouble dist = Math.hypot(hospX-locX,hospY-locY);\n\t\treturn (int) (dist/speed);\n\n\n\t}",
"int updateCount(double dist);",
"@Override\n public float distanceAdjacent(int x1, int y1, int x2, int y2) {\n float duration = 0;\n\n if (x1 == x2 || y1 == y2) {\n MapTile.Instance fromTile = getTileData(x1, y1);\n MapTile.Instance toTile = getTileData(x2, y2);\n assert fromTile != null && toTile != null;\n\n Direction move = Direction.get(x2 - x1, y2 - y1);\n\n int fromHeight = fromTile.heightOf(move);\n int toHeight = toTile.heightOf(move.inverse());\n\n // steepness\n float t1inc = (fromHeight - fromTile.getHeight()) / (TILE_SIZE / 2);\n float t2inc = (toHeight - toTile.getHeight()) / (TILE_SIZE / 2);\n\n // actual duration of walking\n float walkSpeedT1 = (1f / hypoLength(t1inc)) * walkSpeed;\n float walkSpeedT2 = (1f / hypoLength(t2inc)) * walkSpeed;\n\n // duration += walkspeed(steepness_1) * dist + walkspeed(steepness_2) * dist\n duration += (walkSpeedT1 + walkSpeedT2) * TILE_SIZE;\n\n // height difference on the sides of the tiles\n float cliffHeight = (toHeight - fromHeight) * TILE_SIZE_Z;\n\n // climbing if more than 'an acceptable height'\n if (cliffHeight > 0) {\n duration += (cliffHeight / climbSpeed);\n }\n\n } else {\n // TODO allow diagonal tracing\n Logger.WARN.print(String.format(\n \"Pathfinding (%s) asked for non-adjacent tiles (%d, %d) (%d, %d)\",\n getClass(), x1, y1, x2, y2\n ));\n\n return Float.POSITIVE_INFINITY;\n }\n\n return duration;\n }",
"public abstract int drive(int journeyDistance);",
"long getVisitStarttime();",
"long getVisitStarttime();",
"public static int countingValleys(int steps, String path) {\n // Write your code here\n int valleys = 0;\n int currentAltitude = 0;\n\n for (int i = 0; i < path.length(); i++)\n if (path.charAt(i) == 'D') {\n // Downhill\n currentAltitude--;\n \n } else if (path.charAt(i) == 'U') {\n // Uphill\n currentAltitude++;\n if (currentAltitude == 0) { \n valleys++;\n }\n }\n return valleys;\n }",
"public int getTravelTime() {\r\n return travelTime;\r\n }",
"@Override\n public void update(float delta) {\n\tif (player.getState() == PlayerState.JUMPING) {\n\t walkingStateTime = 0;\n\t jumpingStateTime += delta;\n\t} else if (player.getState() == PlayerState.WALKING) {\n\t jumpingStateTime = 0;\n\t walkingStateTime += delta;\n\t} else if (player.getState() == PlayerState.IDLE) {\n\t walkingStateTime = 0;\n\t jumpingStateTime = 0;\n\t}\n\t\n }",
"public static long travelTime(Point p1, Point p2, double speed) {\n return DoubleMath.roundToLong((Point.distance(p1, p2) / speed) * 60d,\n RoundingMode.CEILING);\n }",
"int getTimesCombatActionsCalled();",
"public int TakeStep()\n\t\t{\n\t\t// the eventual movement command is placed here\n\t\tVec2\tresult = new Vec2(0,0);\n\n\t\t// get the current time for timestamps\n\t\tlong\tcurr_time = abstract_robot.getTime();\n\n\n\t\t/*--- Get some sensor data ---*/\n\t\t// get vector to the ball\n\t\tVec2 ball = abstract_robot.getBall(curr_time);\n\n\t\t// get vector to our and their goal\n\t\tVec2 ourgoal = abstract_robot.getOurGoal(curr_time);\n\t\tVec2 theirgoal = abstract_robot.getOpponentsGoal(curr_time);\n\n\t\t// get a list of the positions of our teammates\n\t\tVec2[] teammates = abstract_robot.getTeammates(curr_time);\n\n\t\t// find the closest teammate\n\t\tVec2 closestteammate = new Vec2(99999,0);\n\t\tfor (int i=0; i< teammates.length; i++)\n\t\t\t{\n\t\t\tif (teammates[i].r < closestteammate.r)\n\t\t\t\tclosestteammate = teammates[i];\n\t\t\t}\n\n\n\t\t/*--- now compute some strategic places to go ---*/\n\t\t// compute a point one robot radius\n\t\t// behind the ball.\n\t\tVec2 kickspot = new Vec2(ball.x, ball.y);\n\t\tkickspot.sub(theirgoal);\n\t\tkickspot.setr(abstract_robot.RADIUS);\n\t\tkickspot.add(ball);\n\n\t\t// compute a point three robot radii\n\t\t// behind the ball.\n\t\tVec2 backspot = new Vec2(ball.x, ball.y);\n\t\tbackspot.sub(theirgoal);\n\t\tbackspot.setr(abstract_robot.RADIUS*5);\n\t\tbackspot.add(ball);\n\n\t\t// compute a north and south spot\n\t\tVec2 northspot = new Vec2(backspot.x,backspot.y+0.7);\n\t\tVec2 southspot = new Vec2(backspot.x,backspot.y-0.7);\n\n\t\t// compute a position between the ball and defended goal\n\t\tVec2 goaliepos = new Vec2(ourgoal.x + ball.x,\n\t\t\t\tourgoal.y + ball.y);\n\t\tgoaliepos.setr(goaliepos.r*0.5);\n\n\t\t// a direction away from the closest teammate.\n\t\tVec2 awayfromclosest = new Vec2(closestteammate.x,\n\t\t\t\tclosestteammate.y);\n\t\tawayfromclosest.sett(awayfromclosest.t + Math.PI);\n\n\n\t\t/*--- go to one of the places depending on player num ---*/\n\t\tint mynum = abstract_robot.getPlayerNumber(curr_time);\n\n\t\t/*--- Goalie ---*/\n\t\tif (mynum == 0)\n\t\t\t{\n\t\t\t// go to the goalie position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = goaliepos;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.1) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- midback ---*/\n\t\telse if (mynum == 1)\n\t\t\t{\n\t\t\t// go to a midback position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = backspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 2)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = northspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 4)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = southspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.3 )\n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*---Lead Forward ---*/\n\t\telse if (mynum == 3)\n\t\t\t{\n\t\t\t// if we are more than 4cm away from the ball\n\t\t\tif (ball.r > .3)\n\t\t\t\t// go to a good kicking position\n\t\t\t\tresult = kickspot;\n\t\t\telse\n\t\t\t\t// go to the ball\n\t\t\t\tresult = ball;\n\t\t\t}\n\n\n\t\t/*--- Send commands to actuators ---*/\n\t\t// set the heading\n\t\tabstract_robot.setSteerHeading(curr_time, result.t);\n\n\t\t// set speed at maximum\n\t\tabstract_robot.setSpeed(curr_time, 1.0);\n\n\t\t// kick it if we can\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\tabstract_robot.kick(curr_time);\n\n\t\t/*--- Send message to other robot ---*/\n\t\t// COMMUNICATION\n\t\t// if I can kick\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\t{\n\t\t\t// and I am robot #3\n\t\t\tif ((mynum==3))\n\t\t\t\t{\n\t\t\t\t// construct a message\n\t\t\t\tStringMessage m = new StringMessage();\n\t\t\t\tm.val = (new Integer(mynum)).toString();\n\t\t\t\tm.val = m.val.concat(\" can kick\");\n\n\t\t\t\t// send the message to robot 2\n\t\t\t\t// note: broadcast and multicast are also\n\t\t\t\t// available.\n\t\t\t\ttry{abstract_robot.unicast(2,m);}\n\t\t\t\tcatch(CommunicationException e){}\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- Look for incoming messages ---*/\n\t\t//COMMUNICATION\n\t\twhile (messagesin.hasMoreElements())\n\t\t\t{\n\t\t\tStringMessage recvd = \n\t\t\t\t(StringMessage)messagesin.nextElement();\n\t\t\tSystem.out.println(mynum + \" received:\\n\" + recvd);\n\t\t\t}\n\n\t\t// tell the parent we're OK\n\t\treturn(CSSTAT_OK);\n\t\t}",
"protected void meander(){\n if(currentDestination == null){\n getNewMeanderPoint();\n }\n if(stuckCounter > 30){\n\n getNewMeanderPoint();\n }\n //Check if we have reached the current destination\n if((this.x == currentDestination.x) && (this.y == currentDestination.y)){\n getNewMeanderPoint();\n\n isWaiting = true;\n Random random = new Random();\n waitValue = random.nextInt(maxWait - minWait) + minWait;\n\n\n }\n\n\n //System.out.printf(\"X:%d Y:%d gX:%d Gy:%d\\n\", x, y, currentDestination.x, currentDestination.y);\n double dist;\n if(!isWaiting) {\n if (this.x != currentDestination.x) {\n dist = currentDestination.x - this.x;\n //Counteracts the effect of speed being greater than the distance, cauing jitter\n if (Math.abs(dist) < speed) {\n dx = dist;\n } else {\n int direction = (int) (dist / Math.abs(dist));\n switch (direction) {\n case 1:\n moveRight();\n break;\n case -1:\n moveLeft();\n break;\n }\n }\n } else {\n dx = 0;\n }\n if (this.y != currentDestination.y) {\n dist = currentDestination.y - this.y;\n //Counteracts the effect of speed being greater than the distance, cauing jitter\n if (Math.abs(dist) < speed) {\n dy = dist;\n } else {\n int direction = (int)(dist / Math.abs(dist));\n switch (direction) {\n case 1:\n moveDown();\n break;\n case -1:\n moveUp();\n break;\n }\n }\n } else {\n dy = 0;\n }\n }\n\n }",
"long getTimeSinceLastTransit(Coordinates coord, long time) throws AstrometryException;",
"public void update(MazeEventWalked e) {\r\n }",
"private void calculateLocation()\r\n\t{\r\n\t\tdouble leftAngleSpeed \t= this.angleMeasurementLeft.getAngleSum() / ((double)this.angleMeasurementLeft.getDeltaT()/1000); //degree/seconds\r\n\t\tdouble rightAngleSpeed \t= this.angleMeasurementRight.getAngleSum() / ((double)this.angleMeasurementRight.getDeltaT()/1000); //degree/seconds\r\n\r\n\t\tdouble vLeft\t= (leftAngleSpeed * Math.PI * LEFT_WHEEL_RADIUS ) / 180 ; //velocity of left wheel in m/s\r\n\t\tdouble vRight\t= (rightAngleSpeed * Math.PI * RIGHT_WHEEL_RADIUS) / 180 ; //velocity of right wheel in m/s\t\t\r\n\t\tdouble w \t\t= (vRight - vLeft) / WHEEL_DISTANCE; //angular velocity of robot in rad/s\r\n\t\t\r\n\t\tDouble R \t= new Double(( WHEEL_DISTANCE / 2 ) * ( (vLeft + vRight) / (vRight - vLeft) ));\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\tdouble ICCx = 0;\r\n\t\tdouble ICCy = 0;\r\n\r\n\t\tdouble W_xResult \t\t= 0;\r\n\t\tdouble W_yResult \t\t= 0;\r\n\t\tdouble W_angleResult \t= 0;\r\n\t\t\r\n\t\tdouble E_xResult \t\t= 0;\r\n\t\tdouble E_yResult \t\t= 0;\r\n\t\tdouble E_angleResult \t= 0;\r\n\t\t\r\n\t\t//short axe = 0;\r\n\t\t\r\n\t\tdouble deltaT = ((double)this.angleMeasurementLeft.getDeltaT())/1000;\r\n\t\t\r\n\t\t// Odometry calculations\r\n\t\tif (R.isNaN()) \t\t\t\t//robot don't move\r\n\t\t{\r\n\t\t\tW_xResult\t\t= this.pose.getX();\r\n\t\t\tW_yResult\t\t= this.pose.getY();\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse if (R.isInfinite()) \t//robot moves straight forward/backward, vLeft==vRight\r\n\t\t{ \r\n\t\t\tW_xResult\t\t= this.pose.getX() + vLeft * Math.cos(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_yResult\t\t= this.pose.getY() + vLeft * Math.sin(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse \r\n\t\t{\t\t\t\r\n\t\t\tICCx = this.pose.getX() - R.doubleValue() * Math.sin(this.pose.getHeading());\r\n\t\t\tICCy = this.pose.getY() + R.doubleValue() * Math.cos(this.pose.getHeading());\r\n\t\t\r\n\t\t\tW_xResult \t\t= Math.cos(w * deltaT) * (this.pose.getX()-ICCx) - Math.sin(w * deltaT) * (this.pose.getY() - ICCy) + ICCx;\r\n\t\t\tW_yResult \t\t= Math.sin(w * deltaT) * (this.pose.getX()-ICCx) + Math.cos(w * deltaT) * (this.pose.getY() - ICCy) + ICCy;\r\n\t\t\tW_angleResult \t= this.pose.getHeading() + w * deltaT;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)W_xResult, (float)W_yResult);\r\n\t\tthis.pose.setHeading((float)W_angleResult);\r\n\t\t\r\n\t\t// Conversion to grads\r\n\t\tW_angleResult = W_angleResult/Math.PI*180;\r\n\t\t\r\n\t\t// Get the heading axe\r\n\t\t//axe = getHeadingAxe();\r\n\t\tgetHeadingAxe();\r\n\t\t\r\n\t\t// Verify the coordinates and the heading angle\r\n\t\tif (Po_Corn == 1)\r\n\t\t{\r\n\t\t\tswitch (Po_CORNER_ID)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\tPo_ExpAng = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\tE_yResult = 0.11;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tE_xResult = 1.6;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.45;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tE_angleResult = W_angleResult;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint block = 0;\r\n\t\t\t// white = 0, black = 2, grey = 1\r\n\t\t\tif ((lineSensorLeft == 0) && (lineSensorRight == 0) && (block == 0)) \t// Robot moves on the black line\r\n\t\t\t{\r\n\t\t\t\tswitch (Po_CORNER_ID)\t\t\t\t\t\t\t\t// Even numbers - x, Odd numbers - y\r\n\t\t\t\t{\r\n\t\t\t\tcase 0: \r\n\t\t\t\t\tif (this.pose.getX() < 1.6)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0;\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\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 1: \r\n\t\t\t\t\tif (this.pose.getY() < 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.8;\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\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tif (this.pose.getX() > 1.65)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\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\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tif (this.pose.getY() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.5; \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\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 4: \r\n\t\t\t\t\tif (this.pose.getX() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.3;\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\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tif (this.pose.getY() < 0.5)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0.3;\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\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 6: \r\n\t\t\t\t\tif (this.pose.getX() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\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\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tif (this.pose.getY() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0;\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\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault: \r\n\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 2)) || ((lineSensorLeft == 2) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_W)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_W;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_W))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_W;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 1)) || ((lineSensorLeft == 1) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_G)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_G;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_G))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_G;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tLCD.drawString(\"AngRs: \" + (E_angleResult), 0, 7);\r\n\t\t\r\n\t\t// Conversion to rads\r\n\t\tW_angleResult = W_angleResult*Math.PI/180;\r\n\t\tE_angleResult = E_angleResult*Math.PI/180;\r\n\t\t\r\n\t\tif ((Po_CORNER_ID == 3) && (100*this.pose.getY() < 45))\r\n\t\t{\r\n\t\t\tE_angleResult = 3*Math.PI/180;;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)E_xResult, (float)E_yResult);\r\n\t\tthis.pose.setHeading((float)E_angleResult);\r\n\t\t\r\n\t\t/*\r\n\t\t// Integration deviation correction\r\n\t\tthis.pose.setLocation((float)(W_xResult), (float)(W_yResult + (0.01*22.4)/175));\r\n\t\tthis.pose.setHeading((float)((W_angleResult + 14/175)*Math.PI/180));\r\n\t\t*/\r\n\t}",
"private void reactMain_region_digitalwatch_Time_counting_Counting() {\n\t\tif (timeEvents[0]) {\n\t\t\tnextStateIndex = 0;\n\t\t\tstateVector[0] = State.$NullState$;\n\n\t\t\ttimer.unsetTimer(this, 0);\n\n\t\t\ttimer.setTimer(this, 0, 1 * 1000, false);\n\n\t\t\tsCILogicUnit.operationCallback.increaseTimeByOne();\n\n\t\t\tnextStateIndex = 0;\n\t\t\tstateVector[0] = State.main_region_digitalwatch_Time_counting_Counting;\n\t\t}\n\t}",
"public double travelTime(POI fromV, POI toV, double time) {\n\tArc arc = getArc(fromV, toV);\n\treturn timeToTravelArc(arc, time);\n}",
"private void countTime()\n {\n time--;\n showTime();\n if (time == 0)\n {\n showEndMessage();\n Greenfoot.stop();\n }\n }",
"public int getTotalTravelTime() {\n return totalTravelTime;\n }",
"public void update(MazeEventEnemyWalked e) {\r\n }",
"@Override\n public void timePassed() {\n moveOneStep();\n }",
"private void totalWaitingTime(){\n int totalWaitingTime =0;\r\n for (Ride ride : rides) {\r\n totalWaitingTime += ride.getWaitingTime();\r\n }\r\n System.out.println(\"\\nTotal waiting time of the entire park is \" + totalWaitingTime / 60 + \" hours\");\r\n }",
"public static double walkingStepsToSecond(int steps) {\n //Walking or pushing a wheelchair at a moderate pace: 1 mile in 20 minutes = 2,000 steps\n double oneStepTime = 0.6;//one step taking in 1.6 second\n double timeOfSteps;\n timeOfSteps = oneStepTime * steps;\n return timeOfSteps;\n }",
"private void pointWalkBehavior() {\n\t\tif (moving) {\n\t\t\tif (remainingSteps > 0) {\n\t\t\t\tupdatePixels(action);\n\t\t\t\tremainingSteps -= speed;\n\t\t\t} else {\n\t\t\t\tupdateCoordinate(action, false);\n\t\t\t\tif (coordX != endPoint.x || coordY != endPoint.y) {\n\t\t\t\t\tif (validMoveEh(action)) {\n\t\t\t\t\t\tremainingSteps = STEP_SIZE;\n\t\t\t\t\t\tupdateCoordinate(action, true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmoving = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tcurrentImage = stopAnimation(action);\n\t\t\t\t\tpointWalking = false;\n\t\t\t\t\tmoving = false;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (validMoveEh(action)) {\n\t\t\t\tmoving = true;\n\t\t\t\tremainingSteps = STEP_SIZE;\n\t\t\t\tupdateCoordinate(action, true);\n\t\t\t\tcurrentImage = startAnimation(action);\n\t\t\t}\n\t\t}\n\t}",
"long getTimeUntilNextTransit(Coordinates coord, long time) throws AstrometryException;",
"@Override\n public void specialUpdate(double time) {\n if(relativeAngle > maxAngle) {\n angleDirection = -1;\n }\n if(relativeAngle < minAngle) {\n angleDirection = 1;\n }\n relativeAngle += angleDirection * BODY_MEMBER_MOVING_SPEED * time * (person.getCurrentSpeed() / 2.0);\n }",
"public boolean hasReachedGoal(List<Integer> collectTime);",
"public abstract void timeStep(char currCommand, World world);",
"public static void main(String [] args){\n // input data\n int secsTrip1=480; //this displays the total seconds it took on the first trip\n int secsTrip2=3220; //this displays the total seconds it took on the second trip\n int countsTrip1=1561; //displays the rotation of trip1\n int countsTrip2=9037; //displays the rotation of trip2\n \n //These are constant variables (also for storing purposes)\n double wheelDiameter=27.0, //the wheel diameter has to be accounted for in the countsTrips\n PI=3.14159, //\n feetPerMile=5280, //recongize how many feet are in 1 mile\n inchesPerFoot=12, //recongize how many inches in 1 foot\n secondsPerMinute=60; //recognize how many sec in 1 min\n double distanceTrip1, distanceTrip2,totalDistance; \n // above recognize that the values of each will have multiple digits\n \n System.out.println(\"Trip 1 took \"+\n (secsTrip1/secondsPerMinute)+\" minutes and had \"+\n countsTrip1+\" counts.\");\n System.out.println(\"Trip 2 took \"+\n (secsTrip2/secondsPerMinute)+\" minutes and had \"+\n countsTrip2+\" counts.\");\n \n //Running the calculations and storing the values\n // I will be calculating the distance of trip 1 & 2 and the total distance\n distanceTrip1=countsTrip1*wheelDiameter*PI;\n // Above gives distance in inches\n //(for each count, a rotation of the wheel travels\n //the diameter in inches times PI)\n distanceTrip1/=inchesPerFoot*feetPerMile; // Converts to distance in miles\n distanceTrip2=countsTrip2*wheelDiameter*PI/inchesPerFoot/feetPerMile;\n totalDistance=distanceTrip1+distanceTrip2;\n System.out.println(\"Trip 1 was \"+distanceTrip1+\" miles\");\n System.out.println(\"Trip 2 was \"+distanceTrip2+\" miles\");\n System.out.println(\"The total distance was \"+totalDistance+\" miles\");\n \n \n }",
"public static void main (String [] args) {\n //Start of main method\n Scanner myScanner;\n //Declaring my scanner\n myScanner = new Scanner (System.in);\n //Constructing the scanner\n \n \n System.out.print(\"Enter the number of seconds: \");\n //Prints the space for the value of the time of the \n //trip in seconds\n double nSeconds = myScanner.nextDouble();\n \n System.out.print(\"Enter the number of counts: \");\n //Prints the space for the value of the number of \n //counts of the trip\n int nCounts = myScanner.nextInt();\n \n \n \n double secs=480;\n //Value of the time in secs\n double counts=1561;\n //Value of the counts \n double wheelDiameter=27.0,\n //Diameter of the wheel\n PI=3.14159,\n //Declares the variable π which is needed\n //to calculate the distance traveled\n feetPerMile=5280,\n //The conversion units to change the \n //rotation measurements from feet to miles\n inchesPerFoot=12,\n //The conversion units to change the \n //rotation measurements from inches to feet\n secondsPerMinute=60;\n //The conversion units to change the time\n //from seconds to minutes\n double distanceTrip=counts*wheelDiameter*PI;\n //Declares the variable that represents the distance\n double minutes=(secs/secondsPerMinute);\n //Declares the variable that represents the time in mins\n double hours=minutes/60;\n //Declares the variable that represents the time in hours\n \n \n distanceTrip/=inchesPerFoot*feetPerMile;\n //Converts the value of the distance from inches to feet and then\n //from feet to miles\n \n \n \n System.out.println(\"The distance was \" +\n ((double)((int)(distanceTrip*100))/100) +\n \" miles and took \" +minutes+ \" minutes\");\n //Prints out the distance in miles and the time in minutes\n //with the two decimal places\n System.out.println(\"The average mph was \"\n + ((double)((int)(distanceTrip/hours*100))/100));\n //Prints out the average miles per hour with only \n //two decimal places\n \n }",
"public void timer()\n {\n if(exists == true)\n { \n if(counter < 500) \n { \n counter++; \n } \n else \n { \n Greenfoot.setWorld(new Test()); \n exists = false; \n } \n } \n }",
"void getMotionInfo(){\n double degreeDistance = Math.sqrt(Math.pow((startLat - endLat),2) + Math.pow((startLong - endLong),2));\n double R = 6378.137; // Radius of earth in KM\n double dLat = startLat * Math.PI / 180 - endLat* Math.PI / 180;\n dLat = Math.abs(dLat);\n double dLon = startLong * Math.PI / 180 - endLong* Math.PI / 180;\n dLon = Math.abs(dLon);\n double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(endLat * Math.PI / 180) * Math.cos(startLat* Math.PI / 180) *\n Math.sin(dLon / 2) * Math.sin(dLon / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double distance;\n distance = R * c;\n distance = distance * 1000f;\n pathDistance = distance;\n degToMRatio = degreeDistance/distance;\n double angle = Math.atan(dLat/dLon);\n xCompMotion = Math.cos(angle);\n yCompMotion = Math.sin(angle);\n totalNumSteps = pathDistance/STEP_LENGTH;\n //Rounds number of steps to nearest whole number\n totalNumSteps = Math.round(totalNumSteps);\n }",
"public void move() {\n\t\tif (type.equals(\"Fast\")) {\n\t\t\tspeed = 2;\n\t\t}else if (type.equals(\"Slow\")){\n\t\t\tspeed = 4;\n\t\t}\n\t\t\n\t\tif (rand.nextInt(speed) == 1){\n\t\t\tif (currentLocation.x - ChristopherColumbusLocation.x < 0) {\n\t\t\t\tif (currentLocation.x + 1 < oceanMap.getDimensions()) {\n\t\t\t\t\tcurrentLocation.x++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (currentLocation.x != 0) {\t\t\t\t\n\t\t\t\t\tcurrentLocation.x--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (currentLocation.y - ChristopherColumbusLocation.y < 0) {\n\t\t\t\tif (currentLocation.y + 1 < oceanMap.getDimensions()) {\n\t\t\t\t\tcurrentLocation.y++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (currentLocation.y != 0) {\n\t\t\t\t\tcurrentLocation.y--;\n\t\t\t\t}\n\t\t\t} \n\t\t}\n\t}",
"private int totalTime()\n\t{\n\t\t//i'm using this varaible enough that I should write a separate method for it\n\t\tint totalTime = 0;\n\t\tfor(int i = 0; i < saveData.size(); i++)//for each index of saveData\n\t\t{\n\t\t\t//get the start time\n\t\t\tString startTime = saveData.get(i).get(\"startTime\");\n\t\t\t//get the end time\n\t\t\tString endTime = saveData.get(i).get(\"endTime\");\n\t\t\t//****CONTINUE\n\t\t\t//total time in minutes\n\t\t}\n\t}",
"public void walk(int distance, int speed) {\n\t\t\r\n\t\t_weight = _weight - distance * speed / 1000000;\r\n\t\tSystem.out.println(_fullname + \" is done walking, his weight is: \" + _weight);\r\n\r\n\t\t\r\n\t}",
"@Override\n public void onClick(View v) {\n drive.endTime = System.currentTimeMillis();\n //these are static....\n drive.totalTime = drive.endTime - drive.startTime;\n //set instance final lat long to static current lat long\n drive.finLong = Drive.curLong;\n drive.finLat = Drive.curLat;\n System.out.println(\"You have ended your drive at\" + drive.finLat + \" | \" + drive.finLong);\n Toast.makeText(getApplicationContext(),\"Ending drive\",Toast.LENGTH_SHORT).show();\n startActivity(new Intent(CurrentDrive.this, DriveEnded.class));\n\n\n }",
"public void timePassed() {\r\n }",
"public void timePassed() {\r\n }",
"private int timeToNextAttack() {\n return ATTACK_SPEED - mAttacker.getSpeed();\n }",
"public static long getTotalHitTime() {\r\n return _time;\r\n }",
"public int getWalkSpeed()\n{\n return walkSpeed;\n}",
"public int getNumMoving() {\n int numMoving = 0;\n for (BaseSingle single : aliveTroopsMap.keySet()) {\n if (single.getState() == SingleState.MOVING ||\n single.getState() == SingleState.CATCHING_UP ||\n single.getState() == SingleState.ROUTING) {\n numMoving += 1;\n }\n }\n return numMoving;\n }",
"int getLocationsCount();",
"private void updateUserInputPentagon(GameContainer gc, float elapsedTime) {\n if ( gc.getInput().isKeyHeld(KeyEvent.VK_LEFT) ) {\n polygons.get(0).setAngle(polygons.get(0).getAngle() - 2.0f * elapsedTime);\n }\n if ( gc.getInput().isKeyHeld(KeyEvent.VK_RIGHT) ) {\n polygons.get(0).setAngle(polygons.get(0).getAngle() + 2.0f * elapsedTime);\n }\n if ( gc.getInput().isKeyHeld(KeyEvent.VK_UP) ) {\n polygons.get(0).getPosition().addToX((float)Math.cos(polygons.get(0).getAngle()) * 60.0f * elapsedTime);\n polygons.get(0).getPosition().addToY((float)Math.sin(polygons.get(0).getAngle()) * 60.0f * elapsedTime);\n }\n if ( gc.getInput().isKeyHeld(KeyEvent.VK_DOWN) ) {\n polygons.get(0).getPosition().addToX(-(float)Math.cos(polygons.get(0).getAngle()) * 60.0f * elapsedTime);\n polygons.get(0).getPosition().addToY(-(float)Math.sin(polygons.get(0).getAngle()) * 60.0f * elapsedTime);\n }\n }",
"public void update(float deltaTime) {\n if (creationPoint.y != (int)(GameView.instance.groundLevel - height*3/4) || creationPoint.x != x+width/2){\n creationPoint.x = x+width/2-width/4;\n creationPoint.y = (int)(GameView.instance.groundLevel - height/2)+height/8;\n }\n\n\n if(isStanding) {\n\n /*System.out.println(creationPoint.x);\n System.out.println(GameView.instance.player.position.x);\n System.out.println(GameView.instance.player.position.x-creationPoint.x);\n System.out.println(GameView.instance.cameraSize*attackRange);*/\n\n tax();\n\n\n //=======================================================================================//\n\n //Buildings\n\n //=======================================================================================//\n\n\n grow();\n\n\n // = ======== == ==\n // = = == == ==\n // ===== == ====\n // = = == == ===\n\n if (inRange() && !surrender) {\n countdown+=GameView.instance.fixedDeltaTime;\n //System.out.println(countdown);\n float shootSpeed=4-lv;\n if (countdown > 1000*shootSpeed) {\n\n if (countdown > 1200*shootSpeed && attack == 0) {\n Attack();\n\n attack += 1;\n }\n\n if (countdown > 1400*shootSpeed && attack == 1) {\n Attack();\n\n attack += 1;\n }\n\n if (countdown > 1600*shootSpeed && attack == 2) {\n Attack();\n\n attack += 1;\n }\n\n if (countdown >= 1800*shootSpeed) {\n countdown = 0;\n attack = 0;\n }\n }\n }\n if ((Scene.instance.timeOfDay) / (Scene.instance.dayLength) > 0.6) {\n spawnedNPC = false;\n }\n if(!spawnedNPC) {\n //spawning thief\n if ((townFear > 20 && lv != 0 && (currentGold < maxGold / 2)) || (goldRate < 200 && lv != 0) && Scene.instance.day > 2) {\n GameView.instance.npc_pool.spawnThiefs(x, (int) GameView.instance.groundLevel, 1, this);\n }\n if(!surrender) {\n //spawning dragonslayer\n if (townFear > 30 && lv != 0) {\n GameView.instance.npc_pool.spawnDragonLayers(x, (int) GameView.instance.groundLevel, this);\n }\n\n //spawning wizard\n if (townFear > 35 && lv == 2 && !summonedWizard) {\n GameView.instance.npc_pool.spawnFarmers(x, (int) GameView.instance.groundLevel, this);\n summonedWizard = true;\n }\n }\n spawnedNPC = true;\n }\n\n if(!surrender) {\n if (townFear > surrenderFear) {\n surrender = true;\n flag.setSurrender(surrender);\n SoundEffects.instance.play(SoundEffects.TRIBUTE);\n }\n }\n else {\n if(townFear < surrenderFear/2) {\n surrender = false;\n flag.setSurrender(surrender);\n\n }\n }\n\n\n\n Flagposition(deltaTime);\n }\n else {\n buildingImage = SpriteManager.instance.getBuildingSprite(\"FortressRuin\");\n\n if(beenEmptied == false){\n GoldPool.instance.spawnGold(collider.centerX(), collider.centerY(),Math.min(currentGold,100*(lv+1)) );\n beenEmptied = true;\n }\n townFear = 0;\n }\n\n //==== ===== ===== = == ==== ============================\n //= = == = = = = == = = ============================\n //==== == ===== ===== == ==== ============================\n //= == ===== = = = == = == ============================\n repair(deltaTime);\n\n for(int i = 0; i < currentBuildingsLeft.size(); i++){\n currentBuildingsLeft.get(i).update(deltaTime);\n }\n\n for(int i = 0; i < currentBuildingsRight.size(); i++){\n currentBuildingsRight.get(i).update(deltaTime);\n }\n super.update(deltaTime);\n\n }",
"public void move(long deltaTime) {\n\n Point currentTile = getOccupyingTile(position);\n\n /*\n if (!Simulator.getInstance().getTileMap().isInsideMap(currentTile))\n return;\n\n if (Simulator.getInstance().getTileMap().isAWall(currentTile) || Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(currentTile))\n return;\n*/\n\n if (Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(currentTile))\n return;\n\n setTargetVector(Simulator.getInstance().getDestination().getDistanceMap().getTiles()[currentTile.y][currentTile.x].getVector());\n\n\n if (!Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(currentTile) && Simulator.getInstance().getDestination().getDistanceMap().getTiles()[currentTile.y][currentTile.x].getVector().equals(new Point2D.Double(0.0, 0.0))) {\n setTargetVector(Simulator.getInstance().getDestination().getDistanceMap().getTiles()[currentTile.y][currentTile.x].getVector());\n double angle = 0;\n while ((angle >= 60 && angle <= 120) || (angle >= 150 && angle <= 210) || (angle >= 240 && angle <= 300) || (angle >= 330) || (angle <= 30)) {\n\n angle = Math.random() * 360;\n }\n setVector(new Point2D.Double(Math.cos(Math.toRadians(angle)) / 1.5, Math.sin(Math.toRadians(angle)) / 1.5));\n } else {\n setTargetVector(Simulator.getInstance().getDestination().getDistanceMap().getTiles()[currentTile.y][currentTile.x].getVector());\n }\n\n\n Point2D vectorDiff = new Point2D.Double(vector.getX() - targetVector.getX(), vector.getY() - targetVector.getY());\n\n if (vectorDiff.getX() < 0)\n vector.setLocation(vector.getX() + 0.001 * velocity * deltaTime, vector.getY());\n else if (vectorDiff.getX() > 0)\n vector.setLocation(vector.getX() - 0.001 * velocity * deltaTime, vector.getY());\n\n if (vectorDiff.getY() < 0)\n vector.setLocation(vector.getX(), vector.getY() + 0.001 * velocity * deltaTime);\n else if (vectorDiff.getY() > 0)\n vector.setLocation(vector.getX(), vector.getY() - 0.001 * velocity * deltaTime);\n\n\n Point2D newPosition = new Point2D.Double(\n position.getX() + (velocity * deltaTime) * vector.getX(), position.getY() + (velocity * deltaTime) * vector.getY());\n\n\n Point targetTile = getOccupyingTile(newPosition);\n\n\n Point direction = getDirection(currentTile, targetTile);\n\n\n if (!Simulator.getInstance().getTileMap().isInsideMap(targetTile) || Simulator.getInstance().getTileMap().isAWall(targetTile)\n || Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(targetTile)) {// || Simulator.getInstance().getDestination().getDistanceMap().getTiles()[targetTile.y][targetTile.x].getVector() == new Point2D.Double(0, 0)) {\n\n if (Simulator.getInstance().isUsingBounceCollision()) {\n if (direction.x > 0 || direction.x < 0)\n vector.setLocation(vector.getX() * -0.5, vector.getY());\n if (direction.y > 0 || direction.y < 0)\n vector.setLocation(vector.getX(), vector.getY() * -0.5);\n\n newPosition = new Point2D.Double(\n position.getX() + (velocity * deltaTime) * vector.getX(), position.getY() + (velocity * deltaTime) * vector.getY());\n\n\n targetTile = getOccupyingTile(newPosition);\n\n //Secondary check to make sure the bounce doesn't make it go out of bounds\n if (!Simulator.getInstance().getTileMap().isInsideMap(targetTile) || Simulator.getInstance().getTileMap().isAWall(targetTile)\n || Simulator.getInstance().getDestination().getDistanceMap().isNotInitialized(targetTile)) { //|| Simulator.getInstance().getDestination().getDistanceMap().getTiles()[targetTile.y][targetTile.x].getVector() == new Point2D.Double(0, 0)) {\n vector.setLocation(0, 0);\n } else {\n setPosition(newPosition);\n }\n\n\n } else {\n vector.setLocation(0, 0);\n }\n\n } else {\n setPosition(newPosition);\n }\n\n }",
"public static void main(String[] args) {\n \n// getting input data\n int secsTrip1=480; // the time elapsed in seconds for the first trip\n int secsTrip2=3220; //the time elapsed in seconds for the second trip\n int countsTrip1=1561; // the number of rotations of the front wheel during 1st trip\n int countsTrip2=9037; //the number of rotations of the front wheel during 2nd trip\n double wheelDiameter=27.0, //diameter of the wheel\n PI=3.14159, //pi \n feetPerMile=5280, // conversion from feet to mile\n inchesPerFoot=12, // conversion from inch to foot\n secondsPerMinute=60;//conversion from seconds to minute\n double distanceTrip1, distanceTrip2,totalDistance; //used in later calculations\n System.out.println(\"Trip 1 took \"+ (secsTrip1/secondsPerMinute)+\" minutes and had \"+ countsTrip1+\" counts.\"); \n //print the input information for the 1st trip\n System.out.println(\"Trip 2 took \"+ (secsTrip2/secondsPerMinute)+\" minutes and had \"+ countsTrip2+\" counts.\");\n //print the input information for the 2nd trip\n \n //run the calculations;\n \n // Above gives distance in inches\n //(for each count, a rotation of the wheel travels\n //the diameter in inches times PI)\n distanceTrip1=countsTrip1*wheelDiameter*PI/inchesPerFoot/feetPerMile; // Gives distance in miles\n distanceTrip2=countsTrip2*wheelDiameter*PI/inchesPerFoot/feetPerMile; //same calculation for trip 2\n totalDistance=distanceTrip1+distanceTrip2; // sum of the two trips\n //Print out the output data.\n System.out.println(\"Trip 1 was \"+ distanceTrip1 +\" miles\");\n System.out.println(\"Trip 2 was \"+ distanceTrip2 +\" miles\");\n System.out.println(\"The total distance was \"+ totalDistance +\" miles\");\n \n }",
"private void changeCharacterLocations() {\n if (locationAnimationDirectionSwitch) {\n locationAnimationTicker++;\n } else {\n locationAnimationTicker--;\n }\n\n // While the user's FaceCharacter bobs up, their opponent should bob down.\n heroLocation[1] += locationAnimationTicker;\n antagonistLocation[1] -= locationAnimationTicker;\n\n if (locationAnimationTicker == 5 || locationAnimationTicker == -5) {\n locationAnimationDirectionSwitch = !locationAnimationDirectionSwitch;\n }\n }",
"public void increaseEntered() {\n numTimesEntered++;\n }",
"public void timePassed() { }",
"public void update(MazeEventWalkedKilled e) {\r\n }",
"static public double convertTachoCountToDistance(double TachoCount) {\n\t\treturn TachoCount = (TachoCount * 0.5 * wheeldiameter * Math.PI / 180);\n\t}",
"public void walk(int direction);",
"@Override\n public void move() {\n _location.x++;\n }",
"private void calculateMovement() {\r\n \tmovementY = (int)(movementSpeed * Math.sin(Math.toRadians(movementDirection - 90)));\r\n \tmovementX = (int)(movementSpeed * Math.cos(Math.toRadians(movementDirection - 90)));\r\n }",
"private void travelTo(Location destination) \n\t{\n\t\tSystem.out.println(destination.name());\n\t\tif (destination == Location.Home) {\n\t\t\t\n\t\t\tif (role == Role.Attacker) {\n\t\t\t\t\n\t\t\t\tswitch(startingCorner) { \n\t\t\t\t\t/*case 1: travelTo(Location.X4); travelTo(Location.AttackBase); break;\n\t\t\t\t\tcase 2: travelTo(Location.X3); travelTo(Location.AttackBase); break;\n\t\t\t\t\tcase 3: case 4: travelTo(Location.AttackBase);*/\n\t\t\t\tcase 1: travelTo(Location.AttackBase); break;\n\t\t\t\tcase 2: travelTo(Location.AttackBase); break;\n\t\t\t\tcase 3: //travelTo(Location.X2);\n\t\t\t\t\t\ttravelTo(Location.AttackBase); break;\n\t\t\t\tcase 4: //travelTo(Location.X1);\n\t\t\t\t\t\ttravelTo(Location.AttackBase); break;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if (role == Role.Defender) {\n\t\t\t\t\n\t\t\t\tswitch(startingCorner) {\n\t\t\t\t\tcase 1: //travelTo(Location.X4);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t\tcase 2: //travelTo(Location.X3);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t\tcase 3: travelTo(Location.DefWay3);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t\tcase 4: travelTo(Location.DefWay4);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\telse if (destination == Location.BallPlatform)\n\t\t\tnavigator.travelTo(ballPlatform[0], ballPlatform[1]);\n\t\t\t\n\t\telse if (destination == Location.ShootingRegion)\n\t\t\tnavigator.travelTo(CENTER, 7 * 30.0); // we have to account for the case when there is an obstacle in the destination\n\t\t\t// also need to find a way of determining the y coordinate\n\n\t\telse if (destination == Location.AttackBase)\n\t\t\tnavigator.travelTo(ATTACK_BASE[0], ATTACK_BASE[1]); \n\t\t\n\t\telse if (destination == Location.DefenseBase)\n\t\t\tnavigator.travelTo(DEFENSE_BASE[0], DEFENSE_BASE[1]);\n\t\t\n\t\telse if (destination == Location.X1) \n\t\t\tnavigator.travelTo(X[0][0] * 30.0, X[0][1] * 30.0);\n\n\t\telse if (destination == Location.X2)\n\t\t\tnavigator.travelTo(X[1][0] * 30.0, X[1][1] * 30.0);\n\t\t\n\t\telse if (destination == Location.X3) \n\t\t\tnavigator.travelTo(X[2][0] * 30.0, X[2][1] * 30.0);\n\n\t\telse if (destination == Location.X4)\n\t\t\tnavigator.travelTo(X[3][0] * 30.0, X[3][1] * 30.0);\n\t\t\n\t\telse if (destination == Location.DefWay3)\n\t\t\tnavigator.travelTo(240, 240);\n\t\t\n\t\telse if (destination == Location.DefWay4)\n\t\t\tnavigator.travelTo(60, 240);\n\n\t\t\n\t\t// return from method only after navigation is complete\n\t\twhile (navigator.isNavigating())\n\t\t{\n\t\t\tSystem.out.println(\"destX: \" + navigator.destDistance[0] + \"destY: \" + navigator.destDistance[1]);\n\t\t\ttry {\n\t\t\t\tThread.sleep(100);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"long getVisitEndtime();",
"long getVisitEndtime();",
"public void update(MazeEventEnemyWalkedKilled e) {\r\n }",
"void move() throws IOException, InterruptedException{\r\n \r\n // if current position and velocity are greater than 0 and less than the right edge of the screen\r\n if (x + xa > 0 && x + xa < 1280-w){\r\n // increase the character position by velocity\r\n x = x + xa;\r\n }\r\n \r\n // if current height and velocity are greater than zero and less than the floor of the game\r\n if (y + ya > 0 && y + ya < 500){\r\n // if jumping up\r\n if (y > 300){\r\n y = y + ya;\r\n } else{ // if falling down, increase velocity to 3\r\n ya = 3;\r\n y = y + ya;\r\n }\r\n }\r\n \r\n // if a collision is detected increase life counter\r\n if (game.collision()){\r\n // increase life counter\r\n count++;\r\n // call game over to load next image or to close game\r\n game.gameOver(count);\r\n } \r\n }",
"public void timePassed() {\r\n\r\n }",
"public static int count(int x, int y, int n)\n\t{\n\t\tif(x == 0)\n\t\t{\n\t\t\tif(y ==0) return 0;\n\t\t\treturn n;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint g =gcd(x,y);\n\t\t\tint pdx = y/g;\n\t\t\tint pdy = x/g;\n\t\t\tint xlat =(n-x)/pdx;\n\t\t\tint ylat =y/pdy;\n\t\t\treturn min(xlat, ylat);\n\t\t}\n\t}",
"@Override\n public void calculateTimeAndDist(String result) {\n //Create a calendar instance.\n Calendar date = Calendar.getInstance();\n long t = date.getTimeInMillis();\n\n String pattern = \"HH:mm\";\n\n // Create an instance of SimpleDateFormat used for formatting\n // the string representation of date according to the chosen pattern\n DateFormat df = new SimpleDateFormat(pattern);\n\n //Split the result returned by the Geotask.\n String res[] = result.split(\",\");\n// Double min = Double.parseDouble(res[0]) / 60;\n\n //Get the distance.\n Double dist = Double.parseDouble(res[1]) / 1000;\n\n\n //Get time to dest based on user's speed.\n Double d = Double.valueOf(dist);\n Double s = Double.valueOf(getAverageSpeed());\n int timeToDest = (int) ((d / s) * 60);\n\n //Add timeToDest to current time\n Date afterAddingTimeToDest = new Date(t + (timeToDest * ONE_MINUTE_IN_MILLIS));\n String todayAsString = df.format(afterAddingTimeToDest.getTime());\n\n //Set arrival txt to estimate arrival time.\n arrivalTxt.setText(todayAsString);\n\n }",
"public static void main(String[] args) {\n//The integers used in this program\n int secsTrip1 = 480; //initializes secsTrip1 480, which states the number of seconds of trip 1\n int secsTrip2 = 3220; //initializes secsTrip2 3220, which states the number of seconds of trip 2\n int countsTrip1 = 1561; //initializes countTrip1 1561, which states the number of counts of trip 1\n int countsTrip2 = 9037; //initializes countTrip2 9037, which states the number of count of trip 2\n \n //The operations used in this program \n double wheelDiameter = 27.0; //Initializes wheelDiameter as 27.0 \n double PI = 3.14159; // States Pi as a constant\n int feetPerMile = 5280; //States the conversion factor of feetPerMile\n int inchesPerFoot = 12; //States the conversion factor of inchesPerFoot\n int secondsPerMinute = 60; //States the conversion factor of secondsPerMinute\n double distanceTrip1, distanceTrip2, totalDistance; //Declares distanceTrip1, distanceTrip2, totalDistance as double\n \n //Outputs of the program\n //Prints out the time it took for trip 1 and the counts it had \n System.out.println(\"Trip 1 took \" + (secsTrip1/secondsPerMinute) + \" minutes and had \" + countsTrip1 + \" counts.\"); \n //Prints out the time it took for trip 1 and the counts it had\n System.out.println(\"Trip 2 took \" + (secsTrip2/secondsPerMinute) + \" minutes and had \" + countsTrip2 + \" counts.\");\n \n distanceTrip1 = countsTrip1 * wheelDiameter * PI; // Gives distance in inches\n distanceTrip1 /= inchesPerFoot * feetPerMile; // Gives distance in miles\n distanceTrip2 = countsTrip2 * wheelDiameter * PI / inchesPerFoot / feetPerMile;\n totalDistance = distanceTrip1 + distanceTrip2;\n\n //Print out the output data.\n System.out.println(\"Trip 1 was \"+distanceTrip1+\" miles\");\n System.out.println(\"Trip 2 was \"+distanceTrip2+\" miles\");\n System.out.println(\"The total distance was \"+totalDistance+\" miles\");\n\n\n\n}",
"@Override\r\n\tpublic void stepHasBeenTaken(int steps) {\n\t\tTextView currLoc = (TextView) findViewById(R.id.stepsCount);\r\n\t\tcurrLoc.setText(\"\"+steps);\r\n\t}",
"public void setWalkSpeed(int n)\n{\n walkSpeed = n;\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 static long rideDurationTime(double distance, TrafficCondition traffic) {\r\n\t\tdouble speed ;\r\n\t\tif(traffic == TrafficCondition.LOW) {\r\n\t\t\tspeed = 15;\r\n\t\t}\r\n\t\telse if(traffic == TrafficCondition.MEDIUM) {\r\n\t\t\tspeed = 7.5;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tspeed = 3;\r\n\t\t}\r\n\t\treturn (long)(distance/speed*3600*1000);\r\n\t}",
"public abstract void notifyScanResult(int distancesToWallsInEachDirection);",
"public void travelTo(double x, double y){\r\n\r\n\t\t\tdouble xDistance = x - odometer.getX();//the distance the robot has to travel in x to get to its destination from current position.\r\n\t\t\tdouble yDistance = y - odometer.getY();//the distance the robot has to travel in y to get to its destination from current position.\r\n\t\t\tdouble distance = Math.sqrt(xDistance*xDistance + yDistance*yDistance);//the overall distance the robot has to travel from current position.\r\n\t\t\t\r\n\t\t\tnewAngle = Math.atan(xDistance/yDistance); // if the yDistance is negative and xDistance superior to 0, it will provide the right angle for the nxt by adding pi to it's turn angle, \r\n\t\t\t\r\n\t\t\tcurrentAngle = odometer.getAng(); // gets current angle of nxt\r\n\t\t\ttheta = Math.toDegrees(newAngle) - currentAngle; \r\n\t\t\t\r\n\t\t\t// if true, turn to theta and run the trajectory without obstacleAvoidance\r\n\t\t\tLCD.drawString(\"theta: \"+ theta, 0, 1);\r\n\t\t\tturnTo(theta);\r\n\t\t\t\t\r\n\t\t\tleftMotor.setSpeed(FORWARD_SPEED);\r\n\t\t\trightMotor.setSpeed(FORWARD_SPEED);\r\n\r\n\t\t\tleftMotor.rotate(convertDistance(wheelRadius, distance), true);\r\n\t\t\trightMotor.rotate(convertDistance(wheelRadius, distance), false);\r\n\t\t}",
"public void timePassed() {\n }",
"public void timePassed() {\n }",
"protected final void walk(int direction) {\r\n \t//deduct this from the critter's energy\r\n \tenergy = energy - Params.WALK_ENERGY_COST;\r\n \t\r\n \tif(hasMoved == false) {\r\n \t\tif((isFight == false || (isFight == true && unoccupiedPosition(direction, 1) == true)) && energy > 1) {\r\n \t\t\t//get new critter position\r\n \t\t\tint[] critterCoord = getCritterPos(direction, 1);\r\n \t\t\tx_coord = critterCoord[0];\r\n \t\t\ty_coord = critterCoord[1];\r\n \t\t\t\r\n \t\t\thasMoved = true;\r\n \t\t\tisFight = false;\r\n \t\t\r\n \t\t\tString critterPos = Integer.toString(x_coord) + \"_\" + Integer.toString(y_coord);\r\n \t\t\t\r\n \t\t\tArrayList<Critter> critterList = populationMoved.get(critterPos);\r\n \t\t\t\r\n \t\t\t//if there are critters already in this grid position\r\n \t\t\tif(!(critterList == null)) {\r\n \t\t\t\tcritterList.add(this);\r\n \t\t\t\tpopulationMoved.replace(critterPos, critterList);\r\n \t\t\t\t\r\n \t\t\t//if the critter moves into an empty space\t\r\n \t\t\t} else {\r\n \t\t\t\tArrayList<Critter> newList = new ArrayList<Critter>();\r\n \t\t\t\tnewList.add(this);\r\n \t\t\t\tpopulationMoved.put(critterPos, newList);\r\n \t\t\t}\r\n \t\t\t\r\n \t\t}\r\n \t}\r\n }",
"private void calculateTurn () {\n // Do we need a turn? If not, we're done.\n if (dirOne.opposite() == dirTwo) return;\n /*\n * We need a turn. The coordinates of the turn point will be the x\n * coordinate of the north/south leg and the y coordinate of the\n * east/west leg.\n */\n if (dirOne == Direction.north || dirOne == Direction.south) {\n xTurn = xOne;\n yTurn = yTwo;\n } else {\n xTurn = xTwo;\n yTurn = yOne;\n }\n }",
"protected int calculateWalk() {\n if (isPrimitive()) {\n double rating = getEngine().getRating();\n rating /= 1.2;\n if (rating % 5 != 0) {\n return (int) (rating - rating % 5 + 5) / (int) weight;\n }\n return (int) (rating / (int) weight);\n\n }\n return getEngine().getRating() / (int) weight;\n }",
"@Override\n\tpublic void doTimeStep() {\n\t\tint activity = Critter.getRandomInt(3);\n\t\tif(activity == 0) {\n\t\t\twalk(Critter.getRandomInt(8));\n\t\t\tthis.moveFlag = true;\n\t\t}\n\t\telse if(activity == 1) {\t\t\t\t\n\t\t\trun(Critter.getRandomInt(8));\n\t\t\tthis.moveFlag = true;\n\t\t}\n\t\telse if(this.getEnergy() >= Params.min_reproduce_energy) {\n\t\t\tCritter4 egg = new Critter4();\n\t\t\tthis.reproduce(egg,Critter.getRandomInt(8));\n\t\t}\n\t\telse {\n\t\t}\n\t}"
]
| [
"0.5446713",
"0.5344307",
"0.53041387",
"0.5230344",
"0.5185017",
"0.51608944",
"0.51494026",
"0.5138247",
"0.5130805",
"0.5121478",
"0.5080031",
"0.5079267",
"0.5056662",
"0.50537306",
"0.5038259",
"0.5031273",
"0.5030734",
"0.5028638",
"0.5008013",
"0.49986076",
"0.49372402",
"0.49162662",
"0.48928273",
"0.4842548",
"0.48293412",
"0.48158818",
"0.48075706",
"0.4789463",
"0.4789463",
"0.47776592",
"0.47421458",
"0.47400633",
"0.4736454",
"0.47310352",
"0.47234643",
"0.47182807",
"0.471811",
"0.47155732",
"0.47096083",
"0.47022986",
"0.46995372",
"0.46934843",
"0.46881646",
"0.46877107",
"0.46750048",
"0.46653572",
"0.46547383",
"0.46458393",
"0.46440423",
"0.46433002",
"0.4623962",
"0.4611707",
"0.46100307",
"0.46015418",
"0.45988888",
"0.45898938",
"0.45898786",
"0.45870787",
"0.45865294",
"0.45768684",
"0.45738128",
"0.45738128",
"0.45720655",
"0.45697466",
"0.45674697",
"0.45644337",
"0.4563639",
"0.45616177",
"0.45589203",
"0.45529574",
"0.45500666",
"0.45481575",
"0.45467117",
"0.45456502",
"0.45379975",
"0.4536495",
"0.45356247",
"0.45354882",
"0.45221168",
"0.45204464",
"0.45201284",
"0.45201284",
"0.45187843",
"0.4514819",
"0.45136502",
"0.45100713",
"0.45068675",
"0.45029473",
"0.4493515",
"0.44919246",
"0.44878355",
"0.4485395",
"0.4484321",
"0.44628134",
"0.4460858",
"0.4460858",
"0.44568706",
"0.44470528",
"0.4439378",
"0.4438087"
]
| 0.7737739 | 0 |
the synchronized function pay is used to realize the functionality of payment and can calculate the price spent on the routine. routine: the routine to pay for b: the bike used in the routine to pay for bank_card: the bank_card used to pay for the money. | public synchronized double pay(Routine routine, Bicycle b, Bank_Card bank_card) throws Exception{
if(!routine.getDestination().isState()){System.out.println("offline - out of order!");throw new Exception("OFFLINE");}
double price = 0;
if(routine.getDestination()==null || routine.getEnd()==null || routine.getSource()==null || routine.getStart()==null){System.out.println("no routine to pay");}
if(this.card == null){
if(b instanceof Bicycle_Mech){price = routine.count_time(b);}
if(b instanceof Bicycle_Elec){price = 2*routine.count_time(b);}
}
if(this.card != null){price = this.card.price(routine, b);}
if(bank_card.getOwner().equals(this)){bank_card.check(price);bank_card.setMoney(bank_card.getMoney()-price);}
if(!bank_card.getOwner().equals(this)){System.out.println("choose a right bank card");}
return price;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void pay(Payment payment) {\n\n\t}",
"void pay(Order order);",
"public abstract double pay();",
"void payBills();",
"public void calculatePayment() {}",
"@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}",
"public IBankTransfert payment();",
"@Override\r\n public void pay() {\n }",
"private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }",
"public void autoPay() {}",
"int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);",
"CarPaymentMethod processPayPal();",
"String makePayment(String userName, String teamName, Payment payment) throws RemoteException, InterruptedException;",
"@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}",
"public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}",
"void makeMarketBuyOrder(AuthInfo authInfo, String pair, String money,HibtcApiCallback<Object> callback);",
"@Override\r\n\tpublic void pay(long dateTime, float charge) {\n\t\t\r\n\t}",
"public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }",
"public void CashPayment()\n {\n }",
"public abstract void msgPayment(Customer customer, Cash cash);",
"public double pay()\r\n{\r\ndouble pay = hoursWorked * payRate;\r\nhoursWorked = 0;\r\nreturn pay;\r\n//IMPLEMENT THIS\r\n}",
"void makeMarketSellOrder(AuthInfo authInfo, String pair, String money,HibtcApiCallback<Object> callback);",
"public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }",
"@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}",
"void makeLimitBuyOrder(AuthInfo authInfo, String pair, String price, String amount,HibtcApiCallback<Object> callback);",
"public void recordPurchase(double amount)\n {\n balance = balance - amount;\n // your code here\n \n }",
"public double pay(){\n\t\treturn payRate;\n\t}",
"public double pay(double amountPaid,String currency){\n \n saleDTO = sale.createSaleDTO();\n paymentDTO = new PaymentDTO(amountPaid,currency);\n double change = Math.round((paymentDTO.getAmountPaid() - saleDTO.getTotalPrice()) * 100.0) / 100.0;\n\n cashRegister.updateAmountInRegister(amountPaid - change);\n return change;\n\n }",
"CarPaymentMethod processHotDollars();",
"@Override\n public String pay(int amount) {\n return (amount +\" paid with credit/debit card.\");\n }",
"public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}",
"@Override\n\tpublic String payresult(String timestamp,String trade_no,String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"uid\",userid);\n\t\tsParaTemp.put(\"zoneid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",trade_no);\n\t\tsParaTemp.put(\"amount\",0+\"\"); \n sParaTemp.put(\"payitem\",Integer.parseInt(money)*10+\"\");\n\t\tsParaTemp.put(\"paydes\",\"\");\n\t\tsParaTemp.put(\"debug\",0+\"\");\n\t\t//待请求参数数组 String prestr = createRequestParam(sParaTemp,QST_PAY_KEY);\n\t\t\n\t\tsParaTemp = buildRequestPara(sParaTemp,QST_PAY_KEY);\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\tSubmitResult = h.hp(QST_PATH,sParaTemp,\"get\");\n\t\t\t\n//\t\t\t SubmitResult = Http.hp(QST_PATH+\"?\"+prestr);\nLog.logResult(UtilDate.getDateFormatter()+\":像素骑士团充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\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\treturn \"网络出错!\";\n\t\t}\t\t\n\t}",
"void makeLimitSellOrder(AuthInfo authInfo, String pair, String price, String amount,HibtcApiCallback<Object> callback);",
"@Override\n\tpublic void payCreditCard() {\n System.out.println(\"creditcard payed\");\t\t\n\t}",
"public double calculatePayment (int hours);",
"@Override\n\tpublic void process(double amt) {\n\t\tSystem.out.println(\"Amt Deposited:\" +amt);\n\t\tb1.bal = b1.bal+amt;\n\t\tb1.getBal();\n\t\tSystem.out.println(\"Transaction completed\");\n\t}",
"@Override\n\tpublic String payresult(String timestamp, String tradeNo, String money,String ext) {\n\t\tMap<String, String> sParaTemp = new LinkedHashMap<String, String>();\n\t\tsParaTemp.put(\"userid\",userid);\n\t\tsParaTemp.put(\"serverid\",serverid+\"\"); \n\t\tsParaTemp.put(\"ptime\", timestamp);\n\t\tsParaTemp.put(\"order\",tradeNo);\n\t\tsParaTemp.put(\"money\",money);\n\t\tsParaTemp = MapToParam.createKeyValueMysign(sParaTemp, \"&\"+KEY);\t//map中加入sign键值对 \n//\t\tsParaTemp.put(\"a\", \"Pay\");\n//\t\tsParaTemp.put(\"m\", \"Payment\");\n//\t\tsParaTemp.put(\"sp\", \"180\");\n//\t\tsParaTemp.put(\"ac\", \"deliver\");\n String SubmitResult;\n\t\ttry {\n\t\t\tHttp h = Http.getInstance();\n\t\t\t SubmitResult = h.hp(PAY_PATH,sParaTemp,\"get\");\nLog.logResult(UtilDate.getDateFormatter()+\";梦幻家园充值:\"+userid+\";回调记录:\"+SubmitResult+\"\\r\\n\", \"d:\\\\Logs\\\\PayLogs\");\n\t\t\t int a = SubmitResult.indexOf(\"{\");\n\t\t\t int b = SubmitResult.lastIndexOf(\"}\");\n\t\t\t SubmitResult = SubmitResult.substring(a, b+1);\n\t\t\t JSONObject jsonobject = JSONObject.fromObject(SubmitResult);\n\t\t\t String status = jsonobject.getString(\"status\");\n\t\t\t String msg = jsonobject.getString(\"msg\");\n//System.out.println(\"充值状态1为成功:\"+status);\n\t\t\t\n\t\t\t if(\"1\".equals(status)){\n\t\t\t\t return \"充值成功\";\n\t\t\t }else{\n\t\t\t\t return msg;\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\treturn \"网络出错!\";\n\t\t}\t\n\t}",
"public void smart(final Operation smart, final Account account, final Lock lock) {\r\n\r\n\t\ttry {//tenta colocar a thread em sleep com o valor padrao definido, caso nao consiga, interrompe a thread e imprime o codigo da excecao\r\n\t\t\tThread.sleep(smart.getSleep());\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\tThread.currentThread().interrupt();\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//trava, verifica se o saldo é maior que zero, remove a quantia determinada, printa as informacoes e por fim destrava a conta\r\n\t\tlock.lock();\r\n\t\tif(account.getBalance() != 0) {\r\n\t\t\tif(account.getBalance() - smart.getPull() >= 0) {\r\n\t\t\t\taccount.setBalance(account.getBalance() - smart.getPull());\r\n\t\t\t\tsmart.setNumberOfPulls(smart.getNumberOfPulls() + 1);\r\n\t\t\t\tsmart.setBalance(smart.getBalance() + smart.getPull());\r\n\t\t\t\tSystem.out.println(\"Thread: \" + Thread.currentThread().getName() + \" - Account Balance: \" + account.getBalance());\r\n\t\t\t\tSystem.out.println(\"Threads new Balance: \" + smart.getBalance() + \"\\n\\n\");\r\n\t\t\t} \r\n\t\t\tlock.unlock();\r\n\t\t}else {//caso o saldo seja menor ou igual a zero, destrava a conta para uso de outras threads\r\n\t\t\tlock.unlock();\r\n\t\t\tthreadSync(smart, account);\r\n\t\t}\r\n\t}",
"@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }",
"public double calculatePay() \r\n\t{\r\n\t\treturn (payRate*hoursWorked);\r\n\t}",
"public void pay(InternalAccountOwner from, InternalAccountOwner to, BigDecimal amount) {\n PerformPaymentData data;\n try {\n data = transactionService.getPaymentData(from, to, null);\n } catch (EntityNotFoundException e) {\n System.out.println(\"Some of the users were not found. Transaction aborted.\");\n return;\n }\n\n // try to figure out the type of payment (for some reason)\n List<TransferTypeWithCurrencyVO> types = data.getPaymentTypes();\n TransferTypeWithCurrencyVO paymentType = CollectionHelper.first(types);\n if (paymentType == null) {\n System.out.println(\"There is no possible payment type.\");\n }\n\n // set up payment to be made\n PerformPaymentDTO payment = new PerformPaymentDTO();\n payment.setType(paymentType);\n payment.setFrom(from);\n payment.setTo(to);\n payment.setAmount(amount);\n\n try {\n PaymentVO result = paymentService.perform(payment);\n TransactionAuthorizationStatus authStatus = result.getAuthorizationStatus();\n if (authStatus == TransactionAuthorizationStatus.PENDING_AUTHORIZATION) {\n System.out.println(\"The payment is pending authorization.\");\n } else {\n System.out.println(\"The payment has been processed.\");\n }\n } catch (InsufficientBalanceException e) {\n System.out.println(\"Insufficient balance\");\n } catch (MaxPaymentsPerDayExceededException e) {\n System.out.println(\"Maximum daily amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MaxPaymentsPerWeekExceededException e) {\n System.out.println(\"Maximum weekly amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MaxPaymentsPerMonthExceededException e) {\n System.out.println(\"Maximum monthly amount of transfers \"\n + e.getMaxPayments() + \" has been reached\");\n } catch (MinTimeBetweenPaymentsException e) {\n System.out.println(\"A minimum period of time should be awaited to make \"\n + \"a payment of this type\");\n } catch (MaxAmountPerDayExceededException e) {\n System.out.println(\"Maximum daily amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (MaxAmountPerWeekExceededException e) {\n System.out.println(\"Maximum weekly amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (MaxAmountPerMonthExceededException e) {\n System.out.println(\"Maximum monthly amount of \"\n + e.getMaxAmount() + \" has been reached\");\n } catch (Exception e) {\n System.out.println(\"The payment couldn't be performed\");\n }\n\n }",
"public double pay(double amountPayed){\n \n try{\n double change = this.sale.pay(amountPayed);\n this.accounting.updateFinance( this.sale.getAmountToPay() );\n \n this.inventory.updateInventory( this.sale.getListOfProducts() );\n \n Printer printer = new Printer();\n printer.printReceipt( this.sale.creatSaleDTO() );\n \n return change;\n }catch (Exception a){\n System.out.print(a);\n return 0;\n }\n }",
"@Override\n public double calculatePay ()\n {\n double commissionPay = this.sales * this.rate / 100;\n return commissionPay;\n }",
"public void companyPayRoll(){\n calcTotalSal();\n updateBalance();\n resetHoursWorked();\n topBudget();\n }",
"public abstract double pay(BikesType type, double rideDuration);",
"public abstract PlacedBet register(double bet, double balance, Payout payout);",
"void makeStopBuyOrder(AuthInfo authInfo, String pair, String price, String amount, String stop_price,HibtcApiCallback<Object> callback);",
"@Override\r\n\tpublic void makePayment(Payment p, int amount) {\n\t\t\r\n\t}",
"CarPaymentMethod processCreditCard();",
"@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}",
"public void board(AbstractPayment payment) {\n\n }",
"private void payByBalance(final View v) {\n if (!SanyiSDK.getCurrentStaffPermissionById(ConstantsUtil.PERMISSION_CASHIER)) {\n\n\n Toast.makeText(activity, getString(R.string.str_common_no_privilege), Toast.LENGTH_LONG).show();\n\n return;\n }\n final CashierPayment paymentMode = new CashierPayment();\n paymentMode.paymentType = ConstantsUtil.PAYMENT_STORE_VALUE;\n paymentMode.paymentName = getString(R.string.rechargeable_card);\n if (SanyiSDK.rest.config.isMemberUsePassword) {\n MemberPwdPopWindow memberPwdPopWindow = new MemberPwdPopWindow(v, activity, new MemberPwdPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(final String pwd) {\n // TODO Auto-generated method stub\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, pwd);\n }\n });\n numPadPopWindow.show();\n\n\n }\n });\n memberPwdPopWindow.show();\n return;\n }\n final NumPadPopWindow numPadPopWindow = new NumPadPopWindow(v, getActivity(), cashierResult, paymentMode, new NumPadPopWindow.OnSureListener() {\n\n @Override\n public void onSureClick(Double value, Double change) {\n // TODO Auto-generated method stub\n checkPresenterImpl.addMemberPayment(value, null);\n }\n });\n numPadPopWindow.show();\n }",
"@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }",
"public double calculatePay() {\n\t\treturn 0;\r\n\t}",
"@Override\n public int pay(String cardNo, float amount, String destination, String installments) {\n System.out.println(\"********* pay method of ModernPayment interface is working ***********\");\n System.out.print(\"A payment of \" + amount + \"TL was made to the credit card number \" + cardNo + \" of the \" + destination + \" Bank \");\n System.out.println(\"and \" + installments + \" installments were made to payment.\");\n System.out.println();\n return 1;\n }",
"public static void main(String[] args) {\n\t\t Scanner input=new Scanner(System.in);//Input through Scanner Class\n\t\t System.out.println(\"You have Rs 500 in account\"); \n\t\t System.out.println(\"Enter the amount to be withdrawed\");\n\t\t int amount = input.nextInt();\n\t\t //Enter the amount \n\t\t CurrentAccount deposit=new CurrentAccount();\n\t\t payment(deposit, amount);\n\t\t //Withdraw the amount from bank\n\t\t System.out.println(\"Enter the amount to be deposited\");\n\t\t amount = input.nextInt();\n\t deposit(new SavingsAccount(), amount);\n //Deposit the amount bank\n }",
"public void payment(double total_sales_of_transaction) {\n String payment_typ = \"\";\n Scanner scan = new Scanner(System.in);\n\n System.out.printf(\"Which payment type do you wish to use?\\n\");\n System.out.printf(\"1. Cash\\n\");\n System.out.printf(\"2. Card\\n\");\n \n\n do {\n System.out.printf(\"Please enter your choice :\");\n try {\n choice = scan.nextInt();\n } catch (InputMismatchException e) {\n scan.next();\n System.out.println(\"Something went wrong.\\n\");\n }\n } while (choice<1 || choice >2);\n\n \n\n\n if (choice == 2) {\n boolean valid_ccN = false;\n cerdit_card_ID = scan.nextLine();\n while (valid_ccN == false) {\n valid_ccN = verifiying_payment(cerdit_card_ID);\n if(valid_ccN == true){break;}\n scan.next();\n System.out.println(\"Please enter a valid CC number :\");\n cerdit_card_ID = scan.nextLine();\n }\n\n System.out.println(\"Your payment has been accpeted.\\n\");\n payment_typ = \"CC\";\n payment_used = \"CARD\";\n\n } else {\n verifiying_payment();\n payment_typ = \"C\";\n payment_used = \"CASH\";\n\n }\n\n payment_id = generate_payment_ID(payment_typ);\n printPaymentSummary();\n }",
"double getPaid();",
"@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void Payment(String result) {\n\r\n\t\t\t\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic Void call() throws Exception {\n\t\tlong money = ThreadLocalRandom.current().nextLong(0,21);\n\t\tUtility.p(callType + \" processing \" + money);\n\t\ttry {\n\t\tswitch ( callType ){\n\t\tcase myAccountYourAccount:\n\t\t\tlock.transferMoneyBad(myAccount,yourAccount,money);\n\t\t\tUtility.p(\"result myAccount:\" + myAccount );\n\t\t\tUtility.p(\"result yourAccount:\" + yourAccount);\n\t\t\tbreak;\n\t\tcase yourAccountMyAccount:\n\t\t\tlock.transferMoneyBad(yourAccount,myAccount,money);\n\t\t\tUtility.p(\"result yourAccount:\" + yourAccount);\n\t\t\tUtility.p(\"result myAccount:\" + myAccount );\n\t\t\tbreak;\n\t\tcase myAccountYourAccountHash:\n\t\t\tlock.transferMoney(myAccount,yourAccount,money);\n\t\t\tUtility.p(\"result myAccount:\" + myAccount );\n\t\t\tUtility.p(\"result yourAccount:\" + yourAccount);\n\t\t\tbreak;\n\t\tcase yourAccountMyAccountHash:\n\t\t\tlock.transferMoney(yourAccount,myAccount,money);\n\t\t\tUtility.p(\"result yourAccount:\" + yourAccount);\n\t\t\tUtility.p(\"result myAccount:\" + myAccount );\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tUtility.p(\"illegal type:\" + callType);\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\treturn null;\n\t}finally {\n\t\tUtility.p(\"exiting\");\n\t}\n\t}",
"void bal() \r\n{\r\nSystem.out.println(\"Your current balance is:\"+money[x]);\r\n}",
"public interface PayService {\n\n /**\n * 支付完成处理 下线支付流程\n */\n PayResult payOver(PayOverParam payOverParam);\n}",
"public interface PaymentStrategy {\n\n void pay(double amount);\n\n}",
"public void performPayment() {\n payment.executePayment(amount);\n }",
"@Override\n\tpublic void tranfermoney() {\n\t\tSystem.out.println(\"hsbc tranfermoney\");\n\t}",
"public int a(double newbal, Long ano, Long reqId, Double double1, Long compId,\r\n\t\tLong noShare,Long userid)throws SQLException {\n\tint i=DbConnect.getStatement().executeUpdate(\"update bank set balance=\"+newbal+\"where accno=\"+ano+\"\");\r\n\tint j=DbConnect.getStatement().executeUpdate(\"update requested set status='processed',remark='bought'wherereq_id=\"+reqId+\"\");\r\n\tint k=DbConnect.getStatement().executeUpdate(\"insert into transaction values(trans_seq.nextval,\"+userid+\",sysdate,\"+double1+\",'purchase','broker',\"+compId+\",\"+noShare+\"\");\r\n\tint m=DbConnect.getStatement().executeUpdate(\"update moreshare set no_share=\"+noShare+\"where comp_id=\"+compId+\"\");\r\n\t\r\n\treturn i;\r\n}",
"private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }",
"@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}",
"public ModelPayment(double payment) {\n this.payment = payment;\n }",
"@Override\r\n\t\t\tpublic void buy(String security, double price, int volume) {\n\t\t\t\tSystem.out.println(\"buy is\"+price+volume);\r\n\t\t\t\t\r\n\t\t\t}",
"public interface PaymentStrategy {\n\tpublic void pay(int amount);\n}",
"public String transaction_pay(int reservationId) {\r\n\t\ttry {\r\n\t\t\tif (username == null){\r\n\t\t\t\treturn \"Cannot pay, not logged in\\n\";\r\n\t\t\t}\r\n\t\t\tbeginTransaction();\r\n\t\t\t\r\n\t\t\t//query for the user balance \r\n\t\t\tcheckBalanceStatement.clearParameters();\r\n\t\t\tcheckBalanceStatement.setString(1, username);\r\n\t\t\tResultSet b = checkBalanceStatement.executeQuery();\r\n\t\t\tb.next();\r\n\t\t\tint user_balance = b.getInt(\"balance\");\r\n\t\t\t\r\n\t\t\t//get the price of the first flight\r\n\t\t\tunpaidReservationStatement.clearParameters();\r\n\t\t\tunpaidReservationStatement.setString(1, username);\r\n\t\t\tunpaidReservationStatement.setInt(2, reservationId);\r\n\t\t\tResultSet unpaid = unpaidReservationStatement.executeQuery();\r\n\t\t\t\r\n\t\t\tint total_price = 0;\r\n\t\t\tif (!unpaid.next()){\r\n\t\t\t\trollbackTransaction();\r\n\t\t\t\treturn \"Cannot find unpaid reservation \"+reservationId+\" under user: \"+username+\"\\n\";\r\n\t\t\t} else {\r\n\t\t\t\t//unpaid.next() ?? maybe not sure\r\n\r\n\t\t\t\tint fid1 = unpaid.getInt(\"fid1\");\r\n\t\t\t\tint fid2 = unpaid.getInt(\"fid2\");\r\n\t\t\t\tcheckPriceStatement.clearParameters();\r\n\t\t\t\tcheckPriceStatement.setInt(1, fid1);\r\n\t\t\t\tResultSet p1 = checkPriceStatement.executeQuery();\r\n\t\t\t\tp1.next();\r\n\t\t\t\ttotal_price += p1.getInt(\"price\");\r\n\t\t\t\tp1.close();\r\n\t\t\t\t\r\n\t\t\t\t//unpaidReservationStatement2.clearParameters();\r\n\t\t\t\t//unpaidReservationStatement2.setString(1, username);\r\n\t\t\t\t//unpaidReservationStatement2.setInt(2, reservationId);\r\n\t\t\t\t//ResultSet second = unpaidReservationStatement2.executeQuery();\r\n\t\t\t\tif (fid2 != 0){\r\n\t\t\t\t\t//second fid is not null\r\n\t\t\t\t\tcheckPriceStatement.clearParameters();\r\n\t\t\t\t\tcheckPriceStatement.setInt(1, fid2);\r\n\t\t\t\t\tResultSet p2 = checkPriceStatement.executeQuery();\r\n\t\t\t\t\tp2.next();\r\n\t\t\t\t\ttotal_price += p2.getInt(\"price\");\r\n\t\t\t\t\tp2.close();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (total_price > user_balance){\r\n\t\t\t\t\trollbackTransaction();\r\n\t\t\t\t\treturn \"User has only \"+user_balance+\" in account but itinerary costs \"+total_price+\"\\n\";\r\n\t\t\t\t} else {\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tupdatePaidStatement.clearParameters();\r\n\t\t\t\t\tupdatePaidStatement.setString(1, \"true\");\r\n\t\t\t\t\tupdatePaidStatement.setInt(2, reservationId);\r\n\t\t\t\t\tupdatePaidStatement.executeUpdate();\r\n\t\t\t\t\t\r\n\t\t\t\t\tupdateBalanceStatement.clearParameters();\r\n\t\t\t\t\tupdateBalanceStatement.setInt(1, (user_balance-total_price));\r\n\t\t\t\t\tupdateBalanceStatement.setString(2, username);\r\n\t\t\t\t\tupdateBalanceStatement.executeUpdate();\r\n\t\t\t\t\t\r\n\t\t\t\t\tcommitTransaction();\r\n\t\t\t\t\treturn \"Paid reservation: \"+reservationId+\" remaining balance: \"+(user_balance-total_price)+\"\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (SQLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\t//rollbackTransaction();\r\n\t\t\treturn \"Failed to pay for reservation \" + reservationId + \"\\n\";\r\n\t\t}\r\n }",
"void paymentOrder(long orderId);",
"public interface PayService {\n\n /**\n * 支付订单\n * @param orderDTO 被支付的订单对应的orderDTO对象\n */\n PayResponse create(OrderDTO orderDTO);\n\n /**\n * 异步返回支付信息\n * @param notifyData\n */\n PayResponse notify(String notifyData);\n\n /**\n * 退款\n * @param orderDTO\n */\n RefundResponse refund(OrderDTO orderDTO);\n}",
"public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }",
"public boolean checkpay(){\n return pay;\n }",
"@Test\r\n public void testPayByCard() {\r\n \r\n int cost = 60;\r\n \r\n instance.payByCard(cost);\r\n \r\n }",
"public void update(){\r\n\t\t\r\n\t\tif (this.getWillPay() == true && this.currentTroll.getBridgeColor().compareTo(\"Black\") == 0 && this.getColor().compareTo(\"Black\") != 0){\r\n\t\t\t\r\n\t\t\tthis.payToll(currentTroll);\r\n\t\t\twaitTime = waitTime - 1;\r\n\t\t\tthis.setBlackCoins(this.getBlackCoins() - 1);\r\n\t\t\tthis.setGreyCoins(this.getGreyCoins() - 1);\r\n\t\t\tthis.setWhiteCoins(this.getWhiteCoins() - 1);\r\n\t\t\t\r\n\t\t} //end if\r\n\t\t\r\n\t\tif (this.getWillPay() == true && currentTroll.getBridgeColor().compareTo(\"White\") == 0 && this.getColor().compareTo(\"White\") != 0){\r\n\t\t\t\r\n\t\t\tthis.payToll(currentTroll);\r\n\t\t\twaitTime = waitTime - 1;\r\n\t\t\tthis.setBlackCoins(this.getBlackCoins() - 1);\r\n\t\t\tthis.setGreyCoins(this.getGreyCoins() - 1);\r\n\t\t\tthis.setWhiteCoins(this.getWhiteCoins() - 1);\r\n\t\t\t\r\n\t\t} //end if\r\n\t\t\r\n\t\tif (this.getWillPay() == true && currentTroll.getBridgeColor().compareTo(\"Grey\") == 0 && this.getColor().compareTo(\"Grey\") != 0){\r\n\t\t\t\r\n\t\t\tthis.payToll(currentTroll);\r\n\t\t\twaitTime = waitTime - 1;\r\n\t\t\tthis.setBlackCoins(this.getBlackCoins() - 1);\r\n\t\t\tthis.setGreyCoins(this.getGreyCoins() - 1);\r\n\t\t\tthis.setWhiteCoins(this.getWhiteCoins() - 1);\r\n\t\t\t\r\n\t\t} //end if\r\n\t\t\r\n\t\tif(this.getWillPay() == false){\r\n\t\t\t\r\n\t\t\twaitTime = waitTime - 1;\r\n\t\t\tthis.setBlackCoins(this.getBlackCoins() - 1);\r\n\t\t\tthis.setGreyCoins(this.getGreyCoins() - 1);\r\n\t\t\tthis.setWhiteCoins(this.getWhiteCoins() - 1);\r\n\t\t\t\r\n\t\t} //end if\r\n\t\t\r\n\t}",
"@Override\n public void payGroupBuyBooking(GroupBuyBookingBo groupBuyBookingBo) {\n }",
"public String doPayy(Expence expence, BankRunning bankRunning, User user)\r\n/* 89: */ {\r\n/* 90: 86 */ String result = \"\";\r\n/* 91: 87 */ Expence persistent = (Expence)this.expenceDao.load(expence.getId());\r\n/* 92: 88 */ if ((\"3\".equals(persistent.getStat())) || (persistent.getStat() == \"3\")) {\r\n/* 93: 89 */ return result = \"[id=\" + persistent.getId() + \", \" + persistent.getStat() + \"]该项数据已经审批!\";\r\n/* 94: */ }\r\n/* 95: 92 */ ExpenceFlow expenceFlow = new ExpenceFlow();\r\n/* 96: 93 */ expenceFlow.setGxsj(new Date());\r\n/* 97: 94 */ expenceFlow.setExpence(expence);\r\n/* 98: 95 */ expenceFlow.setUser(user);\r\n/* 99: 96 */ expenceFlow.setOptContent(\"审批\");\r\n/* 100: 97 */ expenceFlow.setYwlc(Integer.valueOf(3));\r\n/* 101: 98 */ this.expenceFlowDao.save(expenceFlow);\r\n/* 102: */ \r\n/* 103: */ \r\n/* 104:101 */ BeanUtils.copyProperties(expence, persistent, new String[] { \"id\", \"user\", \"bxsj\", \"fssj\", \"bxnr\", \"bxje\", \"bxr\", \"skzh\", \"bxlx\" });\r\n/* 105:102 */ persistent.setGxr(user.getName());\r\n/* 106:103 */ persistent.setGxsj(new Date());\r\n/* 107:104 */ persistent.setStat(\"3\");\r\n/* 108:108 */ if (bankRunning != null)\r\n/* 109: */ {\r\n/* 110:110 */ bankRunning.setZcje(Double.parseDouble(bankRunning.getFkje()));\r\n/* 111:111 */ bankRunning.setLrje(0.0D - Double.parseDouble(bankRunning.getFkje()));\r\n/* 112:112 */ bankRunning.setLrsj(new Date());\r\n/* 113:113 */ bankRunning.setLrr(user.getName());\r\n/* 114:114 */ bankRunning.setShbj(\"1\");\r\n/* 115:115 */ bankRunning.setOrderId(expenceFlow.getId().toString());\r\n/* 116:116 */ bankRunning.setBz(expenceFlow.getOptContent());\r\n/* 117:117 */ Integer b_r_id = (Integer)this.bankRunningService.save(bankRunning);\r\n/* 118: */ \r\n/* 119:119 */ persistent.setBankRunningId(b_r_id);\r\n/* 120:120 */ this.expenceDao.update(persistent);\r\n/* 121: */ \r\n/* 122:122 */ Bank b = (Bank)this.bankService.get(bankRunning.getBank().getId());\r\n/* 123:123 */ double cush = new Double(b.getCush() + bankRunning.getLrje()).doubleValue();\r\n/* 124:124 */ this.bankService.updateBankCush(cush, Integer.valueOf(bankRunning.getBank().getId().intValue()));\r\n/* 125: */ }\r\n/* 126:126 */ return result;\r\n/* 127: */ }",
"public interface Payment {\n\tpublic void pay(String name, float balance);\n}",
"public void pay(PaymentStrategy paymentMethod){\n\t\tint amount = calculateTotal();\n\t\tpaymentMethod.pay(amount);\n\t}",
"void transfer(BankAccount x,double amt)\n\t{\n\t\tSystem.out.println(\"transferring the amount\");\n\t\twithdraw(amt);\n\t\tx.deposit(amt);\n\t\tSystem.out.println(\"transfer done successfully! \");\n\t}",
"String confirmPayment(String userName, String teamName, Payment payment) throws RemoteException,\n InterruptedException;",
"void buyDevCard();",
"public void makePayment(double roomPrice, Room room, int counter) {\n\t\tif(counter < 3) {\t\t\t\t\t\t\t\t\t\t\t//A payment can be attempted 3 times. User enters the amount\n\t\tSystem.out.println(\"\\nPlease enter outstanding balance being payed by customer.\"); //received from guests for Room\n\t\tSystem.out.println(\"DUE: €\"+roomPrice+\"0\");\n\t\tdouble moneyPayed = keyboard.nextDouble();\t\t\t\t\t\t\t\t\t\t\t//amount is entered to the screen\n \n\t\t\tif((roomPrice - moneyPayed) <= 0) {\t\t\t\t\t\t\t\t\t\t\t//if guests have give the value of the bill\n\t\t\t\tSystem.out.println(\"\\n GUESTS CHECKED-OUT \");\t\t\n\t\t\t\troom.removeAllGuestsFromRoom(room);\t\t\t\t\t\t\t\t\t\t//guests of that room are checked out\n\t\t\t\tSystem.out.println(\"******* THANK YOU FOR YOUR PAYMENT *********\");\t\t\t\t\n\t\t\t\tdayEarnings += moneyPayed; \t\t\t\t\t\t\t\t\t\t\t\t//money received is added to the earnings\n\t\t\t\tif(moneyPayed - roomPrice > 0) {\t\t\t\t\t\t\t\t\t\t//if they payed more than required\n\t\t\t\t\tSystem.out.println(\"\\tCHANGE DUE TO CUSTOMER : €\"+(moneyPayed-roomPrice)+\"0\"); //amount of change due is displayed\n\t\t\t\t\tdayEarnings = dayEarnings - (moneyPayed - roomPrice);\t\t\t\t//change given back is removed from earnings\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"**********************************************\\n\");\n\t\t\t}\n\t\t\telse {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//guests have not handed over enough money\t\n\t\t\t\tif(counter < 2 )\n\t\t\t\tSystem.out.println(\"\\n******* YOU HAVE NOT PAYED ENOUGH **********\");\n\t\t\t\tSystem.out.println(\"**********************************************\\n\");\n\t\t\t\tcounter++;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//when counter reaches 3 Payment is not\n\t\t\t\troomPrice = roomPrice - moneyPayed;\t\t\t\t\t\t\t\t\t\t//accepted and you are put back to mainMenu\n\t\t\t\tmakePayment(roomPrice, room , counter);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"******* UNSUCCESSFULL PAYMENT **********\");\t\t\t//if the guests did not pay correctly 3\n\t\t\tSystem.out.println(\"******* NO MONEY TAKEN **********\");\t\t\t//times then they are not checked-out\n\t\t\tSystem.out.println(\"******************************************\\n\");\t\t\t//and their bill is still due\n\t\t\tSystem.out.println(\"**** PLEASE TRY TO CHECK-OUT AGAIN *****\");\n\t\t}\n\t}",
"void chargeTf(double amount);",
"@Override\n\tpublic void businessMoney() {\n\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n if(e.getSource()==pay){\n if(model.getflag()==true&&!model.getCustomer().getUsername().isEmpty()){\n order.setName(NameOnCard.getText());\n order.setAddress(Address.getText());\n if(type==OrderType.delivery){\n boolean payflag=model.getCustomer().paythebill(model.getCustomer().getOrder(),CardNumber.getText(),ExpirationTime.getText(),NameOnCard.getText());\n boolean addressflag=false;\n if(Address.getText().isEmpty()){\n addressflag=true;\n }\n if(payflag==true && addressflag==false){\n\n JOptionPane.showMessageDialog(this,\"Payment succeed!\");\n dispose();\n }\n else if( addressflag==true){\n JOptionPane.showMessageDialog(this,\"Address required\");\n }\n else{\n JOptionPane.showMessageDialog(this,\"Invalid card info\");\n }\n }\n else{\n boolean payflag=model.getCustomer().paythebill(model.getCustomer().getOrder(),CardNumber.getText(),ExpirationTime.getText(),NameOnCard.getText());\n\n if(payflag==true){\n\n JOptionPane.showMessageDialog(this,\"Payment succeed!\");\n dispose();\n }\n\n else{\n JOptionPane.showMessageDialog(this,\"Invalid card info\");\n }\n }\n\n }else{\n\n int index=model.getOrders().size()-1;\n\n if(type==OrderType.delivery){\n\n order.setName(NameOnCard.getText());\n order.setAddress(Address.getText());\n boolean addressflag=false;\n if(Address.getText().isEmpty()){\n addressflag=true;\n }\n boolean payflag=model.paythebill(model.getOrders().get(index),CardNumber.getText(),ExpirationTime.getText(),NameOnCard.getText());\n if(payflag==true && addressflag==false){\n\n JOptionPane.showMessageDialog(this,\"Payment succeed!\");\n dispose();\n }\n else if( addressflag==true){\n JOptionPane.showMessageDialog(this,\"Address required\");\n }\n else{\n JOptionPane.showMessageDialog(this,\"Invalid card info\");\n }\n }\n else{\n\n order.setName(NameOnCard.getText());\n order.setAddress(Address.getText());\n\n\n boolean payflag=model.paythebill(model.getOrders().get(index),CardNumber.getText(),ExpirationTime.getText(),NameOnCard.getText());\n if(payflag==true ){\n\n JOptionPane.showMessageDialog(this,\"Payment succeed!\");\n dispose();\n }\n\n else{\n JOptionPane.showMessageDialog(this,\"Invalid card info\");\n }\n }\n\n }\n }\n if(e.getSource()==cancel){\n dispose();\n }\n\n }",
"public void nonSyncdeposit(double amount)\r\n\t {\r\n\t if(amount<0){//if deposit amount is negative\r\n\t \t System.out.println(\"Invalid amount cannot deposit\");\r\n\t }\r\n\t else{ //logic to deposit amount\r\n\t\t System.out.print(\"Depositing \" + amount);\r\n\t double newBalance = balance + amount;\r\n\t System.out.println(\", new balance is \" + newBalance);\r\n\t balance = newBalance;\r\n\t }\r\n\t }",
"public void mutualFund(){\r\n\t\tSystem.out.println(\"HSBC ---mutualFund method called from Interface BrazilBank\");\r\n\t}",
"@Override\n\tvoid money() {\n\t\t\n\t}",
"@Override\r\n\tpublic void fundTransfer(String sender, String reciever, double amount) {\n\t\t\r\n\t\tString name, newMobileNo;\r\n\t\tfloat age;\r\n\t\tdouble amountFund;\r\n\t\t\r\n\t\tCustomer custSender = custMap.get(sender);\r\n\t\tCustomer custReciever = custMap.get(reciever);\r\n\t\t\r\n\t\tdouble recieverAmount = custReciever.getInitialBalance();\r\n\t\tdouble senderAmount = custSender.getInitialBalance();\r\n\t\tif(senderAmount - amount > 500){\r\n\t\t\trecieverAmount += amount;\r\n\t\t\tsenderAmount -= amount;\r\n\t\t\tSystem.out.println(\"Fund Transferred\");\r\n\t\t}\r\n\t\tname = custSender.getName();\r\n\t\tnewMobileNo = custSender.getMobileNo();\r\n\t\tage = custSender.getAge();\r\n\t\tamountFund = senderAmount;\r\n\t\t\r\n\t\tcustSender.setAge(age);\r\n\t\tcustSender.setInitialBalance(senderAmount);\r\n\t\tcustSender.setMobileNo(newMobileNo);\r\n\t\tcustSender.setName(name);\r\n\t\t\r\n\t\tcustMap.put(newMobileNo, custSender);\r\n\t\t\r\n\t\tname = custReciever.getName();\r\n\t\tnewMobileNo = custReciever.getMobileNo();\r\n\t\tage = custReciever.getAge();\r\n\t\tamountFund = recieverAmount;\r\n\t\t\r\n\t\tcustReciever.setAge(age);\r\n\t\tcustReciever.setInitialBalance(recieverAmount);\r\n\t\tcustReciever.setMobileNo(newMobileNo);\r\n\t\tcustReciever.setName(name);\r\n\t\t\r\n\t\tcustMap.put(newMobileNo, custReciever);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n Company myCompany = new Company();\n System.out.println(myCompany.getName());\n Worker oyelowo = new JuniorWorker(989.9);\n Worker Dan = new JuniorWorker(987.8);\n Worker Shane = new MidLevelWorker(34.5);\n Worker Dolan = new SeniorWorker(4567.8);\n Worker Maria = new SeniorWorker(84.3);\n SeniorWorker Sam = new SeniorWorker();\n JuniorWorker jim = new JuniorWorker(\"Jim\", \"HJK\", 1, 345.9);\n System.out.println(jim.getBalance());\n\n\n System.out.println(myCompany.getBalance() + \" \" +myCompany.getAuthorizationKey());\n\n\n\n myCompany.paySalary(1000.0, oyelowo);\n myCompany.paySalary(700.0, Dan);\n myCompany.paySalary(700.0, Dan);\n myCompany.paySalary(700.0, Dan);\n myCompany.paySalary(700.0, Dan);\n myCompany.paySalary(700.0, Dan);\n\n\n System.out.println();\n System.out.println(myCompany.getBalance());\n System.out.println(myCompany.getDebits());\n System.out.println(oyelowo.getBalance(myCompany));\n System.out.println(Dan.getBalance(myCompany));\n\n\n }",
"public synchronized void take(Station s, Bicycle b, Bank_Card bank_card) throws Exception{\r\n\t\tif(!s.equals(this.last_routine.getSource())){System.out.println(\"CHOOSE THE STATION OF YOUR ROUTINE\");throw new Exception(\"WRONG STATION\");}\r\n\t\tif(this.bicycle!=null){System.out.println(\"Already Got a Bicycle\");throw new Exception(\"ALREADY GOT A BIKE\");}\r\n\t\ts.remove_user(this);\r\n\t\tif(!s.isState()){System.out.println(\"offline - out of order!\");throw new Exception(\"OFFLINE\");}\r\n\t\tthis.setPosition(s.getPosition());\r\n\t\tif(b instanceof Bicycle_Mech){\r\n\t\t\tif(s.count_mech() == 0){System.out.println(\"no more mech bicycles available\");}\r\n\t\t\telse{\r\n\t\t\t\tfor(Map.Entry<Slot,Bicycle_Mech> me:s.getPlaces_mech().entrySet()){\r\n\t\t\t\t\tif(me.getValue()!=null){\r\n\t\t\t\t\t\tthis.bicycle = me.getValue();s.getPlaces_mech().put(me.getKey(), null);\r\n\t\t\t\t\t\ts.setRent_times(s.getRent_times()+1);s.notify_users();\r\n\t\t\t\t\t\tthis.bicycle.setNumber_rides(this.bicycle.getNumber_rides()+1);\r\n\t\t\t\t\t\tif(bank_card.getOwner().equals(this)){this.bicycle.setBank_card_to_use(bank_card);}\r\n\t\t\t\t\t\tif(!bank_card.getOwner().equals(this)){System.out.println(\"choose a right bank card\");throw new Exception(\"WRONG BANK CARD USER\");}\t\r\n\t\t\t\t\t\tthis.bicycle.setUser(this);\r\n\t\t\t\t\t\tthis.setPosition(s.getPosition());\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(b instanceof Bicycle_Elec){\r\n\t\t\tif(s.count_elec() == 0){System.out.println(\"no more elec bicycles available\");}\r\n\t\t\telse{\r\n\t\t\t\tfor(Map.Entry<Slot,Bicycle_Elec> me:s.getPlaces_elec().entrySet()){\r\n\t\t\t\t\tif(me.getValue()!=null){\r\n\t\t\t\t\t\tthis.bicycle = me.getValue();s.getPlaces_elec().put(me.getKey(), null);\r\n\t\t\t\t\t\ts.setRent_times(s.getRent_times()+1);s.notify_users();\r\n\t\t\t\t\t\tthis.bicycle.setNumber_rides(this.bicycle.getNumber_rides()+1);\r\n\t\t\t\t\t\tif(bank_card.getOwner().equals(this)){this.bicycle.setBank_card_to_use(bank_card);}\r\n\t\t\t\t\t\tif(!bank_card.getOwner().equals(this)){System.out.println(\"choose a right bank card\");throw new Exception(\"WRONG BANK CARD USER\");}\t\r\n\t\t\t\t\t\tthis.bicycle.setUser(this);\r\n\t\t\t\t\t\tthis.setPosition(s.getPosition());\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public void functionInvoker(int option1) {\n switch (option1) {\n //Add different functions below\n case 1: {\n System.out.println(\"You paid: Rs \" + bill);\n paymentStatus=true;\n break;\n }\n case 2: {\n if (balance >= bill) {\n System.out.println(\"Rs\" + bill + \" has been deducted from your credit card\");\n amount = balance - bill;\n paymentStatus=true;\n } else {\n System.out.println(\"Your account balance is not sufficient\");\n System.out.println(\"Select Another method of payment\");\n paymentMethod();\n }\n break;\n }\n case 3: {\n System.out.println(\"Rs\" + bill + \" should be paid to our attender\");\n paymentStatus=true;\n break;\n }\n case 4: {\n if (premiumSubscription) {\n if (balance >= bill) {\n System.out.println(\"Rs\" + bill + \" has been deducted from your premium account\");\n amount = balance - bill;\n paymentStatus=true;\n }\n } else {\n System.out.println(\"Your account balance is not sufficient\");\n System.out.println(\"Select Another method of payment\");\n paymentMethod();\n }\n break;\n }\n case 5: {\n System.exit(0);\n break;\n }\n default:\n System.out.println(\"Choose correctly\");\n paymentMethod();\n }\n }",
"public void wire(String accountNumber,int bankNumber, String toAccountNumber, int amount) {\n\t\t\n\t\tConnection conn;\n\t\tPreparedStatement ps, pp, ll, lp, ls, mm, nn;\n\t\tString url = \"jdbc:mysql://localhost:3306/mars\";\n\t\tString username = \"root\";\n\t\tString password = \"1113\";\n\t\tint lastBalance;\n\t\tint tolastBalance;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttry{\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql = \"select balance,userId from \"+this.name+\" where accountNumber=?\";\n\t\tps= (PreparedStatement) conn.prepareStatement(sql);\n\t\tps.setString(1, accountNumber.toString());\n\t\tResultSet rs = ps.executeQuery();\n\t\tint nowBalance = 0;\n\t\tString id = \"\";\n\t\twhile(rs.next()) { \n\t\t\tnowBalance=rs.getInt(\"balance\");\n\t\t\tid = rs.getString(\"userId\");\n\t\t}\n\t\tif (nowBalance<amount) {\n\t\t\tSystem.out.println(\"No Balance\");\n\t\t\treturn;\n\t\t}\n\t\tlastBalance = nowBalance - amount;\n\t\t//System.out.println(lastBalance);\n\t\tString sql1 = \"UPDATE \"+this.name+\" SET balance=? where accountNumber=?\";\n\t\tls = (PreparedStatement) conn.prepareStatement(sql1);\n\t\tls.setInt(1, lastBalance);\n\t\tls.setString(2, accountNumber.toString());\n\t\tls.executeUpdate();\n\t\t\n\t\t\n\t\t\n\t\t//to account\n\t\tconn=DriverManager.getConnection(url, username, password);\n\t\tString sql3 = \"select bankName from bank where bankNumber=?\";\n\t\tll= (PreparedStatement) conn.prepareStatement(sql3);\n\t\tll.setString(1, String.valueOf(bankNumber).toString());\n\t\tResultSet rs3 = ll.executeQuery();\n\t\tString toname = \"\";\n\t\twhile(rs3.next()) { \n\t\t\ttoname=rs3.getString(\"bankName\");\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tString sql4 = \"select balance,userId from \"+toname+\" where accountNumber=?\";\n\t\tpp= (PreparedStatement) conn.prepareStatement(sql4);\n\t\tpp.setString(1, accountNumber.toString());\n\t\tResultSet rs4 = pp.executeQuery();\n\t\tint tonowBalance = 0;\n\t\tString toid = \"\";\n\t\twhile(rs4.next()) { \n\t\t\ttonowBalance=rs4.getInt(\"balance\");\n\t\t\ttoid = rs4.getString(\"userId\");\n\t\t}\n\t\t\n\t\ttolastBalance = tonowBalance + amount;\n\t\t//System.out.println(lastBalance);\n\t\tString sql5 = \"UPDATE \"+toname+\" SET balance=? where accountNumber=?\";\n\t\tlp = (PreparedStatement) conn.prepareStatement(sql5);\n\t\tlp.setInt(1, tolastBalance);\n\t\tlp.setString(2, toAccountNumber.toString());\n\t\tlp.executeUpdate();\n\t\t\n\t\t\n\t\t//log\n\t\tString logs = \"wired : \"+ amount+\" to \"+toAccountNumber+\"/ balance: \"+String.valueOf(lastBalance);\n\t\tString sql11 = \"insert into \"+id+\" (log) values (?)\";\n\t\tmm = (PreparedStatement) conn.prepareStatement(sql11);\n\t\tmm.setString(1, logs);\n\t\tmm.executeUpdate();\n\t\tSystem.out.println(\"You wired $\"+String.valueOf(amount));\n\t\t\n\t\tString logs1 = \"get : \"+ amount+\" from \" +accountNumber+ \"/ balance: \"+String.valueOf(tolastBalance);\n\t\tString sql12 = \"insert into \"+toid+\" (log) values (?)\";\n\t\tnn = (PreparedStatement) conn.prepareStatement(sql12);\n\t\tnn.setString(1, logs1);\n\t\tnn.executeUpdate();\n\t\tSystem.out.println(\"You got $\"+String.valueOf(amount));\n\t\t\n\t\t\n\t\t}catch (SQLException e) {\n\t\t throw new IllegalStateException(\"Cannot connect the database!\", e);\n\t\t}\n\t}",
"public void paymentMethod() {\n try {\n System.out.println(\"You can pay in 4 ways\");\n String[] functions = new String[]{\"Cash\", \"Debit / Credit card\", \"Pay to Attender\", \"Use Premium account\", \"Exit\"};\n for (int i = 0; i < functions.length; i++) {\n System.out.println(i + 1 + \": \" + functions[i]);\n }\n int option1 = scanner.nextInt();\n functionInvoker(option1);\n } catch (Exception e) {\n System.out.println(\"Enter Valid input.\");\n e.printStackTrace();\n }\n }",
"public static String payCurrentBill(String account){\n return \"update current_bills set cb_paid = 1 where cb_account = '\"+account+\"'\";\n }"
]
| [
"0.7272371",
"0.7012372",
"0.6871563",
"0.684021",
"0.6707517",
"0.66223866",
"0.6533953",
"0.6503037",
"0.6393511",
"0.6377141",
"0.62221205",
"0.6175648",
"0.61101437",
"0.6100965",
"0.6071183",
"0.6046572",
"0.60450685",
"0.60341114",
"0.5969943",
"0.59690017",
"0.59516853",
"0.59412086",
"0.5932798",
"0.58715636",
"0.58709985",
"0.5868377",
"0.5845325",
"0.5824874",
"0.58229864",
"0.5816576",
"0.5777307",
"0.5743786",
"0.5737549",
"0.57252854",
"0.56863755",
"0.56714886",
"0.56709474",
"0.5668178",
"0.5651704",
"0.56498",
"0.5642708",
"0.5633764",
"0.56329715",
"0.5632242",
"0.56318176",
"0.5614032",
"0.55955535",
"0.5591355",
"0.5591197",
"0.55623347",
"0.5560006",
"0.55578834",
"0.55539113",
"0.5545114",
"0.55365056",
"0.5512069",
"0.5511969",
"0.5510859",
"0.55102444",
"0.5484306",
"0.54748654",
"0.54661846",
"0.54634106",
"0.54518193",
"0.5448473",
"0.54418826",
"0.5433797",
"0.5420026",
"0.54146",
"0.54126984",
"0.5410929",
"0.5410865",
"0.54056513",
"0.53956074",
"0.53928804",
"0.5380469",
"0.53792083",
"0.5377729",
"0.537703",
"0.5375116",
"0.53585815",
"0.53507775",
"0.53437614",
"0.5340599",
"0.5336115",
"0.5333129",
"0.5329999",
"0.5327864",
"0.5323892",
"0.5320797",
"0.53071064",
"0.5307084",
"0.5303554",
"0.52995557",
"0.5281725",
"0.5277753",
"0.5277684",
"0.5276794",
"0.52755123",
"0.5273508"
]
| 0.77218086 | 0 |
the synchronized function take is used to realize the action of taking a bike at certain station for the user, and this user's bicycle attribute will be arranged by this taken bike. s: the source station to take bikes b: the type of bike to take bank_card: the bank_card used to activate of taking action | public synchronized void take(Station s, Bicycle b, Bank_Card bank_card) throws Exception{
if(!s.equals(this.last_routine.getSource())){System.out.println("CHOOSE THE STATION OF YOUR ROUTINE");throw new Exception("WRONG STATION");}
if(this.bicycle!=null){System.out.println("Already Got a Bicycle");throw new Exception("ALREADY GOT A BIKE");}
s.remove_user(this);
if(!s.isState()){System.out.println("offline - out of order!");throw new Exception("OFFLINE");}
this.setPosition(s.getPosition());
if(b instanceof Bicycle_Mech){
if(s.count_mech() == 0){System.out.println("no more mech bicycles available");}
else{
for(Map.Entry<Slot,Bicycle_Mech> me:s.getPlaces_mech().entrySet()){
if(me.getValue()!=null){
this.bicycle = me.getValue();s.getPlaces_mech().put(me.getKey(), null);
s.setRent_times(s.getRent_times()+1);s.notify_users();
this.bicycle.setNumber_rides(this.bicycle.getNumber_rides()+1);
if(bank_card.getOwner().equals(this)){this.bicycle.setBank_card_to_use(bank_card);}
if(!bank_card.getOwner().equals(this)){System.out.println("choose a right bank card");throw new Exception("WRONG BANK CARD USER");}
this.bicycle.setUser(this);
this.setPosition(s.getPosition());
break;
}
}
}
}
if(b instanceof Bicycle_Elec){
if(s.count_elec() == 0){System.out.println("no more elec bicycles available");}
else{
for(Map.Entry<Slot,Bicycle_Elec> me:s.getPlaces_elec().entrySet()){
if(me.getValue()!=null){
this.bicycle = me.getValue();s.getPlaces_elec().put(me.getKey(), null);
s.setRent_times(s.getRent_times()+1);s.notify_users();
this.bicycle.setNumber_rides(this.bicycle.getNumber_rides()+1);
if(bank_card.getOwner().equals(this)){this.bicycle.setBank_card_to_use(bank_card);}
if(!bank_card.getOwner().equals(this)){System.out.println("choose a right bank card");throw new Exception("WRONG BANK CARD USER");}
this.bicycle.setUser(this);
this.setPosition(s.getPosition());
break;
}
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized void park(Station s) throws Exception{\r\n\t\tif(!s.equals(this.last_routine.getDestination())){System.out.println(\"CHOOSE THE STATION OF YOUR ROUTINE\");throw new Exception(\"WRONG STATION\");}\r\n\t\ts.remove_user(this);\r\n\t\tif(!s.isState()){System.out.println(\"offline - out of order!\");throw new Exception(\"OFFLINE\");}\r\n\t\tif(this.bicycle == null){System.out.println(\"no bicycle to park\");}\r\n\t\tthis.bicycle.setTotal_time_spent(this.bicycle.getTotal_time_spent()+this.bicycle.count_bike_time(this.last_routine.getSource(), this.last_routine.getDestination()));\r\n\t\tthis.setPosition(s.getPosition());\r\n\t\tif(this.bicycle instanceof Bicycle_Mech){\r\n\t\t\tif(s.getPlaces_mech().size()-s.count_mech() == 0){System.out.println(\"no more mech bicycle slots available\");}\r\n\t\t\telse{\r\n\t\t\t\tif(s instanceof Station_Plus && this.card!=null){this.card.setCredits(this.card.getCredits()+5);}\r\n\t\t\t\tfor(Map.Entry<Slot,Bicycle_Mech> me:s.getPlaces_mech().entrySet()){\r\n\t\t\t\t\tif(me.getValue()==null){\r\n\t\t\t\t\t\ts.getPlaces_mech().put(me.getKey(), (Bicycle_Mech)this.bicycle);s.setReturn_times(s.getReturn_times()+1);\r\n\t\t\t\t\t\tif(this.card!=null){System.out.println(this.getUserName() + \" Credits remaining: \" + this.getCard().getCredits());}\r\n\t\t\t\t\t\tSystem.out.println(this.getUserName() + \" PAY: \" + this.pay(this.last_routine, this.bicycle, this.bicycle.getBank_card_to_use()));\r\n\t\t\t\t\t\tthis.last_routine = null;\r\n\t\t\t\t\t\ts.notify_users();\r\n\t\t\t\t\t\tthis.bicycle.setUser(null);\r\n\t\t\t\t\t\tthis.bicycle.setBank_card_to_use(null);\r\n\t\t\t\t\t\tthis.bicycle = null;\r\n\t\t\t\t\t\tthis.setPosition(s.getPosition());\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} \r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.bicycle instanceof Bicycle_Elec){\r\n\t\t\tif(s.getPlaces_elec().size()-s.count_elec() == 0){System.out.println(\"no more elec bicycle slots available\");}\r\n\t\t\telse{\r\n\t\t\t\tif(s instanceof Station_Plus && this.card!=null){this.card.setCredits(this.card.getCredits()+5);}\r\n\t\t\t\tfor(Map.Entry<Slot,Bicycle_Elec> me:s.getPlaces_elec().entrySet()){\r\n\t\t\t\t\tif(me.getValue()==null){\r\n\t\t\t\t\t\ts.getPlaces_elec().put(me.getKey(), (Bicycle_Elec)this.bicycle);s.setReturn_times(s.getReturn_times()+1);\r\n\t\t\t\t\t\tif(this.card!=null){System.out.println(this.getUserName() + \" Credits remaining: \" + this.getCard().getCredits());}\r\n\t\t\t\t\t\tSystem.out.println(this.getUserName() + \" PAY: \" + this.pay(this.last_routine, this.bicycle,this.bicycle.getBank_card_to_use()));\r\n\t\t\t\t\t\tthis.last_routine = null;\r\n\t\t\t\t\t\ts.notify_users();\r\n\t\t\t\t\t\tthis.bicycle.setUser(null);\r\n\t\t\t\t\t\tthis.bicycle.setBank_card_to_use(null);\r\n\t\t\t\t\t\tthis.bicycle = null;\r\n\t\t\t\t\t\tthis.setPosition(s.getPosition());\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} \r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void take(Thing t)\r\n {\r\n if (t==null)\r\n System.out.println(\"That item does not exist in this room\");\r\n \t\r\n \telse if (t.getOwner().equals(this))\r\n \t\tSystem.out.println(this.getName() + \" is already carrying that!\");\r\n \r\n \telse\r\n \t{\r\n \t\tif (this.getRoom().equals(t.getOwner()))\r\n \t\t{\r\n \t\t\tif (t.getType()==Equip.WEAPON)\r\n \t\t\t say(\"I took \" + t.getName() + \" which has \" + ((Equip)t).getRating() + \" ATK\");\r\n \t\t\telse if (t.getType()==Equip.ARMOR)\r\n \t\t\t say(\"I took \" + t.getName() + \" which has \" + ((Equip)t).getRating() + \" DEF\");\r\n \t\t\telse if (t.getType()==Consume.POTION)\r\n \t\t\t say(\"I took \" + t.getName() + \" which has \" + ((Consume)t).getRating() + \" Healing\");\r\n \t\t\telse \r\n \t\t\t say(\"I took \" + t.getName() + \" from \" + room.getName());\r\n \t\t}\r\n \t\tt.changeOwner(this);\r\n \t}\r\n }",
"private void placeKitOnDeliveryBoat(MyKit mk)\n\t{\n\t\tif(guiEnable){\n\t\t\tthis.boatGui.msgDoGetKit();\n\t\t\ttry {\n\t\t\t\tprint(\"Boat moving!!\");\n\t\t\t\tguiControl.acquireUninterruptibly();\n\t\t\t} catch (Exception e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t//e1.printStackTrace();\n\t\t\t}\n\t\t\tprint(\"Boat has finished moving.\");\n\t\t\tthis.kitRobotGUI.DoMoveFinishedKitToDeliveryStation (mk.kit.guikit);\n\t\t\ttry {\n\t\t\t\t//guiControl = new Semaphore(0,true);//TODO: take away after gui fixes it\n\t\t\t\tguiControl.acquireUninterruptibly();\n\t\t\t} catch (Exception e) {\n\t\t\t\t//e.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tprint(\"GUI moving Kit to Boat. Finished moving. Telling Agent.\");\n\t\t\n\t\tmyStand.setSlotThreeAvailable();\n\t\tmk.slot = 0;\n\t\tprint(\"Kit Slot number : \"+3 +\" is available\");\n\t\tmk.status = KitStatus.Gone; \n\t\tif(guiEnable)\n\t\t\tboatGui.msgDoReceiveKit(mk.kit.guikit);//telling boat\n\t\tstateChanged();\n\t}",
"private void bid() {\n\t\t\t\n\t\t}",
"public void ride(Bicycle bicycle){\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.brake();\n\n }",
"@Override\r\n\tpublic Answer handle(Request request) throws Exception {\r\n\t\tGPS startPoint = request.getStartPos();\r\n\t\tGPS endPoint = request.getEndPos();\r\n\t\tCurrentDistribution curDis = CurrentDistribution.getInstance();\r\n\t\tArrayList<Station> givenTypeAvaStations = null;// whether this init is a correct choice in case that ArrayList can not be covered directly \r\n\t\tdouble ridingSpeed = 0.00001;//if not given proper bicycle type, time cost would be extremely large\r\n\t\tif(request.getBikeType().equalsIgnoreCase(\"E\")) {\r\n\t\t\tridingSpeed = Server.eleRidingSpeed;\r\n\t\t\tgivenTypeAvaStations = curDis.geteAvaStationList();\r\n\t\t}\r\n\t\t\r\n\t\tif(request.getBikeType().equalsIgnoreCase(\"M\")) {\r\n\t\t\tridingSpeed = Server.mecRidingSpeed;\r\n\t\t\tgivenTypeAvaStations = curDis.getmAvaStationList();\r\n\t\t}\r\n\r\n\t\tif(givenTypeAvaStations.size() == 0) {\r\n\t\t\tServer.error(\"no available station containing given type of bicycle\");\r\n\t\t}\r\n\r\n\t\tStation minStartStation = givenTypeAvaStations.get(0);\r\n\t\tStation minEndStation = curDis.getReturnableStationList().get(0);\r\n\t\t\r\n\t\tdouble minEndDis = Math.sqrt((minEndStation.getPos().getX() - endPoint.getX()) * (minEndStation.getPos().getX() - endPoint.getX()) + \r\n\t\t\t\t(minEndStation.getPos().getY() - endPoint.getY())*(minEndStation.getPos().getY() - endPoint.getY()));\r\n\t\t\r\n\t\tfor(Station s: curDis.getReturnableStationList()) {\r\n\t\t\tdouble endDis = Math.sqrt((s.getPos().getX() - endPoint.getX())*(s.getPos().getX() - endPoint.getX()) + \r\n\t\t\t\t\t(s.getPos().getY() - endPoint.getY()) * (s.getPos().getY() - endPoint.getY()));\r\n\t\t\tif( endDis < minEndDis) {\r\n\t\t\t\tminEndStation = s;\r\n\t\t\t\tminEndDis = endDis; \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tdouble minWalkRideTime = Math.sqrt((minStartStation.getPos().getX() - startPoint.getX()) * (minStartStation.getPos().getX() - startPoint.getX())+\r\n\t\t\t\t(minStartStation.getPos().getY() - startPoint.getY()) * (minStartStation.getPos().getY() - startPoint.getY()))/\r\n\t\t\t\tServer.walkingSpeed +\r\n\t\t\t\t(Math.abs(minStartStation.getPos().getX() - endPoint.getX())+ \r\n\t\t\t\t\t\tMath.abs(minStartStation.getPos().getY() - endPoint.getY()))/\r\n\t\t\t\tridingSpeed;\r\n\t\t\r\n\t\tfor(Station s: givenTypeAvaStations) {\r\n\t\t\tdouble walkRideTime = Math.sqrt((s.getPos().getX() - startPoint.getX()) * (s.getPos().getX() - startPoint.getX())+\r\n\t\t\t\t\t(s.getPos().getY() - startPoint.getY()) * (s.getPos().getY() - startPoint.getY()))/\r\n\t\t\t\t\tServer.walkingSpeed +\r\n\t\t\t\t\t(Math.abs(s.getPos().getX() - endPoint.getX())+ \r\n\t\t\t\t\t\t\tMath.abs(s.getPos().getY() - endPoint.getY()))/\r\n\t\t\t\t\tridingSpeed;\r\n\t\t\tif( walkRideTime < minWalkRideTime) {\r\n\t\t\t\tminStartStation = s;\r\n\t\t\t\tminWalkRideTime = walkRideTime; \r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\r\n\t\tdouble minStartDis = Math.sqrt((minStartStation.getPos().getX() - startPoint.getX())*(minStartStation.getPos().getX() - startPoint.getX())\r\n\t\t\t\t+ (minStartStation.getPos().getY() - startPoint.getY())*(minStartStation.getPos().getY() - startPoint.getY()));\r\n\t\tdouble minRideDis = (Math.abs(minStartStation.getPos().getX() - minEndStation.getPos().getX())+ \r\n\t\t\t\tMath.abs(minStartStation.getPos().getY() - minEndStation.getPos().getY()));\r\n\t\tdouble minTime = (minEndDis + minStartDis)/ Server.walkingSpeed + minRideDis/ridingSpeed;\r\n\t\tdouble minDis = minStartDis + minEndDis + minRideDis;\r\n\t\tif(minTime > 500) {\r\n\t\t\tthrow new Exception(\"BikeType input illegal.\");\r\n\t\t}\r\n\t\t\r\n\t\tAnswer ans = new Answer(minStartStation, minEndStation, minTime, minDis);\r\n\t\treturn ans;\r\n\t}",
"public void B_Button(){\n\t\tif(_martMenuVisible && !buyMenu && !sellMenu){\n\t\t\tthis.Down();\n\t\t\tthis.Down();\n\t\t\tthis.A_Button();\n\t\t}\n\t\t\n\t\tif(this.facingNPC() && this._movingTrainers.get(this._interruptedTrainer).isInterrupted() && !_menuVisible && !_pcVisible && !_martMenuVisible && !textTimer.isRunning() && !_approachTimer.isRunning() && !escapeTimerEnter.isRunning() && !escapeTimerLeave.isRunning()){\n\t\t\tif((this.facingWater() && _gbs.getSurf()) || (!this.facingWater()) && !_gbs.getSurf()){\n\t\t\t\t//Interrupt them, hear what they have to say.\n\t\t\t\tTrainer moving = this._movingTrainers.get(this._interruptedTrainer);\n\t\t\t\t//SysOut.print(\"Trainer name: \" + moving.getName());\n\t\t\t\t\n\t\t\t\t//Specifically for Cut and Strength\n\t\t\t\tif(moving.getName() == \"CutBush\"||moving.getName() == \"CutCan\" || moving.getName()==\"Swiper\"){\n\t\t\t\t\t//SysOut.print(\"Chose not to use Cut!\");\n\t\t\t\t\t_NPCpage=0;\n\t\t\t\t\t_busy=false;\n\t\t\t\t\tcompletionCheck=false;\n\t\t\t\t\t_dialogueVisible=false;\n\t\t\t\t\tmoving.setInterrupted(false);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(moving.getName() == \"Strength\"){\n\t\t\t\t\t//SysOut.print(\"Chose not to use Strength!\");\n\t\t\t\t\t_NPCpage=0;\n\t\t\t\t\t_busy=false;\n\t\t\t\t\tcompletionCheck=false;\n\t\t\t\t\t_dialogueVisible=false;\n\t\t\t\t\tmoving.setInterrupted(false);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tif(hmTextVisible && _canSurf==1 && !textTimer.isRunning() && !_menuVisible && !_pcVisible && !_martMenuVisible){\n\t\t\t_busy=false;\n\t\t\tcompletionCheck=false;\n\t\t\thmTextVisible=false;\n\t\t\t_canSurf=0;\n\t\t\tthis.repaint();\n\t\t}\n\t\t\n\t\tif(_menuVisible && !getCurrentMenu().isVisible())\n\t\t\tthis.Start();\n\t\t\n\t\tif(_gbs.map.isVisible()){\n\t\t\t_gbs.map.B_Button();\n\t\t\t_busy=false;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(getCurrentMenu().isVisible()){\n\t\t\tif(_gbs.pbs.isVisible() || _gbs.ii.isVisible() || _gbs.ev.isVisible() || _gbs.map.isVisible() || _martMenuVisible){\n\t\t\t\tif(_gbs.pbs.isVisible())\n\t\t\t\t\t_gbs.pbs.B_Button();\n\t\t\t\tif(_gbs.ii.isVisible())\n\t\t\t\t\t_gbs.ii.B_Button();\n\t\t\t\tif(_gbs.ev.isVisible())\n\t\t\t\t\t_gbs.ev.B_Button();\n\t\t\t\tif(_martMenuVisible){\n\t\t\t\t\tif(buyMenu || sellMenu){\n\t\t\t\t\t\t_gbs.mart.B_Button();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tgetCurrentMenu().setVisible(false);\n\t\t\t}\n\t\t\tthis.repaint();\n\t\t}\n\t\t\n\t\tif(_pcVisible && !_menuTextVisible[0] && !_menuTextVisible[1]){\n\t\t\t//SysOut.print(\"PC IS VISIBLE\");\n\t\t\tif(!_bannerVisible && !_myCoursesVisible){\n\t\t\t\t_busy = false;\n\t\t\t\tcompletionCheck = false;\n\t\t\t\t_pcCursor.y = 173;\n\t\t\t\tthis.A_Button(); //Effectively moves the cursor to Quit and hits A button. Do this method.\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//if(_bannerVisible){\n\t\t\t\t\t_bannerVisible = false;\n\t\t\t\t\t_gbs.bannerScreen._depTextVisible = false;\n\t\t\t\t\t_gbs.bannerScreen._oneLeft = false;\n\t\t\t\t\t_gbs.bannerScreen._cursor.y = _gbs.bannerScreen._1st;\n\t\t\t\t\t_menuTextVisible[0] = false;\n\t\t\t\t//}\n\t\t\t\t//if(_myCoursesVisible){\n\t\t\t\t\t_myCoursesVisible = false;\n\t\t\t\t\t_gbs.pcBoxScreen._cursor.y = 8;\n\t\t\t\t\t_menuTextVisible[1] = false;\n\t\t\t\t\t_gbs.pcBoxScreen.warningDisplayed = false;\n\t\t\t\t//}\n\t\t\t}\n\t\t\tthis.repaint();\n\t\t}\n\t\t\n\t}",
"public synchronized double pay(Routine routine, Bicycle b, Bank_Card bank_card) throws Exception{\r\n\t\tif(!routine.getDestination().isState()){System.out.println(\"offline - out of order!\");throw new Exception(\"OFFLINE\");}\r\n\t\tdouble price = 0;\r\n\t\tif(routine.getDestination()==null || routine.getEnd()==null || routine.getSource()==null || routine.getStart()==null){System.out.println(\"no routine to pay\");} \r\n\t\tif(this.card == null){\r\n\t\t\tif(b instanceof Bicycle_Mech){price = routine.count_time(b);}\r\n\t\t\tif(b instanceof Bicycle_Elec){price = 2*routine.count_time(b);}\r\n\t\t}\r\n\t\tif(this.card != null){price = this.card.price(routine, b);}\r\n\t\tif(bank_card.getOwner().equals(this)){bank_card.check(price);bank_card.setMoney(bank_card.getMoney()-price);}\r\n\t\tif(!bank_card.getOwner().equals(this)){System.out.println(\"choose a right bank card\");}\r\n\t\treturn price;\r\n\t}",
"@Override\n public void execute() {\n // Use squared inputs\n // Might want to change that for competition\n m_driveTrain.arcadeDrive(m_throttle.getAsDouble(), m_turn.getAsDouble(), true);\n }",
"public void holdSeat() {\n String seatNo = this.getSeatNo();\n this.setStatus(Status.HOLD);\n this.setHold(true);\n //call the db or service to hold the seat\n }",
"@Override\n\tpublic void action() \n\t{\n\t\tif(this.user.arrivedToFinalStation())\n\t\t{\n\t\t\tthis.user.stablishDesiredVehicle();\n\t\t\tthis.user.stablishDesiredStation();\n\t\t}\n\t\t\n\t\t//printing info\n\t\tSystem.out.println(\"\\nI'm \" + this.user.getLocalName() + \": I'm on \" + this.user.getCurrentStation() + \" and I want to go to \" + this.user.desiredStation + \" by \" + this.user.desiredVehicle +\".\\n\");\n\t\t//this.mensaje=scanner.nextLine(); //debug\n\t\t\n\t\t//PetitionRequest\n\t\tSystem.out.println(\"I make a vehicle request to \" + this.user.getCurrentStation() + \": I'm on \" + this.user.getCurrentStation() + \" and I want to go to \" + this.user.desiredStation + \" by \" + this.user.desiredVehicle + \".\");\n\t\tthis.msgObject = new Capsule(null,this.user.getDesiredVehicle(),this.user.getDesiredStation(),null);\n\t\tUtils.enviarMensaje(myAgent, this.user.getCurrentStation(), this.msgObject, \"VEHICLE_REQUEST\");\n\t\t\n\t\t//Waiting for answer\n\t\tACLMessage msg=this.myAgent.blockingReceive(\n\t\t\t\tMessageTemplate.and(\n\t\t\t\t\t\tMessageTemplate.MatchPerformative(ACLMessage.REQUEST), \n\t\t\t\t\t\tMessageTemplate.MatchOntology(\"ontologia\"))\n\t\t\t\t);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tthis.comment = msg.getEnvelope().getComments();\n\t\t\tthis.msgObject = (Capsule) msg.getContentObject();\n\t\t\tSystem.out.println(\"\\t\" + this.user.getCurrentStation() + \" told me \" + this.comment + \". \");\n\t\t\t\n\t\t\tswitch(this.comment)\n\t\t\t{\n\t\t\tcase \"VEHICLE_DELIVERY\":\n\t\t\t\t//1. The station give to the user the vehicle normaly\n\t\t\t\tif(msgObject.getVehicle() != null) {\n\t\t\t\t\tthis.user.takeVehicle(msgObject.getVehicle());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//2. The user goes to the final station\n\t\t\t\tthis.notifyMonitor(\"moving\");\n\t\t\t\tthis.user.goToStation();\n\t\t\t\tthis.notifyMonitor(\"waiting\");\n\n\t\t\t\t//3. Leaves the vehicle on the final station\n\t\t\t\tif(this.user.hasVehicle())\n\t\t\t\t{\n\t\t\t\t\tthis.vehicleTemp = this.user.leaveVehicle();\n\t\t\t\t\tmsgObject = new Capsule(this.vehicleTemp,null, null, null);\n\t\t\t\t\tUtils.enviarMensaje(myAgent, this.user.getCurrentStation(), this.msgObject, \"VEHICLE_RETURN\");\n\t\t\t\t}\n\n\t\t\t\t//4. The user waits a bit\n\t\t\t\tthis.user.waitSomeTime(8000);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"UNSATISFACTORY_REQUEST\":\n\t\t\t\t// The station reports that the request couldn't be completed properly\n\t\t\t\t//1. The capsule can cointain: alternativeStation and alternativeVehicle\n\t\t\t\tif(msgObject.getStation() != null) {\t//checks if there's an alternative reserved station\n\t\t\t\t\tSystem.out.println(\"\\t\"+this.user.getCurrentStation() + \" told me that there's an alternative route -> \" + msgObject.getStation() + \". \");\n\t\t\t\t\tthis.user.stablishDestinationStation(msgObject.getStation());\n\t\t\t\t}\n\t\t\t\tif(msgObject.getVehicle() != null) { //checks if the station gave an alternative vehicle\n\t\t\t\t\tSystem.out.println(\"\\t\"+this.user.getCurrentStation() + \" gived to me an alternative vehicle -> \" + msgObject.getVehicle().getType() + \". \");\n\t\t\t\t\tthis.user.takeVehicle(msgObject.getVehicle());\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"\\tI have to go walking. \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//2. Moving to the destination station\n\t\t\t\tthis.notifyMonitor(\"moving\");\n\t\t\t\tthis.user.goToStation();\n\t\t\t\tthis.notifyMonitor(\"waiting\");\n\n\t\t\t\t//3. If has a vehicle, the user leaves it\n\t\t\t\tif(this.user.hasVehicle()) \n\t\t\t\t{\n\t\t\t\t\t//send the vehicle to the station\n\t\t\t\t\tthis.vehicleTemp = this.user.leaveVehicle();\n\t\t\t\t\tmsgObject = new Capsule(this.vehicleTemp,null, null, null);\n\t\t\t\t\tUtils.enviarMensaje(myAgent, this.user.getCurrentStation(), this.msgObject, \"VEHICLE_RETURN\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//4. the user waits before restarting the behavior\n\t\t\t\tthis.user.waitSomeTime(4000);\n\t\t\t}\n\t\t}\n\t\tcatch (UnreadableException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"protected void takeStep(Path.Step s, Main m) {\n if (map.hasObstacle(s.getX(), s.getY())) {\n // place bomb, move to safety\n player.placeBomb(map);\n }\n else { // move regularly\n if (!m.theMap.hasFire(s.getX(), s.getY())) {\n player.move(s.getX() - this.player.getX(), s.getY() - this.player.getY(), m);\n }\n }\n }",
"public void takeABus() {\n\t\tClientCom clientCom = new ClientCom(RunParameters.ArrivalQuayHostName, RunParameters.ArrivalQuayPort);\n\t\twhile (!clientCom.open()) {\n\t\t\tSystem.out.println(\"Arrival Quay not active yet, sleeping for 1 seccond\");\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t\t;\n\t\tPassenger passenger = (Passenger) Thread.currentThread();\n\t\tMessage pkt = new Message();\n\t\tpkt.setType(MessageType.PASSENGERS_WAITING);\n\t\tpkt.setId(passenger.getPassengerId());\n\n\t\tclientCom.writeObject(pkt);\n\t\tpkt = (Message) clientCom.readObject();\n\n\t\tpassenger.setCurrentState(pkt.getState());\n\t\tclientCom.close();\n\t}",
"public void washAndPark(Vehicle v) { \t\n \twash.washVehicle(v);\n \tparkVehicle(v);\n }",
"public static void simulate (\r\n double maxtime,\r\n double arrival_rate,\r\n double service_rate0,\r\n double service_rate1,\r\n double service_rate2, \r\n double service_rate3_1,\r\n double service_rate3_2,\r\n double service_rate3_3,\r\n double p1,double p2,double p3,int k, double p01, double p02, double p3out, double p31, double p32)\r\n {\n StateB sysB = new StateB();\r\n \r\n double time= 0;\r\n double value2= ExpB.getExp(arrival_rate);\r\n\r\n EventB e1 = new EventB(time+value2,\"Birth\",\"Null\");\r\n EventB e2= new EventB(time+value2,\"Moniter\",\"Null\");\r\n Schedule.add(e1);\r\n Schedule.add(e2);\r\n \r\n while(time < maxtime){\r\n EventB next = Schedule.remove();\r\n time= next.time;\r\n next.function(maxtime,arrival_rate,service_rate0,service_rate1,service_rate2, service_rate3_1,\r\n service_rate3_2,service_rate3_3,p1,p2,p3,k,p01,p02,p3out,p31,p32,sysB);\r\n \r\n \r\n \r\n\r\n }\r\n // System.out.println(Double.toString(sysB.t_busy_time0) );\r\n // System.out.println(Double.toString(sysB.t_busy_time1) );\r\n // System.out.println(Double.toString(sysB.Qlength0) );\r\n // System.out.println(Double.toString(sysB.Qlength1) );\r\n // System.out.println(Double.toString(sysB.monitering_event) );\r\n // System.out.println(Double.toString(sysB.num_drop) );\r\n // System.out.println(Double.toString(sysB.completed_request) );\r\n // System.out.println(Double.toString(sysB.t_response_time) );\r\n\r\n System.out.println();\r\n double util0 = sysB.t_busy_time0 / maxtime;\r\n System.out.println(\"S0 UTIL:\"+ \" \" + Double.toString(util0) );\r\n double qlen0 = sysB.Qlength0/ sysB.monitering_event;\r\n System.out.println(\"S0 QLEN:\"+\" \"+ Double.toString(qlen0) );\r\n double Tresp0 = sysB.t_response_time0/sysB.completed_request0;\r\n System.out.println(\"S0 TRESP:\" + \" \"+ Double.toString(Tresp0) );\r\n \r\n System.out.println();\r\n \r\n double util11 = sysB.t_busy_time11/ maxtime;\r\n System.out.println(\"S1,1 UTIL:\"+ \" \" + Double.toString(util11) );\r\n double util12 = sysB.t_busy_time12/ maxtime;\r\n System.out.println(\"S1,2 UTIL:\"+ \" \" + Double.toString(util12) );\r\n double qlen11 = sysB.Qlength1/ sysB.monitering_event;\r\n System.out.println(\"S1 QLEN:\"+\" \"+ Double.toString(qlen11) );\r\n double Tresp11 = sysB.t_response_time1/ sysB.completed_request1;\r\n System.out.println(\"S1 TRESP:\" + \" \"+ Double.toString(Tresp11) );\r\n \r\n \r\n // System.out.println();\r\n // double util12 = sysB.t_busy_time12/ maxtime;\r\n // System.out.println(\"S1,2 UTIL:\"+ \" \" + Double.toString(util12) );\r\n // double qlen12 = sysB.Qlength1/ sysB.monitering_event;\r\n // System.out.println(\"S1,2 QLEN:\"+\" \"+ Double.toString(qlen12) );\r\n // double Tresp12 = sysB.t_response_time12/sysB.completed_request12;\r\n // System.out.println(\"S1,2 TRESP:\" + \" \"+ Double.toString(Tresp12) );\r\n\r\n System.out.println();\r\n double util2 = sysB.t_busy_time2/ maxtime;\r\n System.out.println(\"S2 UTIL:\"+ \" \" + Double.toString(util2) );\r\n double qlen2 = sysB.Qlength2/ sysB.monitering_event;\r\n System.out.println(\"S2 QLEN:\"+\" \"+ Double.toString(qlen2) );\r\n double Tresp2 = sysB.t_response_time2/sysB.completed_request2;\r\n System.out.println(\"S2 TRESP:\" + \" \"+ Double.toString(Tresp2) );\r\n System.out.println(\"S2 DROPPED:\" + \" \"+ Integer.toString(sysB.num_drop));\r\n\r\n System.out.println();\r\n double util3 = sysB.t_busy_time3/ maxtime;\r\n System.out.println(\"S3 UTIL:\"+ \" \" + Double.toString(util3) );\r\n double qlen3 = sysB.Qlength3/ sysB.monitering_event;\r\n System.out.println(\"S3 QLEN:\"+\" \"+ Double.toString(qlen3) );\r\n double Tresp3 = sysB.t_response_time3/sysB.completed_request3;\r\n System.out.println(\"S3 TRESP:\" + \" \"+ Double.toString(Tresp3) );\r\n\r\n \r\n\r\n System.out.println();\r\n\r\n double qtotal = (sysB.Qlength0 + sysB.Qlength1 + sysB.Qlength2+sysB.Qlength3) / sysB.monitering_event;\r\n System.out.println(\"QTOT:\"+\" \"+ Double.toString(qtotal) );\r\n // double Totalresp= sysB.t_response_time0 + sysB.t_response_time2 +sysB.t_response_time11 +sysB.t_response_time12 + sysB.t_response_time3;\r\n \r\n double total = sysB.t_response_timefinal/sysB.completed_system;\r\n \r\n System.out.println(\"TRESP:\"+ \" \" + Double.toString(total));\r\n // System.out.println(sysB.Qlength1);\r\n // System.out.println(sysB.Qlength2);\r\n // System.out.println(sysB.Qlength3);\r\n // System.out.println(sysB.Qlength0);\r\n \r\n // System.out.println(\"TRESP:\"+ \" \" + Double.toString(TTRESP));\r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n }",
"public void bake() {\n System.out.println(\"Baking for 25 min at 350\");\n }",
"public void standBJ() {\n\t\tif (blackjack.isOkBet()) {\n\t\t\t((BlackjackView) manager.getPanel(Constants.BJ_VIEW_NAME)).standAction();\n\n\t\t\twhile (blackjack.getCount(2, false, 17)) {\n\t\t\t\t((BlackjackView) manager.getPanel(Constants.BJ_VIEW_NAME)).addCard(blackjack.giveCard(2), 2);\n\t\t\t}\n\n\t\t\tif (blackjack.getCount(2, true, 21)) {\n\t\t\t\tJOptionPane.showMessageDialog(((BlackjackView) manager.getPanel(Constants.BJ_VIEW_NAME)), \"You win!\",\n\t\t\t\t\t\t\"DEALER BUSTS\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\tblackjack.stand(true);\n\t\t\t} else {\n\t\t\t\tif (blackjack.getCount(1, true, blackjack.getCardCount(2))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(((BlackjackView) manager.getPanel(Constants.BJ_VIEW_NAME)),\n\t\t\t\t\t\t\t\"You win!\", \"YOU WIN\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\tblackjack.stand(true);\n\t\t\t\t} else if (blackjack.getCount(1, false, blackjack.getCardCount(2))) {\n\t\t\t\t\tJOptionPane.showMessageDialog(((BlackjackView) manager.getPanel(Constants.BJ_VIEW_NAME)),\n\t\t\t\t\t\t\t\"You lose!\", \"YOU LOSE\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\tblackjack.stand(false);\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(((BlackjackView) manager.getPanel(Constants.BJ_VIEW_NAME)),\n\t\t\t\t\t\t\t\"You push.\", \"PUSH\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresetBJTable();\n\t\t} else\n\t\t\tJOptionPane.showMessageDialog(manager.getPanel(Constants.BJ_VIEW_NAME), \"You must bet something\", \"ERROR\",\n\t\t\t\t\tJOptionPane.PLAIN_MESSAGE);\n\t}",
"public void execute(){\n drivetrain.tankDrive(0.6 * direction, 0.6 * direction);\n // slower than full speed so that we actually bring down the bridge,\n // not just slam it and push balls the wrong way\n }",
"public void grabStone() {\n }",
"public void takeSomething()\r\n {\r\n \tThing item = room.getRandomThing();\r\n \tif (item != null)\r\n \t\ttake(item);\r\n }",
"private void placeKitOnStand(MyKit mk) //MultiTask\n\t{\n\t\tif(myStand.getAvailableSlotNum() == 1){\n\t\t\tmk.kit.setPosition(KitPosition.POSITION1);\n\t\t}\n\t\telse if(myStand.getAvailableSlotNum() == 2){\n\t\t\tmk.kit.setPosition(KitPosition.POSITION2);\n\t\t}\n\t\tmk.slot = myStand.getAvailableSlotNum();\n\t\tprint(\"Kit Slot number : \"+mk.slot+\" is Taken\");\n\t\tmyStand.setSlotTaken(myStand.getAvailableSlotNum());\n\t\tif(guiEnable){\n\t\t\tmk.status = KitStatus.Being_Animated;\n\t\t\tthis.KitStationGUI.doCreateAKit(mk.kit);\n\t\t\ttry {\n\t\t\t\t//guiControl = new Semaphore(0,true);//TODO: take away after gui fixes it\n\t\t\t\tthis.guiControl.acquireUninterruptibly();\n\t\t\t\tprint(\"done with boxbelt\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t//e.printStackTrace();\n\t\t\t}\n\t\t\tthis.kitRobotGUI.DoMoveKitToStand(mk.kit.guikit , mk.kit.position);\n\t\t\ttry {\n\t\t\t\t//guiControl = new Semaphore(0,true);//TODO: take away after gui fixes it\n\t\t\t\tthis.guiControl.acquireUninterruptibly();\n\t\t\t\tprint(\"done with kit robot\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t//e.printStackTrace();\n\t\t\t}\n\t\t}else{\n\t\t\tprint(\"GUI Creating kit. Finished Cearting Kit. Telling Agent.\");\n\t\t\tprint(\"GUI Moving Kit To Stand. Finished moving. Telling Agent.\");\n\t\t}\n\t\tmk.status = KitStatus.On_KitStand;\n\t\tkitStand.msgHereIsNextAgentKit(mk.kit);\n\t\tstateChanged();\n\t}",
"protected void execute() \n {\n if(Robot.isClimbEnabled)\n if(Math.abs(Robot.oi.driverJoystick.getLeftStickRaw_Y())>0.1) //we only want to drive fwd, never reverse\n Robot.monkeyBarIntakeWheels.driveIntakeAll((Math.abs(Robot.oi.driverJoystick.getLeftStickRaw_Y()+.2)) + 0.15);\n else\n Robot.monkeyBarIntakeWheels.driveIntakeAll(0.07); //always drive wheels in climb mode\n else\n Robot.monkeyBarIntakeWheels.driveIntakeAll(0.6*Robot.oi.getMonkeyBarIntakeJoystickValue());\n }",
"static void perform_sbb(String passed){\n\t\tint type = type_of_sbb(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tsbb_with_reg(passed);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tsbb_with_mem(passed);\n\t\t\tbreak;\n\t\t}\n\t}",
"void think() {\n //get the output of the neural network\n decision = brain.output(vision);\n\n if (decision[0] > 0.8) {//output 0 is boosting\n boosting = true;\n } else {\n boosting = false;\n }\n if (decision[1] > 0.8) {//output 1 is turn left\n spin = -0.08f;\n } else {//cant turn right and left at the same time\n if (decision[2] > 0.8) {//output 2 is turn right\n spin = 0.08f;\n } else {//if neither then dont turn\n spin = 0;\n }\n }\n //shooting\n if (decision[3] > 0.8) {//output 3 is shooting\n shoot();\n }\n }",
"public void take(Thread usedBy)\n\t{\n\t\tthis.usedBy = usedBy;\n\t\t// System.out.println(usedBy.getName() + \": Taking \" + toString());\n\t}",
"public void bookFlight(){\n //Steps\n //1 Show the available flights. (at least one seat with 0)\n //2 User select a flight, and the system automatically set the seat with his id. he is not able to select the seat\n //3 User confirm the reservation \n //4 Flight reserved\n \n //1\n //FlightRepository.availableFlights();\n //Scanner input = new Scanner(System.in);\n //String flightNumber = input.nextLine();\n \n //2,3 and 4\n Flight flightObject = FlightRepository.getFlight(this.number);\n if (flightObject == null){\n System.out.println(\"Please select a valid flight number\");\n }\n flightObject.setPassengerSeat(this.PassengerID);\n }",
"public BikeStand balance(BikeStand bikeStand) {\n //keep adding bikes to the stand until the stand is half full\n while(bikeStand.getBikes().size() < (0.5 * bikeStand.getStandCapacity())) {\n if(!bikesLoaded.isEmpty())\n bikeStand.getBikes().add(bikesLoaded.remove(0));\n }\n\n //keep removing bikes from the stand until the bike stand is half empty\n while(bikeStand.getBikes().size() > (0.5 * bikeStand.getStandCapacity())) {\n if(bikesLoaded.size() < TRUCK_CAPACITY) {\n bikesLoaded.add(bikeStand.getBikes().remove(0));\n }\n\n }\n try {\n wait(25);\n }catch (InterruptedException e) {\n e.printStackTrace();\n }\n return bikeStand;\n }",
"private void SpinActionPerformed(ActionEvent evt) {\n\t\t//player has to bet before spinning the reels\n\t\tif (obj.getBet() > 0) {\n\t\t\tisSpining = true;\n\t\t\tnew SlotMachineController().startSpining();\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"You should bet first.\");\n\t\t}\n\t}",
"public void xboxIntakeOuttake()\n {\n //Whether or not we are intaking from the bottom or front. If from front, value is negative.\n double intakeDirection = 1.0;\n if (RobotMap.assistantDriverController.getBumper(Hand.kRight))\n intakeDirection = -1.0;\n\n //Spins the motors when the button is pressed. THIS IS ONLY RUN ONCE UNTIL THE BUTTON IS RELEASED AND PRESSED AGAIN\n if (RobotMap.assistantDriverController.getXButtonPressed())\n {\n spinIntake( RobotMap.manipulatorSpeedModifier * intakeDirection); //Spin the intake\n RobotMap.ballInIntake = !RobotMap.ballInIntake;\n }\n //Only stop the motors when the button is released\n else if (RobotMap.assistantDriverController.getXButtonReleased())\n {\n spinIntake(RobotMap.MOTOR_FULL_STOP); //Stop the intake from spinning\n RobotMap.manipulatorSpeedModifier = RobotMap.MANIPULATOR_SLOW_SPEED;\n }\n else if (!RobotMap.ballIntakeStopSwitch.get() && RobotMap.ballInIntake)\n {\n System.out.println(\"stop\");\n spinIntake(RobotMap.MOTOR_FULL_STOP); //Stop the intake from spinning when the ball is inside\n RobotMap.manipulatorSpeedModifier = RobotMap.MOTOR_FULL_SPEED;\n }\n }",
"@Override\n\tpublic void transferBalnace() {\n\t\tSystem.out.println(\"balance is transferd\");\n\t}",
"@Override\n public boolean strikeFirst(Battle b, ActivePokemon striker) {\n return RandomUtils.chanceTest(20);\n }",
"private void notifyStakeholder(){\n }",
"@Override\r\n\tpublic ObjectList<CarControl> drive(State<CarRpmState, CarControl> state) {\n\t\tdouble steer = state.state.getAngleToTrackAxis()/SimpleDriver.steerLock;\r\n//\t\tdouble speed = state.state.getSpeed();\t\t\r\n\t\tObjectList<CarControl> ol = new ObjectArrayList<CarControl>();\t\t\r\n\r\n\t\t/*if (state.state.getSpeed()>=296.8 || state.state.gear==6){\r\n\t\t\tfor (int i =0;i<1;++i){\r\n\t\t\t\tCarControl cc = new CarControl(1.0d,0,6,steer,0);\r\n\t\t\t\tol.add(cc);\r\n\t\t\t}\r\n\t\t} else if (state.state.getSpeed()>=225 || state.state.gear==5){\r\n\t\t\tfor (int i =0;i<1;++i){\r\n\t\t\t\tCarControl cc = new CarControl(1.0d,0,5,steer,0);\r\n\t\t\t\tol.add(cc);\r\n\t\t\t}\r\n\t\t} else if (state.state.getSpeed()>=176 || state.state.gear==4){\r\n\t\t\tfor (int i =0;i<1;++i){\r\n\t\t\t\tCarControl cc = new CarControl(1.0d,0,4,steer,0);\r\n\t\t\t\tol.add(cc);\r\n\t\t\t}\r\n\t\t} else if (state.state.getSpeed()>=126 || state.state.gear==3){\r\n\t\t\tfor (int i =0;i<1;++i){\r\n\t\t\t\tCarControl cc = new CarControl(1.0d,0,3,steer,0);\r\n\t\t\t\tol.add(cc);\r\n\t\t\t}\r\n\t\t} else if (state.state.getSpeed()>=83){\r\n\t\t\tfor (int i =0;i<1;++i){\r\n\t\t\t\tCarControl cc = new CarControl(1.0d,0,2,steer,0);\r\n\t\t\t\tol.add(cc);\r\n\t\t\t}\r\n\t\t} else \t{\r\n\t\t\tCarControl cc = new CarControl(1.0d,0,1,steer,0);\r\n\t\t\tol.add(cc);\r\n\t\t}//*/\r\n//\t\tif (speed>225){\r\n//\t\t\tCarControl cc = new CarControl(0,1,4,steer,0);\r\n//\t\t\tol.add(cc);\r\n//\t\t} else if (speed>126){\r\n//\t\t\tCarControl cc = new CarControl(0,0.569,3,steer,0);\r\n//\t\t\tol.add(cc);\r\n//\t\t} else if (speed>83){\r\n//\t\t\tCarControl cc = new CarControl(0,0.363,2,steer,0);\r\n//\t\t\tol.add(cc);\r\n//\t\t} else {\r\n//\t\t\tCarControl cc = new CarControl(0,0.36,1,steer,0);\r\n//\t\t\tol.add(cc);\r\n//\t\t}\r\n//\t\tif (speed<226.541 && speed>200){\r\n//\t\t\tol.clear();\r\n//\t\t\tCarControl cc = new CarControl(0,0.6,4,steer,0);\r\n//\t\t\tol.add(cc);\r\n//\t\t}\r\n\t\t//}//*/ \r\n\t\t/*if (speed<3*3.6){\r\n\t\t\tCarControl cc = new CarControl(0,1.0d,0,steer,0);\r\n\t\t\tol.add(cc);\r\n\t\t\tbrake = 1;\r\n\t\t\treturn ol;\r\n\t\t}\r\n\t\tdouble[] wheelVel = state.state.getWheelSpinVel();\r\n\t\t// convert speed to m/s\r\n\t\t\t\t\r\n\t\t// when spedd lower than min speed for abs do nothing\t\t\r\n\r\n\t\t// compute the speed of wheels in m/s\r\n\t\tdouble slip = 0.0d;\t \r\n\t\tfor (int i = 0; i < 4; i++)\t{\r\n\t\t\tslip += wheelVel[i] * SimpleDriver.wheelRadius[i]/speed;\t\t\t\r\n\t\t}\r\n\t\tslip/=4;\t\t\t\r\n\t\tif (slip==0){\r\n\t\t\tbrake = 0.25;\r\n\t\t} if (slip < 0.1) \r\n\t\t\tbrake = 0.4+slip;\r\n\t\telse brake=1;\r\n\t\tif (brake<=0.09) brake=1;\r\n\t\tbrake = Math.min(1.0, brake);\r\n\t\tSystem.out.println(slip+\" \"+brake);\r\n\t\tCarControl cc = new CarControl(0,brake,0,steer,0);\r\n\t\tol.add(cc);//*/\r\n\t\tCarControl cc = new CarControl(0,1.0d,0,steer,0);\r\n\t\tol.add(cc);\r\n\t\treturn ol;\r\n\t}",
"public Card chooseCard(Hand h, Trick t);",
"public boolean isPossibleTransit(State s, Action a) {\r\n//\t\tint newWorkloadLevel = s.getWorkload() + a.getChangedWorkload();\r\n\t\tint maxBatteryLevel = getNextBatteryLevel(s, a);\r\n\t\tint maxActionLevel = s.getWorkload();\r\n\r\n\t if((a.getChangedWorkload() <= maxActionLevel) && (a.getBatteryUsed() <= maxBatteryLevel))\r\n\t {\r\n\t\treturn true;\r\n\t }\r\n\t else { \r\n\t \treturn false;\r\n\t }\r\n\t}",
"public abstract double pay(BikesType type, double rideDuration);",
"public void operateTheBoatForAmountOfTime(double time){// pass 1 as a time\n\t\t if(time > 0.0 && time <= 5.0 ){\n \tdouble fuelUsage = EfficiencyOfTheBoatMotor*currentSpeedOfTheBoat*currentSpeedOfTheBoat*time;\n \tfuelUsage = fuelUsage/10000;//since we have hp, and miles we have to divide by 10000 to get result in gallons \n double realTime; \n // Determine if we run out of fuel\n\t if(fuelUsage > amountOfFuelInTheTank){ \n\t realTime = time * (amountOfFuelInTheTank/fuelUsage); \n\t amountOfFuelInTheTank=0.0 ;\n\t }else{\n\t \tamountOfFuelInTheTank-=fuelUsage; \n\t realTime = time;\n\t }\n\t DistanceTraveled +=currentSpeedOfTheBoat * realTime; \n\t }\n\t }",
"protected void execute() {\r\n\r\n double tempInches = Robot.driveTrain.getRangeInches();\r\n if(tempInches<0)\r\n {\r\n Robot.driveTrain.stop();\r\n return;\r\n }\r\n\r\n if (tempInches > Preferences.ultraStopDistance) {\r\n if (Preferences.tankDriveMode) {\r\n Robot.driveTrain.tankDrive(Robot.oi.getDriverLeft().getY(), Robot.oi.getDriverRight().getY());\r\n } else {\r\n Robot.driveTrain.arcadeDrive(Robot.oi.getDriverLeft().getY(), Robot.oi.getDriverRight().getX());\r\n }\r\n } else if(complete == false) {\r\n if(Robot.driveTrain.autoTurnToAngle(0)){\r\n complete = true;\r\n Robot.driveTrain.setDirection();\r\n Robot.driveTrain.resetEncoders();\r\n }\r\n }\r\n\r\n if (complete) {\r\n //Robot.driveTrain.autoTurnToAngle(0);\r\n Robot.driveTrain.autoDriveStraight(tempInches - Preferences.ultraStopDistance);\r\n }\r\n\r\n }",
"public synchronized int take(){\n while(!isPut){\n try {\n wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n System.out.println(\"Took from a ground \" + n);\n isPut = false;\n notify();\n return n;\n }",
"private void step ()\n {\n // a car arrives approximately every four minutes\n int chance = randGen.nextInt(CarWashApplication.CHANCE_INT);\n if (chance == 0)\n {\n waitingLine.enqueue(new Car(currentTime));\n numCars++;\n\n /** For printed output of each step */\n //System.out.println(currentTime);\n //waitingLine.toPrint();\n }\n\n // process the waiting cars\n if (bay.isEmpty() && !waitingLine.isEmpty())\n {\n bay.startWash();\n Car car = (Car) waitingLine.dequeue();\n waitTimeArray[arrayIndex] = currentTime - (car.arrivalTime());\n arrayIndex++;\n }\n\n if (!bay.isEmpty())\n bay.keepWashing();\n\n currentTime++;\n }",
"@Override\n protected void execute() {\n switch (Intake.intakeState) {\n case 2:\n Robot.intake.setCargoIntakeOutput(RobotMap.CARGO_INTAKE_SPEED);\n break;\n case 1:\n Robot.intake.setHatchGroundIntakeOutput(RobotMap.HATCH_GROUND_INTAKE_SPEED);\n break;\n case 0:\n default:\n //Robot.intake.setHarpoonExtend(true);\n Robot.intake.setHatchIntakeOutput(RobotMap.HATCH_INTAKE_SPEED);\n //Robot.intake.setHarpoonSecure(false);\n //Timer.delay(0.2);\n //Robot.intake.setHarpoonSecure(true);\n break;\n }\n }",
"public void giveAndTake(Player a){\n\t\tString type = typetoString();\r\n\t\tint totalDice = a.getDice1() + a.getDice2(), purpleRent = owner.numPurple(), lightGreenRent = owner.numLightGreen(), violetRent = owner.numViolet(), orangeRent = owner.numOrange(), redRent = owner.numRed(), yellowRent = owner.numYellow(), darkGreenRent = owner.numDarkGreen(), darkBlueRent = owner.numDarkBlue(), utilitiesRent = owner.numUtilities(), railRent = owner.numRails(), modRent = 0;\r\n\t\tif(type.equals(\"PURPLE\")){\r\n\t\t\tif(purpleRent == 1){\r\n\t\t\t\tmodRent = rent;\r\n\t\t\t}else if(purpleRent == 2){\r\n\t\t\t\t\tmodRent = (rent * 2) + houseRent;\r\n\t\t\t\t\t\tif(numHouses == -1)\r\n\t\t\t\t\t\t\tmodRent = rent * 2;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tmodRent = (houses[numHouses].getRent());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(type.equals(\"LIGHTGREEN\")){\r\n\t\t\tif(lightGreenRent == 1 || lightGreenRent == 2){\r\n\t\t\t\tmodRent = rent;\r\n\t\t\t}else if(lightGreenRent == 3){\r\n\t\t\t\t\tmodRent = (rent * 2) + houseRent;\r\n\t\t\t\t\t\tif(numHouses == -1)\r\n\t\t\t\t\t\t\tmodRent = rent * 2;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tmodRent = (houses[numHouses].getRent());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(type.equals(\"VIOLET\")){\r\n\t\t\tif(violetRent == 1 || violetRent == 2){\r\n\t\t\t\tmodRent = rent;\r\n\t\t\t}else if(violetRent == 3){\r\n\t\t\t\t\tmodRent = (rent * 2) + houseRent;\r\n\t\t\t\t\t\tif(numHouses == -1)\r\n\t\t\t\t\t\t\tmodRent = rent * 2;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tmodRent = (houses[numHouses].getRent());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(type.equals(\"ORANGE\")){\r\n\t\t\tif(orangeRent == 1 || orangeRent == 2){\r\n\t\t\t\tmodRent = rent;\r\n\t\t\t}else if(orangeRent == 3){\r\n\t\t\t\t\tmodRent = (rent * 2) + houseRent;\r\n\t\t\t\t\t\tif(numHouses == -1)\r\n\t\t\t\t\t\t\tmodRent = rent * 2;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tmodRent = (houses[numHouses].getRent());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(type.equals(\"RED\")){\r\n\t\t\tif(redRent == 1 || redRent == 2){\r\n\t\t\t\tmodRent = rent;\r\n\t\t\t}else if(redRent == 3){\r\n\t\t\t\t\tmodRent = (rent * 2) + houseRent;\r\n\t\t\t\t\t\tif(numHouses == -1)\r\n\t\t\t\t\t\t\tmodRent = rent * 2;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tmodRent = (houses[numHouses].getRent());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(type.equals(\"YELLOW\")){\r\n\t\t\tif(yellowRent == 1 || yellowRent == 2){\r\n\t\t\t\tmodRent = rent;\r\n\t\t\t}else if(yellowRent == 3){\r\n\t\t\t\t\r\n\t\t\t\t\tmodRent = (rent * 2) + houseRent;\r\n\t\t\t\t\r\n\t\t\t\t\t\tif(numHouses == -1)\r\n\t\t\t\t\t\t\tmodRent = rent * 2;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tmodRent = (houses[numHouses].getRent());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(type.equals(\"DARKGREEN\")){\r\n\t\t\tif(darkGreenRent == 1 || darkGreenRent == 2){\r\n\t\t\t\tmodRent = rent;\r\n\t\t\t}else if(darkGreenRent == 3){\r\n\t\t\t\t\tmodRent = (rent * 2) + houseRent;\r\n\t\t\t\t\t\tif(numHouses == -1)\r\n\t\t\t\t\t\t\tmodRent = rent * 2;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tmodRent = (houses[numHouses].getRent());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(type.equals(\"DARKBLUE\")){\r\n\t\t\tif(darkBlueRent == 1){\r\n\t\t\t\tmodRent = rent;\r\n\t\t\t}else if(darkBlueRent == 2){\r\n\t\t\t\t\tmodRent = (rent * 2) + houseRent;\r\n\t\t\t\t\t\tif(numHouses == -1)\r\n\t\t\t\t\t\t\tmodRent = rent * 2;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tmodRent = (houses[numHouses].getRent());\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(type.equals(\"UTILITIES\")){\r\n\t\t\tif(utilitiesRent == 1){\r\n\t\t\t\tmodRent = 4 * totalDice;\r\n\t\t\t}else if(utilitiesRent == 2){\r\n\t\t\t\tmodRent = 10 * totalDice;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(type.equals(\"RAILROAD\")){\r\n\t\t\tif(railRent == 1){\r\n\t\t\t\tmodRent = rent;\r\n\t\t\t}else if(railRent == 2){\r\n\t\t\t\tmodRent = rent * 2;\r\n\t\t\t}else if(railRent == 3){\r\n\t\t\t\tmodRent = rent * 4;\r\n\t\t\t}else if(railRent == 4){\r\n\t\t\t\tmodRent = rent * 8;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(a.returnName()+\" has paid $\"+modRent+\" to \"+owner.returnName());\r\n\t\ta.subtractMoney(modRent);\r\n\t\towner.addMoney(modRent);\r\n\t}",
"public Intake (Motor intake) {\n this.intake = intake;\n }",
"public void run(double time) {\n\t\tboolean canGo = true;\n\t\tVehicle car = DataFactory.makeCar(this.direction);\n\t\tfor (Vehicle c : firstRoad.getCars()) {\n\t\t\tif (c.getfrontPosition() <= c.getlength() + c.getbrakeDistance())\n\t\t\t\tcanGo = false;\n\t\t}\n\t\tif (canGo == true) {\n\t\t\tfirstRoad.accept(car, 0);\n\t\t\ttimeserver.enqueue(timeserver.currentTime(), (Agent) car);\n\t\t}\n\t\ttimeserver.enqueue(timeserver.currentTime() + carCreationInterval, this);\n\t}",
"void sell(Bird b){\n System.out.println(\"inside bird sell\");\n\n }",
"public abstract Bid chooseOpeningBid();",
"@Override\n public void execute() {\n ballCount = conveyor.getBallCount();\n SmartDashboard.putNumber(\"Ball Count\", conveyor.getBallCount());\n if(ballCount == 4){\n complete = true;\n conveyor.setDone(complete);\n } else {\n complete = false;\n conveyor.setDone(complete);\n }\n SmartDashboard.putBoolean(\"Intake Complete?\", complete);\n \n //conveyor.rightWithSensor();\n if(ballCount == 0){ // right one\n conveyor.engageConveyor(false, 0.5);\n } else if(ballCount == 1) { // left one\n conveyor.engageConveyor(true, 0.5);\n stage2 = false;\n } else if(ballCount == 2 && !stage2){\n //System.out.println(\"Moving balls up\");\n conveyor.conveyorFeedTime();\n if(conveyor.doneBoolean()){\n //System.out.println(\"Ready for 3rd and 4th balls\");\n stage2 = true;\n }\n } else if(stage2 && ballCount == 2) {\n //System.out.println(\"3rd\");\n conveyor.engageConveyor(false, 0.375);\n } else if(ballCount == 3){\n conveyor.engageConveyor(true, 0.375);\n } else {\n conveyor.setConveyorMotors(0, 0, 0, 0);\n }\n \n }",
"public void betBJ(boolean guest) {\n\t\tdouble bet = ((BlackjackView) manager.getPanel(Constants.BJ_VIEW_NAME)).getBet();\n\t\tif (!blackjack.isOkBet() && blackjack.canBet(bet)) {\n\n\t\t\tblackjack.setOkBet(true);\n\t\t\tif (guest) {\n\t\t\t\tblackjack.addBet(bet);\n\t\t\t\tstartBJ();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tBet aposta = new Bet(bet, \"blackJack\");\n\t\t\ttry {\n\t\t\t\tmanager.getServer().enviarTrama(new Betting(aposta));\n\t\t\t\tSegment s = manager.getServer().obtenirTrama();\n\t\t\t\tif (!((Check) s).isOk())\n\t\t\t\t\tnew Dialeg().setWarningText(\"Bet refused\");\n\t\t\t\telse {\n\t\t\t\t\tnew Dialeg().setWarningText(\"Bet accepted\");\n\t\t\t\t\tblackjack.addBet(bet);\n\t\t\t\t\t((BlackjackView)manager.getPanel(Constants.BJ_VIEW_NAME)).updateCash(bet);\n\t\t\t\t\tstartBJ();\n\t\t\t\t}\n\t\t\t} catch (IOException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog((BlackjackView) manager.getPanel(Constants.BJ_VIEW_NAME),\n\t\t\t\t\t\"There has been an error with the bet:\\n The minimum bet is 10, or\\n You have not enough funds\",\n\t\t\t\t\t\"ERROR\", JOptionPane.PLAIN_MESSAGE);\n\t\t}\n\t}",
"protected void execute() \n {\n //System.out.print(sharedSensors.getAverageFilteredUltrasonic());\n //if (oi.getDriveMove() + oi.getDriveRotate() > 0) {\n if (DriverStation.getInstance().getBatteryVoltage() > 8) {\n drive.arcadeDrive(oi.getDriveMove(), oi.getDriveRotate(),true, oi.getUnrestrictedDrive(), false);\n } else {\n drive.arcadeDrive(oi.getDriveMove(), oi.getDriveRotate(),true, oi.getUnrestrictedDrive(), true);\n }\n //DriverStationLCD.getInstance().println(DriverStationLCD.Line.kUser6, 1,\"\"+oi.leftTrig2.get()+\" \"+oi.rightTrig2.get());\n //}\n // System.out.println(\"drive left:\" + drive.leftMotorSpeed);\n // System.out.println(\"drive right:\" + drive.rightMotorSpeed);\n // System.out.println(\"Ultrasonic Average:\" + sharedSensors.getAverageUltrasonicDistance());\n // System.out.println(\"Ultrasonic left:\" + sharedSensors.getLeftUltrasonicDistance());\n // System.out.println(\"Ultrasonic right:\" + sharedSensors.getRightUltrasonicDistance());\n }",
"public boolean buyCard(Supply s) {\r\n\t\tboolean wasBought;\r\n\t\tif(s.getQuantity() < 1 || contraband.contains(s.getTopCard())) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tCard c = s.getTopCard();\r\n\t\tbuying = true;\r\n\t\tbought.add(c);\r\n\t\tif(buys > 0 && treasure - c.getCost() >= 0 && c.canBeGained()\r\n\t\t\t\t&& (!c.costsPotion() || potion > 0)) {\r\n\t\t\ttreasure -= c.getCost();\r\n\t\t\tif(c.costsPotion()) potion--;\r\n\t\t\tbuys--;\r\n\t\t\ts.takeCard();\r\n\t\t\tdeck.gain(c);\r\n\t\t\tfor(int i = 0; i < s.getEmbargo(); i++) {\r\n\t\t\t\tbuying = false;\r\n\t\t\t\tdeck.gain(access.board.getCurse().takeCard());\r\n\t\t\t\tbuying = true;\r\n\t\t\t}\r\n\t\t\taccess.gamePhase = 2;\r\n\t\t\twasBought = true;\r\n\t\t\taccess.log(getPlayerName() + \" bought \" + c.getName());\r\n\t\t}\r\n\t\telse {\r\n\t\t\twasBought = false;\r\n\t\t\tbought.remove(bought.size() - 1);\r\n\t\t}\r\n\t\tif(buys < 1) {\r\n\t\t\taccess.gamePhase = 3;\r\n\t\t}\r\n\t\tbuying = false;\r\n\t\tnotifyObservers();\r\n\t\treturn wasBought;\r\n\t}",
"int payInTurbo(String turboCardNo, float turboAmount, String destinationTurboOfCourse, String installmentsButInTurbo);",
"@Override\n\tpublic void goToStings() {\n\t\t\n\t}",
"protected void execute() {\n \tdrivemotors.tankDrive(leftMotor,rightMotor);\n }",
"public RunShoulder(Climber climber, DoubleSupplier climb) {\n this.climber = climber;\n this.climb = climb; // init climber \n }",
"void parkingMethod(){\n nearingTheCrater();\n parkingTheArm();\n }",
"private void sleep() {\n\t\ttargetFlower = null;\n\t\tif(startForaging()) {\n\t\t\t// add food to bee's crop for upcoming foraging run\n\t\t\tif(food < startingCrop){\n\t\t\t\thive.food -= (startingCrop - food);\n\t\t\t\tfood = startingCrop;\n\t\t\t}\n\t\t\tif(startScouting() || hive.dancingBees.size() <= 0) {\n\t\t\t\tstate = \"SCOUTING\";\n\t\t\t\tcurrentAngle = RandomHelper.nextDoubleFromTo(0, 2*Math.PI);\n\t\t\t}\n\t\t\telse{ // else follow a dance\n\t\t\t\t// if bee follows dance, store angle and distance in the bee object\n\t\t\t\tint index = RandomHelper.nextIntFromTo(0, hive.dancingBees.size() - 1);\n\t\t\t\tNdPoint flowerLoc = space.getLocation(hive.dancingBees.get(index).targetFlower);\n\t\t\t\tNdPoint myLoc = space.getLocation(this);\n\t\t\t\tdouble ang = SpatialMath.calcAngleFor2DMovement(space, myLoc, flowerLoc);\n\t\t\t\tdouble dist = space.getDistance(flowerLoc, myLoc);\n\t\t\t\t\n\t\t\t\t// start following dance at correct angle\n\t\t\t\tcurrentAngle = ang;\n\t\t\t\tfollowDist = dist;\n\t\t\t\tstate = \"FOLLOWING\";\n\t\t\t}\n\t\t}\n\t\telse { // continue sleeping\n\t\t\thive.food -= lowMetabolicRate/2;\n\t\t\thover(grid.getLocation(hive));\n\t\t\t// update energy and food storage\n\t\t\tif(food > startingCrop){\n\t\t\t\tfood -= foodTransferRate;\n\t\t\t\thive.food += foodTransferRate;\n\t\t\t}\n\t\t}\n\t}",
"public void drive( Vehicle vehicle ) {\n\t\t\tvehicle.run();\n\t}",
"private byte drive(Vehicle v){\n\n return v.drive();\n }",
"@Test\r\n\tpublic void MakeBeverageTest() throws InsuficientException, InterruptedException\r\n\t{\n\t\tmachine.MakeBeverage(\"Tea\", machine.GetOutlet(1));\r\n\t\tmachine.MakeBeverage(\"Tea\", machine.GetOutlet(0));\r\n\t\tSystem.out.println(\"Servered Successfully !!\");\r\n\t}",
"@Override\n public void run() {\n destination nextState = desembarque.whatShouldIDo(id,finalDest, nMalasTotal,log);\n bagCollect getBag = null;\n switch (nextState) {\n case WITH_BAGGAGE:\n \n // System.out.println(\"tenho bagagem -----------------\");\n do {\n if ( (getBag=recolha.goCollectABag(id,log) ) == bagCollect.MINE) {\n nMalasEmPosse++;\n }\n //System.out.println(\"ID: \" + id + \" posse: \" + nMalasEmPosse + \" total: \" + nMalasTotal);\n //System.out.println(getBag.toString());\n\n } while (nMalasEmPosse < nMalasTotal && getBag != bagCollect.NOMORE);\n if (nMalasEmPosse < nMalasTotal) {\n recolha.reportMissingBags(id, nMalasTotal - nMalasEmPosse,log);\n }\n transicao.goHome(id,log);\n break;\n case IN_TRANSIT:\n int ticket; //bilhete para entrar no autocarro.\n ticket = transferencia.takeABus(log,id);\n auto.enterTheBus( log,ticket,id);\n auto.leaveTheBus(id, log,ticket);\n transicao.prepareNextLeg(id,log);\n break;\n case WITHOUT_BAGGAGE:\n transicao.goHome(id,log);\n break;\n }\n }",
"void transfer(BankAccount x,double amt)\n\t{\n\t\tSystem.out.println(\"transferring the amount\");\n\t\twithdraw(amt);\n\t\tx.deposit(amt);\n\t\tSystem.out.println(\"transfer done successfully! \");\n\t}",
"protected void onTick() {\n\t\tif(car.drivingInfo.pathToGet.size() == 0 && car.carData.to == null) {\n\t\t\tcar.state = Car.WAIT_PASSENGER_TO_GO_INSIDE;\n\t\t\tSystem.out.println(\"engaged with from drive\" + car.engagedWithAID.toString());\n\t\t\tcar.addBehaviour(new TakePassenger());\n\t\t\tthis.stop();\n\t\t\treturn;\n\t\t}\n\t\t\t\t\n\t\tif(car.carData.to == null) {\n\t\t\tHouseData nextHouseToGo = car.drivingInfo.pathToGet.remove(0);\n\t\t\tcar.carData.to = nextHouseToGo;\n\t\t}\n\t\t\n\t\tint distanceDone = car.carData.distance;\n\t\tint distanceToDo = (int) SmaUtils.computeDistance(car.carData.from.position, car.carData.to.position);\n\t\t\n\t\t// if the distance left is higher than the distance the car can do in one tick, we increment the distance\n\t\tif(distanceDone+Car.CAR_SPEED < distanceToDo) {\n\t\t\tcar.carData.distance += Car.CAR_SPEED;\n\t\t\treturn;\n\t\t} \n\t\t// else, we put the car on the next house\n\t\telse if(distanceDone <= distanceToDo) {\n\t\t\tcar.carData.from = car.carData.to;\n\t\t\tcar.carData.to = null;\n\t\t\tcar.carData.distance = 0;\n\t\t\treturn;\n\t\t}\n\t}",
"public void carParking() {\r\n\t\t\r\n\t}",
"protected void execute() {\n \tRobot.driveTrain.keepHeadingDrive(0, 0, targetDirection);\n }",
"public void transferToChecking(double amount){\n withdrawSavings(amount);\r\n depositChecking(amount);\r\n }",
"public int TakeStep()\n\t\t{\n\t\t// the eventual movement command is placed here\n\t\tVec2\tresult = new Vec2(0,0);\n\n\t\t// get the current time for timestamps\n\t\tlong\tcurr_time = abstract_robot.getTime();\n\n\n\t\t/*--- Get some sensor data ---*/\n\t\t// get vector to the ball\n\t\tVec2 ball = abstract_robot.getBall(curr_time);\n\n\t\t// get vector to our and their goal\n\t\tVec2 ourgoal = abstract_robot.getOurGoal(curr_time);\n\t\tVec2 theirgoal = abstract_robot.getOpponentsGoal(curr_time);\n\n\t\t// get a list of the positions of our teammates\n\t\tVec2[] teammates = abstract_robot.getTeammates(curr_time);\n\n\t\t// find the closest teammate\n\t\tVec2 closestteammate = new Vec2(99999,0);\n\t\tfor (int i=0; i< teammates.length; i++)\n\t\t\t{\n\t\t\tif (teammates[i].r < closestteammate.r)\n\t\t\t\tclosestteammate = teammates[i];\n\t\t\t}\n\n\n\t\t/*--- now compute some strategic places to go ---*/\n\t\t// compute a point one robot radius\n\t\t// behind the ball.\n\t\tVec2 kickspot = new Vec2(ball.x, ball.y);\n\t\tkickspot.sub(theirgoal);\n\t\tkickspot.setr(abstract_robot.RADIUS);\n\t\tkickspot.add(ball);\n\n\t\t// compute a point three robot radii\n\t\t// behind the ball.\n\t\tVec2 backspot = new Vec2(ball.x, ball.y);\n\t\tbackspot.sub(theirgoal);\n\t\tbackspot.setr(abstract_robot.RADIUS*5);\n\t\tbackspot.add(ball);\n\n\t\t// compute a north and south spot\n\t\tVec2 northspot = new Vec2(backspot.x,backspot.y+0.7);\n\t\tVec2 southspot = new Vec2(backspot.x,backspot.y-0.7);\n\n\t\t// compute a position between the ball and defended goal\n\t\tVec2 goaliepos = new Vec2(ourgoal.x + ball.x,\n\t\t\t\tourgoal.y + ball.y);\n\t\tgoaliepos.setr(goaliepos.r*0.5);\n\n\t\t// a direction away from the closest teammate.\n\t\tVec2 awayfromclosest = new Vec2(closestteammate.x,\n\t\t\t\tclosestteammate.y);\n\t\tawayfromclosest.sett(awayfromclosest.t + Math.PI);\n\n\n\t\t/*--- go to one of the places depending on player num ---*/\n\t\tint mynum = abstract_robot.getPlayerNumber(curr_time);\n\n\t\t/*--- Goalie ---*/\n\t\tif (mynum == 0)\n\t\t\t{\n\t\t\t// go to the goalie position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = goaliepos;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.1) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- midback ---*/\n\t\telse if (mynum == 1)\n\t\t\t{\n\t\t\t// go to a midback position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = backspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 2)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = northspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 4)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = southspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.3 )\n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*---Lead Forward ---*/\n\t\telse if (mynum == 3)\n\t\t\t{\n\t\t\t// if we are more than 4cm away from the ball\n\t\t\tif (ball.r > .3)\n\t\t\t\t// go to a good kicking position\n\t\t\t\tresult = kickspot;\n\t\t\telse\n\t\t\t\t// go to the ball\n\t\t\t\tresult = ball;\n\t\t\t}\n\n\n\t\t/*--- Send commands to actuators ---*/\n\t\t// set the heading\n\t\tabstract_robot.setSteerHeading(curr_time, result.t);\n\n\t\t// set speed at maximum\n\t\tabstract_robot.setSpeed(curr_time, 1.0);\n\n\t\t// kick it if we can\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\tabstract_robot.kick(curr_time);\n\n\t\t/*--- Send message to other robot ---*/\n\t\t// COMMUNICATION\n\t\t// if I can kick\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\t{\n\t\t\t// and I am robot #3\n\t\t\tif ((mynum==3))\n\t\t\t\t{\n\t\t\t\t// construct a message\n\t\t\t\tStringMessage m = new StringMessage();\n\t\t\t\tm.val = (new Integer(mynum)).toString();\n\t\t\t\tm.val = m.val.concat(\" can kick\");\n\n\t\t\t\t// send the message to robot 2\n\t\t\t\t// note: broadcast and multicast are also\n\t\t\t\t// available.\n\t\t\t\ttry{abstract_robot.unicast(2,m);}\n\t\t\t\tcatch(CommunicationException e){}\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- Look for incoming messages ---*/\n\t\t//COMMUNICATION\n\t\twhile (messagesin.hasMoreElements())\n\t\t\t{\n\t\t\tStringMessage recvd = \n\t\t\t\t(StringMessage)messagesin.nextElement();\n\t\t\tSystem.out.println(mynum + \" received:\\n\" + recvd);\n\t\t\t}\n\n\t\t// tell the parent we're OK\n\t\treturn(CSSTAT_OK);\n\t\t}",
"public void run() { // Creating run method\n\n\t\t// Declaring variables\n\t\tint totalSeats;\n\t\tString[] name;\n\t\tint[] age;\n\n\t\tScanner sc = new Scanner(System.in); // Scanner class to take input from\n\t\t\t\t\t\t\t\t\t\t\t\t// user\n\n\t\t/**\n\t\t * Synchronized block is used to synchronized on the same object and\n\t\t * only have one thread executing inside them at the same time.\n\t\t **/\n\t\tsynchronized (this) { // Creating Synchronized block\n\n\t\t\tSystem.out.print(\"Enter total number of seats: \");\n\t\t\ttotalSeats = sc.nextInt(); // Taking input from user for no. of\n\t\t\t\t\t\t\t\t\t\t// seats\n\t\t\t/**\n\t\t\t * Initializing integer and string arrays to store name and age of\n\t\t\t * the passengers.\n\t\t\t * \n\t\t\t */\n\t\t\tname = new String[totalSeats];\n\t\t\tage = new int[totalSeats];\n\n\t\t\tfor (int i = 0; i < totalSeats; i++) { // For loop\n\t\t\t\t// It will print name and age of passenger according to the\n\t\t\t\t// total number of tickets .\n\n\t\t\t\tSystem.out.print(\"\\nPassenger \" + (i + 1));\n\t\t\t\tSystem.out.print(\"\\nName: \");\n\t\t\t\tname[i] = sc.next();\n\n\t\t\t\tSystem.out.print(\"Age:\");\n\t\t\t\tage[i] = sc.nextInt();\n\t\t\t}\n\n\t\t\t// Printing final details\n\t\t\tSystem.out.println(\"\\n!! Booking Details !!\");\n\t\t\tSystem.out.println(\"Number of seats: \" + totalSeats); //Prints total number of seats \n\t\t\tfor (int i = 0; i < totalSeats; i++) {\n\t\t\t\t//Prints each passenger names with age as a final detail. \n\t\t\t\tSystem.out.println((i + 1) + \".\" + name[i] + \"(\" + age[i] + \")\");\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(1000); // Put thread to sleep\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public boolean addBike(Bike bike, DockingStation dock){\n String dateTimeNow = new SimpleDateFormat(TIME_FORMAT).format(Calendar.getInstance().getTime());\n \tint bikeId = 1;\n \tdouble latitude;\n \tdouble longitude;\n double chargingLvl;\n try(Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(INSERT);\n PreparedStatement ps2 = con.prepareStatement(INSERT_DATA);\n PreparedStatement ps3 = con.prepareStatement(BIKE_ID_TYPE + bike.getTypeId());\n ResultSet rs = ps3.executeQuery()){\n \n con.setAutoCommit(false);\n \n if(rs.next()){\n int maxBikeId = rs.getInt(cBikeID);\n if(maxBikeId == 0){\n bikeId = bike.getTypeId() * 1000;\n }else{\n bikeId += maxBikeId;\n }\n }else{\n return false;\n }\n\n ps.setInt(1, bikeId);\n ps.setDate(2, bike.getSqlDate());\n ps.setDouble(3, bike.getPrice());\n ps.setString(4, bike.getMake());\n ps.setInt(5, bike.getTypeId());\n if(bike.getStationId() == 0){\n ps.setNull(6, INTEGER);\n }else{\n ps.setInt(6, bike.getStationId());\n }\n \n if (dock != null){\n latitude = dock.getCoordinateLat();\n longitude = dock.getCoordinateLng();\n chargingLvl = 100;\n ps.setInt(6, dock.getStationId());\n }else if(bike.getBikeData() != null){\n latitude = bike.getBikeData().getLatitude();\n longitude = bike.getBikeData().getLongitude();\n chargingLvl = bike.getBikeData().getChargingLvl();\n }else{ //If there's no selected dock or data input for the bike\n latitude = 63.434903; // The latitude & longitude of the \"company\"\n longitude = 10.402521;\n chargingLvl = 100;\n }\n ps2.setInt(1, bikeId);\n ps2.setString(2, dateTimeNow);\n ps2.setDouble(3,latitude);\n ps2.setDouble(4, longitude);\n ps2.setDouble(5, chargingLvl);\n ps2.setNull(6, INTEGER);\n\n ps.executeUpdate();\n ps2.executeUpdate();\n con.commit();\n con.setAutoCommit(true);\n return true;\n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n }\n return false;\n }",
"@Override\n protected void execute() {\n Robot.driveTrain.tankDrive(1);\n }",
"public void requestToBoardVehicle(commuters commuters, bus b) {\n\t\tc = commuters;\n\t\tc.boardedAt = b.currentLocation;\n\t}",
"public void act()\n\t{\n\t\tif(getFirstDriver().isAtPump())\n\t\t{\n\t\t\tif(!getFirstDriver().isDoneRefilling())\n\t\t\t{\n\t\t\t\tgetFirstDriver().act(priceOfFuel);\n\t\t\t}\n\t\t}\n\t\telse if(getFirstDriver().isDone())\n\t\t{\n\t\t\tremoveDriver();\n\t\t}\n\t}",
"protected void execute() {\n \tRobot.driveTrain.driveByArcade(_speed, 0);\n }",
"@Test\n public void transferCheckingtoSavingsTest(){\n assertTrue(userC.transfer(150.00, userS));\n }",
"public void takeOnBus(Bus bus) {\r\n\t\tbus.takeOnBus(1000);\r\n\t\tthis.money -= 1000;\r\n\t}",
"@Override\r\n protected void execute() {\r\n // get deltaT in seconds for the controller\r\n double now = System.currentTimeMillis();\r\n double elapsed = (now - mPreviousTime) / 1000.0 ; \r\n mPreviousTime = now; \r\n \r\n // get inputs to the two PIDs\r\n double dist = Robot.visionSubSys.getDistFt() ;\r\n double bearing = Robot.visionSubSys.getBearingDegCW() ;\r\n double orient = Robot.drivetrain.getOrientDegCCW() ; \r\n \r\n // update and get control output from the two PIDs\r\n double distControl = mDistController.update(dist, bearing, elapsed) ;\r\n double bearingControl = mBearingController.update(dist, bearing, orient, elapsed);\r\n // combine them\r\n double left = (distControl+bearingControl) ; // / 2.0 ;\r\n double right = (distControl-bearingControl) ; // / 2.0 ;\r\n \r\n // command the drivetrain\r\n Robot.drivetrain.tankDrive(left, right);\r\n }",
"public void smart(final Operation smart, final Account account, final Lock lock) {\r\n\r\n\t\ttry {//tenta colocar a thread em sleep com o valor padrao definido, caso nao consiga, interrompe a thread e imprime o codigo da excecao\r\n\t\t\tThread.sleep(smart.getSleep());\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\tThread.currentThread().interrupt();\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//trava, verifica se o saldo é maior que zero, remove a quantia determinada, printa as informacoes e por fim destrava a conta\r\n\t\tlock.lock();\r\n\t\tif(account.getBalance() != 0) {\r\n\t\t\tif(account.getBalance() - smart.getPull() >= 0) {\r\n\t\t\t\taccount.setBalance(account.getBalance() - smart.getPull());\r\n\t\t\t\tsmart.setNumberOfPulls(smart.getNumberOfPulls() + 1);\r\n\t\t\t\tsmart.setBalance(smart.getBalance() + smart.getPull());\r\n\t\t\t\tSystem.out.println(\"Thread: \" + Thread.currentThread().getName() + \" - Account Balance: \" + account.getBalance());\r\n\t\t\t\tSystem.out.println(\"Threads new Balance: \" + smart.getBalance() + \"\\n\\n\");\r\n\t\t\t} \r\n\t\t\tlock.unlock();\r\n\t\t}else {//caso o saldo seja menor ou igual a zero, destrava a conta para uso de outras threads\r\n\t\t\tlock.unlock();\r\n\t\t\tthreadSync(smart, account);\r\n\t\t}\r\n\t}",
"public void DoGoToSeat() {\n\t\tcommand = Command.FollowWaiter;\n\t}",
"public void holdForWorkXX()\n {\n if (cFixedServiceTimed)\n {\n hold(mServerConfig.mServiceTime);\n out();\n return;\n }\n double tBase;\n double tDelta;\n switch (mHoldType)\n {\n case cHoldNormal:\n hold(cRandom.normal(mServerConfig.mServiceTime, mServerConfig.mServiceTime * 0.1)); //0.3\n break;\n\n case cHoldNegexp:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = 1.0 / (mServerConfig.mServiceTime * 0.50);\n hold( tBase + cRandom.negexp(tDelta));\n break;\n\n case cHoldPoisson:\n tBase = mServerConfig.mServiceTime * 0.75;\n tDelta = mServerConfig.mServiceTime * 0.50;\n hold( tBase + cRandom.poisson(tDelta));\n break;\n\n case cHoldUniform:\n hold(cRandom.uniform(mServerConfig.mServiceTime * 0.75, mServerConfig.mServiceTime * 1.5));\n break;\n }\n out();\n }",
"@Override\n protected void execute() {\n if (_suckOrSpit == \"Suck\" || _suckOrSpit == \"suck\") {\n Robot.CARGO_WHEEL_SUBSYSTEM.topMotorSuck(_magnitude);\n Robot.CARGO_WHEEL_SUBSYSTEM.bottomMotorSuck(_magnitude);\n }\n if (_suckOrSpit == \"Spit\" || _suckOrSpit == \"spit\") {\n Robot.CARGO_WHEEL_SUBSYSTEM.topMotorSpit(_magnitude);\n Robot.CARGO_WHEEL_SUBSYSTEM.bottomMotorSpit(_magnitude);\n }\n }",
"void park(Vehicle v) {\n\t\t\tcurrentVehicle = v;\n\t\t}",
"public void arrivesAtTestSTation() throws InterruptedException {\n int max = 5;\n int min = 1;\n int range = max - min + 1;\n\n long time = System.currentTimeMillis();\n long timeTo = System.currentTimeMillis() + 7200;\n while(time <= timeTo){\n Thread.sleep(Times.calculateTimeDistributionForArrivingAtTheCarStation());\n int res = (int) ( Math.random()*range)+min;\n Car c = new Car(res);\n personsInCar += c.getNumberOfPassengers();\n carGenerated++;\n if(carQueue.size() >= Times.carQueueSize) {\n if(Times.enableDebugging)\n System.out.println(\"0. Car queue is to hight and needs to leave: \" + c.getIdentifier().getCarId() );\n carLeftLaneSinceItIsFull++;\n }else {\n c.setArrivesAtTestStation(true);\n c.setStartsWaiting(System.currentTimeMillis());\n c.setCurrentStation(\"Arrives Test Station\");\n synchronized (carQueue){\n carQueue.add(c);}\n // Collections.sort(carQueue);\n if(Times.enableDebugging)\n System.out.println(\"1. Arrives at the Teststation: \" + c.getIdentifier().getCarId() );\n }\n time = System.currentTimeMillis();\n }\n }",
"@Override\n\tpublic void driving() {\n\t\t\n\t}",
"public void take(Profile profile){\n\t\t//aaaand something else\n\t\ttimesTaken++;\n\t\t//haha nope...\n\t}",
"public void callTheWaiter(){\n Student s = (Student) Thread.currentThread();\n\n \tCommunicationChannel com = new CommunicationChannel (serverHostName, serverPortNumb);\n \tObject[] params = new Object[0];\n \tObject[] state_fields = new Object[2];\n \tstate_fields[0] = s.getID();\n \tstate_fields[1] = s.getStudentState();\n \t\n Message m_toServer = new Message(7, params, 0, state_fields, 2, null); \n Message m_fromServer; \n \n while (!com.open ()){ \n \ttry{ \n \t\tThread.currentThread ();\n \t\tThread.sleep ((long) (10));\n \t}\n \tcatch (InterruptedException e) {}\n }\n \n com.writeObject (m_toServer);\n \n m_fromServer = (Message) com.readObject(); \n \n s.setState((int) m_fromServer.getStateFields()[1]);\n \n com.close ();\n }",
"void drive() {\n \t\tSystem.out.println(\"Car can drive\");\n \t}",
"protected void execute() {\n\t\tthrottle = getThrottle();\n\t\tturn = getCorrectTurnValue();\n\t\tforward = getForward();\n\t\tright = (forward - turn) * throttle;\n\t\tleft = (forward + turn) * throttle;\n\n\t\tRobot.driveTrain.driveManual(right, left);\n\t\tif (Robot.oi.bShiftUp.get()) {\n\t\t\tRobot.driveTrain.shiftToHigh(true);\n\t\t} else if (Robot.oi.bShiftDown.get()) {\n\t\t\tRobot.driveTrain.shiftToHigh(false);\n\t\t}\n\t}",
"public Bid playHand(Bid b)\n {\n return strategy.chooseBid(b, hand, strategy.cheat(b, hand));\n }",
"@Override\n\tpublic void passedBy() {\n\t\tMonopolyGameController.getInstance();\n\t\tMonopolyGameController.getCurrentPlayer().increaseMoney(250);\n\t\tLogger.getInstance().notifyAll(MonopolyGameController.getCurrentPlayer().getName()+ \" gained 250 dollars by landing on Bonus Square\");\n\n\t}",
"@Override\r\n\tpublic void cookChicken(int noOfChicken) {\n System.out.println(\"please place the chicken in the grill machine\");\r\n grillmachine.setState(grillmachine.getCookingState());\r\n\t}",
"@Override\n protected void execute() {\n sClimber.setMotorSpeed(-stick.getRawAxis(1));\n //sIntake.WristMove(mWristAngle);\n //sElevator.setPositionLowGear(mElevatorHieght);\n // SmartDashboard.putNumber(\"Wrist Volts\", RobotMap.WristMotor.getMotorOutputVoltage());\n }",
"@Override\n public void receiveMessage(AgentID sender, Action action)\n {\n super.receiveMessage(sender, action);\n\n // update the value of Care_Value、Reluctance、Agreement_Value every ten rounds\n if (getTimeLine() instanceof DiscreteTimeline) {\n DiscreteTimeline discreteTimeline = (DiscreteTimeline)getTimeLine();\n int cRound = discreteTimeline.getRound();\n if (cRound % 10 == 0) {\n\n // care_value increase 4% every ten rounds\n Care_Value = Care_Value * (1 + 0.04);\n if (Care_Value > 0.72) {\n Care_Value = 0.72;\n }\n\n // reluctance decrease 4% every ten rounds\n Reluctance = Reluctance * (1 - 0.06);\n if (timeline.getTime() < 7 && Reluctance < 0.9) {\n Reluctance = 0.9;\n }\n\n List<BidDetails> allBids = new ArrayList<>(feasibleBids);\n // find a common set for all opponent\n Set<BidDetails> commonBids = opponentModelInterface.queryCommonBestBidsSet(allBids, Number_of_Bids);\n List<BidDetails> commonBidsList = new ArrayList<>(commonBids);\n // sort the common set\n Collections.sort(commonBidsList);\n // AV = Utility(BidBest) * Reluctance\n Agreement_Value = (commonBidsList.get(commonBidsList.size() - 1).getMyUndiscountedUtil()) * Reluctance;\n if (Agreement_Value > 0.85) {\n Agreement_Value = 0.85;\n }\n\n if (Agreement_Value < Minimum_Offer_Threshold * (3 - Math.pow(2, timeline.getTime()))) {\n Agreement_Value = Minimum_Offer_Threshold * (3 - Math.pow(2, timeline.getTime()));\n }\n }\n }\n\n if (action instanceof Inform) {\n // receive message first time, update the number of opponent\n opponentModelInterface = new OpponentModelManager(getNumberOfParties());\n }else if (action instanceof Offer) {\n // save the last offer\n lastOffer = ((Offer) action).getBid();\n // update opponent model by new bid from opponent\n opponentModelInterface.handleBidFromSender(sender.toString(), lastOffer, getDomain());\n }\n }",
"public void take(String secondWord) //Item second word of the command)\n {\n // if there is no second word, we don't know what to take...\n if(secondWord == null){\n System.out.println(\"Take what?\");\n }\n else{\n //if there are items in the rooms\n if(currentRoom.emptyRoom() == false){\n Item itemTaken = currentRoom.getItemRoom(secondWord);\n if(itemTaken != null){\n if(itemTaken.canBePickedUp() == true){\n if((inventoryWeight + itemTaken.getItemWeight()) <= maxWeight){\n //take current item\n inventory.add(itemTaken);\n inventoryWeight += itemTaken.getItemWeight();\n currentRoom.removeItem(itemTaken.getId());\n System.out.println(\"You have taken the item: \" + itemTaken.getId() + \".\");\n }\n else{\n System.out.println(\"You canīt get over the max weight.\");\n }\n }\n else{\n System.out.println(\"This item canīt be taken.\");\n }\n }\n else{\n System.out.println(\"This item donīt exist.\");\n }\n }\n else{\n System.out.println(\"There are no items to take in this room.\");\n }\n }\n }",
"public void implement(){\n this.rb.moveForward(1);\n \n \n if(this.rb.canPickThing()){\n this.rb.pickThing();\n }\n\n //turn the rb 90 degree to the south\n this.rb.turnLeft();\n\n //move the navigator 1 step ahead per move()\n this.rb.moveForward(1);\n\n //turn the navigator 90 degree to the east\n this.rb.turnRight();\n\n //move the navigator 1 step ahead per move()\n this.rb.moveForward(1);\n\n //turn the navigator 90 degree to the north\n this.rb.turnLeft();\n\n //move the navigator\n this.rb.moveForward(2);\n\n //turn Right the robot\n this.rb.turnRight();\n\n //stop at the starting position per move()\n this.rb.moveForward(1); \n \n this.rb.putThing();\n \n //move the navigator 1 step ahead per move()\n this.rb.moveForward(1);\n \n //turn the navigator 90 degree to the west\n this.rb.turnRight();\n \n this.rb.moveForward(1);\n \n this.rb.turnLeft();\n \n this.rb.moveForward(1);\n \n this.rb.turnRight();\n \n this.rb.moveForward(2);\n \n this.rb.turnLeft();\n }",
"public void brake(float brake)\n\t{\n\t\t\n\t\tif(type == PhysicsType.BULLET)\n\t\t\tbulletVehicleControl.brake(brake);\n\t\telse\n\t\t\tchronoVehicleControl.setBrakePedalIntensity(brake/32f);\n\t}",
"private void passSensor(SensorEvent e) throws CommandException, InterruptedException {\n if (e.getStatus() == SensorEvent.ACTIVE) {\n boolean station = isStation(e);\n if (!station) {\n boolean atPart;\n\n // Handles leaving first and second into the third as well as leaving the seventh and eighth into the sixth\n // Also traveling into the sections\n if ((atPart = (atSensor(e, 13, 7) || atSensor(e, 13, 8))) || (atSensor(e, 5, 11) || atSensor(e, 5, 13))) {\n int sec = atPart ? 2 : 4;\n int dir = sec == 2 ? SOUTH : NORTH;\n if (direction == dir) {\n if (atPart)\n release(1);\n if (!tryAcc(sec))\n stopWait(sec);\n if (ticket != -1) release(ticket);\n ticket = sec;\n } else if (atPart && direction == NORTH) {\n release(2);\n if (!tryAcc(1))\n stopWait(1);\n } else\n release(sec);\n processTrackSwitch(e);\n\n // Handles the north entry and leaving of the + intersection\n } else if ((atSensor(e, 9, 5)) || atSensor(e, 6, 6)) {\n if (direction == SOUTH && !tryAcc(1))\n stopWait(1);\n else if (direction == NORTH)\n release(1);\n\n // Handles the entry of the fifth and fourth section\n } else if ((atPart = atSensor(e, 16, 9)) || atSensor(e, 3, 9)) {\n int dir = atPart ? SOUTH: NORTH;\n if (direction == dir) {\n if (tryAcc(3))\n ticket = 3;\n else\n ticket = -1;\n processTrackSwitch(e);\n }\n\n // Handles the entry of the first, second, seventh and eighth\n } else if ((atPart = atSensor(e, 18 ,7)) || atSensor(e, 1, 11)){\n int sec = atPart ? 0: 5;\n int dir = sec == 0 ? NORTH: SOUTH;\n if (direction == dir) {\n if (tryAcc(sec))\n ticket = sec;\n else\n ticket = -1;\n }\n processTrackSwitch(e);\n\n // Handles the passing of the middle double track\n } else if ((atPart = (atSensor(e, 6, 9) || atSensor(e, 6, 10))) || atSensor(e, 13, 9) || atSensor(e, 13, 10)) {\n int sec = direction == NORTH ? 4 : 2;\n if ((atPart && direction == NORTH) || (!atPart && direction == SOUTH)) {\n release(sec);\n } else {\n sec = sec == 2 ? 4: 2;\n if (!tryAcc(sec))\n stopWait(sec);\n if (ticket == 3)\n release(3);\n ticket = sec;\n }\n processTrackSwitch(e);\n }\n\n //If a train arrives at a station this handles the stopping and changing of direction\n } else {\n if (DEBUG) System.err.printf(\"Train %d arrived at station\\n\", id);\n TSimInterface.getInstance().setSpeed(id, 0);\n Thread.sleep(1000 + (20 * Math.abs(speed)));\n if (direction == NORTH)\n direction = SOUTH;\n else\n direction = NORTH;\n speed = -speed;\n TSimInterface.getInstance().setSpeed(id, speed);\n }\n }\n }",
"public void applyBrake() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic Action act(Vehicle vehicle, Task availableTask) {\n\t\t\r\n\t\tif (!setupTable && !this.myAgent.name().equals(\"reactive-random\")){\r\n\t\t\tsetupTable = true;\r\n\t\t\tRLA(vehicle.costPerKm());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tAction action;\r\n\t\t\r\n\t\t\r\n\t\t// ******************Choose if the vehicle pick the task or go to another city ********************************//\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tif (this.myAgent.name().equals(\"reactive-dummy\"))\r\n\t\t{\r\n\t\t\tdouble min = vehicle.getCurrentCity().distanceTo(vehicle.getCurrentCity().randomNeighbor(random)) ;\r\n\t\t\tCity nearCity = vehicle.getCurrentCity().randomNeighbor(random);\r\n\t\t\t\r\n\t\t\tfor(City myCity: vehicle.getCurrentCity()) {\r\n\t\t\t\tif( vehicle.getCurrentCity().distanceTo(myCity)<=min)\r\n\t\t\t\t{\r\n\t\t\t\t\tmin = vehicle.getCurrentCity().distanceTo(myCity);\r\n\t\t\t\t\tnearCity = myCity;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (availableTask != null && nearCity.id ==availableTask.deliveryCity.id)\r\n\t\t\t\taction = new Pickup(availableTask);\r\n\t\t\telse\r\n\t\t\t\taction = new Move(nearCity);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tif(!this.myAgent.name().equals(\"reactive-random\"))\t\t\t\t\t//reinforcement learning \r\n\t\t{\r\n\t\t\tCity id = ChooseAction(availableTask, vehicle.getCurrentCity() , vehicle.costPerKm());\r\n\t\t\t\r\n\t\t\tif (availableTask == null || id != availableTask.deliveryCity ) \r\n\t\t\t\taction = new Move(id);\r\n\t\t\telse \r\n\t\t\t\taction = new Pickup(availableTask);\r\n\t\t\t\r\n\t\t} else \t\t\t\t\t\t\t\t\t\t\t\t\t\t//randomized actions\r\n\t\t{\r\n\t\t\t\r\n\t\t\tif (availableTask == null || random.nextDouble() > pPickup) {\r\n\t\t\t\tCity currentCity = vehicle.getCurrentCity();\r\n\t\t\t\taction = new Move(currentCity.randomNeighbor(random));\r\n\t\t\t} else \r\n\t\t\t\taction = new Pickup(availableTask);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif (numActions >= 1) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"The total of profit after \"+numActions+\" actions is \"+myAgent.getTotalProfit()+\" (average profit: \"+(myAgent.getTotalProfit() / (double)numActions)+\")\");\r\n\t\t}\r\n\t\tnumActions++;\r\n\t\t\r\n\t\treturn action;\r\n\t}",
"@Override\n\tpublic void drive() {\n\t\tSystem.out.println(\"Bike Riding\");\n\t}",
"public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }",
"public void act() \n {\n if(s == 0)\n {\n lead();\n lookForFood();\n lookForEdge();\n lookForTail();\n }\n else\n {\n follow();\n }\n }"
]
| [
"0.68236536",
"0.54614437",
"0.5440373",
"0.5395891",
"0.5376619",
"0.53554165",
"0.5305282",
"0.5264247",
"0.52318794",
"0.5208855",
"0.51949745",
"0.5192711",
"0.51876086",
"0.51851064",
"0.51798236",
"0.517808",
"0.5159097",
"0.513847",
"0.5137136",
"0.5124581",
"0.5096702",
"0.50807756",
"0.5075892",
"0.5073446",
"0.506353",
"0.50556517",
"0.5049481",
"0.5036366",
"0.4998858",
"0.49979076",
"0.49594498",
"0.49512368",
"0.49493065",
"0.4938263",
"0.49306494",
"0.49260983",
"0.49217942",
"0.49030608",
"0.48947465",
"0.48929873",
"0.4884638",
"0.48837817",
"0.4875411",
"0.48709428",
"0.48651534",
"0.48617998",
"0.4858409",
"0.48532856",
"0.48523554",
"0.48500904",
"0.48474312",
"0.484332",
"0.48425326",
"0.4842333",
"0.48412538",
"0.48411837",
"0.4833861",
"0.48323876",
"0.48322764",
"0.4831409",
"0.4830739",
"0.4821034",
"0.48197025",
"0.48194814",
"0.4815818",
"0.481325",
"0.48115352",
"0.48077056",
"0.47992554",
"0.47987622",
"0.47974014",
"0.47960064",
"0.47947288",
"0.4794202",
"0.47896186",
"0.47887334",
"0.47855774",
"0.47833896",
"0.47772095",
"0.4775296",
"0.4771757",
"0.47619292",
"0.47618338",
"0.47463486",
"0.47424877",
"0.47394192",
"0.47382376",
"0.47379974",
"0.47360176",
"0.47331664",
"0.4733078",
"0.4729485",
"0.4729197",
"0.47289446",
"0.47269866",
"0.47245243",
"0.4720777",
"0.4720641",
"0.47180966",
"0.47146416"
]
| 0.8085508 | 0 |
the synchronized function park is used to realize the action of parking a bike at certain station for the user, and this user's bicycle attribute will be removed after parking action, and the payment action will be executed automatically while parking. s: the destination station to park bikes | public synchronized void park(Station s) throws Exception{
if(!s.equals(this.last_routine.getDestination())){System.out.println("CHOOSE THE STATION OF YOUR ROUTINE");throw new Exception("WRONG STATION");}
s.remove_user(this);
if(!s.isState()){System.out.println("offline - out of order!");throw new Exception("OFFLINE");}
if(this.bicycle == null){System.out.println("no bicycle to park");}
this.bicycle.setTotal_time_spent(this.bicycle.getTotal_time_spent()+this.bicycle.count_bike_time(this.last_routine.getSource(), this.last_routine.getDestination()));
this.setPosition(s.getPosition());
if(this.bicycle instanceof Bicycle_Mech){
if(s.getPlaces_mech().size()-s.count_mech() == 0){System.out.println("no more mech bicycle slots available");}
else{
if(s instanceof Station_Plus && this.card!=null){this.card.setCredits(this.card.getCredits()+5);}
for(Map.Entry<Slot,Bicycle_Mech> me:s.getPlaces_mech().entrySet()){
if(me.getValue()==null){
s.getPlaces_mech().put(me.getKey(), (Bicycle_Mech)this.bicycle);s.setReturn_times(s.getReturn_times()+1);
if(this.card!=null){System.out.println(this.getUserName() + " Credits remaining: " + this.getCard().getCredits());}
System.out.println(this.getUserName() + " PAY: " + this.pay(this.last_routine, this.bicycle, this.bicycle.getBank_card_to_use()));
this.last_routine = null;
s.notify_users();
this.bicycle.setUser(null);
this.bicycle.setBank_card_to_use(null);
this.bicycle = null;
this.setPosition(s.getPosition());
break;
}
}
}
}
if(this.bicycle instanceof Bicycle_Elec){
if(s.getPlaces_elec().size()-s.count_elec() == 0){System.out.println("no more elec bicycle slots available");}
else{
if(s instanceof Station_Plus && this.card!=null){this.card.setCredits(this.card.getCredits()+5);}
for(Map.Entry<Slot,Bicycle_Elec> me:s.getPlaces_elec().entrySet()){
if(me.getValue()==null){
s.getPlaces_elec().put(me.getKey(), (Bicycle_Elec)this.bicycle);s.setReturn_times(s.getReturn_times()+1);
if(this.card!=null){System.out.println(this.getUserName() + " Credits remaining: " + this.getCard().getCredits());}
System.out.println(this.getUserName() + " PAY: " + this.pay(this.last_routine, this.bicycle,this.bicycle.getBank_card_to_use()));
this.last_routine = null;
s.notify_users();
this.bicycle.setUser(null);
this.bicycle.setBank_card_to_use(null);
this.bicycle = null;
this.setPosition(s.getPosition());
break;
}
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public Ticket park(ParkingRequest parkingRequest, Vehicle vehicle) {\n return facade.park(parkingRequest,vehicle);\n }",
"public void park(ParkingLot preferredLot, Vehicle vehicle) {\n preferredLot.park(vehicle);\n }",
"void park(Vehicle v) {\n\t\t\tcurrentVehicle = v;\n\t\t}",
"public void washAndPark(Vehicle v) { \t\n \twash.washVehicle(v);\n \tparkVehicle(v);\n }",
"public void carParking() {\r\n\t\t\r\n\t}",
"@Override\n\tpublic void parked() {\n\t\t\n\t}",
"public void park();",
"void parkingMethod(){\n nearingTheCrater();\n parkingTheArm();\n }",
"public boolean parkVehicle(Vehicle ve){\r\n if (!fitVehicle(ve)){\r\n // return statement\r\n return false;\r\n }\r\n veh = ve;\r\n veh.parkSpots(this);\r\n // return statement\r\n return true;\r\n }",
"public void checkForSpot(String option, String length, Vehicle v, ParkingLot p)\r\n {\r\n ArrayList<Point> freeSpots = new ArrayList<>();\r\n // this will happen in parkingLotControl\r\n // ask if they want regular or premium\r\n // ask for long or short term\r\n // NOT FINISHED\r\n int width = p.getTotalRow();\r\n int height = p.getTotalColumn();\r\n\r\n // if vehicle spots taken is 2, create TwoParkingSpots...\r\n if (v.getSpotsTaken() == 2) {\r\n // for loop stuff\r\n // if two are available but not next to each other\r\n // call moveCars\r\n Point[] spot = checkSpotsForTwo(p);\r\n if(spot == null){\r\n System.out.println(\"There are not enough spots in this lot to park this car.\");\r\n return;\r\n }else{\r\n TwoParkingSpots ps = new TwoParkingSpots(v.getOwner(),v,option,length,(int)spot[0].getX(), new int[]{(int)spot[0].getY(),(int)spot[1].getY()});\r\n p.setSpot(ps.getRow(),ps.getColumns(),ps);\r\n System.out.println(\"Vehicle has been parked. Taking back to main menu.\");\r\n if(option.equals(\"regular\")){\r\n if(length.equals(\"long\")){\r\n v.setCost(\"Long Term Regular Parking\",25.00);\r\n }else{\r\n v.setCost(\"Short Term Regular Parking\",15.00);\r\n }\r\n }else{\r\n if(length.equals(\"long\")){\r\n v.setCost(\"Long Term Premium Parking\",45.00);\r\n }else{\r\n v.setCost(\"Short Term Premium Parking\",35.00);\r\n }\r\n }\r\n return;\r\n }\r\n } else {\r\n for (int i = 0; i < width; i++) {\r\n for (int j = 0; j < height; j++) {\r\n if (p.getOccupany(i, j) == false) {\r\n freeSpots.add(new Point(i, j));\r\n }\r\n }\r\n }\r\n\r\n if(freeSpots.size() >= 1){\r\n Random spot = new Random();\r\n Point parkSpot = freeSpots.get(spot.nextInt(freeSpots.size()));\r\n\r\n ParkingSpot ps = new ParkingSpot(v.getOwner(), v, option, length);\r\n p.setSpot((int) parkSpot.getX(), (int) parkSpot.getY(), ps);\r\n System.out.println(\"Vehicle has been parked. Taking back to main menu.\");\r\n if(option.equals(\"regular\")){\r\n if(length.equals(\"long\")){\r\n v.setCost(\"Long Term Regular Parking\",25.00);\r\n }else{\r\n v.setCost(\"Short Term Regular Parking\",15.00);\r\n }\r\n }else{\r\n if(length.equals(\"long\")){\r\n v.setCost(\"Long Term Premium Parking\",45.00);\r\n }else{\r\n v.setCost(\"Short Term Premium Parking\",35.00);\r\n }\r\n }\r\n return;\r\n }else{\r\n System.out.println(\"There are not enough spots in this lot to park this car.\");\r\n return;\r\n }\r\n }\r\n }",
"Parking createParking();",
"@Override\r\n\tpublic void visit(Park park) {\n\t\t\r\n\t}",
"@Override\n\tpublic void visit(Park park) {\n\n\t}",
"public void parkVehicle(Vehicle v, int time, int intendedDuration)\r\n\t\t\tthrows SimulationException, VehicleException {\r\n\t\tif (v.isParked() || v.wasParked()) {\r\n\t\t\tthrow new VehicleException(\"Vehicle cannot park twice.\");\r\n\t\t} else if (v.getArrivalTime() > Constants.CLOSING_TIME) {\r\n\t\t\tthrow new VehicleException(\"CarPark is closed.\");\r\n\t\t}\r\n\r\n\t\tif (v instanceof Car) {\r\n\t\t\tif (((Car) v).isSmall()) {\r\n\t\t\t\tnumSmallCars++;\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * If there are any small parks available, fill those first.\r\n\t\t\t\t * Else: Park in a normal park if available.\r\n\t\t\t\t */\r\n\t\t\t\tif (smallCarsParked.size() < maxSmallCarSpaces) {\r\n\t\t\t\t\tsmallCarsParked.add(v);\r\n\t\t\t\t} else if (carsParked.size() < maxCarSpaces) {\r\n\t\t\t\t\tcarsParked.add(v);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnumCars++;\r\n\t\t\t\t\tif (carsParked.size() < maxCarSpaces) {\r\n\t\t\t\t\t\tcarsParked.add(v);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\telse if (v instanceof MotorCycle) {\r\n\t\t\t\tnumMotorCycles++;\r\n\t\t\t\tif (motorCyclesParked.size() < maxMotorCycleSpaces) {\r\n\t\t\t\t\tmotorCyclesParked.add(v);\r\n\t\t\t\t} else if (smallCarsParked.size() < maxSmallCarSpaces) {\r\n\t\t\t\t\tsmallCarsParked.add(v);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tv.enterParkedState(time, intendedDuration);\r\n\t}",
"public static void main(String[] args) {\n int numberOfLevels = 5;\n int numberOfRows = 10;\n int spotsPerRow = 20;\n ParkingLot parkingLot = new ParkingLot(numberOfLevels, numberOfRows, spotsPerRow);\n\n System.out.println(\"\\n----------------------< PARKING >----------------------\\n\");\n\n // Park some vehicles\n List<Vehicle> motorcycles = new ArrayList<>();\n List<Vehicle> cars = new ArrayList<>();\n List<Vehicle> buses = new ArrayList<>();\n for (int i = 1; i <= 100; i++) {\n Vehicle bus = new Bus();\n buses.add(bus);\n if (parkingLot.parkVehicle(bus)) {\n System.out.print(\"Bus parking successful \");\n }\n }\n for (int i = 1; i <= 250; i++) {\n Vehicle motorCycle = new MotorCycle();\n motorcycles.add(motorCycle);\n if (parkingLot.parkVehicle(motorCycle)) {\n System.out.print(\"Motorcycle parking successful \");\n }\n Vehicle car = new Car();\n cars.add(car);\n if (parkingLot.parkVehicle(car)) {\n System.out.print(\"Car parking successful \");\n }\n }\n\n System.out.println(\"\\n\");\n\n parkingLot.print();\n // Get data for all the levels\n for (int i = 0; i < numberOfLevels; i++) {\n Level level = parkingLot.getLevel(i);\n System.out.println(\"Available spots for Level - \" + i + \": \" + level.getAvailableSpots());\n }\n\n System.out.println(\"\\n----------------------< UNPARKING >----------------------\\n\");\n\n // Unpark some vehicles\n for (int i = 1; i <= 100; i++) {\n Vehicle motorCycle = motorcycles.get(i - 1);\n parkingLot.unparkVehicle(motorCycle);\n Vehicle car = cars.get(i - 1);\n parkingLot.unparkVehicle(car);\n Vehicle bus = buses.get(i - 1);\n parkingLot.unparkVehicle(bus);\n }\n\n parkingLot.print();\n // Get data for all the levels\n for (int i = 0; i < numberOfLevels; i++) {\n Level level = parkingLot.getLevel(i);\n System.out.println(\"Available spots for Level - \" + i + \": \" + level.getAvailableSpots());\n }\n }",
"protected void park(Vehicle newCar, int num){\n int carCapAfter = leftCarCap - num;\n int weightCapAfter = leftWeightCap - newCar.getWeightInPounds() * num;\n\n //if there is capacily left, park car\n if ((carCapAfter > 0)\n && (weightCapAfter > 0)){\n leftCarCap--;\n leftWeightCap = weightCapAfter;\n }else if ((carCapAfter > 0)\n && (weightCapAfter <0)){\n System.out.println(\"Your ride is too heavy for now\");\n }\n\n // report left capacity\n System.out.println(main());\n }",
"public CarPark() {\r\n\t\tthis(Constants.DEFAULT_MAX_CAR_SPACES,\r\n\t\t\t\tConstants.DEFAULT_MAX_SMALL_CAR_SPACES,\r\n\t\t\t\tConstants.DEFAULT_MAX_MOTORCYCLE_SPACES,\r\n\t\t\t\tConstants.DEFAULT_MAX_QUEUE_SIZE);\r\n\r\n\t\t// Initialise the parking spots avaliable.\r\n\t\tmaxCarSpaces = Constants.DEFAULT_MAX_CAR_SPACES\r\n\t\t\t\t- Constants.DEFAULT_MAX_SMALL_CAR_SPACES;\r\n\t\tmaxSmallCarSpaces = Constants.DEFAULT_MAX_SMALL_CAR_SPACES;\r\n\t\tmaxMotorCycleSpaces = Constants.DEFAULT_MAX_MOTORCYCLE_SPACES;\r\n\t\tmaxQueueSize = Constants.DEFAULT_MAX_QUEUE_SIZE;\r\n\t\ttotalSpaces = maxCarSpaces + maxSmallCarSpaces + maxMotorCycleSpaces;\r\n\r\n\t\t// Arrays to hold vehicles past/present.\r\n\t\tvehiclesInQueue = new ArrayList<Vehicle>(maxQueueSize);\r\n\t\tsatisfiedVehicles = new ArrayList<Vehicle>();\r\n\t\tdissatifiedVehicles = new ArrayList<Vehicle>();\r\n\r\n\t\t// Arrays to hold numbers of each type of vehicle + a list to hold the\r\n\t\t// lists.\r\n\t\tmotorCyclesParked = new ArrayList<Vehicle>();\r\n\t\tcarsParked = new ArrayList<Vehicle>();\r\n\t\tsmallCarsParked = new ArrayList<Vehicle>();\r\n\t\tallVehiclesParked = new ArrayList<ArrayList<Vehicle>>();\r\n\r\n\t\tallVehiclesParked.add(carsParked);\r\n\t\tallVehiclesParked.add(smallCarsParked);\r\n\t\tallVehiclesParked.add(motorCyclesParked);\r\n\r\n\t}",
"private void placeKitOnDeliveryBoat(MyKit mk)\n\t{\n\t\tif(guiEnable){\n\t\t\tthis.boatGui.msgDoGetKit();\n\t\t\ttry {\n\t\t\t\tprint(\"Boat moving!!\");\n\t\t\t\tguiControl.acquireUninterruptibly();\n\t\t\t} catch (Exception e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t//e1.printStackTrace();\n\t\t\t}\n\t\t\tprint(\"Boat has finished moving.\");\n\t\t\tthis.kitRobotGUI.DoMoveFinishedKitToDeliveryStation (mk.kit.guikit);\n\t\t\ttry {\n\t\t\t\t//guiControl = new Semaphore(0,true);//TODO: take away after gui fixes it\n\t\t\t\tguiControl.acquireUninterruptibly();\n\t\t\t} catch (Exception e) {\n\t\t\t\t//e.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tprint(\"GUI moving Kit to Boat. Finished moving. Telling Agent.\");\n\t\t\n\t\tmyStand.setSlotThreeAvailable();\n\t\tmk.slot = 0;\n\t\tprint(\"Kit Slot number : \"+3 +\" is available\");\n\t\tmk.status = KitStatus.Gone; \n\t\tif(guiEnable)\n\t\t\tboatGui.msgDoReceiveKit(mk.kit.guikit);//telling boat\n\t\tstateChanged();\n\t}",
"public boolean isParked() {\r\n\t\tif (vehicleState == \"parked\") {\r\n\t\t\twasParked = true;\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public synchronized void take(Station s, Bicycle b, Bank_Card bank_card) throws Exception{\r\n\t\tif(!s.equals(this.last_routine.getSource())){System.out.println(\"CHOOSE THE STATION OF YOUR ROUTINE\");throw new Exception(\"WRONG STATION\");}\r\n\t\tif(this.bicycle!=null){System.out.println(\"Already Got a Bicycle\");throw new Exception(\"ALREADY GOT A BIKE\");}\r\n\t\ts.remove_user(this);\r\n\t\tif(!s.isState()){System.out.println(\"offline - out of order!\");throw new Exception(\"OFFLINE\");}\r\n\t\tthis.setPosition(s.getPosition());\r\n\t\tif(b instanceof Bicycle_Mech){\r\n\t\t\tif(s.count_mech() == 0){System.out.println(\"no more mech bicycles available\");}\r\n\t\t\telse{\r\n\t\t\t\tfor(Map.Entry<Slot,Bicycle_Mech> me:s.getPlaces_mech().entrySet()){\r\n\t\t\t\t\tif(me.getValue()!=null){\r\n\t\t\t\t\t\tthis.bicycle = me.getValue();s.getPlaces_mech().put(me.getKey(), null);\r\n\t\t\t\t\t\ts.setRent_times(s.getRent_times()+1);s.notify_users();\r\n\t\t\t\t\t\tthis.bicycle.setNumber_rides(this.bicycle.getNumber_rides()+1);\r\n\t\t\t\t\t\tif(bank_card.getOwner().equals(this)){this.bicycle.setBank_card_to_use(bank_card);}\r\n\t\t\t\t\t\tif(!bank_card.getOwner().equals(this)){System.out.println(\"choose a right bank card\");throw new Exception(\"WRONG BANK CARD USER\");}\t\r\n\t\t\t\t\t\tthis.bicycle.setUser(this);\r\n\t\t\t\t\t\tthis.setPosition(s.getPosition());\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(b instanceof Bicycle_Elec){\r\n\t\t\tif(s.count_elec() == 0){System.out.println(\"no more elec bicycles available\");}\r\n\t\t\telse{\r\n\t\t\t\tfor(Map.Entry<Slot,Bicycle_Elec> me:s.getPlaces_elec().entrySet()){\r\n\t\t\t\t\tif(me.getValue()!=null){\r\n\t\t\t\t\t\tthis.bicycle = me.getValue();s.getPlaces_elec().put(me.getKey(), null);\r\n\t\t\t\t\t\ts.setRent_times(s.getRent_times()+1);s.notify_users();\r\n\t\t\t\t\t\tthis.bicycle.setNumber_rides(this.bicycle.getNumber_rides()+1);\r\n\t\t\t\t\t\tif(bank_card.getOwner().equals(this)){this.bicycle.setBank_card_to_use(bank_card);}\r\n\t\t\t\t\t\tif(!bank_card.getOwner().equals(this)){System.out.println(\"choose a right bank card\");throw new Exception(\"WRONG BANK CARD USER\");}\t\r\n\t\t\t\t\t\tthis.bicycle.setUser(this);\r\n\t\t\t\t\t\tthis.setPosition(s.getPosition());\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void printParking();",
"public void setParking(java.lang.Boolean value);",
"private void detectParkingSlot()\r\n\t{\t\t\r\n\t\tPoint PosS = new Point(0,0);\r\n\t\tPoint PosE = new Point(0,0);\r\n\t\t\r\n\t\tdouble sum_F = 0;\r\n\t\tdouble sum_B = 0;\r\n\t\t\r\n\t\tdouble distance_F = 0;\r\n\t\tdouble distance_B = 0;\r\n\t\t\r\n\t\tint SlotID = Pk_counter;\r\n\t\tINavigation.ParkingSlot.ParkingSlotStatus SlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\r\n\t\t\r\n\t\tshort axe = getHeadingAxe();\r\n\t\t\r\n\t\tfor (int i = 1; i <= 4; i++)\r\n\t\t{\r\n\t\t\tPk_DIST_FS[i] = Pk_DIST_FS[i-1];\r\n\t\t\tsum_F = Pk_DIST_FS[i] + sum_F;\r\n\t\t\t\r\n\t\t\tPk_DIST_BS[i] = Pk_DIST_BS[i-1];\r\n\t\t\tsum_B = Pk_DIST_BS[i] + sum_B;\r\n\t\t}\r\n\t\t\r\n\t\tPk_DIST_FS[0] = frontSensorDistance;\r\n\t\t//distance_F = (sum_F + Pk_DIST_FS[0])/5;\r\n\t\tdistance_F = frontSensorDistance;\r\n\t\t\r\n\t\tPk_DIST_BS[0] = backSideSensorDistance;\r\n\t\t//distance_B = (sum_B + Pk_DIST_BS[0])/5;\r\n\t\tdistance_B = backSideSensorDistance;\r\n\t\t\r\n\t\t//LCD.drawString(\"Dist_F: \" + (distance_F), 0, 6);\r\n\t\t//LCD.drawString(\"Dist_B: \" + (distance_B), 0, 7);\r\n\t\t\r\n\t\t// Saving the begin point of the PS\r\n\t\tif ((distance_F <= TRSH_SG) && (Pk_burstFS == 0))\r\n\t\t{\r\n\t\t\tPk_PosF1.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstFS = 1;\r\n\t\t\tPk_burstFE = 0;\r\n\t\t\t//Sound.beep();\r\n\t\t}\r\n\t\t\r\n\t\tif ((distance_B <= TRSH_SG) && (Pk_burstRS == 0))\r\n\t\t{\r\n\t\t\tPk_PosR1.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstRS = 1;\r\n\t\t\tPk_burstRE = 0;\r\n\t\t\t//Sound.twoBeeps();\r\n\t\t}\r\n\t\t\t\t\r\n\t\t// Saving the end point of the PS\r\n\t\tif ((distance_F >= TRSH_SG) && (Pk_burstFE == 0))\r\n\t\t{\r\n\t\t\tPk_PosF2.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstFS = 0;\r\n\t\t\tPk_burstFE = 1;\r\n\t\t\t//Sound.beep();\r\n\t\t}\r\n\t\t\r\n\t\tif ((distance_B >= TRSH_SG) && (Pk_burstRE == 0))\r\n\t\t{\r\n\t\t\tPk_PosR2.setLocation(this.pose.getX(), this.pose.getY());\r\n\t\t\tPk_burstRS = 0;\r\n\t\t\t//burstRE = 1;\r\n\t\t\t//Sound.twoBeeps();\r\n\t\t}\r\n\t\t\r\n\t\tif (Po_RoundF == 0)\t\t\t// Saving new parking slots\r\n\t\t{\t\r\n\t\t\tif ((Pk_burstRS == 0) && (Pk_burstRE == 0) && (Pk_counter < 10))\r\n\t\t\t{\r\n\t\t\t\tPosS.setLocation(((Pk_PosF1.getX() + Pk_PosR1.getX())/2), ((Pk_PosF1.getY() + Pk_PosR1.getY())/2));\r\n\t\t\t\tPosE.setLocation(((Pk_PosF2.getX() + Pk_PosR2.getX())/2), ((Pk_PosF2.getY() + Pk_PosR2.getY())/2));\r\n\t\t\t\t\r\n\t\t\t\t// Evaluation of the slot\r\n\t\t\t\tif (axe == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ((PosE.getX() - PosS.getX()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\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\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\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{\r\n\t\t\t\t\tif ((PosE.getY() - PosS.getY()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\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\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPk_slotList[Pk_counter] = new INavigation.ParkingSlot(SlotID, PosE, PosS, SlotStatus, 0);\r\n\t\t\t\tPk_counter ++;\r\n\t\t\t\t\r\n\t\t\t\tPk_burstRE = 1;\r\n\t\t\t\t\r\n\t\t\t\tSound.beepSequence();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\t\t\t\t\t// Updating the old slots\r\n\t\t{\r\n\t\t\tif ((Pk_burstRS == 0) && (Pk_burstRE == 0) && (Pk_update <= Pk_counter))\r\n\t\t\t{\r\n\t\t\t\tPosS.setLocation(((Pk_PosF1.getX() + Pk_PosR1.getX())/2), ((Pk_PosF1.getY() + Pk_PosR1.getY())/2));\r\n\t\t\t\tPosE.setLocation(((Pk_PosF2.getX() + Pk_PosR2.getX())/2), ((Pk_PosF2.getY() + Pk_PosR2.getY())/2));\r\n\t\t\t\t\r\n\t\t\t\t// Evaluation of the slot\r\n\t\t\t\tif (axe == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ((PosE.getX() - PosS.getX()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\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\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\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{\r\n\t\t\t\t\tif ((PosE.getY() - PosS.getY()) > LGNT_ROBOT)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSlotStatus = ParkingSlotStatus.SUITABLE_FOR_PARKING;\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\tSlotStatus = ParkingSlotStatus.NOT_SUITABLE_FOR_PARKING;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPk_slotList[Pk_update] = new INavigation.ParkingSlot(SlotID, PosE, PosS, SlotStatus, 0);\r\n\t\t\t\t\r\n\t\t\t\tif (Pk_update < Pk_counter)\r\n\t\t\t\t{\r\n\t\t\t\t\tPk_update ++;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tPk_update = 0;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPk_burstRE = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn; // data are saved in the shared variable\r\n\t}",
"public void parkTheBus() {\n\t\tClientCom clientCom = new ClientCom(RunParameters.ArrivalQuayHostName, RunParameters.ArrivalQuayPort);\n\t\twhile (!clientCom.open()) {\n\t\t\tSystem.out.println(\"Arrival Quay not active yet, sleeping for 1 seccond\");\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t\t;\n\t\tBusDriver busDriver = (BusDriver) Thread.currentThread();\n\t\tMessage pkt = new Message();\n\t\tpkt.setType(MessageType.BD_ARRIVING);\n\t\tpkt.setState(busDriver.getBusDriverState());\n\n\t\tclientCom.writeObject(pkt);\n\t\tpkt = (Message) clientCom.readObject();\n\t\tclientCom.close();\n\t\tbusDriver.setBusDriverState(pkt.getState());\n\t}",
"public boolean addScooterPark(Park park){\n try(CallableStatement callStmt = getConnection().prepareCall(\"{ call add_park(?,?,?,?) }\")) {\n\n callStmt.setLong(1, park.getnCharginsSlot());\n callStmt.setLong(2,park.getnParkingsSlot());\n callStmt.setLong(3,SCOOTER_PARK_TYPE_ID);\n callStmt.setLong(4,park.getPharmacy().getId());\n\n callStmt.execute();\n closeAll();\n return true;\n } catch (SQLException e) {\n return false;\n } finally {\n closeAll();\n }\n }",
"public void setParkingID(String parkingID) {\n this.parkingID = parkingID;\n }",
"public synchronized void follow(Vehicle vehicle){\n \n distance = distance - (float)((float)vehicle.getCurrentSpeed()*1000f/3600f)/100f;\n \n //System.out.println(\"Distance to drive: \" + distance);\n if (distance <= 0){\n \n Settings.messageLog.AddMessage(\"Reached end of path\");\n //System.out.println(\"weg.size() == \" + weg.size());\n try{\n vehicle.setPosition(weg.get(weg.size()-1));\n }\n catch(Exception e){vehicle.setPosition(new Vector3f(10.3f, 5.5f, 156.2f));}\n vehicle.stopDriving();\n if (destinationPlatform == null && destinationParkingSpot == null){}\n else if (destinationParkingSpot == null){\n //motionpath from waypoint to platform\n //platform sign in\n vehicle.setCurrentPlatform(destinationPlatform);\n \n } //meldt aan voor platform nieuwe route\n else {\n \n //motionpath from waypoint to parkingspot\n if (destinationPlatform == null)\n {\n try\n {\n this.destinationParkingSpot.ParkVehicle(vehicle);\n vehicle.setPosition(this.destinationParkingSpot.getPosition());\n Settings.messageLog.AddMessage(\"Park vehicle\");\n }\n catch(Exception e)\n {\n \n ErrorLog.logMsg(e.getMessage());\n }\n \n }\n \n //hier kraan geparkeerd ... ga unload\n try\n {\n this.destinationParkingSpot.ParkVehicle(vehicle);\n vehicle.setPosition(this.destinationParkingSpot.getPosition());\n }\n catch(InvalidVehicleException ie)\n {\n System.out.println(ie.getMessage());\n \n }\n\n }\n \n }\n }",
"public void setParkedLocation(String parkedLocation) {\n this.parkedLocation = parkedLocation;\n }",
"protected DynAction nextStateAfterCarTrip(DynAction oldAction, double now) {\n\t\tif (this.parkingManager.parkVehicleHere(Id.create(this.agent.getId(), Vehicle.class), agent.getCurrentLinkId(), now)){\n\t\tthis.lastParkActionState = LastParkActionState.PARKACTIVITY;\n\t\tthis.currentlyAssignedVehicleId = null;\n\t\tthis.parkingLogic.reset();\n\t\t\treturn new IdleDynActivity(this.stageInteractionType, now + configGroup.getParkduration());\n\t\t}\n\t\telse throw new RuntimeException (\"No parking possible\");\n\t}",
"private void placeKitOnStand(MyKit mk) //MultiTask\n\t{\n\t\tif(myStand.getAvailableSlotNum() == 1){\n\t\t\tmk.kit.setPosition(KitPosition.POSITION1);\n\t\t}\n\t\telse if(myStand.getAvailableSlotNum() == 2){\n\t\t\tmk.kit.setPosition(KitPosition.POSITION2);\n\t\t}\n\t\tmk.slot = myStand.getAvailableSlotNum();\n\t\tprint(\"Kit Slot number : \"+mk.slot+\" is Taken\");\n\t\tmyStand.setSlotTaken(myStand.getAvailableSlotNum());\n\t\tif(guiEnable){\n\t\t\tmk.status = KitStatus.Being_Animated;\n\t\t\tthis.KitStationGUI.doCreateAKit(mk.kit);\n\t\t\ttry {\n\t\t\t\t//guiControl = new Semaphore(0,true);//TODO: take away after gui fixes it\n\t\t\t\tthis.guiControl.acquireUninterruptibly();\n\t\t\t\tprint(\"done with boxbelt\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t//e.printStackTrace();\n\t\t\t}\n\t\t\tthis.kitRobotGUI.DoMoveKitToStand(mk.kit.guikit , mk.kit.position);\n\t\t\ttry {\n\t\t\t\t//guiControl = new Semaphore(0,true);//TODO: take away after gui fixes it\n\t\t\t\tthis.guiControl.acquireUninterruptibly();\n\t\t\t\tprint(\"done with kit robot\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t//e.printStackTrace();\n\t\t\t}\n\t\t}else{\n\t\t\tprint(\"GUI Creating kit. Finished Cearting Kit. Telling Agent.\");\n\t\t\tprint(\"GUI Moving Kit To Stand. Finished moving. Telling Agent.\");\n\t\t}\n\t\tmk.status = KitStatus.On_KitStand;\n\t\tkitStand.msgHereIsNextAgentKit(mk.kit);\n\t\tstateChanged();\n\t}",
"public void ride(Bicycle bicycle){\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.accelerate();\n bicycle.brake();\n\n }",
"public void setBraking(double braking) {\r\n this.braking = braking;\r\n }",
"public void trimBarrier(){\n game.setBarrierNumOfParties(game.getPlayersConnected());\n }",
"public void unparkVehicle(Vehicle v, int departureTime)\r\n\t\t\tthrows VehicleException, SimulationException {\r\n\t\tif (v.isParked() == false) {\r\n\t\t\tthrow new VehicleException(\"Vehicle is not parked!\");\r\n\t\t} else if (v.isQueued()) {\r\n\t\t\tthrow new VehicleException(\"Vehicle is currently in Queue!\");\r\n\t\t} else if (v.getDepartureTime() < 0) {\r\n\t\t\tthrow new VehicleException(\"Invalid deperture time!\");\r\n\t\t} else if (v.isQueued() == false && v.isParked() == false) {\r\n\t\t\tthrow new SimulationException(\"Vehicle doesn't exist.\");\r\n\t\t}\r\n\r\n\t\tif (v instanceof Car) {\r\n\t\t\tif (((Car) v).isSmall()) {\r\n\t\t\t\tif (smallCarsParked.contains(v)) {\r\n\t\t\t\t\tsmallCarsParked.remove(v);\r\n\t\t\t\t\tcarParkStatus += \"|S:P>A|\";\r\n\t\t\t\t} else if (carsParked.contains(v)) {\r\n\t\t\t\t\tcarsParked.remove(v);\r\n\t\t\t\t\tcarParkStatus += \"|S:P>A|\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new SimulationException(\"Cannot find vehicle.\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcarsParked.remove(v);\r\n\t\t\t\tcarParkStatus += \"|C:P>A|\";\r\n\t\t\t}\r\n\t\t} else if (v instanceof MotorCycle) {\r\n\t\t\tif (smallCarsParked.contains(v)) {\r\n\t\t\t\tsmallCarsParked.remove(v);\r\n\t\t\t\tcarParkStatus += \"|M:P>A|\";\r\n\t\t\t} else if (motorCyclesParked.contains(v)) {\r\n\t\t\t\tmotorCyclesParked.remove(v);\r\n\t\t\t\tcarParkStatus += \"|M:P>A|\";\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test\n void should_smart_parking_boy_always_park_car_to_parking_slot_with_more_space(){\n final int capacity = 5;\n ParkingLot parkingLotA = new ParkingLot(capacity);\n ParkingLot parkingLotB = new ParkingLot();\n ArrayList<ParkingLot> parkingLots = new ArrayList<>();\n parkingLots.add(parkingLotA);\n parkingLots.add(parkingLotB);\n ParkingBoy smartParkingBoy = new SmartParkingBoy(parkingLots);\n\n Car expectedCar = new Car();\n ParkingTicket parkingTicket = smartParkingBoy.park(expectedCar);\n Car atualCar = smartParkingBoy.fetch(parkingTicket);\n\n assertSame(expectedCar, atualCar);\n assertSame(parkingLotB, parkingTicket.getParkingLot());\n }",
"@Override\n public void truckNotification(Truck t, Notification message) {\n if (!preprocessingDone) return;\n\n //Wait frame notification - logic branches a bit.\n //if t is holding a load, travel to that location.\n if (message.equals(Notification.WAITING)) {\n if (t.getLoad() != null && t.getLoad().destination.equals(t.getLocation())) {\n t.dropoffLoad();\n\n //Check if there are more parcels to handle. If not, remove from assignment and go home.\n //If so, pick one at random and assign this truck to that.\n if (unassignedParcels.isEmpty()) {\n parcelsAssigned.remove(t);\n t.setTravelPath(dijkstra(t.getLocation(), getBoard().getTruckDepot()));\n } else {\n assignParcelTo(t);\n }\n }\n else if (t.getLoad() != null) {\n t.setTravelPath(dijkstra(t.getLocation(), t.getLoad().destination));\n } else if (parcelsAssigned.containsKey(t) && t.getLocation().isParcelHere(parcelsAssigned.get(t))) {\n t.pickupLoad(parcelsAssigned.get(t));\n } else if (parcelsAssigned.containsKey(t) && getParcels().contains(parcelsAssigned.get(t))) {\n t.setTravelPath(dijkstra(t.getLocation(), parcelsAssigned.get(t).getLocation()));\n } else if (! parcelsAssigned.containsKey(t) || getParcels().isEmpty()) {\n t.setTravelPath(dijkstra(t.getLocation(), getBoard().getTruckDepot()));\n } else if (parcelsAssigned.containsKey(t) && ! getParcels().contains(parcelsAssigned.get(t))) {\n assignParcelTo(t);\n }\n }\n }",
"protected void execute() {\n \tRobot.driveTrain.driveByArcade(_speed, 0);\n }",
"@Test\r\n public void testPark_givenNoAvailableParkingLot_thenCreateNoSpaceReceipt() {\r\n Car spyCar = spy(new Car(\"A88888\"));\r\n\r\n InOrderParkingStrategy inOrderParkingStrategy = spy(new InOrderParkingStrategy());\r\n Receipt receipt = inOrderParkingStrategy.park(null,spyCar);\r\n Assert.assertEquals(ParkingStrategy.NO_PARKING_LOT,receipt.getParkingLotName());\r\n verify(spyCar,times(1)).getName();\r\n\r\n }",
"public List<Park> getAllAvailableParks();",
"@Override\n\tpublic Parking addParking(Parking parking) {\n\t\tparking.setParkingStatus(\"AVAILABLE\");\n\t\treturn parkingRepository.addParking(parking);\n\t}",
"public void MemberOfParliament(){\n this.spendings_sum=0d;\n this.spending_repair_office=0d;\n this.how_many_trips=0;\n this.longest_trip=0;\n this.was_in_italy = false;\n }",
"protected void onTick() {\n\t\tif(car.drivingInfo.pathToGet.size() == 0 && car.carData.to == null) {\n\t\t\tcar.state = Car.WAIT_PASSENGER_TO_GO_INSIDE;\n\t\t\tSystem.out.println(\"engaged with from drive\" + car.engagedWithAID.toString());\n\t\t\tcar.addBehaviour(new TakePassenger());\n\t\t\tthis.stop();\n\t\t\treturn;\n\t\t}\n\t\t\t\t\n\t\tif(car.carData.to == null) {\n\t\t\tHouseData nextHouseToGo = car.drivingInfo.pathToGet.remove(0);\n\t\t\tcar.carData.to = nextHouseToGo;\n\t\t}\n\t\t\n\t\tint distanceDone = car.carData.distance;\n\t\tint distanceToDo = (int) SmaUtils.computeDistance(car.carData.from.position, car.carData.to.position);\n\t\t\n\t\t// if the distance left is higher than the distance the car can do in one tick, we increment the distance\n\t\tif(distanceDone+Car.CAR_SPEED < distanceToDo) {\n\t\t\tcar.carData.distance += Car.CAR_SPEED;\n\t\t\treturn;\n\t\t} \n\t\t// else, we put the car on the next house\n\t\telse if(distanceDone <= distanceToDo) {\n\t\t\tcar.carData.from = car.carData.to;\n\t\t\tcar.carData.to = null;\n\t\t\tcar.carData.distance = 0;\n\t\t\treturn;\n\t\t}\n\t}",
"lanyotech.cn.park.protoc.ParkingProtoc.Parking getParking();",
"public boolean wasParked() {\r\n\t\tif (wasParked == true) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"protected void execute() {\n \tRobot.driveTrain.keepHeadingDrive(0, 0, targetDirection);\n }",
"public void searchNearFreePark() {\n\t\tthis.generalRequest(LocalRequestType.PARK);\n\t}",
"@Test\r\n public void testPark_givenThereIsMultipleParkingLotAndFirstOneIsFull_thenCreateReceiptWithUnfullParkingLot() {\r\n Car spyCar = spy(new Car(\"A88888\"));\r\n ParkingLot spyFullParkingLot = spy(new ParkingLot(\"HardyParkinglot\",0));\r\n ParkingLot spyParkingLot = spy(new ParkingLot(\"SkyParkinglot\",1));\r\n InOrderParkingStrategy inOrderParkingStrategy = new InOrderParkingStrategy();\r\n Receipt receipt = inOrderParkingStrategy.park(Arrays.asList(spyFullParkingLot, spyParkingLot),spyCar);\r\n verify(spyCar,times(1)).getName();\r\n verify(spyFullParkingLot,times(0)).getName();\r\n verify(spyParkingLot,times(1)).getName();\r\n }",
"public lanyotech.cn.park.protoc.ParkingProtoc.Parking getParking() {\n return parking_;\n }",
"protected void parkItem(Requestor item, String id) {\n parked.put(id, item);\n }",
"@Override\n public List<String> parkVehicle(String registrationNumber, String color) {\n List<String> retVal = new ArrayList<>();\n try {\n Vehicle vehicle = new Car(registrationNumber, color);\n Ticket ticket = parkingManager.parkVehicle(vehicle);\n\n if (ticket == null) {\n retVal.add(PARKING_LOT_FULL_RESPONSE);\n } else {\n retVal.add(String.format(PARK_VEHICLE_RESPONSE, ticket.getSlotId()));\n }\n } catch (ParkingException e) {\n retVal.add(e.getMessage());\n }\n return retVal;\n }",
"@Test\r\n public void testPark_givenThereIsOneFullParkingLot_thenCreateReceipt() {\r\n Car spyCar = spy(new Car(\"A88888\"));\r\n ParkingLot spyParkingLot = spy(new ParkingLot(\"HardyParkinglot\",0));\r\n InOrderParkingStrategy inOrderParkingStrategy = new InOrderParkingStrategy();\r\n Receipt receipt = inOrderParkingStrategy.park(Collections.singletonList(spyParkingLot),spyCar);\r\n Assert.assertEquals(ParkingStrategy.NO_PARKING_LOT,receipt.getParkingLotName());\r\n verify(spyParkingLot,times(0)).getName();\r\n }",
"@Test\n public void testParkVehicle() throws Exception {\n System.out.println(\"ParkVehicle\");\n\n ParkingSpot spot = new BargeSpot(new Vector3f(0, 0, 0));\n spot.ParkVehicle(new Barge(null, 1f, null, null));\n boolean result = spot.isEmpty();\n // TODO review the generated test code and remove the default call to fail.\n assertEquals(false, result);\n }",
"public Builder setParking(lanyotech.cn.park.protoc.ParkingProtoc.Parking value) {\n if (parkingBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n parking_ = value;\n onChanged();\n } else {\n parkingBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n return this;\n }",
"@Override\n\tpublic void action() \n\t{\n\t\tif(this.user.arrivedToFinalStation())\n\t\t{\n\t\t\tthis.user.stablishDesiredVehicle();\n\t\t\tthis.user.stablishDesiredStation();\n\t\t}\n\t\t\n\t\t//printing info\n\t\tSystem.out.println(\"\\nI'm \" + this.user.getLocalName() + \": I'm on \" + this.user.getCurrentStation() + \" and I want to go to \" + this.user.desiredStation + \" by \" + this.user.desiredVehicle +\".\\n\");\n\t\t//this.mensaje=scanner.nextLine(); //debug\n\t\t\n\t\t//PetitionRequest\n\t\tSystem.out.println(\"I make a vehicle request to \" + this.user.getCurrentStation() + \": I'm on \" + this.user.getCurrentStation() + \" and I want to go to \" + this.user.desiredStation + \" by \" + this.user.desiredVehicle + \".\");\n\t\tthis.msgObject = new Capsule(null,this.user.getDesiredVehicle(),this.user.getDesiredStation(),null);\n\t\tUtils.enviarMensaje(myAgent, this.user.getCurrentStation(), this.msgObject, \"VEHICLE_REQUEST\");\n\t\t\n\t\t//Waiting for answer\n\t\tACLMessage msg=this.myAgent.blockingReceive(\n\t\t\t\tMessageTemplate.and(\n\t\t\t\t\t\tMessageTemplate.MatchPerformative(ACLMessage.REQUEST), \n\t\t\t\t\t\tMessageTemplate.MatchOntology(\"ontologia\"))\n\t\t\t\t);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tthis.comment = msg.getEnvelope().getComments();\n\t\t\tthis.msgObject = (Capsule) msg.getContentObject();\n\t\t\tSystem.out.println(\"\\t\" + this.user.getCurrentStation() + \" told me \" + this.comment + \". \");\n\t\t\t\n\t\t\tswitch(this.comment)\n\t\t\t{\n\t\t\tcase \"VEHICLE_DELIVERY\":\n\t\t\t\t//1. The station give to the user the vehicle normaly\n\t\t\t\tif(msgObject.getVehicle() != null) {\n\t\t\t\t\tthis.user.takeVehicle(msgObject.getVehicle());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//2. The user goes to the final station\n\t\t\t\tthis.notifyMonitor(\"moving\");\n\t\t\t\tthis.user.goToStation();\n\t\t\t\tthis.notifyMonitor(\"waiting\");\n\n\t\t\t\t//3. Leaves the vehicle on the final station\n\t\t\t\tif(this.user.hasVehicle())\n\t\t\t\t{\n\t\t\t\t\tthis.vehicleTemp = this.user.leaveVehicle();\n\t\t\t\t\tmsgObject = new Capsule(this.vehicleTemp,null, null, null);\n\t\t\t\t\tUtils.enviarMensaje(myAgent, this.user.getCurrentStation(), this.msgObject, \"VEHICLE_RETURN\");\n\t\t\t\t}\n\n\t\t\t\t//4. The user waits a bit\n\t\t\t\tthis.user.waitSomeTime(8000);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"UNSATISFACTORY_REQUEST\":\n\t\t\t\t// The station reports that the request couldn't be completed properly\n\t\t\t\t//1. The capsule can cointain: alternativeStation and alternativeVehicle\n\t\t\t\tif(msgObject.getStation() != null) {\t//checks if there's an alternative reserved station\n\t\t\t\t\tSystem.out.println(\"\\t\"+this.user.getCurrentStation() + \" told me that there's an alternative route -> \" + msgObject.getStation() + \". \");\n\t\t\t\t\tthis.user.stablishDestinationStation(msgObject.getStation());\n\t\t\t\t}\n\t\t\t\tif(msgObject.getVehicle() != null) { //checks if the station gave an alternative vehicle\n\t\t\t\t\tSystem.out.println(\"\\t\"+this.user.getCurrentStation() + \" gived to me an alternative vehicle -> \" + msgObject.getVehicle().getType() + \". \");\n\t\t\t\t\tthis.user.takeVehicle(msgObject.getVehicle());\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"\\tI have to go walking. \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//2. Moving to the destination station\n\t\t\t\tthis.notifyMonitor(\"moving\");\n\t\t\t\tthis.user.goToStation();\n\t\t\t\tthis.notifyMonitor(\"waiting\");\n\n\t\t\t\t//3. If has a vehicle, the user leaves it\n\t\t\t\tif(this.user.hasVehicle()) \n\t\t\t\t{\n\t\t\t\t\t//send the vehicle to the station\n\t\t\t\t\tthis.vehicleTemp = this.user.leaveVehicle();\n\t\t\t\t\tmsgObject = new Capsule(this.vehicleTemp,null, null, null);\n\t\t\t\t\tUtils.enviarMensaje(myAgent, this.user.getCurrentStation(), this.msgObject, \"VEHICLE_RETURN\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//4. the user waits before restarting the behavior\n\t\t\t\tthis.user.waitSomeTime(4000);\n\t\t\t}\n\t\t}\n\t\tcatch (UnreadableException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"boolean hasParking();",
"@Override\n protected void execute() {\n sClimber.setMotorSpeed(-stick.getRawAxis(1));\n //sIntake.WristMove(mWristAngle);\n //sElevator.setPositionLowGear(mElevatorHieght);\n // SmartDashboard.putNumber(\"Wrist Volts\", RobotMap.WristMotor.getMotorOutputVoltage());\n }",
"@Override\n public void runOpMode() throws InterruptedException {\n\n AutoMode = new AutoUC3_Park();\n autoIntake = new Intake(hardwareMap);\n autoArm = new Arm(hardwareMap);\n autoChassis = new Chassis(hardwareMap);\n\n waitForStart();\n\n //Initialize on press of play\n autoChassis.initChassis();\n autoArm.initArm();\n autoIntake.initIntake();\n\n while (opModeIsActive()&& !isStopRequested() && !parked) {\n parked = AutoMode.AutoUC3_Park_Method(\n this,\n playingAlliance,\n parkingPlaceNearSkyBridge,\n startInBuildingZone,\n autoChassis,\n autoArm,\n autoIntake);\n }\n }",
"public Park(int parkId, String name, double latitude, double longitude, String washroom,\n String neighName, String neighURL, String streetNumber, String streetName) {\n this.parkId = parkId;\n this.name = name;\n this.latitude = latitude;\n this.longitude = longitude;\n this.washroom = washroom;\n this.neighbourhoodName = neighName;\n this.neighbourhoodurl = neighURL;\n this.streetNumber = streetNumber;\n this.streetName = streetName;\n }",
"@Test\n\tvoid testParkCarForGivenCarDetailsWithAvailableSlotThenReturnTrue() {\n\t\tint totalSlots = 6;\n\t\tString regNumber = \"KA-01-HH-1234\", color = \"White\";\n\t\tParkingArea parkingArea = new ParkingArea(totalSlots); \n\t\t\n\t\t//When: Method parkCar is executed\n\t\tboolean isParked = parkingArea.parkCar(regNumber, color);\n\t\t\n\t\t//Then: Verify isParked status as true\n\t\tassertEquals(true, isParked);\n\t}",
"private void setupLot() //sync current state of the Parking Lot\n {\n \t\n \tsndMsg(\"REQUEST 0000\");\n \t//wait(500);\n \tsndMsg(\"REQUEST 0001\");\n \t//wait(500);\n \tsndMsg(\"REQUEST 0002\");\n \t\n \t//ImageButton btn = (ImageButton) findViewById(R.id.bay0000);\n \tImageView iv = (ImageView) findViewById(R.id.imageView1);\n \t\n \tanim = new RotateAnimation(0, -45.0f, 0, 0);\n \tanim.setFillAfter(true);\n \tanim.setDuration(0);\n \t//iv.setAnimation(anim);\n \tiv = (ImageView) findViewById(R.id.imageView2);\n \t//iv.setAnimation(anim);\n \t\n \t//btn.setAnimation(anim);\n \t\n \t//btn1.setAnimation(anim);\n \n \n \t\n\t}",
"@Override\n public void execute() {\n // Use squared inputs\n // Might want to change that for competition\n m_driveTrain.arcadeDrive(m_throttle.getAsDouble(), m_turn.getAsDouble(), true);\n }",
"void removeRide(String name, String park);",
"public void execute(){\n drivetrain.tankDrive(0.6 * direction, 0.6 * direction);\n // slower than full speed so that we actually bring down the bridge,\n // not just slam it and push balls the wrong way\n }",
"@Test\n\tvoid testParkCarForGivenCarDetailsAndNoSlotIsEmptyThenReturnTrue() {\n\t\tint totalSlots = 1;\n\t\tString regNumber = \"KA-01-HH-1234\", color = \"White\";\n\t\tParkingArea parkingArea = new ParkingArea(totalSlots); \n\t\tparkingArea.parkCar(\"KA-012-12\", \"Black\");\n\t\t\n\t\t//When: Method parkCar is executed\n\t\tboolean isParked = parkingArea.parkCar(regNumber, color);\n\t\t\n\t\t//Then: Verify isParked status as false\n\t\tassertEquals(false, isParked);\n\t}",
"public boolean addDronePark(Park park){\n try(CallableStatement callStmt = getConnection().prepareCall(\"{ call add_park(?,?,?,?) }\")) {\n\n callStmt.setLong(1, park.getnCharginsSlot());\n callStmt.setLong(2,park.getnParkingsSlot());\n callStmt.setLong(3,DRONE_PARK_TYPE_ID);\n callStmt.setLong(4,park.getPharmacy().getId());\n\n callStmt.execute();\n closeAll();\n return true;\n } catch (SQLException e) {\n return false;\n } finally {\n closeAll();\n }\n }",
"public Park findParkByParkId(Long park_id) {\n\t\treturn parkDao.findParkByParkId(park_id);\n\t}",
"public void waitingForPartner();",
"private void pickParkingSpot() {\n System.out.println(\"These are the available parking spots to choose in \" + pickedparkinglot.getName() + \":\");\n System.out.println(pickedparkinglot.listParkingSpots());\n boolean keepgoing = true;\n String command;\n while (keepgoing) {\n System.out.println(\"Choose the codename for your intended parking spot: \");\n command = input.next();\n for (ParkingSpot ps : pickedparkinglot.getParkingspots()) {\n if (command.toLowerCase().equals(ps.getCodename().toLowerCase())) {\n pickedparkingspot = ps;\n keepgoing = false;\n }\n }\n if (keepgoing) {\n System.out.println(\"Invalid codename, try again.\");\n }\n }\n }",
"@Override\r\n\tpublic Answer handle(Request request) throws Exception {\r\n\t\tGPS startPoint = request.getStartPos();\r\n\t\tGPS endPoint = request.getEndPos();\r\n\t\tCurrentDistribution curDis = CurrentDistribution.getInstance();\r\n\t\tArrayList<Station> givenTypeAvaStations = null;// whether this init is a correct choice in case that ArrayList can not be covered directly \r\n\t\tdouble ridingSpeed = 0.00001;//if not given proper bicycle type, time cost would be extremely large\r\n\t\tif(request.getBikeType().equalsIgnoreCase(\"E\")) {\r\n\t\t\tridingSpeed = Server.eleRidingSpeed;\r\n\t\t\tgivenTypeAvaStations = curDis.geteAvaStationList();\r\n\t\t}\r\n\t\t\r\n\t\tif(request.getBikeType().equalsIgnoreCase(\"M\")) {\r\n\t\t\tridingSpeed = Server.mecRidingSpeed;\r\n\t\t\tgivenTypeAvaStations = curDis.getmAvaStationList();\r\n\t\t}\r\n\r\n\t\tif(givenTypeAvaStations.size() == 0) {\r\n\t\t\tServer.error(\"no available station containing given type of bicycle\");\r\n\t\t}\r\n\r\n\t\tStation minStartStation = givenTypeAvaStations.get(0);\r\n\t\tStation minEndStation = curDis.getReturnableStationList().get(0);\r\n\t\t\r\n\t\tdouble minEndDis = Math.sqrt((minEndStation.getPos().getX() - endPoint.getX()) * (minEndStation.getPos().getX() - endPoint.getX()) + \r\n\t\t\t\t(minEndStation.getPos().getY() - endPoint.getY())*(minEndStation.getPos().getY() - endPoint.getY()));\r\n\t\t\r\n\t\tfor(Station s: curDis.getReturnableStationList()) {\r\n\t\t\tdouble endDis = Math.sqrt((s.getPos().getX() - endPoint.getX())*(s.getPos().getX() - endPoint.getX()) + \r\n\t\t\t\t\t(s.getPos().getY() - endPoint.getY()) * (s.getPos().getY() - endPoint.getY()));\r\n\t\t\tif( endDis < minEndDis) {\r\n\t\t\t\tminEndStation = s;\r\n\t\t\t\tminEndDis = endDis; \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tdouble minWalkRideTime = Math.sqrt((minStartStation.getPos().getX() - startPoint.getX()) * (minStartStation.getPos().getX() - startPoint.getX())+\r\n\t\t\t\t(minStartStation.getPos().getY() - startPoint.getY()) * (minStartStation.getPos().getY() - startPoint.getY()))/\r\n\t\t\t\tServer.walkingSpeed +\r\n\t\t\t\t(Math.abs(minStartStation.getPos().getX() - endPoint.getX())+ \r\n\t\t\t\t\t\tMath.abs(minStartStation.getPos().getY() - endPoint.getY()))/\r\n\t\t\t\tridingSpeed;\r\n\t\t\r\n\t\tfor(Station s: givenTypeAvaStations) {\r\n\t\t\tdouble walkRideTime = Math.sqrt((s.getPos().getX() - startPoint.getX()) * (s.getPos().getX() - startPoint.getX())+\r\n\t\t\t\t\t(s.getPos().getY() - startPoint.getY()) * (s.getPos().getY() - startPoint.getY()))/\r\n\t\t\t\t\tServer.walkingSpeed +\r\n\t\t\t\t\t(Math.abs(s.getPos().getX() - endPoint.getX())+ \r\n\t\t\t\t\t\t\tMath.abs(s.getPos().getY() - endPoint.getY()))/\r\n\t\t\t\t\tridingSpeed;\r\n\t\t\tif( walkRideTime < minWalkRideTime) {\r\n\t\t\t\tminStartStation = s;\r\n\t\t\t\tminWalkRideTime = walkRideTime; \r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\r\n\t\tdouble minStartDis = Math.sqrt((minStartStation.getPos().getX() - startPoint.getX())*(minStartStation.getPos().getX() - startPoint.getX())\r\n\t\t\t\t+ (minStartStation.getPos().getY() - startPoint.getY())*(minStartStation.getPos().getY() - startPoint.getY()));\r\n\t\tdouble minRideDis = (Math.abs(minStartStation.getPos().getX() - minEndStation.getPos().getX())+ \r\n\t\t\t\tMath.abs(minStartStation.getPos().getY() - minEndStation.getPos().getY()));\r\n\t\tdouble minTime = (minEndDis + minStartDis)/ Server.walkingSpeed + minRideDis/ridingSpeed;\r\n\t\tdouble minDis = minStartDis + minEndDis + minRideDis;\r\n\t\tif(minTime > 500) {\r\n\t\t\tthrow new Exception(\"BikeType input illegal.\");\r\n\t\t}\r\n\t\t\r\n\t\tAnswer ans = new Answer(minStartStation, minEndStation, minTime, minDis);\r\n\t\treturn ans;\r\n\t}",
"public void deleteBarrier() {\n if(stater == 3) return;\n stater = 3;\n }",
"public void execute() {\n\t\t\n\t\tdrivetrain.updateAnglePID();\n\t\t\n//\t\tif (drivetrain.currentControl()) {\n//\t\t\tdrivetrain.shiftGears();\n//\t\t}\n\t}",
"protected void execute() {\n \tdrivemotors.tankDrive(leftMotor,rightMotor);\n }",
"private void carsReadyToLeave(){\n\t Car car = cpview.getFirstLeavingCar();\n\t while (car!=null) {\n\t \tif (car.getHasToPay()){\n\t\t car.setIsPaying(true);\n\t\t paymentCarQueue.addCar(car);\n\t \t}\n\t \telse {\n\t \t\tcarLeavesSpot(car);\n\t \t}\n\t car = cpview.getFirstLeavingCar();\n\t }\n\t }",
"@Override\n protected void execute() {\n Robot.tapeAlignSys.enable();\n Robot.lidarAlignSys.enable();\n if (Robot.useDrive) {\n double joy_vals[] = Robot.oi.getJoyXYZ(joy);\n\n double x = joy_vals[0];\n double y = joy_vals[1] * m_forward_speed_limit;\n double z = joy_vals[2] * .5;\n\n if (!joy.getRawButton(5)) { // Button 5 is pid override\n // Get sensor feedback for strafe\n x = .5 * x + Robot.tapeAlignSys.get_pid_output();\n if (x > 1) { x = 1; }\n if (x < -1) { x= -1; }\n\n double distance = Robot.stormNetSubsystem.getLidarDistance();\n SmartDashboard.putNumber(\"Lidar distance (cm)\",distance);\n\n // Get Lidar alignment for Z axis\n// if (z < 100) { // only align if close\n// z = z + Robot.lidarAlignSys.get_pid_output();\n// if (z > 1) { z = 1; }\n// if (z < -1) { z= -1; }\n// }\n\n if (distance < m_distance_scale_factor) {\n // Modulate driver forward input\n if (y > 0 && distance < (m_target_distance + m_distance_scale_factor)) {\n y = y * ((distance - m_target_distance)/(m_distance_scale_factor)) ;\n if (y<0) y = 0;\n } \n }\t\n }\n Robot.drive.driveArcade(x,y,z);\n }\n }",
"@Override\n protected void execute() {\n if(state == Value.kOff) {\n System.out.println(\"Toggling Drivetrain Gearing\");\n if (gear == RobotMap.SLOW) {\n dt.setGearbox(RobotMap.FAST);\n System.out.println(\"Gearing: HIGH SPEED\");\n } else {\n dt.setGearbox(RobotMap.SLOW);\n System.out.println(\"Gearing: SLOW SPEED\");\n }\n }\n else{\n if(state != gear)\n dt.setGearbox(state);\n if(state == RobotMap.FAST)\n System.out.println(\"Gearing: HIGH SPEED\");\n else\n System.out.println(\"Gearing: SLOW SPEED\");\n }\n\n sInFastGear.set(state == RobotMap.FAST);\n }",
"@Test\n public void testPark_givenThereIsOneFullParkingLot_thenCreateNoReceipt(){\n\n Car car=new Car(\"car\");\n Car otherCar=new Car(\"other\");\n\n ParkingLot parkingLot=new ParkingLot(\"parkinglot\",1);\n List<ParkingLot>parkingLots= Arrays.asList(parkingLot);\n\n parkingLot.getParkedCars().add(otherCar);\n\n InOrderParkingStrategy inOrderParkingStrategy=spy(new InOrderParkingStrategy());\n\n Receipt receipt=inOrderParkingStrategy.park(parkingLots,car);\n\n verify(inOrderParkingStrategy,times(1)).createNoSpaceReceipt(car);\n Assert.assertEquals(\"car\",receipt.getCarName());\n }",
"public static Result submitParkingWatch(){\n \tForm<ParkingLocation> filledForm = Form.form(ParkingLocation.class).bindFromRequest();\n \tParkingLocation location = filledForm.get();\n \t\n \t// handle new information\n// \tParkingLocation.logNew(location);\n \t\n \t// render the splash page again\n \treturn ok(index.render(byline, maidForm, parkingForm));\n \t\n }",
"private void travelToAirport()\n {\n try\n { sleep ((long) (1 + 30000 * Math.random ()));\n }\n catch (InterruptedException e) {}\n }",
"@Test\r\n public void testPark_givenThereIsOneParkingLotWithSpace_thenCreateReceipt() {\r\n Car spyCar = spy(new Car(\"A88888\"));\r\n ParkingLot spyParkingLot = spy(new ParkingLot(\"HardyParkinglot\",1));\r\n InOrderParkingStrategy inOrderParkingStrategy = spy(new InOrderParkingStrategy());\r\n Receipt receipt = inOrderParkingStrategy.park(Collections.singletonList(spyParkingLot),spyCar);\r\n Assert.assertEquals(\"HardyParkinglot\",receipt.getParkingLotName());\r\n Assert.assertEquals(\"A88888\",receipt.getCarName());\r\n verify(spyParkingLot,times(1)).getName();\r\n verify(spyCar,times(1)).getName();\r\n }",
"public Park(int parkId, String name, double latitude, double longitude, String washroom,\n String neighName, String neighURL, String streetNumber, String streetName,\n String[] facility, String[] feature) {\n this.parkId = parkId;\n this.name = name;\n this.latitude = latitude;\n this.longitude = longitude;\n this.washroom = washroom;\n this.neighbourhoodName = neighName;\n this.neighbourhoodurl = neighURL;\n this.streetNumber = streetNumber;\n this.streetName = streetName;\n this.facility = facility;\n this.feature = feature;\n }",
"protected void execute() {\n\t\tdistanceToCenter = SmartDashboard.getNumber(\"toteOffset\", 0);\n\t\tif (distanceToCenter < -3) {\n\t\t\tRobot._driveTrain.tankDrive(-0.23, 0.23);\n\t\t} else if (distanceToCenter > 3) {\n\t\t\tRobot._driveTrain.tankDrive(0.23, -0.23);\n\t\t}\n\t}",
"public synchronized Optional<Receipt> park(Car car) {\n Optional<ParkingSlot> parkingSlot = parkingSlots.stream().filter(slot -> slot.canPark(car)).findFirst();\n if (parkingSlot.isPresent()) {\n if (parkingSlot.get().park(car)) {\n return Optional.of(new Receipt(parkingSlot.get(), LocalDateTime.ofInstant(clock.instant(), clock.getZone())));\n }\n }\n return Optional.empty();\n }",
"@Override\n public void execute() {\n swerve.drive(0, 0, \n turnPID.calculate(swerve.getHeadingDouble(), angleSetpoint) * Constants.Swerve.kMaxAngularSpeed\n , false);\n }",
"public void brake() {\n\t\tsetPower(Motor.STOP);\r\n\t}",
"private void doReserve() {\n pickParkingLot();\n pickParkingSpot();\n pickTime();\n pickDuration();\n int amount = pickedparkinglot.getPrice() * pickedduration;\n if (pickedAccount.getBalance() >= amount) {\n currentReservation = new Reservation(pickedparkingspot, pickedAccount, pickedtime, pickedduration);\n validateReservation(currentReservation);\n } else {\n System.out.println(\"Insufficient balance\");\n }\n }",
"public long getParkingId() {\n return parkingId_;\n }",
"public long getParkingId() {\n return parkingId_;\n }",
"public long getParkingId() {\n return parkingId_;\n }",
"public long releaseVehicle(Vehicle vehicle) {\n long costToPark = vehicle.calculateCost(HourlyRate);\n vehicle.departSpaces();\n return costToPark;\n }",
"@Override\n protected void execute() {\n Robot.driveTrain.tankDrive(1);\n }",
"public void onOKclick() throws SQLException {\n ParkPlace parkPlace = Datasource.getInstance().findParking((String) towns.getValue());\n Class pomoc = parkPlace.getClass();\n int hour = Integer.parseInt(hours.getText());\n basePrice.setText(String.valueOf(parkPlace.getBaseHourPrice()));\n\n type.setText(pomoc.getName().replace(\"ParkPlaces.\",\"\").replace(\"Parking\",\"\"));\n if (this.user instanceof Student){\n cost.setText(String.format(\"%.2f\",parkPlace.calculatePrice((Student) this.user,hour)) + \" €\");\n }\n\n else\n if (this.user instanceof DisabledPerson){\n cost.setText(String.format(\"%.2f\",parkPlace.calculatePrice((DisabledPerson) this.user,hour)) + \" €\");\n\n }\n\n else {\n cost.setText(parkPlace.calculatePrice(this.user,hour) + \" €\");\n }\n if (parkPlace.getNumOfDPPSpots() == 0 && this.user instanceof DisabledPerson)\n warning.setText(\"Warning! This parking lot does not have exclusive places for Disabled people!\");\n if (this.user.getCredit() < Double.parseDouble(cost.getText().replace(\" €\",\"\")) ){\n funds.setText(\"Insufficient funds, please increase your account balance.\");\n pay.setDisable(true);\n return;\n }\n funds.setText(\"\");\n pay.setDisable(false);\n this.priceToBePaid = Double.parseDouble(cost.getText().replace(\" €\",\"\"));\n }",
"public Trip(Vehicle v, boolean round) {\r\n this.vehicle = v;\r\n roundTrip = round;\r\n }",
"public long getParkingId() {\n return parkingId_;\n }",
"public long getParkingId() {\n return parkingId_;\n }",
"public long getParkingId() {\n return parkingId_;\n }",
"public void addBike (Bike bike) {\n if (this.bikes.size() <= 4) { // add limitation on number of parked bikes to 5\n this.bikes.add(bike);\n } else {\n System.err.printf(\"%nNo free space to park bike \" +\n \"with ID '%d' in station %d!%n\", bike.getBikeID(), this.stationID);\n }\n }",
"private void carsReadyToLeave(){\n\t\t\tCar car = getFirstLeavingCar();\r\n\t\t\twhile (car!=null) {\r\n\t\t\t\tif (car.getHasToPay()){\r\n\t\t\t\t\tcar.setIsPaying(true);\r\n\t\t\t\t\tpaymentCarQueue.addCar(car);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcarLeavesSpot(car);\r\n\t\t\t\t}\r\n\t\t\t\tcar = getFirstLeavingCar();\r\n\t\t\t}\r\n\t\t}",
"public void passivate()\n {\n }",
"@Test\n public void testPark_givenNoAvailableParkingLot_thenCreateNoSpaceReceipt(){\n\n Car car=new Car(\"car\");\n\n ParkingLot parkingLot=new ParkingLot(\"parkinglot\",1);\n List<ParkingLot>parkingLots= Arrays.asList(parkingLot);\n\n InOrderParkingStrategy inOrderParkingStrategy=spy(new InOrderParkingStrategy());\n\n Receipt receipt=inOrderParkingStrategy.park(null,car);\n\n verify(inOrderParkingStrategy,times(1)).createNoSpaceReceipt(car);\n Assert.assertEquals(\"car\",receipt.getCarName());\n\n }",
"@Override\n public void getFee(ParkingBill parkingBill)\n {\n double hoursParked = parkingBill.getHoursParked();\n\n if(hoursParked <= 3)\n {\n parkingBill.setAmountDue(5.00);\n }\n else if(hoursParked > 3 && hoursParked <= 13)\n {\n parkingBill.setAmountDue(5.00 + (Math.ceil(hoursParked) - 3));\n }\n else\n {\n parkingBill.setAmountDue(15.00);\n }\n }"
]
| [
"0.7173254",
"0.6926365",
"0.68743044",
"0.6526803",
"0.65060306",
"0.65019727",
"0.64896524",
"0.61731416",
"0.6143932",
"0.6085493",
"0.5988003",
"0.5982546",
"0.5854367",
"0.5763413",
"0.56812596",
"0.56730753",
"0.55890113",
"0.5580352",
"0.5571482",
"0.55684984",
"0.5537438",
"0.55097455",
"0.5467126",
"0.54244787",
"0.5419404",
"0.5412947",
"0.54126877",
"0.5370818",
"0.5354661",
"0.5352067",
"0.53425306",
"0.53356826",
"0.53290576",
"0.53222096",
"0.5310725",
"0.5304975",
"0.52997416",
"0.52771986",
"0.52572584",
"0.5255339",
"0.5248075",
"0.5232159",
"0.52281994",
"0.5200944",
"0.5196983",
"0.5192307",
"0.5167399",
"0.51594806",
"0.51557016",
"0.5150279",
"0.51497734",
"0.5147032",
"0.51396483",
"0.51382613",
"0.51341856",
"0.5131862",
"0.51285064",
"0.5127474",
"0.5126775",
"0.51160556",
"0.51139057",
"0.51131606",
"0.5101668",
"0.5099945",
"0.5073334",
"0.50724226",
"0.5070018",
"0.50679433",
"0.5052892",
"0.5047112",
"0.50455487",
"0.50445557",
"0.503538",
"0.50282276",
"0.5027073",
"0.5025409",
"0.50218636",
"0.50186396",
"0.50058264",
"0.50054294",
"0.4997263",
"0.49886724",
"0.49868628",
"0.49766716",
"0.49727425",
"0.49662",
"0.49662",
"0.49662",
"0.4960468",
"0.4957816",
"0.49562508",
"0.49518895",
"0.4950165",
"0.4950165",
"0.4950165",
"0.494759",
"0.49386436",
"0.49382824",
"0.49272922",
"0.49249476"
]
| 0.7551167 | 0 |
the synchronized function choose_routine is used to decide which routine to take for the trip. the user's last_routine attribute will be arranged by this routine variable. routine: the decided taken routine | public synchronized void choose_routine(Routine routine) throws Exception{
routine.getSource().add_user(this);
routine.getDestination().add_user(this);
this.last_routine = routine;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"BehavioralFeature getRoutine();",
"public synchronized void take(Station s, Bicycle b, Bank_Card bank_card) throws Exception{\r\n\t\tif(!s.equals(this.last_routine.getSource())){System.out.println(\"CHOOSE THE STATION OF YOUR ROUTINE\");throw new Exception(\"WRONG STATION\");}\r\n\t\tif(this.bicycle!=null){System.out.println(\"Already Got a Bicycle\");throw new Exception(\"ALREADY GOT A BIKE\");}\r\n\t\ts.remove_user(this);\r\n\t\tif(!s.isState()){System.out.println(\"offline - out of order!\");throw new Exception(\"OFFLINE\");}\r\n\t\tthis.setPosition(s.getPosition());\r\n\t\tif(b instanceof Bicycle_Mech){\r\n\t\t\tif(s.count_mech() == 0){System.out.println(\"no more mech bicycles available\");}\r\n\t\t\telse{\r\n\t\t\t\tfor(Map.Entry<Slot,Bicycle_Mech> me:s.getPlaces_mech().entrySet()){\r\n\t\t\t\t\tif(me.getValue()!=null){\r\n\t\t\t\t\t\tthis.bicycle = me.getValue();s.getPlaces_mech().put(me.getKey(), null);\r\n\t\t\t\t\t\ts.setRent_times(s.getRent_times()+1);s.notify_users();\r\n\t\t\t\t\t\tthis.bicycle.setNumber_rides(this.bicycle.getNumber_rides()+1);\r\n\t\t\t\t\t\tif(bank_card.getOwner().equals(this)){this.bicycle.setBank_card_to_use(bank_card);}\r\n\t\t\t\t\t\tif(!bank_card.getOwner().equals(this)){System.out.println(\"choose a right bank card\");throw new Exception(\"WRONG BANK CARD USER\");}\t\r\n\t\t\t\t\t\tthis.bicycle.setUser(this);\r\n\t\t\t\t\t\tthis.setPosition(s.getPosition());\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(b instanceof Bicycle_Elec){\r\n\t\t\tif(s.count_elec() == 0){System.out.println(\"no more elec bicycles available\");}\r\n\t\t\telse{\r\n\t\t\t\tfor(Map.Entry<Slot,Bicycle_Elec> me:s.getPlaces_elec().entrySet()){\r\n\t\t\t\t\tif(me.getValue()!=null){\r\n\t\t\t\t\t\tthis.bicycle = me.getValue();s.getPlaces_elec().put(me.getKey(), null);\r\n\t\t\t\t\t\ts.setRent_times(s.getRent_times()+1);s.notify_users();\r\n\t\t\t\t\t\tthis.bicycle.setNumber_rides(this.bicycle.getNumber_rides()+1);\r\n\t\t\t\t\t\tif(bank_card.getOwner().equals(this)){this.bicycle.setBank_card_to_use(bank_card);}\r\n\t\t\t\t\t\tif(!bank_card.getOwner().equals(this)){System.out.println(\"choose a right bank card\");throw new Exception(\"WRONG BANK CARD USER\");}\t\r\n\t\t\t\t\t\tthis.bicycle.setUser(this);\r\n\t\t\t\t\t\tthis.setPosition(s.getPosition());\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"abstract void runRoutine();",
"private void createRoutine() {\n String s = (String) JOptionPane.showInputDialog(\n this,\n \"Name the new routine:\",\n \"Create new\",\n JOptionPane.PLAIN_MESSAGE,\n null, null, null);\n\n if (s != null) {\n Routine r = new Routine(s);\n collection.add(r);\n listModel.addElement(r);\n list.setSelectedValue(r, true);\n new WorkoutsFrame(r);\n }\n }",
"public interface SelectStrategy {\n\n /**\n * Indicates a blocking select should follow.\n */\n int SELECT = -1;\n /**\n * Indicates the IO loop should be retried, no blocking select to follow directly.\n */\n int CONTINUE = -2;\n /**\n * Indicates the IO loop to poll for new events without blocking.\n */\n int BUSY_WAIT = -3;\n\n /**\n * The {@link SelectStrategy} can be used to steer the outcome of a potential select\n * call.\n *\n * @param selectSupplier The supplier with the result of a select result.\n * @param hasTasks true if tasks are waiting to be processed.\n * @return {@link #SELECT} if the next step should be blocking select {@link #CONTINUE} if\n * the next step should be to not select but rather jump back to the IO loop and try\n * again. Any value >= 0 is treated as an indicator that work needs to be done.\n */\n int calculateStrategy(IntSupplier selectSupplier, boolean hasTasks) throws Exception;\n}",
"public void chooseForMe() {\n }",
"public void processUser() {\r\n Scanner sc = new Scanner(System.in);\r\n model.setAllparameters(inputIntValueWithScanner(sc, View.INPUT_INT_HOUR_DATA, GlobalConstants.PRIMARY_HOUR_MAX_BARRIER),// the correct input (hour,minute,second) is sent to the model\r\n inputIntValueWithScanner(sc, View.INPUT_INT_MINUTE_DATA, GlobalConstants.PRIMARY_MINUTE_MAX_BARRIER),\r\n inputIntValueWithScanner(sc, View.INPUT_INT_SECOND_DATA, GlobalConstants.PRIMARY_SECOND_MAX_BARRIER));\r\n int k = 0;\r\n do { //at least once the menu option is chosen (for option number 6 (break) for example)\r\n k = inputIntValueWithScanner(sc, View.CHOOSE_OPERATION, GlobalConstants.MENU_OPTION_MAX_VALUE);\r\n chooseOperation(k);\r\n } while (k != GlobalConstants.MENU_OPTION_MAX_VALUE); //menu loop until break option isn't chosen\r\n\r\n }",
"public synchronized void park(Station s) throws Exception{\r\n\t\tif(!s.equals(this.last_routine.getDestination())){System.out.println(\"CHOOSE THE STATION OF YOUR ROUTINE\");throw new Exception(\"WRONG STATION\");}\r\n\t\ts.remove_user(this);\r\n\t\tif(!s.isState()){System.out.println(\"offline - out of order!\");throw new Exception(\"OFFLINE\");}\r\n\t\tif(this.bicycle == null){System.out.println(\"no bicycle to park\");}\r\n\t\tthis.bicycle.setTotal_time_spent(this.bicycle.getTotal_time_spent()+this.bicycle.count_bike_time(this.last_routine.getSource(), this.last_routine.getDestination()));\r\n\t\tthis.setPosition(s.getPosition());\r\n\t\tif(this.bicycle instanceof Bicycle_Mech){\r\n\t\t\tif(s.getPlaces_mech().size()-s.count_mech() == 0){System.out.println(\"no more mech bicycle slots available\");}\r\n\t\t\telse{\r\n\t\t\t\tif(s instanceof Station_Plus && this.card!=null){this.card.setCredits(this.card.getCredits()+5);}\r\n\t\t\t\tfor(Map.Entry<Slot,Bicycle_Mech> me:s.getPlaces_mech().entrySet()){\r\n\t\t\t\t\tif(me.getValue()==null){\r\n\t\t\t\t\t\ts.getPlaces_mech().put(me.getKey(), (Bicycle_Mech)this.bicycle);s.setReturn_times(s.getReturn_times()+1);\r\n\t\t\t\t\t\tif(this.card!=null){System.out.println(this.getUserName() + \" Credits remaining: \" + this.getCard().getCredits());}\r\n\t\t\t\t\t\tSystem.out.println(this.getUserName() + \" PAY: \" + this.pay(this.last_routine, this.bicycle, this.bicycle.getBank_card_to_use()));\r\n\t\t\t\t\t\tthis.last_routine = null;\r\n\t\t\t\t\t\ts.notify_users();\r\n\t\t\t\t\t\tthis.bicycle.setUser(null);\r\n\t\t\t\t\t\tthis.bicycle.setBank_card_to_use(null);\r\n\t\t\t\t\t\tthis.bicycle = null;\r\n\t\t\t\t\t\tthis.setPosition(s.getPosition());\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} \r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(this.bicycle instanceof Bicycle_Elec){\r\n\t\t\tif(s.getPlaces_elec().size()-s.count_elec() == 0){System.out.println(\"no more elec bicycle slots available\");}\r\n\t\t\telse{\r\n\t\t\t\tif(s instanceof Station_Plus && this.card!=null){this.card.setCredits(this.card.getCredits()+5);}\r\n\t\t\t\tfor(Map.Entry<Slot,Bicycle_Elec> me:s.getPlaces_elec().entrySet()){\r\n\t\t\t\t\tif(me.getValue()==null){\r\n\t\t\t\t\t\ts.getPlaces_elec().put(me.getKey(), (Bicycle_Elec)this.bicycle);s.setReturn_times(s.getReturn_times()+1);\r\n\t\t\t\t\t\tif(this.card!=null){System.out.println(this.getUserName() + \" Credits remaining: \" + this.getCard().getCredits());}\r\n\t\t\t\t\t\tSystem.out.println(this.getUserName() + \" PAY: \" + this.pay(this.last_routine, this.bicycle,this.bicycle.getBank_card_to_use()));\r\n\t\t\t\t\t\tthis.last_routine = null;\r\n\t\t\t\t\t\ts.notify_users();\r\n\t\t\t\t\t\tthis.bicycle.setUser(null);\r\n\t\t\t\t\t\tthis.bicycle.setBank_card_to_use(null);\r\n\t\t\t\t\t\tthis.bicycle = null;\r\n\t\t\t\t\t\tthis.setPosition(s.getPosition());\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} \r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public int askSecondaryWithPass();",
"private static void chooseMethod(int choice, Data data) {\n\t\taddToLog(\"user chose option #\" + choice);\n\t\tif (choice == 1) {\n\t\t\tmethodOne(data);\n\t\t} else if (choice == 2) {\n\t\t\tmethodTwo(data);\n\t\t} else if (choice == 3) {\n\t\t\tmethodThree(data);\n\t\t} else {\n\t\t\tSystem.out.println(\"Exiting...\");\n\t\t\taddToLog(\"program ended\");\n\t\t\ttry {\n\t\t\t\tlog.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(\"Error closing the Log File\");\n\t\t\t\tSystem.err.println(\"Exiting...\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"protected Method fetchMethod() {\n int i = randomGenerator.nextInt(allCallableMethods.size());\n Method selected = allCallableMethods.get(i);\n allCallableMethods.add(selected); // We add it back to the list of methods, to make it more likely to be selected!\n return selected;\n }",
"public synchronized double pay(Routine routine, Bicycle b, Bank_Card bank_card) throws Exception{\r\n\t\tif(!routine.getDestination().isState()){System.out.println(\"offline - out of order!\");throw new Exception(\"OFFLINE\");}\r\n\t\tdouble price = 0;\r\n\t\tif(routine.getDestination()==null || routine.getEnd()==null || routine.getSource()==null || routine.getStart()==null){System.out.println(\"no routine to pay\");} \r\n\t\tif(this.card == null){\r\n\t\t\tif(b instanceof Bicycle_Mech){price = routine.count_time(b);}\r\n\t\t\tif(b instanceof Bicycle_Elec){price = 2*routine.count_time(b);}\r\n\t\t}\r\n\t\tif(this.card != null){price = this.card.price(routine, b);}\r\n\t\tif(bank_card.getOwner().equals(this)){bank_card.check(price);bank_card.setMoney(bank_card.getMoney()-price);}\r\n\t\tif(!bank_card.getOwner().equals(this)){System.out.println(\"choose a right bank card\");}\r\n\t\treturn price;\r\n\t}",
"public void createTasks(Integer _optID, String _tupleTag, String _taskType, String _info1, String _info2, String _destIP, String _port, String _location, long timestamp, Object _appSpecific){ \r\n //System.out.print(\"Create tasks\");\r\n boolean flag = false;\r\n String defaultIP = \"-1\";\r\n String defaultPort = \"-1\";\r\n \r\n //use wildcard to let one worker randomly choose the job to run\r\n //System.out.println(\"---What is optID: \" +_optID);\r\n if(_destIP.equals(\"RANDOM\")){\r\n int tempTaskID = getUpdatedTaskID();\r\n \r\n insertIntoParaList(tempTaskID, _optID, _tupleTag, _taskType,defaultIP,_info1,_info2,defaultPort,_location, timestamp,_appSpecific);\r\n flag = true;\r\n addEntryToResultList(_optID,flag);\r\n //------THE TASK IS INSERTED HERE\r\n insertTask(tempTaskID);\r\n }\r\n //send tuples to all\r\n else if(_destIP.equals(\"ALL\")){\r\n //Iterate through all sites that subscribe to certain types of task \r\n //System.out.println(\"infoSys.getSiteList(): \"+infoSys.getSiteList());\r\n Iterator it = infoSys.getSiteList().entrySet().iterator();\r\n while (it.hasNext()) {\r\n Map.Entry entry = (Map.Entry) it.next();\r\n _destIP = ((String) entry.getKey());\r\n ConcurrentHashMap<String, String> subscribeType = (ConcurrentHashMap<String, String>) entry.getValue();\r\n \r\n //option 2, if there is multiple subscribers of a certain taskType in one site\r\n Iterator subIt = subscribeType.entrySet().iterator();\r\n while (subIt.hasNext()) {\r\n Map.Entry subEntry = (Map.Entry) subIt.next();\r\n String[] typeAndAssociate = subEntry.getValue().toString().split(\",\");\r\n if (typeAndAssociate[0].equals(_tupleTag) && typeAndAssociate[1].equals(_taskType)) {\r\n _port = subEntry.getKey().toString();\r\n\r\n int tempTaskID = getUpdatedTaskID();\r\n insertIntoParaList(tempTaskID, _optID, _tupleTag, _taskType,_destIP, _info1,_info2,_port,_location, timestamp,_appSpecific);\r\n //System.out.println(\"Master out: \"+\"--\"+_tupleTag+\"--\"+_taskType+\"--\"+_optID+\"--\"+_destIP+\"--\"+_budget+\"--\"+_deadline+\"--\"+_port);\r\n flag = true;\r\n addEntryToResultList(_optID,flag);\r\n //------THE TASK IS INSERTED HERE\r\n insertTask(tempTaskID);\r\n \r\n }\r\n }\r\n }\r\n }\r\n //if user choose one specific worker, only send the message to it\r\n else{ \r\n //System.out.println(infoSys.getSiteList());\r\n //Check if this subscriber exists\r\n if (infoSys.hasAssociateSubscriber(_destIP, _port)) {\r\n int tempTaskID = getUpdatedTaskID();\r\n //System.out.println(\"Master out: \"+\"--\"+_tupleTag+\"--\"+_taskType+\"--\"+_optID+\"--\"+_destIP+\"--\"+_budget+\"--\"+_deadline+\"--\"+_port);\r\n insertIntoParaList(tempTaskID, _optID, _tupleTag, _taskType,_destIP,_info1,_info2,_port,_location, timestamp,_appSpecific);\r\n flag = true;\r\n addEntryToResultList(_optID,flag);\r\n insertTask(tempTaskID);\r\n } else {\r\n System.out.println(\"Incorrect destIP or destPort for creating task!\");\r\n }\r\n } \r\n //create entry in resultList\r\n addEntryToResultList(_optID,flag);\r\n }",
"public double selectCurrentBalance(int choice, String getUser);",
"public int askSecondary();",
"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 void CPUWork()\n\t\t\t{\n\t\t\t\tif (completionflag == false && bugflag == false)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (m != 10)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tswitch (m)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\t\tfor (k = 0; k <= 8; k += 4)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\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\t\tcpuchoice = k;\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}\n\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\t\tfor (k = 0; k <= 2; k += 1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\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\t\tcpuchoice = k;\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}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\t\tfor (k = 3; k <= 5; k += 1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\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\t\tcpuchoice = k;\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}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t\t\tfor (k = 6; k <= 8; k += 1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\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\t\tcpuchoice = k;\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}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\t\t\tfor (k = 0; k <= 6; k += 3)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\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\t\tcpuchoice = k;\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}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\t\t\t\tfor (k = 1; k <= 7; k += 3)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\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\t\tcpuchoice = k;\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}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\t\t\t\tfor (k = 2; k <= 8; k += 3)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\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\t\tcpuchoice = k;\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}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\t\t\t\t\tfor (k = 2; k <= 6; k += 2)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\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\t\tcpuchoice = k;\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}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (j != 10)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tswitch (j)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\t\tfor (k = 0; k <= 8; k += 4)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\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\t\tcpuchoice = k;\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}\n\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\t\tfor (k = 0; k <= 2; k += 1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\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\t\tcpuchoice = k;\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}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\t\tfor (k = 3; k <= 5; k += 1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\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\t\tcpuchoice = k;\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}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t\t\tfor (k = 6; k <= 8; k += 1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\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\t\tcpuchoice = k;\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}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\t\t\tfor (k = 0; k <= 6; k += 3)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\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\t\tcpuchoice = k;\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}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\t\t\t\tfor (k = 1; k <= 7; k += 3)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\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\t\tcpuchoice = k;\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}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\t\t\t\tfor (k = 2; k <= 8; k += 3)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\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\t\tcpuchoice = k;\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}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\t\t\t\t\tfor (k = 2; k <= 6; k += 2)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\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\t\tcpuchoice = k;\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}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\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\twhile (true)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcpuchoice = random.nextInt(8);\n\n\t\t\t\t\t\t\t\t\t\tif (cpuflag[cpuchoice] == false\n\t\t\t\t\t\t\t\t\t\t\t\t&& flag[cpuchoice] == false)\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tcpuflag[cpuchoice] = true;\n\t\t\t\t\t\tswitch (cpuchoice)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t++lose[1];\n\t\t\t\t\t\t\t\t++lose[4];\n\t\t\t\t\t\t\t\t++lose[0];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t++lose[5];\n\t\t\t\t\t\t\t\t++lose[1];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t++lose[1];\n\t\t\t\t\t\t\t\t++lose[6];\n\t\t\t\t\t\t\t\t++lose[7];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t++lose[2];\n\t\t\t\t\t\t\t\t++lose[4];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\t++lose[2];\n\t\t\t\t\t\t\t\t++lose[5];\n\t\t\t\t\t\t\t\t++lose[0];\n\t\t\t\t\t\t\t\t++lose[7];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\t\t++lose[2];\n\t\t\t\t\t\t\t\t++lose[6];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\t\t++lose[3];\n\t\t\t\t\t\t\t\t++lose[4];\n\t\t\t\t\t\t\t\t++lose[7];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\t\t\t++lose[3];\n\t\t\t\t\t\t\t\t++lose[5];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 8:\n\t\t\t\t\t\t\t\t++lose[3];\n\t\t\t\t\t\t\t\t++lose[6];\n\t\t\t\t\t\t\t\t++lose[0];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (j = 0; j < 8; ++j)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (lose[j] == 3)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tresult=j;\n\t\t\t\t\t\t\t\t\t\tIntent it2 = new Intent(Main.this,\n\t\t\t\t\t\t\t\t\t\t\t\tResult.class);\n\t\t\t\t\t\t\t\t\t\tBundle b1 = new Bundle();\n\t\t\t\t\t\t\t\t\t\tb1.putString(\"result\", name\n\t\t\t\t\t\t\t\t\t\t\t\t+ \" is a LOSER!!\");\n\t\t\t\t\t\t\t\t\t\tit2.putExtras(b1);\n\t\t\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\t\t\tstartActivity(it2);\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t}",
"static void perform_call(String passed){\n\t\tint type = type_of_call(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tcall_without_condition(passed);\n\t\t\tbreak;\n\t\t}\n\t}",
"public void userFlightChoice(int index);",
"private static int getUserChoice() {\n System.out.println(\"Please choose your operation: \");\n return intScanner.nextInt();\n }",
"static void call_when_carry(String passed){\n\t\tif(CS)\n\t\t\tcomplete_call_req(passed.substring(3));\n\t}",
"public void pickUpTimer()\r\n\t{\t\t\r\n\t\tSystem.out.println(timer.get());\r\n\t\tif(timer.get() < Config.Auto.timeIntakeOpen)\r\n\t\t{\r\n\t\t\t//claw.openClaw();\r\n\t\t\tSystem.out.println(\"in second if\");\r\n\t\t}\r\n\t\t\t\t\r\n\t\telse if(timer.get() < Config.Auto.timeElevatorStack)\r\n\t\t{\r\n\t\t\t//elevator.setLevel(elevatorLevel);\r\n\t\t\t//elevatorLevel++;\r\n\t\t}\r\n\t\t\r\n\t\telse if(timer.get() < Config.Auto.timeIntakeClose)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"in first if\");\r\n\t\t\t//claw.closeClaw();\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t\tendRoutine();\r\n\t}",
"String userChosen();",
"private void searchRoutine() {\n String s = (String) JOptionPane.showInputDialog(\n this,\n \"Enter the name of the routine:\",\n \"Search\",\n JOptionPane.PLAIN_MESSAGE,\n null, null, null);\n\n if (s != null) {\n try {\n Routine r = collection.search(s);\n list.setSelectedValue(r, true);\n } catch (DoesNotExistException ee) {\n JOptionPane.showMessageDialog(this, \"Routine with given name does not exist.\");\n }\n }\n }",
"public void chooseAlgorithm() {\n boolean runloop = true;\n CustomArrayList<Integer>[] graph = null;\n graph = util.initializeCNF(statement);\n while (runloop) {\n io.println(\"Which algorithm do you want to use to solve this?\");\n io.println(\"1: Tarjan algorithm\\n2: Kosaraju algorithm\\n3: Brute force method\\n4: Print the truth distribution that solves the CNF\\n5: return\");\n String selection = io.nextLine();\n switch (selection) {\n case (\"1\"):\n tarjan = new TarjanAlgorithm(graph, numVariables);\n TarjanPrint();\n break;\n case (\"2\"):\n kosaraju = new KosarajuAlgorithm(graph, numVariables);\n KosarajuPrint();\n break;\n case (\"3\"):\n io.println(\"Warning! Brute force method has an exponential time complexity. Using this with CNF with more than 20 variables will take a really long time. \");\n io.println(\"Continue? y/n\");\n String affirmate = io.nextLine();\n switch (affirmate) {\n case (\"y\"):\n bruteForcePrint();\n break;\n case (\"n\"):\n break;\n }\n break;\n case (\"4\"):\n tarjan = new TarjanAlgorithm(graph, numVariables);\n if (tarjan.checkSatisfiability()) {\n printTruthAssesment();\n } else {\n io.println(\"Not satisfiable\");\n }\n break;\n case (\"5\"):\n io.println(\"Returning to main menu...\");\n runloop = false;\n break;\n }\n }\n }",
"public void chooseOperation(int i) {\r\n\r\n switch (i) {\r\n case 0:\r\n model.increaseOneHour();\r\n break;\r\n case 1:\r\n model.decreaseOneHour();\r\n break;\r\n case 2:\r\n model.increaseOneMinute();\r\n break;\r\n case 3:\r\n model.decreaseOneMinute();\r\n break;\r\n case 4:\r\n model.increaseOneSecond();\r\n break;\r\n case 5:\r\n model.decreaseOneSecond();\r\n break;\r\n case 6:\r\n view.printMessage(View.BREAK);\r\n break;\r\n }\r\n view.printMessage(model.toString());\r\n }",
"public static void handleDriverTripSelect(Trip selectedTrip) {\n ApplicationModel m = App.getModel();\n selectedTrip.setStatus(Trip.STATUS.DRIVER_ACCEPT);\n String userId = App.getAuthDBManager().getCurrentUserID();\n selectedTrip.setDriverID(userId);\n ApplicationService.selectTrip(selectedTrip.getRiderID(), selectedTrip, ((resultData, err) -> {\n if (err != null) {\n List<Observer> mapObservers = m.getObserversMatchingClass(MapActivity.class);\n for (Observer map : mapObservers) {\n ((UIErrorHandler) map).onError(err);\n }\n } else {\n // Edge case: don't override current active trip if there is one\n if (m.getSessionTrip() == null) {\n m.setSessionTrip(selectedTrip);\n m.setSessionTripList(null);\n }\n }\n }));\n }",
"public void selectRouteChoice()\n\t{\n\t\tRoutePlanner planner = new RoutePlanner();\n\t\tthis.sequence = ap.listSequences.get(numTrips);\n\t\t// only minimisation\n\t\tif (ap.routeChoice.equals(\"DS\")) newPath = planner.roadDistance(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.equals(\"AC\")) newPath = planner.angularChangeBased(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.equals(\"TS\")) newPath = planner.angularChangeBased(originNode, destinationNode, ap);\n\t\t// minimisation plus only global landmarks\n\t\telse if (ap.routeChoice.equals(\"DG\")) newPath = planner.roadDistance(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.equals(\"AG\")) newPath = planner.angularChangeBased(originNode, destinationNode, ap);\n\t\t// minimisation plus local and (optionally) global landmarks\n\t\telse if (ap.routeChoice.contains(\"D\") && ap.routeChoice.contains(\"L\")) newPath = planner.roadDistanceSequence(sequence, ap);\n\t\telse if (ap.routeChoice.contains(\"A\") && ap.routeChoice.contains(\"L\")) newPath = planner.angularChangeBasedSequence(sequence, ap);\n\t\t// anything with regions and/or barriers, or just barriers\n\t\telse if (ap.routeChoice.contains(\"R\")) newPath = planner.regionBarrierBasedPath(originNode, destinationNode, ap);\n\t\telse if (ap.routeChoice.contains(\"B\")) newPath = planner.barrierBasedPath(originNode, destinationNode, ap);\n\t}",
"@Override\n public void functionInvoker(int option1) {\n switch (option1) {\n //Add different functions below\n case 1: {\n System.out.println(\"You paid: Rs \" + bill);\n paymentStatus=true;\n break;\n }\n case 2: {\n if (balance >= bill) {\n System.out.println(\"Rs\" + bill + \" has been deducted from your credit card\");\n amount = balance - bill;\n paymentStatus=true;\n } else {\n System.out.println(\"Your account balance is not sufficient\");\n System.out.println(\"Select Another method of payment\");\n paymentMethod();\n }\n break;\n }\n case 3: {\n System.out.println(\"Rs\" + bill + \" should be paid to our attender\");\n paymentStatus=true;\n break;\n }\n case 4: {\n if (premiumSubscription) {\n if (balance >= bill) {\n System.out.println(\"Rs\" + bill + \" has been deducted from your premium account\");\n amount = balance - bill;\n paymentStatus=true;\n }\n } else {\n System.out.println(\"Your account balance is not sufficient\");\n System.out.println(\"Select Another method of payment\");\n paymentMethod();\n }\n break;\n }\n case 5: {\n System.exit(0);\n break;\n }\n default:\n System.out.println(\"Choose correctly\");\n paymentMethod();\n }\n }",
"public void SpecialRateplan_selection(String Rateplan) throws InterruptedException\r\n\t{\r\n\t\tif(SeleniumRepo.driver.findElement(By.xpath(\"//label[text()='\"+Rateplan+\"']\")).isDisplayed())\r\n\t\t{\r\n\t\t\tSeleniumRepo.driver.findElement(By.xpath(\"//label[text()='\"+Rateplan+\"']\")).click();\r\n\t\t\t//System.out.println(\"Rateplan selected successfully\");\r\n\t\t\ttest.log(Status.INFO, \"Rateplan selected successfully\");\r\n\r\n\t\t\tThread.sleep(2000);\t\r\n\t\t\tif (Specialdone.isDisplayed()) \r\n\t\t\t{\r\n\t\t\t\tSpecialdone.click();\r\n\t\t\t\tSeleniumRepo.waitForPageLoaded();\r\n\t\t\t\t//System.out.println(\"Clicked on done\");\r\n\t\t\t\tlogger.info(\"Clicked on done\");\r\n\t\t\t\ttest.log(Status.INFO, \"Clicked on done\");\r\n\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\t//System.out.println(\"not Clicked on done\");\r\n\t\t\t\tlogger.error(\"not Clicked on done\");\r\n\t\t\t\ttest.log(Status.FAIL, \"not Clicked on done\");\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttest.log(Status.FAIL, \"Element is not present\");\r\n\r\n\t\t}\t\r\n\t}",
"public void run() {\n\t\tif ((phase == 0) && (pState.equals(\"ru\"))) {\t\n\t\t\tPyOS.askForResource(PyOS.waitingList6, 6);\n\t\t\tneededResource = 6;\n\t\t\tphase = 1;\n\t\t}\n\t\t//2) asks for supervisor memory\n\t\tif ((phase == 1) && (receivedResource == 6) && (pState.equals(\"ru\"))) {\t\n\t\t\tPyOS.askForResource(PyOS.waitingList2, 2);\n\t\t\tneededResource = 2;\n\t\t\tphase = 2;\n\t\t}\n\t\t\n\t\t//3)asks for hard drive memory\n\t\t//TODO\n\t\tif ((phase == 2) && (receivedResource == 2) && (pState.equals(\"ru\"))) {\t\n\t\t\n\t\t\tPyOS.askForResource(PyOS.waitingList4, 4);\n\t\t\tneededResource = 4;\n\t\t\tphase = 3;\n\t\t}\n\t\t\n\t\t//4) copies task to hard drive memmory\n\t\t//TODO\n\t\tif ((phase == 3) && (receivedResource == 4) && (pState.equals(\"ru\"))) {\t\n\t\t\tneededResource = 0;\n\t\t\t\n\t\t\tString line = new String();\n\t\t\t\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\tline = OSUI.flash.readLine();\n\t\t\t\t\tif (line != null) {\n\t\t\t\t\t\tHdd.openFileForWriting(filesInUse);\n\t\t\t\t\t\tHdd.writeToFile(filesInUse, line);\n\t\t\t\t\t\tHdd.closeFile(filesInUse);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} while (line != null && !line.equals(\"$END\"));\n\t\t\t\n\t\t\tif (line == null) {\n\t\t\t\tPyOS.askForResource(PyOS.waitingList1, 1);\n\t\t\t\tPyOS.freeResource(PyOS.waitingList2, 2, ownedResList.get(1));\n\t\t\t\tPyOS.freeResource(PyOS.waitingList4, 4, ownedResList.get(1));\n\t\t\t} else {\n\t\t\t\tfilesInUse++;\n\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tPyOS.freeResource(PyOS.waitingList6, 6, ownedResList.get(0));\n\t\t\tphase = 4;\n\t\t}\n\t\t\n\t\t//5 TODO free flash, hard drive resources\n\t\tif ((phase == 4) && (pState.equals(\"ru\"))){\n\t\t\tPyOS.freeResource(PyOS.waitingList2, 2, ownedResList.get(0));\n\t\t\tPyOS.freeResource(PyOS.waitingList4, 4, ownedResList.get(0));\n\t\t\tphase = 5;\n\t\t}\n\t\t\n\t\t//7) creates resource task in hard drive\n\t\t//TODO resource should contain fileId\n\t\tif ((phase == 5) && (pState.equals(\"ru\"))) {\n\t\t\t\n\t\t\t\n\t\t\tPyOS.createResource(7, intID);\n\t\t\townedResList.add(createdResList.get(createdResList.size()-1));\n\t\t\townedResList.get(ownedResList.size()-1).user = PyOS.findProcessByIntId(intID);\n\t\t\t((TaskInHardDrive)ownedResList.get(ownedResList.size()-1)).computingTime = 1;\n\t\t\tPyOS.freeResource(PyOS.waitingList7, 7, ownedResList.get(ownedResList.size()-1));\n\t\t\tphase = 0;\n\t\t}\n\t}",
"public void generateComputerChoice() {\n\t\tgetRandomNumber();\n\t\tsetComputerChoice();\n\t}",
"public void CCTAirMenu(int option, Pilot[] pilots, AirPlane[] airplanes, ArrayList<Flight> allFlights, Flight flight) {\n\n switch (option) {\n\n case 1:\n //Calling the method from logic class\n logic.allFlights(allFlights);\n\n break;\n\n case 2:\n //Calling the method from logic class\n logic.particularFlight(allFlights);\n\n break;\n case 3:\n //Calling the method from logic class\n logic.allAirplanes(airplanes);\n\n break;\n\n case 4:\n //Calling the method from logic class\n logic.particularAirplane(airplanes);\n\n break;\n\n case 5:\n //Calling the method from logic class\n logic.allPilots(pilots);\n\n break;\n\n case 6:\n //Calling the method from logic class\n logic.particularPiolot(pilots);\n\n break;\n\n case 7:\n //Calling the method from logic class\n logic.userCreateFlight(allFlights, airplanes);\n\n break;\n\n case 8:\n System.exit(0);\n\n default:\n System.out.println(\"--------------------------------------------\");\n\n System.out.println(\"Invalid option, please chose another option\");\n System.out.println(\"--------------------------------------------\");\n\n }\n\n }",
"public void run(){\t\n\t\tComputingRequest pathCompReq;\n\t\tlong timeIniNanos;\n\t\tlong timeEndNanos;\n\t\tlong timePreNanos=System.nanoTime();\n\t\twhile (running) {\n\t\t\tlog.info(\"Waiting for a new Computing Request to process\");\n\t\t\ttry {\n\t\t\t\tpathCompReq=pathComputingRequestQueue.take();\n\n\t\t\t\tif (analyzeRequestTime){\n\t\t\t\t\tdouble idleTimeV=(System.nanoTime()-timePreNanos)/(double)1000000;\n\t\t\t\t\tif (idleTimeV<20000){\n\t\t\t\t\t\tidleTime.analyze(idleTimeV);\t\n\t\t\t\t\t}\t\n\t\t\t\t}\n\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tlog.warn(\"There is no path to compute\");\n\t\t\t\te.printStackTrace();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttimeIniNanos=System.nanoTime();\n\n\t\t\tif (pathCompReq.getRequestList().size()==1){\n\t\t\t\tlog.info(\"Processing New Path Computing request, id: \"+pathCompReq.getRequestList().get(0).toString());\t\n\t\t\t}\n\t\t\t//FIXME: ESTA PARTE PUEDE FALLAR SI MANDAN OTRA COSA QUE NO SEAN IPV4 o GEN END POINTS\n\t\t\t//POR AHORA PONGO TRY CATH Y MANDO NOPATH\n\t\t\tlong sourceIF=0;\n\t\t\tlong destIF=0;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tP2PEndpoints p2pep=null;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\ttry{\n\t\t\t\t//For the IT case\n\t\t\t\tif (ted.isITtedb()){\n\t\t\t\t\tlog.info(\"Processing New Path Computing request, id: \"+pathCompReq.getRequestList().get(0).toString());\t\t\n\t\t\t\t\tsource =(((GeneralizedEndPoints)pathCompReq.getRequestList().get(0).getEndPoints()).getP2PEndpoints().getSourceEndPoint().getEndPointIPv4TLV().getIPv4address());\n\t\t\t\t\tdest =(((GeneralizedEndPoints)pathCompReq.getRequestList().get(0).getEndPoints()).getP2PEndpoints().getDestinationEndPoint().getEndPointIPv4TLV().getIPv4address());\n\t\t\t\t}else {\n\t\t\t\t\ttry { //EndPointsIPv4\n\t\t\t\t\t\tif (pathCompReq.getRequestList().get(0).getEndPoints() instanceof GeneralizedEndPoints){\n\t\t\t\t\t\t\tsource = ((EndPointsUnnumberedIntf)pathCompReq.getRequestList().get(0).getEndPoints()).getSourceIP();\n\t\t\t\t\t\t\tdest = ((EndPointsUnnumberedIntf)pathCompReq.getRequestList().get(0).getEndPoints()).getDestIP();\n\t\t\t\t\t\t\tsourceIF=((EndPointsUnnumberedIntf)pathCompReq.getRequestList().get(0).getEndPoints()).getSourceIF();\n\t\t\t\t\t\t\tdestIF=((EndPointsUnnumberedIntf)pathCompReq.getRequestList().get(0).getEndPoints()).getDestIF();\n\t\t\t\t\t\t\tlog.info(\"SubObjeto: EP-Unnumbered Interface: \"+((EndPointsUnnumberedIntf)pathCompReq.getRequestList().get(0).getEndPoints()).toString());\n\t\t\t\t\t\t\tEndPointsIPv4 ep= new EndPointsIPv4();\n\t\t\t\t\t\t\tep.setDestIP(dest);\n\t\t\t\t\t\t\tep.setSourceIP(source);\n\t\t\t\t\t\t\tpathCompReq.getRequestList().get(0).setEndPoints(ep);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsource = ((EndPointsIPv4)pathCompReq.getRequestList().get(0).getEndPoints()).getSourceIP();\n\t\t\t\t\t\tdest = ((EndPointsIPv4)pathCompReq.getRequestList().get(0).getEndPoints()).getDestIP();\n\t\t\t\t\t\tlog.info(\" XXXX try source: \"+source);\n\t\t\t\t\t\tlog.info(\" XXXX try dest: \"+dest);\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Exception e) { //GeneralizedEndPoints\n\t\t\t\t\t\tif (pathCompReq.getRequestList().get(0).getEndPoints() instanceof GeneralizedEndPoints){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tp2pep = ((GeneralizedEndPoints)pathCompReq.getRequestList().get(0).getEndPoints()).getP2PEndpoints();\t\t\t\n\n\t\t\t\t\t\t\t//P2PEndpoints p2pep = ((GeneralizedEndPoints)pathCompReq.getRequestList().get(0).getEndPoints()).getP2PEndpoints();\t\t\t\n\t\t\t\t\t\t\tlog.info(\"RequestProcessorThread GeneralizedEndPoints -> sourceDataPath:: \"+p2pep.getSourceEndPoint()+\" destDataPath :: \"+p2pep.getDestinationEndPoint());\n\n\t\t\t\t\t\t\tGeneralizedEndPoints ep= new GeneralizedEndPoints();\n\t\t\t\t\t\t\tep.setP2PEndpoints(p2pep); \t\n\t\t\t\t\t\t\tpathCompReq.getRequestList().get(0).setEndPoints(ep);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsource = p2pep.getSourceEndPoint().getEndPointIPv4TLV().getIPv4address();\n\t\t\t\t\t\t\tdest = p2pep.getDestinationEndPoint().getEndPointIPv4TLV().getIPv4address();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}catch (Exception e){\n\t\t\t\t//If fails, we send NoPath, by now (reasons later...)\n\t\t\t\t//FIXME\n\t\t\t\tlog.info(\"Shouldn't be here except in WLANs\");\n\t\t\t\t//log.info(FuncionesUtiles.exceptionToString(e));\n\t\t\t\t//this.sendNoPath(pathCompReq);\n\t\t\t}\n\t\t\t//In case it is a child PCE with a parent, requestToParent = true\n\t\t\tboolean requestToParent = false;\n\t\t\n\t\t\tif (this.isChildPCE==true){\n\t\t\t\t//Before sending to the parent, check that the source and destinations don't belong to the domain\n\t\t\t\t\n\t\t\t\tif((!(((DomainTEDB)ted).belongsToDomain(source))||(!(((DomainTEDB)ted).belongsToDomain(dest))))){\t\t\t\t\t\n\t\t\t\t\trequestToParent = true;\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\t//In case we need to send the request to the parent... this way...\n\t\t\tif (requestToParent == true) {\n\t\t\t\tlog.info(\"Child PCE: Request is going to be fowarded to the Parent PCE\");\n\t\t\t\tPCEPRequest pcreq = new PCEPRequest();\n\t\t\t\tRequest request=pathCompReq.getRequestList().get(0).duplicate();\n\t\t\t\t//FIXME: hay que poner un nuevo requestID, si no... la podemos liar\n\t\t\t\tpcreq.addRequest(request);\n\t\t\t\tPCEPResponse p_rep = cpcerm.newRequest(pcreq);\n\n\n\t\t\t\tif (p_rep==null){\n\t\t\t\t\tlog.warn(\"Parent doesn't answer\");\n\t\t\t\t\tthis.sendNoPath(pathCompReq);\n\t\t\t\t}else {\n\t\t\t\t\tlog.info(\"RESP: \"+p_rep.toString());\n\t\t\t\t}\n\n\t\t\t\tComputingResponse pcepresp = new ComputingResponse();\n\t\t\t\tpcepresp.setResponsetList(p_rep.getResponseList());\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tlog.info(\"Encoding Computing Request\");\n\t\t\t\t\tpcepresp.encode();\n\t\t\t\t} \n\t\t\t\tcatch (PCEPProtocolViolationException e1)\n\t\t\t\t{\n\t\t\t\t\tlog.info(UtilsFunctions.exceptionToString(e1));\n\t\t\t\t}\n\n\n\t\t\t\ttry {\n\t\t\t\t\tlog.info(\"oNE OF THE NODES IS NOT IN THE DOMAIN. Send Request to parent PCE,pcepresp:\"+pcepresp+\",pathCompReq.getOut():\"+pathCompReq.getOut());\n\t\t\t\t\tpathCompReq.getOut().write(p_rep.getBytes());\n\t\t\t\t\tpathCompReq.getOut().flush();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tlog.warn(\"Parent doesn't answer\");\n\t\t\t\t\tComputingResponse m_resp=new ComputingResponse();\n\t\t\t\t\tResponse response=new Response();\n\t\t\t\t\tRequestParameters rp = new RequestParameters();\n\t\t\t\t\trp.setRequestID(request.getRequestParameters().requestID);\n\t\t\t\t\tresponse.setRequestParameters(rp);\n\t\t\t\t\tNoPath noPath= new NoPath();\n\t\t\t\t\tnoPath.setNatureOfIssue(ObjectParameters.NOPATH_NOPATH_SAT_CONSTRAINTS);\n\t\t\t\t\tNoPathTLV noPathTLV=new NoPathTLV();\n\t\t\t\t\tnoPath.setNoPathTLV(noPathTLV);\t\t\t\t\n\t\t\t\t\tresponse.setNoPath(noPath);\n\t\t\t\t\tm_resp.addResponse(response);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tm_resp.encode();\n\t\t\t\t\t\tpathCompReq.getOut().write(m_resp.getBytes());\n\t\t\t\t\t\tpathCompReq.getOut().flush();\n\t\t\t\t\t} catch (IOException e2) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te2.printStackTrace();\n\t\t\t\t\t} catch (PCEPProtocolViolationException e3) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te3.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tlog.info(\"Send NO PATH\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\tlog.info(\"Response sent!!\");\n\t\t\t\t//\t}\n\t\t\t\t//}\n\t\t\t\tft=null;\n\n\t\t\t} else {\n\t\t\t\tint of=0;\n\t\t\t\tComputingAlgorithmManager algortithmManager=null;\n\t\t\t\tComputingAlgorithmManagerSSON algortithmManagerSSON=null;\n\t\t\t\tif (pathCompReq.getSvec()!=null){\n\t\t\t\t\tlog.info(\"SVEC Request \");\n\t\t\t\t\tObjectiveFunction objectiveFunctionObject=pathCompReq.getSvec().getObjectiveFunction();\n\t\t\t\t\tif (objectiveFunctionObject!=null){\n\t\t\t\t\t\tof=objectiveFunctionObject.getOFcode();\n\t\t\t\t\t\tlog.info(\"ObjectiveFunction code \"+of);\n\t\t\t\t\t\talgortithmManager =svecAlgorithmList.get(new Integer(of));\n\t\t\t\t\t\tif (algortithmManager==null){\n\t\t\t\t\t\t\tif (objectiveFunctionObject.isPbit()==true){\n\t\t\t\t\t\t\t\tlog.warn(\"OF not supported\");\n\t\t\t\t\t\t\t\t//Send error\n\t\t\t\t\t\t\t\tPCEPError msg_error= new PCEPError();\n\t\t\t\t\t\t\t\tErrorConstruct error_c=new ErrorConstruct();\n\t\t\t\t\t\t\t\tPCEPErrorObject error= new PCEPErrorObject();\n\t\t\t\t\t\t\t\terror.setErrorType(ObjectParameters.ERROR_UNSUPPORTEDOBJECT);\n\t\t\t\t\t\t\t\terror.setErrorValue(ObjectParameters.ERROR_UNSUPPORTEDOBJECT_UNSUPPORTED_PARAMETER);\n\t\t\t\t\t\t\t\terror_c.getErrorObjList().add(error);\n\t\t\t\t\t\t\t\tmsg_error.setError(error_c);\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tmsg_error.encode();\n\t\t\t\t\t\t\t\t\tpathCompReq.getOut().write(msg_error.getBytes());\n\t\t\t\t\t\t\t\t\tpathCompReq.getOut().flush();\n\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\tlog.warn(\"IOException sending error to PCC: \"+pathCompReq.getRequestList().get(0).toString());\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t} catch (PCEPProtocolViolationException e) {\n\t\t\t\t\t\t\t\t\tlog.error(\"Malformed ERROR MESSAGE, CHECK PCE CODE:\"+pathCompReq.getRequestList().get(0).toString());\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\t\t\t}\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\tlog.warn(\"USING Default SVEC \");\n\t\t\t\t\t\t\t\tDefaultSVECPathComputing dspc=new DefaultSVECPathComputing(pathCompReq,ted);\n\t\t\t\t\t\t\t\tft=new ComputingTask(dspc);\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tlog.info(\"Custom SVEC OF \"+of);\n\t\t\t\t\t\t\tComputingAlgorithm cpr=algortithmManager.getComputingAlgorithm(pathCompReq, ted);\n\t\t\t\t\t\t\tft=new ComputingTask(cpr);\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlog.info(\"Default SVEC \");\n\t\t\t\t\t\tDefaultSVECPathComputing dspc=new DefaultSVECPathComputing(pathCompReq,ted);\n\t\t\t\t\t\tft=new ComputingTask(dspc);\t\n\n\t\t\t\t\t}\n\n\n\t\t\t\t}//aqui se acaba el de svec!=null\n\t\t\t\telse {\n\t\t\t\t\tboolean nopath=false;\n\t\t\t\t\tlog.debug(\"Non-svec request\");\n\t\t\t\t\tdouble totalTimeNs=System.nanoTime()-pathCompReq.getTimeStampNs();\n\t\t\t\t\tdouble totalTimeMs=totalTimeNs/1000000L;\n\t\t\t\t\tif (useMaxReqTime==true){\n\t\t\t\t\t\tif (totalTimeMs>pathCompReq.getMaxTimeInPCE()){\n\t\t\t\t\t\t\tlog.info(\"Request execeeded time, sending nopath\");\n\t\t\t\t\t\t\tft=null;\n\t\t\t\t\t\t\tlog.info(\"Mando no path request execeeded time.totalTimeMs \"+totalTimeMs+\"pathCompReq.getMaxTimeInPCE()\");\n\t\t\t\t\t\t\tsendNoPath(pathCompReq);\n\t\t\t\t\t\t\tnopath=true;\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\n\t\t\t\t\tif (nopath==false){\n\t\t\t\t\t\tObjectiveFunction objectiveFunctionObject=pathCompReq.getRequestList().get(0).getObjectiveFunction();\n\t\t\t\t\t\tif (objectiveFunctionObject!=null){ \t\t\t\t\n\t\t\t\t\t\t\tof=objectiveFunctionObject.getOFcode();\n\n\t\t\t\t\t\t\tlog.debug(\"ObjectiveFunction code \"+of);\n\t\t\t\t\t\t\talgortithmManager =singleAlgorithmList.get(new Integer(of));\n\t\t\t\t\t\t\tif (singleAlgorithmListsson != null){\n\t\t\t\t\t\t\t\talgortithmManagerSSON = singleAlgorithmListsson.get(new Integer(of));\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\n\t\t\t\t\t\t\tif (algortithmManager==null && algortithmManagerSSON==null){\n\t\t\t\t\t\t\t\tif (objectiveFunctionObject.isPbit()==true){\n\t\t\t\t\t\t\t\t\tlog.warn(\"OF not supported!!\");\n\t\t\t\t\t\t\t\t\t//Send error\n\t\t\t\t\t\t\t\t\tPCEPError msg_error= new PCEPError();\n\t\t\t\t\t\t\t\t\tErrorConstruct error_c=new ErrorConstruct();\n\t\t\t\t\t\t\t\t\tPCEPErrorObject error= new PCEPErrorObject();\n\t\t\t\t\t\t\t\t\terror.setErrorType(ObjectParameters.ERROR_UNSUPPORTEDOBJECT);\n\t\t\t\t\t\t\t\t\terror.setErrorValue(ObjectParameters.ERROR_UNSUPPORTEDOBJECT_UNSUPPORTED_PARAMETER);\n\t\t\t\t\t\t\t\t\terror_c.getErrorObjList().add(error);\n\t\t\t\t\t\t\t\t\terror_c.getRequestIdList().add(pathCompReq.getRequestList().get(0).getRequestParameters());\n\t\t\t\t\t\t\t\t\tmsg_error.setError(error_c);\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tmsg_error.encode();\n\t\t\t\t\t\t\t\t\t\tpathCompReq.getOut().write(msg_error.getBytes());\n\t\t\t\t\t\t\t\t\t\tpathCompReq.getOut().flush();\n\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\tlog.warn(\"IOException sending error to PCC: nons\"+pathCompReq.getRequestList().get(0).toString());\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\t\t\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} catch (PCEPProtocolViolationException e) {\n\t\t\t\t\t\t\t\t\t\tlog.error(\"Malformed ERROR MESSAGE, CHECK PCE CODE. nons\"+pathCompReq.getRequestList().get(0).toString());\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tnopath=true;\n\t\t\t\t\t\t\t\t\tft=null;\n\t\t\t\t\t\t\t\t\tlog.warn(\"error message informing sent.\"+pathCompReq.getRequestList().get(0).toString());\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\tlog.info(\"Choosing default algotithm 1\");\n\t\t\t\t\t\t\t\t\tlog.info(\"pathCompReq:: \"+pathCompReq.toString());\n\t\t\t\t\t\t\t\t\t//log.info(\"ted:: \"+ted.printTopology());\n\t\t\t\t\t\t\t\t\tDefaultSinglePathComputing dspc=new DefaultSinglePathComputing(pathCompReq,ted);\n\t\t\t\t\t\t\t\t\tft=new ComputingTask(dspc);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tlog.info(\"Choosing algorithm of OF \"+of);\n\t\t\t\t\t\t\t\tboolean ssonAlgorithm = false;\n\t\t\t\t\t\t\t\tif (singleAlgorithmListsson != null){\n\t\t\t\t\t\t\t\t\tif (singleAlgorithmListsson.size()!=0){\n\t\t\t\t\t\t\t\t\t\tssonAlgorithm = true;\n\t\t\t\t\t\t\t\t\t\t//FIXME: Hay que declarar el parametro \"modulation format\".\n\t\t\t\t\t\t\t\t\t\tint mf=0;\n\t\t\t\t\t\t\t\t\t\tComputingAlgorithm cpr=algortithmManagerSSON.getComputingAlgorithm(pathCompReq, ted, mf);\n\t\t\t\t\t\t\t\t\t\tft=new ComputingTask(cpr);\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 (!ssonAlgorithm){\n\t\t\t\t\t\t\t\t\tif (isMultilayer==true){\n\t\t\t\t\t\t\t\t\t\tComputingAlgorithm cpr=algortithmManager.getComputingAlgorithm(pathCompReq, ted, opCounter);\n\t\t\t\t\t\t\t\t\t\tft=new ComputingTask(cpr);\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tComputingAlgorithm cpr=algortithmManager.getComputingAlgorithm(pathCompReq, ted);\n\t\t\t\t\t\t\t\t\t\tft=new ComputingTask(cpr);\n\t\t\t\t\t\t\t\t\t}\n\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\telse {\n\t\t\t\t\t\t\tlog.info(\"Choosing default algotithm 2\");\n\t\t\t\t\t\t\tDefaultSinglePathComputing dspc=new DefaultSinglePathComputing(pathCompReq,ted);\n\t\t\t\t\t\t\tft=new ComputingTask(dspc);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (ft!=null)\t{\n\t\t\t\t//Here the task will be executed. n\n\t\t\t\tComputingResponse rep;\n\t\t\t\ttry {\n\t\t\t\t\tft.run();\n\t\t\t\t\trep=ft.get(pathCompReq.getMaxTimeInPCE(),TimeUnit.MILLISECONDS);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch(Exception e){\n\t\t\t\t\tlog.warn(\"Computation failed: \"+e.getMessage()+\" || \"+UtilsFunctions.exceptionToString(e)+\" || \" +\",MAXTIME: \"+pathCompReq.getMaxTimeInPCE());\n\t\t\t\t\trep=null;\n\t\t\t\t}\n\t\t\t\tlog.info(\"ReppPP:::\"+rep);\n\t\t\t\t//FIXME: There's a trap here. We change Response to send an unnumbered interface\n\t\t\t\tif ((sourceIF!=0)&&(destIF!=0))//Esto ocurre en el caso de recibir UnnumberedInterface EndPoints (Caso VNTM)\n\t\t\t\t\ttrappingResponse(rep, sourceIF, destIF);\n\t\t\t\ttry {\n\t\t\t\t\t//FIXME: WE ARE USING THE MAX TIME IN PCE, REGARDLESS THE TIME IN THE PCE\n\t\t\t\t\t//log.error(\"Esperamos \"+pathCompReq.getMaxTimeInPCE());\n\t\t\t\t\t//FIXME: \t\t\t\t\n\t\t\t\t\tif (rep!=null){\n\t\t\t\t\t\t//log.info(\"rep.getPathList().get(0)\"+rep.getResponse(0).getPathList().get(0));\n\t\t\t\t\t\tComputingResponse repRes=ft.executeReservation();\n\t\t\t\t\t\tif (repRes!=null){\n\t\t\t\t\t\t\trep=repRes;\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttimeEndNanos=System.nanoTime();\n\n\t\t\t\t\t\tdouble compTimeMicroSec=(timeEndNanos-timeIniNanos)/(double)1000;\n\t\t\t\t\t\tdouble toTimeMicroSec=(timeEndNanos-pathCompReq.getTimeStampNs())/(double)1000;\n\t\t\t\t\t\tdouble toTimeMiliSec=(timeEndNanos-pathCompReq.getTimeStampNs())/(double)1000000;\n\t\t\t\t\t\t//In some no path cases, we can retry\n\t\t\t\t\t\t//here it is the right place\n\t\t\t\t\t\tboolean retry=false;\n\t\t\t\t\t\tif ((rep.ResponseList.getFirst().getNoPath()!=null)&&(pathCompReq.getRequestList().getFirst().getRequestParameters().isRetry())){\n\t\t\t\t\t\t\tdouble totalTimeMs=(System.nanoTime()-pathCompReq.getTimeStampNs())/1000000L;\n\t\t\t\t\t\t\tif (pathCompReq.getRequestList().getFirst().getRequestParameters().getMaxRequestTimeTLV()!=null){\n\t\t\t\t\t\t\t\tlong maxReqTimeMs=pathCompReq.getRequestList().getFirst().getRequestParameters().getMaxRequestTimeTLV().getMaxRequestTime();\n\t\t\t\t\t\t\t\tif (totalTimeMs<=maxReqTimeMs){\n\t\t\t\t\t\t\t\t\tif (totalTimeMs<60000){//FIXME: LIMITE DE 1 MINUTO, PARA EVITAR ATAQUE MALINTENCIONADO\n\t\t\t\t\t\t\t\t\t\tlog.info(\"Re-queueing comp req\");\n\t\t\t\t\t\t\t\t\t\tpathComputingRequestRetryQueue.add(pathCompReq);\t\n\t\t\t\t\t\t\t\t\t\tretry=true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (retry==false) {\n\t\t\t\t\t\t\tif (pathCompReq.getPccReqId()!=null){\n\t\t\t\t\t\t\t\trep.getResponse(0).setPccIdreq(pathCompReq.getPccReqId());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (pathCompReq.getMonitoring()!=null){\n\t\t\t\t\t\t\t\tlog.info(\"Monitoring Info is requested\");\n\t\t\t\t\t\t\t\tMetricPCE metricPCE=new MetricPCE();\n\t\t\t\t\t\t\t\tPceIdIPv4 pceId=new PceIdIPv4();\n\t\t\t\t\t\t\t\tInet4Address pceIPAddress=null;\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tpceIPAddress = (Inet4Address) Inet4Address.getByName(\"0.0.0.0\");\n\t\t\t\t\t\t\t\t} catch (UnknownHostException e) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tpceId.setPceIPAddress(pceIPAddress);\n\t\t\t\t\t\t\t\tmetricPCE.setPceId(pceId);\n\t\t\t\t\t\t\t\tProcTime procTime=new ProcTime();\n\t\t\t\t\t\t\t\tmetricPCE.setProcTime(procTime);\n\t\t\t\t\t\t\t\t//FIXME: Ahora lo pongo en us para unas pruebas\n\t\t\t\t\t\t\t\t//en la RFC esta en ms\n\t\t\t\t\t\t\t\tprocTime.setCurrentProcessingTime((long)toTimeMiliSec);\n\t\t\t\t\t\t\t\t//procTime.setMaxProcessingTime((long)toTimeMiliSec);\n\t\t\t\t\t\t\t\trep.getResponse(0).getMetricPCEList().add(metricPCE);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttry { \t\t\n\t\t\t\t\t\t\t\tlog.info(rep.toString());\n\t\t\t\t\t\t\t\trep.encode();\n\t\t\t\t\t\t\t} catch (PCEPProtocolViolationException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\tlog.error(\"PROBLEM ENCONDING RESPONSE, CHECK CODE!!\"+e.getMessage());\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\t\tlog.info(\"Request processeed, about to send response\");\n\t\t\t\t\t\t\t\tpathCompReq.getOut().write(rep.getBytes());\n\t\t\t\t\t\t\t\tpathCompReq.getOut().flush();\n\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\tlog.warn(\"Could not send the response \"+e.getMessage());\n\t\t\t\t\t\t\t\tif (rep.getResponse(0).getResConf()!=null){\n\t\t\t\t\t\t\t\t\t//FIXME\n\t\t\t\t\t\t\t\t\tlog.warn(\"If your are using WLANs this is not going to work!!\");\n\t\t\t\t\t\t\t\t\tthis.reservationManager.cancelReservation(rep.getResponse(0).getResConf().getReservationID());\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//log.info(\"Response sent number \"+rep.getResponseList().getFirst().getRequestParameters().getRequestID()+\",rep.getPathList().get(0)\"+rep.getResponse(0).getPathList().get(0));\n\n\t\t\t\t\t\t\t/*** STRONGEST: Collaborative PCEs ***/\t\n\t\t\t\t\t\t\t//FIXME: pasarlo al reservation manager\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (collaborationPCESessionManager!=null){\n\t\t\t\t\t\t\t\tif (!(rep.getResponseList().isEmpty())){\n\t\t\t\t\t\t\t\t\tif (!(rep.getResponseList().get(0).getNoPath()!=null)){\n\t\t\t\t\t\t\t\t\t\tPCEPNotification m_not = createNotificationMessage(rep,pathCompReq.getRequestList().get(0).getReservation().getTimer());\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\tcollaborationPCESessionManager.sendNotifyMessage(m_not);\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\t\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\t\tlog.info(\"COMPUTING TIME execeeded time, sending NOPATH\");\n\t\t\t\t\t\tsendNoPath(pathCompReq);\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\tif (analyzeRequestTime){\n\n\t\t\t\tdouble comp=(System.nanoTime()-timeIniNanos)/(double)1000000;\n\t\t\t\tprocTime.analyze(comp);\n\t\t\t\ttimePreNanos=System.nanoTime();\n\t\t\t\tif (comp>maxProcTime){\n\t\t\t\t\tmaxProcTime=comp;\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}",
"private void processSelection(CustomerComplaintAppView view, User user, FileIO fileIO, ComplaintTable complaintTable, Scanner sc, LinkedList<Complaint> complaintList, String selection) {\r\n try {\r\n // Because we are not assuming a perfect user case, we should check if user inserts a valid value for list index;\r\n if ((Integer.parseInt(selection) - 1 < complaintList.size()) && (Integer.parseInt(selection) > 0)) {\r\n Complaint selectedComplaint = complaintList.get(Integer.parseInt(selection) - 1);\r\n // See and edit complaint until user requests to go back\r\n do{\r\n view.seeComplaintContent(selectedComplaint);}\r\n while (editComplaint(selectedComplaint, sc, view, user)); // checker\r\n fileIO.updateComplaintTableCSV(complaintTable); // updater\r\n } else {\r\n throw new InvalidOptionException(selection);\r\n }\r\n // First exception of parse operation should be caught\r\n } catch (NumberFormatException e) {\r\n view.notValidOption();\r\n } catch (InvalidOptionException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n }",
"private void processSelection(int selection) {\n\t\tswitch (selection) {\n\t\tcase 1:\n\t\t\tcoach.displayAvailableSeats();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tbookSeats();\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\trefundSeats();\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tcoach.salesReport();\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tSystem.out.println(\"Bye\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Invalid selection\");\n\t\t}\n\n\t}",
"protected int pickUp(int amt) {\n delayElevator();\n return load.addAndGet(amt);\n }",
"public int actions()\n {\n switch (mState) \n {\n case cProcessInit:\n out();\n if (cSimTimeMicro < cClientCount/cClientTransPerMicro) {\n cSimTimeMicro = cClientCount/cClientTransPerMicro;\n System.out.println(\"\\nSimulation time is too short! It has been reset to \" + cSimTimeMicro + \" micro\\n\");\n }\n cMaxRequestsToSend = (int) (cClientTransPerMicro * cSimTimeMicro);\n System.out.println(\"cMaxRequestsToSend = \" + cMaxRequestsToSend);\n \n if (cTransLogMon)\n {\n System.out.println(cTransMonHeader);\n System.out.println(\"----------------------------------------------------------------------------------------\");\n }\n\n// if (cTick)\n// {\n// activate(new Tick());\n// }\n activate(mTaxJvm);\n return cMeJvm;\n \n case cMeJvm:\n activate(mMeJvm);\n return cMeStandbyJvm;\n\n case cMeStandbyJvm:\n activate(mMeStandbyJvm);\n return cJvmActivated;\n\n case cJvmActivated:\n mClientList = headToArray(mClient.mProcess, new Process[0]);\n \n //double tInterval = 500/tClientList.length; //500 is the minimum response time\n //double tInterval = 1.0/(cClientCount*cClientTransPerMicro); \n \n double tInterval = 1.0D*1000*1000/(cClientCount); //evenly distributed client over 1 second interval\n \n //hold until connect next client to the system \n mHoldTimeBetweenClients = cRandom.normal(tInterval, tInterval*0.3);\n mFor_i = -1;\n // Flow into loop\n\n case cForNext:\n ++mFor_i;\n //for (int i = 0; i < tClientList.length; ++i) //For every client\n if (mFor_i >= mClientList.length)\n {\n return cForEnd;\n }\n\n tClientStartTime = time();\n activate((Process) mClientList[mFor_i]); \n return cNewClient;\n \n case cNewClient:\n hold(mHoldTimeBetweenClients);\n return cForNext;\n\n case cForEnd:\n //hold(cRunTimeMicro);\n //return cHoldRunTimeMicro;\n\n case cHoldRunTimeMicro:\n cActualRunTimeMicro = cSimTimeMicro * 2;\n hold(cActualRunTimeMicro);\n return cHoldRunTime;\n \n case cHoldRunTime:\n if (cTick)\n {\n System.out.println(\"\\nSimulation time = \" + time()/(1000.0*1000.0) + \" sec.\");\n System.out.println(\"Requests = \" + cRequests);\n System.out.println(\"cRequestsToSend = \" + cMaxRequestsToSend);\n System.out.println(\"Av.tax time = \" + cTaxSum/cRequests);\n System.out.println(\"Av.client time = \" + cClientSum/cRequests);\n System.out.println(\"\\nExecution time: \" + ((System.currentTimeMillis() - cStartTime)/1000.0) + \" secs.\"); \n }\n return cProcessDone;\n }\n return cProcessError;\n }",
"private void runBest() {\n }",
"private void executeAction(ElevatorAction first) {\n\n\t}",
"public abstract void msgCookThisOrder(String choice, JiWaiter w, int tableNum);",
"private void processComputerPlayerTurns(Player computerPlayer)\n {\n Random random = new Random();\n String result;\n int doctor_size = computerPlayer.getDoctors().size();\n for(int i = 0; i < doctor_size; i++)\n {\n Doctor doctor = computerPlayer.getDoctors().get(i);\n int actionIndex = random.nextInt(5);\n switch(actionIndex)\n {\n case 0:\n doctor.goTraining(computerPlayer);\n result = \"Computer player : \" + \"After training:\\n\" + doctor + \"\\n\";\n printResult.add(result);\n doctor.endTurn();\n break;\n\n case 1:\n String name = computerPlayer.getName()+\"Doctor\"+game.turns; //newly recruited doctor name will be the string playerName+\"Doctor\"+turnNumber, for example \"JaneDoctor3\".\n doctor.recruitDoctor( computerPlayer, name);\n int size = computerPlayer.getDoctors().size();\n result = \"Computer player : \" + \"A new doctor is recruited \" + computerPlayer.getDoctors().get(size - 1) + \"\\n\";\n printResult.add(result);\n doctor.endTurn();\n break;\n case 2:\n int dept_num = random.nextInt(3);\n Department dept = computerPlayer.getDepartments().get(dept_num);\n if (dept != null)\n {\n doctor.upgradeDepartment( computerPlayer, dept);\n result = \"Computer player : \" + doctor.getName() + \" upgraded \" + dept.getName() + \"\\n\";\n printResult.add(result);\n }\n doctor.endTurn();\n break;\n case 3:\n int dept_num_3 = random.nextInt(3);\n Department dept_3 = computerPlayer.getDepartments().get(dept_num_3);\n if (dept_3 != null)\n {\n doctor.transferToDepartment(dept_3);\n result = \"Computer player : \" + doctor.getName() + \" transfers to \" + dept_3.getName() + \"\\n\";\n printResult.add(result);\n }\n doctor.endTurn();\n break;\n case 4:\n computerPlayer.collectMoney(doctor.raiseFund());\n doctor.endTurn();\n result = \"Computer player : \" + doctor.getName() + \" raise fund\";\n printResult.add(result);\n break;\n }\n doctor.endTurn();\n\n }\n }",
"private static void menu(char choice) {\n do {\n System.out.println();\n System.out.println(\"CHOOSE THE SCHEDULING ALGORITHM\");\n System.out.println(\"-------------------------------\");\n System.out.println(\"( 1 ) First Come First Serve (FCFS)\");\n System.out.println(\"( 2 ) Shortest Job First (SJF)\");\n System.out.println(\"( 3 ) Shortest Remaining Time (SRT)\");\n System.out.println(\"( 4 ) Priority Scheduling\");\n System.out.println(\"( 5 ) Round-Robin (RR)\");\n System.out.println(\"( 6 ) Multi-level Queue Scheduling\");\n System.out.println(\"( 0 ) EXIT\");\n System.out.print(\"CHOICE: \");\n\n choice = scanner.next().charAt(0);\n\n if (choice == '1') {\n System.out.println();\n System.out.println(\"FIRST COME FIRST SERVE ALGORITHM\");\n System.out.println(\"--------------------------------\");\n\n firstComeFirstServe();\n\n } else if (choice == '2') {\n System.out.println();\n System.out.println(\"SHORTEST JOB FIRST ALGORITHM\");\n System.out.println(\"--------------------------------\");\n\n shortestJobFirst();\n\n } else if (choice == '3') {\n System.out.println();\n System.out.println(\"SHORTEST REMAINING TIME ALGORITHM\");\n System.out.println(\"--------------------------------\");\n\n shortestRemainingTime();\n\n } else if (choice == '4') {\n System.out.println();\n System.out.println(\"PRIORITY SCHEDULING ALGORITHM\");\n System.out.println(\"--------------------------------\");\n\n priorityScheduling();\n\n } else if (choice == '5') {\n System.out.println();\n System.out.println(\"ROUND-ROBIN ALGORITHM\");\n System.out.println(\"--------------------------------\");\n\n roundRobin();\n\n } else if (choice == '6') {\n System.out.println();\n System.out.println(\"MULTI-LEVEL QUEUE ALGORITHM\");\n System.out.println(\"--------------------------------\");\n\n multilevelQueue();\n\n } else if (choice == '0') {\n System.exit(0);\n } else {\n System.out.println(\"\\t ________________________________________________\");\n System.out.println(\"\\t|| ||\");\n System.out.println(\"\\t|| > INVALID INPUT ||\");\n System.out.println(\"\\t||________________________________________________||\");\n }\n System.out.println(); // new line after sub-menu\n } while (choice != '0');\n }",
"boolean getUserChooseTrigger();",
"public void run() {\n\n switch( operation )\n {\n case \"Timer\":\n System.out.println( \"INFO : Timer started\" );\n try {\n // wait 7 seconds\n Thread.sleep( 7000 );\n if( !receivedOk )\n {\n // OK not received. Set self as leader\n LeaderState.getInstance().setLeaderID( ServerState.getInstance().getSelfID() );\n electionInProgress = false; // allow another election request to come in\n leaderFlag = true;\n System.out.println( \"INFO : Server s\" + LeaderState.getInstance().getLeaderID()\n + \" is selected as leader! \" );\n\n LeaderState.getInstance().resetLeader(); // reset leader lists when newly elected\n\n Runnable sender = new BullyAlgorithm( \"Sender\", \"coordinator\" );\n new Thread( sender ).start();\n }\n\n if( receivedOk && !leaderFlag )\n {\n System.out.println( \"INFO : Received OK but coordinator message was not received\" );\n\n electionInProgress = false;\n receivedOk = false;\n\n Runnable sender = new BullyAlgorithm( \"Sender\", \"election\" );\n new Thread( sender ).start();\n }\n }\n catch( Exception e ) {\n System.out.println( \"INFO : Exception in timer thread\" );\n }\n break;\n\n case \"Heartbeat\":\n while( true ) {\n try {\n Thread.sleep(10);\n if( leaderFlag && ServerState.getInstance().getSelfID() != LeaderState.getInstance().getLeaderID() ) {\n Thread.sleep( 1500 );\n Server destServer = ServerState.getInstance().getServers()\n .get( LeaderState.getInstance().getLeaderID() );\n\n MessageTransfer.sendServer(\n ServerMessage.getHeartbeat( String.valueOf(ServerState.getInstance().getSelfID()) ),\n destServer\n );\n //System.out.println( \"INFO : Sent heartbeat to leader s\" + destServer.getServerID() );\n }\n }\n\n catch( Exception e ) {\n leaderFlag = false;\n leaderUpdateComplete = false;\n System.out.println( \"WARN : Leader has failed!\" );\n // send election request\n Runnable sender = new BullyAlgorithm( \"Sender\", \"election\" );\n new Thread( sender ).start();\n }\n }\n\n case \"Sender\":\n switch( reqType ) {\n case \"election\":\n try {\n sendElectionRequest();\n } catch( Exception e ) {\n System.out.println( \"WARN : Server has failed, election request cannot be processed\" );\n }\n break;\n\n case \"ok\":\n try {\n sendOK();\n } catch( Exception e ) {\n e.printStackTrace();\n }\n break;\n\n case \"coordinator\":\n try {\n sendCoordinatorMsg();\n } catch( Exception e ) {\n e.printStackTrace();\n }\n break;\n }\n break;\n }\n }",
"public int chooseFromReservationMenu() {\n\t\tfinal int NEW_RESERVATION =1;\t\t\t\t\t\t\t\t\t//option from the reservations sub menu\n\t\tfinal int VIEW_RESERVATION =2;\n\t\tfinal int CANCEL_RESERVATION =3;\n\n\t\tuserChoice = keyboard.nextInt();\n\n\t\tint scenario = 0; \n\t\tif (userChoice == NEW_RESERVATION)\n\t\t\tscenario = 1;\n\t\telse if(userChoice == VIEW_RESERVATION)\n\t\t\tscenario = 2;\n\t\telse if(userChoice == CANCEL_RESERVATION)\n\t\t\tscenario = 3;\n\t\telse\n\t\t\tscenario = 4;\n\n\t\treturn scenario;\t\t\t\t\t\t\t\t\t\t\t\t\t//int scenario returned is entered into a 'switch'\n\t}",
"public static void userSelection(){\n\t\tint selection;\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Which program would you like to run?\");\n\t\tselection=input.nextInt();\n\n\t\tif(selection == 1)\n\t\t\tmazeUnion();\n\t\tif(selection == 2)\n\t\t\tunionPathCompression();\n\t\tif(selection == 3)\n\t\t\tmazeHeight();\n\t\tif(selection == 4)\n\t\t\tmazeSize();\n\t\tif(selection == 5)\n\t\t\tsizePathCompression();\n\t}",
"public interface OnExtraRoutineListener {\n\n void onDeleteRoutine(int position);\n\n void onEditRoutine(Routines item);\n }",
"public void endRoutine()\r\n\t{\r\n\t\ttimer.stop();\r\n\t\ttimer.reset();\r\n\t\ttimer.start();\r\n\t\tdrive.encReset();\r\n\t\tautoStep++;\r\n\t}",
"public void callTheWaiter();",
"public static void simulate (\r\n double maxtime,\r\n double arrival_rate,\r\n double service_rate0,\r\n double service_rate1,\r\n double service_rate2, \r\n double service_rate3_1,\r\n double service_rate3_2,\r\n double service_rate3_3,\r\n double p1,double p2,double p3,int k, double p01, double p02, double p3out, double p31, double p32)\r\n {\n StateB sysB = new StateB();\r\n \r\n double time= 0;\r\n double value2= ExpB.getExp(arrival_rate);\r\n\r\n EventB e1 = new EventB(time+value2,\"Birth\",\"Null\");\r\n EventB e2= new EventB(time+value2,\"Moniter\",\"Null\");\r\n Schedule.add(e1);\r\n Schedule.add(e2);\r\n \r\n while(time < maxtime){\r\n EventB next = Schedule.remove();\r\n time= next.time;\r\n next.function(maxtime,arrival_rate,service_rate0,service_rate1,service_rate2, service_rate3_1,\r\n service_rate3_2,service_rate3_3,p1,p2,p3,k,p01,p02,p3out,p31,p32,sysB);\r\n \r\n \r\n \r\n\r\n }\r\n // System.out.println(Double.toString(sysB.t_busy_time0) );\r\n // System.out.println(Double.toString(sysB.t_busy_time1) );\r\n // System.out.println(Double.toString(sysB.Qlength0) );\r\n // System.out.println(Double.toString(sysB.Qlength1) );\r\n // System.out.println(Double.toString(sysB.monitering_event) );\r\n // System.out.println(Double.toString(sysB.num_drop) );\r\n // System.out.println(Double.toString(sysB.completed_request) );\r\n // System.out.println(Double.toString(sysB.t_response_time) );\r\n\r\n System.out.println();\r\n double util0 = sysB.t_busy_time0 / maxtime;\r\n System.out.println(\"S0 UTIL:\"+ \" \" + Double.toString(util0) );\r\n double qlen0 = sysB.Qlength0/ sysB.monitering_event;\r\n System.out.println(\"S0 QLEN:\"+\" \"+ Double.toString(qlen0) );\r\n double Tresp0 = sysB.t_response_time0/sysB.completed_request0;\r\n System.out.println(\"S0 TRESP:\" + \" \"+ Double.toString(Tresp0) );\r\n \r\n System.out.println();\r\n \r\n double util11 = sysB.t_busy_time11/ maxtime;\r\n System.out.println(\"S1,1 UTIL:\"+ \" \" + Double.toString(util11) );\r\n double util12 = sysB.t_busy_time12/ maxtime;\r\n System.out.println(\"S1,2 UTIL:\"+ \" \" + Double.toString(util12) );\r\n double qlen11 = sysB.Qlength1/ sysB.monitering_event;\r\n System.out.println(\"S1 QLEN:\"+\" \"+ Double.toString(qlen11) );\r\n double Tresp11 = sysB.t_response_time1/ sysB.completed_request1;\r\n System.out.println(\"S1 TRESP:\" + \" \"+ Double.toString(Tresp11) );\r\n \r\n \r\n // System.out.println();\r\n // double util12 = sysB.t_busy_time12/ maxtime;\r\n // System.out.println(\"S1,2 UTIL:\"+ \" \" + Double.toString(util12) );\r\n // double qlen12 = sysB.Qlength1/ sysB.monitering_event;\r\n // System.out.println(\"S1,2 QLEN:\"+\" \"+ Double.toString(qlen12) );\r\n // double Tresp12 = sysB.t_response_time12/sysB.completed_request12;\r\n // System.out.println(\"S1,2 TRESP:\" + \" \"+ Double.toString(Tresp12) );\r\n\r\n System.out.println();\r\n double util2 = sysB.t_busy_time2/ maxtime;\r\n System.out.println(\"S2 UTIL:\"+ \" \" + Double.toString(util2) );\r\n double qlen2 = sysB.Qlength2/ sysB.monitering_event;\r\n System.out.println(\"S2 QLEN:\"+\" \"+ Double.toString(qlen2) );\r\n double Tresp2 = sysB.t_response_time2/sysB.completed_request2;\r\n System.out.println(\"S2 TRESP:\" + \" \"+ Double.toString(Tresp2) );\r\n System.out.println(\"S2 DROPPED:\" + \" \"+ Integer.toString(sysB.num_drop));\r\n\r\n System.out.println();\r\n double util3 = sysB.t_busy_time3/ maxtime;\r\n System.out.println(\"S3 UTIL:\"+ \" \" + Double.toString(util3) );\r\n double qlen3 = sysB.Qlength3/ sysB.monitering_event;\r\n System.out.println(\"S3 QLEN:\"+\" \"+ Double.toString(qlen3) );\r\n double Tresp3 = sysB.t_response_time3/sysB.completed_request3;\r\n System.out.println(\"S3 TRESP:\" + \" \"+ Double.toString(Tresp3) );\r\n\r\n \r\n\r\n System.out.println();\r\n\r\n double qtotal = (sysB.Qlength0 + sysB.Qlength1 + sysB.Qlength2+sysB.Qlength3) / sysB.monitering_event;\r\n System.out.println(\"QTOT:\"+\" \"+ Double.toString(qtotal) );\r\n // double Totalresp= sysB.t_response_time0 + sysB.t_response_time2 +sysB.t_response_time11 +sysB.t_response_time12 + sysB.t_response_time3;\r\n \r\n double total = sysB.t_response_timefinal/sysB.completed_system;\r\n \r\n System.out.println(\"TRESP:\"+ \" \" + Double.toString(total));\r\n // System.out.println(sysB.Qlength1);\r\n // System.out.println(sysB.Qlength2);\r\n // System.out.println(sysB.Qlength3);\r\n // System.out.println(sysB.Qlength0);\r\n \r\n // System.out.println(\"TRESP:\"+ \" \" + Double.toString(TTRESP));\r\n \r\n \r\n\r\n\r\n\r\n\r\n\r\n }",
"@Override\r\n\tpublic void processWorkload() {\n this.spawnUser(periods.get(0).getPeriodStartTimePoint());\t\r\n\t}",
"void doOption(Option<T> opt) {\r\n\t\t\t\t\t\t\t\twriteLock.lock();\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tbuffer.add(opt);\r\n\t\t\t\t\t\t\t\t\tfor (SingleLaneExecutor<Integer> l : listeners) {\r\n\t\t\t\t\t\t\t\t\t\tl.add(buffer.tail());\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} finally {\r\n\t\t\t\t\t\t\t\t\twriteLock.unlock();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}",
"@Override\n public void run(){\n try{\n walk();\n \n int pos=table.enterRestaurant();\n st= state.TAKING_A_SEAT_AT_THE_TABLE;\n System.out.println(st);\n mem.log(this);\n bar.enablePresentMenu();\n //bar.signalWaiter();\n table.waitMenu();\n \n \n if(pos==1){\n this.first=true;\n this.last=false;\n }else if(pos==N){\n this.first=false;\n this.last=true;\n }else{\n this.first=false;\n this.last=false;\n }\n \n st= state.SELECTING_THE_COURSES;\n System.out.println(st);\n mem.log(this);\n table.readMenu();\n table.choose();\n if(first){\n while(!table.allChose()){\n st= state.ORGANIZING_THE_ORDER;\n System.out.println(st);\n mem.log(this);\n table.prepareOrder();\n }\n table.giveOrder();\n bar.enableTakeOrder();\n System.out.println(\"all\");\n //bar.signalWaiter();\n table.describeOrder();\n }\n st= state.CHATTING_WITH_COMPANIONS;\n System.out.println(st);\n mem.log(this);\n table.chat(); // comida chegou alertado pelo waiter\n for(int i=0; i<M; i++){ //3 vezes\n \tst= state.ENJOYING_THE_MEAL;\n System.out.println(st);\n \tmem.log(this);\n int pos_eating=table.eat();\n if(i<M-1){\n if(pos_eating==N){\n table.allFinished();\n st= state.CHATTING_WITH_COMPANIONS;\n System.out.println(st);\n mem.log(this);\n table.chat();\n }else{\n \tst= state.CHATTING_WITH_COMPANIONS;\n System.out.println(st);\n \tmem.log(this);\n table.chat();\n }\n }\n }\n if(last){\n \tst= state.PAYING_THE_MEAL;\n System.out.println(st);\n \tmem.log(this);\n \ttable.getBill();\n bar.enableGetBill();\n //bar.signalWaiter();\n System.out.println(\"antes pay\");\n table.payBill();\n System.out.println(\"depois pay\");\n table.goHome();\n st= state.GOING_HOME;\n System.out.println(st);\n mem.log(this);\n }else{\n table.goHome();\n st= state.GOING_HOME;\n System.out.println(st);\n mem.log(this);\n }\n }catch(MyException e){\n System.err.println(e);\n }\n }",
"private void run()\r\n\t{\r\n\t\tboolean programLoop = true;\r\n\t\t\r\n\t\twhile(programLoop)\r\n\t\t{\r\n\t\t\tmenu();\r\n\t\t\tSystem.out.print(\"Selection: \");\r\n\t\t\tString userInput = input.nextLine();\r\n\t\t\t\r\n\t\t\tint validInput = -1;\r\n\t\t\t\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tvalidInput = Integer.parseInt(userInput);\r\n\t\t\t}\r\n\t\t\tcatch(NumberFormatException e)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Please enter a valid selection.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tswitch(validInput)\r\n\t\t\t{\r\n\t\t\t\tcase 0: forInstructor();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1: addSeedURL();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2: addConsumer();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3: addProducer();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4: addKeywordSearch();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5: printStats();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t//case 10: debug(); //Not synchronized and will most likely cause a ConcurrentModificationException\r\n\t\t\t\t\t\t //break;\t//if multiple Producer and Consumer Threads are running.\r\n\t\t\t\tdefault: break;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"public void run(){\n // Initialized at a lower number just for testing purposes - 2 mins is too long to wait\n // OUTPUT MESSAGE - BANK SIMULATION RESULTS\n \n // RUN MAIN IF CONDITION\n // IF Timer is equal to time requested to run - change equal value to whatever needed\n // THEN print out all recorded results\n if(timer == 25){\n \n totalNumCustomers = helped1 + helped2 + helped3 + helped4 + helped5 + bankLine.size();\n \n System.out.println(\"\\n-------------------------------------------------------------------------------\\n\");\n System.out.println(\" *** BANK SIMULATION RESULTS *** \\n\");\n System.out.println(\"\\t - Total amount of customers that visited the bank: \" + totalNumCustomers + \"\\n\");\n System.out.println(\"\\t - Teller #1 helped: \" + helped1 + \" customers\" + \"\\tTotal occupied time: \" + timeSpent1 + \" seconds\");\n System.out.println(\"\\t - Teller #2 helped: \" + helped2 + \" customers\" + \"\\tTotal occupied time: \" + timeSpent2 + \" seconds\");\n System.out.println(\"\\t - Teller #3 helped: \" + helped3 + \" customers\" + \"\\tTotal occupied time: \" + timeSpent3 + \" seconds\");\n System.out.println(\"\\t - Teller #4 helped: \" + helped4 + \" customers\" + \"\\tTotal occupied time: \" + timeSpent4 + \" seconds\");\n System.out.println(\"\\t - Teller #5 helped: \" + helped5 + \" customers\" + \"\\tTotal occupied time: \" + timeSpent5 + \" seconds\");\n System.out.println(\"\\n\\t - Total amount of customers that did not get help: \" + bankLine.size());\n System.out.println(\"\\n-------------------------------------------------------------------------------\\n\");\n \n System.exit(-1);\n \n // RUN MAIN ELSE CONDITION\n } else {\n // Random time with teller 2 - 5 seconds\n if(randy.nextInt(2) < 6){\n int randomTime = (randy.nextInt(5 - 2) + 3);\n bankLine.add(randomTime);\n }\n \n // BANKER 1------------------------------------------------------------------\n while(banker1 == 1){\n processTime = timer;\n banker1 = 0;\n }\n if((timer - processTime) >= randTeller[0]){\n System.out.println(\"Teller is now available.\");\n availableBanker[0] = true; // Teller is now available\n }\n if(availableBanker[0] == true && bankLine.isEmpty() == false){\n timeSpent1 = timeSpent1 + randTeller[0];\n randTeller[0] = bankLine.poll();\n banker1 = 1;\n System.out.println(\"A customer was served successfully served. (1)\");\n helped1++;\n }\n \n // BANKER 2------------------------------------------------------------------\n // This starts the timer until the teller is done with the customer. Then it resets.\n while(banker2 == 1){\n processTime2 = timer;\n banker2 = 0;\n }\n if((timer - processTime2) >= randTeller[1]){\n System.out.println(\"Teller is now available.\");\n availableBanker[1] = true; // Teller is now available\n }\n if(availableBanker[1] == true && bankLine.isEmpty() == false){\n timeSpent2 = timeSpent2 + randTeller[1];\n randTeller[1] = bankLine.poll();\n banker2 = 1;\n System.out.println(\"A customer was served successfully served. (2)\");\n helped2++;\n }\n \n \n // BANKER 3------------------------------------------------------------------\n while(banker3 == 1){\n processTime3 = timer;\n banker3 = 0;\n }\n if((timer - processTime3) >= randTeller[2]){\n System.out.println(\"Teller is now available.\");\n availableBanker[2] = true; // Teller is now available\n }\n if(availableBanker[2] == true && bankLine.isEmpty() == false){\n timeSpent3 = timeSpent3 + randTeller[2];\n randTeller[2] = bankLine.poll();\n banker3 = 1;\n System.out.println(\"A customer was served successfully served. (3)\");\n helped3++;\n \n }\n \n \n // BANKER 4------------------------------------------------------------------\n while(banker4 == 1){\n processTime4 = timer;\n banker3 = 0;\n }\n if((timer - processTime4) >= randTeller[3]){\n System.out.println(\"Teller is now available.\");\n availableBanker[3] = true; // Teller is now available\n }\n if(availableBanker[3] == true && bankLine.isEmpty() == false){\n timeSpent4 = timeSpent4 + randTeller[3];\n randTeller[3] = bankLine.poll();\n banker4 = 1;\n System.out.println(\"A customer was served successfully served. (4)\");\n helped4++; \n }\n \n \n // BANKER 5------------------------------------------------------------------\n while(banker5 == 1){\n processTime5 = timer;\n banker5 = 0;\n }\n if((timer - processTime5) >= randTeller[4]){\n System.out.println(\"Teller is now available.\");\n availableBanker[4] = true; // Teller is now available\n }\n if(availableBanker[4] == true && bankLine.isEmpty() == false){\n timeSpent5 = timeSpent5 + randTeller[4];\n randTeller[4] = bankLine.poll();\n banker5 = 1;\n System.out.println(\"A customer was served successfully served. (5)\");\n helped5++; \n }\n \n timer++;\n \n } // End of timer == value \n \n }",
"@Override\n public void onClick(View v) {\n routineIntent = new Intent(getApplicationContext(), RoutineTaskActivity.class);\n startActivity(routineIntent);\n }",
"public void subTask(String tr) {\n\t\t\n\t}",
"public void take(Thread usedBy)\n\t{\n\t\tthis.usedBy = usedBy;\n\t\t// System.out.println(usedBy.getName() + \": Taking \" + toString());\n\t}",
"public void takeTurn(IViewRequestor requestor);",
"protected boolean pickAndExecuteAnAction() {\n\t//print(\"in waiter scheduler\");\n\t//Starts the break cycle if onBreak == true\n\tif(onBreak && working ) {\n\t initiateBreak();\n\t return true;\n\t}\n\n\t//Once all the customers have been served\n\t//then the waiter can actually go on break\n\tif(!working && customers.isEmpty() && !startedBreak) {\n\t goOnBreak();\n\t return true;\n\t}\n\n\tif(!onBreak && !working){\n\t endBreak();\n\t}\n\n\t\n\t//Runs through the customers for each rule, so \n\t//the waiter doesn't serve only one customer at a time\n\tif(!customers.isEmpty()){\n\t //System.out.println(\"in scheduler, customers not empty:\");\n\t //Gives food to customer if the order is ready\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.ORDER_READY) {\n\t\t giveFoodToCustomer(c);\n\t\t return true;\n\t\t}\n\t }\n\t //Clears the table if the customer has left\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.IS_DONE) {\n\t\t clearTable(c);\n\t\t return true;\n\t\t}\n\t }\n\n\t //Seats the customer if they need it\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.NEED_SEATED){\n\t\t seatCustomer(c);\n\t\t return true;\n\t\t}\n\t }\n\n\t //Gives all pending orders to the cook\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.ORDER_PENDING){\n\t\t giveOrderToCook(c);\n\t\t return true;\n\t\t}\n\t }\n\n\t //Takes new orders for customers that are ready\n\t for(MyCustomer c:customers){\n\t\t//print(\"testing for ready to order\"+c.state);\n\t\tif(c.state == CustomerState.READY_TO_ORDER) {\n\t\t takeOrder(c);\n\t\t return true;\n\t\t}\n\t }\t \n\t}\n\tif (!currentPosition.equals(originalPosition)) {\n\t moveToOriginalPosition();\n\t return true;\n\t}\n\n\t//we have tried all our rules and found nothing to do. \n\t// So return false to main loop of abstract agent and wait.\n\t//print(\"in scheduler, no rules matched:\");\n\treturn false;\n }",
"private void getAllTotesRightTimer()\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\tstrafeLeftTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase 2:\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 3:\r\n\t\t\t{\r\n\t\t\t\tstrafeLeftTimer();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase 4:\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 5:\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}",
"public ThreadLattice determineThread(SInvokeNode sInvokeNode){\n ThreadLattice result = ThreadLatticeManager.getUNDETERMINED();\n CInvokeNode cInvokeNode = (CInvokeNode) sInvokeNode.getSource();\n UInvokeNode uInvokeNode = (UInvokeNode) cInvokeNode.getSource();\n if(uInvokeNode == null){\n LOG.logln(String.format(\"Why UInvokeNode of %s is null? Thread CaSFGenerator\", cInvokeNode), LOG.ERROR);\n return result;\n }\n Stmt stmt = uInvokeNode.getSource();\n if(stmt == null)\n return result;\n if(!stmt.containsInvokeExpr() || !(stmt.getInvokeExpr() instanceof InstanceInvokeExpr))\n return result;\n InstanceInvokeExpr instanceInvokeExpr = (InstanceInvokeExpr) stmt.getInvokeExpr();\n Local base = (Local) instanceInvokeExpr.getBase();\n if (Util.v().isSubclass(base.getType(), \"java.util.TimerTask\")){\n result = ThreadLatticeManager.getUNKNOWNThreadLattice();\n }\n return result;\n }",
"void doOption(Option<T> opt) {\r\n\t\t\t\t\t\t\t\twriteLock.lock();\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tbuffer.add(opt);\r\n\t\t\t\t\t\t\t\t\tPair<Integer, CircularBuffer<Option<T>>> of = Pair.of(buffer.tail(), buffer);\r\n\t\t\t\t\t\t\t\t\tfor (SingleLaneExecutor<Pair<Integer, CircularBuffer<Option<T>>>> l : listeners) {\r\n\t\t\t\t\t\t\t\t\t\tl.add(of);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} finally {\r\n\t\t\t\t\t\t\t\t\twriteLock.unlock();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}",
"private static <T> T choose(T opt1, T opt2) {\n\t\tint choice = randInt(1, 2);\n\t\tswitch (choice) {\n\t\tcase 1:\n\t\t\treturn opt1;\n\t\tcase 2:\n\t\t\treturn opt2;\n\t\tdefault:\n\t\t\tSystem.err.println(\"Error: Invalid choice: \" + choice);\n\t\t\treturn null;\n\t\t}\n\t}",
"public PickupGearFromStationSocketRoutine(int stationNumber, RobotControl robotControl, Communicator communicator) {\n super(robotControl, communicator);\n\n this.setupStationEndPoint(stationNumber);\n this.firstTime = true;\n this.shouldTurn = 0;\n this.doneTurning = false;\n }",
"public String toss() {\n\t\tlong startingTime = System.currentTimeMillis();\n\t\tString msg=\"SS,AddService:toss,start,\"+startingTime+\",\"+identifier;\n\t\tappendStuff(msg, MyTaskQueue.getInstance().getLogFile());\n\t\tMyTaskQueue.getInstance().addTask();\n\t\t\n\t\t//Spawn a thread to handle the incoming service.. else it is a blocking call\n\t\t//Leave it as is for now\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tSystem.out.println(\"I am gonna sleep for a long time \");\n\t\t\tThread.sleep((long) (Math.random()*100000));\n\t\t\tSystem.out.println(\"Now i am awake \");\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//MyTaskQueue.getInstance().removeTask();\n\t\t//Should add some code for random exits as well\n\t\t\n\t\t\n\t\t//int retVal=(int) Math.pow(new Random().nextInt(),2);\n\t\tint retVal= (int) Math.round( Math.random() );\n\t\t\n\t\t// Storing the records for data usage\n\t\tSystem.out.println(\"This is the val toss return \"+retVal);\n\t\t\n\t\t// Check to see if my chain is empty if it is hash new string\n\t\tif(Chain.getInstance().chain.isEmpty()) {\n\t\t\tChain.getInstance().add(new Block(\"\"+retVal,\"0\"));\n\t\t}\n\t\t// Else get previous hash and hash message\n\t\telse {\n\t\t\tString lastHash = Chain.getInstance().chain.get(Chain.getInstance().chain.size()-1).hash;\n\t\t\tChain.getInstance().add(new Block(\"\"+retVal, lastHash));\n\t\t}\n\t\t\n\t\n\t\tmsg=\"SS,AddService:toss,end,\"+startingTime+\",\"+identifier;\n\t\tappendStuff(msg, MyTaskQueue.getInstance().getLogFile());\n\t\tSystem.out.println(\"return from toss \"+Chain.getInstance().getChain());\n\t\t\n\t\treturn Chain.getInstance().getChain();\n\t\n\t}",
"private boolean performUserOption(final IGraphFile currentFile, final int userDecision)\n {\n switch (userDecision)\n {\n case JOptionPane.CANCEL_OPTION:\n return false;\n case JOptionPane.YES_OPTION:\n currentFile.save();\n setActiveDiagramPreference();\n return true;\n case JOptionPane.NO_OPTION:\n setActiveDiagramPreference();\n return true;\n default:\n return false;\n }\n }",
"private State grabInfo(State s) {\n\t\t// Grabs the info if it needs it, else sets it to null to prevent a\n\t\t// NullPointerException\n\t\tif (s.equals(State.CLASS_COURSE_STUDENT_TASK)) {\n\t\t\tclasses = mf.getMainData().getClasses();\n\t\t\tstudents = classes.get(mf.getCurrentlySelectedClassIndex()).getStudents();\n\t\t\tcourses = students.get(mf.getCurrentlySelectedStudentIndex()).getCourses();\n\t\t\ttasks = courses.get(mf.getCurrentlySelectedCourseIndex()).getCourseTasks();\n\t\t\tcriteria = tasks.get(mf.getCurrentlySelectedAssignmentIndex()).getCriteria();\n\t\t} else if (s.equals(State.CLASS_COURSE_STUDENT)) {\n\t\t\tclasses = mf.getMainData().getClasses();\n\t\t\tstudents = classes.get(mf.getCurrentlySelectedClassIndex()).getStudents();\n\t\t\tcourses = students.get(mf.getCurrentlySelectedStudentIndex()).getCourses();\n\t\t\ttasks = courses.get(mf.getCurrentlySelectedCourseIndex()).getCourseTasks();\n\n\t\t\t// To prevent IndexOutOfBoundsException with no created tasks.\n\t\t\tif (tasks.size() == 0) {\n\t\t\t\t// Sends dialog to the user\n\t\t\t\tint ans = JOptionPane.showConfirmDialog(this,\n\t\t\t\t\t\t\"Du måste ha minst en uppgift för denna vyn; vill du skapa en?\", \"Inga Uppgfiter\",\n\t\t\t\t\t\tJOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE);\n\n\t\t\t\t// Debug message:\n\t\t\t\tSystem.out.println(\"[\"\n\t\t\t\t\t\t+ ((LocalTime.now().getHour() < 10) ? \"0\" + LocalTime.now().getHour()\n\t\t\t\t\t\t\t\t: LocalTime.now().getHour())\n\t\t\t\t\t\t+ \":\"\n\t\t\t\t\t\t+ ((LocalTime.now().getMinute() < 10) ? \"0\" + LocalTime.now().getMinute()\n\t\t\t\t\t\t\t\t: LocalTime.now().getMinute())\n\t\t\t\t\t\t+ \":\"\n\t\t\t\t\t\t+ ((LocalTime.now().getSecond() < 10) ? \"0\" + LocalTime.now().getSecond()\n\t\t\t\t\t\t\t\t: LocalTime.now().getSecond())\n\t\t\t\t\t\t+ \"] GradesPanel: Interrupting GUI update, no tasks created.\");\n\n\t\t\t\t// If answer = yes, then open GUI to\n\t\t\t\tif (ans == JOptionPane.YES_OPTION) {\n\t\t\t\t\t// Debug message:\n\t\t\t\t\tSystem.out.println(\"[\"\n\t\t\t\t\t\t\t+ ((LocalTime.now().getHour() < 10) ? \"0\" + LocalTime.now().getHour()\n\t\t\t\t\t\t\t\t\t: LocalTime.now().getHour())\n\t\t\t\t\t\t\t+ \":\"\n\t\t\t\t\t\t\t+ ((LocalTime.now().getMinute() < 10) ? \"0\" + LocalTime.now().getMinute()\n\t\t\t\t\t\t\t\t\t: LocalTime.now().getMinute())\n\t\t\t\t\t\t\t+ \":\"\n\t\t\t\t\t\t\t+ ((LocalTime.now().getSecond() < 10) ? \"0\" + LocalTime.now().getSecond()\n\t\t\t\t\t\t\t\t\t: LocalTime.now().getSecond())\n\t\t\t\t\t\t\t+ \"] GradesPanel: Opening task creator when done updating\");\n\n\t\t\t\t\t// Tells the program to open the GUI when done\n\t\t\t\t\tthis.shouldAddCourse = true;\n\n\t\t\t\t\t// Sets the tasks to null the tasks\n\t\t\t\t\ttasks = null;\n\n\t\t\t\t\treturn State.CLASS_COURSE;\n\t\t\t\t}\n\n\t\t\t\t// Debug message:\n\t\t\t\tSystem.out.println(\"[\"\n\t\t\t\t\t\t+ ((LocalTime.now().getHour() < 10) ? \"0\" + LocalTime.now().getHour()\n\t\t\t\t\t\t\t\t: LocalTime.now().getHour())\n\t\t\t\t\t\t+ \":\"\n\t\t\t\t\t\t+ ((LocalTime.now().getMinute() < 10) ? \"0\" + LocalTime.now().getMinute()\n\t\t\t\t\t\t\t\t: LocalTime.now().getMinute())\n\t\t\t\t\t\t+ \":\" + ((LocalTime.now().getSecond() < 10) ? \"0\" + LocalTime.now().getSecond()\n\t\t\t\t\t\t\t\t: LocalTime.now().getSecond())\n\t\t\t\t\t\t+ \"] GradesPanel: No new task created.\");\n\n\t\t\t\t// Sets the tasks to null\n\t\t\t\ttasks = null;\n\n\t\t\t\t// Returns\n\t\t\t\treturn State.CLASS_COURSE;\n\t\t\t}\n\t\t} else {\n\t\t\tclasses = null;\n\t\t\tstudents = null;\n\t\t\tcourses = null;\n\t\t\ttasks = null;\n\t\t\tcriteria = null;\n\t\t}\n\n\t\t// Debug message:\n\t\tSystem.out.println(\"[\"\n\t\t\t\t+ ((LocalTime.now().getHour() < 10) ? \"0\" + LocalTime.now().getHour() : LocalTime.now().getHour()) + \":\"\n\t\t\t\t+ ((LocalTime.now().getMinute() < 10) ? \"0\" + LocalTime.now().getMinute() : LocalTime.now().getMinute())\n\t\t\t\t+ \":\"\n\t\t\t\t+ ((LocalTime.now().getSecond() < 10) ? \"0\" + LocalTime.now().getSecond() : LocalTime.now().getSecond())\n\t\t\t\t+ \"] GradesPanel: Interrupting GUI update, no tasks created.\");\n\n\t\t// Returns the state, that was put in.\n\t\treturn s;\n\t}",
"protected abstract String scheduler_next();",
"@Override\n\tpublic Void call() throws Exception {\n\t\tlong money = ThreadLocalRandom.current().nextLong(0,21);\n\t\tUtility.p(callType + \" processing \" + money);\n\t\ttry {\n\t\tswitch ( callType ){\n\t\tcase myAccountYourAccount:\n\t\t\tlock.transferMoneyBad(myAccount,yourAccount,money);\n\t\t\tUtility.p(\"result myAccount:\" + myAccount );\n\t\t\tUtility.p(\"result yourAccount:\" + yourAccount);\n\t\t\tbreak;\n\t\tcase yourAccountMyAccount:\n\t\t\tlock.transferMoneyBad(yourAccount,myAccount,money);\n\t\t\tUtility.p(\"result yourAccount:\" + yourAccount);\n\t\t\tUtility.p(\"result myAccount:\" + myAccount );\n\t\t\tbreak;\n\t\tcase myAccountYourAccountHash:\n\t\t\tlock.transferMoney(myAccount,yourAccount,money);\n\t\t\tUtility.p(\"result myAccount:\" + myAccount );\n\t\t\tUtility.p(\"result yourAccount:\" + yourAccount);\n\t\t\tbreak;\n\t\tcase yourAccountMyAccountHash:\n\t\t\tlock.transferMoney(yourAccount,myAccount,money);\n\t\t\tUtility.p(\"result yourAccount:\" + yourAccount);\n\t\t\tUtility.p(\"result myAccount:\" + myAccount );\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tUtility.p(\"illegal type:\" + callType);\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\treturn null;\n\t}finally {\n\t\tUtility.p(\"exiting\");\n\t}\n\t}",
"@Override\n\tpublic void action() \n\t{\n\t\tif(this.user.arrivedToFinalStation())\n\t\t{\n\t\t\tthis.user.stablishDesiredVehicle();\n\t\t\tthis.user.stablishDesiredStation();\n\t\t}\n\t\t\n\t\t//printing info\n\t\tSystem.out.println(\"\\nI'm \" + this.user.getLocalName() + \": I'm on \" + this.user.getCurrentStation() + \" and I want to go to \" + this.user.desiredStation + \" by \" + this.user.desiredVehicle +\".\\n\");\n\t\t//this.mensaje=scanner.nextLine(); //debug\n\t\t\n\t\t//PetitionRequest\n\t\tSystem.out.println(\"I make a vehicle request to \" + this.user.getCurrentStation() + \": I'm on \" + this.user.getCurrentStation() + \" and I want to go to \" + this.user.desiredStation + \" by \" + this.user.desiredVehicle + \".\");\n\t\tthis.msgObject = new Capsule(null,this.user.getDesiredVehicle(),this.user.getDesiredStation(),null);\n\t\tUtils.enviarMensaje(myAgent, this.user.getCurrentStation(), this.msgObject, \"VEHICLE_REQUEST\");\n\t\t\n\t\t//Waiting for answer\n\t\tACLMessage msg=this.myAgent.blockingReceive(\n\t\t\t\tMessageTemplate.and(\n\t\t\t\t\t\tMessageTemplate.MatchPerformative(ACLMessage.REQUEST), \n\t\t\t\t\t\tMessageTemplate.MatchOntology(\"ontologia\"))\n\t\t\t\t);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tthis.comment = msg.getEnvelope().getComments();\n\t\t\tthis.msgObject = (Capsule) msg.getContentObject();\n\t\t\tSystem.out.println(\"\\t\" + this.user.getCurrentStation() + \" told me \" + this.comment + \". \");\n\t\t\t\n\t\t\tswitch(this.comment)\n\t\t\t{\n\t\t\tcase \"VEHICLE_DELIVERY\":\n\t\t\t\t//1. The station give to the user the vehicle normaly\n\t\t\t\tif(msgObject.getVehicle() != null) {\n\t\t\t\t\tthis.user.takeVehicle(msgObject.getVehicle());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//2. The user goes to the final station\n\t\t\t\tthis.notifyMonitor(\"moving\");\n\t\t\t\tthis.user.goToStation();\n\t\t\t\tthis.notifyMonitor(\"waiting\");\n\n\t\t\t\t//3. Leaves the vehicle on the final station\n\t\t\t\tif(this.user.hasVehicle())\n\t\t\t\t{\n\t\t\t\t\tthis.vehicleTemp = this.user.leaveVehicle();\n\t\t\t\t\tmsgObject = new Capsule(this.vehicleTemp,null, null, null);\n\t\t\t\t\tUtils.enviarMensaje(myAgent, this.user.getCurrentStation(), this.msgObject, \"VEHICLE_RETURN\");\n\t\t\t\t}\n\n\t\t\t\t//4. The user waits a bit\n\t\t\t\tthis.user.waitSomeTime(8000);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"UNSATISFACTORY_REQUEST\":\n\t\t\t\t// The station reports that the request couldn't be completed properly\n\t\t\t\t//1. The capsule can cointain: alternativeStation and alternativeVehicle\n\t\t\t\tif(msgObject.getStation() != null) {\t//checks if there's an alternative reserved station\n\t\t\t\t\tSystem.out.println(\"\\t\"+this.user.getCurrentStation() + \" told me that there's an alternative route -> \" + msgObject.getStation() + \". \");\n\t\t\t\t\tthis.user.stablishDestinationStation(msgObject.getStation());\n\t\t\t\t}\n\t\t\t\tif(msgObject.getVehicle() != null) { //checks if the station gave an alternative vehicle\n\t\t\t\t\tSystem.out.println(\"\\t\"+this.user.getCurrentStation() + \" gived to me an alternative vehicle -> \" + msgObject.getVehicle().getType() + \". \");\n\t\t\t\t\tthis.user.takeVehicle(msgObject.getVehicle());\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"\\tI have to go walking. \");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//2. Moving to the destination station\n\t\t\t\tthis.notifyMonitor(\"moving\");\n\t\t\t\tthis.user.goToStation();\n\t\t\t\tthis.notifyMonitor(\"waiting\");\n\n\t\t\t\t//3. If has a vehicle, the user leaves it\n\t\t\t\tif(this.user.hasVehicle()) \n\t\t\t\t{\n\t\t\t\t\t//send the vehicle to the station\n\t\t\t\t\tthis.vehicleTemp = this.user.leaveVehicle();\n\t\t\t\t\tmsgObject = new Capsule(this.vehicleTemp,null, null, null);\n\t\t\t\t\tUtils.enviarMensaje(myAgent, this.user.getCurrentStation(), this.msgObject, \"VEHICLE_RETURN\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//4. the user waits before restarting the behavior\n\t\t\t\tthis.user.waitSomeTime(4000);\n\t\t\t}\n\t\t}\n\t\tcatch (UnreadableException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n public void startExecuting() {\n getActiveRoutine().startExecutingRoutine();\n }",
"private void setupRoutineList()\n\t{\n\t\tmRoutines = new ArrayList<>();\n\n\t\t// Configure the list view and connect it to the routine list\n\t\tmLvRoutines = (ListView) findViewById(R.id.lv_routines);\n\t\tmLvRoutines.setAdapter(new RoutineListAdapter(this, mRoutines));\n\t\tmLvRoutines.setOnItemClickListener(new AdapterView.OnItemClickListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id)\n\t\t\t{\n\t\t\t\t// Start the RoutineViewerActivity for the selected routine\n\t\t\t\tIntent i = new Intent(getBaseContext(), RoutineViewerActivity.class);\n\t\t\t\ti.putExtra(RoutineViewerActivity.ARG_ROUTINE_ID, mRoutines.get(position).id);\n\t\t\t\tstartActivityForResult(i, 0);\n\t\t\t}\n\t\t});\n\n\t\t// Start the routine loader that will populate the list\n\t\tnew RoutineLoader().execute();\n\t}",
"private void assign(int act, int programCounter, int parm1, int parm2) {\r\n\t\t\taction = act;\r\n\t\t\tpc = programCounter;\r\n\t\t\ttry {\r\n\t\t\t\t// Client does not have direct access to program statement, and\r\n\t\t\t\t// rather than making all\r\n\t\t\t\t// of them go through the methods below to obtain it, we will do\r\n\t\t\t\t// it here.\r\n\t\t\t\t// Want the program statement but do not want observers\r\n\t\t\t\t// notified.\r\n\t\t\t\tps = Globals.memory.getStatementNoNotify(programCounter);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// The only situation causing this so far: user modifies memory\r\n\t\t\t\t// or register\r\n\t\t\t\t// contents through direct manipulation on the GUI, after\r\n\t\t\t\t// assembling the program but\r\n\t\t\t\t// before starting to run it (or after backstepping all the way\r\n\t\t\t\t// to the start).\r\n\t\t\t\t// The action will not be associated with any instruction, but\r\n\t\t\t\t// will be carried out\r\n\t\t\t\t// when popped.\r\n\t\t\t\tps = null;\r\n\t\t\t\tpc = NOT_PC_VALUE; // Backstep method above will see this as\r\n\t\t\t\t\t\t\t\t\t// flag to not set PC\r\n\t\t\t}\r\n\t\t\tparam1 = parm1;\r\n\t\t\tparam2 = parm2;\r\n\t\t\tinDelaySlot = Simulator.inDelaySlot(); // ADDED 25 June 2007\r\n\t\t\t/*\r\n\t\t\t * System.out.println(\"backstep PUSH: action \"+action+\" pc \"+mars.\r\n\t\t\t * util.Binary.intToHexString(pc)+ \" source \"+((ps==null)?\r\n\t\t\t * \"none\":ps.getSource())+ \" parm1 \"+param1+\" parm2 \"+param2);\r\n\t\t\t */\r\n\t\t}",
"public static IntersectionHandler getHandler(String handlerType) {\n return switch (handlerType) {\n case \"simple_semaphore\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n System.out.println(\"Car \" + car.getId() + \" has reached the semaphore, now waiting...\");\n try {\n sleep(car.getWaitingTime());\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n System.out.println(\"Car \" + car.getId() + \" has waited enough, now driving...\");\n }\n };\n case \"simple_n_roundabout\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n System.out.println(\"Car \" + car.getId() + \" has reached the roundabout, now waiting...\");\n int time = ((SimpleRoundabout) Main.intersection).getTime();\n\n try {\n // doar daca nu sunt maxim n masini in intersectie\n ((SimpleRoundabout) Main.intersection).getSem().acquire();\n System.out.println(\"Car \" + car.getId() + \" has entered the roundabout\");\n\n // asteapta cateva secunde pentru a iesi din intersectie\n sleep(time);\n } catch (InterruptedException exc) {\n System.out.println(exc);\n }\n\n System.out.println(\"Car \" + car.getId() + \" has exited the roundabout after \" + (time / 1000) + \" seconds\");\n ((SimpleRoundabout) Main.intersection).getSem().release();\n }\n };\n case \"simple_strict_1_car_roundabout\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n System.out.println(\"Car \" + car.getId() + \" has reached the roundabout\");\n int lane = car.getStartDirection();\n int time = ((StrictRoundabout) Main.intersection).getTime();\n\n try {\n // doar daca in intersectie nu se afla o alta masina de pe banda thread-ului curent\n ((StrictRoundabout) Main.intersection).getSem().get(lane).acquire();\n System.out.println(\"Car \" + car.getId() + \" has entered the roundabout from lane \" + lane);\n\n sleep(time);\n } catch (InterruptedException exc) {\n System.out.println(exc);\n }\n\n System.out.println(\"Car \" + car.getId() + \" has exited the roundabout after \" + (time / 1000) + \" seconds\");\n ((StrictRoundabout) Main.intersection).getSem().get(lane).release();\n }\n };\n case \"simple_strict_x_car_roundabout\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n System.out.println(\"Car \" + car.getId() + \" has reached the roundabout, now waiting...\");\n // asteapta ca toate masinile sa ajunga la intersectie\n try {\n Main.barrierCars.await();\n } catch (BrokenBarrierException | InterruptedException e) {\n e.printStackTrace();\n }\n\n int lane = car.getStartDirection();\n int time = ((StrictRoundabout) Main.intersection).getTime();\n\n try {\n // doar daca nu a fost selectat numarul maxim de masini\n ((StrictRoundabout) Main.intersection).getSem().get(lane).acquire();\n } catch (InterruptedException exc) {\n System.out.println(exc);\n }\n System.out.println(\"Car \" + car.getId() + \" was selected to enter the roundabout from lane \" + lane);\n\n // sincronizarea masinilor pentru intrarea in intersectie\n try {\n ((StrictRoundabout) Main.intersection).barrier.await();\n } catch (BrokenBarrierException | InterruptedException e) {\n e.printStackTrace();\n }\n System.out.println(\"Car \" + car.getId() + \" has entered the roundabout from lane \" + lane);\n\n // asteapta intervalul de timp dat pentru traversarea intersectiei\n try {\n sleep(time);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n System.out.println(\"Car \" + car.getId() + \" has exited the roundabout after \" + (time / 1000) + \" seconds\");\n\n // sincronizarea masinilor pentru iesirea din intersectie\n try {\n ((StrictRoundabout) Main.intersection).barrier.await();\n } catch (BrokenBarrierException | InterruptedException e) {\n e.printStackTrace();\n }\n ((StrictRoundabout) Main.intersection).getSem().get(lane).release();\n }\n };\n case \"simple_max_x_car_roundabout\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n int lane = car.getStartDirection();\n int time = ((StrictRoundabout) Main.intersection).getTime();\n System.out.println(\"Car \" + car.getId() + \" has reached the roundabout from lane \" + lane);\n\n try {\n sleep(car.getWaitingTime());\n } catch (InterruptedException e) {\n e.printStackTrace();\n } // NU MODIFICATI\n\n // Continuati de aici\n\n try {\n // doar daca nu se afla numarul maxim de masini de pe banda curenta in intersectie\n ((StrictRoundabout) Main.intersection).getSem().get(lane).acquire();\n System.out.println(\"Car \" + car.getId() + \" has entered the roundabout from lane \" + lane);\n\n sleep(time);\n } catch (InterruptedException exc) {\n System.out.println(exc);\n }\n\n System.out.println(\"Car \" + car.getId() + \" has exited the roundabout after \" + (time / 1000) + \" seconds\");\n ((StrictRoundabout) Main.intersection).getSem().get(lane).release();\n }\n };\n case \"priority_intersection\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n PriorityIntersection intersection = ((PriorityIntersection) Main.intersection);\n try {\n sleep(car.getWaitingTime());\n } catch (InterruptedException e) {\n e.printStackTrace();\n } // NU MODIFICATI\n // Continuati de aici\n\n if (car.getPriority() == 1) {\n System.out.println(\"Car \" + car.getId() + \" with low priority is trying to enter the intersection...\");\n }\n\n // masina cu prioritate\n if (car.getPriority() > 1) {\n try {\n intersection.getSemHighPriority().acquire();\n } catch (InterruptedException exc) {\n System.out.println(exc);\n }\n\n System.out.println(\"Car \" + car.getId() + \" with high priority has entered the intersection\");\n // stocheaza numarul de masini cu prioritate care se afla in intersectie\n\n try {\n // timpul de traversare a intersectiei\n sleep(intersection.getTime());\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n // o masina cu prioritate a iesit din intersectie\n System.out.println(\"Car \" + car.getId() + \" with high priority has exited the intersection\");\n intersection.getSemHighPriority().release();\n }\n\n // masina fara prioritate; va intra in intersectie daca nu sunt masini cu prioritate in ea\n else if (car.getPriority() == 1) {\n try {\n // doar daca in intersectie nu se afla o masina cu prioritate\n intersection.getSemLowPriority().acquire();\n intersection.getSemHighPriority().acquire(intersection.getCarsHighPriorityNo() + 1);\n } catch (InterruptedException exc) {\n System.out.println(exc);\n }\n\n // masina iese din intersectie instant\n System.out.println(\"Car \" + car.getId() + \" with low priority has entered the intersection\");\n intersection.getSemHighPriority().release(intersection.getCarsHighPriorityNo() + 1);\n intersection.getSemLowPriority().release();\n }\n }\n };\n case \"crosswalk\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n CrossWalkIntersection intersection = ((CrossWalkIntersection) Main.intersection);\n\n // pana ce se termina timpul de executie\n while (!Main.pedestrians.isFinished()) {\n // daca trec pietonii\n if (Main.pedestrians.getPedestriansNo() == intersection.getPedestriansNoMax()) {\n if (!intersection.getIDAndLastColor().get(car.getId()).equals(\"red\")) {\n // adauga masina curenta in coada\n intersection.getQueue().add(car);\n System.out.println(\"Car \" + car.getId() + \" has now red light\");\n // retine ultimul mesaj asociat masinii\n intersection.getIDAndLastColor().put(car.getId(), \"red\");\n }\n\n // daca nu trec pietoni\n } else {\n if (!intersection.getIDAndLastColor().get(car.getId()).equals(\"green\")) {\n // extrage masina din coada\n intersection.getQueue().remove(car);\n System.out.println(\"Car \" + car.getId() + \" has now green light\");\n // retine ultimul mesaj asociat masinii\n intersection.getIDAndLastColor().put(car.getId(), \"green\");\n }\n }\n }\n }\n };\n case \"simple_maintenance\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n SimpleMaintenance intersection = ((SimpleMaintenance) Main.intersection);\n int lane = car.getStartDirection();\n System.out.println(\"Car \" + car.getId() + \" from side number \" + lane + \" has reached the bottleneck\");\n\n // prima banda\n if (lane == 0) {\n try {\n // acquire pe semaforul primei directii\n intersection.getSemLane0().acquire();\n } catch (InterruptedException exc) {\n System.out.println(exc);\n }\n\n // numarul de masini ce trec intersectia de pe prima banda\n intersection.addCarsLane0();\n System.out.println(\"Car \" + car.getId() + \" from side number \" + lane + \" has passed the bottleneck\");\n\n // asteapta ca masinile de pe primul sens sa treaca de bottleneck\n try {\n intersection.getBarrier().await();\n } catch (InterruptedException | BrokenBarrierException e) {\n e.printStackTrace();\n }\n\n synchronized (intersection) {\n // daca a trecut numarul specificat de masini\n if (intersection.getCarsLane0() / intersection.getNoCarsPassingAtOnce() == 1 && intersection.getCarsLane0() != 0) {\n // release pe semaforul celei de-a doua benzi cu X permise\n intersection.getSemLane1().release(intersection.getNoCarsPassingAtOnce());\n intersection.setCarsLane0(0);\n }\n }\n // a doua banda\n } else if (lane == 1) {\n try {\n // acquire pe semaforul celei de-a doua benzi\n intersection.getSemLane1().acquire();\n } catch (InterruptedException exc) {\n System.out.println(exc);\n }\n\n intersection.addCarsLane1();\n System.out.println(\"Car \" + car.getId() + \" from side number \" + lane + \" has passed the bottleneck\");\n\n // asteapta ca masinile de pe al doilea sens sa treaca de bottleneck\n try {\n intersection.getBarrier().await();\n } catch (InterruptedException | BrokenBarrierException e) {\n e.printStackTrace();\n }\n\n synchronized (intersection) {\n // daca a trecut numarul specificat de masini\n if (intersection.getCarsLane1() / intersection.getNoCarsPassingAtOnce() == 1 && intersection.getCarsLane1() != 0) {\n // release pe semaforul primei benzi cu X permise\n intersection.getSemLane0().release(intersection.getNoCarsPassingAtOnce());\n intersection.setCarsLane1(0);\n }\n }\n }\n }\n };\n case \"complex_maintenance\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n ComplexMaintenance intersection = ((ComplexMaintenance) Main.intersection);\n int lane = car.getStartDirection();\n\n }\n };\n case \"railroad\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n RailRoad intersection = ((RailRoad) Main.intersection);\n int lane = car.getStartDirection();\n\n synchronized (intersection) {\n // adauga masinile in map in ordinea in care au venit\n intersection.getCars().putIfAbsent(lane, new ArrayBlockingQueue<>(Main.carsNo));\n intersection.getCars().get(lane).add(car);\n System.out.println(\"Car \" + car.getId() + \" from side number \" + lane + \" has stopped by the railroad\");\n }\n\n // asteapta ca toate masinile sa ajunga la bariera\n try {\n intersection.getBarrierCars().await();\n } catch (BrokenBarrierException | InterruptedException e) {\n e.printStackTrace();\n }\n\n if (car.getId() == 0) {\n System.out.println(\"The train has passed, cars can now proceed\");\n }\n\n // asteapta toate thread-urile\n try {\n intersection.getBarrierCars().await();\n } catch (BrokenBarrierException | InterruptedException e) {\n e.printStackTrace();\n }\n\n synchronized (intersection) {\n // pana ce masina curenta este diferita de prima masina din coada lane-ului\n while (car.getId() != intersection.getCars().get(lane).peek().getId()) {\n try {\n intersection.wait();\n } catch (InterruptedException exc) {\n exc.printStackTrace();\n }\n }\n\n // daca este prima masina din coada lane-ului curent\n if (car.getId() == intersection.getCars().get(lane).peek().getId()) {\n // sterge masina din coada\n intersection.getCars().get(lane).remove();\n System.out.println(\"Car \" + car.getId() + \" from side number \" + lane + \" has started driving\");\n\n // anunta restul thread-urilor\n intersection.notifyAll();\n }\n }\n }\n };\n default -> null;\n };\n }",
"public interface StakeServiceAsync {\n\tvoid sendStake(long uuid, int raceType, int horseNumber, int summ, AsyncCallback<Integer> callback);\n\t\n\tvoid getRaceResultfromDB(int raceId, AsyncCallback<List<Result>> callback);\n}",
"public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n \n // THIS IS THE WELCOME MESSAGE\n System.out.println(\"Hello! I am Bank simulator! \\n\\n\"\n + \"I simulate a bank which consist of customers and availableBanker.\\n\"\n + \"My simulation last for 2 minutes! During this time, I will be keeping track of: \\n\\n\"\n + \" 1) Total amount of customers that visited the bank. \\n\" + \" 2) Total amount of customers that each teller helped.\\n\"\n + \" 3) Total amount of time that each teller was occupied. \\n\" + \" 4) Total amount of customers that did not get to see a teller.\\n\");\n System.out.println(\" - Would you like me to run my simulation? Enter Y or N: \");\n String runCmd = sc.nextLine().toLowerCase();\n \n // SWITCH COMMAND - prompts user if they want to run the simulation or not\n // Takes in user input; Three cases; If y - then runs simlation; If n - then exits; If anything else - prints \"you broke me\"\n switch(runCmd){\n case \"y\": System.out.println(\"Loading . . .\");\n System.out.println(\"Bank Simulation Executed!\");\n System.out.println(\"Please wait 2 minutes. Simulation is currently running . . .\\n\");\n System.out.println(\"-------------------------------------------------------------------\\n\");\n System.out.println(\"CONSOLE LOG: \");\n Runnable runBank = new Runnable(){\n \n//-------- DECLARED VARIABLES ----------------------------------------------------------------------------------\n \n Random randy = new Random(); // Implemented random class -\n \n Queue<Integer> bankLine = new LinkedList<Integer>(); // Implement of Queue class\n \n int totalNumCustomers = 0; // Total number of customers that visited the bank\n \n boolean teller1 = false; \n boolean teller2 = false; // Initial availability set to false\n boolean teller3 = false; // From beginning of simulation - availableBanker are occupied\n boolean teller4 = false;\n boolean teller5 = false;\n \n // Array of bankers\n boolean[] availableBanker = {teller1, teller2, teller3, teller4, teller5};\n \n // Process time int variable\n int processTime = 1, processTime2 = 1, processTime3 = 1, processTime4 = 1, processTime5 = 1;\n \n // Timer for the 2 min count - 120 seconds\n int timer = 0; \n \n // Customer helped\n int helped1 = 0, helped2 = 0, helped3 = 0, helped4 = 0, helped5 = 0;\n \n // Time spent with customer\n int timeSpent1 = 0, timeSpent2 = 0, timeSpent3 = 0, timeSpent4 = 0, timeSpent5 = 0;\n \n // Teller available\n int banker1, banker2, banker3, banker4, banker5;\n \n // Random time with teller (2 - 5 seconds random)\n int[] randTeller = { (randy.nextInt(5 - 2) + 2), (randy.nextInt(5 - 2) + 2), (randy.nextInt(5 - 2) + 2)\n , (randy.nextInt(5 - 2) + 2), (randy.nextInt(5 - 2) + 2)};\n \n//---------- START OF RUN METHOD --------------------------------------------------------------------------------\n \n \n // Method to be ran by the runnable which is triggered by the switch statement (entering y)\n public void run(){\n // Initialized at a lower number just for testing purposes - 2 mins is too long to wait\n // OUTPUT MESSAGE - BANK SIMULATION RESULTS\n \n // RUN MAIN IF CONDITION\n // IF Timer is equal to time requested to run - change equal value to whatever needed\n // THEN print out all recorded results\n if(timer == 25){\n \n totalNumCustomers = helped1 + helped2 + helped3 + helped4 + helped5 + bankLine.size();\n \n System.out.println(\"\\n-------------------------------------------------------------------------------\\n\");\n System.out.println(\" *** BANK SIMULATION RESULTS *** \\n\");\n System.out.println(\"\\t - Total amount of customers that visited the bank: \" + totalNumCustomers + \"\\n\");\n System.out.println(\"\\t - Teller #1 helped: \" + helped1 + \" customers\" + \"\\tTotal occupied time: \" + timeSpent1 + \" seconds\");\n System.out.println(\"\\t - Teller #2 helped: \" + helped2 + \" customers\" + \"\\tTotal occupied time: \" + timeSpent2 + \" seconds\");\n System.out.println(\"\\t - Teller #3 helped: \" + helped3 + \" customers\" + \"\\tTotal occupied time: \" + timeSpent3 + \" seconds\");\n System.out.println(\"\\t - Teller #4 helped: \" + helped4 + \" customers\" + \"\\tTotal occupied time: \" + timeSpent4 + \" seconds\");\n System.out.println(\"\\t - Teller #5 helped: \" + helped5 + \" customers\" + \"\\tTotal occupied time: \" + timeSpent5 + \" seconds\");\n System.out.println(\"\\n\\t - Total amount of customers that did not get help: \" + bankLine.size());\n System.out.println(\"\\n-------------------------------------------------------------------------------\\n\");\n \n System.exit(-1);\n \n // RUN MAIN ELSE CONDITION\n } else {\n // Random time with teller 2 - 5 seconds\n if(randy.nextInt(2) < 6){\n int randomTime = (randy.nextInt(5 - 2) + 3);\n bankLine.add(randomTime);\n }\n \n // BANKER 1------------------------------------------------------------------\n while(banker1 == 1){\n processTime = timer;\n banker1 = 0;\n }\n if((timer - processTime) >= randTeller[0]){\n System.out.println(\"Teller is now available.\");\n availableBanker[0] = true; // Teller is now available\n }\n if(availableBanker[0] == true && bankLine.isEmpty() == false){\n timeSpent1 = timeSpent1 + randTeller[0];\n randTeller[0] = bankLine.poll();\n banker1 = 1;\n System.out.println(\"A customer was served successfully served. (1)\");\n helped1++;\n }\n \n // BANKER 2------------------------------------------------------------------\n // This starts the timer until the teller is done with the customer. Then it resets.\n while(banker2 == 1){\n processTime2 = timer;\n banker2 = 0;\n }\n if((timer - processTime2) >= randTeller[1]){\n System.out.println(\"Teller is now available.\");\n availableBanker[1] = true; // Teller is now available\n }\n if(availableBanker[1] == true && bankLine.isEmpty() == false){\n timeSpent2 = timeSpent2 + randTeller[1];\n randTeller[1] = bankLine.poll();\n banker2 = 1;\n System.out.println(\"A customer was served successfully served. (2)\");\n helped2++;\n }\n \n \n // BANKER 3------------------------------------------------------------------\n while(banker3 == 1){\n processTime3 = timer;\n banker3 = 0;\n }\n if((timer - processTime3) >= randTeller[2]){\n System.out.println(\"Teller is now available.\");\n availableBanker[2] = true; // Teller is now available\n }\n if(availableBanker[2] == true && bankLine.isEmpty() == false){\n timeSpent3 = timeSpent3 + randTeller[2];\n randTeller[2] = bankLine.poll();\n banker3 = 1;\n System.out.println(\"A customer was served successfully served. (3)\");\n helped3++;\n \n }\n \n \n // BANKER 4------------------------------------------------------------------\n while(banker4 == 1){\n processTime4 = timer;\n banker3 = 0;\n }\n if((timer - processTime4) >= randTeller[3]){\n System.out.println(\"Teller is now available.\");\n availableBanker[3] = true; // Teller is now available\n }\n if(availableBanker[3] == true && bankLine.isEmpty() == false){\n timeSpent4 = timeSpent4 + randTeller[3];\n randTeller[3] = bankLine.poll();\n banker4 = 1;\n System.out.println(\"A customer was served successfully served. (4)\");\n helped4++; \n }\n \n \n // BANKER 5------------------------------------------------------------------\n while(banker5 == 1){\n processTime5 = timer;\n banker5 = 0;\n }\n if((timer - processTime5) >= randTeller[4]){\n System.out.println(\"Teller is now available.\");\n availableBanker[4] = true; // Teller is now available\n }\n if(availableBanker[4] == true && bankLine.isEmpty() == false){\n timeSpent5 = timeSpent5 + randTeller[4];\n randTeller[4] = bankLine.poll();\n banker5 = 1;\n System.out.println(\"A customer was served successfully served. (5)\");\n helped5++; \n }\n \n timer++;\n \n } // End of timer == value \n \n } // End of void run \n \n }; // End of runnable\n \n // Tells when to execute a task\n ScheduledThreadPoolExecutor go = new ScheduledThreadPoolExecutor(1);\n \n // scheduleAtFixedRate - runBank\n go.scheduleAtFixedRate(runBank, 0, 1, TimeUnit.SECONDS);\n \n // End of switch case - break\n break; \n//--------------------------------------------------------------------------------------------------------------- \n \n // NO --> EXIT PROGRAM\n case \"n\": System.out.println(\"That's okay . . .! I didn't want to work anyways . . .\");\n System.exit(-1);\n break;\n \n // ANYTHING ELSE --> EXITS PROGRAM \n default: System.out.println(\"You didn't put Y or N!\\n\" + \"You broke meeee . . .\\n\" + \"Good-bye cruel wooooorld . . .\");\n System.exit(-1);\n break;\n \n } // End Switch\n }",
"public static int game(int choise) { // in main method we send user's choice as parameter\n\t\t\t\t\t\t\t\t\t\t\t// to game method and in the method we decide who is winner for\n\t\t\t\t\t\t\t\t\t\t\t// every single game\n\t\tresult = 0;\n\n\t\tint num = new Random().nextInt(3); // gives us 0,1,2\n\t\tnum++; // we added to num 1 and did it same with user's choise. 1,2,3 ... 1=rock , 2=paper , 3 = scissors\n\n\t\tswitch (num) {\n\t\tcase 1:\n\t\t\tSystem.out.println(\"Comp : ROCK\");\n\t\t\tif (choise == 1) {\n\t\t\t\tSystem.out.println(\"User : ROCK \");\n\t\t\t\tresult = 1; // result 1 means no one is winner\n\t\t\t\tbreak;\n\t\t\t} else if (choise == 2) {\n\t\t\t\tSystem.out.println(\"User : PAPER \");\n\t\t\t\tresult = 2; // result 2 means user is winner\n\t\t\t\tbreak;\n\t\t\t} else\n\t\t\t\tSystem.out.println(\"User : SCISSORS \");\n\t\t\t\tresult = 3; // result 3 means computer is winner\n\t\t\t\tbreak;\n\t\tcase 2:\n\t\t\tSystem.out.println(\"Comp : PAPER\");\n\t\t\tif (choise == 1) {\n\t\t\t\tSystem.out.println(\"User : ROCK \");\n\t\t\t\tresult = 3;\n\t\t\t\tbreak;\n\t\t\t} else if (choise == 2) {\n\t\t\t\tSystem.out.println(\"User : PAPER \");\n\t\t\t\tresult = 1;\n\t\t\t\tbreak;\n\t\t\t} else\n\t\t\t\tSystem.out.println(\"User : SCISSORS \");\n\t\t\t\tresult = 2;\n\t\t\t\tbreak;\n\t\tcase 3:\n\t\t\tSystem.out.println(\"Comp : SCISSORS\");\n\t\t\tif (choise == 1) {\n\t\t\t\tSystem.out.println(\"User : ROCK \");\n\t\t\t\tresult = 2;\n\t\t\t\tbreak;\n\t\t\t} else if (choise == 2) {\n\t\t\t\tSystem.out.println(\"User : PAPER \");\n\t\t\t\tresult = 3;\n\t\t\t\tbreak;\n\t\t\t} else\n\t\t\t\tSystem.out.println(\"User : SCISSORS \");\n\t\t\t\tresult = 1;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn result;\n\t}",
"public void method(int choice) {\n switch(choice) {\n case 1:\n method1();\n break;\n case 2:\n method2();\n break;\n default:\n System.out.println(\"Choice not available. Default choice:\");\n method1();\n\n }\n }",
"public void think_blocking()\r\n/* 37: */ {\r\n/* 38: 33 */ Scanner in = new Scanner(System.in);\r\n/* 39: */ Object localObject;\r\n/* 40:143 */ for (;; ((Iterator)localObject).hasNext())\r\n/* 41: */ {\r\n/* 42: 38 */ System.out.print(\"Next action ([move|land|attk] id; list; exit): \");\r\n/* 43: */ \r\n/* 44: 40 */ String[] cmd = in.nextLine().split(\" \");\r\n/* 45: */ \r\n/* 46: 42 */ System.out.print(\"Processing command... \");\r\n/* 47: 43 */ System.out.flush();\r\n/* 48: */ \r\n/* 49: 45 */ this.game.updateSimFrame();\r\n/* 50: */ \r\n/* 51: */ \r\n/* 52: */ \r\n/* 53: */ \r\n/* 54: */ \r\n/* 55: */ \r\n/* 56: 52 */ MapView<Integer, Base.BasicView> bases = this.game.getAllBases();\r\n/* 57: 53 */ MapView<Integer, Plane.FullView> planes = this.game.getMyPlanes();\r\n/* 58: 54 */ MapView<Integer, Plane.BasicView> ennemy_planes = this.game.getEnnemyPlanes();\r\n/* 59: */ \r\n/* 60: 56 */ List<Command> coms = new ArrayList();\r\n/* 61: */ try\r\n/* 62: */ {\r\n/* 63: 59 */ boolean recognized = true;\r\n/* 64: 60 */ switch ((localObject = cmd[0]).hashCode())\r\n/* 65: */ {\r\n/* 66: */ case 3004906: \r\n/* 67: 60 */ if (((String)localObject).equals(\"attk\")) {}\r\n/* 68: */ break;\r\n/* 69: */ case 3127582: \r\n/* 70: 60 */ if (((String)localObject).equals(\"exit\")) {\r\n/* 71: */ break label914;\r\n/* 72: */ }\r\n/* 73: */ break;\r\n/* 74: */ case 3314155: \r\n/* 75: 60 */ if (((String)localObject).equals(\"land\")) {\r\n/* 76: */ break;\r\n/* 77: */ }\r\n/* 78: */ break;\r\n/* 79: */ case 3322014: \r\n/* 80: 60 */ if (((String)localObject).equals(\"list\")) {}\r\n/* 81: */ case 3357649: \r\n/* 82: 60 */ if ((goto 793) && (((String)localObject).equals(\"move\")))\r\n/* 83: */ {\r\n/* 84: 64 */ if (cmd.length != 2) {\r\n/* 85: */ break label804;\r\n/* 86: */ }\r\n/* 87: 66 */ int id = Integer.parseInt(cmd[1]);\r\n/* 88: 67 */ Base.BasicView b = (Base.BasicView)bases.get(Integer.valueOf(id));\r\n/* 89: 68 */ Coord.View c = null;\r\n/* 90: 70 */ if (b == null)\r\n/* 91: */ {\r\n/* 92: 71 */ if (this.game.getCountry().id() != id)\r\n/* 93: */ {\r\n/* 94: 73 */ System.err.println(\"This id isn't corresponding neither to a base nor your country\");\r\n/* 95: */ break label804;\r\n/* 96: */ }\r\n/* 97: 77 */ c = this.game.getCountry().position();\r\n/* 98: */ }\r\n/* 99: */ else\r\n/* 100: */ {\r\n/* 101: 79 */ c = b.position();\r\n/* 102: */ }\r\n/* 103: 81 */ for (Plane.FullView p : planes.valuesView()) {\r\n/* 104: 82 */ coms.add(new MoveCommand(p, c));\r\n/* 105: */ }\r\n/* 106: */ break label804;\r\n/* 107: 87 */ int id = Integer.parseInt(cmd[1]);\r\n/* 108: 88 */ Base.BasicView b = (Base.BasicView)bases.get(Integer.valueOf(id));\r\n/* 109: 89 */ AbstractBase.View c = null;\r\n/* 110: 91 */ if (b == null)\r\n/* 111: */ {\r\n/* 112: 92 */ if (this.game.getCountry().id() != id)\r\n/* 113: */ {\r\n/* 114: 94 */ System.err.println(\"You can't see this base, move around it before you land\");\r\n/* 115: */ break label804;\r\n/* 116: */ }\r\n/* 117: 98 */ c = this.game.getCountry();\r\n/* 118: */ }\r\n/* 119: */ else\r\n/* 120: */ {\r\n/* 121:100 */ c = b;\r\n/* 122: */ }\r\n/* 123:102 */ for (Plane.FullView p : planes.valuesView()) {\r\n/* 124:103 */ coms.add(new LandCommand(p, c));\r\n/* 125: */ }\r\n/* 126: */ break label804;\r\n/* 127:108 */ Plane.BasicView ep = (Plane.BasicView)ennemy_planes.get(Integer.valueOf(Integer.parseInt(cmd[1])));\r\n/* 128:109 */ if (ep == null)\r\n/* 129: */ {\r\n/* 130:111 */ System.err.println(\"Bad id, this plane does not exists\");\r\n/* 131: */ }\r\n/* 132: */ else\r\n/* 133: */ {\r\n/* 134:114 */ for (Plane.FullView p : planes.valuesView()) {\r\n/* 135:115 */ coms.add(new AttackCommand(p, ep));\r\n/* 136: */ }\r\n/* 137: */ break label804;\r\n/* 138:118 */ System.out.println();\r\n/* 139:119 */ System.out.println(\">> My planes:\");\r\n/* 140:120 */ for (Plane.FullView p : planes.valuesView()) {\r\n/* 141:121 */ System.out.println(p);\r\n/* 142: */ }\r\n/* 143:122 */ System.out.println(\">> Ennemy planes:\");\r\n/* 144:123 */ for (Plane.BasicView p : ennemy_planes.valuesView()) {\r\n/* 145:124 */ System.out.println(p);\r\n/* 146: */ }\r\n/* 147:125 */ System.out.println(\">> Visible bases :\");\r\n/* 148:126 */ for (Base.FullView b : this.game.getVisibleBase().valuesView()) {\r\n/* 149:127 */ System.out.println(b);\r\n/* 150: */ }\r\n/* 151:128 */ System.out.println(\">> Your Country\");\r\n/* 152:129 */ System.out.println(this.game.getCountry());\r\n/* 153: */ }\r\n/* 154: */ }\r\n/* 155:130 */ break;\r\n/* 156: */ }\r\n/* 157:132 */ recognized = false;\r\n/* 158:133 */ System.err.println(\"Unrecognized command!\");\r\n/* 159: */ label804:\r\n/* 160:135 */ if (recognized) {\r\n/* 161:136 */ System.out.println(\"Processed\");\r\n/* 162: */ }\r\n/* 163: */ }\r\n/* 164: */ catch (IllegalArgumentException e)\r\n/* 165: */ {\r\n/* 166:139 */ System.out.println(\"Command failed: \" + e);\r\n/* 167:140 */ System.err.println(\"Command failed: \" + e);\r\n/* 168: */ }\r\n/* 169:143 */ localObject = coms.iterator(); continue;Command c = (Command)((Iterator)localObject).next();\r\n/* 170:144 */ this.game.sendCommand(c);\r\n/* 171: */ }\r\n/* 172: */ label914:\r\n/* 173:148 */ in.close();\r\n/* 174:149 */ this.game.quit(0);\r\n/* 175: */ }",
"@Override\n protected Result doInvoke(Invocation invocation, List<Invoker<T>> invokers, LoadBalance loadbalance) throws RpcException {\n Invoker<T> balancedInvoker = select(loadbalance, invocation, invokers, null);\n if (balancedInvoker.isAvailable()) {\n return balancedInvoker.invoke(invocation);\n }\n\n // If none of the invokers has a preferred signal or is picked by the loadbalancer, pick the first one available.\n for (Invoker<T> invoker : invokers) {\n ClusterInvoker<T> clusterInvoker = (ClusterInvoker<T>) invoker;\n if (clusterInvoker.isAvailable()) {\n return clusterInvoker.invoke(invocation);\n }\n }\n //if none available,just pick one\n return invokers.get(0).invoke(invocation);\n }",
"private void handleGetTraining()\n {\n Doctor selectedDoctor = selectDoctor(); // will be null if the doctor is occupied\n\n // TODO:\n // step 1. check if the doctor is occupied, if the doctor is occupied selectedDoctor will be null. If the doctor is occupied\n // add \"You have to select a unoccupied doctor.\\n\" into the printResult ArrayList, call updateListViewLogWindow() to display the message\n // and then return from this method\n // step 2. if the selectedDoctor is not occupied,\n // a. call selectedDoctor.goTraining(humanPlayer)\n // b. and then end the turn for the selectedDoctor\n // c. add the string \"GetTraining\" to printResult ArrayList\n // d. add the string \"After training:\\n\"+selectedDoctor+\"\\n\" to the printResult ArrayList\n // e. output the printResult ArrayList by calling updateListViewLogWindow()\n // f. update the human player's money displayed in the UI by calling updateHumanPlayerMoney()\n // g. set listViewSelectedDoctor to null, this is a string holding all the name, specialty, skill level,\n // salary etc information of the doctor being selected to get training. The selectDoctor()\n // method extract the name to search for the doctor object from the doctors list of the player.\n // WE ASSUME DOCTOR NAMES ARE UNIQUE, if this is not the case, selectDoctor() will not work correctly\n if(selectedDoctor == null){\n printResult.add(\"You have to select a unoccupied doctor.\\n\");\n updateListViewLogWindow();\n return;\n }\n selectedDoctor.goTraining(humanPlayer);\n selectedDoctor.endTurn();\n updateListViewDoctorItems();\n printResult.add(\"GetTraining\");\n printResult.add(\"After training:\\n\"+selectedDoctor+\"\\n\");\n updateListViewLogWindow();\n updateHumanPlayerMoney();\n\n listViewSelectedDoctor = null;\n }",
"void doOption(Option<T> opt) {\r\n\t\t\t\t\t\t\t\twriteLock.lock();\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tbuffer.add(opt);\r\n\t\t\t\t\t\t\t\t\tPair<Integer, List<Option<T>>> of = Pair.of(buffer.size(), buffer);\r\n\t\t\t\t\t\t\t\t\tfor (SingleLaneExecutor<Pair<Integer, List<Option<T>>>> l : listeners) {\r\n\t\t\t\t\t\t\t\t\t\tl.add(of);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} finally {\r\n\t\t\t\t\t\t\t\t\twriteLock.unlock();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}",
"public CodeWait(CodeTerm timeCode, CodeProc sequel, Location begLocation, Location endLocation) {\n // Constructor.\n super(begLocation, endLocation);\n this.timeCode = timeCode;\n this.sequel = sequel;\n }",
"static void call_when_no_carry(String passed){\n\t\tif(!CS)\n\t\t\tcomplete_call_req(passed.substring(4));\n\t}",
"private WorkflowPlan choosePlan(Set<WorkflowPlan> evaluatedPlans) {\n WorkflowPlan plan = evaluatedPlans.iterator().next();\n return plan;\n }",
"public Dao<Routine, Integer> getRoutineDAO() throws java.sql.SQLException {\n if(routineDAO == null) routineDAO = getDao(Routine.class);\n return routineDAO;\n }",
"public static void main(String[] args) {\n\r\n\t\tLane north = new Lane(\"North\");\r\n\t\tLane south = new Lane(\"South\");\r\n\t\tLane east = new Lane(\"East\");\r\n\t\tLane west = new Lane(\"West\");\r\n\t\t\r\n\t\tLane[] lanes = {north, south, east, west};\r\n\t\t\r\n\t\tThread t1 = new Thread(north);\r\n\t\tThread t2 = new Thread(south);\r\n\t\tThread t3 = new Thread(east);\r\n\t\tThread t4 = new Thread(west);\r\n\t\t\r\n\t\tt1.start();\r\n\t\tt2.start();\r\n\t\tt3.start();\r\n\t\tt4.start();\r\n\t\ttry {\r\n\t\t\tThread.sleep(3000);\r\n\t\t} catch (InterruptedException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\tfor (int i = 0; i < 3; ++i) {\r\n\r\n\t\t\tLane longestWait = getLongestWaitLane(lanes);\r\n\t\t\tif (longestWait != null && longestWait.getFront() != null) {\r\n\t\t\t\tCar temp = longestWait.remove();\r\n\t\t\t\tSystem.out.println(\"Let \" + temp.getCarID() + \" through after \" + temp.getWaitTime() + \"\\n\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(500);\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tnorth.setGenerate(false);\r\n\t\tsouth.setGenerate(false);\r\n\t\teast.setGenerate(false);\r\n\t\twest.setGenerate(false);\r\n\t\ttry {\r\n\t\t\tt1.join();\r\n\t\t\tt2.join();\r\n\t\t\tt3.join();\r\n\t\t\tt4.join();\r\n\t\t}\r\n\t\tcatch (InterruptedException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t}\r\n\t\tSystem.out.println(\"STOPPED\");\r\n\t\t\r\n\t\twhile (getLongestWaitLane(lanes) != null) {\r\n\t\t\tLane longestWait = getLongestWaitLane(lanes);\r\n\t\t\tif (longestWait != null && longestWait.getFront() != null) {\r\n\t\t\t\tCar temp = longestWait.remove();\r\n\t\t\t\tSystem.out.println(\"Let \" + temp.getCarID() + \" through after \" + temp.getWaitTime() + \"\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void centralPark() {\n location = \"centralPark\";\n System.out.print(\"______________________________________________________________\\n\");\n System.out.println(\"\\n////// CENTRAL PARK //////\");\n System.out.println(\"\\nYou have entered Central Park!\");\n System.out.println(\"The park is busy, birds are tweeting, families are having picnic's. The trees are low, swinging is not great here!\");\n\n System.out.println(\"Please enter [1] if you would like explore | Enter [2] if you would like to go back to base: \");\n userSwings = input.nextInt();\n\n if (userSwings == 1) {\n System.out.print(\"______________________________________________________________\\n\");\n System.out.println(\"\\nYour spider-sense goes off!!\");\n System.out.println(\"You hear sirens, it sounds like a crime!\");\n\n System.out.println(\"Do you wish to help? Enter 'yes' or 'no\");\n String userChoice = input.nextLine();\n userChoice = input.nextLine();\n\n //If user wishes to fight crime, run a crime method within the crime class\n if (userChoice.equals(\"yes\")) {\n c.burgulary();\n avengersTower();\n } else if (userChoice.equals(\"no\")) {\n avengersTower();\n }\n } else if (userSwings == 2) {\n avengersTower();\n } else {\n System.out.println(\"Please enter either 1 or 2!!\");\n centralPark();\n }\n }",
"public static IntersectionHandler getHandler(String handlerType) {\n return switch (handlerType) {\n case \"simple_semaphore\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n \t// ex 1\n\t\t\t\t\tSystem.out.println(\"Car \"+ car.getId() + \" has reached the semaphore, \" +\n\t\t\t\t\t\t\t \"now waiting...\");\n\t try {\n\t\t sleep(car.getWaitingTime());\n\t } catch (InterruptedException e) {\n\t\t e.printStackTrace();\n\t }\n\t System.out.println(\"Car \" + car.getId() + \" has waited enough, now driving...\");\n\n }\n };\n case \"simple_n_roundabout\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n \t// ex 2\n\t\t\t\t\tSimpleNRoundabout inter = (SimpleNRoundabout) Main.intersection;\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tSystem.out.println(\"Car \"+ car.getId() + \" has reached the \" +\n\t\t\t\t\t\t\t\t\t \"roundabout, now waiting...\");\n\t\t\t\t\t\t\t// semafor pt cele n masini\n\t\t\t\t\t\t\tinter.s.acquire();\n\n\n\t\t\t\t\t\t\tSystem.out.println(\"Car \"+ car.getId() + \" has entered the roundabout\");\n\t\t\t\t\t\t\t// sleep t secunde\n\t\t\t\t\t\t\tsleep(inter.t);\n\t\t\t\t\t\t\tSystem.out.println(\"Car \"+ car.getId() +\" has exited the roundabout after \"\n\t\t\t\t\t\t\t\t\t + inter.t + \" seconds\");\n\t\t\t\t\t\t\tinter.s.release();\n\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\n }\n };\n case \"simple_strict_1_car_roundabout\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n\t\t\t\t\t// ex 3\n \tSimpleStrict1Car inter = (SimpleStrict1Car) Main.intersection;\n\t System.out.println(\"Car \"+ car.getId() + \" has reached the roundabout\");\n\n\t try {\n\t \t //semafor de 1 pentru fiecare directie\n\t\t\t inter.s.get(car.getStartDirection()).acquire();\n\n\t\t\t System.out.println(\"Car \"+ car.getId() + \" has entered the roundabout from \" +\n\t\t\t\t\t \"lane \" + car.getStartDirection());\n\t\t\t // sleep t secunde\n\t\t\t sleep(inter.t);\n\t\t\t System.out.println(\"Car \"+ car.getId() +\" has exited the roundabout after \" +\n\t\t\t\t\t inter.t + \" seconds\");\n\t\t\t inter.s.get(car.getStartDirection()).release();\n\n\t\t } catch (InterruptedException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\n }\n };\n case \"simple_strict_x_car_roundabout\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n\t\t\t\t\t// ex 4\n\t SimpleStrictXCar inter = (SimpleStrictXCar) Main.intersection;\n\t System.out.println(\"Car \"+ car.getId() + \" has reached the roundabout, now waiting...\");\n\n\t try {\n\t \t// bariera pt a se scrie prima oara mesajele de reached\n\t\t inter.barrierAfterReach.await();\n\t } catch (InterruptedException e) {\n\t\t e.printStackTrace();\n\t } catch (BrokenBarrierException e) {\n\t\t e.printStackTrace();\n\t }\n\t try {\n\t\t\t try {\n\t\t\t \t// semafor de x pentru fiecare directie\n\t\t\t\t inter.s.get(car.getStartDirection()).acquire();\n\t\t\t\t System.out.println(\"Car \"+ car.getId() + \" was selected to enter the \" +\n\t\t\t\t\t\t \"roundabout from lane \" + car.getStartDirection());\n\t\t\t\t // bariera pt a se scrie mesajele cu selected\n\t\t\t\t inter.barrier.await();\n\t\t\t } catch (BrokenBarrierException e) {\n\t\t\t\t e.printStackTrace();\n\t\t\t }\n\n\n\t\t\t System.out.println(\"Car \"+ car.getId() + \" has entered the roundabout from lane\" +\n\t\t\t\t\t \" \" + car.getStartDirection());\n\n\t\t\t\t\t\t\t// sleep t secunde cand masina e in giratoriu\n\t\t\t sleep(inter.t);\n\n\t\t\t try {\n\t\t\t \t// bariera pt a se scrie mesajele cu entered\n\t\t\t\t inter.barrier.await();\n\t\t\t\t System.out.println(\"Car \"+ car.getId() +\" has exited the roundabout after \"\n\t\t\t\t\t\t + inter.t + \" seconds\");\n\t\t\t } catch (BrokenBarrierException e) {\n\t\t\t\t e.printStackTrace();\n\t\t\t }\n\n\t\t\t inter.s.get(car.getStartDirection()).release();\n\n\t\t } catch (InterruptedException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\n\n }\n };\n case \"simple_max_x_car_roundabout\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n \t// ex 5\n // Get your Intersection instance\n\t SimpleMaxXCar inter = (SimpleMaxXCar) Main.intersection;\n try {\n sleep(car.getWaitingTime());\n } catch (InterruptedException e) {\n e.printStackTrace();\n } // NU MODIFICATI\n\n\t try {\n\t\t System.out.println(\"Car \"+ car.getId() + \" has reached the roundabout from lane \"\n\t\t\t\t + car.getStartDirection());\n\t\t // semafor de x pt fiecare directie\n\t\t inter.s.get(car.getStartDirection()).acquire();\n\t\t System.out.println(\"Car \"+ car.getId() + \" has entered the roundabout from lane \"\n\t\t\t\t + car.getStartDirection());\n\n\t\t // sleep t secunde cand masina e in giratoriu\n\t\t sleep(inter.t);\n\n\t\t System.out.println(\"Car \"+ car.getId() +\" has exited the roundabout after \"\n\t\t\t\t + inter.t + \" seconds\");\n\n\t\t inter.s.get(car.getStartDirection()).release();\n\n\t } catch (InterruptedException e) {\n\t\t e.printStackTrace();\n\t }\n }\n };\n case \"priority_intersection\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n \t// ex 6\n // Get your Intersection instance\n\t\t\t\t\tPriorityIntersection inter = (PriorityIntersection) Main.intersection;\n try {\n sleep(car.getWaitingTime());\n } catch (InterruptedException e) {\n e.printStackTrace();\n } // NU MODIFICATI\n\n\t // masinile din lane 1 sunt adaugate in queue fara prioritate\n\t if(car.getPriority()==1) {\n\t\t inter.queueLow.add(car);\n\t\t System.out.println(\"Car \"+ car.getId()+\" with low priority is \" +\n\t\t\t\t \"trying to enter the intersection...\");\n\n\t\t // se asteapta pana cand in intersectie nu mai sunt masini\n\t\t // cu prioritate\n\t\t while(!inter.queueHigh.isEmpty()) {}\n\n\t\t // daca nu sunt in intersectie masini cu prioritate\n\t\t if(inter.queueHigh.isEmpty()) {\n\t\t\t try {\n\t\t\t \t// semafor pt ca operatia de poll sa nu se faca in paralel\n\t\t\t\t inter.s.acquire();\n\t\t\t } catch (InterruptedException e) {\n\t\t\t\t e.printStackTrace();\n\t\t\t }\n\t\t\t // se scoate varful cozii\n\t\t\t Car auxLow = (Car) inter.queueLow.poll();\n\t\t\t System.out.println(\"Car \"+ auxLow.getId()+\" with low priority \" +\n\t\t\t\t\t \"has entered the intersection\");\n\t\t\t inter.s.release();\n\n\n\t\t }\n\n\t }\n\t\t\t\t\t//daca masina are prioritate\n\t else {\n\t\t\t\t\t\t//se adauga in coada cu prioritate\n\t\t inter.queueHigh.add(car);\n\n\n\t \tSystem.out.println(\"Car \"+ car.getId()+\" with high priority has \" +\n\t\t\t\t \"entered the intersection\");\n\t\t try {\n\t\t \t// sleep 2000ms pt fiecare masina cu prioritate\n\t\t\t sleep(2000);\n\t\t } catch (InterruptedException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\t\t System.out.println(\"Car \"+ car.getId()+\" with high priority has \" +\n\t\t\t\t \"exited the intersection\");\n\n\t\t //se scoate din coada\n\t\t inter.queueHigh.poll();\n\n\t }\n\n }\n };\n case \"crosswalk\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n \t// ex 7\n\t\t\t\t\tCrosswalk inter = (Crosswalk) Main.intersection;\n\t\t\t\t\t// 2 variabile ce tin evidenta la ultimul mesaj\n\t\t\t\t\tboolean wasGreen=false, wasRed=false;\n\t\t\t\t\tPedestrians pedestrians = (Pedestrians) Main.pedestrians;\n\n\t\t\t\t\twhile(!pedestrians.isFinished()) {\n\t\t\t\t\t\t// daca nu sunt pietoni\n\t\t\t\t\t\tif(!pedestrians.isPass() && !wasGreen) {\n\n\t\t\t\t\t\t\tSystem.out.println(\"Car \"+ car.getId() + \" has now green light\");\n\t\t\t\t\t\t\twasGreen = true;\n\t\t\t\t\t\t\twasRed = false;\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t// daca sunt pietoni\n\t\t\t\t\t\tif(pedestrians.isPass() && !wasRed) {\n\n\t\t\t\t\t\t\tSystem.out.println(\"Car \"+ car.getId() + \" has now red light\");\n\t\t\t\t\t\t\twasGreen = false;\n\t\t\t\t\t\t\twasRed = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\t// am observat ca uneori nu toate masinile apuca sa trimita ultimul mesaj\n\t // in cazul acesta il fortez\n\t\t\t\t\tif(!wasGreen)\n\t\t\t\t\t\tSystem.out.println(\"Car \"+ car.getId() + \" has now green light\");\n\n\n }\n };\n case \"simple_maintenance\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n \t// ex 8\n \tSimpleMaintenance inter = (SimpleMaintenance) Main.intersection;\n\n\t System.out.println(\"Car \"+ car.getId()+\" from side number \" +\n\t\t\t car.getStartDirection() + \" has reached the bottleneck\");\n\n\t // daca masina vine din directia 0\n\t if(car.getStartDirection()==0) {\n\n\t\t try {\n\t\t \t// semaforul s0 care initial are valoarea = nr de masini permise in\n\t\t\t // acelasi timp de pe un sens\n\t\t\t inter.s0.acquire();\n\t\t } catch (InterruptedException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\n\t\t System.out.println(\"Car \"+ car.getId()+\" from side number 0 has passed \" +\n\t\t\t\t \"the bottleneck\");\n\t\t try {\n\t\t \t// bariera cu valoarea = nr de masini permise in acelasi timp pe un sens\n\t\t\t inter.barrier.await();\n\t\t } catch (InterruptedException e) {\n\t\t\t e.printStackTrace();\n\t\t } catch (BrokenBarrierException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\t\t // se creste semaforul de pe sensul opus, initializat la 0\n\t\t // se va creste cu nr, avand bariera mai sus\n\t\t inter.s1.release();\n\n\t }\n\t\t\t\t\t//analog ca mai sus , schimband s0 cu s1 si invers\n\t if(car.getStartDirection()==1) {\n\n\t\t try {\n\t\t\t inter.s1.acquire();\n\t\t } catch (InterruptedException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\n\t\t System.out.println(\"Car \"+ car.getId()+\" from side number 1 has passed \" +\n\t\t\t\t \"the bottleneck\");\n\t\t try {\n\t\t\t inter.barrier.await();\n\t\t } catch (InterruptedException e) {\n\t\t\t e.printStackTrace();\n\t\t } catch (BrokenBarrierException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\t\t inter.s0.release();\n\n\t }\n\n }\n };\n case \"complex_maintenance\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n\n \n }\n };\n case \"railroad\" -> new IntersectionHandler() {\n @Override\n public void handle(Car car) {\n\t\t\t\t\t// ex 10\n\t\t\t\t\tRailroad inter = (Railroad) Main.intersection;\n\t\t\t\t\tSystem.out.println(\"Car \" + car.getId() +\" from side number \"+ car.getStartDirection()\n\t\t\t\t\t\t\t +\" has stopped by the railroad\");\n\t\t\t\t\t// adaugare intr-o coada pentru fiecare sens\n\t\t\t\t\tif(car.getStartDirection() ==0 ) inter.queue0.add(car);\n\t\t\t\t\telse inter.queue1.add(car);\n\t try {\n\t \t// bariera pt toate masinile\n\t\t inter.barrier.await();\n\t\t if(car.getId()==0) {\n\t\t\t System.out.println(\"The train has passed, cars can now proceed\");\n\t\t }\n\t\t // bariera pt toate masinile\n\t\t inter.barrier.await();\n\t } catch (InterruptedException e) {\n\t\t e.printStackTrace();\n\t } catch (BrokenBarrierException e) {\n\t\t e.printStackTrace();\n\t }\n\n\t // pt masinile din directia 0\n\t if(car.getStartDirection() ==0 ) {\n\t\t try {\n\t\t \t// semafor de valoare 1 pt operatia de poll\n\t\t\t inter.s.acquire();\n\t\t } catch (InterruptedException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\t\t // se scoate capul cozii\n\t\t Car aux = (Car) inter.queue0.poll();\n\t\t System.out.println(\"Car \" + aux.getId() +\n\t\t\t\t \" from side number 0 has started driving\");\n\t\t inter.s.release();\n\t }\n\t\t\t\t\t// analog ca mai sus, dar pt sensul celalalt\n\t else {\n\t\t try {\n\t\t\t inter.s.acquire();\n\t\t } catch (InterruptedException e) {\n\t\t\t e.printStackTrace();\n\t\t }\n\t\t Car aux = (Car) inter.queue1.poll();\n\t\t System.out.println(\"Car \" + aux.getId() +\n\t\t\t\t \" from side number 1 has started driving\");\n\t\t inter.s.release();\n\t }\n\n }\n };\n default -> null;\n };\n }",
"static void perform_cp(String passed){\n\t\tint type = type_of_cp(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tcall_when_sign_not(passed);\n\t\t\tbreak;\n\t\t}\n\t}",
"void probDeterSelection_actionPerformed(ActionEvent e) {\n String selectedControl = this.probDeterSelection.getSelectedItem().toString();\n if(selectedControl.equalsIgnoreCase(this.PROBABILISTIC)){\n try{\n this.initERF_GuiBean();\n }catch(RuntimeException ee){\n JOptionPane.showMessageDialog(this,\"Connection to ERF failed\",\"Internet Connection Problem\",\n JOptionPane.OK_OPTION);\n System.exit(0);\n }\n }\n else if(selectedControl.equalsIgnoreCase(this.DETERMINISTIC)){\n try{\n this.initERFSelector_GuiBean();\n }catch(RuntimeException ee){\n JOptionPane.showMessageDialog(this,\"Connection to ERF failed\",\"Internet Connection Problem\",\n JOptionPane.OK_OPTION);\n System.exit(0);\n }\n }\n }",
"@Override\r\n\tpublic Action act(Vehicle vehicle, Task availableTask) {\n\t\t\r\n\t\tif (!setupTable && !this.myAgent.name().equals(\"reactive-random\")){\r\n\t\t\tsetupTable = true;\r\n\t\t\tRLA(vehicle.costPerKm());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tAction action;\r\n\t\t\r\n\t\t\r\n\t\t// ******************Choose if the vehicle pick the task or go to another city ********************************//\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tif (this.myAgent.name().equals(\"reactive-dummy\"))\r\n\t\t{\r\n\t\t\tdouble min = vehicle.getCurrentCity().distanceTo(vehicle.getCurrentCity().randomNeighbor(random)) ;\r\n\t\t\tCity nearCity = vehicle.getCurrentCity().randomNeighbor(random);\r\n\t\t\t\r\n\t\t\tfor(City myCity: vehicle.getCurrentCity()) {\r\n\t\t\t\tif( vehicle.getCurrentCity().distanceTo(myCity)<=min)\r\n\t\t\t\t{\r\n\t\t\t\t\tmin = vehicle.getCurrentCity().distanceTo(myCity);\r\n\t\t\t\t\tnearCity = myCity;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (availableTask != null && nearCity.id ==availableTask.deliveryCity.id)\r\n\t\t\t\taction = new Pickup(availableTask);\r\n\t\t\telse\r\n\t\t\t\taction = new Move(nearCity);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tif(!this.myAgent.name().equals(\"reactive-random\"))\t\t\t\t\t//reinforcement learning \r\n\t\t{\r\n\t\t\tCity id = ChooseAction(availableTask, vehicle.getCurrentCity() , vehicle.costPerKm());\r\n\t\t\t\r\n\t\t\tif (availableTask == null || id != availableTask.deliveryCity ) \r\n\t\t\t\taction = new Move(id);\r\n\t\t\telse \r\n\t\t\t\taction = new Pickup(availableTask);\r\n\t\t\t\r\n\t\t} else \t\t\t\t\t\t\t\t\t\t\t\t\t\t//randomized actions\r\n\t\t{\r\n\t\t\t\r\n\t\t\tif (availableTask == null || random.nextDouble() > pPickup) {\r\n\t\t\t\tCity currentCity = vehicle.getCurrentCity();\r\n\t\t\t\taction = new Move(currentCity.randomNeighbor(random));\r\n\t\t\t} else \r\n\t\t\t\taction = new Pickup(availableTask);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif (numActions >= 1) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"The total of profit after \"+numActions+\" actions is \"+myAgent.getTotalProfit()+\" (average profit: \"+(myAgent.getTotalProfit() / (double)numActions)+\")\");\r\n\t\t}\r\n\t\tnumActions++;\r\n\t\t\r\n\t\treturn action;\r\n\t}",
"public final Tile selectComputerMove() {\r\n Tile tile = null;\r\n int count = 0;\r\n String tileName = null;\r\n boolean continueLoop = true;\r\n \r\n // First try to find a winning move\r\n for (Rail rail : rails) {\r\n for (Tile t : rail.getTiles()) {\r\n if (t.getText().equals(\"0\")) count++;\r\n }\r\n if (count == 2) {\r\n for (Tile t : rail.getTiles()) {\r\n if (t.getText().equals(\"\")) {\r\n tileName = t.getName();\r\n return t;\r\n }\r\n }\r\n }\r\n count = 0; \r\n }\r\n \r\n // If none found, try to block \"X\"\r\n for (Rail rail : rails) {\r\n for (Tile t : rail.getTiles()) {\r\n if (t.getText().equals(\"X\")) count++;\r\n }\r\n if (count == 2) {\r\n for (Tile t : rail.getTiles()) {\r\n if (t.getText().equals(\"\")) {\r\n tileName = t.getName();\r\n return t;\r\n }\r\n }\r\n }\r\n count = 0;\r\n }\r\n \r\n // If no blocking move, try to play the center which gives \"O\"\r\n // a statistical advantage\r\n if (!tiles[R2C2].isSelected()) {\r\n return tiles[R2C2];\r\n }\r\n \r\n \r\n // If center move is not available, try to find an open corner tile, \r\n // which might set up an winning combination\r\n if (!tiles[R1C1].isSelected()) {\r\n return tiles[R1C1];\r\n } else if (!tiles[R3C3].isSelected()) {\r\n return tiles[R3C3];\r\n } else if (!tiles[R3C1].isSelected()) {\r\n return tiles[R3C1];\r\n } else if (!tiles[R1C3].isSelected()) {\r\n return tiles[R1C3];\r\n }\r\n \r\n // If none found just pick an empty tile at random\r\n if(tileName == null) {\r\n int row = rand.nextInt(3) + 1;\r\n int col = rand.nextInt(3) + 1;\r\n tileName = \"r\" + row + \"c\" + col;\r\n for (Tile btn: tiles) {\r\n if (btn.getName().equals(tileName)) {\r\n tile = btn;\r\n break;\r\n }\r\n }\r\n }\r\n \r\n return tile;\r\n }",
"private static void executeMenuOption(int user_option) throws IOException{\n\t\tboolean exit = false; \n\t\t\n\t\twhile(!exit){\n\t\tswitch(user_option){\n\t\t\tcase 1:\n\t\t\t\tSystem.out.println();\n\t\t\t\taddNewBook();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tSystem.out.println();\n\t\t\t\tcheckoutBook();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.println();\n\t\t\t\treturnBook();\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tSystem.out.println();\n\t\t\t\tqueryBook();\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tSystem.out.println();\n\t\t\t\tprintFinedStudents();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println();\n\t\t\t\tsaveChanges(); //Overwrite the students.txt and books.txt files with the content of the ALL_STUDENTS and ALL_BOOKS data structures respectively\n\t\t\t\texit = true; //exit program \n\t\t\t\tbreak;\n\t\t }\n\t\t\tif(!exit){ //if user has not exited the program, then display the main menu again and get user's input for the menu option\n\t\t\t\tSystem.out.println();\n\t\t\t\tdisplayMainMenu();\n\t\t\t\tuser_option = getIntegerInput(); //get menu option to execute\n\t\t\t}\n\t\t}\n\t}",
"public abstract <T> void showChoiceBox(String message, Consumer<T> resultCallback, T firstOption, T... options);",
"public int chooseElevator() {\n\t\tPair<Integer,Direction> eleLoc;\n\t\tHashMap<Integer, Pair<Integer, Direction>> mapClone = map.getElevatorsData(); //get map of up to date elevator locations\n\t\tint distance;\n\t\tint minDist=9999;\n\t\tint choice = -1;\n\t\t//iterate over all elevators in the system\n\t\tfor(int i = 1;i<=Constants.elevator;i++) {\n\t\t\teleLoc = mapClone.get(i);//get elevators current system\n\t\t\tdistance =calculateDistance(eleLoc);\n\t\t\t//System.out.println(\"Elevator \" + i + \" is \" + distance + \" away from next job\");\n\t\t\t//if distance is optimal\n\t\t\tif(distance >=0 && distance <minDist) {\n\t\t\t\tchoice = i;\n\t\t\t\tminDist = distance;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn choice;\n\t}",
"public abstract void pickUp();",
"public void teleopPeriodic() {\r\n //Driving\r\n if (driveChooser.getSelected().equals(\"tank\")){\r\n if (joystickChooser.getSelected().equals(\"two\")){\r\n drive.tankDrive(leftJoystick.getY(), rightJoystick.getY());\r\n } \r\n else {\r\n drive.tankDrive(manipulator.getY(), manipulator.getThrottle());\r\n }\r\n }\r\n if (driveChooser.getSelected().equals(\"arcade1\")){\r\n if (joystickChooser.getSelected().equals(\"two\")){\r\n drive.arcadeDrive(leftJoystick.getY(), leftJoystick.getX());\r\n } \r\n else {\r\n drive.arcadeDrive(manipulator.getY(), manipulator.getX());\r\n }\r\n }\r\n if (driveChooser.getSelected().equals(\"arcade2\")){\r\n if (joystickChooser.getSelected().equals(\"two\")){\r\n drive.arcadeDrive(leftJoystick.getY(), rightJoystick.getX());\r\n }\r\n else{\r\n drive.arcadeDrive(manipulator.getY(), manipulator.getTwist());\r\n }\r\n }\r\n \r\n //Shooting\r\n if (shootButton1.get()||shootButton2.get()){\r\n frontShooter.set(-1);\r\n backShooter.set(1);\r\n }\r\n else{\r\n frontShooter.set(0);\r\n backShooter.set(0); \r\n }\r\n if (transportButton1.get()||transportButton2.get()){\r\n transport.set(-1);\r\n }\r\n else{\r\n transport.set(0); \r\n }\r\n \r\n //Intake\r\n if (intakeButton1.get()||intakeButton2.get()){\r\n //intakeA.set(-1);BROKEN\r\n intakeB.set(-1);\r\n }\r\n else{\r\n intakeA.set(0);\r\n intakeB.set(0); \r\n }\r\n \r\n //Turret\r\n if (toggleTurretButton.get()){\r\n turret.set(leftJoystick.getX());\r\n }\r\n else{\r\n turret.set(manipulator.getX());\r\n }\r\n }"
]
| [
"0.5680361",
"0.54084224",
"0.54072297",
"0.5328211",
"0.50286776",
"0.500651",
"0.49965277",
"0.49492928",
"0.4876032",
"0.48424065",
"0.47210574",
"0.46778324",
"0.46736446",
"0.46721205",
"0.46421397",
"0.46380562",
"0.46361327",
"0.4628472",
"0.46197906",
"0.46159232",
"0.4605201",
"0.46031025",
"0.4596774",
"0.45700237",
"0.45427623",
"0.45291954",
"0.45242426",
"0.45208532",
"0.45197287",
"0.4486386",
"0.44817868",
"0.44670892",
"0.4457154",
"0.44527417",
"0.44514698",
"0.4447832",
"0.44417912",
"0.44352004",
"0.44237062",
"0.44205904",
"0.44168276",
"0.4407359",
"0.44001862",
"0.4395751",
"0.43932903",
"0.4382925",
"0.4369061",
"0.43577248",
"0.43575382",
"0.4347985",
"0.43410376",
"0.43370414",
"0.4322407",
"0.43210828",
"0.43174258",
"0.43054447",
"0.43008935",
"0.4300517",
"0.42852223",
"0.42829877",
"0.4280825",
"0.42800024",
"0.4276582",
"0.427493",
"0.42723167",
"0.42651424",
"0.42588884",
"0.4256008",
"0.42494616",
"0.42455012",
"0.4245192",
"0.4241846",
"0.42383212",
"0.42340624",
"0.4224257",
"0.4223715",
"0.4213071",
"0.42112082",
"0.42059448",
"0.42054215",
"0.42052954",
"0.42016187",
"0.41995394",
"0.4196567",
"0.41833553",
"0.41828075",
"0.41813558",
"0.4177989",
"0.41728035",
"0.41715217",
"0.4167459",
"0.41613114",
"0.4157424",
"0.41568378",
"0.41556635",
"0.41546792",
"0.41544354",
"0.4148895",
"0.41459212",
"0.41437963"
]
| 0.74509484 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.